smimou changed the topic of #ocaml to: OCaml 3.08.3 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/
Smerdyakov has quit []
smimou has quit ["?"]
mlh_ has joined #ocaml
CosmicRay has joined #ocaml
CosmicRay has quit ["Client exiting"]
vezenchio has quit ["Ayn Rand encapsulates the rage that every teenager feels on finding that his first paycheque has had taxes taken out of it"]
cjohnson has quit [""We live like penguins in the desert...""]
Smerdyakov has joined #ocaml
xcar has quit [Read error: 60 (Operation timed out)]
tautologico has joined #ocaml
Sonarman has joined #ocaml
CosmicRay has joined #ocaml
<araujo> Hello cognominal
<araujo> Hello CosmicRay
<araujo> :-)
<Smerdyakov> Hello araujo
<araujo> Hello Smerdyakov
<araujo> What's up?
<Smerdyakov> I'm sitting here chatting on IRC. How about you?
<araujo> Same here, nothing much really :-)
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
* araujo will probably take a look at an O'caml code and then goes to bed
<CosmicRay> hello araujo
<tautologico> nobody asked
<tautologico> but I just finished rewriting a nightmarish C program in OCaml
<tautologico> still a bit pesky though, it's a fairly imperative program
<araujo> tautologico, what is it?
<araujo> CosmicRay, heya buddy, you also an ocaml guru? :-)
<tautologico> a simple implementation of a Turner machine for graph reduction
<tautologico> it's actually to test garbage collecting schemes
<CosmicRay> araujo: more haskell these days :-)
<araujo> CosmicRay, :-)
<Smerdyakov> tautologico, is it for your thesis?
<tautologico> Smerdyakov, it's very possible that it will end on my thesis
<tautologico> part of it at least
<tautologico> I've got to find a way to include dependent types on my thesis though :)
<araujo> Hey guys, one question
<araujo> Im writting a small socket appli, just more an example than a real program,
<araujo> Is it good to use the high level network connection functions?
<Smerdyakov> It's always good to use high-level abstractions! Duh! :D
<tautologico> well, what could be bad about it ?
<araujo> Or should i go using the old-school-fashion , Unix.socket , Unix.accept ... functions?
<tautologico> once I didn't use the high level functions because they were broken on windows and I was testing on that... but otherwise just use the high level
<araujo> Good.
<araujo> I just ask, because it's my first socket program in ocaml, and they seem pretty easy to use, and im usually afraid of easy things :-)
<araujo> tautologico, not bad, but to know if it lacks some important feature , they have looked pretty smart to me so far...
<Smerdyakov> The SML Basis has much nicer networking support. :P
* araujo imagines this is one of the advantage of O'Caml
<araujo> Smerdyakov, nicer then O'caml?...
<Smerdyakov> Oooooh yes.
<Smerdyakov> Phantom types, man.
<araujo> I like O'caml networking support more than C
<araujo> No idea what you talk about :-/
<tautologico> the OCaml standard library could be better
<araujo> really?..
<araujo> seems nioce to me
<tautologico> there's a lot of things I miss
<tautologico> especially when I switch from sml
* araujo doesn't know sml
<tautologico> it's similar
<dan2> ocaml networking library is just a wrapper around Cs
<dan2> but it works nicely imho
<Smerdyakov> The SML Basis stuff mostly is, as well, but it uses types to do more compile-time checking than C does.
<Smerdyakov> (And more than OCaml Unix does.)
<dan2> Smerdyakov: which do you prefer, ocaml or sml
<Smerdyakov> SML
<araujo> So sml has better type checking than ocaml?
<dan2> araujo: no, just better compile time checking
<Smerdyakov> araujo, no. We're talking about the "standard libraries."
<araujo> Ah ok.
<dan2> Smerdyakov: Where does anybody use SML?
<araujo> That was my next question :-)
<Smerdyakov> Can't say I care.
<tautologico> mostly research
<Smerdyakov> There are quite enough swell tools for it.
<tautologico> theorem provers
<Smerdyakov> I use it for all the dynamic web sites I run.
<araujo> nice
<Smerdyakov> And all of the system administration tools I write.
<araujo> Smerdyakov, what do you use, new jersey sml?
<dan2> Smerdyakov: mod_ocaml work nicely?
<tautologico> I just don't think it has a well-rounded set of tools like OCaml... sure mlton is great, but it's whole-program only, no incremental development
<araujo> O'caml seems to me it has a very good stdlib
<dan2> tautologico: I think compiling for a vm makes more sense than static compiling
<Smerdyakov> tautologico, only for a few years more.
<tautologico> there was talk some time ago about making an ocaml front-end for mlton... that would be great
<Smerdyakov> I think we're about due for a new MLton release. I wonder what Big New Things it will bring.
<araujo> dan2, i think the choice between dynamic or static compiling is more a matter of need
<tautologico> dan2, the great thing is to be able to choose :)
<dan2> SML.NET looks really interesting
<araujo> tautologico, that's one reason i like so much o'caml :-)
ulfdoz_ has joined #ocaml
<dan2> .NET<->ML is a good link
<araujo> Of course, i think that using a language like O'caml brings new questions to answer in comparison with other language
<araujo> But it's worthy in the long term
<araujo> dan2, why?
<tautologico> I used sml.net only for small tests, it's a good integration but it brings performance penalties, of course...
<dan2> araujo: because .NET is like SDL, its very portable
<dan2> tautologico: as expected
<dan2> tautologico: but it can be optimized in time
<dan2> tautologico: ML offers much better type checking
ulfdoz has quit [Read error: 60 (Operation timed out)]
<tautologico> dan2, yes but it's a problem of the model imposed by the CLR
<tautologico> MS likes to say the CLR is language agnostic
<tautologico> but in truth it's language agnostic as long as your language is a different syntax for C# :)
<Smerdyakov> Fellas, don't tell anyone, but I'm working on .NET stuff at Microsoft Research starting in a week.
<araujo> hah
<dan2> hehe
<araujo> Smerdyakov, what did you do to deserve that!!?
<tautologico> Smerdyakov, the F# stuff with Don Syme, by any chance ?
<araujo> haha
<araujo> Is it true ms C# uses the java vm? :-)
<Smerdyakov> tautologico, nope. Protocol checking for Singularity, and maybe some larger scale thing than that.... I'm not entirely clear from my interview with my mentor-to-be.
<tautologico> Smerdyakov, cool, formal methods ? :)
<Smerdyakov> But of course.
<tautologico> protocol checking is a classical application
<dan2> tautologico: no, probably ë#
<tautologico> dan2, have you looked at F# ?
<dan2> nope
<araujo> hah..
<tautologico> it's OCaml for .NET
<tautologico> kinda
* araujo doesn't believe at languages invented by corporations for corporations
<tautologico> I asked that because I saw an announcement recruiting researchers for the F# team
<Smerdyakov> F# is a language/toolset invented by a geek for geeks, as far as _I_ understand things. :P
<tautologico> F# is cool
<araujo> First time i hear about F#
<araujo> But i was refering to C# really.
<Smerdyakov> I bet the F# team doesn't pay as well as Software Productivity Tools in Redmond. :P
<tautologico> araujo, it's written by one of the guys responsible for the CLR support for generics
<dan2> why is research.microsoft.com so slow
<araujo> tautologico, is it a ms project?
<dan2> araujo: yes
<tautologico> araujo, well, is a research project in Microsoft Research
Sonarman has quit [Read error: 104 (Connection reset by peer)]
<dan2> tautologico: is it opensource
<Smerdyakov> It's a project undertaken by an MSR researcher.
<araujo> My question is... why if they do so much researching, they will end up with crap in the market?
<Smerdyakov> I don't believe anyone in MS proper has ever asked him to do this or even expressed approval.
<Smerdyakov> But it's standard that researchers are allowed to spend part of their time on personal projects.
<tautologico> dan2, yes, I believe so
<araujo> Smerdyakov, ok, i think that's the answer
<dan2> can't be
<dan2> I had to accept some sort of Eula crap
<araujo> Yeah
<araujo> Smerdyakov, but you need to sign some Eula thing for that also?
<Smerdyakov> I don't know. Never used it.
* araujo wonders how many personal projects m$ has stolen in that way
<Smerdyakov> I'll have the inside hook-up to everything in my summer internship, though. :P
<humasect> the eula states that many parts of ocaml are used in F#
<humasect> (which directories from the source)
<araujo> Smerdyakov, unveil that mistery to me :-)
<humasect> open source is stealing now? zzz
<araujo> uh?
<humasect> meant to be "stolen"
<humasect> it's the point
<humasect> .sadfasdf
<araujo> :-/
<humasect> F# is nice. actually needed to use it once
<dan2> how do you run it on unix
<dan2> I ran the install script
<dan2> I have mono installed
<humasect> (ocaml with .NET as library, and missing things that CLR can't do and/or are not impl)
<humasect> there are instructions for mono in the install as i recall
CosmicRay has quit [Connection timed out]
<dan2> nonw rhwew
<dan2> none there
<humasect> hm maybe that was also in the eula
<Smerdyakov> Has anyone here ever run a web or other Internet service with legally binding terms of service?
<tautologico> nop
<tautologico> not me
<tautologico> well, see ya
tautologico has quit ["Leaving"]
Smerdyakov has quit ["sleep"]
TeXitoi has quit [Read error: 60 (Operation timed out)]
TeXitoi has joined #ocaml
<ulfdoz_> re
<araujo> isn't '\s' a space character for strings?
<ulfdoz_> Dunno, I've never seen this notation.
karryall has quit ["ERC Version 5.0.2 $Revision: 1.726.2.10 $ (IRC client for Emacs)"]
mlh_ has quit [Client Quit]
Herrchen has joined #ocaml
mlh_ has joined #ocaml
pango__ has quit [Remote closed the connection]
_shawn has quit ["Leaving"]
shawn_ has joined #ocaml
__DL__ has joined #ocaml
mlh_ has quit [Client Quit]
smimou has joined #ocaml
_fab has joined #ocaml
<mflux_> nice, I didn't know one could do this: <ciql0h$mno$1@wolfberry.srv.cs.cmu.edu>
<slashvar[lri]> Hi there
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
gim_ has joined #ocaml
gim has quit [Read error: 60 (Operation timed out)]
gim has joined #ocaml
<araujo> Why something like this doesn't work: Unix.execvp "wget" [| "ftp://ftp.gnu.org/gnu/grep/grep-2.5-1.src.rpm" |];;
<araujo> Instead, it works good with the Unix.system;; function
* araujo doesn't get it
<smimou> "These execv* functions never return: on success, the current program is replaced by the new one;"
<smimou> did you notice that ?
<Snark> re
<Snark> smimou: any news from an ocaml-gettext package?
<smimou> argl
<smimou> completely forgotten :/
<smimou> I'll do that soon
<Snark> :-)
gim_ has quit [Read error: 110 (Connection timed out)]
<araujo> smimou, mmm.. but im running that in a child process
<smimou> ok so at least it isn't the usual basic mistake
<mflux_> araujo, the first argument is propably the executables name
<mflux_> such as 'wget'
<mflux_> I'm just guessing that they work like unix' execvp ;)
<araujo> mflux_, uh?.. that's what im using
<araujo> execvp should look at the PATH for the executable if that's what you mean
<araujo> For example, the same line works perfect using the 'ls' command
<slashvar[lri]> araujo: what do you mean by "doesn't work" ?
<araujo> For example, i get the following error:
<araujo> grep-2.5-1.src.rpm: missing URL
<araujo> Usage: grep-2.5-1.src.rpm [OPTION]... [URL]...
<araujo> Try `grep-2.5-1.src.rpm --help' for more options.
<araujo> slashvar[lri], i get that message
<araujo> Seems like if it were taking... what, the grep-2.5-1.src.rpm as the executable? :-/
<araujo> i don't get it
<mflux_> araujo, in unix (C) it would be called: execvp("name of the binary", "process name", "argument", "...", 0);
<mflux_> so basically the name comes twice
<mflux_> (actually that would be execlp)
<araujo> Thi is in o'caml:
<mflux_> but the point remains
<araujo> val execvp : string -> string array -> 'a
<smimou> mflux_: seems to be right
<smimou> Unix.execvp "wget" [| "wget"; "ftp://ftp.gnu.org/gnu/grep/grep-2.5-1.src.rpm" |];; works
<araujo> I don't get this really...
<araujo> Why, Unix.execvp "ls" [| "/" |];; works then?
<mflux_> does it list the contents of the root directory, if you're in some other directory except /?
<smimou> no it does not
<araujo> # Unix.execv "/bin/ls" [| "-l" ; "/" |];;
<araujo> bin boot dev etc home lib lost+found mnt opt proc root sbin sys tmp usr var
<mflux_> see, no -l in effect?
<araujo> it works here
<araujo> mmm...
<araujo> But the 'ls' is run right?
<mflux_> Unix.execv "/bin/ls" [| "I am the kind of the world!", "/" |]
<mflux_> yes
<mflux_> s/kind/king/ :-o
* araujo scratches his head
<mflux_> you see, it doesn't matter what the argument number zero contains
<mflux_> you'll see it in ps if you're quick enough
<slashvar[lri]> araujo: without giving "ls" in arg, doesn't correctly work here too ...
<mflux_> traditional tip: Unix.execv "/usr/games/nethack" [| "emacs" |]
<smimou> :)
<araujo> So what you guys mean is that the first argument is discarded?
<mflux_> it is used for the process' name!
<mflux_> the binary name is used only for finding the binary
<araujo> :-P
<araujo> Geez... i didn't read that in the stdlib
<mflux_> that's how unix works
<mflux_> look, do this: Unix.execve "/bin/sleep" [|"this is so cool"; "100|]
<mflux_> and then watch the process table
<araujo> hah, ok, i see what you mean
<slashvar[lri]> araujo: try with some binary sensible to it's invocation name, as sh or something like that
<slashvar[lri]> (maybe try with your own bin, with something like if argv[0] == "foo" {printf("foo\n") ;} else {printf("not foo\n") ;})
<araujo> Thanks guys
<araujo> slashvar[lri], yes, i see it now :-)
<mflux_> only 10 minutes to sink it down.. ;-)
<araujo> geez man, but i don't remenber giving the process name when i worked with exec* in C
<mrvn> gzip and other tools (used to) use the argv[0] to decide if they should performa as gzip, gunzip, zcat, ....
<mflux_> araujo, maybe those programs are slightly broken ;)
<mrvn> araujo: must be your memory then
<araujo> mflux_, :-P
<mflux_> in C one might write char* args[] = ["app", "arg", 0]; execvp(args[0], args)
<araujo> Is there any way to write multiline comments in o'caml?
<slashvar[lri]> araujo: what do you mean ? (* *) can have \n inside ...
<araujo> slashvar[lri], yes, i think that's what i mean
<araujo> To avoid typing (* text *) every time
<slashvar[lri]> araujo: so, (* *) is a multiline comment, just like /* */ in C
b00t has joined #ocaml
<araujo> slashvar[lri], but i don't get it.. i can do something like: (* .......... \newline .................. *) ?
<slashvar[lri]> yes
<Snark> how do I use C code with a "value" type with ocaml (which brings in its own "value" type)?
della has joined #ocaml
_JusSx_ has joined #ocaml
CosmicRay has joined #ocaml
visitor_q has quit [Read error: 60 (Operation timed out)]
<mflux_> have you read the 'interfacing c with objective caml' from the documentation?
<Snark> mflux_: perhaps I didn't read it well enough...
<mflux_> it mentions a set of macros for accessing them
<mflux_> however I found also reading the standard library's source helpful
<Snark> mflux_: I think you don't get the problem ;-)
<Snark> my .c uses a gnome-keyring.h, which defines a struct value
<Snark> so it can't use "value" from ocaml
<Snark> there's a clash
<mflux_> ohh
<Snark> I solved it hackingly
<mflux_> #defined around it?
<Snark> keyringGnome_stubs_c.c
<Snark> keyringGnome_stubs_c.h
<Snark> keyringGnome_stubs_ocaml.c
<Snark> this is what I use
<Snark> noj: keyringGnome_stubs_c.c uses gnome-keyring.h
<Snark> and keyringGnome_stubs_ocaml.c uses mlvalue.h
<Snark> s/noj/no/
<della> excuse me for the stupid question
<Snark> I could get it to work like this
<della> how do I use a function defined in a file from the interpreter?
<Snark> let me clean up my Makefile.in setup a sane configure.in
<Snark> #use "file.ml";; if I remember well
<della> Snark: thanks
<Snark> della: don't thank me before you are sure it works ;-)
<della> Snark: it works :)
<Snark> della: perfect!
<Snark> hmmm... my bytecode target is broken :-/
<Snark> "-custom" -> problem solved!
CosmicRay has quit [Read error: 110 (Connection timed out)]
<della> is there a shortcut for the idiom "match f x with Foo (a, b) -> a"?
<della> I remember there was something, but I don't remember if it was caml or haskell :)
<smimou> certainly not caml
<smimou> what would be the type of such a function ?
<della> smimou: ?
<della> smimou: I'm using it
<della> let rec evaluate a =
<della> match a with
<della> | TL_Fst a1 -> (match evaluate a1 with TL_Pair(a2, a3) -> a2
<della> | _ -> assert false)
<smimou> yes but yours is specific to the type of TL_Pair
<smimou> caml's type system is not powerful enough to type the first projection of any "pair type"
<della> smimou: oh, I see
<mflux_> della, let Foo (a, b) = f x in a is marginally shorter?-)
<slashvar[lri]> mflux_: you even can do a let Foo (a,_) = f x in a
<mflux_> but, maybe the guy who wrote the 'deriving'-language extension could extend it a little bit further?-)
<mflux_> fst'Foo could be a proper name for such generated function
<mflux_> let fst'Foo, snd'Foo = let enpair (Foo (a, b)) = a, b in (fun x -> fst (enpair x)), (fun x -> snd (enpair x)) maybe
smimram has joined #ocaml
<mflux_> btw, some people like to use haskellish function composition operators, and some use $ and some (maybe) ++..
<mflux_> however I think @@ and @. are better, because they are right-associative
<mflux_> so that could be written as .. a, b in (fst @. enpair), (snd @. enpair)
<mflux_> (that particular example would ofcourse work with left-associative operators too ;))
<della> mflux_: great, thanks :)
<della> mflux_: just got a small insight on the powerfulness of pattern-matching :)
<mflux_> happy to be of guidance to teh secrets of ml ;)
<della> mflux_: is it possible to make the "not exhaustive" warning disappear?
<mflux_> I think not, if not with a compiler switch
<della> mflux_: I see, thanks
<mrvn> | _ -> raise Not_Exhausitve
<della> mrvn: how do I pack it in a let construct?
<mflux_> mrvn, but doesn't quite work with let?
<mrvn> as in?
<mflux_> type foo = Bar | Baz let foo Foo = 42
<mflux_> uh
<mflux_> let bar Bar = 42 ;)
<mrvn> let bar = function Bar -> 42 | _ -> raise foo
<mrvn> Or better don't even devise such code and datatypes.
<mflux_> which is three times as long expression
<mrvn> you could make a preprocessor makro for it like the ocamlp4 thing
<mrvn> I tend to not have not exhausitve matches in the first place. The few times I do I suffer the extra typing.
<mrvn> and comment why this can't happen.
<mflux_> obviously very few people do non-exhaustive matches as the compiler keeps on whining. this is of course doesn't need to be a bad thing.
<mflux_> people maybe give the non-matching cases more thought when the compiler warns about them
<mrvn> most people just ignore them after checking they are correct.
<mflux_> just leaving them there could 'hide' new such cases
smimou has quit [Read error: 110 (Connection timed out)]
<della> I see. You know, I'm used to python and thus used to think that run-time errors aren't a bad thing :)
<della> of course in caml you just have to have a different mental state :)
<mrvn> della: better to think about it before it happens and add comments and raise statements.
<mrvn> The raise statement to make it not show up anymore.
angagon has joined #ocaml
CosmicRay has joined #ocaml
angagon has left #ocaml []
vezenchio has joined #ocaml
<della> other stupid question: how to concatenate two lists? List.concat [a, b] ?
<mauke> wasn't it @?
<della> mauke: thanks
<della> mauke: I've taken a theoretical course on caml's type system and those things weren't of course included :)
humasect has quit [Read error: 104 (Connection reset by peer)]
<mauke> heh, yeah
<slashvar[lri]> della: l1@l2, List.concat could also work. But list concatenation maybe seen as a bad idea in most time
<slashvar[lri]> using append (at the begining) is far better when possible
<slashvar[lri]> (elem::l)
CosmicRay has quit ["Client exiting"]
<slashvar[lri]> (concat is a flatten operator ...)
<slashvar[lri]> (and append wasn't a good name for :: since List.append is a concat ... )
b00t has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Client Quit]
qvisitor_ has joined #ocaml
Smerdyakov has joined #ocaml
della has left #ocaml []
eydaimon has joined #ocaml
Gueben has joined #ocaml
Smerdyakov has quit ["The world is at the door."]
eydaimon has quit [Remote closed the connection]
eydaimon has joined #ocaml
pango has joined #ocaml
cjohnson has joined #ocaml
pango_ has joined #ocaml
pango has quit [Read error: 60 (Operation timed out)]
<vincenz> This is very strange
<vincenz> Anyone here that nkows the innards of ocaml?
Snark has quit [Read error: 110 (Connection timed out)]
<vincenz> Basically I have
<vincenz> type t = Alloc of ... | Free of ... | Write of ... | Read of ... | Scope of ...
<vincenz> and then I do
<vincenz> type t = Alloc of ... | Free of ... | Access of Memory.Type.t * .. | Scope of ...
<vincenz> where Memory.Type.t = Read | Wriet
<vincenz> I have soem code that does a LOT of comparations
<vincenz> yet oddly the second version is faster (even though you'd assume you need more dereferences)
Snark has joined #ocaml
cjohnson is now known as cj|work
<mrvn> vincenz: if Memory.Type.t already differs the compare can stop.
<vincenz> mrvn: it's just the Raed/Wriet
<vincenz> In the first it's directly on the main type t...
<vincenz> in the second case you first have to go to Access and then to Memory.Type.t
<mrvn> but if you compare a read with write it doesn't have to dereference the rest.
* vincenz shrusg
<mrvn> hmm, right.
<vincenz> I dont' get it, but the second version is faster (though that might be expalined that I get the R|W in and I either have to stick it into Access or switch on it and then add a Read| Write of this type)
<mrvn> How many cases do you have? I assume it is still a small enumeration type?
<vincenz> Also...what's faster..maps or hasheS?
<vincenz> mrvn: those are the exact enumerations
<mrvn> maybe it gives better cache alignment that way.
<vincenz> ugh....they should really change the Map module...it's the only module that dos not have its own type as first param to its functions
<vincenz> s/dos/does
<mflux_> well, changing something, I don't think that's nice
<vincenz> true
<vincenz> but it's a bitch
<mflux_> but maybe they could have a new hierarchy for 'collections' with similar apis
<mflux_> with functional/nonfunctional variants, and finally get the functional hashtable there..
<mflux_> oh yeah, and with stream-support
vodka-goo has joined #ocaml
<vincenz> yip
<mrvn> Doesn't that make Hashtable O(log n) for insert?
<vodka-goo> not really, it can be worse if many items go in the same cell
<vincenz> like O(n)
TeXitoi_ has joined #ocaml
Zaius has joined #ocaml
<Zaius> hi, its me
<Zaius> how do i resolve cyclic dependencies when compiling interfaces?
<mrvn> Zaius: put them in one file
<mrvn> vincenz: The right question is how do you make functional arrays?
<Zaius> can i do better than putting them in one file?
<mrvn> Copying them each time is O(n) insert and O(1) lookup. A tree would be O(log n) both times.
<mrvn> Zaius: no
<vodka-goo> you can also break them among more files
<vodka-goo> sometimes it helps
<mrvn> Only if it is an artifical cycle.
<Zaius> hmm, right now i inserted abstract types in every module that requires them
<Zaius> but i dont like it
<vodka-goo> I had to do that once
TeXitoi has quit [Read error: 110 (Connection timed out)]
Skal has joined #ocaml
Zaius has quit []
_JusSx_ has quit ["leaving"]
rcv has joined #ocaml
TeXitoi_ has quit [Read error: 54 (Connection reset by peer)]
TeXitoi has joined #ocaml
bk_ has joined #ocaml
Gueben has quit ["plouf"]
<mflux_> yeah, I have no idea what I was thinking when hoping for functional hashes, must've read and thought something without completely following through ;)
cj|work has quit [Connection timed out]
cj|work has joined #ocaml
jussx has joined #ocaml
jussx has quit [Client Quit]
jussx has joined #ocaml
Purice has joined #ocaml
Purice has quit ["Leaving"]
<Snark> good night
Snark has left #ocaml []
Herrchen has quit ["good night"]
Skal has quit ["Client exiting"]
Aradorn has joined #ocaml
<vincenz> mrvn: ropes
<Aradorn> ok this is stupid, i do ocamlc hello.ml -o hello and get the error telling me it cant open the pervasives.cmi
<Aradorn> so duh, not telling it where the lib folder is
<Aradorn> but i cant remember how to do that, without specifying -L<DIR> each time i goto compile a file
<Aradorn> I have the OCAMLLIB system variable, but for some reason cant remember how i need to use it when i goto compile the file so it recognizes the directory
cj|work has quit [Connection timed out]
cj|work has joined #ocaml
jussx has quit [Read error: 110 (Connection timed out)]
<Aradorn> is the ocaml site down?
cj|work is now known as cjohnson
vezenchio has quit ["Ayn Rand encapsulates the rage that every teenager feels on finding that his first paycheque has had taxes taken out of it"]
vezenchio has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
cjohnson has quit [Client Quit]
mrsolo has joined #ocaml
rcv has quit ["Abandonando"]
<ulfdoz_> cya
eydaimon has quit [Remote closed the connection]
eydaimon has joined #ocaml
<Aradorn> ok im converting one of my early CS course programs to ocaml and i need to know when an input is a number or not
<Aradorn> is there a built in function like isNum or something?
<Aradorn> or am I going to need to write my own
<smimram> to see if a string is a number ?
<smimram> if it's the case, there is the Scanf module
<Aradorn> er well actually cant i do read_int ?
<Aradorn> think i remember seeing something like that on a tutorial
<smimram> Scanf again :)
<Aradorn> ok so thats part of the Scanf module?
<Aradorn> what hapepns when a user inputs a char or string then?
<mauke> you could also read a line and use int_of_string
<smimram> you get an exception
<Aradorn> know what type off hand? so i can catch it and ask them again for input
vezenchio has quit ["Ayn Rand encapsulates the rage that every teenager feels on finding that his first paycheque has had taxes taken out of it"]
<Aradorn> building a decimal to hex converter to help me learn the different functions in ocaml
<Aradorn> but trying to it as close to the functional style as possible... but darn imperative programming has killed me =p
Shammah has joined #ocaml
mlh_ has joined #ocaml
smimram has quit ["↓"]
<Aradorn> there isnt anyway to initialize a string as empty? where I can concat itself with another string later.
<Aradorn> let a = ();; let b = "adf";; let a = b^a;; dosnt work...
<eydaimon> let a = ""; is empty, no?
<Aradorn> haha
<Aradorn> yeah you can do that
<Aradorn> for some reason id int think you could