<dsheets>
one of the design goals of atdgen was to make the data structure format more language-neutral if i understand correctly
<dsheets>
I'd be interested in atdgen if I could use it under js_of_ocaml and it supported similar capabilities
<dsheets>
I haven't investigated it, though, as json-tc already did what I wanted
<ousado>
I see
<dsheets>
I think it generates OCaml code, though, so js_of_ocaml shouldn't be a problem. Of course, I haven't actually tried it yet. :-/
<ousado>
yes, it does, just reading the introduction
<ousado>
on the client-side, do you use a validating JSON parser or the native browser ones?
emmanuelux has joined #ocaml
<dsheets>
well, as soon as i get running under js_of_ocaml, i can use the validating parser for development clients. For the webheads who dislike generated js or the size, they can use the native browser one.
<ousado>
yes.
<dsheets>
I don't yet know how the json parsing will play out. If you look at https://github.com/ashima/gloc/blob/0.1/glo_lib.ml you will see i have implemented optional zero fields to make the format more concise. I have to figure out how to mimic this behavior with atdgen if I migrate to that
sebz has joined #ocaml
<dsheets>
hmm it looks like atdgen supports default field values out-of-the-box
roconnor has joined #ocaml
<ousado>
unfortunately I didn't have enough time yet to really make use of js_of_ocaml, and haxe does pretty well so far, but I'd like to integrate the two with each other
<dsheets>
i've never really used haxe but i worked quite a bit with ocamljs before it was deprecated
<dsheets>
I think js_of_ocaml's ocaml toplevel + haxe + api bindings and tools like gloc could be really sweet
<ousado>
yes, I think so
<ousado>
haxe as a language is a bit.. hm raw and unpolished, but it has great features like its macros
<dsheets>
interesting. i will have to look into haxe's metaprogramming
<ousado>
also it's young and the community is small, and the main developer is very much open to suggestions and ideas
<ousado>
and for me as someone fairly new to hacking compilers, language and type theory etc. I see great potential for learning
<dsheets>
yes, i am new to this as well and quite nervous for some enlightenment from those more experienced in compiler design and software distribution
<dsheets>
i would like to emit low-garbage javascript from webglsl shader source and get some nice ocaml module generation happening so i can write high performance numeric apps for web browsers in ocaml and glsl alone
<ousado>
yeah.. option-pricing for the web.. hehe
<dsheets>
also, i am plotting a crusade to open up the test suites for the shading language which are behind a $10k+ paywall right now
<dsheets>
ousado: option pricing is amenable to simd?
<ousado>
yes, very much so
<dsheets>
monte carlo or something?
<ousado>
I mean, not every model out there.. yes, for example
<ousado>
there are some demos on the nvidia webside for their CUDA stuff
<ousado>
I'm not really into all that simd / graphics stuff, but I implemented some option pricing models a few years ago, and I remember well how we started that thing to let it run over night...
<ousado>
I didn't follow up on it, though. was for the diploma and a phd thesis of a friend
<dsheets>
ah, i wasn't very interested in it until i noticed the standards body victimizing the developer population by specifying stupid things in the language
<ousado>
heh, that's a pretty strange reason to enter a field ;D
<dsheets>
also, i'd like to build modern mathematical structures for GLSL and fix their broken type system
<dsheets>
I was a developer as well but not really interested in the graphics or the games. I did do a few demos: http://ashimagroup.net/demo/
<dsheets>
the math and meta-math interests me more, though, and i simply cannot abide broken languages
<ousado>
is that you speaking?
<dsheets>
in the videos? nah, that's the ceo :-P
<ousado>
ah
<ousado>
yeah, I remember that ooman demo. I showed it to some "we-will-never-surrender-to-anything-else" flash-devs
<dsheets>
heheh. how'd it go over?
<ousado>
well, they didn't say much after I showed them, I think it was a bit of a shock
oriba has quit [Quit: oriba]
<ousado>
but it looks like I have insufficient driver support here..
<ousado>
meh linux and graphics
<dsheets>
gpu vendor? only nvidia isn't blacklisted
<ousado>
ATI.. the hardware should be sufficient
<ousado>
it's a 3 year old lenovo w500
<dsheets>
if you are using a chrome-ish browser, you can try —ignore-gpu-blacklist cmd line option
<ousado>
ah I see
<ousado>
ok will try that after I cleaned up
<ousado>
have like 150 tabs open again ;)
<dsheets>
we have the same disease!
<ousado>
yeah.. i already started writing a chrome extension, but didn't get too far as of now..
<dsheets>
I really wish that browser's understood traversal graphs and automatically coalesced subtrees and tabs with shared keywords
<dsheets>
I tried a TabManager extension for chrome but its interface wasn't magic enough so i never used it
<dsheets>
and recently i've turned a little cold on the chrome/chromium projects entirely
<dsheets>
I doubt Google's continued benevolence and their open source projects and developer relations are pretty poor.
<ousado>
me too
<dsheets>
I've had relevant comments on the chromium.org blog censored in favor of letting blogspam comments through
<ousado>
wow
<ousado>
frankly, I think there's a great lack of judgment and awareness WRT web development at google
<dsheets>
I've seen many, many secret issues in "open source" projects and rewriting of revision history
<ousado>
like dart
<dsheets>
hahahaha
<ousado>
I have no idea how they could pull off something like that in times of type inference
<dsheets>
they weren't paying attention to their studies
<dsheets>
and they fail to grasp the gravity of their decisions when it comes to web tech — they treat tool and platform development just like application development so when they save 2 days of dev time by taking a shortcut, they create 20000 days of distributed debug time over the next decade
<ousado>
yes, my impression, too
<ousado>
I used e.g. GWT for some time
<dsheets>
it's very disrespectful. they then turn around and tell me that they "don't have the manpower" to fix conformance problems in their software while i develop a test suite and source transformer on a shoestring that takes advantage of those unimportant features
sebz has quit [Quit: Computer has gone to sleep.]
<dsheets>
to add, you know, little things like modularity and dynamic linking to a language they claim is an "Open Web Standard"
<dsheets>
how was GWT? broken?
sebz has joined #ocaml
<ousado>
interesting
<ousado>
GWT?
<ousado>
oh horrible
<ousado>
compiling hello world in GWT takes as much time as a 1,000,000 LOC project in haxe
<ousado>
(well, that's a rough estimate)
<dsheets>
O_O implemented in java for java->js?
<ousado>
yes
<dsheets>
sad. they are pushing their broken language implementations for webgl in C++ and JS now
<ousado>
it has a massive infrastructure, eclipse plugins a "devmode" that lets app-devs use familiar java debugging..
<ousado>
but it's totally flawed, not usable for everyday web development
<dsheets>
only "serious business" web development? like gmail or something?
<dsheets>
projects that actually need modularity and a legit type system? :-P
<ousado>
nah.. I'm not even sure there's a single well known google app written in GWT
<ousado>
all those are based on their js stuff, as far as I'm aware
<dsheets>
yes, with great compiler like closure-compiler implemented in… java!
<ousado>
the idea was to enable java app devs to write GUI-style apps for the web without knowing the first thing about web development
<dsheets>
(signed and faxed a license agreement to them for a 2 byte bugfix)
<dsheets>
first and last time i contribute to that project
<ousado>
wow.. that's pretty bad
<dsheets>
also, google code is evil as a way to legitimize google's outsized control on their "open source" projects
<ousado>
yes.. I always had that feeling, but I never got involved enough to verify
<dsheets>
particularly allowing secret issues that are not security related is appalling
<ousado>
also google groups is nasty
<dsheets>
yes, i always give up on communities that use google groups
<ousado>
I click on a link from some IRC chat, and they give me a login form
<ousado>
oh,, ouch
<ousado>
haxe migrated just now ..
<dsheets>
to google groups or from google groups?
<ousado>
to, unfortunately
<dsheets>
:-( what about ocaml forge? not ocaml-specific enough?
<ousado>
I don't know whether they even tried
<ousado>
and I'm not sure there's much awareness on those issues
<ousado>
most members are quite young game devs there
<ousado>
haxe has been used mostly as alternative to AS3 targeting the flash platform
<dsheets>
yes, when i looked at it a few years ago it looked like a way to write-once and run in flash and server-side in php
<dsheets>
and as i didn't like those platforms, i didn't dig much deeper
<ousado>
yes, currently there are C++, neko (a very nice lua-like VM), ABC bytecode, JS, PHP and C# targets
<ousado>
JVM is in the pipeline
<dsheets>
only later did i find out its metalanguage is ocaml
<ousado>
but not all are high-quality
<ousado>
neko is very nice, takes many ideas from ocaml
<ousado>
like the 31bit integer model
<ousado>
and the C interface is similar, too
<dsheets>
interesting. there is so much to read about and so little time :-/
<ousado>
indeed
<ousado>
some 240h days per week would be cool
<ousado>
I use neko to interface libevent and the upcoming and rewritten http library on top of it
<dsheets>
i want some kind of personal research agent that reduces my flail-time by tracking what info i consume and doing some inference and speculative retrieval… could get a couple more hours/day of research done that way, maybe
<ousado>
that's quite a business model
<dsheets>
haxe http library?
<ousado>
no, libevent
<dsheets>
you think there is a business there?
<ousado>
they had http support before, but some guy did a new one
<ousado>
I'm not sure actually
<dsheets>
ah, i see. i have been using lwt+cohttp
<ousado>
yes, I'd have used that, but my ocaml isn't snappy enough yet
<dsheets>
ah. what timezone are you in if you don't mind my asking?
<NaCl>
thelema: I think I may end up using s-expressions
<ousado>
.. and since I'm a little under pressure, I have to go for the stuff I know best
<ousado>
oh, it's 4:09 AM here
<ousado>
I live in germany
<dsheets>
ok. maybe i'll have to come to europe, all the cool programmers seem to live there
<ousado>
heh
<ousado>
well, come to europe, it's nice
<ousado>
not necessarily because of the programmers, though
<dsheets>
ousado: perhaps if SOPA/PIPA passes… it was nice chatting but it is time for dinner here :-)
<ousado>
dsheets: cool, yes, nice again, actually
<ousado>
see you then
<dsheets>
see you :-)
buriedhead has joined #ocaml
mdelaney has joined #ocaml
buriedhead has quit [Ping timeout: 248 seconds]
upgrayeddd has joined #ocaml
pilki has joined #ocaml
buriedhead has joined #ocaml
<thelema>
dsheets: you can auto-install many packages (with deps) with odb it'll be easy for people if your library is installable with odb.
<Drakken>
thelema that viewport prob is fixed now. One of the archimedes devs helped me with it.
mdelaney has quit [Read error: Connection reset by peer]
mdelaney has joined #ocaml
roconnor has quit [Ping timeout: 260 seconds]
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 244 seconds]
buriedhead has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
fantasti` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
fantasticsid has joined #ocaml
Cyanure has quit [Remote host closed the connection]
buriedhead has joined #ocaml
sebz has joined #ocaml
ulfdoz has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
mdelaney has quit [Ping timeout: 268 seconds]
mdelaney has joined #ocaml
ankit9 has quit [Quit: Leaving]
philtor has quit [Ping timeout: 240 seconds]
emmanuel_ has joined #ocaml
emmanuelux has quit [Write error: Connection reset by peer]
emmanuel_ has quit [Remote host closed the connection]
pilki has quit [Quit: Leaving]
everyonemines has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
buriedhead has quit [Ping timeout: 268 seconds]
ankit9 has joined #ocaml
mdelaney has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
Snark has joined #ocaml
taupin has joined #ocaml
sebz has joined #ocaml
sebz has quit [Client Quit]
pango is now known as pangoafk
sebz has joined #ocaml
Kakadu has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 276 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
dsheets has quit [Ping timeout: 240 seconds]
cago has joined #ocaml
dsheets has joined #ocaml
edwin has joined #ocaml
dsheets has quit [Ping timeout: 248 seconds]
everyonemines has quit [Quit: Leaving.]
Xizor has joined #ocaml
_andre has joined #ocaml
ikaros has joined #ocaml
<adrien>
moin
zorun has quit [Read error: Connection reset by peer]
zorun has joined #ocaml
yroeht has quit [Ping timeout: 248 seconds]
milosn has joined #ocaml
yroeht has joined #ocaml
thizanne has quit [Ping timeout: 268 seconds]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
thizanne has joined #ocaml
Cyanure has joined #ocaml
<adrien>
inside a module, is there a good way to have a function called on when the module is not used as a library?
<adrien>
so the function can be used like "M.f arg" or ./m.native some_arg ?
joewilliams has quit [Excess Flood]
joewilliams has joined #ocaml
<flux>
call a function of a module when no functions the module is not called? quite a concept..
<flux>
the 'closest' you can get is Sys.interactive (iirc) for detecting toplevel sessions
letrec has joined #ocaml
<adrien>
I wanted to make a module that could be used both standalone and as a library but I guess I'll skip the standalone part
zorun has quit [Quit: leaving]
zorun has joined #ocaml
zorun has quit [Quit: leaving]
zorun has joined #ocaml
zorun has quit [Client Quit]
zorun has joined #ocaml
<edwin>
if anyone is using the syntastic plugin for Vim: it just gained OCaml syntax checking support!
zorun has quit [Client Quit]
zorun has joined #ocaml
<flux>
ooh
<flux>
too bad those need to be extended separately for syntax extensions
pilki has joined #ocaml
<flux>
it's not a real hindrance, though ;)
fraggle_laptop has joined #ocaml
<edwin>
well its using camlp4o now
<edwin>
guess you could customize it somehow
<flux>
oh, in that case it probably would easily work with extensions as well
<edwin>
I only added a basic syntax checker for OCaml, because it was missing completely
<edwin>
basically when you save the file you get those '>>' markers on the lines that have syntax errors
<edwin>
and if you type :Errors you can see the messages, and the window stays open until you fix them all
<edwin>
and in gvim you got the bubbles, but I usually only use terminal, so not something for me
<edwin>
hmm will have to experiment with ocamlbuild *.pp.ml
<adrien>
edwin: is it able to get anything about types? the C example shows a warning for the type of main
zorun has quit [Quit: leaving]
zorun has joined #ocaml
zorun has quit [Client Quit]
zorun has joined #ocaml
<edwin>
adrien: if I run ocamlc -i -o /dev/null then yes, but then I also get errors about 'Unbound module ...'. Thats why I'm looking into using ocamlbuild for ths
<adrien>
right :-)
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
milosn has quit [Ping timeout: 252 seconds]
<rwmjones>
gildor: pa-do (delimited overloading) isn't in debian .. or am I just overlooking something very obvious?
<thelema>
rwmjones: I'd say you can build with odb, except I get an error about inconsistent assumptions over camlp4_import when compiling it.
<thelema>
maybe there's something funny about my ocaml build
<adrien>
rrrr
pilki has quit [Quit: This computer has gone to sleep]
<adrien>
I think it's not the first project I have issues with ocamlbuild/oasis and C stubs
<rwmjones>
I really just want to know if pa-do is in debian
<adrien>
ocamlbuild doesn't catch changes to my C stubs I think
<adrien>
definitely doesn't help debugging
ankit9 has quit [Ping timeout: 240 seconds]
<thelema>
rwmjones: ok, n/m then. btw, good job packaging bitstring - I've found tons of ocaml packages that can't do a simple (configure) make; make install
milosn has joined #ocaml
<edwin>
I don't think that pa-do is in Debian, I can't find it
<edwin>
adrien: ok I think I got syntastic with ocamlbuild working, want to try?
<adrien>
edwin: in a few minutes I think
<adrien>
I need to maybe fight ocamlbuild and then merge a git branch and push again (not a lot of work)
<adrien>
the .ml file is at the top of the .c file; you'll notice that ml_foo is unit -> unit
<wmeyer>
ah yes
<adrien>
also:
<adrien>
# tag (repr (fst (42, 42l)));;
<adrien>
- : int = 1000
<adrien>
(that's with Obj opened)
<wmeyer>
hmm Tag_val(Field(ml_message, 0))
<wmeyer>
that does not name sense with Val_int
<wmeyer>
make*
<wmeyer>
because Int is 31 bit integer value and not block
<wmeyer>
least significant bit is always 1
<wmeyer>
so the blocks have zero and they are always aligned
<wmeyer>
(that's why they have zero)
<adrien>
I thought about it but I don't understand:
<adrien>
# tag (repr 42);;
<adrien>
- : int = 1000
<wmeyer>
maybe there is a special handling, not present in Tag_val macro
<wmeyer>
of course it can't segfault
<wmeyer>
because OCaml meant to be typesafe
<adrien>
There's Obj.int_tag too
sebz has quit [Quit: Computer has gone to sleep.]
<adrien>
hmmm, right
<wmeyer>
yes, there is, Tag_val macro is fairy lowlever thing
<wmeyer>
so you should not call Tag_val on ints
<adrien>
caml_obj_tag in byterun/obj.c first does tests
<wmeyer>
cool
<wmeyer>
int is not an address
<wmeyer>
so first thing what Tag_val does is to dereference the address
<wmeyer>
and since your address is 42
<wmeyer>
it will nicely segfault
<wmeyer>
and all because, these macros assume that you know what you do, and you know the types of your values, so no runtime checking is done to stay efficient.
<wmeyer>
cp -r godi/3.12 godi/3.12-ocamlspot
<wmeyer>
still need to think how to copy all those sp[io]t files into the godi
<wmeyer>
it seems like it's going to just work
<adrien>
well, still have issues in my code but it works when I use Int32_val, caml_copy_int32 and Int32.t, so...