<tiglionabbit>
I'm running windows. I ran the ocamlmktop command as they said, and it created a binary file called ocaml-graphics. But when I run the ocamlc command, it complains that it can't find the Graphics module
<thelema>
you have to include [graphics.cma] on the ocamlc command line (before your source code)
<tiglionabbit>
I typed the command as it appears on top of the source code samples
<tiglionabbit>
that does have graphics.cma in it
<thelema>
paste your full command
<tiglionabbit>
oh, I see, I guess I can't name my test file graphics.ml, can I
<tiglionabbit>
once I've compiled it, how do I run it on windows?
<thelema>
if you're compiling under windows, you should get a .exe file
<thelema>
if you're compiling under linux, you'll need the for-windows ocaml cross compiler
<tiglionabbit>
oh, I guess I have to name it ending in .exe for windows to run it
<tiglionabbit>
all good now =]
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
rfg has joined #ocaml
ulfdoz_ has joined #ocaml
Obfuscate has quit [Read error: Connection reset by peer]
Obfuscate has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
ccasin has quit [Quit: Leaving]
rfg has quit [Quit: rfg]
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
jakedouglas has quit [Quit: Leaving.]
Guest32448 has quit [Remote host closed the connection]
patronus has joined #ocaml
|marius| has joined #ocaml
det has quit [Ping timeout: 264 seconds]
det has joined #ocaml
dark has joined #ocaml
|marius| has quit [Remote host closed the connection]
|marius| has joined #ocaml
jakedouglas has joined #ocaml
joewilliams_away is now known as joewilliams
ygrek has joined #ocaml
rossberg_ has quit [Read error: Operation timed out]
tab has quit [Ping timeout: 264 seconds]
diml has quit [Ping timeout: 264 seconds]
tab has joined #ocaml
diml has joined #ocaml
joewilliams is now known as joewilliams_away
orbitz has quit [Ping timeout: 240 seconds]
orbitz has joined #ocaml
rossberg_ has joined #ocaml
|marius| has quit [Remote host closed the connection]
jeddhaberstro has quit [Quit: jeddhaberstro]
<dark>
was extlib "incorporated" into batteries?
<thelema>
dark: kind of - batteries has an extlib-compatible mode if you open the right module
<dark>
but in the regular batteries - open Batteries - is there are everything that extlib has? it seems some modules at least changed the name (like Unzip)
<thelema>
unzip is the exception - no unzip in batteries
<dark>
why not? i would expect at least gzip and zip
<dark>
gzip is actually a requirement for some network protocols
<thelema>
because we were using an external library for it, but that got removed to cut dependencies, so it's not there now.
<thelema>
as to networking, that got cut as well - dependencies...
<dark>
hmm
<thelema>
look at the extlibcompat.ml file
Amorphous has quit [Ping timeout: 265 seconds]
<dark>
why isn't there any documentation for the BatCamomile module?
<dark>
does this implement the entire camomile?
<thelema>
it's not for external use - it implements an environment variable that sets the camomile base directory
<thelema>
If you open BatCamomile, you'll have access to this - it's not protected, just not intended for external use.
<dark>
at module Batteries, I see only Batteries_uni, Mutex and RMutex. I'm supposed to open Batteries.Batteries_uni?
<dark>
I see there PMap etc
<thelema>
Batteries_uni is *included* in Batteries
<thelema>
not opened.
f[x] has quit [Ping timeout: 246 seconds]
<dark>
ah.:)
<dark>
is the standard i/o stream from ocaml is completely replaced?
<dark>
i see that all output_* functions now take values from BatIO
<dark>
but print_endline, etc. still uses the old i/o mechanism, right?
<thelema>
yes. The BatIO module is used internally even for functoins that used to take in_channel and out_channels
<dark>
what is the difference? i.e. why was a new type needed?
<thelema>
can't mess with the internals of the stdlib channels, can't implement them with a new backing (such as out_channel that writes to a string)
<dark>
i'm seeing that there are functions to read to enumerations. are this reading lazy?
<dark>
i.e. would it return instantly
Amorphous has joined #ocaml
<thelema>
yes, it'd return instantly
<thelema>
and when you'd try to get values from the enumeration, it'd do the actual IO
<thelema>
possibly with buffering, for performance
<dark>
this is a nice thing that i find hard to implement
<thelema>
well, with the right infrastructure, all those to_enum functions are pretty simple
<dark>
would chunks_of return a string with length less than the available? or will it be less than the maximal length only at EOF?
<thelema>
last chunk can be smaller, all others maximal
<thelema>
internally it uses nread
<dark>
i think this last bit of wisdom could be put at the documentation
<dark>
(last chunk can be smaller, all others maximal)
<dark>
because Unix.read is similar except by this
<thelema>
fix pushed to git.
<thelema>
You're welcome to make the fix next time. git makes merging easy
<dark>
ok :)
<dark>
batteries is with the same situation with streams and enums, right?
<dark>
i think ocamllex and ocamlyacc need streams..
<dark>
is there a way for mixing Lwt's i/o with Batteries'?
<thelema>
Lwt and batteries hould be compatible, but I don't know for sure. I don't use lwt
<dark>
they define their own i/o types at Lwt_io
<thelema>
as for ocamllex, it creates its own annotated stream type - there's a genlex in batteries that you can use instead
<dark>
is this similar to ocaml's genlex? it's a bit restrictive
<thelema>
I take that back, it doesn't look compatible.
<dark>
documentation of BatGenlex.Languages.Library.C says for case_sensitive "true if the language is case-sensitive, false otherwise. If the language is case-sensitive, every identifier is returned as lower-case.", is this right?
<thelema>
as to genlex, I don't use it, so I don't know so much. batteries' genlex is built on top of our parser combinator library, which is not restrictive.
<dark>
parser combinator? i find it interesting. would it be a bit like parsec?
<dark>
it seems to have the same operations
<thelema>
yes, if you set the language to non-case-sensitive, identifiers are returned in lowercase
<thelema>
yes, the two are similar. Parsec might be a bit more mature
<dark>
it seems to say the opposite
<thelema>
ah, you're right.
<dark>
more and more I miss type classes :(
<dark>
lots of libraries define their own >>=
<dark>
I think type classes could solve the problem of 'multiple stream types' too
<thelema>
yes, we have to work around the lack of type classes a lot
<thelema>
it's just a bit more explicitness in our code
f[x] has joined #ocaml
<dark>
if one were to extend Lwt i/o to work with batteries, what is the right approach? to make an Lwt_batteries that implement the same functions but calling BatIO?
<dark>
this might be straightforward, i think it just uses the regular output_string, etc
<dark>
so it would be just a matter of or a) doing open Batteries at top, or b) qualifying the identifiers to another module
<thelema>
batteries has an OO-i/o interface too, which has standardized across a few libraries. Lwt would just need functions to turn one of those into its internal type
<dark>
hmm
<dark>
is it considered slower?
<thelema>
OO? yes
<thelema>
extra conversions, also yes.
<thelema>
Maybe some agreement could be made on a single IO system, but there's a lot of NIH (Not Invented Here) going on still in the ocaml world
<dark>
i would be nicer if ocaml standard library could adopt some things
<flux>
iirc extlib's/batteries' IO system doesn't really work for non-blocking io, does it?
<thelema>
I'm not sure what'd be needed - never thought about it so much.
<dark>
I find it difficult to follow BatSubstring.taker description
<thelema>
I imagine if the underlying channel was non-blocking...
<flux>
thelema, part of the problem is that you cannot use Unix.select (or a replacement) without knowing the fd's of the underlying channels
<thelema>
same as takel except it works on the right end
<thelema>
flux: true, which we've abstracted away in batteries
<thelema>
let taker p (str, off, len) = let i = ref len in while !i > 0 && p str.[off+ !i - 1] do decr i; done; (str, off+ !i, len- !i)
<dark>
I think lwt has a concept useful enough to be included in the standard library. (lua has it, i miss it on other languages)
<flux>
I find Lwt somewhat disorganized..
<flux>
but maybe it's just me :)
empt has joined #ocaml
Associat0r has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
jakedouglas has joined #ocaml
empt has left #ocaml []
dark has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
eelte has quit [Ping timeout: 240 seconds]
eelte has joined #ocaml
ikaros has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
ben_m has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 258 seconds]
ikaros has joined #ocaml
ikaros_ has quit [Read error: Operation timed out]
ikaros has quit [Client Quit]
<ben_m>
Hey there :)
<ben_m>
Can't find anything on Google about ( <- ) ... what is it?
<ben_m>
Is that a regular operator, or syntactic sugar for certain things?
ulfdoz_ has quit [Quit: Reconnecting]
<flux>
it's the mutation operator
<flux>
it works for values that are mutable
ulfdoz has joined #ocaml
<flux>
for example let a = ref 42
<flux>
then: a := 44 is the same as a.contents <- 44
<adrien>
for references, mutable fields of records, arrays or strings
<flux>
well, maybe that wasn't the best explanation, but take this definition into account: type 'a ref = { mutable contents : 'a }
<ben_m>
flux: No, it was good, thanks :)
<ben_m>
arrays and strings are always mutable?
<flux>
yes
<ben_m>
I see :)
Yoric has quit [Quit: Yoric]
Anarchos has joined #ocaml
Yoric has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
f[x] has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
f[x] has joined #ocaml
_unK has joined #ocaml
oriba has joined #ocaml
pikachuyann has joined #ocaml
rfg has joined #ocaml
<ben_m>
Can anyone recommend an OCaml tutorial/book?
<adrien>
ben_m: which level?
<adrien>
intro, in-depth, ... ?
<ben_m>
Well, I know functional programming already, from Haskell, but I don't mind a beginner's intro.
<flux>
ben_m, the ocaml manual is a good read. then there are some books linked from www.ocaml-tutorial.org.
<ben_m>
What about ocaml-tutorial itself? :D
<flux>
well, that too, but it isn't a single coherent document
<ben_m>
oh :)
<ben_m>
I'll browse around on that site, thanks.
rfg has quit [Quit: rfg]
tiglionabbit has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
oriba has quit [Remote host closed the connection]
oriba has joined #ocaml
Yoric has joined #ocaml
rfg has joined #ocaml
ikaros has joined #ocaml
<adrien>
gildor: I've always been curious: do you know if search engines are responsible for some of the downloads on the forge?
<gildor>
adrien: no they don't
<gildor>
adrien: why?
<adrien>
gildor: wondering if 2 (or 4 or 6) downloads were because of search engines (following an announcement) or actual people :P
<gildor>
there is ~2 foreach lablwebkit*
<gildor>
and at least one done by me ;-)
<gildor>
don't know the other guy
aymeric has joined #ocaml
<gildor>
BTW, I am not able to build the doc
<adrien>
hehe ;-)
<adrien>
but I was wondering especially because g_thread_init is a hard requirement for running lablwebkit (I need to make a patch to lablgtk2)
<adrien>
I'm going to see the doc, I hadn't paid attention to it until now
<gildor>
and the toplevel of lablwebkit should be lablwebkit-1.3.3 not webkit
<gildor>
use a .cmo for gThreadInit if you want it to call init
<gildor>
a .cma not referenced is not evaluated
<adrien>
yup, I saw the issue with the name: it's currently generated (well, as everything else)
<adrien>
right, I used 'module X = GThreadInit' in the test file, I didn't know a cmo would be evaluated
<adrien>
I've changed the folder name but the change to gthreadinit is proving more annoying so I'll provide a patch to lablgtk2 instead (Jacques had accepted to get the function added to lablgtk2 for the last release but has forgotten apparently)
ccasin has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 265 seconds]
ygrek has quit [Ping timeout: 245 seconds]
slunk has joined #ocaml
ikaros_ has quit [Ping timeout: 246 seconds]
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
jakedouglas has joined #ocaml
<tab>
gildor: i'm using the darcs version from last week not 0.1.0. no showstopper anyway for now, just getting used to the tools take times :P
ygrek has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
sepp2k has joined #ocaml
rfg has quit [Ping timeout: 265 seconds]
rfg has joined #ocaml
rfg has quit [Client Quit]
hto has quit [Read error: Connection reset by peer]
hto has joined #ocaml
slunk has quit [Remote host closed the connection]
slunk has joined #ocaml
Anarchos has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 276 seconds]
Yoric has quit [Quit: Yoric]
<pikachuyann>
bonne nuit / good night
_unK has quit [Remote host closed the connection]
pikachuyann has quit [Quit: Quitte]
ulfdoz has quit [Ping timeout: 255 seconds]
xmarteo has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 260 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ygrek has quit [Ping timeout: 245 seconds]
boscop_ has quit [Quit: OutOfTimeException: Allocation of TimeFrame failed due to lack of time. Terminating...]