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/
jcreigh has quit ["Do androids dream of electric sheep?"]
cyyoung has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Read error: 110 (Connection timed out)]
smimou has quit ["bli"]
chessguy has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
chessguy has quit [Connection timed out]
gim__ has quit []
metaperl has quit ["KVIrc 3.2.1 Anomalies http://www.kvirc.net/"]
love-pingoo has joined #ocaml
menace has joined #ocaml
menace has quit ["Leaving"]
dylan has quit ["brb"]
dylan has joined #ocaml
jcreigh has joined #ocaml
mikeX has quit ["zzz"]
ski has quit [Read error: 104 (Connection reset by peer)]
ski has joined #ocaml
jcreigh has quit ["Do androids dream of electric sheep?"]
mld has quit [Remote closed the connection]
ketty has quit [Read error: 110 (Connection timed out)]
<dylan> mm, gnu screen's hardstatus feature -- how did I live without it?
<dylan> I wonder if there is an IMAP library for ocaml.
ketty has joined #ocaml
<love-pingoo> Hi need to write a server which accepts many clients but runs in a single thread, using select and so on.. I'm wondering if I really have to write it or if some generic scheduler already exists for such stuff
bohanlon has joined #ocaml
khaladan has joined #ocaml
Smerdyakov has quit ["Leaving"]
<love-pingoo> hey that was easy to write, cool
love-pingoo has quit ["Connection reset by by pear"]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
<flux__> ;0
<flux__> hm, I mean ":)"
pango is now known as pangoafk
pangoafk is now known as pango
ramkrsna has joined #ocaml
Snark has joined #ocaml
Tachyon76 has joined #ocaml
_JusSx_ has joined #ocaml
alcojol has joined #ocaml
<alcojol> hi, anyone knows about a tool to use contract by design in OCaml?
<flux__> I remembered there is (atleast) one, google:dbc ocaml found it at http://raevnos.pennmush.org/code/dbc/index.html
<flux__> I haven't tried it though
<flux__> and apparently it is not very recently updatecd
<flux__> maybe it works, may it doesn't, let us know :-)
<alcojol> oh yes, I know it
<alcojol> but It's too simple
<alcojol> ;/
<alcojol> I was looking for one like JML, more complex, with forall, exists quantifiers, etc
<flux__> sounds somewhat advanced. port/reimplement it to ocaml?-)
<alcojol> ;P
<alcojol> I will try to do one if I can't find it
<alcojol> Camlp4 looks very good
<flux__> camlp4 is something I've been intending to dig into myself, for some time already, but.. maybe now that I have some time off the work I'll do it. or not :)
<alcojol> :P
<alcojol> I was surprised when I knew the possibilities that it gives
<alcojol> well, Ocaml surprised me too
Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Boojum is now known as Snark
damg has joined #ocaml
* ketty belives the type checking and lack of null in ocaml takes care of much of the mess you have to deal with in java....
<damg> thanks for motivating me, ketty, I came from java to ocaml and haskell yesterday *learning it* :)
<ketty> :)
<alcojol> ;D
creichen has joined #ocaml
<creichen> Hi! Is there a paper that discusses the O'Caml type system? And if so, what's the name of the paper, or where can I find it?
<ketty> creichen: what about the ocaml manual? :)
<pango> it's not clear what you're looking for, if you look for papers check http://caml.inria.fr/about/papers.en.html
<ski> http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html (see '3.13 Functional objects' and '3.16 Binary methods')
<creichen> Thanks, everyone!
<damg> btw, im learning right now with help of the ocaml book. Did anything change since Pentium 350 times ? ^^
<ketty> yes :)
<damg> what were the massive language changes then?
<damg> thanks
<ketty> probably other thins too :)
<ketty> s/thins/things
<ketty> there is allways the changelog
<ketty> :)
Tachyon76 has quit [Remote closed the connection]
ulfdoz has quit [Read error: 54 (Connection reset by peer)]
ulfdoz has joined #ocaml
julbouln has quit []
finelemo1 has joined #ocaml
love-pingoo has joined #ocaml
love-pingoo has quit [Client Quit]
love-pingoo has joined #ocaml
finelemon has quit [Read error: 110 (Connection timed out)]
julbouln has joined #ocaml
woggle has joined #ocaml
metaperl has joined #ocaml
Smerdyakov has joined #ocaml
_jol_ has joined #ocaml
vincenz is now known as raf256_g
raf256_g is now known as vincenz
shawn has joined #ocaml
_JusSx_ has quit ["leaving"]
_JusSx_ has joined #ocaml
Tachyon76 has joined #ocaml
Tachyon76 has quit ["Leaving"]
piggybox has joined #ocaml
<_jol_> hello, does anyone know if there is something similar to the python's triple-quotes or lua's [[...]] in ocaml ?
<Smerdyakov> What are they?
* _jol_ searching for an example...
<Smerdyakov> You don't know what they do well enough to manufacture an example on the spot?
<_jol_> it allows you to quote long strings without \n
<love-pingoo> _jol_: they're allowed in ocaml
<love-pingoo> python doesn't allow it probably because of its newline sensitiveness
<_jol_> love-pingoo: can you give me an example ?
<Smerdyakov> "Hello
<Smerdyakov> world"
<_jol_> cool
<_jol_> thanks a lot !
<pango> and "Hello\
<pango> World" if you didn't mean the \n
<_jol_> ok :)
<love-pingoo> python really has a weird parser
<love-pingoo> but guido would probably say that multiline strings are more readable :p
shawn has quit [Read error: 104 (Connection reset by peer)]
_jol_ has quit ["leaving"]
shawn has joined #ocaml
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
pango is now known as pangoafk
<metaperl> I'd appreciate some help with a very simple let call: http://ocaml.metaperl.com/ora-book/tmp/lfl.ml
<dylan> you either need an ;; or do let _ = myfunc acc
pangoafk is now known as pango
ketty has quit [Read error: 104 (Connection reset by peer)]
<metaperl> oh, how do I know when to use ;;
<metaperl> plus that is not where the error lies
<metaperl> it is in chars 0-6
ketty has joined #ocaml
<metaperl> I typed up a question from lines 9-13 here: http://ocaml.pastebin.com/728540 ... I dont understand the typing of this List.fold_left
<pango> # List.fold_left ;;
<pango> - : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a = <fun>
<pango> here 'a = string list, 'b = string
pfharlock has joined #ocaml
alcojol has quit ["KVIrc 3.2.0 'Realia'"]
Snark has quit ["Leaving"]
pfharlock has quit ["Leaving"]
Schmurtz has quit ["2"]
Schmurtz has joined #ocaml
damg has quit [Read error: 110 (Connection timed out)]
damg has joined #ocaml
stockholm has joined #ocaml
<stockholm> Hello, I'm trying to use lablglut with threads, and am having some difficulty. I have one thread which outputs some text to standard error, and another thread which runs the glutmainloop. However, once the glutmainloop thread starts up, the other thread stops outputting its text. I've tried quite a few things to get this working, but cannot come up with anything. Does anyone have any suggestions? Thanks for your time.
<smimou> did you flush stdout ?
<smimou> (try flush_all ())
<metaperl> pango: I reworked the base call of select_v1 to make it more like I think. I used filter and map instead of a fold: http://ocaml.pastebin.com/728857 ... now I want to replace the inner fold_left with a map as well... that's my next step
<pango> metaperl: yes, the first one can be rewritten with map (I used to have the two cases handled by a single List.fold_left)
<metaperl> I'm thinking the inner fold in the non-base case can also be rewritten with map.. no?
<pango> metaperl: I don't think it's possible (or at least beneficial) to rewrite the other with a map ;)
<metaperl> no, not the outer fold_left.. the inner one
<pango> then you'll have to append the resulting lists
<metaperl> oh yes: acc @ (List.map .... ) ;;
<pango> that's less efficient
<pango> l1 @ l2 complexity is O(List.length l1)
<metaperl> whereas consing is O(1)
<pango> yes
<metaperl> Do you live in France pango?
<pango> yes
<metaperl> are you a student?
<pango> no
<metaperl> what do you do for a living?
<pango> I work for a VAR (value added reseller)
<metaperl> do you program in OCaml there? or are you a salesman?
<pango> so I develop from time to time, but it's not the core of my work
<pango> no, I'm a tech
<metaperl> oh a support technician?
<Smerdyakov> metaperl's job is changing jobs. ;)
<metaperl> heh
<metaperl> I just got fired here in Las Vegas
<metaperl> 2 months here
<metaperl> 3 months before that in El Segundo, CA
<metaperl> hard luck metaperl :)
<metaperl> I really should return to academic studies
<Smerdyakov> Why?
<pango> something like that... Haven't used ocaml for job yet (well, wrote code, but stopped because of problems with Linux vfat... don't ask ;) )
<metaperl> I stayed in school for 11 years after undergrad with no problem
<Smerdyakov> WTF did you do for 11 years?
<metaperl> wait a minute
<metaperl> 4 undergrad 2.5 first MS (compsci) 5 years second MS (neurocomputation)
<metaperl> 11 including undergrad
<Smerdyakov> Thought so
<metaperl> I think I'd have to goto Europe to work on functional programming
<Smerdyakov> You don't even have the knowledge to do functional programming yet..
<metaperl> no but I have the drive
<Smerdyakov> If you want to be an employee, then you need a network of social connections to get attractive jobs, and you don't seem to have one.
<metaperl> Smerdyakov: all you need is a recruiter to find you on dice, net-temps or monster... it's worked for 6 years
<zmdkrbou> (and you don't use much functional programming outside of the research area in europe)
<Smerdyakov> metaperl, and you keep getting fired!
<metaperl> pango: thanks for not writing that as one big fold_left. It would've been harder for me to understand
<metaperl> Smerdyakov: I have learned a lot about my personality and what works for me in a job... I havent been continually fired... jobs end for different reasons
<metaperl> I work best alone or in a lead role
<metaperl> I am not a good teamwork person in general
<metaperl> though I think I would do well around other functional programmers. That Jane Street Ocaml job keeps flashing before my eyes
<pango> metaperl: It was mainly for sake of performance (not checking len = 1 for each iteration)
<Smerdyakov> I'm sure you know by now that I have a low opinion of Perl, and, if that's all you can demonstrate proficiency with, I'd certainly not want you working on code, even in a lead role.
<metaperl> I have a low opinion of Perl 6 - that's why I spent the last year banging my head against Haskell
<Smerdyakov> So far, you've been all talk on using anything besides Perl.
<metaperl> Ocaml works better for me... it is quite Perlish but much faster... but it retains the pragmatism but with much more robust type checking... not as pure as haskell, but I don't have time and intelligence for that much mathematical purity
<metaperl> plus I'd take Clean over Haskell anyday
<pango> (and readability too: make more obvious that they were two really different cases)
<metaperl> How would you express the graph 1 -> 2 -> 3 with the graph type they show here: http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora020.html#toc30
<pango> [([(1, [2]); (2, [3])] I think
<metaperl> ah
_JusSx_ has quit [Read error: 104 (Connection reset by peer)]
<metaperl> I have 2 questions on directed graph representation typed up in my source code here : http://ocaml.pastebin.com/728921 ... any help is appreciated
stockholm has quit ["Leaving"]
multani has quit ["Parti"]
<smimou> metaperl: you can force the type by using (value:type)
<smimou> for example ([]:int list)
<smimou> but it won't change anything if you don't hide the implementation of the type
<smimou> (via a module)
<smimou> metaperl: for the second one, the ;; are responsible I guess
<smimou> the try does not have a with since ;; stops the parsing
jcreigh has joined #ocaml
<metaperl> smimou: thanks
jcreigh has quit ["Do androids dream of electric sheep?"]