<karryall>
mais j'y connais que dalle en GL alors ...
<two-face>
hmm
<karryall>
two-face: t'as essayé ?
<smkl>
see te globe example in games directory, it uses opengl
<smkl>
the
<two-face>
karryall: non, c'était juste un interrogation
<karryall>
smkl: great !
<karryall>
I'll put a blurb in the documenation about lalbGTL and lablGL
<karryall>
pnou_icfp: alors, les robots déménageurs ?
<pnou_icfp>
on a fait nos structures
<pnou_icfp>
je commence à faire le parser de la sortie du serveur
<pnou_icfp>
ce qui est relou c'est qu'ils ont pas l'air de fournir le serveur
<karryall>
si dans la FAQ ils disent qu'il y aura un serveur de test
<smkl>
to put an sdl window inside gtk window, you need to initialize sdl after the gtk window is created, and the gtk-window needs to have a corresponding x window (i don't know if gtk has an x window for every widget)
<karryall>
no I don't think so ...
<smkl>
well, i guess lablgtk widgets with #misc have associated x window (since misc ops and events are just "gdk" (read xlib) stuff)
<karryall>
yeah ... something like that
TimFreeman has joined #ocaml
<karryall>
damn
<karryall>
I didn't compile SDL with GL support
<two-face>
bye
<karryall>
'tcho
two-face has quit ["Client Exiting"]
<smkl>
karryall: is color handling broken?
<karryall>
smkl: you mean in ocamlsdl ?
<karryall>
not that I known of ...
spip has joined #ocaml
<karryall>
smkl: nice, globe works great !
<smkl>
#ifdef __GNUC__ #define SDL_COLOR_FROM_VALUE ...: what is this trying to accomplish? and i think that the float colors are not handled, too...
TimFreeman has left #ocaml []
<karryall>
in sdlvideo or sdlvideo2 ?
<smkl>
sdlvideo_stub.h
<karryall>
hum, yes it is totally buggy
<karryall>
I'll just leave the previous macro
<smkl>
it will work for most cases. i don't think anyone uses the float colors
<karryall>
yes, that's what I think too
<karryall>
maybe we should drop them
<smkl>
theoretically, somebody might need 16bit color components... btw gtk+ uses them
<karryall>
smkl: I fixed the SDL_COLOR_FROM stuff
_mattam_ has joined #ocaml
<smkl>
karryall: thanks
gl has quit [No route to host]
Torquemada has quit [No route to host]
demoncrat has quit [Read error: 110 (Connection timed out)]
<smkl>
hmm, #haskell has Simon PJ
<karryall>
who is Simon PJ ?
<smkl>
Simon Peyton-Jones, author of GHC Haskell Compiler
<smkl>
when #ocaml has 100 users, X Leroy will be here
<smkl>
i promise
<smkl>
VOTE ME!!!
<karryall>
:)
mattam has quit [Connection timed out]
uberfunk_ has joined #ocaml
<uberfunk_>
hello all
<uberfunk_>
i'm reading through an ocaml tutorial, and scoping is confusing me
<uberfunk_>
anyone around to give me a hint?
<smkl>
hey
<karryall>
yep
<uberfunk_>
ok, well I've lost the URL, so i'll just paste the code
<uberfunk_>
# let sum i =
<uberfunk_>
let sum2 j =
<uberfunk_>
i + j
<uberfunk_>
in
<uberfunk_>
sum2;;
<uberfunk_>
val sum : int -> int -> int = <fun>
<uberfunk_>
I don't understand the type of that statement
<uberfunk_>
perhaps you could talk me through the statement
<karryall>
well you define sum
<karryall>
it has one argument : i
<karryall>
which is an int
<karryall>
in the definition of sum
<uberfunk_>
yes
<smkl>
let sum2 j = i + j in sum2 ==> let sum2 = fun j -> i + j in sum2 ==> fun j -> i + j
<karryall>
you declare sum2
<karryall>
sum2 is a function taking another int as argument
<karryall>
sum2 returns an int (i+j
<karryall>
so, the type of sum2 is int -> int
<karryall>
now, the return value of sum is sum2 itself
<uberfunk_>
ok
<karryall>
so the type of sum is int -> (int -> int)
<uberfunk_>
ok
spip has left #ocaml []
<uberfunk_>
which is the same as int -> int -> int
<karryall>
exactly
<uberfunk_>
is the = <fun> just sugar then?
<karryall>
that's just an indication of the toplevel
<uberfunk_>
ok
<uberfunk_>
its not really part of the type?
<karryall>
not part of the langage
<uberfunk_>
or is fun a type?
<karryall>
no
<uberfunk_>
ok
<karryall>
it is a fun value (no type)
<uberfunk_>
1. how does sum2 get its return value
<smkl>
it is just the way the toplevel prints functions
<uberfunk_>
2. how does j become an argument to sum
<karryall>
it's not exactly an argument to sum
<karryall>
when you do sum a b
<karryall>
if first applies a to sum
<karryall>
this yields sum2
<uberfunk_>
ok
<karryall>
with i bound to a
<karryall>
and then it applies b to sum2
<karryall>
sum2 is then fully applied
<karryall>
with a bound to i and b boudn to j
<uberfunk_>
I think I understand
<karryall>
and it computes the result
<uberfunk_>
i'm going to keep going, and perhaps pop back in here if something throws me