smkl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
gim_ has quit []
Vincenz has quit ["Sleep, deep sleep"]
Kinners has quit [Read error: 110 (Connection timed out)]
Swynndla has joined #ocaml
The-Fixer has quit ["Goodbye"]
Nutssh has joined #ocaml
cleverdra is now known as ayrnieu
ayrnieu has left #ocaml []
Kinners has joined #ocaml
Kinners has left #ocaml []
The-Fixer has joined #ocaml
shawn has joined #ocaml
_joey has quit ["leaving"]
Kinners has joined #ocaml
mr_jim has joined #ocaml
<pattern> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&frame=right&rnum=1&thl=0,913437003,913411807,913380868,913145928,913064268,913056754,913043524,912652976,912886025,912767878,912652964&seekm=bvr5sc%24dov%241%40jaist-news.jaist.ac.jp#link1
mr_jim has quit ["Leaving"]
reltuk has joined #ocaml
Nutssh has quit ["Client exiting"]
Defcon7 has quit [Remote closed the connection]
clog has joined #ocaml
themus has joined #ocaml
Defcon7 has joined #ocaml
cjohnson has quit [Remote closed the connection]
reltuk has quit ["leaving"]
tomasso has quit ["Leaving"]
Swynndla has quit ["Leaving"]
giedi_ has quit ["Client Exiting"]
<kiff> Anyone know a good place to learn how to program interactive applications in the functional/ocaml style?
<kiff> I don't know anything about monads, except that they might be relevant
liralen has joined #ocaml
Swynndla has joined #ocaml
Nutssh has joined #ocaml
Kinners has left #ocaml []
wazze has joined #ocaml
d2004xx has quit [Read error: 104 (Connection reset by peer)]
d2004xx has joined #ocaml
Swynndla has quit ["Leaving"]
liralen has quit ["system"]
Vincenz has joined #ocaml
_JusSx_ has joined #ocaml
d2004xx has quit [Read error: 104 (Connection reset by peer)]
mimosa has joined #ocaml
d2004xx has joined #ocaml
gim has joined #ocaml
Kinners has joined #ocaml
Nutssh has left #ocaml []
Banana[AFK] is now known as Banana
_JusSx_ has quit [Read error: 104 (Connection reset by peer)]
_JusSx_ has joined #ocaml
Kinners has left #ocaml []
cjohnson has joined #ocaml
<Demitar> kiff, checked the ocaml book? http://caml.inria.fr/oreilly-book/
d2004xx has quit [Read error: 54 (Connection reset by peer)]
d2004xx has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Nick collision from services.]
mattam_ is now known as mattam
wazze is now known as afkzze
ita has joined #ocaml
* ita wonders how to define a double-linked list in caml
<Smerdyakov> Functional or mutable?
<ita> mutable
<Smerdyakov> Oh. And you haven't figured out how to do that yet?
<ita> not yet :)
<Smerdyakov> Hm. What languages have you implemented doubly linked lists in before?
<ita> c && c++
<Smerdyakov> OK. Are you aware of the direct correspondence between C structs and OCaml records?
<Smerdyakov> As in, you can take your C struct definitions and translate them to OCaml record definitions trivially.
<ita> yes, i'm trying but i'm stuck on the pointer to another node part
* ita returns into the documentation
<Smerdyakov> Do you know what the OCaml equivalent to a pointer is?
<drWorm> mutable reference cells (you could have just said it :)
<Smerdyakov> I could have, but it's better to see if he knows it or knows what to look for.
<drWorm> well, now he knows what to look for.
<ita> here's what i'm trying -> type segn = { mutable x1: int; mutable prec : segn ref; mutable suiv : segn ref };;
<Smerdyakov> mutable and ref together is a little silly.
<Smerdyakov> Oh, and this brings up an important difference between ref's and pointers:
<Smerdyakov> ref's can't be null. Pointers can.
<ita> refs can't be null, i see
<drWorm> you can have refs to an Option value, no? :)
<Smerdyakov> But this is not a problem, thanks to OCaml "let rec" fancyness.
<ita> i wonder how to reference some sort of Empty thing
<Smerdyakov> ita, why bother when you can reference the object itself?
<ita> errm yep good idea
<Smerdyakov> The toplevel spams your screen when you evaluate an expression to a circular data structure. :D
<ita> is that possible to do that without using let rec ?
<ita> (a bit concerned about speed issues)
<Smerdyakov> I don't think so. You have to either use let rec, option ref's, etc..
<Smerdyakov> (The latter changes the type of the structure.)
<Smerdyakov> What speed issues are you concerned about?
<ita> i've ported an algorithm from c to ocaml and it runs slower - i'm trying to improve it now but i need a doubly linked list
<Smerdyakov> Whatdoes that have to do with let rec?
<ita> oh yes the let rec .. it just sounds "not clear" for me :)
<Smerdyakov> What do you mean?
<Smerdyakov> You mean you don't know how to use it to set up a self-pointing record value?
<ita> yes, that's it
<Smerdyakov> type a = {b : a};;
<Smerdyakov> let rec c = {b = c};;
<ita> ok
<ita> thanks
Iorek has joined #ocaml
<Iorek> what do you people think about a ocaml plugin for eclipse ? would anyone want to use it ?
<ita> me
<ita> i would
<ita> though i mostly use kdevelop
<drWorm> Iorek: i would
<drWorm> i use emacs, the ocaml mode is pretty good
<Iorek> I use emacs too
<drWorm> but eclipse has pretty good emacs key emulation :)
<Iorek> and the ocaml mode is indeed good...
<Iorek> drWorm: yep :)
<Iorek> but, at the risk of sounding heretic, I miss a lot of things in modern IDEs that emacs lacks
<drWorm> repent!
<Iorek> :)
<drWorm> emacs has all things, they are just well hidden and not so intuitive to use sometimes :)
<Iorek> what I miss most are context-sensitive tools
<Iorek> the emacs modes help with identation, syntax highlighting, compiling and debugging, but they don't help you write the code... it's not that big a deal, but it helps to "reduce friction"
<Iorek> there's a dead sourceforge project for the eclipse ocaml plugin
<async> do you guys use taureg, or the mode that comes w/ the distribution
<mattam> tuareg in X, caml in console
<Iorek> has anyone tried camaleon ?
<mattam> nope :(
<mattam> you can have completion and type information in emacs if i'm not mistaken
<async> Iorek: yeah, i don't think its that great
<drWorm> what is camaleon?
<async> ocaml IDE
<drWorm> ah
<async> it's a very respectable effort, though
<ita> Iorek: cameleon won't compile :-/
<_JusSx_> where is wuuru?
<ita> Iorek: (tried building cameleon on both mdk 9.2 && 10b)
<Iorek> it seems it doesn't work with the latest lablgtk
<async> Iorek: are you using 3.07?
<Iorek> async: yep
<ita> Iorek: yes
<_JusSx_> l
_JusSx_ has quit ["BitchX: now with Olestra!"]
liralen has joined #ocaml
afkzze is now known as wazze
Iorek has quit []
Nutssh has joined #ocaml
<drWorm> i'm trying to learn functors and the Set stuff. trying to make a Set for strings, i'm getting stuck at what can be seen at http://www.ii.uib.no/~haakon/tmp/ocamlerror.txt -- could anyone take a look and drop some hints please?
<Smerdyakov> drWorm, a simple fix is to take out the ": Set.OrderedType" from the first line.
<drWorm> Smerdyakov: hm, i saw that in the manual too, but isn't it a point to say which signature you're "implementing"?
<Smerdyakov> drWorm, that bit limits the signature of the structure you're defining from a "supersignature" of Set.OrderedType to just Set.OrderedType.
<Smerdyakov> drWorm, the problem is that it is important to know that StringOrderedType.t = string, but Set.OrderedType has t as an abstract type.
<drWorm> Smerdyakov: so the type inference makes the connection?
<drWorm> ooh, i see, hm
<Smerdyakov> Not even that. It checks that the signature of your structure is compatible with OrderedType.
<Smerdyakov> I.e., that it is a "subsignature" in some sense.
<drWorm> ah, it's clearing, makes sense
<Smerdyakov> Now, if you look up "where type," you'll see how to specify the sigbature of StringOrderedType" and still have it work.
<drWorm> "where type"?
<Smerdyakov> Yup. It's a pair of keywords in the language.
<drWorm> i'd like to specify the signature at least for documentation/readability
<drWorm> ok, i'll check it out, thanks
<Smerdyakov> Oops. I think it's "with type" in OCaml.
<Smerdyakov> It's in the tutorial at http://caml.inria.fr/ocaml/htmlman/manual004.html
<drWorm> yeah, emacs didn't put any color on "where" :)
<Nutssh> Don't you want to do a 'with' declaration?
<Smerdyakov> SML uses "where type". :)
<drWorm> wohoo, worked without the signature annotation
<drWorm> Smerdyakov: do you mean "with" as in "match ... with"?
<Smerdyakov> drWorm, no. Search for "with type" on that page.
<drWorm> no, you don't, hm
<drWorm> ah, it's right there
<Smerdyakov> It's a completely different syntactic meaning for "with". Naughty OCaml designers. ;)
<drWorm> reusing keywords to keep the syntax slim :)
<Nutssh> I'm waiting for a language consisting entirely of '0'. :)
<drWorm> unlambda comes pretty close
<Nutssh> :)
<Riastradh> Syntax causes cancer of the semicolon.
<Smerdyakov> The human brain is hardwired to understand specific linguistic structure. HINT: it's not prefix. (So say the linguists)
<Nutssh> What languages are they studying? :)
<Smerdyakov> All
<liralen> Smerdy - what do these linguists think of postfix?
<Smerdyakov> liralen, I think it's just ass bad. All languages have a permutation of "subject verb object," and some permutations are very rare. I forget the details.
<Riastradh> Smerdyakov, the linguists are obviously wrong, as Lispers get along quite fine.
<Smerdyakov> Riastradh, that doesn't prove anything. You may just be working extra hard to deal with unnatural syntax.
<Riastradh> The linguists may just be wrong, too.
<Smerdyakov> Unlikely. There is some very convincing empirical data here.
<liralen> I find it tempting to believe that the human brain can extend itself to handle 'unnatural' acts fairly well, but OK.
<Riastradh> I'm not convinced.
<Riastradh> Programming languages are not natural languages, anyways.
Demitar has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Taking advantage of existing competences is always a plus.
<Riastradh> And even if S-expressions are not perfect for human parsing, I sincerely doubt that the linguists would agree that ML's syntax is better.
<Nutssh> English has that structure, but does chinese? (I don't know.)
<Riastradh> And even if the linguists are right, the function syntax sucks anyways: it's still prefix!
<Smerdyakov> Nutssh, there are universals in language that include a decision on subject/verb/object order. Or so we learned in the linguistics class I took.
<liralen> Nutssh - as far as SOV goes, Chinese grammar works much like English.
<Smerdyakov> Riastradh, but that is natural when you have only a direct object.
<liralen> Nutssh - I think that Japanese and German have SOV or like.
<Smerdyakov> Riastradh, when you have subject and object (i.e., two arguments), infix is closer to English.
* Riastradh must depart.
<liralen> also, 'as far as SVO goes'.
ita has quit [Remote closed the connection]
Nutssh has quit ["Client exiting"]
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French"]
Hipo has joined #ocaml
Nutssh has joined #ocaml