mcclurmc has quit [Remote host closed the connection]
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
ontologiae_ has quit [Ping timeout: 272 seconds]
mreca has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
boogie has quit [Read error: Connection reset by peer]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
talzeus has joined #ocaml
talzeus_ has joined #ocaml
lostcuaz has joined #ocaml
jao has quit [Remote host closed the connection]
csakatoku has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
talzeus has quit [Ping timeout: 246 seconds]
arjunguha has joined #ocaml
arjunguha has quit [Ping timeout: 264 seconds]
<erider>
can you use match like: match x y with .... ?
<Drup>
erider: "match (x,y) with"
<erider>
and you can match on x and y separately?
<Drup>
well, it's a regular pattern match no pairs
<bernardofpc>
match x,y with 0,0 -> something | 1,0 -> other | 0,1 -> and another | x,y -> default case
<bernardofpc>
the commas are important, otherwise (I think) OCaml iterprets as match (x y) with ..., which means that you calculate (x y) and then match the result
mcclurmc has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
<erider>
ok thanks for the help on understanding that
talzeus has joined #ocaml
talzeus_ has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
contempt has joined #ocaml
talzeus has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20131020]: i've been blurred!]
contempt has quit [Ping timeout: 264 seconds]
contempt has joined #ocaml
<zRecursive>
I have installed ocaml 3.12 from OS repo. what's the best way to upgrade to newest ocaml ?
<zRecursive>
and there is ocaml-opam-1.0.0 installed
ollehar1 has quit [Ping timeout: 265 seconds]
P1RATEZ has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Drup>
opam can install locally a new compiler quite easily
<Drup>
opam 1.0 is a bit old though, if you could compile the last (1.1) version, it would be better, there is tons of bugfix in it
<Drup>
once you have opam installed
<Drup>
just do "opam switch 4.01.0"
<Drup>
(I will let you browse the doc for more info)
mcclurmc has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
watermind has quit [Read error: Connection reset by peer]
kyrylo has quit [Read error: Operation timed out]
mcclurmc has quit [Ping timeout: 272 seconds]
csakatoku has quit [Remote host closed the connection]
yacks has joined #ocaml
csakatoku has joined #ocaml
talzeus has joined #ocaml
talzeus has quit [Read error: Connection reset by peer]
<zRecursive>
Drup: thanks ! i need to upgrade opam first ?
csakatoku has quit [Remote host closed the connection]
<zRecursive>
but `pkg search opam` => ocaml-opam-1.0.0, so i have to install opam from source.
avsm has joined #ocaml
csakatoku has joined #ocaml
avsm has quit [Ping timeout: 272 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest25933
P1RATEZ has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
lostcuaz has joined #ocaml
csakatoku has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 264 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
talzeus has joined #ocaml
csakatoku has joined #ocaml
boogie has joined #ocaml
introom has joined #ocaml
boogie has quit [Remote host closed the connection]
jdoles has joined #ocaml
boogie has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
nikki93 has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
nikki93 has joined #ocaml
avsm has quit [Ping timeout: 272 seconds]
axiles has joined #ocaml
mocrunsthecity has joined #ocaml
<mocrunsthecity>
wow i didnt think this channel would have so many people
<mocrunsthecity>
out of curiosity, has anyone here ever worked at janestreet
jao has quit [Ping timeout: 252 seconds]
boogie has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 272 seconds]
rz has quit [Ping timeout: 272 seconds]
lostcuaz has joined #ocaml
mcclurmc has joined #ocaml
<UltimateGOTO>
mocrunsthecity, I was as surprised as you, but also at how silent it often is here.
mcclurmc has quit [Ping timeout: 260 seconds]
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
introom has quit [Ping timeout: 245 seconds]
<zRecursive>
silent than #haskell
avsm has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
<UltimateGOTO>
That's because in #haskell people just like to talk about how awesome haskell is all the time.
<zRecursive>
:)
<zRecursive>
haskell is indeed awesome but i would like to use OCaml
<UltimateGOTO>
I use both, the thing with OCaml is that as a high performance functional language you sort of continually end up cheating tyhe functional style paradigm because it's not pure so it's often more efficient to write code in a semi functional style.
<UltimateGOTO>
Whereas Haskell's laziness doesn't give you a penalty for writing in a functional style.
yacks has quit [Quit: Leaving]
mocrunsthecity has quit [Remote host closed the connection]
introom has joined #ocaml
mchqwerty has joined #ocaml
introom has quit [Ping timeout: 272 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zRecursive>
I enjoy OCaml's fast building speed
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
nikki93 has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
<UltimateGOTO>
zRecursive, fast compared to what?
<UltimateGOTO>
It builds about as quickly as Haskell though
ygrek has joined #ocaml
<UltimateGOTO>
On that note, I read somewhere that after template expansion, some C++ identifiers in boost can be half a megabyte in size...
avsm has quit [Ping timeout: 252 seconds]
Guest25933 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
TDJACR has quit [Ping timeout: 240 seconds]
TDJACR has joined #ocaml
thomasga has joined #ocaml
nikki93 has quit [Ping timeout: 246 seconds]
<flux>
what? I've found ocaml compilation speeds to be very high compared to ghc
thomasga has quit [Quit: Leaving.]
<adrien>
well, even s/ocaml/C++/ :P
Kakadu has joined #ocaml
<zRecursive>
Just referring to compiling speed, ghc is not on the same level as ocaml
mcclurmc has joined #ocaml
<adrien>
either there are GHC options involved or it has gotten much much faster
Arach has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
<UltimateGOTO>
Hmm, are there any benchmarks involved here?
<flux>
hello world takes 0.020 s on my machine in ocaml, ghc takes 0.400, that's 20x right there ;)
<adrien>
:)
introom has joined #ocaml
<flux>
but I've found that there is still a difference even in larger programs
<zRecursive>
flux: big difference
cago has joined #ocaml
wolfnn has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
avsm has joined #ocaml
dant3 has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
Kakadu has quit [Quit: Page closed]
Kakadu has joined #ocaml
skchrko has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
<UltimateGOTO>
flux, , hmm, that is quite a lot faster
<UltimateGOTO>
and this is with similar optimizations going on?
<flux>
which default options
<flux>
well, with ocamlopt it takes 0.1 s in ocaml
<flux>
but in practice it doesn't matter
<flux>
as during development you can just pick the fastest compiler
<adrien>
flux: 100ms is probably mostly caused by ld
<adrien>
and maybe as too
dant3 has quit [Remote host closed the connection]
<flux>
ocamlopt -c takes 0.02 seconds
<flux>
ghc -c hello.hs takes 0.09 seconds
Guest54257 has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
zRecursive has left #ocaml []
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Amanite has joined #ocaml
dant3 has joined #ocaml
talzeus has quit [Remote host closed the connection]
cago has quit [Read error: Connection reset by peer]
cago has joined #ocaml
adrien_oww has joined #ocaml
thomasga has quit [Quit: Leaving.]
wwilly has joined #ocaml
wwilly has quit [Client Quit]
zpe has joined #ocaml
ocp has joined #ocaml
cago has quit [Quit: Leaving.]
cago1 has joined #ocaml
csakatoku has quit [Remote host closed the connection]
mika1 has joined #ocaml
csakatoku has joined #ocaml
thomasga has joined #ocaml
_andre has joined #ocaml
<Amanite>
Can anyone explain to me what's the point of learning OCaml over Haskell and vice versa?
avsm has joined #ocaml
<flux>
OCaml pros: OCaml is a pragmatic nice, smallish language that doesn't require you to use monads for side-effects in a pinch (though monads are popular in ocaml async libraries)
avsm has quit [Client Quit]
<flux>
Haskell pros: Haskell is a purely functional language that doesn't allow you to leak side-effects by forcing the use of monads
<flux>
(slightly tongue-in-cheek)
<flux>
you probably find better comparsions in the web :)
wwilly has joined #ocaml
<wwilly>
bonjour
rwmjones has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
avsm has quit [Ping timeout: 272 seconds]
thomasga has quit [Quit: Leaving.]
Amanite has quit [Remote host closed the connection]
avsm has joined #ocaml
Amanite has joined #ocaml
dsheets has joined #ocaml
rwmjones has joined #ocaml
mika2 has joined #ocaml
nikki93 has joined #ocaml
Amanite has quit [Ping timeout: 272 seconds]
ontologiae_ has joined #ocaml
Amanite has joined #ocaml
mika1 has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 272 seconds]
pminten has joined #ocaml
nikki93 has quit [Ping timeout: 272 seconds]
rwmjones has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
<UltimateGOTO>
flux, so the only reason that ocaml bits have a tag is because of polymorphic > and =?
csakatok_ has joined #ocaml
thomasga has joined #ocaml
<flux>
no, GC uses it
csakatoku has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 252 seconds]
<UltimateGOTO>
Hmm
<UltimateGOTO>
I wounder why GHC doesn't need the tag bit
<adrien_oww>
it's also a very convenient way to make ocaml try to jump to crazy memory addresses :P
<UltimateGOTO>
Well, it boxes ints I guess with thunks
<companion_cube>
UltimateGOTO: ghc uses a totally different abstract machine
<UltimateGOTO>
Which are effectively boxes.
thomasga has quit [Client Quit]
<companion_cube>
ghc needs to deal with pervasive lazyness, ocaml doesn't, so ocaml has a much more straightforward representation of values
<UltimateGOTO>
Yeah, I know, I just wonder how on earth they got GHC to be tagless but I just realized that because it thunks everything that effectively creates a box for ints.
<companion_cube>
in ghc values are pointers to code that pushes the value on a stack
<UltimateGOTO>
So much complicated stuff to worry about. =(
<UltimateGOTO>
They should create a purely functional language without GC with monadic manual memory management
<UltimateGOTO>
Less stuff to worry about
<companion_cube>
looks complicated ^^
<UltimateGOTO>
Nahh, it's easy cons :: a -> [a] -> IO [a] allocates a list for you and you free that list with cons :: [a] -> IO ()
<UltimateGOTO>
Just use unsafePerformIO within pure functions and you're done.
kizzx2 has quit [Quit: Leaving.]
rwmjones has joined #ocaml
rwmjones has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
demonimin has quit [Ping timeout: 260 seconds]
rwmjones has joined #ocaml
malo has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
<flux>
but where do you put the value?
<flux>
or would you separate between automatically allocated memory (stack) and heap
<flux>
I suppose that would work
jonludlam has joined #ocaml
demonimin has joined #ocaml
pminten has quit [Quit: Leaving]
<companion_cube>
UltimateGOTO: that doesn't sound very safe
<companion_cube>
since it's hard to know whether a value is still used...
kyrylo has joined #ocaml
dant3 has quit [Remote host closed the connection]
<UltimateGOTO>
flux, stack is automatic, heap isn't, like in C
<UltimateGOTO>
companion_cube, yeah, like C
<UltimateGOTO>
referencing memory you ve already freed has undefined behaviour.
<ousado>
UltimateGOTO: sounds like you want linear types
<UltimateGOTO>
What are those?
<companion_cube>
UltimateGOTO: that's cool, but ocaml tries to be memory-safe
<companion_cube>
and the GC is really a huge convenience for writing algorithms
<companion_cube>
or any kind of high level code
watermind has joined #ocaml
<ousado>
linear types are tracked statically so you can't forget to "free" them
<companion_cube>
but a programming language with linear types is still a research topic
<UltimateGOTO>
companion_cube, well, ocaml also isn't purely functional so there you go.
<ousado>
they work quite well in ATS
<companion_cube>
UltimateGOTO: it's still memory safe
<ousado>
and others
<companion_cube>
ATS is a research language ^^
<UltimateGOTO>
companion_cube, it also doesn't use :: to denote tpyes so clearly this isn't about ocaml but a hypothetical purely functional language without garbage collection
<ousado>
linearML, clean, etc.
<companion_cube>
UltimateGOTO: yeah, sure, but I was just saying that it's not obvious at all how usable a language you'd get
<ousado>
optional GC, rather
<UltimateGOTO>
Ah, linear types are uniqueness types?
<UltimateGOTO>
companion_cube, completely unusuable most likely
<companion_cube>
^^
<UltimateGOTO>
But fun none the less
<ousado>
yes, very similar at least
<companion_cube>
I'm quite interested in rust for this kind of lower-level issues
<companion_cube>
it's impure but it looks quite well designed
Amanite has quit [Quit: Lost terminal]
rwmjones has quit [Read error: Operation timed out]
<whitequark>
it used to have optional purity, but as it turns out, "purity" can mean a lot of different things
<whitequark>
so adding just one arbitrary kind of purity was too limiting, and adding all of them resulted in combinatorial explosion
sam___ has joined #ocaml
<sam___>
Hello
<whitequark>
unfortunately I cannot find an article with a more elaborate description of the problems...
<sam___>
Can someone help me with my tiny program?
<sam___>
I just started learning OCaml and tried to make a text adventure based game