<adrien>
did you use "make opt" to build lablgtk2?
<adrien>
in other words: are you sure you have .cmxa files?
<mzie>
oh right i forgot that after reinstalling findlib
<mzie>
thanks
mort___ has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
enstrophy has joined #ocaml
enstrophy has quit [Client Quit]
NoNNaN has quit [Ping timeout: 240 seconds]
lopex has quit [Remote host closed the connection]
dch has quit [Read error: Connection reset by peer]
NoNNaN has joined #ocaml
dch has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
lopex has joined #ocaml
robink_ has joined #ocaml
robink has quit [Ping timeout: 240 seconds]
breakds has joined #ocaml
jayprich has joined #ocaml
shinnya has joined #ocaml
robink_ has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
robink has joined #ocaml
fantasticsid has joined #ocaml
fantasticsid has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
robink has quit [Quit: No Ping reply in 180 seconds.]
robink has joined #ocaml
ollehar has joined #ocaml
Drup has joined #ocaml
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 245 seconds]
tobiasBora has joined #ocaml
ygrek has quit [Remote host closed the connection]
gal_bolle has joined #ocaml
ygrek has joined #ocaml
strobegen has quit [Quit: Leaving.]
shinnya has quit [Ping timeout: 246 seconds]
platypine has joined #ocaml
yacks has joined #ocaml
fantasti` has quit [Remote host closed the connection]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
mort___ has quit [Quit: Leaving.]
Arsenik has quit [Remote host closed the connection]
robink has quit [Ping timeout: 245 seconds]
robink has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
Kakadu has quit []
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
robink_ has joined #ocaml
robink has quit [Ping timeout: 240 seconds]
Picolino is now known as julien_t
jbrown has quit [Remote host closed the connection]
q66_ has joined #ocaml
jbrown has joined #ocaml
robink_ is now known as robink
q66 has quit [Ping timeout: 245 seconds]
talzeus has quit [Read error: Connection reset by peer]
RagingDave has joined #ocaml
RagingDave has quit [Client Quit]
ygrek has quit [Remote host closed the connection]
q66_ is now known as q66
<swistak35>
I'm newbie in ocaml - is there a way to map over list of numbers? I mean, syntax like "map some_function [1..10]" from haskell
maufred_ has joined #ocaml
<Drup>
there is no shortcut syntax like [1..10]
<ggole>
List.map some_function list
maufred_ has quit [Client Quit]
<swistak35>
Drup: so I need to create a functio which will generate me list of numbers from x to y?
<mrvn>
yes
<swistak35>
ok, thank you
<ggole>
Or you could do something like let rec map_range low high f = if high <= low then [] else f low::map_range (low + 1) high f
<mrvn>
ggole: that isn't tail recursive
maufred_ has joined #ocaml
<ggole>
Yeah, I'm lazy
maufred_ has quit [Client Quit]
<ggole>
let map_range low high f = let rec loop l h acc = if l >= h then acc else let h' = h - 1 in loop l h' (f h'::acc) in loop low high []
robink has quit [Ping timeout: 240 seconds]
jayprich has quit [Ping timeout: 272 seconds]
<mrvn>
type 'a t = { x:'a; mutable n:'a t; } let map_range : int -> int -> (int -> 'a) -> 'a list = fun low high f -> let rec loop l t = if l <= high then let t2 = { x = f l; n = Obj.magic [] } in t.n <- t2; loop (l + 1) t2 in let t = { x = Obj.magic 0; n = Obj.magic [] } in loop low t; Obj.magic t.n
<ggole>
O_o
<mrvn>
scared yet?
<ggole>
Why would you do that D:
<mrvn>
In case f has side effects
robink has joined #ocaml
<ggole>
I think I'd go for a reversed accumulator over that.
<ggole>
Might even be faster, since you don't eat a write barrier each time through.
tobiasBora has quit [Read error: Operation timed out]
<ggole>
(It has a kind of twisted beauty though.)
<mzie>
Obj.magic :o
rand000 has quit [Ping timeout: 240 seconds]
rand000 has joined #ocaml
w0rm_x has joined #ocaml
platypine has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
lamawithonel_ has quit []
w0rm_x has left #ocaml []
tobiasBora has joined #ocaml
julien_t has quit [Ping timeout: 245 seconds]
lamawithonel_ has joined #ocaml
AltGr has left #ocaml []
ggole has quit []
darkf has joined #ocaml
Arsenik has joined #ocaml
<wmeyer```>
hi
wmeyer``` is now known as wmeyer
jayprich has joined #ocaml
darkf has quit [Quit: Leaving]
skchrko has joined #ocaml
platypine has joined #ocaml
darkf has joined #ocaml
ygrek has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
jonludlam has joined #ocaml
tobiasBora has quit [Ping timeout: 240 seconds]
tobiasBora has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jayprich has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 245 seconds]
tobiasBora has quit [Ping timeout: 240 seconds]
platypine has quit [Ping timeout: 245 seconds]
ygrek has quit [Ping timeout: 260 seconds]
brainacid has joined #ocaml
<brainacid>
hello channel
brainacid has left #ocaml []
tobiasBora has joined #ocaml
<wmeyer>
hi
jayprich has joined #ocaml
platypine has joined #ocaml
jayprich has quit [Client Quit]
jayprich has joined #ocaml
wagle has quit [Ping timeout: 264 seconds]
gal_bolle has quit [Remote host closed the connection]
jayprich has quit [Quit: shuffles into the gloom]
wmeyer has quit [Remote host closed the connection]
zpe has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
chambart has joined #ocaml
nicoo has quit [Quit: Read error: Connection reset by Hadopi]