ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
zigong has joined #ocaml
mlh_ has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
joeytwiddle has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit [Connection timed out]
faigo has quit ["Leaving"]
smimou has quit ["?"]
_fab has joined #ocaml
fab_ has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
monochrom has joined #ocaml
threeve has joined #ocaml
threeve has quit []
Nutssh has joined #ocaml
threeve has joined #ocaml
pango_ has joined #ocaml
vezenchio has quit [""The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and t]
pango has quit [Read error: 110 (Connection timed out)]
TaXules has quit [Read error: 104 (Connection reset by peer)]
TaXules has joined #ocaml
smimou has joined #ocaml
monochrom has quit ["good morning, sweet dream"]
threeve has quit []
booyaa has quit ["leaving"]
__DL__ has joined #ocaml
tom_p has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
Skal has joined #ocaml
mlh_ has quit [Client Quit]
tom_p has joined #ocaml
batdog is now known as batdog|gone
batdog|gone is now known as batdog
batdog has quit ["changing servers"]
batdog has joined #ocaml
batdog is now known as batdog|gone
batdog|gone is now known as batdog
pango has quit [Remote closed the connection]
pango has joined #ocaml
Submarine has joined #ocaml
Skal has quit [Read error: 60 (Operation timed out)]
ski has joined #ocaml
Submarine has quit [Remote closed the connection]
Nutssh has quit ["Client exiting"]
gim has joined #ocaml
Codename_V has quit ["Free will is just an illusion"]
Submarine has joined #ocaml
revision17 has quit [Read error: 110 (Connection timed out)]
Submarine has quit [Remote closed the connection]
vodka-goo has joined #ocaml
Gueben has joined #ocaml
Submarine has joined #ocaml
revision17 has joined #ocaml
vodka-goo has quit []
Submarine has quit [Remote closed the connection]
Submarine has joined #ocaml
Skal has joined #ocaml
Submarine has quit [Remote closed the connection]
Submarine has joined #ocaml
_fab has quit []
Submarine has quit [Remote closed the connection]
ski has quit [Read error: 104 (Connection reset by peer)]
gim has quit [Read error: 110 (Connection timed out)]
Skal has quit ["Client exiting"]
gim has joined #ocaml
gim_ has joined #ocaml
zigong has quit [Remote closed the connection]
gim has quit [Read error: 110 (Connection timed out)]
gim_ has quit [No route to host]
malune has joined #ocaml
threeve has joined #ocaml
gim_ has joined #ocaml
Schmurtz has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
Schmurtz has joined #ocaml
Schmurtz has quit [Remote closed the connection]
Schmurtz has joined #ocaml
vezenchio has joined #ocaml
lus|wats has joined #ocaml
_shawn has quit [Read error: 104 (Connection reset by peer)]
vezenchio has quit [Read error: 110 (Connection timed out)]
lispy has joined #ocaml
<lispy> i can't find the documentation for lablgl
<lispy> any idea where to look?
<Smerdyakov> Good. Labels are the devil's work.
<lispy> even the source would be nice
teiax has joined #ocaml
<smimou> it's really near the C interface, so a good start would be to look at the C gl doc
<lispy> that's good to hear, the haskell opengl bindings are very different from the C api
<lispy> but, one reason i ask is because i want to find out what version of opengl it matches
<lispy> and upgrade it if necessary
<smimou> yes it is
<lispy> thanks
<lispy> it seems like ocaml was forgotten about.
<lispy> but, i'm looking at it, and it seems like a very nice language for pragmatic FP
<Smerdyakov> How is OCaml "forgotten about"?
<lispy> well, a lot of the references and libs that i find for it, haven't been updated in quite a while.
<lispy> according to the benchmarks i find it is on par with C++ and can be optimized to be on par with C
<Smerdyakov> And you know of flaws in them, such that it is important that they should be updated?
<teiax> hehe, yes, exactly. There are a lot of libraries out there which work just fine they way they are
<lispy> Smerdyakov: no, but when something isn't actively updated in the FOSS community it is often a sign that everyone lost interest
<lispy> i'm not bashing ocaml, i'm just trying to explain the impression i get from googling for ocaml
<teiax> lispy: based on the mailing list, and CWN, there is a lot of activity in the community
<lispy> teiax: ah, that's good
<teiax> and it is a very nice language for practical programming
<lispy> i have a small set of opengl example programs written in haskell that i'd like to convert to ocaml to compare performance
<Smerdyakov> lispy, what "FOSS"?
<lispy> free and open source software
<Smerdyakov> OK. I think you'll find that generalizing from other language communities to ML won't work in that way, since ML programmers tend to be more thoughtful and get things right in the first few tries. ;) (And also avoid feature bloat)
<teiax> well, module size is an important thing to think about too
<lispy> is there an SDL binding for ocaml yet? (I haven't bumped into one)
<teiax> there are modules that everyone uses which haven't been updated in a long time
<teiax> Yes, there is
<teiax> It seems pretty good
<teiax> I've played with it just a bit
<teiax> let me dig up a link
<Smerdyakov> BTW, I like Standard ML more than OCaml. I think it wins on every dimension but community size and amount of pre-existing library code.
<lispy> thanks
<teiax> hm, Smerdyakov, I'm down for whatever as long as its expressive and type safe
<lispy> yeah, i learned haskell for a class and i really like it
<teiax> actually, Smerdyakov do you know of any OS projects in SML?
<lispy> but, being pure functional is annoying at times
<Smerdyakov> teiax, there is an Open Directory category, containing only stale projects, to my knowledge.
<teiax> I was reading a bit about ML Kit yesterday, and thinking it would be a good implementation to do an OS in
<lispy> i'm really impressed by the performance that ocaml gives compared to the other functional languages i've seen. granted, I haven't tried writing anything in ocaml yet, so I don't know first hand how good it can be.
<lispy> teiax: have you heard of house?
<teiax> hm, no
<Smerdyakov> I'm working on a new OS project, and I'm not planning to use tie it to any particular language.
<lispy> teiax: a group took the ghc runtime and converted it to a mach kernel and then haskell programs can run on the bare metal
<Smerdyakov> lispy, MLton gives better performance on most non-trivial examples.
<teiax> ah, I had heard something about that
<lispy> MLton? hmm...
<Smerdyakov> Any example contained in a single source file is trivial, in this sense. :P
<teiax> Smerdyakov: yes, however, dealing with a garbage collector inside a kernel could be a problem
<Smerdyakov> (MLton does cross-file inlining.)
<Smerdyakov> (And I think OCaml doesn't.)
<teiax> yes, it actually does, but in more limited cases
<Smerdyakov> teiax, which cases?
<teiax> if you have .cmx files available at link time, it will do cross module inlining
<lispy> does MLton allow object oriented programming?
<Smerdyakov> lispy, yes, but not with explicit support.
<teiax> well, it will only have external interface information available
<Smerdyakov> lispy, closures, recursive types, and record types are all you need to implement the most common OO idioms.
<Smerdyakov> lispy, with almost identical syntax to what you'd expect.
<teiax> so it cannot for example, change the inlineing of functions inside a module based on how they are used
<Smerdyakov> teiax, so inlining only occurs at link time?
<teiax> which MLton certainly could do
<teiax> well, no
<teiax> when the library is compiled, there will be some inlining
<teiax> but it cannot be as good as MLton, because it cannot anticipate use
<Smerdyakov> teiax, so cross-file inlining only occurs at link time?
<teiax> so it must proceed with generic use cases
<teiax> yes, exactly
<teiax> hence, only the exported types from a module are available
<Smerdyakov> OK. Inlining is important not just by itself but also in enabling other optimizations, which is why MLton has such an advantage.
<teiax> yes
<teiax> MLton also optimizes closures, does it not?
<Smerdyakov> Not sure
<teiax> Ocaml does not do that at all
<Smerdyakov> MLton optimizes array representation, though.
<teiax> however they are implemented very efficiently at run time
<Smerdyakov> char array is represented just like in C (plus length info).
<teiax> ah, I am not sure what Ocaml does there
<smimou> nobody sane would do a char array in caml
<teiax> Ocaml really focuses more on making the runtime efficent
<smimou> (but yes it wouldn't be optimized)
<Smerdyakov> smimou, no need to agonize over it if you use MLton. :)
<Smerdyakov> smimou, generic functions on 'a array will also use different representations for different a's.
<smimou> that's nice
<smimou> are you aware of drawbacks of mlton ?
<teiax> hm...
<Smerdyakov> Sure. It uses lots of memory, since it's a whole-program compiler.
<Smerdyakov> The usual whole-program optimizer drawbacks. :)
<Smerdyakov> Also, it sticks very closely to the Standard ML Definition, which is clearly (to me) missing a few convenience features.
<smimou> well compilation is not so much an issue usually, it's mostly runtime which matters
<teiax> problems with memory usage?
<Smerdyakov> I think the memory usage of the compiled programs themselves is on par with OCaml.
<lispy> Smerdyakov: what about ad-hoc polymorphism? does SMTon support that?
<Smerdyakov> lispy, no. (MLton)
<lispy> oh, sorry ;)
<Smerdyakov> lispy, functors are the ML world's best answer to that question. They solve many of the same problems.
<lispy> i'm actually not sure if ocaml has that either
<teiax> that tends to drive type inference nuts
<teiax> Ocaml does not
<lispy> so how do you implement things like the visitor pattern?
<Smerdyakov> Is "ad-hoc polymorphism" mean to include Haskell-style type classes?
<Smerdyakov> lispy, the visitor pattern is a dumbed down higher-order function.
<lispy> Smerdyakov: yes, haskell type classes allow ad-hoc polymorphism
<Smerdyakov> lispy, so, for instance, with List.fold_left.
<Smerdyakov> Functors let you code statically-resolved cases of everything that type classes give you.
<lispy> take fold_left, if you wanted different behavior depending on the type of each element, then you'd use different cases?
<Smerdyakov> list is a homogenous type, so I'm not sure what you mean.
<lispy> itis homogenous, but you could create a union type and essentially be storing several different types in the list
<lispy> it's not something i need at the moment, but just a thoguht
<teiax> yes, and you'd use patten matching to deal with that
<Smerdyakov> Yes, you would use case analysis, as you always do in dealing with union types. It's an orthogonal issue.
<lispy> well, in a language like java, you'd have a an interface that each element in the list implements and that's where you'd specify the behavior based on type. this way you could add more types later and you wouldnt' have to house all the code in one monolithic function. So there are trade offs to both appoarches.
<teiax> *shudder*
<lispy> it's more of an observation tho
<teiax> sorry, I can't here that name without some reaction
<Smerdyakov> You can do the same thing in OO-style with OCaml's OO constructs or with functions/recursive types/record types in either OCaml or SML.
<lispy> alright
<lispy> i need to find some time to actually play with ocaml hands on
<lispy> or MLton
<Smerdyakov> I find that "playing" is nowhere near as useful as trying to use a tool to achieve some practical goal.
<teiax> Smerdyakov: yeah, you've got that right
<Smerdyakov> This is an especially amusing way to learn to use Coq. :D
<lispy> i find that it helps to convert programs i've already written and understand to a new language and trying to use the idioms there
<Smerdyakov> Proving the same 15,000-line theorem multiple times sure drives you to learn to economize. ;)
<teiax> lispy: want to work on a project in Ocaml?
<smimou> Smerdyakov: it's easy to have many lines with mostly trivial proofs in Coq
<Smerdyakov> smimou, I am intimately familiar with that fact now, though I am striving to learn how to minimize the number of lines like that. :)
<lispy> teiax: maybe, but i have not the free time to commit to anything
<smimou> heh
<teiax> hm, too bad
<lispy> teiax: what is the project ?
<teiax> well, do you know anything about X.500 directories?
<teiax> I maintain the LDAP library in Ocaml
<lispy> i know they are evil
<teiax> I always have little projects that need doing :-)
<teiax> hehehehee, evil they are
<lispy> yeah, my little project right now is trying to create a website. But I love FP and became interested in ocaml because of the performance ;)
<lispy> so, i should actually be learning ruby or php right now :)
<Smerdyakov> lispy, NO
<Smerdyakov> lispy, http://smlweb.sf.net/
<smimou> well you could start with mod_caml also but...
<Smerdyakov> mod_caml PSHAW.
<Smerdyakov> smlweb is 18 times cooler. ;)
<smimou> wtf PSHAW ?
<teiax> oh, you might also look at wdialog
<lispy> those are cool, but not mature
<Smerdyakov> "PSHAW" is an American exclamation of derision.
<teiax> it is a very interesting approach
<lispy> some with haskell server pages
<smimou> ok, good to know
<Smerdyakov> lispy, I use smlweb on real moderately popular web sites.
<lispy> are there forums already written in smlweb?
<lispy> i had planned on taking a php based forum that supported what i needed and hacking it to work with the other things i'll be adding
<Smerdyakov> I don't know. I'm not aware of any, but the system has been available on Sourceforge for over a year, so someone may have gone and done it.
<Smerdyakov> Its gets a download or two every few days. :)
<lispy> does smlweb allow you to add ajax style easily?
<Smerdyakov> Probably not.
<lispy> that's the big win with ruby on rails in my mind
<Smerdyakov> It provides some support that you can't get by just writing HTML code with holes to be filled in by running code?
<lispy> the draw back is that there are not mature forums (forums are not something i'm eager to write)
<lispy> Smerdyakov: have you looked at rails? it does the asp/jsp style where yo u can embed ruby and rails also makes using things like ajax very straight forward. It's really the rails part that is cool.
<teiax> Most of my work's dynamic pages are wdialog based
<lispy> the fact that you use ruby is nice since it's a decent language, but the real win is the framework you get for free
<Smerdyakov> I can fix that easily enough. One moment. :)
<teiax> lispy: well, yes, but ruby isn't type safe
<lispy> the cool thing about php is that i just have to modify existing code to fit my needs
<teiax> I used to do a lot of perl programming
<teiax> and I still have scars
* lispy won't touch perl
<teiax> the same kinds of horrible things can happen easily in ruby though
<teiax> the type system of C is safer
<Smerdyakov> smimou, OK, back and running!
<lispy> teiax: ah, that's too bad
<smimou> thx :)
<lispy> teiax: i was getting ready to like ruby :)
<lispy> teiax: but if it's that much like perl then....
<teiax> type system wise
<teiax> I don't think any syntax could be worse than perl's
<teiax> except perhaps that of unlambda
<teiax> but that language was a joke
<Smerdyakov> teiax, one project idea I have on the back-burner is a framework for building dynamic web sites entirely using combinators -- no other code, HTML or program.
<Smerdyakov> teiax, since most dynamic web sites do absolutely nothing novel. :)
<teiax> interesting
<teiax> I'd be interested to see that
<lispy> yeah, my site will have forums, some sort of simple webpage upload feature, and a way to search for bittorrents (legal data only)
<lispy> all of that stuff has been written before, so i think i should use off the shelf stuff
<lispy> phpbb is well tested
<teiax> yes, you can probably find lots of systems which do that OTS
<Smerdyakov> I don't think I'll be working on that any time soon, because I think there are more pressing problems that affect a larger proportion of the software people should be writing.
<teiax> hehe, yeah, but it would be interesting none the less
<lispy> my fear of using OTS stuff, in php for example, is that at some point i'll find time to enhance it and i'll be stuck with php :)
<Smerdyakov> lispy, you should be afraid of using ANY PHP code, because the security flaw rate is so high.
<lispy> for example, posting to forums should do more ajax and less reloading
<teiax> yes, they don't exactly have a proof of correctness for the PHP interpreter :P
<lispy> Smerdyakov: yeah :( I looked at ruby on rails forums but it has so few features right now
<Smerdyakov> teiax, the problem is that its correct operation provides so many opportunities for vulnerabilities. :P
<teiax> heh
<Smerdyakov> I run a hosting service where a vulnerable off-the-shelf PHP script lead to a user's script being used to serve 80GB of media files on an Italian IRC network, and I don't think that depending on any PHP interprete features that the authors would call "bugs."
<Smerdyakov> s/depending/depended
<lispy> wow
<lispy> my site will be serving media already so i'll have to watch out for illegal content :)
<teiax> heh
<Smerdyakov> Also watch out for vulnerabilities that let visitors start remote shell daemons on your server. ;)
* lispy nod
<lispy> yeah, i want to allow uploading of html+images, and i'm not sure how that's gonig to work
<lispy> my site will be similar to sf.net but optimized for a different user audience
<Smerdyakov> BTW, here's the hosting service, which is accepting new member very soon now that I think we've finally got a more secure infrastructure: http://hcoop.net/
<lispy> so forums instead of maillists, no shell, no version control.
<Smerdyakov> The best hosting service around for running web sites based on exotic programming languages. ;)
<teiax> hm, cool
pango_ has joined #ocaml
pango has quit ["Leaving"]
<det> Smerdyakov, That is very nice to hear! (Opening membership soon)
Smerdyakov has quit [Connection timed out]
mrsolo has joined #ocaml
mikeX has joined #ocaml
Snark has quit ["Leaving"]
tom_p has quit [Read error: 110 (Connection timed out)]
tom_p has joined #ocaml
malune has quit ["Leaving"]
mikeX has quit ["Leaving"]
tom_p has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
lispy has quit [Read error: 104 (Connection reset by peer)]
lispy has joined #ocaml
__DL__ has quit ["Bye Bye"]
SmerdyOffice has joined #ocaml
tom_p has joined #ocaml
threeve has quit []
Gueben has quit ["j'ai la taupe au guichet"]
mwc has joined #ocaml
<mwc> Is the toploop supposed to have any readline support or anything?
<SmerdyOffice> No. You can use emacs or rlwrap for that.
teiax has quit ["Client exiting"]
<mwc> ah, rlwrap looks good
<mwc> thanks
<SmerdyOffice> emacs looks better. :P
<mwc> Eighty megs and constantly swapping?
<SmerdyOffice> I don't have any such problems, maybe because I always have significantly more than 80 MB of RAM available. :)
<mwc> yeah, it's an old one I admit
Smerdyakov has quit [Read error: 110 (Connection timed out)]
<smimou> ledit works well also