ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
lightstep has quit [Read error: 110 (Connection timed out)]
lightstep has joined #ocaml
<lispy`>
ahdme: check out chanserv
<Smerdyakov>
He left loooong ago.
<lispy`>
his lose :)
<lispy`>
er loss
pango__ has joined #ocaml
Smerdyakov has quit ["reboot"]
pango_ has quit [Read error: 110 (Connection timed out)]
threeve has quit []
Smerdyakov has joined #ocaml
Mike_L has left #ocaml []
lightstep has quit ["leaving"]
damaru_ has joined #ocaml
damaru_ has quit ["Leaving"]
vezenchio has joined #ocaml
tom_p has quit [Read error: 110 (Connection timed out)]
tom_p has joined #ocaml
m3ga has joined #ocaml
__DL__ has joined #ocaml
chs has quit []
lispy` has quit [Remote closed the connection]
lispy` has joined #ocaml
lispy` has quit [Remote closed the connection]
lispy` has joined #ocaml
Snark has joined #ocaml
Submarine has joined #ocaml
ski has joined #ocaml
smimou has joined #ocaml
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
tom_p has quit [Read error: 110 (Connection timed out)]
mrpingoo has joined #ocaml
vodka-goo has quit [Read error: 110 (Connection timed out)]
Skal has joined #ocaml
_JusSx_ has joined #ocaml
haakonn_ has joined #ocaml
haakonn has quit [Read error: 110 (Connection timed out)]
Boojum has joined #ocaml
Snark has quit [Nick collision from services.]
Boojum is now known as Snark
Skal has quit [Remote closed the connection]
Skal has joined #ocaml
Skal has quit [Remote closed the connection]
<mellum>
Hmm. How can I find a key/value pair in a Map that fulfills some property?
<mellum>
Using fold, it seems I have to walk over all pairs, even if the very first is OK already
m3ga has quit ["disappearing into the sunset"]
<Schmurtz>
mellum, Map does not have this feature
<mellum>
Yeah, looks like it.
<mellum>
I guess I'll have to use exceptions or something.
<mellum>
Or just go and implement my own set datatype...
<Schmurtz>
exceptions may be a good solutions
<Schmurtz>
or use lists
<mellum>
what do you mean, "use lists"?
<Snark>
List.find
<Snark>
gives the first element matching a condition
<mellum>
How does List.find help me with finding something in a Map?
<Snark>
mellum: hence the "use lists" ...
<mellum>
well, I don't really want O(n) complexity for almost anything, so no.
Schmurtz has quit [Remote closed the connection]
Schmurtz has joined #ocaml
Schmurtz has quit [Remote closed the connection]
Schmurtz has joined #ocaml
gim has quit [Remote closed the connection]
pango__ is now known as pango
chs_ has joined #ocaml
gim has joined #ocaml
desc has joined #ocaml
syntaxfree has joined #ocaml
syntaxfree has quit ["Quitting!"]
UziMonkey has quit [":q"]
descender has quit [Read error: 110 (Connection timed out)]
gim_ has joined #ocaml
Skal has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
jave has joined #ocaml
<jave>
does the ocaml compiler support cross compiling? or must I use a specific compiler for each architecture? im trying to build a program for an athlon on an amd64.
<lispy`>
jave: you could build it for the bytecode interpreter
<lispy`>
but i don't know about crosscompiling
<sethk>
I believe you can get it to generate C code, and you can then cross compile the C code
threeve has joined #ocaml
<mflux_>
I don't think ocaml has C backend?
<mflux_>
atleast with byte compiling ocaml can be used as a cross compiler
<mflux_>
for ocaml libraries and stuff too, naturally
<mflux_>
but it doesn't exactly come as a cross compiler out of the box, you may need to edit the configuration (and there may have been some patch for that purpose on the net somewhere, can't really remember)
<mflux_>
(I've tried it, but for a platform that ocaml doesn't natively support, so bytecode was the only option)
<pango>
ocamlopt generates native code, not C code
<lispy`>
is there any restriction on how the compiled code can be used?
<Smerdyakov>
MLton generates C code, though. ;)
<lispy`>
someone asked the other day and i didn't see the answer
<Smerdyakov>
lispy, what does that mean?
<jave>
tnx all, seems I must compile an ocamlopt to generate i386
<jave>
code then
<sethk>
pango, ocamlc has an option telling it which C compiler to use
<Smerdyakov>
sethk, ocamlc uses a C compiler?
<sethk>
Smerdyakov, the option says so. maybe the option is wrong.
<sethk>
let me double check
<Smerdyakov>
I don't think it's compiling C code that corresponds with ML code.
<pango>
ocamlc is the bytecode compiler
<sethk>
yes, it says "use <command> as the C compiler and linker
<pango>
you can probably tell when C compiler to use when linking bytecode with C libs
<sethk>
ok
Schmurtz has quit [Read error: 113 (No route to host)]
<pango>
s/when/what/
<sethk>
has also pass flags to the compiler and pass flags to the linker
<sethk>
pango, you think it is related to creating a runtime system?
Schmurtz has joined #ocaml
<mflux_>
it uses the c-compiler only for linking (the standard c library is used by the ocaml runtime library)
<mflux_>
some of the ocaml rtl is written in c
<sethk>
mflux_, the flag says "compiling and linking". so you think it is recompiling the rtl when you use that flag?
<mflux_>
another point of view: if ocaml generated C it would support basically support all platforms natively
<mflux_>
but it doesn't
<sethk>
mflux_, I understand, I'm just trying to understand how the ocamlc flag is used
<lispy`>
Smerdyakov: could i compile something with ocaml and then sell the binary?
<mflux_>
it is the c compiler it calls
<beschmi>
you can use ocamlc as a wrapper to compile c files (for ffi)
<mflux_>
it doesn't call it for compiling
<pango>
lispy`: sure
<lispy`>
pango: i thought so
<sethk>
beschmi, ok, so that's when the "use compiler" and "pass flags to compiler" flags of ocamlc are used?
<mflux_>
this is what happens when I compile foo.ml to native binary: gcc -o foo -I/usr/lib/ocaml/3.08.3 /tmp/camlstartup17dc53.o /usr/lib/ocaml/3.08.3/std_exit.o foo.o /usr/lib/ocaml/3.08.3/stdlib.a -L/usr/lib/ocaml/3.08.3 /usr/lib/ocaml/3.08.3/libasmrun.a -lm -ldl
<mflux_>
so, it calls the compiler.
<mflux_>
but the compiler compiles no code
<mflux_>
beschmi, hm, oh it did that too
<beschmi>
sethk: yes, but i don't know if the flags are used for something else too
<sethk>
beschmi, k
<pango>
gcc is not the compiler, but a frontend that can call the compiler, the linker,...
<pango>
the compiler is called cc1 on my box, and is located in /usr/lib/gcc-lib/i486-linux/3.3.5 ...
<mflux_>
I think that statement fits also to other (unix) platform's compilers (cc)
<lispy`>
so here is an odd question
<lispy`>
i was played around with the game boy advance using gcc, would that be possible using ocaml?
<pango>
I don't understand why cross compiling instructions are so hard to find
<lispy`>
what would you have to do to make it possible to work on that platform?
<sethk>
pango, you mean for gcc? building a gcc cross compiler is very easy
<pango>
sethk: no, for ocaml
<mflux_>
lispy`, well, I don't know which cpu gba has, but I assume there's no native support for it.. so you would simply compile an ocaml platform for it and move it over, than you could compiler bytecode binaries in your system and copy them (the same bytecode binaries you can run in your development system!) and use them in the gba
<mflux_>
lispy`, although if the OS is not the same there can be some problems, as some aspects of the platform are written to the binary during compilation..
<lispy`>
mflux_: okay, the gba is mostly arm32, but it doesn't have enough resources to be running an "OS"
<lispy`>
i'm not sure how GC would work
<mflux_>
I think for example / versus \ in path separator was one problem
<lispy`>
ocaml would have to run on the bare machine
<lispy`>
which is what C does when compiled for the gba
gim__ has joined #ocaml
<mflux_>
well, I can't see why gc wouldn't work if you can provide malloc and free
<lispy`>
hmm...yeah i think those were available
<lispy`>
also in C you could poke at specific memory addresses, but perhaps you'd want to keep that in C and use the FFI
<lispy`>
or even write peek/poke
<mflux_>
basically all you need to do is port the runtime library and byterun to gba :)
<lispy`>
i fear you'd run out of resources :)
<mflux_>
or just drop the parts of rtl you don't need to make that simpler
* lispy`
nods
<lispy`>
in that case i wonder if caml light is a better starting place (not that i'm actually going to do this)
<mflux_>
infact you might in practice want to put all your stuff into the static part of the ocaml, if you don't want to provide dynamic loading of libraries
<lispy`>
no, certainly not
gim has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
gim_ has quit [Read error: 110 (Connection timed out)]
gim_ has joined #ocaml
gim__ has quit [Read error: 110 (Connection timed out)]
gim has quit [Read error: 104 (Connection reset by peer)]
tmccort has joined #ocaml
<tmccort>
Why doesn't the lablgl binary download come with cmxa files incase you want to compile with opt instead of the bytecode compiler?
<Smerdyakov>
I bet it does in Debian, if it has a package.
<tmccort>
The windows binary I mean that is downloadable from the main lablgl site.
<Smerdyakov>
Windows? Hehe.
<tmccort>
I tried building it myself but the build system is flawed.
<Smerdyakov>
Why are you using Windows?
<tmccort>
Why not?
<Smerdyakov>
Because Windows is generally poor as a development platform?
<tmccort>
I've tried about 4 linux distributions and found that they all suck.
<tmccort>
That's why.
<tmccort>
I hate to whole need for packages and having program files spread across the whole friggin hard drive.
<pango>
coming from a Windows user, that's laughable
<pango>
even if it's slowly improving
<tmccort>
I like open source software but I just don't like Linux. SOrry.
<Snark>
tmccort: *BSD ?
<tmccort>
I also hate the bizarre file system structure.
<tmccort>
I don't want all my files spread across the hard drive in different places. Maybe that makes sense for a multiuser system but I'm the only user so... I don't like it.
<pango>
"your files" are in your home directory
<tmccort>
I'm the only user, all files are technically my files since I'm the only to has to keep track and install everything.
<pango>
technically they're probably managed
<pango>
even under windows they're coming to the idea that managed system is better
<pango>
windows installer is now required to get the "designed for Windows ..." logo
<pango>
too bad windows installer is crap
<tmccort>
All this talk of making Linux more acceptable to the desktop is laughable in my oppinion.
<tmccort>
I use the nullsoft installer.
<sethk>
tmccort, the file system has absolutely nothing to do with the way you choose to organize your file tree. The identical tree can be used in windows or in linux.
<pango>
well, I have diskless terminals running in a town hall, to run open office & all
<pango>
there's more to a "desktop environment" than typing documents, but it's getting there
<tmccort>
I've used linux off and on for awhile... I really want to like it but in the end I keep uninstalling it and reinstalling windows.
<pango>
that's because you've been using windows for long
<sethk>
tmccort, if you are happy with windows, then use windows. There is no point installing a *nix more than once, it isn't going to change.
desc is now known as descender
<pango>
so you feel more at home in this environment, it's normal
<Snark>
there's no point in installing when live CD exist...
<tmccort>
I may be ammused to know that I occasionaly work on the ReactOS project ;)
<tmccort>
You may be rather.
<pango>
I'd rather not care
<sethk>
ah, a mole. :)
<tmccort>
When the driver install is working I think that it will get alot more attention.
<tmccort>
Why is ocaml so damn fast? I wouldn't have expected it to be so.
<Submarine>
because Xavier is a hippopotamus
<tmccort>
I see.
<pango>
tmccort: from reading http://wiki.cocan.org/ocaml_on_windows it seems the issue is known (native port of lablgtk only working in bytecode mode ), but the reason isn't given :/
<tmccort>
I was talking about lablgl
<pango>
oh ok
<lispy`>
tmccort: what did you try to build it with?
<lispy`>
i seet that graphics support isn't there under all build configurations
vezenchio has quit ["Free Tibet with each Asian nation of a lesser or equal value"]
Snark has quit [Read error: 110 (Connection timed out)]
<tmccort>
First I tired just mingw, then I tried cygwin with mingw, both had problems. The build system is kinda screwing though. for example in in the ming config file it says to use glu version 1.3 and gl version 1.2 when mingw comes with 1.2 and 1.1 respectivly.
<lispy`>
hmm...well that could be annoying
<lispy`>
there must be a way to upgrade those
Submarine has quit ["Leaving"]
<tmccort>
I just don't understan why prebuilt cmxa files aren't included in the lablgl binary download.
<lispy`>
i think they are on non-windows
<lispy`>
in osx they were there
<pango>
tmccort: I wonder whether it's a technical or legal issue...
gim_ is now known as gim
Skal has quit [Remote closed the connection]
mrpingoo has quit []
Schmurtz has quit ["Dodo !"]
__DL__ has quit [Remote closed the connection]
_JusSx_ has quit ["leaving"]
smimou has quit ["?"]
tmccort has quit []
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
chs_ has quit [Read error: 113 (No route to host)]
tmccort has joined #ocaml
<tmccort>
It's alittle annoying that negative number must be put in brackets :|