bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
cjohnson has joined #ocaml
GreyLensman has joined #ocaml
smimou has quit ["?"]
larsr has joined #ocaml
bk_ has joined #ocaml
smimou has joined #ocaml
yauz_ has joined #ocaml
GreyLensman has quit ["Leaving"]
yauz has quit [Read error: 113 (No route to host)]
mrsolo has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
larsr has quit [Read error: 104 (Connection reset by peer)]
larsr has joined #ocaml
tautologico has joined #ocaml
Cantor has joined #ocaml
cjohnson has quit [Connection reset by peer]
Cantor has quit ["Leaving"]
debona|r has left #ocaml []
debona|r has joined #ocaml
tautologico has quit ["Leaving"]
Herrchen_ has joined #ocaml
Banana has quit [Read error: 60 (Operation timed out)]
Herrchen has quit [Read error: 110 (Connection timed out)]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
mrsolo has joined #ocaml
<
mrsolo>
why categorical?
<
mrsolo>
does ocaml really based on category theory?
<
Smerdyakov>
I'm sure it's mostly irrelevant.
<
dan2>
is there a ddd interface to the ocaml debugger
Research has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
Nutssh has joined #ocaml
kosmikus|away is now known as kosmikus
shawn has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
shawn has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
larsr has quit [Read error: 110 (Connection timed out)]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
Banana has joined #ocaml
Snark has joined #ocaml
Herrchen_ is now known as Herrchen
gim has quit ["brb"]
gim has joined #ocaml
shawn_ has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
Nutssh has quit ["Client exiting"]
AshW8rk3 has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
kinners has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
buggs has joined #ocaml
kinners_ has joined #ocaml
kinners has quit [Read error: 110 (Connection timed out)]
debona|r has quit [bear.freenode.net irc.freenode.net]
mattam has quit [bear.freenode.net irc.freenode.net]
kosmikus has quit [bear.freenode.net irc.freenode.net]
Herrchen has quit [bear.freenode.net irc.freenode.net]
Smerdyakov has quit [bear.freenode.net irc.freenode.net]
cmeme has quit [bear.freenode.net irc.freenode.net]
greenrd has quit [bear.freenode.net irc.freenode.net]
gzl has quit [bear.freenode.net irc.freenode.net]
fariseo has quit [bear.freenode.net irc.freenode.net]
ronwalf has quit [bear.freenode.net irc.freenode.net]
Hipo has quit [bear.freenode.net irc.freenode.net]
Hadaka has quit [bear.freenode.net irc.freenode.net]
Herrchen has joined #ocaml
debona|r has joined #ocaml
mattam has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
greenrd has joined #ocaml
gzl has joined #ocaml
fariseo has joined #ocaml
kosmikus has joined #ocaml
ronwalf has joined #ocaml
Hipo has joined #ocaml
Hadaka has joined #ocaml
debona|r has quit [bear.freenode.net irc.freenode.net]
kosmikus has quit [bear.freenode.net irc.freenode.net]
mattam has quit [bear.freenode.net irc.freenode.net]
gzl has quit [bear.freenode.net irc.freenode.net]
Hadaka has quit [bear.freenode.net irc.freenode.net]
fariseo has quit [bear.freenode.net irc.freenode.net]
greenrd has quit [bear.freenode.net irc.freenode.net]
Smerdyakov has quit [bear.freenode.net irc.freenode.net]
cmeme has quit [bear.freenode.net irc.freenode.net]
ronwalf has quit [bear.freenode.net irc.freenode.net]
Herrchen has quit [bear.freenode.net irc.freenode.net]
Hipo has quit [bear.freenode.net irc.freenode.net]
shawn_ has quit [bear.freenode.net irc.freenode.net]
_fab has quit [bear.freenode.net irc.freenode.net]
_fab has joined #ocaml
shawn_ has joined #ocaml
Herrchen has joined #ocaml
debona|r has joined #ocaml
mattam has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
greenrd has joined #ocaml
gzl has joined #ocaml
fariseo has joined #ocaml
kosmikus has joined #ocaml
ronwalf has joined #ocaml
Hipo has joined #ocaml
Hadaka has joined #ocaml
_fab has quit [bear.freenode.net irc.freenode.net]
shawn_ has quit [bear.freenode.net irc.freenode.net]
debona|r has quit [bear.freenode.net irc.freenode.net]
kosmikus has quit [bear.freenode.net irc.freenode.net]
mattam has quit [bear.freenode.net irc.freenode.net]
gzl has quit [bear.freenode.net irc.freenode.net]
Hadaka has quit [bear.freenode.net irc.freenode.net]
fariseo has quit [bear.freenode.net irc.freenode.net]
greenrd has quit [bear.freenode.net irc.freenode.net]
Smerdyakov has quit [bear.freenode.net irc.freenode.net]
cmeme has quit [bear.freenode.net irc.freenode.net]
ronwalf has quit [bear.freenode.net irc.freenode.net]
Herrchen has quit [bear.freenode.net irc.freenode.net]
Hipo has quit [bear.freenode.net irc.freenode.net]
_fab has joined #ocaml
shawn_ has joined #ocaml
Herrchen has joined #ocaml
debona|r has joined #ocaml
mattam has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
greenrd has joined #ocaml
gzl has joined #ocaml
fariseo has joined #ocaml
kosmikus has joined #ocaml
ronwalf has joined #ocaml
Hipo has joined #ocaml
Hadaka has joined #ocaml
_fab has quit [bear.freenode.net irc.freenode.net]
shawn_ has quit [bear.freenode.net irc.freenode.net]
shawn_ has joined #ocaml
_fab has joined #ocaml
_fab has quit [bear.freenode.net irc.freenode.net]
shawn_ has quit [bear.freenode.net irc.freenode.net]
shawn_ has joined #ocaml
_fab has joined #ocaml
kinners_ has quit ["leaving"]
AshW8rk3 has joined #ocaml
whee has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
AshW8rk3 has quit [Remote closed the connection]
kosmikus is now known as kosmikus|away
AshW8rk3 has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
<
dan2>
how do I reimplement this in ocaml
<
dan2>
<mornfall> unsigned j, k, l, res;
<
dan2>
<mornfall> for (res = j = k = l = 1; j < i; j ++) {
<
dan2>
<mornfall> l = k; k = res; res = l + k;
<
dan2>
<mornfall> } return res;
<
Smerdyakov>
There is no mornfall support in OCaml.
<
Smerdyakov>
The question is, do you really want to "reimplement"
_that_ code specifically, or does OCaml offer better ways to do the high-level task?
<
dan2>
ahh foo, I just want to test it out
<
Smerdyakov>
Test what out?
<
dan2>
Smerdyakov: can I combind that "res =" into a multiple let?
<
Smerdyakov>
No. "Multiple lets" are provably useless in OCaml.
<
mattam>
use a reference
<
Smerdyakov>
mattam, how could you!!
<
Smerdyakov>
dan2, you are trying to compute Fibonacci numbers?
<
dan2>
Smerdyakov: specifically this should be faster than the standard fibonacci algorithm
<
Smerdyakov>
That
_is_ the standard algorithm.
<
Smerdyakov>
You probably want something like:
<
Smerdyakov>
let fib n = let rec fib' n f0 f1 = if n = 0 then f1 else fib' (n-1) f1 (f0+f1) in fib' n 0 1
<
dan2>
let rec fib n =
<
dan2>
if n < 2 then 1 else fib(n-1) + fib(n-2);;
<
Smerdyakov>
No, you don't want that.
<
Smerdyakov>
It's not the same algorithm.
<
dan2>
Smerdyakov: that could explain the funny results eh
<
Smerdyakov>
Well, you should get the same result with minor changes, but it should be a lot slower.
<
dan2>
it is significantly
<
Smerdyakov>
Is it clear to you why?
<
Smerdyakov>
How many times does the loop in your original run for a given value of i?
<
Smerdyakov>
Can you be more precise? :P
<
mattam>
would you write determinise or determinize ?
<
Smerdyakov>
I would write the latter. A Brit would write the former.
<
mattam>
same with determini(z|s)ation then
<
dan2>
Smerdyakov: can you explain how your algorithm works :)
<
Smerdyakov>
dan2, it's your original algorithm.
<
Smerdyakov>
dan2, you should read an ML tutorial if you don't understand how it works.
<
dan2>
heh probably
AshW8rk3 has joined #ocaml
<
dan2>
Smerdyakov: when do you use generic variables
<
mattam>
generic variables ?
<
dan2>
erm when, or how do I use them
<
mattam>
use just write them in front of a type name and use them in the body of the type decl
<
mattam>
like type ('a, 'b) either = Left of 'a | Right of 'b
<
mattam>
you can use them to specify types of polymorphic functions like let id : 'a -> 'a = fun x -> x
* dan2
wishes he had a real book on ocaml
<
mattam>
there are some
<
mattam>
did you look at the oreilly's book ?
<
dan2>
mattam: its out?
<
mattam>
it's somewhere on the net
<
mattam>
they did not publish the english version
<
dan2>
but I want a book that sits in my hands, I can't learn from internet tutorials and books
<
mattam>
then you're out of luck :)
<
mattam>
why not print them yourself ?
<
dan2>
too many pages?
AshW8rk3 has quit [Remote closed the connection]
<
dan2>
mattam: how do I create an integer larger than 64bit
<
mattam>
use the Bigint library
<
mattam>
maybe not available in your distribution though
<
dan2>
its probably unlikely I can move to ocaml anyway
<
dan2>
I am addicted to C
<
mattam>
you think that will suffice ?
<
dan2>
mattam: I'd love to use ocaml for some of the stuff I am working on tho
<
mattam>
then try it seriously !
<
mattam>
you'll get addicted to something more sane
<
dan2>
mattam: however, I don't think ocaml interfaces well with C++
<
ronwalf>
Not with swig?
<
dan2>
damn I wouldn't touch swig
<
dan2>
anyway, how well does ocaml interface with device nodes?
<
ronwalf>
device nodes?
<
dan2>
/dev/phone[00-9]
<
dan2>
/dev/phone[0-9]
<
ronwalf>
Most of those are just character devices, right? So they would act just like a file
<
dan2>
ronwalf: hrm, this phone stuff might be block
<
dan2>
but anyway, ocaml would have to be able to interface libosip2
<
dan2>
or resiprocate
<
ronwalf>
The unix lib has select
* ronwalf
is a relative newbie
<
ronwalf>
So I assume the rest of the stuff to take care of blocking exists
maihem has joined #ocaml
smimou has quit ["?"]
<
TheDracle>
What are you trying to do using device nodes?
<
TheDracle>
The Unix library supports low level file operations, that's all you need to work with character devices.
<
TheDracle>
See type terminal_io in Unix.
smimou has joined #ocaml
<
TheDracle>
Hm, does ocaml have any pointer support?
<
TheDracle>
Or libraries for pointer support kinda stuff?
smimou has quit ["?"]
<
cDlm>
there are references
smimou has joined #ocaml
<
cDlm>
depends what kind of pointer stuff you want to do
AshW8rk3 has joined #ocaml
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
CosmicRay has joined #ocaml
kosmikus|away is now known as kosmikus
maihem has joined #ocaml
Fleur has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
monotonom has joined #ocaml
pac_away has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
monotonom has joined #ocaml
jason_ has joined #ocaml
TheDracle has quit [Nick collision from services.]
jason_ is now known as TheDracle
mattam__ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
vezenchio has quit ["With little power comes little responsibility"]
Snark has quit ["Parti"]
smimou has quit ["?"]
pac_away has quit ["leaving"]
dan2 has quit ["Leaving"]
bk_ has joined #ocaml
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
cjohnson has joined #ocaml
CosmicRay has quit ["Client exiting"]
AshW8rk3 has joined #ocaml
buggs^z has joined #ocaml
whee has joined #ocaml
buggs has quit [Success]
AshW8rk3 has quit [Remote closed the connection]
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
pac_away has joined #ocaml