__DL__ changed the topic of #ocaml to: OCaml 3.09.0 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/
exa has quit [Remote closed the connection]
exa has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
ecc has quit ["Client exiting"]
rq has joined #ocaml
m3ga_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
m3ga_ is now known as m3ga
mauke has quit [Remote closed the connection]
exa has quit [Remote closed the connection]
ulfdoz has quit [Remote closed the connection]
exa has joined #ocaml
mauke has joined #ocaml
ulfdoz has joined #ocaml
exa has quit [Remote closed the connection]
rq has quit ["Leaving"]
ski has joined #ocaml
m3ga_ has joined #ocaml
m3ga_ has left #ocaml []
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
bd_ has quit ["rebooting ..."]
vezenchio has quit ["\\o hutari ga kitto deaeru you na mahou wo kakete - ryoute wo sotto kasanete hora! hohoemu kara - hontou no kimoti kidukanai ]
ramkrsna has joined #ocaml
ramkrsna_ has joined #ocaml
ramkrsna has quit [Read error: 113 (No route to host)]
joshcryer has joined #ocaml
ramkrsna_ has quit [Read error: 113 (No route to host)]
rq has joined #ocaml
shirogane has quit [Remote closed the connection]
mattam has quit [Remote closed the connection]
mattam has joined #ocaml
rq has quit [Read error: 110 (Connection timed out)]
rq has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
m3ga has joined #ocaml
<pango_> damn, I forgot to sleep tonight :)
pango_ has quit [Remote closed the connection]
knobo has joined #ocaml
pango has joined #ocaml
Skal has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
revision17_ has joined #ocaml
vodka-goo has quit [Read error: 104 (Connection reset by peer)]
Revision17 has quit [Read error: 110 (Connection timed out)]
vodka-goo has joined #ocaml
mrpingouin has joined #ocaml
<mrpingouin> hi
<mrpingouin> dylan: sorry I don't remember nicknames, but was it you who looked for an untyped send for calling an arbitrary method ?
<mrpingouin> this thing happen to exist, in CamlinternalOO module ;)
<mrpingouin> let send o s =
<mrpingouin> let tag = CamlinternalOO.public_method_label s in
<mrpingouin> CamlinternalOO.send (Obj.magic o) tag
<mrpingouin> very nasty :p
mrpingouin is now known as vodka-gooo
<vodka-gooo> (add one more obj.magic after CamlinternalOO.send)
bluestorm has quit ["Leaving"]
bluestorm has joined #ocaml
ppsmimou has joined #ocaml
<bluestorm> do you know godi ?
<bluestorm> doc ask
<bluestorm> to not install it being root
<bluestorm> but when i tried to install it as user, i have permission problems
<bluestorm> so i installed being root
<bluestorm> is this a real problem ?
joshcryer has joined #ocaml
kmag has left #ocaml []
<vodka-gooo> bluestorm: I guess it's not so bad
<vodka-gooo> the real problem is when you cannot be root
<bluestorm> hum
<bluestorm> now i have some permissions problems when using godi from non-root users
<dylan> vodka-gooo: interesting dynamic send thing
<bluestorm> maybe is it uncoherent to install godi as root and trying to install godi's packages as user ?
<pango> in what directory did you try to install it as non root ? Obviously a directory you're allowed to write to is better
<pango> which means under $HOME (or maybe under /usr/local/bin/ if you're in staff group, in some systems)
__DL__ has joined #ocaml
bluestorm has quit [Remote closed the connection]
yangsx has joined #ocaml
vezenchio has joined #ocaml
bluestorm has joined #ocaml
yangsx has left #ocaml []
<vodka-gooo> pango: btw, this weird camlinternalOO also has a "inherit" function
<vodka-gooo> so your hashtables hacks might be useless now
<pango> they weren't mine, and no OO was used
<pango> it's some Fabrice Lefeyssan code
<ppsmimou> lefessant
<vodka-gooo> ppsmimou: salut chou
<bluestorm> ...
<bluestorm> oh
<bluestorm> pps
<bluestorm> Paris VII pps ?
<vodka-gooo> oui
<bluestorm> ha
<bluestorm> :p
<pango> right... Le Fessant even
<bluestorm> Le Fessant ?
<bluestorm> (who _isn't_ french here ?)
<pango> il n'est pas francais, il est breton ;)
<bluestorm> hum
<bluestorm> and you ?
<bluestorm> another known caml developper ?
<bluestorm> (or near)
* dylan is also not french, but is also not a known caml developer.
<pango> much lesser known french coder (bordeaux)... And probably less talented too ;)
<bluestorm> k
<ppsmimou> vodka-goo: hi my dear
CLxyz has quit [Connection timed out]
<dylan> When I first started trying to learn ruby, it was quite interesting. Lots of good docs were in japanese, and that I can't read. :(
<dylan> with ocaml, on the rare instances I find docs in french, I can sometimes understand them, knowing only spanish and english...
<vodka-gooo> the oreilly book is english right ?
<dylan> I'm talkin' online docs, though. I am a poor college student. :)
<pango> it was translated to english (from french)
<vodka-gooo> the oreilly book is freely available online
<dylan> Oh?
<dylan> I've been using the ocaml user manual and reading the source for the standard library as learning tools...
<vodka-gooo> poor boy..
<vodka-gooo> I mostly learnt at school
<bluestorm> hum
<bluestorm> is there a french translation of the official ocaml doc ?
<pango> I mainly used the oreilly book (and still do, most of it is still relevant)
<vodka-gooo> (my teacher was a pascal fan, so my first year of caml wasn't so great)
<dylan> I doubt any of my professors will know of o'caml. :)
<vodka-gooo> where are you from ?
<dylan> US.
<vodka-gooo> more precisely ?
<dylan> Specifically Florida.
<vodka-gooo> some US universities teach ocaml
<dylan> Granted, it's bloody difficult to get into the CS classes. First you have to take "I know how to use a computer" classes...
<vodka-gooo> :(
<bluestorm> hum
<bluestorm> what do you study ?
<dylan> Right now, Linguistics. Getting a 2 year degree in that. After that, I'll get my Bachelors in CS/Math.
<bluestorm> hum
<bluestorm> i think i don't know the US education system enough :D
<dylan> I don't think I do either.
<bluestorm> hum
<bluestorm> ppsmimou:
<dylan> I think the standard way of saying is "my major is CS/Math and my minor is Linguistics"
<bluestorm> could you explain me
<ppsmimou> yes ?
<bluestorm> what are you exactly doing in your labs ?
<ppsmimou> in PPS ?
<bluestorm> yes
<bluestorm> not _you_, but PPS
<ppsmimou> mostly semantics
<bluestorm> hm ok
<bluestorm> i one day went to a conference
<bluestorm> but i didn't really understood the difference between the two informatic labs
<ppsmimou> between PPS and LIAFA ?
<bluestorm> (graoh understood)
<bluestorm> yes
<ppsmimou> LIAFA are doing more stuff on automata and decidability
<bluestorm> ah
<ppsmimou> we are studying more things like lambda-calculus, pi-calculus, etc.
<ppsmimou> I don't know what you know so this might not be clear for you
<vodka-gooo> ppsmimou: you also have a few programming language designers, web programmers, more applied stuff
<ppsmimou> it's quite rare to be honnest
<ppsmimou> but it's truc
<ppsmimou> but it's true
<bluestorm> hum
<bluestorm> i know some of the theoric concepts
<bluestorm> but i thought lamba-calculus and decidability were heavily related
<vodka-gooo> ppsmimou: people around dicosmo have a tradition of real-life applications
<vodka-gooo> which is great
<ppsmimou> vodka-goo: no PhD
<ppsmimou> only post-doc
* vodka-gooo goes checking the current state of the EDOS project
<ppsmimou> bluestorm: there are links but people from different communities don't study the same things
<gim> ca a bougé EDOS ?
<ppsmimou> they're progressing slowly
<gim> oops, we're on #ocaml here :o)
<vodka-gooo> gim: soso
<vodka-gooo> I still don't know what they're doing :p
<vodka-gooo> only one guy is actively working, apparently
<gim> "package installation is NP-complete" hehe
<bluestorm> what's EDOS ?
<gim> oh they've compared many package management systems
<gim> EDOS means "Environment for the development and Distribution of Open Source software"
* gim looks at comments on portage
<gim> I don't know exactly what is their goal, maybe some kind of framework to build distributions upon
gg has joined #ocaml
<gg> plop
<vodka-gooo> gim: no comment on portage, only a description :(
<gim> yup :(
<gg> slt vodka-goo :)
<vodka-gooo> on se connait ?
<vodka-gooo> dsl, pas la mémoire des nicks ;)
<gg> tu m'as aider hier :D
<gg> a propos d'une histoire de let et du mot const du c++
<vodka-gooo> ok c'était toi, dsl
<bluestorm> do you know camlp4 ?
<vodka-gooo> je suis un peu comateux
<vodka-gooo> bluestorm: you already asked yesterday, right ?
<bluestorm> yes
<bluestorm> :p
<vodka-gooo> and there was nobody to give a very good answer ..
<bluestorm> yes
<bluestorm> hum
<bluestorm> might have been different today :p
<vodka-gooo> I've looked at quotations
<bluestorm> ah
<bluestorm> it seems to be a powerful tool
<vodka-gooo> I'm not sure but it doesn't seem to fit for templates
<bluestorm> hum
<bluestorm> not very easy to understand
<bluestorm> (the manual)
<bluestorm> but i thought
<bluestorm> << <b>$titre</b> >>
<bluestorm> could generate a closure
<bluestorm> string array -> string
<vodka-gooo> have you looked at the caml Xhtml module
<vodka-gooo> the typing guarantees xml validity
<bluestorm> hum
<bluestorm> i knew it
<bluestorm> but
<vodka-gooo> it's not very easy to learn, though
<bluestorm> and not very easy to write
<vodka-gooo> :)
<ppsmimou> vodka-goo: do you have a link to the caml Xhtml module ?
<vodka-gooo> ppsmimou: no :p
<ppsmimou> tsss
<vodka-gooo> it's in the hump
<ppsmimou> thx
<vodka-gooo> travaille, plutôt
<vodka-gooo> gnark :)
<bluestorm> hum
<bluestorm> a lot of xhml parser-printer are in the hump
qknight has joined #ocaml
<qknight> hey
<bluestorm> hoy
<qknight> i've got a problem with some caml code i can't understand:
<qknight> let rec eval e env =
<qknight> match e with
<qknight> Const i -> Int i
<qknight> | Var n -> lookup_env env n
<qknight> does this code mean, that e will match on all n's?
<qknight> or what could Var n mean?
<bluestorm> hum
<bluestorm> if e is a Const
<bluestorm> hum
<bluestorm> i think you know it
<bluestorm> do you know pattern-matching ?
<qknight> bluestorm: yes
<bluestorm> Var n : n has the value of the (int ?) variable stored in the type
<qknight> bluestorm: i've written about 20 functions with pattern matching
<bluestorm> (dunno really how to explain that)
<bluestorm> hum
<vodka-gooo> qknight: n is bound by the pattern matching
<vodka-gooo> it doesn't have to be defined before
<vodka-gooo> in the body of the Var n clause, n will represent the value such that e = Var n
<vodka-gooo> is that clear ?
<bluestorm> vodka-goo:
<qknight> moment - let me thnkg ;-)
<bluestorm> do you know some french pattern-matching, types and n-uplets lessons ?
<qknight> then e would be e="Var n"
<bluestorm> there is the o'reilly book, but it is a little difficult for beginners
<bluestorm> (i mean, people that haven't learned functional programming yet)
<ppsmimou> I'm afraid there's nothing much easier
<vodka-gooo> bluestorm: sorry, I didn't read that much on ocaml, class and experience mostly
<bluestorm> hu
<bluestorm> i'm gonna have to write something myself :p
<vodka-gooo> qknight: what do you mean by "e would be e="Var n""
<qknight> bluestorm: ok thanks so far
<qknight> vodka-gooo: i think e is representing a grammer rule
<bluestorm> qknight: it seems not
<bluestorm> it seems it represent a value
<qknight> ok
<bluestorm> that can be constant or variable
<bluestorm> but it would be better
<bluestorm> if you showed more code
CLxyz has joined #ocaml
<qknight> bluestorm: i can show more code of course
<qknight> let rec eval e env =
<qknight> match e with
<qknight> Const i -> Int i
<qknight> | Var n -> lookup_env env n
<qknight> | Fun (paras, body) -> Clos (paras, body, env)
<qknight> | App (f, args) ->
<qknight> let fVal = eval f env in
<qknight> let argsVals = List.map (fun e -> eval e env) args in
<bluestorm> hum
<qknight> (match fVal with
<qknight> Clos (paras, body, clos_env) ->
<bluestorm> now, it looks like a grammar rule
<qknight> (it's part of a compiler from a selfmade artificial language called mini)
<bluestorm> but
<gg> ca a l'air compliquer tout ca :)
<qknight> bluestorm: ok thanks
<bluestorm> qknight:
<bluestorm> Var n
<bluestorm> is the same principe than
<bluestorm> let length = function
<bluestorm> [] -> 0
<bluestorm> head::tail -> 1 + (length tail)
<bluestorm> in
<bluestorm> (forgot the 'rec')
<bluestorm> (and | )
<bluestorm> do you understand head::tail ?
<Smerdyakov> Maybe he can't make head or tail of it.
<vodka-gooo> :)
<bluestorm> hum
<bluestorm> :p
<vodka-gooo> head::tail can be thought as Cons (head,tail)... dunno if that helps about patterns
<bluestorm> hum
<bluestorm> i meant
<bluestorm> to see a variable
<bluestorm> hum
<bluestorm> i mean learn to decompose a variable in different parts and name them in the same time
<bluestorm> if you understand head::tail, Var n is the same (even easier)
<bluestorm> don't you think so ?
<bluestorm> (the decomposed operation is using a Constructor wheter using list concatenation)
_fab has joined #ocaml
gg has quit ["Leaving"]
ski has quit [Read error: 110 (Connection timed out)]
<qknight> bluestorm: what could this mean:
<qknight> let _ = Arg.parse [] eval_file "Usage: mini file ..."
<qknight> i think it's the program entry point
<bluestorm> hum
<qknight> but why _? is that the default case?
<bluestorm> it mean
<bluestorm> the value is not assigned
<bluestorm> to anything
<bluestorm> it's a way of non having warnings 'unusued variable' when you have a return code whose you don't bother about
<bluestorm> for example Sys.command
<qknight> but why is that statment called at all? (i tested it)
<bluestorm> because
<bluestorm> hum
<vodka-gooo> it's specified like that :p
<bluestorm> (i don't understand your question, sorry)
<vodka-gooo> beginners questions are difficult :)
<vodka-gooo> qknight: removing the "let _ =" is sometimes possible, but may lead to syntax ambiguities
<qknight> ok i think it's _clear_ now ;-)
<vodka-gooo> that's the way one usually starts a toplevel statement
<qknight> vodka-gooo: thanks
<qknight> that's something we were after!
<qknight> bluestorm: of course you weren't wrong either
<bluestorm> i think trying to explain something about caml in english is a much better training than having english lessons :p
<qknight> bluestorm: this might be true!
<bluestorm> !t bluestorm rpm
ski has joined #ocaml
vodka-gooo has quit ["Leaving"]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
qknight has quit ["Lost terminal"]
<kmagdsick> wait... so getting back to the discussion from about 40 minutes ago
<kmagdsick> let _ = ...
<kmagdsick> nevermind... eager evaluation instead of lazy evaluation
<kmagdsick> that's how the declaration has side effects
<kmagdsick> right?
<bluestorm> hum
<bluestorm> yes
<bluestorm> actually, let is a odd kind of pattern_matching
<bluestorm> you can see
<bluestorm> let a = b in
<bluestorm> as
<bluestorm> match b with a ->
<kmagdsick> well, it's a symbol binding
<kmagdsick> scoped symbol binding
nocte___ has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
ppsmimou has quit ["Leaving"]
<dylan> hmm...
<kmagdsick> hmm... ???
<dylan> Anyone see something wrong with: http://pastebin.com/430652
<dylan> ?
<dylan> I'm afraid I'm not understanding Val_int or how ocaml does the unboxed types...
smimou has joined #ocaml
shirogane has joined #ocaml
flux__ has quit [Read error: 104 (Connection reset by peer)]
flux__ has joined #ocaml
<mauke> dylan: unboxed types are integers
<mauke> their values are stored as (n << 1) | 1
<dylan> and Val_int means ((x) >> 1)
<dylan> but my C function seems to be returning 2 for Val_int(10)
<vodka-goo> dylan: int_val ?
<dylan> That takes an caml value and returns an int.
<mauke> `calc 10 >> 1 >> 1
<mauke> 2
<dylan> hmm...
<dylan> LOL
<mauke> your function uses Int_val, turning 10 into 5
<dylan> I was using Int_val.
<dylan> *slaps self*
<dylan> now, to get the C function to return type key = Char of char | Enter | ...
<dylan> vodka-goo: thanks, btw. :)
gim has quit [Remote closed the connection]
gim has joined #ocaml
Purice has joined #ocaml
Purice has quit [Read error: 104 (Connection reset by peer)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
faigo has joined #ocaml
Bigb[a]ng is now known as Bigbang
<dylan> Is the representation of (Foo 42) in C: value foo = caml_alloc(2, 0); Store_field(foo, 0, hash_variant("Foo")); Store_field(foo, 1, Val_int(42));?
<dylan> or is hash_variant only fo `Foo things?
<dylan> *for.
<dylan> Ah. type foo = Foo of int | Bar of char would be represented by a block of size 1, with the tag being 0 for Foo and 1 for Bar, yes?
<dylan> So, only polymorphic variants use hash_variant.
shirogane has quit [Read error: 104 (Connection reset by peer)]
<mellum> dylan: no, Bar would be represented by an integer 1
<mellum> oh wait, I overlooked "of char".
__DL__ has quit [Remote closed the connection]
<dylan> :)
bluestorm has quit ["Leaving"]
<faigo> Hi, for interfacing with C language, is that a way to access C struct directly?
__DL__ has joined #ocaml
<vodka-goo> faigo: you must put a pointer to the C structure inside a caml custom block
<flux__> I think faigo means after having a pointer, somehow accessing the fields without writing C-code, for which the answer would be no
<flux__> which is a shame. someone should write a tool to do that ;)
<flux__> infact maybe those c/ocaml binding generators can do something like that
<flux__> (I can't recall the name of the one that does those between c/c++/tcl/ocaml/perl/..)
<vodka-goo> you can generate accessor functions
<vodka-goo> swig
Bigbang is now known as Bigb[a]ng
<nocte___> oh Bigb[a]ng
<nocte___> hi
tre is now known as treeee
* dylan wonders how to represent the 96 ncurses KEY_ constants in ocaml.
nocte___ has left #ocaml []
<flux__> hmm.. aren't there ncurses bindings for ocaml already?
<flux__> or maybe I'm mixing it up with some other language
<flux__> no, there's ocaml-tmk
<flux__> it has a file with a bunch of let xxxx = nnnn -lines
vodka-goo has quit []
vodka-goo has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
__DL__ has quit ["Bye Bye"]
smimou has quit ["bli"]
gim has quit [Remote closed the connection]
gim has joined #ocaml
Skal has quit [Remote closed the connection]