flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
jado has quit [Remote closed the connection]
Camarade_Tux has quit ["Leaving"]
onigiri has joined #ocaml
_zack has quit ["Leaving."]
gaze__ has joined #ocaml
<gaze__> what's the preferred way to write recursive list generating functions when I don't want the function exposed by the api to have to take an empty list?
<sanguinev> let exposed_func x y z =
<sanguinev> let inner_func x1 y1 z1 =
<sanguinev> ...
<sanguinev> in
<sanguinev> inner_func x y z [];;
<sanguinev> With recursive let and whatever else you need. ;)
onigiri has quit []
wsmith84 has joined #ocaml
<wsmith84> flux / mrvn: to answer your question from before...
<wsmith84> about tail recursion with only a cons as the last stmt
<wsmith84> wikipedia already has an entry
<wsmith84> Tail recursion modulo cons is a generalization of tail recursion introduced by David H. D. Warren. As the name suggests, the only operation needed after the recursive call is a cons, which adds a new element to the front of the list that was returned. The optimization moves this operation inside the recursive call by creating a list node with the front element, and passing a reference to this node as an argument.
<wsmith84> Voila.
aaronorosen1 has joined #ocaml
<aaronorosen1> Hey I'm new to ocaml. I'm trying to figure out how I load my ocaml file into ocaml. I have a file with some functions that I wrote called test.caml. How to i get ocaml to read that file in so that i can use those functions?
kmkaplan has joined #ocaml
seafood has quit []
prime2 has joined #ocaml
aaronorosen has joined #ocaml
aaronorosen1 has quit [Read error: 54 (Connection reset by peer)]
xevz_ has joined #ocaml
seafood has joined #ocaml
xevz has quit [Read error: 110 (Connection timed out)]
xevz_ is now known as xevz
jdh30 has joined #ocaml
<jdh30> anyone here committed code to the OCaml Forge?
jdh30 is now known as Guest66047
<thelema> Guest66047 yes
<thelema> I commit to the batteries project
<Guest66047> i have a really dumb problem with it: cannot checkout the repo because I get "Permission denied (publickey)"
<Guest66047> any idea why?
<Guest66047> i googled it and made some tweaks but no joy
<Guest66047> I'm trying to upload HLVM. :-)
<thelema> git?
<thelema> can you ssh to git.ocamlcore.org?
<Guest66047> svn
<thelema> your uploading account should have shell access (enough to test that ssh works)
<Guest66047> i tried ssh to svn.forge.ocamlcore.org from here and it fails with the same error
<Guest66047> Could this be because my new project has not gone through their system yet?
<thelema> okay, so now you need to fix your keypair. You've generated a keypair and uploaded the public half to the server?
<thelema> s/uploaded/submitted/
<Guest66047> no
<Guest66047> :-)
<thelema> it could be because whatever script that accepts that data doesn't ...
<Guest66047> where is that described?
<thelema> ah, you'll have to do that - I think they only do public key authentication.
<Guest66047> btw, I got an important looking e-mail in French from the Forge.
<Guest66047> ok
<Guest66047> i generated a key pair. How do you submit it?
coastermaster has quit []
<thelema> there is a cron job that updates the authorized_keys file, so give up to hour for it to work
<thelema> (of course you can read)
ched_ has joined #ocaml
<Guest66047> lovely. i think i'm all done. I'll just work on earning some money and get back to trying it. Thanks for all the help.
<thelema> you're welcome, jon
Ched has quit [Read error: 110 (Connection timed out)]
<Guest66047> Incidentally, if anyone here is interested in the HLVM project (and I've love people to take a look once its uploaded) please join the hlvm mailing list.
<thelema> Guest66047: there's only hlvm-commits - will conversation take place there?
<Guest66047> I've no idea.
<Guest66047> :-)
<Guest66047> Ok, I just added the ingeniously titled "hlvm-list" where you can discuss "anything and everything about the HLVM project". ;-)
<thelema> ok. If there's not a lot of commits, it may not be too bad to use that...
<thelema> but a separate one seems good to me.
<Guest66047> No, we'll use the other one. I'd like to keep them separate.
<Guest66047> yeah
<Guest66047> i have really high hopes for this project...
<thelema> ok. It doesn't seem to be activated yet, I'll try back in some minutes
prime2 has quit [Remote closed the connection]
alexyk has joined #ocaml
Guest66047 has left #ocaml []
alexyk has quit []
aaronorosen has quit [Remote closed the connection]
angerman has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
alexyk has joined #ocaml
jeremiah has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
seafood has quit []
jeremiah has joined #ocaml
wsmith84 has quit ["Leaving"]
wsmith84 has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
verte has quit [Read error: 60 (Operation timed out)]
angerman has quit []
verte has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
schme has joined #ocaml
coastermaster has joined #ocaml
jeremiah has joined #ocaml
Stefan_vK1 has joined #ocaml
seafood has joined #ocaml
seafood has left #ocaml []
jlouis_ has joined #ocaml
wsmith84 has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
Stefan_vK has quit [Read error: 110 (Connection timed out)]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
lintrippz has quit [Remote closed the connection]
sbok_ has joined #ocaml
sbok has quit [Read error: 113 (No route to host)]
jeremiah has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
angerman has joined #ocaml
Snark has joined #ocaml
itewsh has joined #ocaml
alexyk has quit []
angerman has quit []
coastermaster has quit []
_zack has joined #ocaml
Camarade_Tux has joined #ocaml
ttamttam has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
janshei has joined #ocaml
janshei has quit [Client Quit]
chickenzilla has joined #ocaml
chickenzilla has quit [Client Quit]
chickenzilla has joined #ocaml
Alpounet has joined #ocaml
chickenzilla` has joined #ocaml
arquebus has joined #ocaml
<mrvn> What is hlvm?
<Alpounet> a toolkit for developing virtual machines for dynamic languages
<Camarade_Tux> basically, JIT for ocaml
<Alpounet> :p
<Camarade_Tux> hey, we'd better tell Jon Harrop the hlvm name is already used :p
<mfp> is there any batteries extension for UChar values comparable to that for UTF8 strings? (u"Some UTF8 text")
chickenzilla has quit [Read error: 110 (Connection timed out)]
chickenzilla` is now known as chickenzilla
arquebus has left #ocaml []
chickenzilla` has joined #ocaml
chickenzilla has quit [Nick collision from services.]
chickenzilla` is now known as chickenzilla
Alpounet has quit [Read error: 60 (Operation timed out)]
xevz has quit [":wq"]
xevz has joined #ocaml
Alpounet has joined #ocaml
seafood has quit []
Yoric[DT] has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
seafood has quit [Client Quit]
jeremiah has joined #ocaml
Camarade_Tux has quit ["Leaving"]
rwmjones has joined #ocaml
hkBst has joined #ocaml
gaze__ has quit []
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
bacam has joined #ocaml
slash_ has joined #ocaml
verte has quit ["http://coyotos.org/"]
ttamttam has left #ocaml []
<thelema> mfp what do you want to do with a uchar?
<mfp> I was just writing the Rope.make benchmark and wondered if there was a shorthand for Rope.make n (UChar.of_char 'a')
<mfp> c'a' or such
<thelema> you want a singleton rope?
<mfp> no, I just happened to need a UChar for that trivial bm
<thelema> bm? in any case, there is Rope.of_uchar and Rope.of_char
rjones has joined #ocaml
<mfp> (benchmark)
rwmjones has quit ["Closed connection"]
rjones is now known as rwmjones__
<mfp> (the point being to benchmark Rope.make specifically, not to use some other function)
<thelema> ok.
<mfp> as you say, no big deal, as UChar literals should be rare
<mfp> esp. since only chars present in iso_8859-1 could be allowed anyway
<itewsh> à tout à l'heure
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
<thelema> mfp: only bytes present in iso_8859-1, but one can make any unicode string one wants using those bytes
<rwmjones__> it's quite amusing how the letter that Tim Rentsch points to doesn't support his point of view at all
<mfp> thelema: strings yes, but not _chars_; you have to use the code point or take a detour through a string literal, then get the 1st char
angerman has joined #ocaml
_zack has quit ["Leaving."]
<thelema> rwmjones_: I've fallen behind in the OCaml Book Soap Opera. I've been waiting for Tim's response...
<Yoric[DT]> :)
<thelema> mfp: what would an arbitrary unicode character look like in a .ml file? it'd have to be represented as a sequence of bytes, no?
<mfp> huh UTF8.get u"\342\202\254" 1 = UChar.chr 0x20AC
<mfp> = uc"\342\202\254" ?
<mfp> oops get u"" 0 of course
<thelema> \342?
<thelema> octal?
<mfp> heh pa_utf8 to escape chars in literals from a UTF-8 source file (so "€" in UTF-8 becomes uc"\342\202\254" or such)
<mfp> yes, octal
<thelema> rwmjones_: yes, the whole problem comes down to misunderstanding "based on joint work he did with me" to mean "you can take that part of what we wrote and make a book out of it.
<mfp> bad ex, should have been uc"\226\130\172"
<thelema> mfp: grr, I wonder if we can fix that in batteries... sadly, I think we'd break backwards compatibility, but there's no reason to default to octal escapes.
<mfp> thelema: it was just a c/p error, OCaml does use decimal
<mfp> or hex with \xAB
authentic has quit [Read error: 60 (Operation timed out)]
^authentic has joined #ocaml
^authentic is now known as authentic
* thelema relaxes - octal looks like decimal but isn't. *dangerous*
<Yoric[DT]> :)
<thelema> Yoric[DT]: how's the .dist to .mli coming
<Yoric[DT]> Slowly.
<Yoric[DT]> I'm currently putting together the skeletton.
<Yoric[DT]> But the .mli parsing part is going to be a good time to bang my head on the walls.
<thelema> yes, that'll be less fun than desired
<thelema> maybe it'll be sufficient to count ... ick. sig ... end -- you'll have to count levels for everything that ends with [end]
<Yoric[DT]> and which doesn't happen in a comment
<Yoric[DT]> and without the help of lex, yacc, Genlex, stream parsers, etc.
<thelema> wait, it's mli. they don't have any of that stuff.
<Yoric[DT]> What stuff?
<thelema> what about /^\s{2*indent_level}end$/
* Yoric[DT] doesn't understand what you mean.
<thelema> the other stuff that ends in [end] -- begin..end, struct..end
<Yoric[DT]> Ah, ok.
<thelema> the stuff you're mentioning, they do have, sorry...
<Yoric[DT]> Yeah, there's only sig..end. And comments :/
<thelema> so require an indent of 2 spaces per nesting level, so if you want to find the [end] for a toplevel module inside foo.ml (ex: Foo.Bar), just find the first [end] with 0 spaces before it (after [module Bar], of course)
<Yoric[DT]> Too fragile for my tastes.
<thelema> and for Foo.Bar.Baz, the first [end] with 2 spaces before it (or whatever specific whitespace will come.
<thelema> okay, how about requiring: [end (* Bar *)] -- comment tags on the end of the module
<thelema> some languages encourage this for code clarity anyway.
<Yoric[DT]> Mmmmh....
<Yoric[DT]> That's a good idea.
<thelema> when faced wih a hard problem and not the right tools to solve the problem... redefine the problem.
alexyk has joined #ocaml
ulfdoz has quit [Read error: 104 (Connection reset by peer)]
rwmjones__ is now known as rwmjones
ulfdoz has joined #ocaml
mfp_ has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> Well, I believe that the skeleton is complete.
<Yoric[DT]> Now, on to implementing all the functions...
wsmith84 has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
<thelema> Yoric[DT]: yay top-down programming
<Yoric[DT]> :)
<wsmith84> 'morning
<wsmith84> Just wondering this morning, if there is a yearly OCaml users conference somewhere?
<wsmith84> (Google doesn't yield a website, but there is mention of one on CWN.)
<Yoric[DT]> There's a OCaml users meeting.
<wsmith84> Where/when?
<Yoric[DT]> Not quite a conference (i.e. no papers).
<Yoric[DT]> Last month.
<Yoric[DT]> This year, it was in Grenoble, France.
<Yoric[DT]> Last year, it was in Paris, France.
<Yoric[DT]> (and that was the first such meeting)
<wsmith84> Do you have a website? How many persons attend?
<wsmith84> Any industry people?
<bacam> There's also the ML workshop, and the Commercial Users of Functional Programming workshop.
<Yoric[DT]> There were industry people (the main organiser is an "industry people") but I couldn't tell you how many.
ehird has left #ocaml []
<wsmith84> Thank you David.
<wsmith84> I assume some of it must be carried out in la langue de Moliere...
<Yoric[DT]> Well, all the talks were given in English.
<Yoric[DT]> But most of the chatting was done in French.
jeremiah has joined #ocaml
<Yoric[DT]> You'll find a few of our faces :)
* Yoric[DT] looks like a mad scientist.
* Yoric[DT] probably is a mad scientist, come to think of it.
^authentic has joined #ocaml
kaustuv has quit [Read error: 113 (No route to host)]
<wsmith84> rjones: was already there :-)
<wsmith84> DT wrt french: I guess if you can learn all these fancy computer languages, you can learn french too haha ;-)
alexyk has quit []
authentic has quit [Connection timed out]
^authentic is now known as authentic
<Yoric[DT]> :)
_zack has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
Alpounet has quit [Read error: 60 (Operation timed out)]
wsmith84 has quit [Read error: 110 (Connection timed out)]
jeremiah has joined #ocaml
<thelema> now to find out if what it looks like merging from a 3rd party repo into batteries git
* thelema guesses that git pushed the needed patches to ocamlcore
coastermaster has joined #ocaml
jeddhaberstro has joined #ocaml
rwmjones has left #ocaml []
rwmjones_ is now known as rwmjones
jeremiah has quit [Read error: 104 (Connection reset by peer)]
rjones has joined #ocaml
rjones is now known as rwmjones_lptp
Alpounet has joined #ocaml
<mrvn> Can somebody tell me why this segfaults in the callback?
<mrvn> in 0x00000000004072f4 in caml_apply3 ()
angerman has quit []
<thelema> hmm, apply3... is for functions wit 3 args, no?
<thelema> you're using callbackN with 5 ...
<mrvn> I'm assuming it is first applying 3 and then the remaining 2.
jeremiah has joined #ocaml
jeremiah has quit [Connection reset by peer]
wsmith84 has joined #ocaml
prime2 has joined #ocaml
imajes has joined #ocaml
jeremiah has joined #ocaml
authentic has quit [Read error: 60 (Operation timed out)]
imajes is now known as authentic
itewsh has joined #ocaml
jeremiah has quit [Connection reset by peer]
vuln has joined #ocaml
imajes has joined #ocaml
_zack has quit ["Leaving."]
jeremiah has joined #ocaml
authentic has quit [Read error: 113 (No route to host)]
imajes is now known as authentic
alexyk has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
coastermaster has quit []
Amorphous has quit [Connection timed out]
Amorphous has joined #ocaml
love-pingoo has joined #ocaml
jeremiah has joined #ocaml
sitaktif has quit [calvino.freenode.net irc.freenode.net]
petchema has quit [calvino.freenode.net irc.freenode.net]
caligula__ has quit [calvino.freenode.net irc.freenode.net]
TaXules has quit [calvino.freenode.net irc.freenode.net]
svenl_ has quit [calvino.freenode.net irc.freenode.net]
caligula__ has joined #ocaml
svenl_ has joined #ocaml
sitaktif has joined #ocaml
petchema has joined #ocaml
TaXules has joined #ocaml
vuln has quit ["leaving"]
<mrvn> Args. I found the bug. I didn't even set the callback and the detection that it is unset is broken.
<kmkaplan> Is there any easy way to work on IPv4 and IPv6 addresses?
rwmjones is now known as rwmjones_afk
arquebus has joined #ocaml
vuln has joined #ocaml
<vuln> Hello there. Why the toptool keeps waiting for something when I try to create a variable with a name started by #? (I know it's invalid constructor, but I would like to know it keeps waiting instead of give me a warning)
<vuln> why it keeps*
<mrvn> kmkaplan: Unix module?
<mrvn> vuln: no ;; to start evaluation?
Snark has quit ["Ex-Chat"]
prime2 has quit [Read error: 60 (Operation timed out)]
<kmkaplan> I looked in it and some things are usefule. But I want to transform a IPv4 address to IPv4-mapped IPv6 address.
<vuln> mrvn: I wrote ;; :)
<vuln> no, I didn't
<vuln> god sake kkk
<kmkaplan> And also check if an IPv6 address is a IPv4-mapped address.
<mrvn> # let #foo = 17;;
<mrvn> Error: Unbound type constructor foo
<vuln> Thanks mrvn. I can't believe I forgot it.. I was testing more than 20 ways of name a variable, and I forgot the ;; exactly at this one
alexyk has quit []
<vuln> Thank you and sorry
alexyk has joined #ocaml
ggole has joined #ocaml
<kmkaplan> Is it possible to get the address as a raw Int32 or big_int?
alexyk has quit [Client Quit]
<ggole> Hi. Is there any way to persuade ocamlc to use stdin and stdout instead of filenames? I'm trying to use the output of ocamlc -dtypes and piping the data around would be more convenient.
<kmkaplan> ggole: outputing to /proc/self/fd/1 does not work ?
<ggole> Dunno, I'll try that.
<love-pingoo> there's also /dev/stdout
<ggole> ocamlc doesn't seem to like those, since they don't end with .ml
<ggole> The filename magic is useful most of the time, but I think it's going to sink me on this
<ggole> Oh wait, -impl
<ggole> Brilliant
<kmkaplan> Mmm, if it's only a file naming problem you could try adding symlinks to them.
<ggole> -impl and /dev/stdin does the job. Thanks.
Camarade_Tux has joined #ocaml
schme is now known as schmx
gaze__ has joined #ocaml
wsmith84 has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
vuln has quit ["leaving"]
rwmjones_afk is now known as rwmjones
smimou has quit [Read error: 110 (Connection timed out)]
jedai has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
chickenzilla` has joined #ocaml
chickenzilla has quit [Nick collision from services.]
chickenzilla` is now known as chickenzilla
arquebus has left #ocaml []
_zack has joined #ocaml
alexyk has quit []
seafood has joined #ocaml
<Yoric[DT]> thelema: after checking, it seems that I can't use Str in myocamlbuild.ml ...
* Yoric[DT] now knows why he didn't address that bug earlier.
<Yoric[DT]> It's messy.
<thelema> :(
<thelema> so we just need some code to do global string replacement? I can work on that.
<Yoric[DT]> Well, if you could write this, that would save me a few implementation headaches and let me concentrate on, well, other implementation headaches :)
* thelema will do this.
dartelin has joined #ocaml
<dartelin> hello
<dartelin> i'm new to ocaml, so my question may be noobish, but here's my problem
<dartelin> let sumOfLengths listOfLists = List.length (List.hd listOfLists);;
<Yoric[DT]> welcome dartelin
<dartelin> when i call this function
<dartelin> sumOfLengths [[1; 2; 3]; [1; 2]; [1]];;
<dartelin> it returns my a null, i mean no result
<dartelin> what could be wrong ?
<Yoric[DT]> That sounds quite unlikely.
<thelema> should return 3
<Yoric[DT]> Works for me.
<dartelin> hmm, strange
<thelema> and what it does doesn't match the name - it just returns the length of the first sub-list
<Yoric[DT]> (although the function probably doesn't do what you want it to do, but that's a different issue)
<Yoric[DT]> How are you testing?
<dartelin> it's an excersize, i have to sum the lenghts of sublists
<dartelin> i want to do it with a recursive function
<dartelin> but this one was a test function
<Yoric[DT]> First things, first: how are you testing?
<dartelin> i'm learning the basics
<dartelin> xemacs
<dartelin> and tuareg
<Yoric[DT]> Ok, that's for typing.
<ggole> dartelin: were you asked to use recursion? This would usually be a left fold
<Yoric[DT]> Now for testing?
<Yoric[DT]> ggole: looks to me like left fold will appear in a further exercise.
<dartelin> i wasn't asked to use recursion, it's my idea to use it
<ggole> Yeah, I guess so
<ggole> dartelin: then I suggest you write both
<Yoric[DT]> Still, for the moment, the first issue appears to be testing.
<Yoric[DT]> So, dartelin, could you summarize how you test this?
<dartelin> i write the code, and choose Tuareg -> Interactive mode -> Evaluate phrase
<Yoric[DT]> And what happens?
<dartelin> here's the output
<ggole> (that's probably easier with C-x C-e, btw)
<dartelin> # let sumOfLengths listOfLists = List.length (List.hd listOfLists);;
<dartelin> val sumOfLengths : 'a list list -> int = <fun>
<dartelin> #
<Yoric[DT]> (so far, so good)
<Yoric[DT]> Now, you have tested that your function compiles.
<Yoric[DT]> You haven't actually tested your function.
<Yoric[DT]> (yet)
<dartelin> hmm, i don't get it, do i have to compile it every time ?
<dartelin> i thought the Evaluate phrase option does it for me
<Yoric[DT]> Well, it compiles the function.
<dartelin> i wrote some code before and it worked perfectly
<Yoric[DT]> But you haven't used the function yet.
m3ga has joined #ocaml
<dartelin> hmm, here's the complete code
<dartelin> let sumOfLengths listOfLists = List.length (List.hd listOfLists);;
<dartelin> sumOfLengths [[1; 2; 3]; [1; 2]; [1]];;
<Yoric[DT]> And what's the complete output?
<Yoric[DT]> Ah, I believe I understand your problem.
<ggole> dartelin: evaluate phrase is probably only grabbing the first part of that
<Yoric[DT]> "Evaluate phrase" only evaluates until the first ;;
<Yoric[DT]> So sumOfLengths [[1; 2; 3]; [1; 2]; [1]];; is another phrase.
<Yoric[DT]> You have to do Evaluate phrase again to execute it.
<dartelin> sure
<dartelin> i get it now
<dartelin> i have to select the phrase
<dartelin> and then evaluate
<dartelin> me is stupid
<Yoric[DT]> (and, as suggested by ggole, although with the wrong keys, you should do it with the keyboard, it's faster)
<dartelin> yes, but tell me one thing
<Yoric[DT]> C-c C-e to evaluate phrase
<ggole> You could also send the whole buffer, but that's usually overkill
<dartelin> which one is the Meta-key ?
<Yoric[DT]> (C is "control")
<ggole> Usually alt
<Yoric[DT]> Typically, the Windows key.
<Yoric[DT]> Arf, depends on your keyboard :)
<schmx> BAH!
<schmx> Left foot pedal.
<ggole> Well, meta as intepreted by emacs is usually alt
<Yoric[DT]> (usually not the same for laptops and desktops anyway)
* schmx goes back to idle.
<Yoric[DT]> :)
<dartelin> clrl+alt worked
<dartelin> thanks for your help
<ggole> schmx: every now an then I think about getting one of those
<ggole> Tell me, are they worthwhile?
<Yoric[DT]> Our pleasure.
<schmx> ggole: I think it's very hmm... how one says. different from person to person. I very much like 'em (:
<ggole> Hmm
<ggole> I should try one
<ggole> I type enough :)
<schmx> I recommend the whole kinesis setup with the 3 foot pedals and fancy keyboard.
<schmx> But I dunno.. They're only useful if one sits in a "correct" posture while hacking/typing. (:
* schmx goes back to idle again :P
<Yoric[DT]> Gasp, a new compilation problem has appeared.
<Yoric[DT]> Mmmmhh...
* Camarade_Tux wouldn't be able to use both his hands and feet at the same time ><
<dartelin> ok, this code works for me but i don't think it's the optimal solution: # let sumOfLengths listOfLists = List.length (List.hd listOfLists);;
<dartelin> val sumOfLengths : 'a list list -> int = <fun>
<dartelin> # can anyone tell me how to do it better ?
<dartelin> wait, wrong code
<dartelin> let rec sumOfLengths listOfLists = List.length (List.hd listOfLists) + if(List.length listOfLists) > 1 then sumOfLengths (List.tl listOfLists) else 0;;
<Camarade_Tux> dartelin, do you know the 'match ... with' construct ?
<ggole> dartelin: you should probably use pattern matching instead of calls to List.hd
smimou has quit [Read error: 110 (Connection timed out)]
* Yoric[DT] concurs.
<ggole> dartelin: are you working from a text?
<dartelin> Camarade_Tux, not yet
<dartelin> ggole, what do you mean text ?
<ggole> From a document or book that describes ocaml
<dartelin> yes, i have a tutorial
<ggole> I see. I won't try to second guess it.
<dartelin> but i try to find a solution based on my knowlege about other languages
<dartelin> imperative
<dartelin> like iterating through a list
<ggole> Imperative code is occasionally the right thing, but not in this case imho
<ggole> But follow your tutorial.
hkBst has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> In that case, you will rather "fold" through the list rather than "iterate" through it, although it's the same general idea.
<Yoric[DT]> Well, seems I've broken myocamlbuild.ml .
<Yoric[DT]> I'll try and fix this tomorrow evening.
<Yoric[DT]> Cheers.
<Yoric[DT]> (and no, it's not pushed)
Yoric[DT] has quit ["Ex-Chat"]