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