<wolfslack>
i would like to dive in to your code. But im doing an exam right now.
<wolfslack>
ends in 3 hours
verte has joined #ocaml
maskd has quit [wolfe.freenode.net irc.freenode.net]
ulfdoz has joined #ocaml
maskd has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
ulfdoz has quit [Read error: 60 (Operation timed out)]
<BigJ>
wolfslack, online exam ?
thelema_ has joined #ocaml
thelema has quit [Read error: 54 (Connection reset by peer)]
<wolfslack>
BigJ : yeah, 48 hours
<BigJ>
it takes 48 hours to complete?
<wolfslack>
well, you HAVE 48 hours to complete it yes :) So depending on how you distribute the workload i suppose :P
<BigJ>
haha that makes more sense
maskd has quit [wolfe.freenode.net irc.freenode.net]
hto has quit [wolfe.freenode.net irc.freenode.net]
hugin has quit [wolfe.freenode.net irc.freenode.net]
svenl has quit [wolfe.freenode.net irc.freenode.net]
deavid has quit [wolfe.freenode.net irc.freenode.net]
animist has quit [wolfe.freenode.net irc.freenode.net]
noj has quit [wolfe.freenode.net irc.freenode.net]
prigaux has quit [wolfe.freenode.net irc.freenode.net]
bacam has quit [wolfe.freenode.net irc.freenode.net]
fremo has quit [wolfe.freenode.net irc.freenode.net]
mrvn has quit [wolfe.freenode.net irc.freenode.net]
Ori_B has quit [wolfe.freenode.net irc.freenode.net]
TaXules has quit [wolfe.freenode.net irc.freenode.net]
Ori_B has joined #ocaml
prigaux has joined #ocaml
hugin has joined #ocaml
mrvn has joined #ocaml
animist has joined #ocaml
TaXules has joined #ocaml
fremo has joined #ocaml
svenl has joined #ocaml
fremo is now known as Guest33082
deavid has joined #ocaml
maskd has joined #ocaml
hto has joined #ocaml
Associat0r has quit []
wolfslack has quit ["Ex-Chat"]
ygrek has joined #ocaml
bacam has joined #ocaml
ttamttam has joined #ocaml
mishok13 has joined #ocaml
Yoric[DT] has joined #ocaml
valross has quit [Remote closed the connection]
<Camarade_Tux>
BigJ: actually no, you have a scoping problem
<Camarade_Tux>
here's how vim autoidents your code:
<Camarade_Tux>
let print_vec_store (s:vec_store) =
<Camarade_Tux>
for i = 0 to s.size -1 do
<Camarade_Tux>
let a = print_vector s.seq.(i) in
<Camarade_Tux>
print_endline a;
<Camarade_Tux>
done ;
<Camarade_Tux>
let my_vec = make_vec_store () in
<BigJ>
Camarade_Tux, I figured it out, just writing the rest of my testing code
<Camarade_Tux>
he :)
<BigJ>
I'll show you my code when it's done, I wish I could put my testing code in a seperate file but I don't know if it will work with the marking because there is objective tests that are run by scripts
<BigJ>
so I have to be exact with naming file names etc
Ched has joined #ocaml
ikaros has joined #ocaml
onigiri has quit []
Yoric[DT] has quit ["Ex-Chat"]
valross has joined #ocaml
rwmjones has quit [Read error: 148 (No route to host)]
Ched has quit [Read error: 113 (No route to host)]
david_ has joined #ocaml
david_ is now known as Yoric
<Yoric>
hi
noj has joined #ocaml
tmaedaZ is now known as tmaeda
<BigJ>
can anyone tell me why my code raises an exception 7 times when I don't think it should raise an exception at all...
<flux>
in any case, I was going to say that even codepad notices there's something wrong with your code
proteus has quit ["Leaving"]
<flux>
it says 'output' at the end
<flux>
and indeed the if for do else-structure cannot work
<BigJ>
ya it's syntactically wrong
<flux>
and the way you're goint about it (special casing removal of last element) doesn't seem all that great
<BigJ>
what do u recommend?
<flux>
the previous version
<flux>
perhaps you have trouble thinking the proper way to do it
<flux>
so maybe you should consider this: how things work if yuo have a 0-element array, and you try to delete its element 0 or element 1, what happens if yuo have a 1-element array, etc
<flux>
this way you rapidly realize what the corner cases are
<flux>
(infact, this is the way how many recursive functions are built in ocaml, and if you're dealing with lists, it's more obvious if you're missing some situation)
<BigJ>
i should implement it with recursion ?
<flux>
this is so straight-forward case that for is a ok
<BigJ>
ok
Yoric has quit ["Leaving"]
Yoric[DT] has joined #ocaml
<BigJ>
flux, k if I have a 1 element in the array then the nil element gets copied over...
verte has joined #ocaml
<flux>
bigj, btw, if you are having problems with exceptions popping up, do this: compile with -g (ocamlc -g ..) and then "export OCAMLRUNPARAMS=b" prior to running it
<flux>
it will show the exact line
<flux>
..and all the call levels before that
<flux>
if you still cannot figure it out, try adding debug output or use ocamldebug
<flux>
(I haven't really used ocamldebug, but I suppose it's nice)
<BigJ>
i still don't understand why when I have elements that are the same it counts them as 1 and deletes the element after
<flux>
can you provide a simple test case? so that file and some code that calls it, but produces unexpected output
<flux>
(preferably you'd only print the part where one can quickly see the difference)
<Camarade_Tux>
is anyone on windows right now?
<flux>
no, but I could start a windows machine in perhaps 30 seconds
<flux>
it doesn't have ocaml though, if that's what you'd like
<Camarade_Tux>
I need libffi which comes with gcc usually
<flux>
you need libffi from a windows gcc installation?-o
<Camarade_Tux>
yeah :D
<flux>
I'm afraid my virtual windows doesn't have gcc..
<Camarade_Tux>
ok, thanks anyway :)
<Camarade_Tux>
I decided to try libffi anyway for the variable arguments in C despite the README which stated it didn't work and it seems to work
<Camarade_Tux>
actually, it works on a slackware32 and a slackware64
_zack has joined #ocaml
ygrek has joined #ocaml
julm has joined #ocaml
_andre has joined #ocaml
<BigJ>
I'm not sure why when it copies the elements it creates a duplicate of the first element in the 2nd position because I iterate through the length of the arrray and copy each element from the right to the element in the left...
ikaros has quit ["Leave the magic to Houdini"]
<BigJ>
flux, do I need a nested for loop?
<flux>
bigj, no
<BigJ>
i can't seem to figure it out
Associat0r has joined #ocaml
<thelema_>
any suggestions how to find "camlDom__fun_4145" in my source code? gprof tells me that's taking up most of my time.
<Camarade_Tux>
an anonymous function?
<thelema_>
yup. but which one?
<Camarade_Tux>
name them? xD
<mrvn>
Camarade_Tux: name al closures? juck.
<thelema_>
I can name the ones I think it is, and I'll find out if I'm right...
<flux>
hm, 4145 doesn't mean anything?
<flux>
like character from the beginning of module?
<flux>
because that would be useful.. :)
<Camarade_Tux>
thelema_: can you try ocamlopt -dcmm? *maybe* it can help
<thelema_>
I dunno... Maybe it does, but how to get the function there...
<thelema_>
-dcmm? ok...
* thelema_
tries to work that into ocamlbuild...
<Camarade_Tux>
I think it named an anonymour function "camlA__fun_61" here, why Dom then?
<Camarade_Tux>
mrvn: yeah, not perfect but can be ok as a quick solution
<Camarade_Tux>
and camlA -> because the file is named a.ml
<thelema_>
Camarade_Tux: my code is dom.ml
<flux>
write a calmp4-script to name them.. :-)
<flux>
(I suppose it'd be non-trivial)
ygrek has quit [Remote closed the connection]
<thelema_>
luckily my source isn't that big... It just takes a while to run the profile build
<BigJ>
flux, it was my print function that was causing the problem
rwmjones_lptp has quit ["This computer has gone to sleep"]
<BigJ>
I also found a better way to delete the element, set it to the value infinity and then resort the list
<mrvn>
"better"? hehe
<BigJ>
ya it's a lose term
Guest33082 is now known as fremo
mishok13 has quit ["Stopping IRC chat... [OK]"]
_zack has quit ["Leaving."]
ygrek has joined #ocaml
<flux>
well, it's better in the sense it's quite difficult to get wrong :)
<flux>
and takes only lg(n) times as long :)
<mrvn>
flux: n lg(n) you mean
<flux>
mrvn, plain for-loop would take n already..
<mrvn>
simply switching with the last element takes O(1)
<flux>
mrvn, yes, but it doesn't maintain the order
<flux>
I thought the vector was to be kept in order
<mrvn>
You don't do that with arrays.
<flux>
maybe, but you _can_ do it with arrays :)
<mrvn>
Why do schools keep teaching so many wrong things?
<flux>
perhaps it's a basics course
<mrvn>
So? Use a list
<flux>
and then you cannot index if efficiently
<flux>
and then you use a map
<flux>
which works like magic
<mrvn>
exactly. The right data structure for each job
<flux>
and then it's not basics anymore
<flux>
besides, if the students have tought time even getting that to work..
<flux>
s/tought/tough/
<mrvn>
that is the other scary part
<mrvn>
I sometimes wonder if other universities even have an algorithms and complexity course.
<flux>
we have (had) a course called Datastructures (it's split into two parts nowadays), which covers that
<flux>
so it's different from the basics course.
<mrvn>
I could use a course about concurrent and functional datastructures
mihamina has quit ["Leaving."]
BigJ has quit [Remote closed the connection]
BigJ has joined #ocaml
BigJ has quit [Remote closed the connection]
<thelema_>
mrvn: some people just don't learn the data structures/algorithms material well
<flux>
yeah, you don't really know anything until you've proven that red-black-tree node removal works :P
<flux>
;)
<mrvn>
flux: You need to create a green node to pass.
verte has quit ["~~~ Crash in JIT!"]
ikaros has joined #ocaml
eldragon has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
mrvn has quit [Read error: 60 (Operation timed out)]
mrvn has joined #ocaml
wolfslack has joined #ocaml
julm has joined #ocaml
verte has joined #ocaml
ttamttam has quit ["Leaving."]
_zack has joined #ocaml
albacker has joined #ocaml
ttamttam has joined #ocaml
waleee has joined #ocaml
tmaedaZ is now known as tmaeda
Snark_ has joined #ocaml
Snark_ is now known as Snark
ttamttam has quit ["Leaving."]
verte has quit ["~~~ Crash in JIT!"]
Alpounet has quit ["Leaving"]
Alpounet has joined #ocaml
_unK has joined #ocaml
wolfslack has quit [Remote closed the connection]
BiDOrD has joined #ocaml
wolfslack has joined #ocaml
<wolfslack>
and once again i return to the nice people on the ocaml channel.
BiDOrD has quit [Read error: 60 (Operation timed out)]
wolfslack has quit [Client Quit]
BiDOrD has joined #ocaml
waleee has quit [Read error: 104 (Connection reset by peer)]
_zack has quit ["Leaving."]
waleee has joined #ocaml
ulfdoz has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
albacker has quit ["Leaving"]
onigiri has joined #ocaml
onigiri has quit []
ikaros has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
ttamttam has joined #ocaml
_andre has quit ["*puff*"]
ttamttam has quit [Read error: 113 (No route to host)]
_JusSx_ has joined #ocaml
albacker has joined #ocaml
rwmjones_lptp has joined #ocaml
ttamttam has joined #ocaml
albacker has quit ["Leaving"]
<Camarade_Tux>
and, anyone on an unusual architecture? something not x86-32/64?
<julm>
me: mips64; but not before a week as you know :(
<Camarade_Tux>
hahaha :P
<Camarade_Tux>
I should have a bicore mips32 by then I think :P
<Camarade_Tux>
for others, it's a cowon s9, a portable music (and video) player, it doesn't have a pdf viewer but I plan to build one, maybe with ocaml tools :P
<Camarade_Tux>
mehdid: thanks, gonna check that
<Camarade_Tux>
mehdid: do they have development tools?
<mehdid>
I'm not sure... but installing them is quite easy anyway
<Camarade_Tux>
ok, downloading a few :)
<mehdid>
Camarade_Tux: have fun :)
<Camarade_Tux>
he :)
mal`` has quit ["Coyote finally caught me"]
mal`` has joined #ocaml
waleee has quit ["Lost terminal"]
rwmjones_lptp has quit ["This computer has gone to sleep"]
_JusSx_ has quit ["leaving"]
peddie_ has quit [Remote closed the connection]
peddie has joined #ocaml
ttamttam has quit ["Leaving."]
peddie has quit [Read error: 60 (Operation timed out)]
peddie has joined #ocaml
<Camarade_Tux>
3 disk images downloaded (1.2GB), gonna try on tomorrow
rwmjones_lptp has joined #ocaml
bohanlon_ has joined #ocaml
rwmjones_lptp has quit ["This computer has gone to sleep"]
bohanlon has quit [Read error: 110 (Connection timed out)]