gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
lggr has joined #ocaml
emmanuelux has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
madroach_ has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 255 seconds]
madroach has joined #ocaml
lggr has joined #ocaml
chambart has quit [Ping timeout: 260 seconds]
gnuvince has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
justinfront_ has joined #ocaml
chambart has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
<justinfront_> Good evening I have a newbie question, I am trying to run the grtest1.ml on mac leopard. (* http://mirror.ocamlcore.org/ocaml-tutorial.org/the_structure_of_ocaml_programs.html *) but it keeps having a fatal error. Is this tutorial out of date, I have ocaml 3.12.1 installed and it seems to allow me to do basic command line stuff using ocaml.
lggr has joined #ocaml
<justinfront_> er would it help if I put that in french via google translate..:) . : Bonsoir J'ai une question de newbie, je suis en train d'exécuter le grtest1.ml sur mac léopard. (* Http://mirror.ocamlcore.org/ocaml-tutorial.org/the_structure_of_ocaml_programs.html *), mais il maintient avoir une erreur fatale. Est-ce tutorial à jour, j'ai ocaml 3.12.1 installé, et il semble me permettre de faire des...
<justinfront_> ...trucs de base en utilisant la ligne de commande ocaml.
Znudzon has quit [Quit: Leaving]
lggr has quit [Ping timeout: 245 seconds]
jamii has quit [Read error: Connection reset by peer]
chambart has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Yoric has joined #ocaml
gnuvince has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 245 seconds]
<wmeyer> justinfront_: we speak English here
lggr has joined #ocaml
<wmeyer> justinfront_: could you pastebin the error?
<justinfront_> Fatal error: exception Graphics.Graphic_failure("Cannot open display :0")
<wmeyer> justinfront_: this is due to you have no X server
chambart has joined #ocaml
<wmeyer> I've never used Mac OS X
mnabil has quit [Ping timeout: 248 seconds]
<wmeyer> justinfront_: but I suppose for the Graphics module you need X server
<wmeyer> it works under windows too
<wmeyer> you could try to port into Labltk, and draw using Labltk
<justinfront_> I have pc laptop as well I can try that tomorrow but nice to be able to do on mac too
<wmeyer> hm, it looks like MacOS is supported by graphics module, but no idea how it works in practice
<wmeyer> i just looked into the source code
<wmeyer> could somebody who uses Mac OS X tell confirm this module works or not?
sepp2k1 has joined #ocaml
<wmeyer> otherwise I would advise to raise an issue in Mantis
<wmeyer> (if you don't have the answer soon)
<justinfront_> Its not so important just wanted to understand a bit of ocaml I use haxe so curious.
sepp2k has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 246 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
<wmeyer> justinfront_: that's fine. Graphics module is a good entry point. What you can do skipe the graphics section
<wmeyer> usually this channel answers questions rapidly
<wmeyer> (depends on time of course :-) )
<justinfront_> If it's easy on a pc will try that tomorrow. I am sort of visual person so anything graphics encourages me to learn :)
<wmeyer> OCaml is actually quite choice for graphics has an excellent performance
lggr has joined #ocaml
<wmeyer> it uses OpenGL
<wmeyer> so you can upgrade the example to OpenGL based on this
chambart has quit [Ping timeout: 246 seconds]
<justinfront_> A lot of the tutorial I am reading refers to c and assumes c knowledge which is kind of anoying as I mainly use haxe/as3. Wow that looks fairly complex, is the ocaml for scientist ( did math/electronics way back ) is it a good book on ocaml?
goat25 has quit [Quit: Leaving]
<wmeyer> I don't know whatever it's good book or not, never read, I would say personally: "no" for most cases.
<wmeyer> justinfront_: nice to hear somebody from Haxe world goes for ocaml!
<wmeyer> :)
<wmeyer> try the books recomended on ocaml-lang.org especially Hickey's
TDJACR has quit [Quit: Be back in a few! (Kernel UpgradE)]
<wmeyer> (and usually I advice after that read whole or cherry pick from the Oreily)
<justinfront_> I am looking at widening my language base, but being able to understand the haxe compiler is an intensive.
lggr has quit [Ping timeout: 246 seconds]
<wmeyer> now you know why sort of it's called (h)axe ;-), yes, perhaps the codebase is involved byt readable!
<justinfront_> I bought a few books on functional languages and I read bits and pieces, but my code knowledge is learnt using flash not from a uni :) So I often lack on the theory front
lggr has joined #ocaml
<wmeyer> That's fine, I self-taught myself OCaml too
<wmeyer> you should just continue researching
<pippijn> hi
<wmeyer> if you want to know more then next thing i do i usually advise to read this: http://www.cl.cam.ac.uk/teaching/Lectures/funprog-jrh-1996/
<wmeyer> pippijn: hi
<wmeyer> pippijn: i am still stuck on the dragon kit
<wmeyer> getting back now again to PEG
gnuvince has joined #ocaml
<wmeyer> ooops it's 3:30 AM again
<justinfront_> Thanks wmeyer will look at that - yep late here my hours are kind of mixed up, but I don't have contract tomorrow so if I am feeling lively then learning is all good, but if you have work tomorrow you better get to bed :)
<wmeyer> justinfront_: FWIW, once you learn OCaml you probably either don't want to use anything else, or will be greedy to use it but taking stuff from upper shelves (and not Haskell)
lggr has quit [Ping timeout: 264 seconds]
<wmeyer> justinfront_: fortunately I have full sunday to rest :-) so there are still few hours left to monday
<justinfront_> well I like using haxe alot but maybe.
chambart has joined #ocaml
<wmeyer> justinfront_: generally it extends mind, but also teaches how to construct clean abstractions
<wmeyer> (which I can't tell about C++)
lggr has joined #ocaml
<wmeyer> justinfront_: think about OCaml that this is Haxe but in slightly different syntax and perhaps slightly cleaner and more advances
<wmeyer> Haxe has already like OCaml type system and type inference
<justinfront_> Can you use ocaml on blackberry playbook by the way?
<wmeyer> the biggest difference is the syntax which is more less similar to JS or C
<wmeyer> (you get the point!)
<wmeyer> i don't think so you can use ocaml on blackberry, but you easily use ocaml in browser (yes! js_of_ocaml compiler OCaml to JS)
Yoric has quit [Ping timeout: 246 seconds]
<wmeyer> justinfront_: usually the biggest chalenge is the type inference and strong type system, but you already had a taste of that
<wmeyer> so it should be farily easy for you.
<justinfront_> well mmm not so sure :) But maybe.
<wmeyer> the other chalenge is usually the purity
lggr has quit [Ping timeout: 248 seconds]
<wmeyer> stateless programming
<wmeyer> loops as tail recursion for instance
<justinfront_> Do people code games in Ocaml?
<wmeyer> there is a project that ports ocaml to iOS
<wmeyer> and some people actually wrote some simple games for iOS
lggr has joined #ocaml
<justinfront_> My leopard won't do the NME for Iphone, so sticking with Blackberry, Android and maybe win8. The js_of_ocaml maybe good for winRT js ?
<wmeyer> but I don't think game industry for time being is interested
<wmeyer> js_of_ocaml will translate your OCaml to Java Script by generating the source file
chambart has quit [Ping timeout: 248 seconds]
<wmeyer> so no idea how it will work with winRT js (never heard about it) maybe you need a thin layer to handle differences
<wmeyer> justinfront_: given that the gamedev is not currently interested, you are welcome to just evangalise them once you know OCaml.
<wmeyer> or write games
<wmeyer> it would be cool
<wmeyer> FWIW: there are quite few OpenGL bindings and SDL for OCaml
<wmeyer> if you want Camlish interface but bit outdated API then I would go for Lablgl
<wmeyer> if you want a bleeding edge OpenGL there are auto generated bindings
lggr has quit [Ping timeout: 240 seconds]
<wmeyer> with js_of_ocaml you can actually try WebGL
lggr has joined #ocaml
<justinfront_> At the moment my interest is more in relation to the haxe compiler but may change when I have some more power :) But yes windows8 for mobile is now using accelerated js and have even invented a language http://typescript.codeplex.com/documentation so Ocaml could target the js for that I got some test haxe js running with visual studio 2012 so it's not too hard.
lggr has quit [Ping timeout: 264 seconds]
<justinfront_> Its just browser js which you can hook up to winRT C#, I think you can do similar in Blackberry's js
<wmeyer> interesting, but blah
<wmeyer> another JS typed like language
lggr has joined #ocaml
<wmeyer> they reinventing things in gradual small rewrites
sepp2k1 has quit [Remote host closed the connection]
<pippijn> js_of_ocaml has some byte code optimisers
<wmeyer> not that i don't appreciate they invented types with type inference after 40 years, and closures after 60 years
<wmeyer> it sounds scary but that's what i hate also in the industry ;)
<pippijn> wmeyer: it's always like that
<pippijn> apple reinvented full-screen like half a year ago and presented it as novelty
<wmeyer> that's not bullshit - ML was known in mid 70, closures appeared in Lisp getting back to 50;
<wmeyer> i just hope that people that don't have idea about languages will just stop desinigng them
<wmeyer> pippijn: I agree but it's a major pain to me to see this...
<wmeyer> it builds a great fragmentation, all of them have braces though.
<wmeyer> JS, Dart, TypedScript etc.
<wmeyer> all the the same stuff but enough different that it's insane to port between them
<wmeyer> I don't mind Standard ML, Haskell, OCaml
lggr has quit [Ping timeout: 240 seconds]
<wmeyer> but when I see another brace language it makes a bit sad...
<wmeyer> justinfront_: sorry usual rant :-) getting back to you, I think you should be able to do something useful with js_of_ocaml and the winRT
<pippijn> programmers like braces
<pippijn> it's like milk
<wmeyer> :)
<wmeyer> well braces should be allocated for something more meaningful then code blocks
<wmeyer> my personal biased opinion
<wmeyer> OCaml has braces too
lggr has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
<wmeyer> :)
lggr has quit [Ping timeout: 248 seconds]
<justinfront_> Yer I think m$ should have just used haxe :) But the brace thing maybe down to what your used to... I mean Begin End put me off Ruby when I looked at it long time ago, although I believe you can use braces instead.
lggr has joined #ocaml
<wmeyer> justinfront_: Yes, but I used to do a lot of C++ and I also couldn't imagine a language without braces :)
<wmeyer> justinfront_: no i think braces remind me messy code and bugs...
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
<pippijn> wmeyer: same here
<pippijn> both of those things
cdidd has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
testcocoon has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
justinfront_ has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
RebelBunny has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
answer_42 has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
BiDOrD_ has quit [Ping timeout: 260 seconds]
BiDOrD has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
bazzow has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
Jeaye has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 246 seconds]
astertronistic has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
astertronistic has joined #ocaml
gnuvince has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
Cyanure has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
astertronistic has quit [Ping timeout: 248 seconds]
bazzow has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 264 seconds]
astertronistic has joined #ocaml
lggr has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 245 seconds]
astertronistic has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
Kakadu has joined #ocaml
Jeaye has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
mnabil has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
Snark has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has joined #ocaml
err404 has joined #ocaml
larhat has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
Xizor has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
bazzow has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
bazzow has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
<wieczyk> wmeyer: How to change binary time by _tags file? I cannot see this in manual.
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
eni has joined #ocaml
Xizor has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
chambart has joined #ocaml
lggr has joined #ocaml
Jeaye has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 252 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
<wieczyk> I am reading the Compiling with Continuations book (Appel) and I do not understand one think.
<wieczyk> When they are translating MiniML to intermediate CPS they have weird order of computation.
<wieczyk> application (F E) they are translating to ,,first compute F, then compute E, then apply function to computed argument''
lggr has joined #ocaml
<wieczyk> but in program F E1 E2 E3.. it means that first will be computed (F E1)... then this application will be done before computing E2 and E3
<wieczyk> It is desired order of computation? For me it seems to first compute argument, then function. In my order we will have computed all arguments before doing right-most application.
<wieczyk> # f (raise E1) (raise E2) (raise E3);;
<wieczyk> Warning 20: this argument will not be used by the function.
<wieczyk> Warning 20: this argument will not be used by the function.
<wieczyk> Exception: E3.
<wieczyk> Ocaml agrees with me.
<adrien> evaluation order of this is undefined
<adrien> iirc it is even different between bytecode and native code
lggr has quit [Ping timeout: 240 seconds]
<wieczyk> Hm, I don't believe this.
<wieczyk> Do you remember some example where I could see this.
<wieczyk> I think that order of computation should be defined.
lggr has joined #ocaml
<adrien> it's stable but not defined in the norm
<wieczyk> I will check it, Currently I think that it is standarized that Ocaml computes from the right to the left.
<wieczyk> And it is consequence of ZINC.
<adrien> not something to rely on
<adrien> try with native code btw
<wieczyk> % ./a.out
<wieczyk> Fatal error: exception P.E3
<wieczyk> same order
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
ontologiae has joined #ocaml
justinfront_ has joined #ocaml
maufred has quit [Ping timeout: 255 seconds]
maufred has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
chambart has quit [Ping timeout: 260 seconds]
chambart has joined #ocaml
ontologi1e has joined #ocaml
lggr has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
err404 has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
<pippijn> wmeyer: ping
ontologi1e has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
ontologi1e has joined #ocaml
<wmeyer> pippijn: hi
<wmeyer> wieczyk: ?
<pippijn> I just finished rewriting elkhound in ocaml
<pippijn> just in case :)
ontologiae has quit [Ping timeout: 240 seconds]
<wieczyk> wmeyer: You told me that I can control the name of binary file prdocued by ocamlbuild.
<wieczyk> wmeyer: Or maybe it is my imagination.
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
justinfront_ has quit [Ping timeout: 252 seconds]
Sablier has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
<wmeyer> oh, ok
<wmeyer> :)
<wmeyer> i think it's reasonable nevertheless i will look again into PEG in the same time
<wieczyk> So it is my imagination?
<wmeyer> wieczyk: ocamlbuild is not perfect
<wmeyer> but you can do it
<wmeyer> I think you need a custom plugin for that
<wieczyk> OK, I can do workaround my MAkefile
<wmeyer> wieczyk: it's beetter not to do it
<wieczyk> I am wrapping ocamlbuild by Makefile so I will just call 'mv'
<wmeyer> because of hygiene
<wmeyer> ocamlbuild will complain that you are not being hygenic :P
<wmeyer> and introduce "sporious" files in the tree
<wieczyk> So how should I produce correct binary name in this build system, only by plugin?
<wmeyer> if it hasn't got any extensions that ocamlbuild would think are targets then maybe it's fine.
chambart has quit [Ping timeout: 246 seconds]
<wmeyer> wieczyk: unfortunately I'd fear so.
<wieczyk> :D
<wieczyk> OK.
<wmeyer> wieczyk: let's say it ocamlbuild is weird. That's said I quite like it. Most cases it's simple. It has some problems though. If you spot them you can raise Mantis issue.
lggr has quit [Ping timeout: 246 seconds]
<wieczyk> Mantis issue?
<Kakadu> wieczyk: caml.inria.fr/mantis/
fusillia has joined #ocaml
<wieczyk> I would like to have public/private keywords in module.
<wieczyk> which would impact on infered signature.
lggr has joined #ocaml
<wmeyer> wieczyk: In principle you can just remove these signature entires with C-k in Emacs.
<wmeyer> better solution would be an update mode for mli
<wieczyk> I would not agree with connecting language usability with certain editor, especially when I prefer vim ;]
<wmeyer> wieczyk: OK :-) so the idea is to try to update mli files
<wmeyer> then you create mli file with empty entries
<wmeyer> and the compiler will fill them up
<wieczyk> But I dont have .mli files, and it need extra effort when my project is under heavy development. Exactly like maintainig declarations in headers and implementation in source files in C/C++
<wieczyk> mhmh
<wmeyer> wieczyk: but the issue in mantis is all about generating them
<wieczyk> Compiler can fill .mli ?
<wieczyk> Do you mean "-i" option?
<wmeyer> nope, it can't at the moment
<wieczyk> OK
<wmeyer> never heard it's planned, it's my morning idea
<wmeyer> which solves the __ and private issue.
<wieczyk> I think that keyword ,,private'' is very simple solution. Similar to __ but it makes each private declaration's name ugly.
<wieczyk> it -> which
lggr has quit [Ping timeout: 264 seconds]
<wieczyk> OK.
<wieczyk> Do you tried SML compilers?
<wieczyk> MLTon etc, Some compilers still seems to be alive.
<wmeyer> wieczyk: but it's bloating the compiler with unneeded stuff. Private then will not be available, plus private has already in types, and it's an invasive change in general
<wmeyer> just for sake of not generating the signature it's not worth
<wmeyer> wieczyk: never tried SML but i do follow what's going there
lggr has joined #ocaml
<wieczyk> I do not agree that it is not worth, it removes some effort in programming. But it is small thing so we should not argument about this.
<wieczyk> So what is going in the SML world?
<wieczyk> going on*
<wieczyk> (another solution is exported-symbols-list like in Haskell)
lggr has quit [Ping timeout: 246 seconds]
fusillia has quit [Ping timeout: 260 seconds]
<wmeyer> wieczyk: that's exactly what mli file is for.
<wmeyer> what is missing is that we want to update the mli file sometimes or skip some values
<wmeyer> then you just do ocamlc -i file.ml and the copy paste needed stuff
lggr has joined #ocaml
<wieczyk> It is harder to maintain mli, it s like header/source in C++. It is different to have two files to maintain and one file without duplications. And invoking ocamlc -i is not easy in bigger project.
<wieczyk> But this topic I think is less important than what is going on in SML world :D
<wmeyer> wieczyk: SML world, well it's different world
<wmeyer> wieczyk: means that exactly I don't know what's going there, but I have a project that is inspiring me and I know the compiler that is inspiring me etc.
<wieczyk> Tell me about this.
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
fusillia has joined #ocaml
<wmeyer> wieczyk: so SML has lot of old good projects, one of them is MLRISC
<wmeyer> which I think is a great compiler framework, but people just don't know it since it's old and SML.
<wmeyer> the compiler I talked about of course is MLton which everybody knows, what it does.
lggr has quit [Ping timeout: 248 seconds]
<wmeyer> so I try to look what they do in some limited way
lggr has joined #ocaml
mjonsson has joined #ocaml
<wieczyk> Why SML is dead?
<wieczyk> I have heard that
<wieczyk> compilers was BIG and unmaintanable, also many usefull thinks was compiler-specific-extensions, not included in standard.
<wieczyk> and having per compiler extensions is unusable
<wmeyer> SML is not dead. Just used more often in academia rather the in the industry. Having standard has it's merits but also downsides
<adrien> and mlton is awfully slow
<wieczyk> Yes, is very slow.
<wmeyer> if you switch of the optimisations might be quickier!
<wieczyk> Even HelloWorld needs alot of computations ;]
<wmeyer> of = off
lggr has quit [Ping timeout: 260 seconds]
<wieczyk> Why Ocaml defeat SML?
<wieczyk> Those languages seems to be very similar.
<wmeyer> so for the release you perform this whole program optimisations, for the normal everyday programming not
<wmeyer> they are, but they have major difference
<adrien> I tried SML only once: I wrote an hello world and built it with mlton, and I waited, waited, waited
<wieczyk> The order of computation is difference, I have discovered it today.
lggr has joined #ocaml
<wieczyk> is one of differences*
<wmeyer> adrien: has it finished as of today??/
<adrien> yup, then I uninstalled mlton
tufisi has quit [Ping timeout: 246 seconds]
<adrien> I couldn't picture myself working with such compile times
cixaxa has joined #ocaml
<wmeyer> wieczyk: module system has different semantics, records in SML are different, sytnax is different, no objects and polymorphic variants, no GADTS, no first class modules etc.
<wmeyer> adrien: why not to use -O0
<adrien> I didn't know that existed :P
<adrien> but it was a stupid "hello world" and it took > 10 seconds to build
<wieczyk> It would be nice for me to disable binding already existing variables, especially in compiler.
<wieczyk> for example
<adrien> mlton gets much less interesting once you remove its optimizations
<wieczyk> let func = ...
<wieczyk> and later
<wieczyk> let func = ...
<adrien> "shadowing"
<wieczyk> It would be nice to have error/warning.
<wieczyk> Oh yes, shadowing is good word, thx.
<adrien> already mentionned and asked for but it won't be made a warning
<wieczyk> why?
<adrien> because shadowing is something code and people actually rely on
lggr has quit [Ping timeout: 246 seconds]
<adrien> let rec f_tailrec accu l = ...
<adrien> [...]
<adrien> let f = f_tailrec []
<adrien> you could also have "f_tailrec" named only "f"
<wieczyk> But rely on this in code or when working with interpreter?
<Kakadu> Can you help me to write correct _tags file for using `with sexp`? http://paste.in.ua/4839/raw/
<wieczyk> What are Sexps?
lggr has joined #ocaml
<Kakadu> wieczyk: s-expressions
<wieczyk> I think name is related to the LISP world but I dont know what is it.
<wieczyk> what it is*
<Kakadu> wieczyk: you r right
eni has quit [Quit: Leaving]
<wmeyer> <file.*>: syntax(camlp4o), package(sexp)
<wmeyer>
<wmeyer> assuming you use -use-ocamlfind
trotro has joined #ocaml
<wmeyer> Kakadu: you have awful lot of duplicat packages..
<Kakadu> wmeyer: Yeah. Maybe. I have added more and more to find right combination
<adrien> and package(sexp.syntax)
<adrien> I think
cixaxa has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 260 seconds]
<Kakadu> No I have error while execution ocamldep. http://paste.in.ua/4841/
lggr has joined #ocaml
<Kakadu> Does `<pattern>: blah` syntax affect also ocamldep parameters?
<adrien> your setup looks completely fucked up :-)
<adrien> findlib: [WARNING] Package deriving-ocsigen has multiple definitions in /usr/local/lib/ocaml/3.12.1/deriving-ocsigen/META, /usr/lib/ocaml/deriving-ocsigen/META
<adrien> that makes me think your ocaml installation is in a *BAD* shape
<Kakadu> adrien: I know but I'm sure it is not a problem
<adrien> I believe it is
<adrien> which version of ocaml do you have?
<Kakadu> 3.12.1
<adrien> and in /usr rather than /usr/local?
<Kakadu> debian sid. Some packages were installed via aptitude
<wmeyer> Kakadu: you should just shred one of these
answer_42 has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
<Kakadu> ?
answer_42 has joined #ocaml
<wmeyer> Kakadu: having findlib pointing to both is not a good idea really..
<wmeyer> either rm it or just remove the entry from etc/findlib.conf
<adrien> actually I think that won't be enough
<adrien> there's still $PATH
<wmeyer> but PATH does not imply two ocamlc on the path just single, so ocamlc will pick the one in it's root
lggr has quit [Ping timeout: 256 seconds]
<Kakadu> You want to say that warnings about deriving,odn,oasis,calendar and type-conv bring problems with sexplib?
<wmeyer> Kakadu: adrien is saying having the installation screwed up like this is not a good thing in general
<wmeyer> Kakadu: When I see similar issue, I just rm the package
<wmeyer> immediately
<wmeyer> no hesistation shred it
<wmeyer> well be careful of course :)
lggr has joined #ocaml
<adrien> Kakadu: no, the big issues are:
<adrien> Warning: tag "package" does not expect a parameter, but is used with parameter "sexp"
<adrien> Warning: tag "package" does not expect a parameter, but is used with parameter "sexp.syntax"
<adrien> Warning: tag "syntax" does not expect a parameter, but is used with parameter "camlp4o"
<adrien> but acutally
<adrien> actually*
<adrien> you're using oasis so you shouldn't use _tags to add package(sexplib), package(sexplib.syntax), syntax(camlp4o=
<Kakadu> adrien: I should do this via _oasis?
<adrien> that's compatible with ocaml 3.12.1's ocamlbuild but not with the ocamlbuild support that oasis puts
<adrien> (iirc)
<wmeyer> adrien: BTW, maybe you know, how to tell oasis to use camlp4o?
<wmeyer> I removed all the old cruft from my _tags shared with oasis apart from these 3 entries:
<adrien> no :P
<wmeyer> true: use_menhir
<wmeyer> <examples/llvm-example/codegen.*>: syntax_camlp4o
<wmeyer> <dragons/LLVM/{llvmf,AST}.*>: syntax_camlp4o
<wmeyer>
<adrien> have you checked the examples?
<wmeyer> that's very complicated build, wuth packs etc
<wmeyer> yes i did
<wmeyer> it's sounds like very basic thing to support
<wmeyer> and easy to add
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
casion has quit [Quit: casion]
casion has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
<pippijn> wmeyer: PEG is definitely worth a shot
<pippijn> wmeyer: this thing takes 30 seconds to construct a parse tree for a 6.2MB file
lggr has joined #ocaml
* Kakadu looks at exception Pre_sexp.Of_sexp_error(_, _) like a goat looka at just-installed gates
<Kakadu> looks*
<adrien> that's a nice expression :P
<adrien> malformed input, all I can say
trotro has quit [Quit: Leaving]
lggr has quit [Ping timeout: 248 seconds]
<Kakadu> maybe it is forbidden to use sexp with some kind of types?.....
<adrien> what is your type?
<adrien> and what is the string you're parsing?
lggr has joined #ocaml
fusillia has quit [Read error: Operation timed out]
<Kakadu> adrien: And I don't parse any strings :)
<adrien> well, sexplib parses it for you ;-)
lggr has quit [Ping timeout: 244 seconds]
<adrien> Kakadu: so you've used "with sexp" for type ani_t?
<Kakadu> adrien: yeah
<Kakadu> adrien: grep have erased one line
<Kakadu> now pastie is OK
<adrien> hmm, yeah, you're misusing the API
<adrien> try with Sexplib.Sexp.to_string_hum
lggr has joined #ocaml
<adrien> "string_of_sexp x" is valid when "x" is the Sexp.t for a "string"
<adrien> prerr_endline (string_of_sexp (sexp_of_strng "weee"))
<Kakadu> Oh
<Kakadu> adrien: thanks AWFULLY!
<adrien> :-)
<adrien> I think I did the same mistake
emmanuelux has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
wmeyer has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
fusillia has joined #ocaml
tufisi has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
fusillia has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
ulfdoz has quit [Quit: brb]
emmanuelux has quit [Quit: emmanuelux]
lggr has joined #ocaml
fusillia has joined #ocaml
ulfdoz has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
fusillia has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
ontologi1e has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
pngl has joined #ocaml
Cyanure has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
fusillia has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
<wieczyk> Error: This expression has type MiniML_driver.Representation.ast but an expression was expected of type MiniML_AST.program
lggr has joined #ocaml
<wieczyk> C
<wieczyk> but MiniML_driver.Representation.ast = MiniML_AST.program
<wieczyk> WHy ocaml cannot unfold type aliases from modules?
lggr has quit [Ping timeout: 244 seconds]
<Kakadu> wieczyk: I think that u have bad MiniML.mli
<wieczyk> I dont have MiniML.mli
<wieczyk> so it should be just type alias, like in implementation
<Kakadu> I wanted to say if ast and program are abstract types in mli files this error is explainable
<wieczyk> btw: how to use ocamlbuild to infer .mli ?
<wieczyk> I did not provide any .mli so they are abstract by default or i dont know.
hongboz has joined #ocaml
<wieczyk> I am going to try with my .mli
<Kakadu> wieczyk: ocamlc -i filename manually
<wieczyk> Kakadu: i have big project and compiler needs a lot of options...
<Kakadu> wieczyk: without mli they should not be abstract
nm7 has joined #ocaml
<wieczyk> So why it is not working?
<Kakadu> no idea yet
lggr has joined #ocaml
<wieczyk> Ok I hae solved my problem
<wieczyk> When I have some singature, like MType with 'type t'
<wieczyk> and I will provide
<wieczyk> module M : MType = struct ...
<wieczyk> then the type t is abstract here
lggr has quit [Ping timeout: 246 seconds]
<wieczyk> becuase signature of this module is MType, not the infered signature of M
UncleVasya has joined #ocaml
trotro has joined #ocaml
lggr has joined #ocaml
joewilliams has quit [Remote host closed the connection]
lopex has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
joewilliams has joined #ocaml
lopex has joined #ocaml
err404 has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
justinfront_ has joined #ocaml
gnuvince has joined #ocaml
<adrien> and... new releases of mingw-builds soon: http://notk.org/~adrien/yypkg/latest/
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
nm7 has quit [Quit: ZNC - http://znc.sourceforge.net]
nm7 has joined #ocaml
trotro has quit [Quit: Leaving]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
nm7 has quit [Quit: ZNC - http://znc.sourceforge.net]
nm7 has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
mnabil has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
<adrien> hmm, is it possible to make an exception of 'a?
<Kakadu> adrien: No
lggr has joined #ocaml
larhat has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
<hongboz> you can not have unbound type parameters in exception
<adrien> thanks, went on and defined my own
<adrien> well, I would have imagined "'a exception of 'a" :P
lggr has quit [Ping timeout: 246 seconds]
<hongboz> exception of [> `bla] is not allowed either
fusillia has quit [Ping timeout: 252 seconds]
ontologi1e has joined #ocaml
lggr has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
Jeaye has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
ontologi1e has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
fusillia has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
hongboz has quit [Remote host closed the connection]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
<wieczyk> adrien: polymorphic exceptions are allowed only in local definitions
<wieczyk> btw: how to use ocamlbuild to infer all mli files in project? when i type ocmlbuild ... src/Main.inferred.mli then it will infer only for one file
lggr has joined #ocaml
<adrien> wieczyk: hmm, how do you make a local definition of an exception?
<wieczyk> I heard about this here
<wieczyk> never tested
lggr has quit [Ping timeout: 256 seconds]
<wieczyk> No working for me, false alarm, sorry.
lggr has joined #ocaml
troydm has joined #ocaml
<troydm> does ocaml interactive shell support readline completion?
<troydm> coz i've just compiled it and writing pr and hitting tab does tab character insert
<wieczyk> No.
<wieczyk> use rlwrap or something like this.
<adrien> or "utop" or "readline"
<adrien> (all of these are binaries)
<adrien> (hmmm, maybe not utop)
<Kakadu> rlwrap
<troydm> ic
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
tufisi has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
justinfront_ has quit [Ping timeout: 260 seconds]
fusillia has quit [Read error: Connection reset by peer]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
emias has quit [Quit: Changing server]
emias has joined #ocaml
lggr has joined #ocaml
Cyanure has joined #ocaml
Break has joined #ocaml
<Break> hi, what is the best OCaml ide for mac os x ?
lggr has quit [Ping timeout: 256 seconds]
<Kakadu> Break: try typerex
aod has joined #ocaml
<Break> Kakadu: thanks for your response, i'll try it now :)
<aod> hello, is there any way to define function of type 'a -> 'b?
lggr has joined #ocaml
<Ptival> aod: that's quite what you want to avoid at all costs
<Kakadu> aod: You have faced monomorphism problem or it as an abstract question?
<adrien> aod: why? what for?
<aod> my lecturer said: think how to write it
<aod> and I cant figure it out
<aod> and I'm in doubt if it is possible ;)
<adrien> well, how could it be possible? why would it be impossible?
<aod> lol
<Kakadu> Btw
<Kakadu> Why OCaml doesn't infere that f's first argument type is int after execution `f 5` ?
lggr has quit [Ping timeout: 255 seconds]
Snark has quit [Quit: Quitte]
lggr has joined #ocaml
<Break> Kakadu: it's compatible with emacs, so it's just plugin and not an IDE, :)
<Kakadu> Break: Maybe you will not like what I'm saying but creation IDE in well-known sence for languages with automated type inference is a problem
<Kakadu> for this case IDE should infere types while editing
<Kakadu> without any tips from source
wmeyer has joined #ocaml
<Kakadu> for example, F# IDE can't infere type of object without annotation
<Break> Kakadu: yes :-)
<Kakadu> AFAIU, In Scala the same problems
theplanet has quit [Remote host closed the connection]
<wmeyer> Kakadu: these two language allow overloading of methods that's why
<Break> Kakadu: i'm a vim user, and i'm looking for some thing like touareg for emacs, or better :)
<Kakadu> So possible maximum is guessing Module members by module name while entering '.'
<Kakadu> What typerex do
lggr has quit [Ping timeout: 246 seconds]
<Kakadu> What do you think: Is it possible to write OCaml editor which will <<compile>> toplevel phrases about current editing place at the file and use their information to autocomplete?
<Kakadu> s/about/above/
<Kakadu> s/their/that/
<Break> Kakadu: no :)
astertronistic has joined #ocaml
lggr has joined #ocaml
beginner42 has joined #ocaml
<Kakadu> why?
justinfront_ has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
mnabil has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
Break has left #ocaml []
lggr has quit [Ping timeout: 264 seconds]
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
lggr has joined #ocaml
sepp2k has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 255 seconds]
pngl has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
<beginner42> mcclurmc: hi could you help again with opam?
lggr has joined #ocaml
<mcclurmc> tomorrow would be better, actually
<mcclurmc> ask your question here anyway and maybe someone will be able to help
<beginner42> i downloaded the git repository for opam packages, added mine and called opam remote -add promela absolute-path-to-package but its not listed in opam
<beginner42> and i get additional packages/ and compiler/ folder in my package
Anarchos has joined #ocaml
<beginner42> mcclurmc: tomorrow is good as well, thanks
<Anarchos> anybody tried dypgen ?
lggr has quit [Ping timeout: 260 seconds]
justinfront_ has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
err404 has quit [Read error: Operation timed out]
err404 has joined #ocaml
lggr has joined #ocaml
<Anarchos> I wonder if it is mature enough
<GnomeStoleMyBike> guys
<GnomeStoleMyBike> wanna read my short story
<GnomeStoleMyBike> ?
<Kakadu> wut?
<GnomeStoleMyBike> totally unrelated to anything
<GnomeStoleMyBike> ok sorry for offtopic
<Kakadu> vim Btw, maybe your bike was stolen buy Unity?
<Kakadu> s/vim//
<GnomeStoleMyBike> ubuntu Unity ?
<GnomeStoleMyBike> no thanks i use OsX
<GnomeStoleMyBike> :]
<Kakadu> GnomeStoleMyBike: yeah
<GnomeStoleMyBike> mac fag here
Submarine has quit [Ping timeout: 240 seconds]
<Kakadu> So, it seems you don't like gnome?
<GnomeStoleMyBike> is this a trap question ?
<Kakadu> it is trolling)
<GnomeStoleMyBike> i don't like Gnome who have stolen my bike
<GnomeStoleMyBike> i plan to hunt him down and roast this week.
lggr has quit [Ping timeout: 255 seconds]
kdridi has joined #ocaml
<kdridi> hi there
<GnomeStoleMyBike> \o hi
<kdridi> i'm looking for an html dom parser which i can use also to do some xpath requests
<kdridi> any clue ? :)
lggr has joined #ocaml
Cyanure has quit [Remote host closed the connection]
justinfront_ has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
<Kakadu> kdridi: no idea
lggr has joined #ocaml
UncleVasya has quit [Quit: UncleVasya]
<wmeyer> kdridi: there are some nice XML libraries but usually no xpath
sgnb` has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
beginner42 has quit [Remote host closed the connection]
ontologi1e has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
ontologiae has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
ontologi1e has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
justinfront_ has quit [Ping timeout: 256 seconds]
answer_42 has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
Sablier has quit []
<orbitz> What is the correct way to express a type as a function taking a format string?
lggr has quit [Ping timeout: 240 seconds]
<thelema> orbitz: look at printf's type
<orbitz> There is this funky 'a in there
<thelema> there's usally an ('a, 'b, 'c) format type and a 'a
<thelema> yup, the return type of printf is determined by the first type of the format string (or second, or something)
<thelema> the return type includes the extra arguments to be passed
<orbitz> do I have to paramaterize my record over that though?
<thelema> probably not
<orbitz> one sec i thought I got an error, retrying
<thelema> it's a regular polymorphic function
lggr has joined #ocaml
<orbitz> and what is the idfference between format, format4, and format6?
rowsdower has joined #ocaml
<thelema> format4 and 6 are extensions to support scanf and... I don't recall.
<thelema> IIRC, format is sufficient for printf-style usage
<thelema> try something like: type t = { x: 'a . ('a, string, unit) format -> 'a }
<orbitz> compiels for a record, neat
<orbitz> how come that doesn't work for a naked type t = 'a . (...)
<thelema> in short, records have to have their type pre-declared, while other types must be inferrable
<thelema> 'a. forces polymorphism
<thelema> which is allowed in records and ... hmm, maybe only records... I thought there was one more thing that was nominally typed... Variants?
<orbitz> Now i'm getting
<orbitz> Error: This field value has type ('a, unit, string, unit) format4 -> 'a which is less general than 'b. ('b, unit, string, unit) format4 -> 'b
<orbitz> ; logger = Async.Std.Writer.writef (Async.Std.Writer.create (Async.Std.Fd.stdout ()))
lggr has quit [Ping timeout: 256 seconds]
<thelema> hmm, maybe you can't use records for this... Can you use 1st class modules? They certainly support this.
<thelema> btw, it's not supported in variants.
Yoric has quit [Ping timeout: 256 seconds]
<orbitz> Hrm interesting, bascially I want to paramaterize a logging function and put it in a record, and that line is creating the logging function (partial evaluation)
<thelema> ok, you can do what you want...
<thelema> it turns out you just have to annotate the type of the value too.
lggr has joined #ocaml
ontologi1e has joined #ocaml
<orbitz> thanks thelema
<thelema> in batteries, it looks like I did every other solution except for the record solution in batlog: module and object
ontologiae has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 246 seconds]
<orbitz> can one convert between format format4 format6?
lggr has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
<orbitz> I wonder if a formatter is a better way to do this
<thelema> orbitz: the types are just aliases
<thelema> a,b,c format is a,b,b,c format4 (or something similar), etc.
<thelema> type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
<thelema> type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
lggr has quit [Ping timeout: 244 seconds]
<thelema> as for the Format module, that's totally orthogonal, and probably not recommended for logging
<orbitz> Ah ok, the Async.Std.Writer as a to_formatter function, I'm not sure what it does
lggr has joined #ocaml
<orbitz> Hrm, I'm still not sure how to squash this "less general than" error. I read the thread but it doesn't seem like there is a great answer
lggr has quit [Ping timeout: 240 seconds]
<orbitz> If I understand correctly, the problem seems to be the way I am making the logger produces a type less general than the record becaues of the lack of a 'forall'
<orbitz> And I make the logger like Async.Std.Writer.writef (Async.Std.Writer.create (Async.Std.Fd.stdout ()))
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
<wmeyer> orbitz: it's an interesting discussion, however wouldn't be cooler to just drop the whole format business and to the combinator based printing?
lggr has quit [Ping timeout: 260 seconds]
<wieczyk> I can see that Ocaml has nice Dynlink module
<wieczyk> It makes possible to write plugins for program. In haskell it is hardcore, reqyires compiling many libraries to shared libraries which makes some problems.
<wieczyk> Ehh... still do not understand why this language... close to programmer's heart.. is not popular.
lggr has joined #ocaml
<wmeyer> wieczyk: ask the industry? ;-)
lggr has quit [Ping timeout: 245 seconds]
<wieczyk> ;]
<wieczyk> I hope that Real World Ocaml will be bible to evangelize industry.
<wieczyk> (but some support for SMP would also help popularize this language)
cdidd has quit [Remote host closed the connection]
lggr has joined #ocaml
<wmeyer> SMP thing boils down how do you threads. Are they are useful? Especially that you have to program using locks.
<wmeyer> Normally if you have message passing style programming using any of the modern paradigms like Join calculus, you don't need to be in the same process space
<wmeyer> look at JoCaml
<wmeyer> That's said, maybe SMP ocassionaly is useful and would attact people, just the cost is high.
<wmeyer> If you want not-blocking IO, then Lwt or Async is fine.
<wieczyk> I dont agree :-)
<wmeyer> My friend completely disregarded OCaml in his mind, because of lack of threads
<wieczyk> You can write bad good when you do stupid locking but it is not reason to resign from SMP.
<wieczyk> Especially when it can make concurrent applications much faster, omit many copying. You can have massage-passing concurrent application with threads, you will just push references in messages.
<wmeyer> wieczyk: we live in the world were hetergounous computing is ubiquiuos. Where clusters use message passing. Locks inflict imperative programing and are much lower level than message passing.
lggr has quit [Ping timeout: 256 seconds]
<wmeyer> s/were/where/
<wieczyk> In my opinion telling that 'do shared memory between processes and copy data and synchronize for shared buffers.. becuase you can do stupid locking in SMP application' is big illusion.
<wieczyk> Also thinking that SMP is only for mathematican computations
<wmeyer> wieczyk: yes. Then use C or OpenCL.
<wieczyk> Yes, for mathematican MPI is probably better because it allows easy to scale from multiprocessor to cluster.
ontologiae has joined #ocaml
<wieczyk> But not each SMP application is doing mathematical computations.
<wmeyer> (OpenCL is not extremely good example but it's now a standard)
ontologi1e has quit [Ping timeout: 248 seconds]
<wmeyer> (In other words I don't like OpenCL)
<wieczyk> (And is for mathematican, for writing HTTP server you will not use OpenCL)
<wmeyer> so why do you need SMP for HTTP server, please, concrete examples.
<wieczyk> You can handle events faster.
<wieczyk> See nginx or apache.
<wieczyk> or varnish-cashe.
lggr has joined #ocaml
<wieczyk> It is natural for concurrent application to utilize many logical processors (cores or real processors).
<wmeyer> another question, does each of the requests from the separate session need to know about other requests?
<wieczyk> In state application yes ;]
<wmeyer> so where the locking will happen?
<wmeyer> I think the locking will happen on IO, in the database itself.
<wieczyk> On concurrent queues, or when updating global data.
<wmeyer> so do you still need to SMP?
<wieczyk> Yes?
<wmeyer> no :-)
<wmeyer> HTTP is particulary bad example to be honest
<wmeyer> but I am failing to see a good example apart from processing tons of arrays in numerical setting.
<wmeyer> but then you need OpenCL or RenderScript or any other "paraller aware" compute framework
<wieczyk> It is weird for me that you cannot accept that servers utilize SMP.
<wieczyk> But you can see another fail from lack of SMP support.
<wieczyk> You need to wrap each system call which can block.
lggr has quit [Ping timeout: 264 seconds]
<wieczyk> Which limits your application to Ocaml-provied wrappers and disallows you to use external C library which can block on system call.
<wieczyk> For example if you will use GTK and want to make your application more responsible
<wmeyer> wieczyk: maybe they do, but I fail to see that is a good solution for the problem
mnabil has quit [Ping timeout: 260 seconds]
<wmeyer> wieczyk: still you have paraller system calls, just the gc will block. That's one thing.
<wieczyk> This solution is checked and used everywhere else, only Ocaml is a bastion for 'paralell is only for mathematical computations where MPI is better because you can scale to cluster'
rowsdower has quit [Quit: Konversation terminated!]
<wmeyer> second thing gtk+ is a C framework not native OCaml one using Lwt.
<wmeyer> but I certainly agree!
<wieczyk> And so what? So you application cannot be responsible becuase not-everything-is-written-in-caml ?
lggr has joined #ocaml
<wmeyer> SMP is as useful as objects for instance
<wieczyk> I very like solutions like Lwt etc
<wmeyer> wieczyk: not responsive, you mean at a level of sweeping? ;)
<wieczyk> I very like concurrent programming, but I it is weird for me that I cannot utilize many CPUs especially when it is easy in concurrent programming.
<wmeyer> your application will be blocked in worst scenario for milisecods ocasionaly when the major gc will happen
<wieczyk> Not responsible, if you will want to do responsible GUI by
<wieczyk> seperating GUI thread, the buttons actions etc will only push some message to queue instead of doing blocking-gui-computation-at-place
<wmeyer> wieczyk: write a non responsive application in gtk+ and I will do the rest
<wmeyer> in ocaml
<wieczyk> then you will see that ocaml threads will not allow you to do this (sorry for my english)
<wmeyer> wieczyk: Your english is good as mine, no worry :-)
<wieczyk> OK
<wmeyer> wieczyk: well, did you hear about gtk-lwt?
<wieczyk> No.
<wmeyer> so you can write Lwt applications using gtk it's part of Lwt
<wieczyk> Cool that someone does this, but it required some effort where with SMP you could have this for free.
<wmeyer> or lablgtk applications in a style of Lwt
<wmeyer> wieczyk: with LOCKS.
<wieczyk> Dont fall with propaganda that every application which uses LOCKS must be evil.
<wmeyer> wieczyk: too bad :D
<wmeyer> I hadn't been to, until I thought more about it to be honest :-)
<wmeyer> and found that having a concurrent gc would hurt a bit more
<wieczyk> Why?
<wieczyk> .NET, Java, etc have this and it works at industry.
<wmeyer> it complicates the runtime, it affects performance
<companion_cube> there are plans for a multi-runtime ocaml, apparently
<wmeyer> but don't even compare .NET or Java GC to OCaml one
<wieczyk> why
lggr has quit [Ping timeout: 264 seconds]
<wmeyer> because they are slower, and significantly different, OCaml runtime is really fast, and it uses tags for the allocated cells in blocks
<wmeyer> some of the runtimes are even conservative, they will think that the cell is still referenced
<wmeyer> where it's not
<wmeyer> it comes with the cost of having floats alloted on heap
<wieczyk> Maybe SMP can make concurrent application much faster and a bit slower GC is just cost for treasure.
<wmeyer> but then you avoid write barriers and unprecise gc
<wmeyer> but there is also complexity of the runtime
lggr has joined #ocaml
<wmeyer> OCaml architects though that having a simple compiler, with simple but yet very efficient runtime is better
<wieczyk> It is hard for me to work with argument 'complexity of runtime', because I dont know how much complicated runtime is needed and how to see how far we can go with ideology 'simple runtime'.
<wmeyer> to maintain, extend, less error prone
<wmeyer> wieczyk: no, I agree having SMP would be cool, just I fail to see if it's worth personally.
<wieczyk> Becuae I think that programming is our goal not the ideal of simple runtime. I dont have any knowledge about how simple is current runtime and how much we can lose when we complicate it.
<wmeyer> Please push developers to do this if you want.
<wmeyer> Keep telling them and eventually it will be integrated I am sure
emmanuelux has quit [Quit: emmanuelux]
<wieczyk> I was trying to contact with author of project oc4mc (ocaml for multicore or something like this, they provided parallel GC for ocaml 3.10) but he dont respond me, project is dead.
<wmeyer> wieczyk: I can see your point (and others)
<wmeyer> wieczyk: yes, it's academic. keep nagging him
<wieczyk> hehe
<wmeyer> with enough faith you can do it :-)
<wmeyer> seriously
<wieczyk> Ok, when I finish my thesis I will give a lot of my energy for this.
<wmeyer> wieczyk: but does not sound like having an inliner would be cooler?
<wmeyer> will rephrase again Xavier L, as thelema and others: "Who will bring a GHC quality inliner to the OCaml will be welcomed like the Messiah" :)
<wieczyk> I do not understand, we dont have inlining in current compiler? (Sorry, I lack a lot of functional programming terminology)
<wmeyer> I think it's worth to say that from time to time
<wmeyer> we do have, but simple one
<wieczyk> Can you give me simple explainations when GHC inliner is better?
<wieczyk> I am interrested :D
<wmeyer> wieczyk: it inlines higher order functions and closures. full stop. :)
<wieczyk> Nice.
<wieczyk> Well
lggr has quit [Ping timeout: 246 seconds]
<wmeyer> wieczyk: if you do it, you will be messiah remember
<wieczyk> I have to go writing my thesis, no sleeping today :D.
<wmeyer> not being ironic
<wieczyk> I hope that my oppurtinities make this channel more live ;D
<companion_cube> wmeyer: isn't it easier in haskell ?
theplanet has joined #ocaml
<companion_cube> where side effects are not in the language?
<wmeyer> companion_cube: it is, but it's not a good excuse
<wmeyer> companion_cube: yes, but it's easy to see where the side effect are
<wmeyer> mutable fields and references
<companion_cube> I'm not sure
<companion_cube> look at all the parts of stdlib that use side effects
<companion_cube> hashtables, Gc, Array, and so on
<wmeyer> companion_cube: yes! and for performance reasons we might have purely functioan equivalents
lggr has joined #ocaml
<wmeyer> that doesn't affect that it's possible to have inliner. Side effects will of coure affect the performance, but will bring performance because of the imperative updates at the same time.
<wmeyer> I'm sure when you write ML code the code itself is not dominated by side effects too much, at least in my case.
<wieczyk> My small experience agrees with you.
<wieczyk> Destructive updates just helps.
<wieczyk> help*
<companion_cube> well, I use (weak) hashtables
<companion_cube> a lot
<companion_cube> (for hashconsing)
<wmeyer> so we could have an option, eiter use monads and avoid side effects - then inliner will do most of the time inlining, or just use side effects and then we will reduce allocation or use imperative data structures
<companion_cube> then just use haskell :D
<wieczyk> wmeyer: Where I can read about current inliners, and problems related to this. Do you know some good articles?
<wmeyer> companion_cube: yes, but the point is that current inliner is not behaving in presence of highly monadic code :)
<companion_cube> heh
<wmeyer> wieczyk: read GHC Simon Peyton Jones paper how they've done this in GHC.
<wmeyer> companion_cube: at all you would like to see things like Planck or Pprint to be more widely used?
<wmeyer> here you go
<companion_cube> Planck ?
<wieczyk> thx
<wmeyer> wieczyk: it appeared to me before that inlining is a very simple problem, but in general in a functional language it's a bit like partial evaulation, nevertheless i think with enough faith and time it's possible.
lggr has quit [Ping timeout: 260 seconds]
<wmeyer> wow, now I enabled flyspell mode in Erc buffer :)
<wieczyk> (i dont like parser combinators technology, I believe this is usable only for small parsing like config files or sth like this)
<companion_cube> interesting
<companion_cube> although menhir is cool
<wmeyer> companion_cube: agreed about menhir.
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<wmeyer> however menhir parser are not first class
<wmeyer> more over it's just LALR(1) where planck has inifite backtracking
<companion_cube> once you have a parsing function, I don't see the problem
<wmeyer> packrat parsers are cool
<wieczyk> I have this opitnio because when you use YACC then you have information from tool about conflicts, then you can see that something will be not parsed as you wanted. With combinators it will be parsed as you programm this, you dont have any information about problems etc)
<wmeyer> menhir also requires lexer
lggr has joined #ocaml
<wmeyer> nevertheless menhir is extremely fast and nice. The LALR parsing technology like yacc has matured for long time.
<wmeyer> wieczyk: parsging combinators don't have conflicts
<wieczyk> Yes, and it is problem.
<wmeyer> because they are deterministic
<wmeyer> you always have one way of parsing, and the rules how the parser will be exectuted are easy to grasp
<wieczyk> Produced automata by yacc/lex is also deterministic. They do some decision with conflict, but you know about this, it is predictable.
<wieczyk> I cannot see to encode big grammar in combinators.
<wieczyk> (as you can see i have hard character :D)
<wieczyk> (i dont know if in english ,,hard character'' has same meaning as in polish)
<wieczyk> ,,trudny charakter''
<wmeyer> wieczyk: i know what you mean, welcome in the club.
<wieczyk> ;>
<wieczyk> Ok
<wieczyk> cya
<wieczyk> thanks for discussion
<wmeyer> difficult mentality/personality/character
<wmeyer> wieczyk: you are welcome
<wmeyer> wieczyk: being fundamentalist is cool and needed
<wmeyer> nothing better than fanatic and blind politics in technology - only if it's a good technology.
lggr has quit [Ping timeout: 240 seconds]
GnomeStoleMyBike has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
emmanuelux has joined #ocaml
<wmeyer> companion_cube: Agreed, but how do you compose these parsing functions?
<wmeyer> companion_cube: you can build the parser at runtime for instance.
<wmeyer> can't*
ontologiae has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 256 seconds]
ontologiae has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
emmanuelux has quit [Quit: emmanuelux]
lggr has joined #ocaml
emmanuelux has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml