flux__ changed the topic of #ocaml to: OCaml 3.09.2 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/
goltrpoat has joined #ocaml
<goltrpoat> so i'm trying out ocaml (after doing a fair bit of haskell).. is there anything wrong with the type signature fun : int -> int -> unit, or something along those lines? ocamlc complains about a syntax error at the " :" characters
<goltrpoat> (this is followed by let rec fun = ...)
<ketty> goltrpoat: val: int -> int -> unit
<ketty> eehh sorry
<ketty> goltrpoat: val name: int -> int -> unit
<goltrpoat> tried that, it doesn't seem to like val
<goltrpoat> the function is let rec sierpinskiTri x y size = ...
<goltrpoat> tried both val sierpinskiTri : int -> int -> int -> unit and sierpinskiTri : int -> int -> int -> unit
<goltrpoat> (compiles/runs fine without the type signature)
<pango> compile with ocamlc -i to display the inferred signatures
<ketty> yes, do that :)
smimou has quit ["bli"]
<goltrpoat> something along the lines of ocamlc graphics.cma c:/ocaml/test.ml -o -i test.exe ? sorry about the dumb questions, just started looking at it today
<goltrpoat> (that doesn't seem to print out anything)
<goltrpoat> er. -i -o test.exe
<ketty> just: ocamlc graphics.cma -i test.ml
<goltrpoat> yah i get the same type signature i was using
<goltrpoat> val sierpinskyTri : float -> float -> float -> unit (i typed int when i meant float earlier)
<ketty> than you were using the correct signature :)
<goltrpoat> yah but that doesn't compile :)
<ketty> did you put it in a *.mli file?
<goltrpoat> oh.. no, it's an .ml file
<ketty> than it wont work :)
<goltrpoat> ohh i see
<goltrpoat> type signatures have to be in an .mli ?
<ketty> yes
<goltrpoat> doh! thanks :)
<goltrpoat> so, dumb question #2: how do you write a lambda expression with more than one free variable? eg function x y -> stuff, except correctly? (in other words, is there shorthand for function x -> (function y -> (function z -> ... )) )
<ketty> function x y -> stuff
<ketty> should work :)
<goltrpoat> function x y -> x*y;; gives a syntax error at y in the REPL
<ketty> oh...
<ketty> you have to use "fun" instead of "function"
<goltrpoat> ahh
<ketty> a bit confusing.. :/
<goltrpoat> what's the difference?
<goltrpoat> other than the multiple free variables i mean
<ketty> i think "function" does multiple pattern-matching
<ketty> and fun does not
<goltrpoat> oh i see
<ketty> but in the revised syntax "fun" is used for both cased, as far as i know...
<goltrpoat> revised syntax?
<ketty> s/cased/cases
damg has quit ["... und tschüß"]
<goltrpoat> ah thanks
<goltrpoat> is the revised syntax still in a proposal stage, or has it been incorporated into the compiler?
<ketty> it exists alongside of the old syntax
<ketty> throu the use of camlp4
<goltrpoat> ah cool
WhatTheDeuce has joined #ocaml
mikeX has joined #ocaml
<goltrpoat> oh hmm. ocaml isn't lazy? eg, let rec inflist init inc = init::(inflist (init+inc) init) in List.nth (inflist 1 1) 5;; is broken?
<goltrpoat> or am i missing something
<ketty> no ocaml isn't lazy
<goltrpoat> ah ok
<ketty> but there is a lazy construct
<ketty> you can do "let a = lazy (....)"
<ketty> and to get the value you will have to use "Lazy.force a"
<goltrpoat> oh i see
goltrpoat has quit []
chessguy has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Leading Edge IRC"]
mikeX has quit ["zzz"]
love-pingoo has quit ["Connection reset by by pear"]
shawn has quit [kornbluth.freenode.net irc.freenode.net]
julbouln has quit [kornbluth.freenode.net irc.freenode.net]
Revision17 has quit [kornbluth.freenode.net irc.freenode.net]
descender has quit [kornbluth.freenode.net irc.freenode.net]
shawn has joined #ocaml
julbouln has joined #ocaml
Revision17 has joined #ocaml
descender has joined #ocaml
Revision17 has quit [kornbluth.freenode.net irc.freenode.net]
descender has quit [kornbluth.freenode.net irc.freenode.net]
julbouln has quit [kornbluth.freenode.net irc.freenode.net]
shawn has quit [kornbluth.freenode.net irc.freenode.net]
shawn has joined #ocaml
Smerdyakov has quit ["Leaving"]
Revision17 has joined #ocaml
descender has joined #ocaml
desc has joined #ocaml
descender has quit [Connection timed out]
Revision17 has quit [Read error: 104 (Connection reset by peer)]
Revision17 has joined #ocaml
love-pingoo has joined #ocaml
Snark has joined #ocaml
scruffie has joined #ocaml
slipstream has joined #ocaml
julbouln has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit ["Connection reset by by pear"]
love-pingoo has joined #ocaml
love-pingoo has quit [Client Quit]
scruffie has quit []
khaladan has quit [" Like VS.net's GUI? Then try HydraIRC -> http://www.hydrairc.com <-"]
WhatTheDeuce has left #ocaml []
desc is now known as descender
damg has joined #ocaml
rillig has joined #ocaml
_jol_ has joined #ocaml
_jol_ has quit ["leaving"]
<metaperl> good morning all... I have two simple questions typed up here: http://ocaml.pastebin.com/729482
<pango> it's try/with, not try/when
<pango> # match (1, "a") with (a, b) as c -> a, b, c ;;
<pango> - : int * string * (int * string) = (1, "a", (1, "a"))
smimou has joined #ocaml
damg is now known as damg|food
Fallen[oqp] has joined #ocaml
_jol_ has joined #ocaml
<Fallen[oqp]> bonjour
<Fallen[oqp]> hello
<Fallen[oqp]> i got trouble with caml synthax :o
Fallen[oqp] is now known as Fallenou
<Fallenou> can anybody help me ?
<Fallenou> it is about this http://wall.genesia-irc.com/?show=15
<Fallenou> maybe a ";" or ( ) problem
<Fallenou> or i maybe have to add some begin end; but i don't know where
<smimou> the ) before the else seems to match the ( of the do
<smimou> ah no sorry
<Fallenou> i tried to remove my () but it makes an other error :/
<smimou> Fallenou: its the ; before the ") else"
<smimou> ( s/done;/done/ )
<Fallenou> if i do a "if then ( )" i have to do a else ? or i can just do "if () then ():" ?
<Fallenou> ok i try
<smimou> else are optional
<Fallenou> ok
<Fallenou> i will past it again
<Fallenou> now i have the error on the end;
<smimou> aaaah
<smimou> let newt ... *in*
<Fallenou> hum the problem
<Fallenou> is that if i put 'in'
<Fallenou> i can't use it after the end of the while
<Fallenou> and i get error when i use it in my lasts if
<smimou> i := !i+1 *;*
<smimou> you cannot do a "let a = 4;" in the middle of a function
<Fallenou> hum the problem is that the newt whill have different size
<Fallenou> in the while there will be some if
<Fallenou> and it can be size - 1 of size - 2
<Fallenou> ok i did it, it seems to work
<Fallenou> http://wall.genesia-irc.com/?show=17 < and i think the last error :p
<smimou> btw you should really switch to OCaml
<smimou> caml-light is pretty dead
<Fallenou> ha ? :o
<Fallenou> i just learn caml in prepa class
<smimou> Fallenou: O <> 0
<Fallenou> lol ok i am stupid :)
<smimou> which prepa ?
<Fallenou> MPSI
<smimou> and where ?
<Fallenou> evalt : string vect -> int = <fun> < thanks :)
<Fallenou> near Paris
<Fallenou> in 93 (Seine-Saint-Denis)
<smimou> ok
<Fallenou> why ? ^^
<smimou> well I also did prepa, I might have known yours
<Fallenou> which prepa ?
<Fallenou> (you did prepa in france ? :o
<smimou> yes Henri IV in Paris
<Fallenou> ho ho :)
<zmdkrbou> (half of this chan is french, Fallenou :p)
<Fallenou> very good prepa
<Fallenou> ok
<Fallenou> so you speack french =)
<zmdkrbou> yes :)
<smimou> heh
<Fallenou> ça m'entraine a l'écrit
<smimou> however we keep it in english for the other half of the chan
<smimou> :)
<Fallenou> ok
<zmdkrbou> but that's supposed to be an english speaking channel, that's uncool for those who don't speak french not to do so
<Fallenou> well it doesn't work :p
<Fallenou> evalt [|"-3";"abs"|];;
<Fallenou> #Exception non rattrapée: Invalid_argument "vect_item"
<Fallenou> :'(
<smimou> you're trying to access an element too far in the vect I guess
<Fallenou> yes
<Fallenou> ok i see the problem
<pango> have you only been told about imperative features of the language ? that code doesn't look too "camlish"... arrays, references,... and only ints and strings...
<Fallenou> s/size/size - 2
<Fallenou> they told us basic instructions like for, while, match, if
<Fallenou> avec some operators
<Fallenou> and*
<Fallenou> i have experience in C, and php
<pango> it shows ;)
<Fallenou> i started caml 2 months ago i think
<Fallenou> or a little more
<smimou> I though the info option started sooner
<Fallenou> it works
<pango> it seems they did s/Pascal/caml light/g over their old courses
<Fallenou> the info option started with the 2d "trimestre"
<Fallenou> during the first one i did SI
<Fallenou> we had to choose after 3 months
<Fallenou> wether info (without having done it) or SI
<Fallenou> so i have to add the operator feature
<Fallenou> :p
<pango> what I mean is, if you code matches what you're being told about the language, it's sad
<Fallenou> yes :s
<Fallenou> oh yes it seems to work :)
<Fallenou> it evaluate postfixed algebric expressions
<pango> maybe your professors made their last efforts to learn new languages in around '75
<Fallenou> just like in old HP calculator
<Fallenou> my professor is MP* math professor
<Fallenou> so informatic is not his speciality
<pango> it probably explains the problem, rather than justify it
<_jol_> is there a lot of "nopaste" websites supporting ocaml syntax hilighting ?
<pango> I know www.pastebin.be, ocaml.pastebin.com
<_jol_> ok, i didn't know those ones.
<pango> first has no ads, second keeps settings between pastes, pick your poison ;)
<_jol_> ;)
_jol_ has quit ["c'est l'heure du goûter !"]
<zmdkrbou> *.dial* ... gloups
<smimou> ?
<zmdkrbou> dialup connection ? :s
<zmdkrbou> (it's .fbx.proxad.net, usually)
<Fallenou> finally it works very good !
<Fallenou> thank you very much to all who helped me :) ( smimou zmdkrbou pango ! )
* zmdkrbou didn't help, so np :D
<dylan> "smimou zmdkrbou pango" should be the name of an alcoholic beverage.
<zmdkrbou> hihi
<pango> dylan: after usage
<dylan> pango: what?
<pango> dylan: maybe how it's spelt after a few drinks
<dylan> hmm, I am not sure how to pronounce smimou or zmdkrbou.
<pango> with difficulty
<zmdkrbou> rhoo, smimou is easy
damg|food is now known as atla^isn^nup
<dylan> I'm imagining the vowel sounds are not what I'd assume.
<pango> zmdkrbou: yes, that's just how the whole catenated thing looks like
<dylan> zmdkrbou: "zemdarkerboo"?
<pango> Fallenou: is there something about functional programming panned in your info courses ? That wouldn't look out-of-place, coming from a math prof
<zmdkrbou> dylan: there's a simple trick : someone (damn him) compressed my nickname because it cas too long, so you can pronounce the original one : themadkaribou
<zmdkrbou> (much easier to say, huh ? :p)
<Fallenou> (i don't understand very well the question in english :s)
<zmdkrbou> Fallenou: your caml code looks like imperative programming
<Fallenou> imperative ?
<zmdkrbou> like C
<pango> Fallenou: functional programming has strong mathematical background (and in fact looks as much as mathematics as a programming language can)
<Fallenou> well i program in caml like i program in c i think :s
<dylan> So, "Samuel Mimram Mad Karibou Pango Bang liquor, for that authentic lambda flavor."
<zmdkrbou> :D
<dylan> (I pronounce ! as 'bang')
<zmdkrbou> Fallenou: caml il more about "let f x = blabla in f something" kind of things
<Fallenou> yes my teacher uses this sort of coding
<Fallenou> but i dislike ^^"
<zmdkrbou> rhoooo :)
<Fallenou> yes i am very "C coding fan"
<zmdkrbou> that's such a nice programming style :)
<Fallenou> i create a function
<Fallenou> i use it after
<zmdkrbou> you also do this in ocaml
<zmdkrbou> but you compute values instead of using side-effects
<Fallenou> someone want my code to evaluate postfixed algebric expressions ?
<Fallenou> like in old HP calculators
<Fallenou> like "3 3 +" = 6
<Fallenou> "3 4 5 + -" = in fact 3 - (4 + 5)
<Fallenou> and "3 4 sin +" = 3 + sin 4 :p
<Fallenou> etc
<zmdkrbou> that's a classical exercice :)
<Fallenou> ok lol
<Fallenou> my teacher didn't told us to do it but i wanted to do so
<zmdkrbou> that's a good idea ... why don't you re-do it in a functional style ? :p
* zmdkrbou functional zealot
<Fallenou> =)
<pango> and uses lists instead of arrays ;)
<pango> stacks are trivially implemented using lists
<zmdkrbou> (or using Stack in stdlib :p)
<Fallenou> we just begin to study stacks
<Fallenou> before doing this i will implement it in C :p
<Fallenou> it will be harder without "match with" of caml :p
<pango> # let rec evalt = function
<pango> | "+" :: a :: b :: q -> evalt (addf a b :: q)
<pango> | ...
<Fallenou> humm
<Fallenou> yes i can be shorter than mine
<Fallenou> and more beautiful and "caml look"
<pango> (addf taking care of string <-> int conversions; it would be even better to use a list of variant types, of course)
<pango> # type stack_element = Number of int | Operator of string
<pango> let rec evalt = function
<pango> | Operator "+" :: Number a :: Number b :: q -> evalt (Number (a+b) :: q)
<pango> | ...
<Fallenou> ola
<Fallenou> too hard for me :p
<Fallenou> we did't study how to make types
<dylan> heh
finelemon has joined #ocaml
finelemo1 has quit [Read error: 104 (Connection reset by peer)]
_jol_ has joined #ocaml
mikeX has joined #ocaml
<pango> actually you only need a stack for partial results, not for the "program"
<metaperl> pango: thanks for your help on my paste earlier this morning
mikeX_ has joined #ocaml
<Fallenou> wo
<Fallenou> doesn't work with camllight :o
<pango> is the "program" necessarily a string array ? again a string list could help
mikeX has quit [Nick collision from services.]
mikeX_ is now known as mikeX
<Fallenou> it could be a string array or a string list or a string with " " to separate
<zmdkrbou> then a string list is better : List.fold_left is the best function in the universe :)
<Fallenou> what does it do ?
<zmdkrbou> if applies a function on all the elements of a list, keeping a value that is modified on each call and passed to the next call ...
<zmdkrbou> (not very good explanation :s)
<zmdkrbou> but it's very powerful
<Fallenou> hum ok :o
<zmdkrbou> your teacher will explain you this better than me i think :)
<Fallenou> with my small knowledge i am happy that my fonction works :p
<Fallenou> i expect :p
<Fallenou> thank you very much
<zmdkrbou> np
<Fallenou> i have to go, my math book is calling me :p
<metaperl> I'm having problems with this "as" stmt... also I think my attempt to use not is going to fail as well... help needed: http://ocaml.pastebin.com/729744
finelemon has quit [Read error: 110 (Connection timed out)]
finelemon has joined #ocaml
love-pingoo has joined #ocaml
Fallenou has quit ["Quitte"]
<metaperl> I'm still having problems: could someone help me with this: http://ocaml.pastebin.com/729744
<Schmurtz> hum, pastebin.com seems to be down
<ketty> i can't load it either.... :/
<ketty> oh, now it loads :)
<ketty> tried ((v,s) as iv) ?
<Schmurtz> did you have a look at the ocamlgraph library ?
<Schmurtz> if possible, it's better to use an existing lib instead of rewriting a new one every time
<ketty> Schmurtz: writing new ones is educating :)
<Schmurtz> yes, but only for education
<Schmurtz> for a real project, it's better to use an existing one
<ketty> hm?
<pango> Schmurtz: check the comment at the beginning, it's an exercice of the o'reilly book
<Schmurtz> oops, I didn't read it
<Schmurtz> I thought it was metaperl's own code
<pango> it is, but it's not a "real project"
<metaperl> ok, here it is in completely plain old black and white... the questions I need help with: http://ocaml.metaperl.com/ora-book/graph.ml
<pango> you'll probably have type problems with [s] @ [s'']
<pango> if s'' is a list, [s''] will be a list of list
<ketty> ... i don't think you ever grow past the education stage, no matter how much real, important software you are writing =)
<pango> the extra [ ] are not neeed
<pango> s/neeed/needed/
<metaperl> oh good ppoint
<metaperl> but why is the "as" failing?
<ketty> metaperl: because you need parentesis..
<pango> add parenthesis ... ((v, s) as iv)
<metaperl> ketty: precisely how?
<metaperl> oh
<metaperl> ok
<pango> I'm not sure what are the priorities involved...
<metaperl> #
<metaperl> Ok, now I'm getting "This expression has type 'a * 'b -> bool but is here used with type bool"
<metaperl> for this List.filter (fun v -> not (find_vert iv)
<ketty> what is the type of find_vert?
Smerdyakov has joined #ocaml
<ketty> it looks like you are forgetting an argument...
<metaperl> I was trying to curry it
<ketty> you failed :)
<ketty> (again..)
<metaperl> :)
<metaperl> I dont take abuse very well
<ketty> same kind of example as last time..
<metaperl> even when joked about
<ketty> you remember the two solutions from last time?
<metaperl> no
<ketty> one solution is not to curry it...
<ketty> and one is to write a compose function..
<metaperl> why doesnt one ship with Ocaml?
<ketty> i don't know :)
<metaperl> a functional language without a compose?
<ketty> it is a one liner thou...
* zmdkrbou never need compose
<zmdkrbou> plus there's one in extlib
<pango> if you really want to make use of standard lib, you could check assoc lists (in List module)
<metaperl> we havent gotten there yet in the book
<metaperl> zmdkrbou: how do I use extlib?
<pango> association lists are just ('a * 'b) lists, but they're so common that they have their own name :)
<zmdkrbou> http://ocaml-lib.sourceforge.net/ << but i don't think you need extlib just for the compose function ...
* metaperl checks out assoc lists
<metaperl> ok, now my consing operation is giving me a type error... help needed: http://ocaml.metaperl.com/ora-book/graph.ml
<pango> both branches of the try/with (when an exception happens, and none does) must have the same type
<pango> (v, s @ s'') :: g' and (v,s) :: g don't have the same type, so something is wrong...
<metaperl> pango: that's what I don't see. How is the first one of this type: ('a * ('b * 'c list)) list
<metaperl> s @ s'' creates a list
<metaperl> (v, s @s'') is of type a' * b' list
<metaperl> and this tuple is cons'ed onto (a' b' list) list
<metaperl> and this tuple is cons'ed onto (a' * b' list) list
<metaperl> how could they not have the same type? I'm confused
<ketty> metaperl: does "(v, s)" and "(v, [s])" look different to you?
<ketty> :)
<metaperl> yes
<metaperl> but what is your point?
<ketty> we are talking about this right? http://ocaml.pastebin.com/729744
<pango> there's another problem, List.assoc returns the associated value, not the (key, associated value) pair
<metaperl> oh
<metaperl> ketty: no
<metaperl> I quit using pastebin
<ketty> ok :)
<Smerdyakov> metaperl is asking too many questions.
<metaperl> it wasnt serving fast enough
<ketty> yes.. it is slow :(
<metaperl> yes, that was the problem
<metaperl> the List.assoc usage
_jol_ has quit ["leaving"]
<metaperl> Ok, I'm not quite sure what they want on the next exercise. I have typed up a question here: http://ocaml.metaperl.com/ora-book/graph.ml
<Smerdyakov> You have a MS in CS and you don't know what the question is asking?
<pango> metaperl: you should check the definition of vertices and edges, because you already answered that question :)
<metaperl> hmm
<metaperl> insert_vtx inserted a vertex, but how could you insert a vertex... ah
<metaperl> you would just insert 1,[]
<metaperl> to insert a vertex
<metaperl> an edit would have that list non-empty I take it
<metaperl> does anyone know why this movie "The Davinci Code" is so popular?
<pango> recursivity is involved there too ;)
<metaperl> lol
<metaperl> how many of you French people actually think that France beat Brazil in World Cup 98?
<zmdkrbou> ...
<metaperl> I mean, as opposed to Brasil laying down because they were paid to lose?
<metaperl> Zidane is a great player and those were some great headers... but...
<metaperl> the more I hear and think about it, the less I believe that France won as much as I think that Brasil was paid to lose
<pango> is it explained in davinci code, too ?
<love-pingoo> lol
<metaperl> I hope I can still get IRC help from the French people here after this controversial statement
<zmdkrbou> i believe so :)
<metaperl> after all Thierry Henry is one of my favorite strikers
<zmdkrbou> metaperl: no problem, my opinion on the subject is something like ... "football sucks polar bears" :)
<love-pingoo> pango: if you look carefully at the position of the players on the field at some point of the match, the brazilians were drawing a large $
<metaperl> LOL
<love-pingoo> another chocking statement: I'm quitting OCaml, I'm going Erlang
<love-pingoo> that's not (yet) truc
<love-pingoo> -c+e
<zmdkrbou> love-pingoo: appfffffffffff
<Smerdyakov> love-pingoo, have you used Concurrent ML, in OCaml's Event module or elsewhere?
<love-pingoo> but I'm sick of Ocaml's problems with threads and signals
<Smerdyakov> I never use signals. Why do you care about them?
<love-pingoo> Unix.alarm uses a signal
<zmdkrbou> love-pingoo: as long as this is just for liq ...
<Smerdyakov> There are more idiomatic Concurrent ML ways to accomplish Unix.alarm's functionality; namely, the timeout event.
<love-pingoo> here's a simple thing I do: install a handler on siglarm, which does exit 2, then schedule an alarm in 20 seconds, then start downloading some file
<love-pingoo> and it works.. until some of these processes simply freezes
<Smerdyakov> Doesn't seem to be present in OCaml's Event, but it is in the "real" CML.
<love-pingoo> then I use a thread, which does (Thread.delay 20. ; exit 2)... same story
<Smerdyakov> love-pingoo, really, signals are garbage. Try CML..
<love-pingoo> Smerdyakov: I have difficulties believing that the Event module behaves better than a simple Thread.delay
<Smerdyakov> love-pingoo, I don't know. Since it doesn't have timeOutEvt, probably not. But if you switch to SML, I believe this would work perfectly.
<love-pingoo> at this point it's too late
<Smerdyakov> You simply create a compound event, waiting for one of the file download to finish or a timeOutEvt.
<love-pingoo> sml's threads are native ones ?
<Smerdyakov> No.
<Smerdyakov> It's an implementation issue, but the SML/NJ and MLton CML implementations both use lightweight user-level threads.
<love-pingoo> maybe Ocaml should, too, since its threads cannot really execute concurrently
<Smerdyakov> Everything that runs on UNIX should!
_jol_ has joined #ocaml
<Schmurtz> you may also use select from the Unix package
<love-pingoo> so, seriously, I might take a look at Erlang some day, at least that's an interesting success story
<love-pingoo> Schmurtz: Thread.delay is a call to Unix.select
<Schmurtz> strange
<love-pingoo> Schmurtz: indeed
<Smerdyakov> love-pingoo, Concurrent ML has everything that Erlang has, but with awesome additional features enabled by static typing.
<Schmurtz> select has nothing to do with threads
<love-pingoo> strange and sad and tiring :(
<love-pingoo> Smerdyakov: Erlang runs some real-world applications
<Smerdyakov> love-pingoo, so does SML..
<creichen> Smerdyakov: I disagree about user-level threads. Using user-level threads means that all of your execution will get stuck if one thread gets stuck in kernel space. They are a valid implementation choice, but not inherently superior to using, say, 'clone', where available.
<love-pingoo> Smerdyakov: with weird freezes such as the one I depicted, I'd say it's a bit tricky to get something running
<Smerdyakov> love-pingoo, what does that have to do with SML?
<love-pingoo> ah, sorry
<love-pingoo> Smerdyakov: any link to such applications ?
<love-pingoo> just curious..
<Smerdyakov> http://hcoop.net/ dynamic web sites and user-level management tools are all written by me in SML.
<love-pingoo> creichen: I was looking for some multithreaded stuff, servers and so on.. I'll look at hcoop
<zmdkrbou> theorem provers are not really relevant examples ...
<creichen> love-pingoo: Sorry, I thought you only wanted "real-world apps".
<Smerdyakov> zmdkrbou, I guess based on your definition of "real world"?
<Smerdyakov> zmdkrbou, big processor manufacturers do use computer theorem proving tools as part of their standard quality control procedures today.
<love-pingoo> Smerdyakov: sorry but that doesn't convince me.. is there a single daemon running for months and bearing heavy load written in SML ?
<Smerdyakov> love-pingoo, no
<dylan> or nifty applications like wyrd, unison, and ml-donkey? :)
<pango> what about Smerdyakov himself ? :)
<Smerdyakov> love-pingoo, I've done that before, though, but I don't know about measuring the heavyness of the load.
<love-pingoo> lol
<zmdkrbou> Smerdyakov: the problem is just that the people who code theorem provers are almost the same as those who design functional languages : all research people ...
<love-pingoo> Smerdyakov: actually I don't care about load, but I do want stability for months
<zmdkrbou> and it doesn't use much threads and stuff like this
<Smerdyakov> love-pingoo, I don't have any reason to doubt the stability of a daemon compiled with MLton.
<love-pingoo> btw, speaking mldonkey: the daemon is reloaded every 24 hours
<love-pingoo> they have a script to do that, they say it's safer..
<dylan> love-pingoo: for the love of... pingoo, why?
<pango> more because of memory usage than stability...
<love-pingoo> pango: is it so poorly coded that I has memory leaks in spite of the Gc ?
<smimou> ahahah years and years of research and you still end up with dirty hacks...
<zmdkrbou> :)
<pango> love-pingoo: the script is also not provided with mldonkey
<love-pingoo> yeah but it's in the debian installation
<pango> love-pingoo: debian provides year old version
<zmdkrbou> wouhou : fight!
<love-pingoo> I'd love to hear that it's not needed anymore
<love-pingoo> I'm not fighting, I just want my programming to be easier
<smimou> 2.7.3-2
<smimou> is that so old ?
<love-pingoo> 2.7.6 is on freshmeat today
<smimou> (2.7.3 = 19 Jan 2006)
<zmdkrbou> mmmh, no better on gentoo
<love-pingoo> wow they release more often than us :D
<pango> I can't really provide examples of high uptimes, I'm testing new patches all the time ;)
<pango> but current uptime is > 5 days, RSS 60MB...
<love-pingoo> ouch
<pango> that's a constant, it takes ~ 50MB after a few minutes
<love-pingoo> ok
<smimou> well firefox or thunderbird tend to take that much too
<pango> I remember upgrading the box from 256MB to 512MB few years ago because of serious leaks at the time... I can't say they're all gone, but it's now in "acceptable range" again ;)
<love-pingoo> hey, project idea: rewrite firefox in OCaml :)
<pango> then go on with openoffice ;)
<Smerdyakov> Then Pong !
chessguy has joined #ocaml
<love-pingoo> first, do we have a text editor ?
<love-pingoo> efuns is dead
<smimou> bed !
* zmdkrbou .oO(hem)
<pango> the problem is that you need some "critical mass" of devs and users for a projet to survive
<love-pingoo> there are enough OCaml developers..
<love-pingoo> haskell has the yi editor
<zmdkrbou> boarf, it depends on the project
<pango> language of implementation is not in the "top features list" of most users, so you must provide more than just the reimplementation of something that exists
<love-pingoo> pango: you're right actually
<love-pingoo> I was half kidding.. but I'm surprised nobody tried, except efuns
ketty has quit [Read error: 110 (Connection timed out)]
<pango> (mldonkey barely reaches the critical mass of devs btw)
V has joined #ocaml
<love-pingoo> does it really do more than other existing software
<love-pingoo> ?
Schmurtz has quit [Read error: 113 (No route to host)]
<mikeX> well it has nice core/frontend separation for one thing
<pango> yes... the multi users support that's in the making will probably be another unique feature
<pango> several clients now have multi networks supports, but it was a unique feature for some time, too
<love-pingoo> I'm not sure that's such an important feature
<love-pingoo> do you really use many networks at the same time ?
<pango> and its "unixish" touch (works as a daemon, as already mentionned; but also telnet interface with internal commands interpreter, hooks for calling external scripts...)
V has quit ["Kopete 0.11 : http://kopete.kde.org"]
Schmurtz has joined #ocaml
<mikeX> love-pingoo: I use 2
<pango> it has lots of other unique features, but most of the time they're referred as bugs ;)
_jol_ has quit ["co'o rodo"]
<pango> code is not in best possible shape, to be gentle... hands and brains are welcome (hint, hint ;) )
ketty has joined #ocaml
<love-pingoo> pango: busy getting mad at trying to finish something else
<pango> just in case someone wanted to show his/her ocaml skills...
Snark has quit [Read error: 110 (Connection timed out)]
<mikeX> hehe ;)
Revision17 has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
Snark has quit ["Leaving"]
Snark has joined #ocaml
shawn has quit [Connection timed out]
_shawn has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
atla^isn^nup is now known as damg
kral has joined #ocaml
damg is now known as atla^isn^damg^is
atla^isn^damg^is is now known as damg
damg__ has joined #ocaml
shawn has joined #ocaml
damg has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Yay, my ICFP paper was accepted. :)
<smimou> congratulations
<love-pingoo> title ?
<Smerdyakov> Modular Development of Certified Program Verifiers with a Proof Assistant
kral has quit ["Live fast, die young."]
mrpingoo has joined #ocaml
love-pingoo has quit [Read error: 110 (Connection timed out)]
smimram has joined #ocaml
damg__ has quit ["Over and Out"]
smimou has quit [Read error: 110 (Connection timed out)]
mrpingoo has quit [Read error: 110 (Connection timed out)]
<metaperl> hmm, finished the functional part of the ora text... now for the imperative? guess so... time to get tainted
<metaperl> another path would be to study the support for fp in the libraries
<ketty> or you could do some toy project to get a grip on what you have learnt...
<metaperl> yeah... converting most of my perl stuff will take oop
* metaperl steps into imperative land with some trepidation
<mikeX> oop could probably be avoided in many cases (relying on modules for certain stuff)
<metaperl> There's no risk of recursive calls blowing the stack on ths program because it is tail recursive right: http://ocaml.metaperl.com/ora-book/hilo.ml
<ketty> metaperl: yes, that's correct
<mikeX> your identation needs some work metaperl :P
* ketty don't find it so awful ^^
<mikeX> not awful but could be better :)
<mikeX> i see
mlh has quit ["leaving"]
<mikeX> hmm, what's that let () = stuff?
<mikeX> oh it's right above
mlh has joined #ocaml
<mikeX> hmm, still don't quite get it
<ketty> mikeX: let () = ... is used when you have something that evaluates to unit
<mikeX> isn't that like 'let _ = ...'?
<ketty> yes
<ketty> except it has to be unit
<ketty> while _ can be anything
<ketty> so it is more specific
<mikeX> oh ok, cause let () messes up the toplevel
<ketty> how?
<mikeX> # let () = print_string "hi";;
<mikeX> hi#
<mikeX> # let _ = print_string "hi";;
<mikeX> hi- : unit = ()
<mikeX> #
<ketty> where is the mess?
<mikeX> hmm, I must be missing something
<ketty> # let () = ();;
<ketty> # ();;
<ketty> - : unit = ()
<ketty> there is no "response" from the system in case of let () = ...
<mikeX> yes indeed
<mikeX> still I find it confusing (using () as an l-value)
<ketty> it is better than using _
<ketty> as type errors will be caught..
<mikeX> yes I understand that, what confuses me is the very notion that you can do it
<mikeX> (use it as an l-value)
<ketty> it is pattern matching...
<ketty> just like you can do: let (a, b) = ...
<ketty> or: let (hd::tl) = ...
<mikeX> i see
smimram has quit ["bli"]
<ketty> mikeX: you can even do: let 5 = 5;;
<mikeX> well that complains
<ketty> while: let 5 = 7 will result in a Match_failure
<mikeX> about the matching not being exhaustive
<ketty> yes it complains
<mikeX> (first thing I tried, and I actually used 5 )
<ketty> but it is just a warning
<ketty> it is not an error
<mikeX> i think it's starting to sink in
<ketty> :)
<mikeX> still Match_failure is a run time error
<ketty> yes
<ketty> and run time errors are evil
<ketty> that is why there is a warning :)
<mikeX> hehe
<creichen> mikeX: These things are normally used when you're in a hurry and you know parts of the structure you're going to expect. That structure being different means that something screwed up-- the Match exception (or whatever Ocaml calls it) is then akin to an assertion failure.
<mikeX> nice
<dylan> I usally write _ -> assert false or some such.
<creichen> Smerdyakov: Congratulations on your paper, by the way!