kakadu has quit [Remote host closed the connection]
malina has joined #ocaml
malina has quit [Remote host closed the connection]
zv has quit [Quit: WeeChat 1.9]
malina has joined #ocaml
enterprisey has joined #ocaml
malina has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 264 seconds]
mfp has joined #ocaml
emilian has quit [Remote host closed the connection]
cbot has joined #ocaml
Guest26846 has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
richi235 has quit [Remote host closed the connection]
richi235 has joined #ocaml
wtetzner has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ocaml
<pacak>
Is there an existing datatype that can have either of two predefined values (similar to haskell's Either)?
<lyxia>
Bool
<jpdeplaix>
pacak: yes, Pervasives.result
BitPuffin|osx has quit [Ping timeout: 240 seconds]
<pacak>
jpdeplaix: Yea, this looks a bit more useful than bool. Thanks!
sh0t has quit [Remote host closed the connection]
samrat has joined #ocaml
mfp has quit [Ping timeout: 268 seconds]
ome has joined #ocaml
<ome>
Anyone knows how to work around the current broken state of jane street core?
TarVanimelde has quit [Quit: TarVanimelde]
pierpa has quit [Quit: Page closed]
kerrhau has quit [Quit: bye!]
enterprisey has quit [Ping timeout: 248 seconds]
Algebr has joined #ocaml
Bahman has joined #ocaml
lostman has joined #ocaml
govg has joined #ocaml
Algebr` has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
Algebr` has quit [Remote host closed the connection]
Soni has quit [Ping timeout: 260 seconds]
<Bahman>
Hi all.
Soni has joined #ocaml
Soni has quit [Changing host]
Soni has joined #ocaml
jbrown has quit [Ping timeout: 248 seconds]
enterprisey has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Killed (cherryh.freenode.net (Nickname regained by services))]
infinity0_ is now known as infinity0
cbot has quit [Quit: Leaving]
averell has quit [Ping timeout: 240 seconds]
averell has joined #ocaml
lostman has quit [Quit: Connection closed for inactivity]
zmt00 has quit [Quit: Leaving]
averell has quit [Ping timeout: 250 seconds]
averell has joined #ocaml
bruce_r has joined #ocaml
<bruce_r>
I'm trying to make counted lists with phantom types using GADTs. It's really easy in Haskell but I can't make it work in Ocaml: http://lpaste.net/360034 . The compiler doesn't understand that I want the type parameter to be polymorphic.
<bruce_r>
Do I need to add something to help the typer?
<bruce_r>
oh my, looks like I had to add the keyword "type" in my type annotation
MercurialAlchemi has joined #ocaml
<Bahman>
bruce_r: Could you share the updated version?
<bruce_r>
sure
<bruce_r>
I updated the lpaste
<Bahman>
Thanks. Interesting.
<Bahman>
Hmm...I'm trying to figure out why you needed `type` in there.
<def`>
Bahman: it is to deal with unification...
<def`>
In the two branches of the function, the type "a" will be a different type.
<def`>
(first "zero", then "succ a1" for some a1)
<def`>
The syntax (type a) is OCaml syntax for introducing that kind of special type variable.
<bruce_r>
why can you tell the compiler that zero and succ a1 are actually unifiable, but not int and string?
<bruce_r>
why/how
<def`>
they are not unifiable
<bruce_r>
so what happens for the compiler to accept them both as the input of the function?
<def`>
it doesn't?
<def`>
unifiable means the type is both "zero" and "succ _"
<def`>
here it says it is always valid, but not at the same time (in one branch it will be zero, in another succ _, but not both)
<bruce_r>
ok, and the reason why it needs us to actually write it down is? it's not decidable?
<def`>
yes
<Bahman>
Thanks def`.
<bruce_r>
great, thanks for the explanation man
sapristi has joined #ocaml
Lightsep1i has quit [Quit: leaving]
sgnb has joined #ocaml
argent_smith has joined #ocaml
mk9 has joined #ocaml
TheLemonMan has joined #ocaml
mk9 has quit [Ping timeout: 248 seconds]
bruce_r has quit [Ping timeout: 258 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 248 seconds]
ShalokShalom_ has joined #ocaml
ShalokShalom has quit [Ping timeout: 240 seconds]
mfp has joined #ocaml
_andre has joined #ocaml
samrat has quit [Ping timeout: 248 seconds]
sz0 has joined #ocaml
Bahman has quit [Quit: ave atque vale...]
AltGr has joined #ocaml
ziyourenxiang has joined #ocaml
zolk3ri has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
samrat_ has joined #ocaml
MercurialAlchemi has joined #ocaml
dhil has joined #ocaml
samrat_ has quit [Ping timeout: 240 seconds]
andreas__ has joined #ocaml
jerith_ is now known as jerith
shinnya has joined #ocaml
Denommus has joined #ocaml
ygrek has joined #ocaml
samrat_ has joined #ocaml
sh0t has joined #ocaml
jbrown has joined #ocaml
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
shinnya has quit [Ping timeout: 268 seconds]
Jesin has quit [Quit: Leaving]
sz0 has quit [Quit: Connection closed for inactivity]
Jesin has joined #ocaml
dhil has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
sz0 has joined #ocaml
FreeBirdLjj has joined #ocaml
mbuf has quit [Quit: Leaving]
enterprisey has quit [Ping timeout: 268 seconds]
sapristi has quit [Remote host closed the connection]
Soni has quit [Excess Flood]
Jesin has quit [Quit: Leaving]
Soni has joined #ocaml
Jesin has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
donryudragoni has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
enterprisey has joined #ocaml
mbuf has joined #ocaml
AltGr has left #ocaml [#ocaml]
sapristi has joined #ocaml
moei has quit [Quit: Leaving...]
bruce_r has joined #ocaml
tane has joined #ocaml
enterprisey has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
fraggle_ has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
malc_ has joined #ocaml
ShalokShalom_ has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
samrat_ has quit [Ping timeout: 240 seconds]
p1n34ppl3 has joined #ocaml
<p1n34ppl3>
hi ocamlers
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
Bahman has joined #ocaml
FreeBird_ has quit [Ping timeout: 240 seconds]
<zozozo>
Hi
Bahman_ has joined #ocaml
Bahman has quit [Disconnected by services]
Bahman_ is now known as Bahman
<reynir>
hi
Bahman_ has joined #ocaml
<Bahman>
Hi.
<p1n34ppl3>
hello sir
dedgrant has joined #ocaml
<p1n34ppl3>
anyone working on ocaml stuff atm?
mbuf has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
<p1n34ppl3>
what src code should i read to learn neat ocaml tricks or design? reading the stdlib atm
FreeBirdLjj has quit [Ping timeout: 248 seconds]
dhil has joined #ocaml
<p1n34ppl3>
i am stuck with imperative thinking
<donryudragoni>
When I started learning functional with Haskell, 99 Problems was a nice exercise. Pretty sure you can find them in the OCaml website.
<p1n34ppl3>
yes i remember it, i will get to it
<p1n34ppl3>
it definitely exists
andreas__ has quit [Quit: Connection closed for inactivity]
<donryudragoni>
Beyound that, try to build something yourself. My go-to projects are an image generator of the Mandelbrot set and a maze generator. A bit complex, but not too overwelming.
<donryudragoni>
Both of which you can find on Daniel Shiffman's youtube channel. He uses Javascript (and p5), though.
<p1n34ppl3>
i could make a gui app to generate the maze where a ball spawns randomly, might even implement dijkstra somehow, not sure if i can do it recursively etc