flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
steshaw has joined #ocaml
ollehar has joined #ocaml
w0rm_x has quit [Quit: if Φ Σ e : φ then Φ Σ τ' → σ' :: ∃]
csakatoku has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
Superdead has quit [Quit: Page closed]
manud is now known as manu-afk
travisbrady has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
nikki93 has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
csakatoku has joined #ocaml
Drup has quit [Quit: Leaving.]
shinnya has quit [Ping timeout: 252 seconds]
ollehar has quit [Ping timeout: 265 seconds]
boogie has quit [Remote host closed the connection]
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
manizzle has quit [Ping timeout: 245 seconds]
nikki93 has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest43226
breakds has joined #ocaml
travisbrady has quit [Quit: travisbrady]
ollehar has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
BitPuffin has quit [Ping timeout: 252 seconds]
manu-afk is now known as manu
manu is now known as Guest68623
Guest68623 is now known as manud
yours_truly has quit [Quit: Leaving]
nisstyre has joined #ocaml
BitPuffin has joined #ocaml
<BitPuffin> Hmmmm
<BitPuffin> doesn't seem like anyone has made bindings to the wayland api yet for ocaml
<nisstyre> BitPuffin: I wouldn't expect there to be
nikki93 has joined #ocaml
<nisstyre> BitPuffin: maybe someone has written Haskell ones though
<BitPuffin> nisstyre: who knows, I was kind of considering writing a window manager/compositor for wayland in ocaml
breakds has quit [Remote host closed the connection]
IbnFirnas has quit [Ping timeout: 272 seconds]
IbnFirnas has joined #ocaml
ollehar has quit [Ping timeout: 268 seconds]
<whitequark> BitPuffin: hm, that sounds interesting
nisstyre has quit [Quit: Leaving]
ollehar has joined #ocaml
nisstyre has joined #ocaml
ggole has joined #ocaml
BitPuffin has quit [Quit: WeeChat 0.4.2]
manizzle has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
manud has quit [Quit: manud]
manud has joined #ocaml
paolooo has joined #ocaml
asmanur has quit [Ping timeout: 245 seconds]
asmanur has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
Guest43226 has quit [Remote host closed the connection]
gour has joined #ocaml
yacks has quit [Quit: Leaving]
yezariaely has joined #ocaml
ulfdoz has joined #ocaml
nisstyre has quit [Quit: Leaving]
wolfnn has joined #ocaml
Simn has joined #ocaml
wolfnn has quit [Ping timeout: 272 seconds]
q66 has joined #ocaml
<adrien> morning
ttamttam has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
ttamttam has quit [Quit: ttamttam]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
Snark has joined #ocaml
<gour> morning
djcoin_ has joined #ocaml
maufred has joined #ocaml
cago has joined #ocaml
radditz has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 245 seconds]
<companion_cube> hi
darkf_ is now known as darkf
<radditz> hello companion_cube , how are things going?
<companion_cube> fine, thansk
cdidd has quit [Ping timeout: 272 seconds]
AltGr has joined #ocaml
steshaw has quit [Ping timeout: 272 seconds]
manizzle has quit [Read error: Operation timed out]
ttamttam has joined #ocaml
cdidd has joined #ocaml
skunkwerks has joined #ocaml
<pippijn> morning
Kakadu has joined #ocaml
<companion_cube> hi pippijn
manizzle has joined #ocaml
skunkwerks has quit [Quit: how now brown cow?]
zpe has joined #ocaml
bnoordhuis has joined #ocaml
mfp has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
mort___ has joined #ocaml
nikki93 has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
ggole has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
ggole has joined #ocaml
skchrko has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
nikki93 has joined #ocaml
mchqwerty has joined #ocaml
steshaw has joined #ocaml
yezariaely has quit [Ping timeout: 252 seconds]
malo has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
_andre has joined #ocaml
darkf has quit [Quit: Leaving]
csakatok_ has quit [Remote host closed the connection]
radditz has quit [Quit: Page closed]
bnoordhuis has quit [Ping timeout: 248 seconds]
Simn has joined #ocaml
Drup has joined #ocaml
breakds has joined #ocaml
steshaw has quit [Ping timeout: 248 seconds]
<Kakadu> adrien_oww: Now I know that I should send Qt patches to code-review site instead of bugtracker
<Kakadu> I hope that they will be reviewed soon
<adrien_oww> good idea
Drup has quit [Ping timeout: 268 seconds]
Drup has joined #ocaml
bnoordhuis has joined #ocaml
Drup has quit [Ping timeout: 260 seconds]
Drup has joined #ocaml
steshaw has joined #ocaml
PM has quit [Ping timeout: 240 seconds]
bitbckt has quit [Ping timeout: 240 seconds]
robink_ has joined #ocaml
robink has quit [Ping timeout: 240 seconds]
rossberg has quit [Ping timeout: 240 seconds]
rossberg has joined #ocaml
bitbckt has joined #ocaml
PM has joined #ocaml
Drup has quit [Ping timeout: 256 seconds]
gnuvince has quit [Ping timeout: 245 seconds]
w0rm_x has joined #ocaml
Drup has joined #ocaml
avsm has quit [Quit: Leaving.]
breakds has quit [Remote host closed the connection]
Drup has quit [Ping timeout: 260 seconds]
Drup has joined #ocaml
Simn has quit [Quit: Leaving]
Drup1 has joined #ocaml
Drup has quit [Client Quit]
yezariaely has joined #ocaml
breakds has joined #ocaml
strobegen has quit [Ping timeout: 252 seconds]
<yezariaely> is there any bytecode manipulation library in ocaml for ocaml bytecode?
<yezariaely> i.e. instrumentation library?
strobegen has joined #ocaml
Drup1 is now known as Drup
bnoordhuis has quit [Ping timeout: 268 seconds]
<Drup> yezariaely: there is one in the project ocaml for pi microcontroler
<Drup> and you can certainly find a bunch of stuff in js_of_ocaml, I think it's exporting some part as libraries
<yezariaely> Drup: thank you for the pointers!
<Drup> http://www.algo-prog.info/ocapic/web/ for the pi project
<Drup> yezariaely: there may also some stuff in the compiler-libs
<pippijn> the stuff in js_of_ocaml is not (afaik) in a library, but it is *very* easy to extract from the code base
<pippijn> I've used it to hack together an ocaml bytecode disassembly program
jbrown has quit [Remote host closed the connection]
<yezariaely> pippijn: cool, where do I get that?
<pippijn> get what? js_of_ocaml?
<yezariaely> no your disassembler :)
<Drup> pippijn: there is new package, "js_of_ocaml.compiler", not sure what's in it but it may be that
<pippijn> Idon't have it anymore
<pippijn> it was a quick hack
<yezariaely> ah, ok.
<pippijn> you can do the same thing in an hour or so
<pippijn> and that includes downloading the code, extracting the required modules and learning how they are used
<pippijn> Drup: mine doesn't have that
<Drup> dev version :]
<pippijn> ah
<yezariaely> Drup: there is at least a bytecode parser :) nice
<pippijn> js_of_ocaml also includes some analyses and optimisers for ocaml byte code
<Drup> yezariaely: depending of what you want to do, OcamlClean, from ocapic, is interesting, with a very agressive deadcode eliminator
<pippijn> Cette page utilise JavaScript. is ce texte est visible, c'est que JavaScript est indisponible. Certains contenus ne vous sont alors pas accessibles.
<pippijn> what does it use js for?
<pippijn> seems to work fine without it
<pippijn> ah, page tools
<yezariaely> often its some menu related stuff...
<flux> how easy is it to build simple javascript-happy web pages these days in ocaml?
<pippijn> yezariaely: it's wiki related stuff
<pippijn> the menu works
<Drup> very simple :D
<flux> what is the best way to go about it?
<Drup> js_of_ocaml
<pippijn> eliom
<Kakadu> flux: easy enough for me
<flux> that only is half the equation
<flux> how about the server side?
<pippijn> eliom
<Kakadu> flux: eliom
<flux> the thing about eliom is that I find myself always browsing around documentation :-)
<Drup> well, it's a big library :D
<flux> whereas last week I implemented a nodejs-based service with zero previous knowledge on nodejs..
olibjerd has joined #ocaml
<flux> but, I admit it, I had bugs that a static type system could've helped me with :)
<Drup> did you follow the service tutorials for eliom ?
<ousado> flux: why didn't you use js_of_ocaml?
<flux> I don't remember anymore what I did with eliom the last time
<ousado> .. or haxe
<flux> ousado, because I needed to make something simple&working in the limited time and it only involved using pre-existing client-side javascript libraries :)
<flux> also nodejs is pretty nice with its package management I discovered. well, not all packages worked, but still..
<flux> I mean opam is pretty much in the same space but with much less web-oriented libraries
strobegen has quit [Excess Flood]
<Drup> for obvious reasons ;)
strobegen has joined #ocaml
<flux> oh, and one big reason was that I was making this for the company, and afaik the only ocaml-able guy here :)
<ousado> that's a reason, finally :)
<flux> but I have some ideas for stuff I'd like to do on my spare time
<flux> they would probably involve dealing with the canvas for drawing charts
<ousado> I mean.. "wrapping" the required nodejs APIs is a matter of minutes and you can do it incrementally
<ousado> as the need arises
moro_home has quit [Ping timeout: 272 seconds]
<flux> does ocsigen/eliom/js_of_ocaml work nicely with ocamlbuild these days?
<flux> I remember having trouble with that the last time I tried it
<flux> in particular the eliom/js_of_ocaml-part
<Kakadu> flux: AFAIR all is fine
<ousado> does js_of_ocaml support overloading of external (native js) functions for OOP-style APIs?
<Drup> ousado: there is a track to use overloading without actually overloading, by binding one function on two different ocaml functions
<Drup> trick*
<flux> I actually wrote a home inventory system with eliom (ability to show pictures of boxes and put content in them), but it involved no javascript
<flux> and that was a few years ago..
<Drup> flux: there is an ocamlbuild plugin for eliom, done by jpdeplaix
<ousado> flux: when I last tried, a few months ago, it was really cool
<Kakadu> flux: and there is another one plugin
<flux> are these plugins something I can get with opam?-)
<Kakadu> 2nd one is on github
bondar has joined #ocaml
<Drup> the one from jpdeplaix is in eliom dev version now I think.
<Drup> Kakadu: you shouldn't use this one, it's buggy as hell :/
<Kakadu> yeah, I have used 2nd one
bondar has quit [Max SendQ exceeded]
<jpdeplaix> flux: the new plugin merged in eliom requires ocaml >= 4.01 because it needs the new option from ocamlbuild (-plugin-tags)
<jpdeplaix> it works pretty well :)
<pippijn> what does it do?
<pippijn> plugin tags
<flux> is this the one I want to use? https://github.com/ocsigen/ocamlbuild-eliom
<flux> or this? https://github.com/sergezloto/eliom-ocamlbuild - it's huge :-o
<flux> ah, it's only the rest of the example :)
<Kakadu> flux: I have used 2nd one
<jpdeplaix> flux: the first one is the one that has been merged in eliom (but it's not up-to-date)
<flux> doesn't seem to come along with the opam install, though
<jpdeplaix> you can look at the code for a more up-to-date version: https://github.com/ocsigen/eliom/tree/master/src/ocamlbuild
<jpdeplaix> pippijn: it allow you to use tags for the plugin itself
<jpdeplaix> the most useful tag is « package(…) »
moro_home has joined #ocaml
<jpdeplaix> in this case « package(eliom.ocamlbuild) »
<jpdeplaix> which relie on js_of_ocaml.ocamlbuild
<jpdeplaix> which works also pretty well :)
<pippijn> oh, that
<pippijn> yeah, I've seen the discussion
<flux> the second version seems to search for eliomc/js_of_eliom from the wrong directory with my opam installation
<flux> but maybe my installation isn't typical
<flux> it tries to search it from /home/flux/ocaml/bin/js_of_eliom but it is actually at /home/flux/ocaml/.opam/system/bin/js_of_eliom
<flux> symlinking 'fixed' them, though.. but the same problem is with the dlljs_of_ocaml.so as well, I suppose I can symlink that as well. seems a bit hacky :)
<Drup> flux: (14:25:55) Drup: Kakadu: you shouldn't use this one, it's buggy as hell :/
<flux> well, maybe that's it :-)
<jpdeplaix> *wink* *wink*
<jpdeplaix> :D
<flux> but, it comes with a full example..
<pippijn> I didn't know js_of_ocaml needed native code
<pippijn> seems strange
<Drup> it doesn't
<jpdeplaix> flux: if you want an example for the official one: https://github.com/Cumulus/Cumulus/blob/master/myocamlbuild.ml#L511
<pippijn> oh
<pippijn> dll*.so are something else
bm has joined #ocaml
<pippijn> what are they?
<pippijn> .opam/system/lib/stublibs/dlljs_of_ocaml.so
<pippijn> looks like native code
bm is now known as Guest30425
<Guest30425> guys, I am looking for jobs in ocaml. or some active open source proejct so I can learn
<pippijn> hi bm
<Guest30425> pippijn: hello
bnoordhuis has joined #ocaml
<pippijn> do you know ocaml?
<Guest30425> alittle, strong in c++ mainly
<Guest30425> but like ocaml alot thou
<pippijn> ok, but you want a job in ocaml
<Guest30425> I contributed to some projects too
<Guest30425> yes
<pippijn> are you into politics?
<flux> what a curious question :)
<Guest30425> guys, any advice?
<pippijn> "I know a little ocaml, so I want a job in it"
<pippijn> sounds like
<Guest30425> modest
<pippijn> "my driver drives a car, so I'll be minister of transportation"
<pippijn> Guest30425: not modest if you say you're strong in C++ right after :)
<flux> (actually my first thought was that guest30425 is looking to get into financy related job)
<pippijn> C++ is one of the most complex languages around, so if you're "strong" in that, I can't call you modest
<Guest30425> lets make quick test
<Guest30425> the thing is,
ollehar has joined #ocaml
<Guest30425> if you know remote jobs for either language. or active open source proejcts in caml.
<Guest30425> please let me know. I wanna learn more in ocaml
<Drup> there is lots of them, you will have to look a bit by yourself :/
<Guest30425> give me hints
<pippijn> I think you can browse the opam package lists
<Guest30425> name of sites
<pippijn> or ocamlforge
<Drup> Guest30425: for job stuff, there is a caml-jobs mailing list
<pippijn> and if you see something you like, you can contact its maintainers
<Guest30425> Drup: any similar hints?
<pippijn> preferably with a patch :)
<adrien_oww> that should already give a healthy list of projects
<Guest30425> Thanks.
<Guest30425> Drup: I can't find caml-jobs.
<Guest30425> How shall I join this?
bnoordhuis has quit [Ping timeout: 246 seconds]
travisbrady has joined #ocaml
<Guest30425> Drup: Thanks.
<pippijn> Drup: do you live in paris?
<Drup> not currently
<pippijn> ok
Kakadu has quit [Remote host closed the connection]
<Drup> pippijn: why ?
<pippijn> I might be moving there by the end of this year
<pippijn> and I don't know anything :)
Kakadu has joined #ocaml
<pippijn> like, where to live and that
<pippijn> adrien lives in paris, I think?
<ousado> I think so
<pippijn> well, I don't know whether it's going to happen, but I hope so :)
<ousado> at least he complained when he heard wmeyer was in paris (and didn't say a word, where is he, btw?) recently
<pippijn> hehe
<pippijn> I don't know, I think he's very busy
<Drup> pippijn: moving for jobs reasons ?
<pippijn> I might meet him in london next month
<pippijn> Drup: yes
<ousado> I only hope his new time management thingy didn't made him stop using IRC altogether
<ousado> *make
<pippijn> time management thingy?
<pippijn> I haven't heard of that
<ousado> some book about time management he was reading and very fond of
<pippijn> oh
<pippijn> maybe it said "Don't use IRC" on the first page
<ousado> hehe
<ggole> Sound advice.
<ousado> depends :)
Drup1 has joined #ocaml
Drup has quit [Read error: Connection reset by peer]
Drup1 is now known as Drup
yacks has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Client Quit]
mcclurmc has joined #ocaml
Guest30425 has quit [Quit: Page closed]
wolfnn has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
<gasche> Guest76588: there is a list of some companies using OCaml on the community website
<gasche> most of those will happily look at CVs of profiles they're interested in
strobegen has quit [Quit: Leaving.]
<gasche> (not finding quite enough qualified OCaml programmers for your needs is a common problem to have when you're an OCaml-using company)
<gasche> there are, of course, other opportunities that are not listed here, and that you can learn by networking
<gasche> re. open source projects, I'm not sure we actually have a webpage for that
<gasche> it would be interesting, though
strobegen has joined #ocaml
<gasche> most existing OCaml open source projects will happily accept patches
strobegen has quit [Remote host closed the connection]
travisbrady has quit [Quit: travisbrady]
<gasche> but my gut feeling would be that you should pick a domain you're interested in and
<gasche> either (1) contribute on the most advanced existing project (we can help you find them) or (2) develop your own library
<gasche> OCaml lacks libraries to parse data format, interact with common existing libraries outside the OCaml world, etc.
<Kakadu> I haven't seen for weeks that gasche writes something here and suddenly some many sentencies
<gasche> "a small library to do X" is appreciated for most values of X
<gasche> so I guess Guest76588 it would be more "what kind of things you want to work on? then consider doing it in OCaml"
<gasche> hi Kakadu :)
<pippijn> Jul 18, 2013 - Facebook has agreed to acquire Monoidics, a U.K. company that sells software that checks other software for coding errors.
<pippijn> too bad
<gasche> why?
<pippijn> because now it belongs to facebook
<gasche> ah
<gasche> and was it doing good stuff you care about?
strobegen has joined #ocaml
<pippijn> I don't know, but it seemed to be one of the more interesting (to me) companies on that website
<gasche> I personally heard of it for the first time last September, when I asked Peter O'Hearn "why are you at Facebook now?"
avsm has joined #ocaml
<pippijn> I hadn't heard of it before, but I'm interested in static analysis
<ousado> gasche: great question, what did he say?
<gasche> that he was part of Monoidics
<gasche> it's apparently a spinoff of Imperial College London or something
<ousado> I always wonder how seemingly sane people end up working for facebook
<gasche> well
<Drup> they use ocaml do to static analysis on php code
<Drup> so, it may be sane, on the actual work aspect
<Drup> on the moral aspect of a big corporation selling private data, that's up to each person, though.
<gasche> a lot of people in the academia will tell you that the administrative stuff you have to do is bad enough
strobegen has quit [Client Quit]
<adrien_oww> Drup: simple: you focus on the technical aspect
paolooo has quit [Ping timeout: 250 seconds]
<gasche> when a high-profile guy as O'Hearn goes to work at a big company, (I hope) he can keep working on the science he's interested in, and instead of administrative stuff he may have to do some product development
<Drup> some people can shutdown their conscience, some people can't
mort___ has quit [Ping timeout: 245 seconds]
<gasche> I think it's easy to work in any company and not feel linked to what they do
<ousado> which is a problem
<jpdeplaix> flux: did you finally succeed ?
<gasche> in research, most people will happily receive military funding to work on what they like (whether or not they're ok with military in general)
chambart has joined #ocaml
<gasche> why wouldn't people be paid by a big company to work on what they like?
<flux> jpdeplaix, I'll try it at some later time
<jpdeplaix> ok
<flux> jpdeplaix, I'm sure to dig up this discussion and your nick at that time 8-)
<ousado> gasche: well, if their work is just being sponsored by [big company] without any strings attached, great
<gasche> ousado: in practice it tends to be a gray area
<ousado> but if they develop nice stuff and it's being patented and locked away, BAD
<ousado> evil, even
<gasche> I think in practice people see this as a trade-off: a lot of what they find interesting, and *some* strings
<ousado> and if their work is used to more effectively bomb afghan weddings and stuff, I think it becomes kinda obvious
<ggole> How is stuff being locked away evil? Unfortunately, maybe.
<ggole> s/ly//
<flux> module FindAfganWeddingBombTarget = (* hmmm, I wonder if this is going to be used for something bad.. *)
<ousado> ggole: uhm - I think mankind has lots of problems to solve
<ggole> Cue that joke about the ethics of a software developer requiring him to take the country to be bombed as a parameter rather than hardcoding it
<ggole> Sure, but software isn't really helping much with that
<gasche> I think this is getting off-topic (and I have too much work); escape!
<whitequark> ggole: I disagree; modern world is practically run by software
<ggole> Running != helping
<ggole> Software is just a tool: people can take it and do bad things or good things or mostly just stuff to make what they've already chosen to do happen a bit more easily
<whitequark> of course, the stuff with actual value is industrial control systems, logistics backbones, embedded stuff in general, and so on... not todolists for hamsters
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
ollehar has quit [Ping timeout: 246 seconds]
Drup has quit [Ping timeout: 265 seconds]
mch has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
olibjerd has quit [Ping timeout: 252 seconds]
mchqwerty has quit [Read error: Operation timed out]
sgnb has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
saml has joined #ocaml
bnoordhuis has joined #ocaml
yezariaely has quit [Ping timeout: 256 seconds]
cago has left #ocaml []
Drup has joined #ocaml
paddymahoney has quit [Remote host closed the connection]
olibjerd has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
chambart has joined #ocaml
Drup has quit [Read error: Connection reset by peer]
Drup1 has joined #ocaml
Drup1 is now known as Drup
TDJACR has joined #ocaml
olibjerd has quit [Ping timeout: 252 seconds]
olibjerd has joined #ocaml
csakatoku has joined #ocaml
paddymahoney has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest86641
Drup has quit [Ping timeout: 260 seconds]
chambart has quit [Read error: Operation timed out]
sgnb has joined #ocaml
strobegen has joined #ocaml
Drup has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
shinnya has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
Guest86641 has quit [Remote host closed the connection]
ocp has joined #ocaml
ollehar has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
olibjerd has quit [Ping timeout: 265 seconds]
avsm has joined #ocaml
<gasche> ollehar: can you give me the URL of the syntax extension? I can't seem to find it
olibjerd has joined #ocaml
thomasga has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
olibjerd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
csakatoku has joined #ocaml
avsm has quit [Client Quit]
q66 has quit [Ping timeout: 246 seconds]
csakatoku has quit [Ping timeout: 245 seconds]
strobegen has quit [Ping timeout: 246 seconds]
bondar has joined #ocaml
avsm has joined #ocaml
yezariaely has joined #ocaml
bnoordhuis has quit [Ping timeout: 264 seconds]
avsm has quit [Client Quit]
q66 has joined #ocaml
avsm has joined #ocaml
bondar has quit [Quit: Leaving]
avsm has quit [Client Quit]
avsm has joined #ocaml
<kerneis> is Facebook prominently featured on http://ocaml.org/companies.html because they paid for it?
<kerneis> oh no, it's just a random company each time
<adrien_oww> :D
<kerneis> it's confusing, but I prefer that
<kerneis> so if anyone wants to work in Cambridge, Citrix is very actively looking for OCaml devs currently
<kerneis> very actively as in: two of their recruiters contacted me last week
<Kakadu> kerneis: where did they found you? something like linkedin?
moro_home has quit [Read error: Operation timed out]
<adrien_oww> I heard there are a lot of weird people in cambridge and I wouldn't want to make the situation any worse
<Kakadu> :)
Simn has joined #ocaml
<kerneis> hehe, that's a university city after all
<kerneis> nice place to live in my opinion, though
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
Kakadu has quit []
sepp2k has quit [Quit: Konversation terminated!]
mangaba_leitosa has joined #ocaml
boogie has joined #ocaml
AltGr has left #ocaml []
bnoordhuis has joined #ocaml
w0rm_x has quit [Quit: if Φ Σ e : φ then Φ Σ τ' → σ' :: ∃]
yezariaely has quit [Quit: Leaving.]
BitPuffin has joined #ocaml
pango_ is now known as pango
ttamttam has quit [Quit: ttamttam]
robink_ is now known as robink
skchrko has quit [Ping timeout: 264 seconds]
bnoordhuis has quit [Ping timeout: 265 seconds]
<BitPuffin> does most people use core instead of the default standard lib?Ö
djcoin_ has quit [Quit: WeeChat 0.4.1]
mch has quit [Ping timeout: 264 seconds]
skchrko has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ocp has quit [Quit: Leaving.]
ocp1 has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
mcclurmc has quit [Quit: Leaving.]
|jbrown| has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
mcclurmc has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
csakatoku has joined #ocaml
avsm1 has quit [Quit: Leaving.]
csakatoku has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
maufred has quit [Ping timeout: 268 seconds]
shinnya has quit [Ping timeout: 264 seconds]
ggole has quit []
malo has quit [Quit: Leaving]
ousado has quit [Ping timeout: 252 seconds]
ousado has joined #ocaml
darkf has joined #ocaml
ohama has quit [Ping timeout: 240 seconds]
ohama has joined #ocaml
_andre has quit [Quit: leaving]
madroach has joined #ocaml
boogie has quit [Remote host closed the connection]
bitemyapp has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
w0rm_x has joined #ocaml
Drup has quit [Read error: Connection reset by peer]
Drup has joined #ocaml
mcclurmc has joined #ocaml
steshaw has quit [Ping timeout: 252 seconds]
Neros_ has quit [Read error: Connection reset by peer]
metasyntax has quit [Quit: Leaving]
jdoles has joined #ocaml
Neros has joined #ocaml
manizzle has quit [Ping timeout: 252 seconds]
ocp1 has quit [Ping timeout: 240 seconds]
ocp has joined #ocaml
rand000 has joined #ocaml
gour has quit [Quit: WeeChat 0.4.1]
lopho has joined #ocaml
<BitPuffin> Why is recursion preferred to regular loops?
<companion_cube> BitPuffin: in OCaml, it's more powerful in general
<companion_cube> for instance, in case of mutual recursion, or non tail-call recursion
<whitequark> also, it's awkward to iterate over recursive structures
<whitequark> it's not natural at all to traverse a list with a loop.
mcclurmc has quit [Quit: Leaving.]
<Drup> for list, it's ok
<Drup> imagine for trees :D
<whitequark> imagine?
<whitequark> one... letter: C.
<companion_cube> well, it works, but not as elegantly
<whitequark> FORTRAN also works, if not as elegantly :p
<BitPuffin> yeat recursion wins with trees
<adrien> it really depends on the data structure which is being used
tane has quit [Quit: Verlassend]
<adrien> ocaml can often optimize away the recursion cost that you have with other languages or implementations
<adrien> so you don't pay a cost when you do it
<adrien> and often it's down to ease of writing the code and code clarity
<whitequark> most interesting cases of recursion aren't TCO-able anyway
<mrvn> whitequark: they all are
skchrko has quit [Quit: Leaving]
<mrvn> the cost of doing so is just to high
<whitequark> uh, what?
<mrvn> whitequark: you can TCO convert anything
<whitequark> how are you going to TCO convert, say, a tree traverse routine?
<companion_cube> whitequark: continuations
<companion_cube> but basically you move the stack into the heap
<companion_cube> by converting it into closures
<whitequark> companion_cube: well, I know what continuations are
<whitequark> however, would that even fall under the name of TCO?
<mrvn> whitequark: converting the code to CPS (continuation passing style) is the simplest generic solution
<companion_cube> whitequark: you can write everything by only calling continuations, with tail calls
<companion_cube> whenever you have a non-tail-call , you replace it by a tail-call and pass a continuation that "resumes" the function where you left
<companion_cube> it's useful if the depth of the recursion is possibly too high for the OS stack
<companion_cube> (very deep structures)
<mrvn> also usefull to do async structures
<mrvn> you can simply suspend operations by saving the continuation at any point and later restart them
<whitequark> companion_cube: mrvn: two things. 1) if the cost of optimized code is higher than that of unoptimized one, how is this *optimization*? I specifically said TCO not CPS
mcclurmc has joined #ocaml
<mrvn> whitequark: TCO isn't about speed, it is about stack usage
<mrvn> (in this case)
<whitequark> 2) I thought TCO meant replacing the call which adds a stack frame with a call which replaces current stack frame
<mrvn> which cps would do
<whitequark> but, in the case of continuations, you still pay the cost, except the stack frame is in heap
w0rm_x has left #ocaml []
<whitequark> what was a stack frame is in heap.
<mrvn> whitequark: The benefit is that the heap is limitless (near enough)
q66 has quit [Ping timeout: 246 seconds]
<adrien> it's not really a performance gain though
<whitequark> mrvn: stacks are limitless either on 64-bit, though.
<whitequark> or you could have split stacks...
<mrvn> whitequark: not usually
<companion_cube> whitequark: I avoid speaking of "tail call optimization" nowadays
<companion_cube> I prefer "tail call elimination"
<companion_cube> because it's not an optimization, but a change of semantic
<whitequark> mrvn: I suppose it may not be by default, but there's no technical problem to it and I think ulimit -s unlimited will do the trick on linux
<whitequark> companion_cube: right. so would you say CPS does TCE for all calls?
<whitequark> that's splitting hairs but IMO if you count the "heap frames" as frames it's more useful.
<mrvn> whitequark: that would also slow down the GC a lot. With tail calls the number of stack frames remains small. Without the GC has to scan a lot of frames that are already dead.
<whitequark> mrvn: it still has to scan heap though
<companion_cube> whitequark: yep, CPS allows to make all calls tail recursive
<whitequark> but, you can probably do that faster.
<companion_cube> and therefore to preserve the stack
<mrvn> With CPS you move the stack to the heap but you allow dead frames to be collected.
<whitequark> would performing full CPS give you more advantage wrt/ stack space than just eliminating proper tail calls?
<whitequark> just wrt/ space.
<mrvn> no. it just saves you from converting the algorithm yourself.
<companion_cube> some compilers do it, especially for scheme
<companion_cube> because CPS makes call/cc easier (duh)
<whitequark> companion_cube: I think that's because it's a convenient IR
<whitequark> also that
<mrvn> CPS also makes for a simple compiler
<companion_cube> that's especially significant for scheme ^^
<whitequark> mrvn: ah, so you mean converting a non-tail-calling algorithm to a tail-calling one is easier with just CPS ?
<companion_cube> well, that's basically what CPS does
<whitequark> key word: easier
<mrvn> whitequark: creating a CPS representation of your source automatically is easy. Converting your source to true tail calling requires a human brain
<whitequark> mrvn: I see, thanks for explanation.
<mrvn> The later would reduce the number of stack frames that are reachable, preferably to exactly 1. CPS doesn't reduce the number of stack frames in the recursion, it just shifts it to the heap.
Simn has quit [Quit: Leaving]
manizzle has joined #ocaml
<whitequark> so it won't allow you to collect any of them, just to use more space?
<mrvn> whitequark: Not every conversion to tail calls is beneficial.
<whitequark> I've been thinking of a case where it allows you to collect more and couldn't come up with more. I guess that's why.
<whitequark> mrvn: sure.
<mrvn> CPS would allow frames to be collected where the source already had a tail call.
<mrvn> Otherwise the continuation has a pointer to the stack frame and keeps it alive.
<whitequark> couldn't you then mechanically eliminate just the tail calls?
<mrvn> whitequark: yes, that is what you usualy mean when you say the compiler does TCO
<whitequark> but you say that "creating a CPS representation of your source automatically is easy. Converting your source to true tail calling requires a human brain
<whitequark> I don't follow.
<mrvn> whitequark: let rec fac = function 1 -> 1 | n -> n * (fac (n-1))
<mrvn> whitequark: converting that to CPS doesn't free up stack frames.
<mrvn> You need to change the source to use an accumulator and tail calls. That is generaly to complex for a compiler to do.
q66 has joined #ocaml
<whitequark> ok, but then you said: With CPS you move the stack to the heap but you allow dead frames to be collected.
<whitequark> when CPS would allow to collect more frames than just usual TCO?
<mrvn> whitequark: but non of them would be dead in this case.
manizzle has quit [Max SendQ exceeded]
<mrvn> whitequark: never
<whitequark> so why would you do CPS instead of usual TCO, then?
manizzle has joined #ocaml
<mrvn> whitequark: because it is easy to do and allows the GC to collect stack frames automatically wherever there is a true tail call.
<mrvn> whitequark: Even if you have 1000 functions that call each other recursively the GC will hit the spots where there are true tail calls and collect stack frames.
<whitequark> isnn't performing usual TCO about as complex and allows the, uh, generated code to free stack frames whenever there is a true tail call as well?
<mrvn> whitequark: optimizing a tail call that is already there is usualy simple. The hard part is converting non tail calls to tail calls.
zpe has joined #ocaml
<whitequark> but if CPS never allows to free frames allocated for non tail calls, why do it?
<BitPuffin> oho
<whitequark> I really don't follow :/
<mrvn> whitequark: or look at this example: let rec foo = function 0 -> 0 | n -> bar (n-1) and bar = function 0 -> 0 | n when n mod 2 == 0 -> ignore (foo (n-1)); raise Bar | n -> n * (foo (n-1))
<mrvn> whitequark: When n is even then you have tail calls, if n is odd then you don't.
<whitequark> hm. foo is always tail calling.
<mrvn> but bar isn't
<whitequark> is bar ever tail-calling?
zpe has quit [Ping timeout: 256 seconds]
<mrvn> whitequark: raise bar makes a tail call
<whitequark> right
<whitequark> TCO would handle both cases, no?
<mrvn> if the compiler understand the code well enough. You can make the problem more complex so that deciding wether you have a tail call or not becomes the halting problem if you like.
chambart has joined #ocaml
<whitequark> interesting. can you provide an example? or a sketch for it
<mrvn> whitequark: instead fo testing n mod 2 test if alorithm[n] halts.
<whitequark> wait, how does that even matter?
<whitequark> I imagine the code generated for the call to raise would replace the current stack frame with raise's
<mrvn> whitequark: if for any n algorithm[n] halts then all the previous stack frames become irelevant (dead in cps) because the code will soon call "raise"
<mrvn> And they become dead before the call to foo, not when raise actually is called.
<whitequark> oooh interesting
manizzle has quit [Remote host closed the connection]
<whitequark> but, all the previous stack frames? does this case depends on raise unwinding the stack? or would it work with non-unwinding call?
<whitequark> also, since raise unwinds, this will move deallocation from just after raise to just before ignore foo
<mrvn> whitequark: all the previous stack frames up to the one catching the exception. And in ocaml raise doesn't unwind the stack frame, it just resets the stack pointer I think.
<whitequark> this sounds like a fairly obscure and irrelevant optimization. does it matter in practice?
<mrvn> well, most code runs without considering any tail calling at all.
<mrvn> python for example doesn't do tail calls at all.
<mrvn> But when you hit a deep recursion you are screwed and have to manually simulate tail calls or rewrite the algorithm to be iterative.
<whitequark> I see
<mrvn> whitequark: FYI: you wouldn't do cps transformation to optimize tail calls. You do it for other reasons (like making the compiler simpler than e.g. using SSA or other fancy stuff). But cps makes every call a tail call and does TCO automatically for you.
<mrvn> optimizing the amount of "stack" space, not speed
<whitequark> (isn't cps provably equivalent to ssa?)
<mrvn> equivalent in what way?
<mrvn> ease of implementaion? I don't think so.
<mrvn> whitequark: That seems to be about what SSA is, not about how you get to SSA.
<whitequark> ah. dunno then, never implemented CPS as IR.
<whitequark> sorry, I need to sleep.
<mrvn> whitequark: In the compiler you parse the source and probably end upß with an AST. Then you convert that to SSA or CPS notation and last generate code from that. Maybe inbetween you optimize, maybe not.
<mrvn> converting an AST to CPS is relatively simple.
<whitequark> I'd say that converting it to SSA is fairly straightforward too
<whitequark> but as I never really implemented a CPS IR, I cannot really compare.
<mrvn> and generating code from cps is simple too.
<whitequark> same.
<whitequark> well, depends on how good your codegen you want to be.
<pippijn> don't you usually convert SSA back before codegen?
<whitequark> pippijn: after register allocation it's not SSA anymore (obviously)
<pippijn> ok
<whitequark> but apart from that it's generally kept in SSA, I think, and regalloc is one of the last steps.
<mrvn> register allocation? No such thing in non-optimizing cps code generation.
<whitequark> mrvn: what would you use then? stack?
<mrvn> whitequark: heap
<whitequark> uh
<whitequark> what?
<pippijn> you put local variables into the heap?
<pippijn> and intermediate computations?
<whitequark> ^
<mrvn> whitequark: in the simplest form everything becomes a tail call, EVERYTHING. and always a tail call with one argument. With internal blocks with 2 arguments for e.g. +.
<mrvn> whitequark: it won't be fast but it is real simple.
<whitequark> there's also closure allocation and control flow
<whitequark> (unless the language is lazy, in which case just closures)
<mrvn> whitequark: "if" is a block that calls either continuation 1 or continuation 2.
<whitequark> oh, right
<mrvn> whitequark: have sweet dreams
* mrvn fell asleep after work and now is sleepless
<pippijn> that's annoying
<pippijn> happened to me 2 days ago
rand000 has quit [Quit: leaving]
<companion_cube> that's probably a stupid idea, but: what if OCaml memory blocks, rather than starting with tags and stuff, started with a pointer to some static description of the block?
<companion_cube> the description would be a mix of tag (for variants) and /code/ to tell the GC how to scan the block
tianon has quit [Ping timeout: 272 seconds]
tianon has joined #ocaml
k4nar has quit [Ping timeout: 264 seconds]
ousado has quit [Ping timeout: 272 seconds]
emmanuelux has joined #ocaml
bnoordhuis has joined #ocaml
ousado has joined #ocaml
dsheets has joined #ocaml
<ollehar> can I "hash" a value, e.g. datetime, to a number between, say, 1 and 20?
ulfdoz has joined #ocaml
steshaw has joined #ocaml
csakatoku has joined #ocaml
wolfnn has quit [Ping timeout: 256 seconds]
csakatoku has quit [Ping timeout: 246 seconds]
demonimin has quit [Ping timeout: 260 seconds]
ocp has quit [Ping timeout: 252 seconds]
bnoordhuis has quit [Ping timeout: 240 seconds]
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
Derander has quit [Read error: Operation timed out]
Derander has joined #ocaml
demonimin has quit [Ping timeout: 245 seconds]
q66 has quit [Quit: Leaving]