monochrom has quit ["Few people understand "understanding"."]
mattam has quit ["zZz"]
smkl_ has joined #ocaml
<KrispyKringle>
cabled?
humasect has quit [Read error: 104 (Connection reset by peer)]
humasect has joined #ocaml
humasect has quit [Read error: 54 (Connection reset by peer)]
humasect has joined #ocaml
Skal_ has quit ["Client exiting"]
cjohnson has quit ["banana"]
kuribas has quit ["ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)"]
smkl_ has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
Sonarman_ has joined #ocaml
smkl_ has joined #ocaml
Sonarman has quit [Read error: 110 (Connection timed out)]
monochrom has joined #ocaml
jeff2 has joined #ocaml
<jeff2>
will ocaml optimize a recursive expoentation method that uses the fact that (in pseudocode) x^n=x*x^(n-1) into one that uses x^n=x^(n/2)*x^(n/2)?
<Riastradh>
Doubtful. OCaml's compiler performs hardly any optimization.
<jeff2>
Riastradh: thought so. thanks
smkl_ has quit [Read error: 110 (Connection timed out)]
Herrchen_ has joined #ocaml
<tsume>
if you want optimised code, you must do it yourself
<Riastradh>
If you want optimized code, don't use OCaml. Some optimizations can be applied as simple manual program transformations, but the really important ones, mostly regarding closure conversion, require compiler support.
Herrchen has quit [Read error: 110 (Connection timed out)]
<monochrom>
Wow I would love to see a "compiler" that does the foregoing optimization!
<det>
monochrom, What do you mean?
<monochrom>
The one jeff2 describes.
smkl_ has joined #ocaml
m3ga has left #ocaml []
monochrom has quit ["Few people understand understanding."]
__DL__ has joined #ocaml
Sonarman_ has quit ["leaving"]
mlh has quit [Client Quit]
smkl_ has quit [Read error: 110 (Connection timed out)]
Msandin has joined #ocaml
Snark has joined #ocaml
smkl_ has joined #ocaml
gim has quit []
vincenz has joined #ocaml
skylan has quit [Read error: 60 (Operation timed out)]
smimou has joined #ocaml
pango has quit [Remote closed the connection]
zzorn has joined #ocaml
pango has joined #ocaml
solarwind has joined #ocaml
humasect has quit [Read error: 104 (Connection reset by peer)]
humasect has joined #ocaml
zzorn has quit ["They are coming to take me away, ha ha"]
smkl_ has quit [Read error: 60 (Operation timed out)]
grirgz_ has joined #ocaml
grirgz has quit [Nick collision from services.]
grirgz_ is now known as grirgz
smkl_ has joined #ocaml
<slashvar[lri]>
Hi there
slashvar[lri] is now known as slashvar[ens]
<vodka-goo>
yo
kinners has joined #ocaml
mattam has joined #ocaml
<slashvar[ens]>
hi mattam ;)
<vincenz>
hello
vodka-goo has quit ["hop"]
smimou has quit ["?"]
gim has joined #ocaml
smkl_ has quit [Read error: 60 (Operation timed out)]
kinners has quit ["leaving"]
Skal has joined #ocaml
smkl_ has joined #ocaml
zzorn has joined #ocaml
jourdechance has joined #ocaml
zzorn has quit [Read error: 104 (Connection reset by peer)]
withersoever has quit [Read error: 54 (Connection reset by peer)]
jourdechance has quit [Read error: 113 (No route to host)]
jourdechance has joined #ocaml
zzorn has joined #ocaml
<grirgz>
bye
grirgz has left #ocaml []
palomer has joined #ocaml
CosmicRay has joined #ocaml
Msandin has quit [Read error: 110 (Connection timed out)]
Msandin has joined #ocaml
smkl_ has quit [Read error: 110 (Connection timed out)]
drewr has joined #ocaml
Godeke has joined #ocaml
solarwind has quit ["leaving"]
drewr has quit ["ERC Version 5.0 $Revision: 1.733 $ (IRC client for Emacs)"]
madroach has joined #ocaml
<madroach>
Hi, is it possible to cross compile from Unix to Windows??
<Snark>
doesn't ocamlc give portable bytecode?
<Smerdyakov>
Snark, yes.
<Smerdyakov>
madroach, who cares about Windows? :D
<vincenz>
hello Smerdyakov
<madroach>
You will need an interpreter on the target-machine, won't you?
<vincenz>
if you use bytecode you need one anyways
<madroach>
I thought of an ocamlc -custom using a windows runtime.
<humasect>
madroach: since it [can] goes through gcc, you can have gcc mingw cross compile tools instead
<humasect>
and it will generate native win32 ocaml exes
<Smerdyakov>
That's ocamlopt, though.
<madroach>
Smerdyakov: pupils who have to use windows in their lessons will care :(
<Smerdyakov>
madroach, those dummies. Tell them to wise up.
<humasect>
he never specified opt/c
<humasect>
er.
<humasect>
everyone's world is different. wise up.
<madroach>
thanks so far.
<Smerdyakov>
They can run an X server and run OCaml elsewhere. :D
<humasect>
they can probably do lots of things which are distracting to their task at hand
<Smerdyakov>
Yeah, like make sure they pay for Windows licenses.
<humasect>
yeap =)
<Snark>
yes, setup a single unix account somewhere with a ridiculous connection and a ridiculous quota, and let the fittest survive ;-)
<Smerdyakov>
Snark, we had many such UNIX machines at my undergrad school, and it worked fine....
<Smerdyakov>
I'm not just goofing around. X-from-Windows is how I did most of my work as an undergrad.
<Snark>
oh...
<madroach>
Another question: I wrote a function calculating every permutation of a given list. It works fine for lists smaller than 9 elements. Applied to more arguments it says Stack overflow, although it should only hav a recursion depth of not more than the list length.
<madroach>
Shouldn't it say heap overflow or something like that?
<vincenz>
madroach: apparently you do not
<Smerdyakov>
madroach, it's probably an error in your function.
<vincenz>
madroach: euhm...shouldn't you pinch off one element and then keep going?
<vincenz>
somehow that looks like endless loop...
<vincenz>
but I have to admit, I'm befuddled by your code
<madroach>
vincenz: List.filter does the job. It works as long as the list is shorter than 9 elements.
<madroach>
out of [1;2;3] it calculates [[1; 2; 3]; [1; 3; 2]; [2; 1; 3]; [2; 3; 1]; [3; 1; 2]; [3; 2; 1]]
<vincenz>
hmmm
<vincenz>
not quite sure of what is in that begin end block
<vincenz>
why even have the begin and end?
<vincenz>
it makes no sense
<madroach>
I was just wondering why it tells me of stack overflow although it only needs much mem for the lists. Recursion depth is only the length of the list.
<vincenz>
you tried checking how many times it's executed?
<vincenz>
anyways that begin end is really .... strange
<vincenz>
really strange
<madroach>
I traced it in toplevel.
<vincenz>
oh
<Snark>
madroach: permutations are O(n!) not O(n)
<vincenz>
madroach: I'm not quite sure I see the logic of your code
<vincenz>
and what snark said....
<vincenz>
meaning you also have O(n!) execution
<madroach>
Snark: yes, the are. But this is only bad for Heap, not for Stack.
<vincenz>
and typically stack is smaller than heap
<vincenz>
madroach: not true...you're not tail recurisve
<vincenz>
and I really fail to see the logic of your function
<madroach>
vincenz: But still my recursion depth is only the list length.
<vincenz>
madroach: not true...you got fold_left and inside of it map and inside of it permutations
<vincenz>
but please...
<vincenz>
explain to me the logic of your function
<madroach>
You can try it in toplevel and trace it if you like to.
<vincenz>
you ave a special case for an empty list...
<vincenz>
just a strange usage of |
<madroach>
because I return a list of lists.
<vincenz>
well...typically you use recursion and | if each call to permutations is with smaller stuff
<mrvn>
permutations of [] are []
<vincenz>
madroach: explain me the logic of your function?
<vincenz>
so if you have a list... you do a fold_left that does...
<vincenz>
besides...the @ is also non tail recursive
* vincenz
codes a new version
<madroach>
vincenz: That's true...thanks.
<vincenz>
I'll make one with constant depth
<vincenz>
or almost
<vincenz>
hmm
<mrvn>
Is @ not tail recursive?
<vincenz>
no
<madroach>
nop
<mrvn>
replace that with a tail recursive one and it should work.
<madroach>
mrvn: did it, still doesn't work.
<mrvn>
List.map is tail recursive, right?
<vincenz>
yes
<mrvn>
List.filter?
<vincenz>
yes
<madroach>
mrvn: filter has to handle only small lists.
<mrvn>
I build the permutation recursively by trying each element in the list and passing a list without it down the line. When the permutation is complete it gets added to accu.
<mrvn>
So no append when coming out of the recursions.
<mattam>
may windows doesn't let you use more than n chars in a command ?
<swaplinker>
i'm using mingw && msys
<swaplinker>
so i put compilations commands in a rvxt console
<mattam>
hmm, i have no idea then :)
<swaplinker>
it's very strange
<swaplinker>
probably nobody here already have linked more than 11 files :)
pango has quit ["Leaving"]
mrvn has quit [Read error: 110 (Connection timed out)]
<vincenz>
re
<vincenz>
WOOO
<vincenz>
the new icfp site is up
<vincenz>
sponsored by plt-scheme
humasect has quit [Read error: 104 (Connection reset by peer)]
* vincenz
starts rallying together a team
humasect has joined #ocaml
<det>
This year's competition rewards programmers who can plan ahead. As before, we'll announce a problem and give you three days to solve it. Two weeks later, we'll announce a change to the problem specification and give you one day to adapt your program to the new spec. And you guessed it: the second half will be worth considerably more than the first.
<mauke>
huhu
Yorick has joined #ocaml
<vincenz>
WOOOOHOOO
<vincenz>
I'm so excited
* vincenz
bounces around like a rotten egg
* Yorick
feels like a catalyst
pango has joined #ocaml
<mrvn_>
vincenz: url
<mrvn_>
an ocaml team?
<vincenz>
sounds good
<vincenz>
and you know why?
<vincenz>
2 years ago I did it in scheme, that went ok except our team fell apart
<vincenz>
last year I did it in C++
<vincenz>
development was so slow that durng one night
<vincenz>
most were gone
<vincenz>
I built the simulator in ocaml
<vincenz>
and patched C++ interfaces
<vincenz>
:P
<vincenz>
each time the setup was my box = public cvs
<vincenz>
my only issue with ocaml: gui
<mrvn_>
lablgtk?
<det>
vincenz, you mean for ICFP?
<det>
vincenz, or in general?
<mrvn_>
I hope ICFP doesn't need a big gui
<vincenz>
det: ICFP
<vincenz>
mrvn_: I've found that gui's help a lot
<vincenz>
mrvn_: last year to see the ants, the year before to see the car
<vincenz>
typicall guis are good
<det>
well
<det>
LablGL seems ideal for visualization of past ICFP problems
<vincenz>
I just wish there was something built into ocaml
<vincenz>
that uses native windowing
<mrvn_>
I wish I could use the labl* stuff better
<vincenz>
so you don't need to compile extra libs
<det>
vincenz, who cares about anything other than GTK :)
<vincenz>
ugh
<vincenz>
got a tutorial?
<mrvn_>
vincenz: I wrote some simmple gui stuff for Graphics. But without right/left mouse clicks it sucks.
<vincenz>
yah
<mrvn_>
The mouse events hsould have "int button;"
<vincenz>
well I loved drscheme's gui-oo classes
<det>
ocamlsdl does input handling
<vincenz>
just hook in the right closuers
<vincenz>
and you're set
<vincenz>
SO lovely
<mrvn_>
Anyone used the gtk gui generator with ocaml?