adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
tane has quit [Quit: Verlassend]
larhat has joined #ocaml
Skolem has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
pango has quit [Remote host closed the connection]
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
walter|r has quit [Client Quit]
walter|r has joined #ocaml
lolcathost has quit [Quit: leaving]
pango has joined #ocaml
ulfdoz_ has joined #ocaml
avsm has joined #ocaml
ulfdoz has quit [Ping timeout: 268 seconds]
ulfdoz_ is now known as ulfdoz
larhat has quit [Ping timeout: 246 seconds]
avsm has quit [Ping timeout: 252 seconds]
lolcathost has joined #ocaml
walter|r has quit [Quit: Leaving]
walter|r has joined #ocaml
walter|r has quit [Client Quit]
walter|r has joined #ocaml
<walter|r> i'm having trouble building an sdl project using ocamlbuild with ocamlfind
<walter|r> i installed the sdl libs with godi
<walter|r> the same project builds fine on ubuntu
<walter|r> but fails on OS X
<walter|r> i get the error "Error: Unbound module Sdlvideo"
<walter|r> if i run ls `ocamlfind query sdl` | grep sdlvideo
<walter|r> i get sdlvideo.cmi sdlvideo.cmx sdlvideo.mli
<walter|r> ocamlbuild -use-ocamlfind -cflags -I,+sdl,-I,+ocaml -lflags -I,+sdl,-I,+bitstring,-I,+o
<walter|r> caml -libs unix,bigarray,sdl,sdlloader,sdlttf,bitstring "src/main.native"
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
larhat has joined #ocaml
wormphlegm has joined #ocaml
wormphlegm has quit [Client Quit]
eikke has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
andreypopp has quit [Quit: sleep]
madroach has joined #ocaml
avsm has joined #ocaml
lolcathost has quit [Quit: brb]
lolcathost has joined #ocaml
walter|rtn has joined #ocaml
as has joined #ocaml
Neros has quit [Ping timeout: 246 seconds]
walter|r has quit [Ping timeout: 240 seconds]
avsm has quit [Ping timeout: 252 seconds]
as has quit [Quit: as]
eikke has quit [Ping timeout: 276 seconds]
paolooo has joined #ocaml
avsm has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
andreypopp has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
as has joined #ocaml
as has quit [Quit: as]
ontologiae has quit [Ping timeout: 260 seconds]
paolooo has quit [Quit: Page closed]
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
as has joined #ocaml
lolcathost has quit [Quit: leaving]
andreypopp has quit [Quit: sleep]
avsm has joined #ocaml
andreypopp has joined #ocaml
avsm has quit [Read error: Operation timed out]
<thelema> walter|rtn: you shouldn't need the -cflags or -lflags
<thelema> walter|rtn: what are your _tags? you still need to tell ocamlfind to use bitstring and sdl packages
andreypopp has quit [Quit: sleep]
<thelema> hmm, maybe -libs does this; I only know about the tags way to do this
andreypopp has joined #ocaml
avsm has joined #ocaml
tautologico has quit [Quit: tautologico]
andreypopp has quit [Quit: sleep]
pkrnj has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
<walter|rtn> thelema: my _tags file is here: http://pastebin.com/SDNKji7r
<walter|rtn> thelema: it just seems strange, because the same project builds fine in ubuntu
<walter|rtn> thelema: and the sdl directory that ocamlfind finds has the same files in it
avsm has joined #ocaml
mjonsson has quit [Ping timeout: 252 seconds]
avsm has quit [Ping timeout: 260 seconds]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
as has quit [Quit: as]
avsm has quit [Ping timeout: 252 seconds]
lolcathost has joined #ocaml
answer_42 has joined #ocaml
mye has joined #ocaml
answer_42 has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
walter|rtn has quit [Quit: This computer has gone to sleep]
jamii has quit [Ping timeout: 246 seconds]
Yoric has joined #ocaml
lolcathost has quit [Quit: leaving]
avsm has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
lolcathost has joined #ocaml
lolcathost has quit [Quit: leaving]
lolcathost has joined #ocaml
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
avsm has joined #ocaml
sepp2k1 has quit [Read error: Connection reset by peer]
avsm has quit [Ping timeout: 246 seconds]
lolcathost has quit [Quit: leaving]
lolcathost has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
larhat has quit [Quit: Leaving.]
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
leoncamel has joined #ocaml
answer_42 has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 246 seconds]
larhat has joined #ocaml
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
cdidd has quit [Ping timeout: 252 seconds]
lolcathost has quit [Quit: brb]
Playground has joined #ocaml
Anarchos has joined #ocaml
avsm has joined #ocaml
avsm has quit [Read error: Operation timed out]
mrm has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
eikke has joined #ocaml
mye has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Anarchos has joined #ocaml
A_85 has quit [Ping timeout: 246 seconds]
<pippijn> http://paste.xinu.at/FSb/ am I missing something?
<Anarchos> pippijn maybe you have to flush explicitly stdout ?
<Anarchos> pippijn i remember that the buffers used by printf are not the same as for standard out, so you have to call flush somewhere
<pippijn> Anarchos: from the ocaml sources: let printf fmt = fprintf stdout fmt;;
gustav__ has joined #ocaml
Neros_ has joined #ocaml
eikke has quit [Read error: Operation timed out]
<gustav__> Can I break; out of a while loop?
<Qrntz> gustav__, use exceptions
<Qrntz> for one the standard library uses an exception called Exit purely for use in user code
<gustav__> Hmmm...
<gustav__> So I have a camlbox request -> <- camlbox reply system working. :)
<gustav__> Is there a way to get nanotime in OCaml?
<gustav__> Or 10^-100 time? :3
<pippijn> gustav__: still about your IDs?
<gustav__> Yep.
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<gustav__> I just woke up and sat down with this.
<gustav__> Maybe I should eat first.
<adrien> you can break with exceptions
<adrien> not the best style usually
<gustav__> Nothing good about my ocaml programs. :)
eni has joined #ocaml
<eni> does ocaml have lazy evaluation by default?
<pippijn> eni: no
<pippijn> eager by default
<pippijn> lazy with explicit syntax
Neros_ has quit [Ping timeout: 246 seconds]
Neros has joined #ocaml
tane has joined #ocaml
andreypopp has joined #ocaml
<gustav__> 500 requests, 250 concurrent through my camlboxes in 5.259 seconds.
<gustav__> Didn't even crash.
<gustav__> That's a bit faster than the lady sitting in the desk in the shop checkout at the supermarket.
<pippijn> yes
<pippijn> a little faster
<pippijn> not much
<gustav__> Too much going on at the check out counter.
<gustav__> I'm having problems with scopes. How do I make b run outside of the try clause here: try\n something; with |e -> (); b;
mjonsson has joined #ocaml
<gustav__> Hmmm. 500 requests concurrent or 250 r c, doesn't matter. It's still 49-51 seconds with 5000 requests. :)
<gustav__> I bet camlbox_wait has 1 second timer somewhere.
<flux> gustav__, parenthesis..
<flux> (try ..); b;
andreypopp has quit [Quit: sleep]
<flux> or, if you prefer, begin/end
<gustav__> Why does these things always work when you tell me how to do it? O_O
eikke has joined #ocaml
<gustav__> Right. I see what I did now.
andreypopp has joined #ocaml
Xizor has joined #ocaml
gustav__ has quit [Remote host closed the connection]
gustav__ has joined #ocaml
Xizor has quit [Read error: Connection reset by peer]
Xizor has joined #ocaml
mrm has quit [Ping timeout: 265 seconds]
andreypopp has quit [Quit: sleep]
eikke has quit [Ping timeout: 276 seconds]
Kakadu has joined #ocaml
notk0 has joined #ocaml
SysTheron has joined #ocaml
Cyanure has joined #ocaml
andreypopp has joined #ocaml
walter|r has joined #ocaml
notk0 has left #ocaml []
emmanuelux has joined #ocaml
mcclurmc has left #ocaml []
ontologiae has joined #ocaml
travisbrady has joined #ocaml
justdit has joined #ocaml
travisbrady has quit [Ping timeout: 260 seconds]
justdit has quit [Read error: Connection reset by peer]
<gustav__> Battle of the programming languages. Who will win?!
mye has joined #ocaml
eni has quit [Quit: Page closed]
justdit has joined #ocaml
mye has quit [Quit: mye]
Yoric has quit [Ping timeout: 252 seconds]
fraggle_laptop has joined #ocaml
eikke has joined #ocaml
<pippijn> is camlp4 broken or is + not a valid unary operator?
<pippijn> oh
<pippijn> it's not valid
<pippijn> but accepted as undocumented extension?
sepp2k has joined #ocaml
<adrien> val (~+) : int -> int
<adrien> Unary addition. You can also write + e instead of ~+ e .
<adrien> Since 3.12.0
<adrien> dunno why it was added that late
<adrien> maybe check
<pippijn> ah
avsm has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
<flux> heh, this is fun:
<flux> # +5;;
<flux> # Error: Parse error: illegal begin of top_phrase
<flux> - : int = 5
<flux> hmm, yet another runtime type system for ocaml: http://rtt.forge.ocamlcore.org/
<adrien> flux: "another"?
<adrien> first free implementation I see
<flux> I was thinking ocamlpro had their own, but I'm probably thinking their overloading stuff
walter|r has quit [Ping timeout: 246 seconds]
<flux> oh, and it's not quite complete
<flux> pretty interesting anyway
<adrien> flux: proposal from Alain Frisch of Lexifi
<adrien> but it's not publicly available
<adrien> I intend to build something for lablgtk using runtime types :-)
<adrien> something to handle the configuration of programs half-automatically
<pippijn> oh
<adrien> half because there will probably be a functor to adapt to the various structures
<pippijn> rtt actually types a program
<pippijn> is it based on the ocaml compiler or did they write a typechecker from scratch?
<pippijn> (or does it not type a program?)
<adrien> I'm a bit annoyed it's done through pp but it'll be a good first try and porting probably won't be too difficult once it gets integrated into ocaml (and it could make that integration faster)
<adrien> pippijn: ocamlc -pp "rtt <includes>" -I +rtt <includes> -c <file.ml>
<pippijn> adrien: and?
<pippijn> what does that tell me?
<adrien> that it's working at the same level as camlp4
<pippijn> nothing keeps something like camlp4 to type a program
<pippijn> keeps from*
<pippijn> is there another way than pp?
xavierm02 has joined #ocaml
<pippijn> I'm going to try this thing
<pippijn> ah
<pippijn> it needs ocaml sources
walter|r has joined #ocaml
<pippijn> so it does type the program
<pippijn> it needs ocaml 4 sources
<pippijn> here ends my test
<adrien> actually it rebuilds the standard library
<pippijn> optionally
<pippijn> well
<pippijn> yes, it also does that
<pippijn> and you can optionally use it
<pippijn> adrien: it uses "types" and "untypeast" modules from the ocaml sources
jamii has joined #ocaml
larhat has quit [Quit: Leaving.]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
djcoin has joined #ocaml
sepp2k has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
justdit has quit [Ping timeout: 264 seconds]
eikke has quit [Ping timeout: 276 seconds]
tautologico has joined #ocaml
andreypopp has quit [Quit: sleep]
andreypopp has joined #ocaml
cdidd has joined #ocaml
leoncamel has quit [Ping timeout: 248 seconds]
tac has joined #ocaml
mye has joined #ocaml
Anarchos has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
larhat has joined #ocaml
walter|r has quit [Quit: This computer has gone to sleep]
Yoric has joined #ocaml
avsm1 has quit [Quit: Leaving.]
walter|r has joined #ocaml
beginner42 has joined #ocaml
tac has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
andreypopp has quit [Quit: sleep]
eikke has joined #ocaml
<beginner42> can someone explain to me why the compiler says unbound module X in my example?
ontologiae has joined #ocaml
andreypopp has joined #ocaml
andreypopp has quit [Remote host closed the connection]
<Qrntz> beginner42, what are you trying to accomplish?
<Qrntz> I'm not sure your syntax is right
Playground has quit [Ping timeout: 252 seconds]
<beginner42> Qrntz: what line are you referring to?
<Qrntz> beginner42, 9 and 12
<beginner42> Qrntz: line 12 is the one the compiler complains about, but where is the mistake in line 9?
zoie has joined #ocaml
andreypopp has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
<Qrntz> beginner42, as far as I know, functors operate in the value space, not type space
zoie has quit [Ping timeout: 245 seconds]
<Qrntz> beginner42, the red-colored text is the output of the OCaml interpreter
<Qrntz> green is actual user input
andreypopp has quit [Quit: sleep]
<beginner42> red could be written into an mli file?
<gustav__> (* Weebly says I've had a lot of traffic. :) *)
<Qrntz> beginner42, yes, that's the signature
<beginner42> so where is the mistake in mine?
andreypopp has joined #ocaml
jamii has quit [Ping timeout: 246 seconds]
<gustav__> Sh-t. Sundays are for sleeping. Nothing else.
<gustav__> |Sunday -> sleep; |_ -> work;
<gustav__> I tried watching a lecture and fell asleep in 5 minutes.
andreypopp has quit [Quit: sleep]
<gustav__> xD
<gustav__> I like how you are always on your own with optimization. There is no automatic procedure.
<Qrntz> beginner42, sorry, premature assumption
<Qrntz> but what's that X.t on line 12 for?
<yezariaely> How can I pass on optional parameters?
<yezariaely> I simply want to do let create ?host ?database = Mysql.quick_connect ~host:host
tautologico_ has joined #ocaml
<yezariaely> host is an optional org of quick_connect, too.
<gustav__> Get the args as a list?
tautologico has quit [Ping timeout: 240 seconds]
tautologico_ is now known as tautologico
<gustav__> Read them as a list.
<Qrntz> yezariaely, try «let create ?host ?database = Mysql.quick_connect ?host …»
Anarchos has quit [Ping timeout: 276 seconds]
fraggle_laptop has quit [Remote host closed the connection]
trotro has joined #ocaml
SysTheron has quit [Quit: Lost terminal]
ozie has joined #ocaml
<ozie> hello, i have a type A of int | B of string, and a Hashtbl mapping string to int's; i want to write a function that treats similarly the case when we have an A of n and a B of s when "s" is in the Hashtbl; how can i write such a "match"?
mye has quit [Quit: mye]
ben_zen has quit [Ping timeout: 256 seconds]
deu5 has joined #ocaml
ben_zen has joined #ocaml
lolcathost has joined #ocaml
<beginner42> Qrntz: the ST.t X.t is a phantom type
mjonsson has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
andreypopp has joined #ocaml
andreypopp has quit [Client Quit]
mjonsson has joined #ocaml
larhat has quit [Quit: Leaving.]
Kakadu has quit [Quit: Konversation terminated!]
eikke has quit [Ping timeout: 265 seconds]
pkrnj has joined #ocaml
pkrnj has quit [Client Quit]
pkrnj has joined #ocaml
answer_42 has quit [Quit: WeeChat 0.3.9]
<ozie> or simpler, i want to make a match on some x of type int option, and i want to use the value 0 when x = None
andreypopp has joined #ocaml
andreypopp has quit [Client Quit]
lolcathost has quit [Ping timeout: 255 seconds]
lolcathost has joined #ocaml
walter|r has quit [Quit: Leaving]
walter|r has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9]
Anarchos has quit [Ping timeout: 246 seconds]
Submarine has quit [Remote host closed the connection]
Anarchos has joined #ocaml
ozie has quit [Ping timeout: 245 seconds]
jamii has joined #ocaml
<yezariaely> help: this type is complicated ... string -> mytype option list ref Lazy.t
<yezariaely> but I think I need it. Any suggestions?
<adrien> lazy + ref? you need both?
<adrien> list of options? why not just skip altogether the elements that would be None?
<adrien> (string -> yourtype) list ref
<adrien> or
<adrien> (string -> yourtype) list Lazy.t
<adrien> is probably just as good
<adrien> bedtime, good night and good luck
fraggle_laptop has joined #ocaml
tane has quit [Quit: Verlassend]
<yezariaely> adrien: thanks! I wanted to fetch stuff from a database lazy, and have a cache for already fetched stuff, thus the option.
<yezariaely> good night to you, too.
jamii has quit [Ping timeout: 246 seconds]
Xizor has quit [Quit: So yes it's mIRC under wine under debian double peche capital. ;) I'll soon see in kfreeBSD.]
xavierm02 has quit [Quit: Leaving]
fraggle_laptop has quit [Remote host closed the connection]
Arsenik has joined #ocaml
Cyanure has quit [Read error: Connection reset by peer]
pkrnj has quit [Quit: Computer has gone to sleep.]
lolcathost has quit [Ping timeout: 252 seconds]
lolcathost has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
lolcathost has quit [Ping timeout: 264 seconds]
tac has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
lolcathost has joined #ocaml
lolcathost has quit [Quit: leaving]
jamii has joined #ocaml
beginner42 has quit [Quit: irc2go]
andreypopp has joined #ocaml
andreypopp has quit [Ping timeout: 255 seconds]
andreypopp has joined #ocaml
andreypopp has quit [Quit: sleep]
Anarchos has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
Arsenik has quit [Remote host closed the connection]
andreypopp has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
pkrnj has joined #ocaml
lolcathost has joined #ocaml
nooy has joined #ocaml
jamii has quit [Read error: Connection reset by peer]
mye has joined #ocaml
justdit has joined #ocaml
lolcathost has quit [Ping timeout: 268 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
ontologiae has quit [Ping timeout: 256 seconds]
travisbrady has joined #ocaml
travisbrady has quit [Ping timeout: 240 seconds]