ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
hhugo has quit [Quit: Leaving.]
vin` has joined #ocaml
ontologiae has joined #ocaml
tnguyen has quit [Quit: tnguyen]
Lutin` is now known as schlegel
philtor_ has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 260 seconds]
darkf has joined #ocaml
fold has quit [Quit: WeeChat 0.4.3]
lordkryss has quit [Ping timeout: 240 seconds]
fold has joined #ocaml
philtor_ has joined #ocaml
philtor_ has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 252 seconds]
yomimono has joined #ocaml
alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
alpounet has quit [Ping timeout: 264 seconds]
cmccoy has joined #ocaml
athan has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
vin` has quit [Ping timeout: 252 seconds]
hausdorff has quit [Remote host closed the connection]
fold has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
vin` has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
hausdorff has joined #ocaml
<athan> Quick! What's your favorite part about OCaml?
<yomimono> Parsing bug that I just found deep in systems code doesn't immediately and obviously grant arbitrary code execution
<yomimono> (former C programmer; low bar)
shinnya has quit [Ping timeout: 244 seconds]
<athan> yomimono: was that in relation to my question? If so, is that benefit you gained from the referential transparency you get from functional languages, or something else...? o.o
shinnya has joined #ocaml
steshaw_ is now known as steshaw
steshaw has quit [Changing host]
steshaw has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
<ssbr> athan: from being memory safe.
<ssbr> athan: you'd get the same benefit from programming in, say, Perl.
ygrek has quit [Ping timeout: 248 seconds]
<athan> ssbr: I'm coming from Haskell. Ive heard that ocaml natively supports subtyping, but that's about as far as my knowledge goes
<ssbr> athan: any language with memory safety won't have memory safety bugs like the ones that were being alluded to above. That means not just haskell and OCaml, but also Python, Java, Perl, Prolog, Scheme...
<ssbr> athan: my favorite feature of ocaml is camlp4
xexonixxexillion has joined #ocaml
<athan> ssbr: Oh okay, I think I see. Thanks for the input!
<xexonixxexillion> I've been told I should learn ocaml. I have a strong background in Haskell and Scheme. Apart from the module system, what else should I look at? Any suggestions for books or online tutorials to look at? (most of the online tutorials seem to be aimed at people who are either learning ocaml as a first language, or who are coming from imperative languages)
hausdorff has quit [Remote host closed the connection]
distantunclebob has quit [Quit: Leaving.]
penglingbo has quit [Ping timeout: 260 seconds]
cmccoy has quit [Ping timeout: 255 seconds]
hausdorff has joined #ocaml
fold has joined #ocaml
distantunclebob has joined #ocaml
distantunclebob1 has joined #ocaml
distantunclebob2 has joined #ocaml
distantunclebob has quit [Ping timeout: 272 seconds]
distantunclebob1 has quit [Ping timeout: 260 seconds]
manizzle has quit [Excess Flood]
manizzle has joined #ocaml
SHODAN has quit [Excess Flood]
SHODAN has joined #ocaml
orbitz_ has joined #ocaml
acieroid` has joined #ocaml
acieroid has quit [Write error: Broken pipe]
orbitz has quit [Write error: Broken pipe]
hyperboreean has quit [Write error: Broken pipe]
BitPuffin has quit [Ping timeout: 240 seconds]
n0v has quit [Ping timeout: 877 seconds]
hyperboreean has joined #ocaml
saarin_ has joined #ocaml
IbnFirnas has quit [Ping timeout: 276 seconds]
saarin has quit [Ping timeout: 276 seconds]
saarin_ is now known as saarin
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
n0v has joined #ocaml
IbnFirnas has joined #ocaml
ygrek has joined #ocaml
<whitequark> xexonixxexillion: http://realworldocaml.org ?
<whitequark> if you have a strong ML background, you could just scroll through the places you already know...
distantunclebob2 has quit [Quit: Leaving.]
divyanshu has joined #ocaml
BitPuffin has joined #ocaml
axiles has joined #ocaml
fold has quit [Ping timeout: 252 seconds]
BitPuffin has quit [Ping timeout: 252 seconds]
hausdorff has quit [Remote host closed the connection]
dapz has joined #ocaml
mbac has quit [Ping timeout: 248 seconds]
mbac has joined #ocaml
schlegel has quit [Quit: WeeChat 1.0-dev]
divyanshu has quit [Quit: Computer has gone to sleep.]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
hausdorff has joined #ocaml
divyanshu has joined #ocaml
vin` has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 272 seconds]
ebzzry_ has quit [Read error: Connection reset by peer]
divyanshu has quit [Quit: Computer has gone to sleep.]
thomasga has joined #ocaml
parcs has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
yacks has joined #ocaml
thomasga has quit [Quit: Leaving.]
divyanshu has joined #ocaml
parcs has joined #ocaml
robink has quit [Ping timeout: 240 seconds]
robink has joined #ocaml
Eyyub has quit [Ping timeout: 244 seconds]
_0xAX has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
penglingbo has joined #ocaml
athan has quit [Remote host closed the connection]
alpounet has joined #ocaml
divyanshu has joined #ocaml
slash^ has joined #ocaml
Kakadu has joined #ocaml
Derander has quit [Ping timeout: 240 seconds]
Derander has joined #ocaml
_0xAX has quit [Remote host closed the connection]
_0xAX has joined #ocaml
fraggle_laptop has joined #ocaml
Snark_ is now known as Snark
pminten has joined #ocaml
Antoine59 has quit [Ping timeout: 240 seconds]
Antoine59 has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
hausdorff has quit [Remote host closed the connection]
divyanshu has joined #ocaml
jludlam has joined #ocaml
jonludlam_ has joined #ocaml
BitPuffin has joined #ocaml
BitPuffin has quit [Ping timeout: 272 seconds]
hhugo has joined #ocaml
rand000 has joined #ocaml
ia0 has quit [Quit: leaving]
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
ia0 has joined #ocaml
lordkryss has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alpounet has quit []
alpounet has joined #ocaml
contempt has quit [Ping timeout: 252 seconds]
contempt has joined #ocaml
eikke__ has joined #ocaml
milosn has quit [Ping timeout: 240 seconds]
hhugo has quit [Quit: Leaving.]
pminten has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 272 seconds]
hhugo has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
Hannibal_Smith has joined #ocaml
alexst has joined #ocaml
slash^ has quit [Ping timeout: 248 seconds]
darkf has quit [Quit: Leaving]
eikke__ has joined #ocaml
distantunclebob1 has joined #ocaml
eikke__ has quit [Ping timeout: 260 seconds]
yacks has quit [Read error: Connection reset by peer]
eikke__ has joined #ocaml
yacks has joined #ocaml
slash^ has joined #ocaml
hhugo has quit [Quit: Leaving.]
unsafeCoerce has joined #ocaml
<unsafeCoerce> What would be the recommended way to basically remove opam and everything in ~/.opam clearly because I want all that stuff to be in the root dir rather than th ehome dir?
hhugo has joined #ocaml
<whitequark> rm ~/.opam
<whitequark> rm `which opam`
<whitequark> that's all
<unsafeCoerce> whitequark, that is the clean way?
<whitequark> sure
<unsafeCoerce> Hooray for ëverything is a file" I guess
dapz has joined #ocaml
<unsafeCoerce> and here I'm always using checkinstall to cleanly remove when it's apparently that easy
rand000 has quit [Quit: leaving]
BitPuffin has joined #ocaml
ygrek has joined #ocaml
tane has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
tane has quit [Remote host closed the connection]
tane has joined #ocaml
Rizo_Isrof has joined #ocaml
<Rizo_Isrof> Hello, OCaml community! I’m choosing a language for my next project – (a graph database + logic-based query interface). Would you recommend ocaml for the job? Why not other languages like Haskell, List, Rust or D?
Rizo_Isrof has quit [Quit: Rizo_Isrof]
Rizo_Isrof has joined #ocaml
<Kakadu> Rizo_Isrof: You have two options: OCaml and Haskell
<Kakadu> Lisp have problems with type system, AFAIR
<Kakadu> Rust is not mature enough
<Kakadu> I don't beleive in D :)
<unsafeCoerce> Well, opam still seems to install in the home dir instead of the root directory, any way to make it install in the root directory?
<Kakadu> and OCaml will be siplier if you are new to OCaml/Haskell aproach for writing programs
<whitequark> unsafeCoerce: this is not supported
<Kakadu> Rizo_Isrof: there is very good blog about switching to OCaml from Python, Thomas Leonard is the author
<unsafeCoerce> whitequark, so any library you install with opam is always going to be for one user only?
<whitequark> unsafeCoerce: use your OS' oackage manager instead if you want global installation
<whitequark> more or less
<unsafeCoerce> Well, the OS package manager of course doesn't have all the things in opam that are ocaml specific
<unsafeCoerce> whitequark, hmm, what is the motivation for that?
<whitequark> no one implemented this yet
<unsafeCoerce> Hmm
<unsafeCoerce> usually the global stuff comes before the home dir install I guess.
<unsafeCoerce> I thought there was some kind of reason, it was advertised as a feature
<whitequark> lately, package managers tend to default to single-user installs
<whitequark> gem, pypi (or what was it), npm
<whitequark> global installation is best left to the OS.
<unsafeCoerce> Hmm
<unsafeCoerce> Well, I guess my situation is a bit unusual, / is an SSD, /home is a normal drive, that; sall, I'd like Ocaml libs on the SSD
struktured has quit [Ping timeout: 240 seconds]
<unsafeCoerce> THe normal drive is mostly for music and naughty pictures.
<whitequark> discover symlinks
<jerith> unsafeCoerce: Symlink ~/.opam to /var/opam or something?
<unsafeCoerce> It doesn't complain then that .opam already exists or something?
<jerith> unsafeCoerce: Do whatever it is that creates ~/.opam, move ~/.opam to the new place, then symlink?
<unsafeCoerce> If you say it'll work.
<jerith> unsafeCoerce: I have no idea if it'll work or not, but it's probably worth trying.
<unsafeCoerce> jerith, I suppose it's easy to restore if it burps here and there
<Kakadu> jerith: Yeah. there are many articles there about it
<jerith> The one I linked seems to be the first.
<jerith> Thanks, I'm going to read that.
distantunclebob1 has quit [Quit: Leaving.]
avsm has joined #ocaml
SethTisue has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pminten has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
pminten has quit [Quit: Leaving]
<Rizo_Isrof> I’ve read all the serie of articles from Thomas. His articles are really inspiring and I motivated me to give ocaml a try.
unsafeCoerce has left #ocaml ["Leaving"]
slash^ has joined #ocaml
<Rizo_Isrof> I started to learn the basics of OCaml and later to push the language limits – exploring functors, macros and recently added extension points.
<Rizo_Isrof> I really like ocaml! But after trying to implement some of the base structures in Haskell I started to notice how haskell code tends to become more compact and clean.
<Rizo_Isrof> I think the main problem is the lack of higher ordered polimorphism in ocaml.
eikke__ has quit [Ping timeout: 252 seconds]
eikke__ has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
parcs has quit [Remote host closed the connection]
parcs has joined #ocaml
Eyyub has joined #ocaml
divyanshu has joined #ocaml
Eyyub has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
<mfp> Rizo_Isrof: the things you'd do with higher-kinded polymorphism are done in OCaml using functors
<Rizo_Isrof> Precisely, but the resulting code tends to be far more verbose than the equivalent in Haskell.
<mfp> (note that functors belong to the base language and not anywhere near the "language limits" ;), i.e., not considered a "language extension" > http://caml.inria.fr/pub/docs/manual-ocaml/extn.html)
<mfp> indeed, the module language is normally more verbose than Haskell's (disciplined) ad-hoc polymorphism
Hannibal_Smith has joined #ocaml
SethTisue has quit [Quit: SethTisue]
<mfp> the opposite (Haskell being longer) is true sometimes too: encoding polymorphic variants or modules in Haskell seems about as clunky as encoding type classes with explicit dictionaries in OCmal
Rizo_Isrof_ has joined #ocaml
SethTisue has joined #ocaml
<Rizo_Isrof_> That said, why do you think one would prefer Haskell to OCaml and vice versa? I see many people switching from OCaml to Haskell, what are the main reasons?
<Hannibal_Smith> (I would not use Haskell for something performance oriented, Rizo_Isrof)
SethTisue has quit [Client Quit]
_0xAX has quit [Remote host closed the connection]
robink_ has joined #ocaml
<Rizo_Isrof_> Hannibal_Smith: actually I assumed both Haskell and OCaml have similar performance. I know though that Haskell’s performance is more unpredictable due to lazy evaluation. Is that what you mean, or OCaml generally have better performance?
<Hannibal_Smith> Rizo_Isrof, yes I was referring to what you already know
asmanur_ has joined #ocaml
_weykent has joined #ocaml
yastero_ has joined #ocaml
ygrek has quit [*.net *.split]
Rizo_Isrof has quit [*.net *.split]
cdidd has quit [*.net *.split]
penglingbo has quit [*.net *.split]
robink has quit [*.net *.split]
n0v has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
jbrown has quit [*.net *.split]
tristero has quit [*.net *.split]
asmanur has quit [*.net *.split]
yastero has quit [*.net *.split]
weykent has quit [*.net *.split]
Rizo_Isrof_ is now known as Rizo_Isrof
dsheets has joined #ocaml
ygrek has joined #ocaml
penglingbo has joined #ocaml
jbrown has joined #ocaml
tristero has joined #ocaml
cdidd has joined #ocaml
alpounet has quit [Remote host closed the connection]
SethTisue has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
Kakadu has joined #ocaml
alpounet has joined #ocaml
philtor_ has joined #ocaml
tane has quit [Quit: Verlassend]
fold has joined #ocaml
maattdd has joined #ocaml
milosn has joined #ocaml
philtor_ has quit [Ping timeout: 264 seconds]
n0v has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
NoNNaN has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
divyanshu has quit [Quit: Computer has gone to sleep.]
Kakadu has joined #ocaml
pgomes has joined #ocaml
struktured has joined #ocaml
q66 has joined #ocaml
divyanshu has joined #ocaml
fold has quit [Ping timeout: 248 seconds]
NoNNaN has quit [Ping timeout: 264 seconds]
penglingbo has quit [Ping timeout: 255 seconds]
IbnFirnas has joined #ocaml
NoNNaN has joined #ocaml
tane has joined #ocaml
fold has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
Guest28109 has joined #ocaml
<Guest28109> تحذير
<Guest28109> warning
<Guest28109> do usa&israel use the internet(facebook,youtube,twitter, chat rooms ..ect)to spy??
<Guest28109> do usa&israel use the internet 2 collect informations,,can we call that spying??
<Guest28109> you may be watched
<Guest28109> warning
<Guest28109> do they record&analyse everything we do on the internet,,can they harm you using these informations??
<Guest28109> you may be watched
Guest28109 has quit [Excess Flood]
<Guest28109> do usa&israel use the internet(facebook,youtube,twitter, chat rooms ..ect)to spy??
Guest28109 has joined #ocaml
Guest28109 has quit [Excess Flood]
Guest28109 has joined #ocaml
Guest28109 has quit [Excess Flood]
Guest28109 has joined #ocaml
Guest28109 has quit [Excess Flood]
Guest28109 has joined #ocaml
Guest28109 has left #ocaml [#ocaml]
rand000 has joined #ocaml
<adrien> I can't stand someone who states the internet is facebook, youtube and twitter
<def`> yeah, what about google & amazon
<adrien> and bing
<parcs> and freenode!
maattdd has quit [Ping timeout: 255 seconds]
<jerith> Oh, that spammer.
avsm has quit [Quit: Leaving.]
hausdorff has joined #ocaml
slash^ has joined #ocaml
<ygrek> there is internet outside github?
ygrek has quit [Ping timeout: 255 seconds]
eikke__ has quit [Ping timeout: 255 seconds]
eikke__ has joined #ocaml
avsm has joined #ocaml
ygrek has joined #ocaml
pgomes has left #ocaml ["Leaving"]
alexst has quit [Quit: leaving]
distantunclebob has joined #ocaml
distantunclebob1 has joined #ocaml
distantunclebob has quit [Ping timeout: 255 seconds]
distantunclebob1 has quit [Client Quit]
Eyyub has joined #ocaml
alpounet has quit [Remote host closed the connection]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 272 seconds]
ontologiae has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
dsheets has quit [Ping timeout: 248 seconds]
<Drup> whitequark: you are wrong about opam and root install
<Drup> it works, there is an option for it
<Drup> it's just not very documented (it's somewhere in the faq, I think)
ygrek has joined #ocaml
alpounet has joined #ocaml
<Drup> Rizo_Isrof: It's weird to say it like that, but Ocaml is more "pratical".
<Drup> there is non negligible part of the haskell community who is mostly interested by beauty conquests :p
fraggle_laptop has quit [Remote host closed the connection]
* adrien puts lipstick on Drup
<orbitz> so pretty
<Drup> :3
alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
alpounet has quit [Ping timeout: 264 seconds]
agarwal1975 has joined #ocaml
tnguyen has joined #ocaml
<whitequark> Drup: oh I see
alpounet has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
fraggle_laptop has joined #ocaml
alpounet has quit [Remote host closed the connection]
<tchell> that is like putting lipstick on a cephalopod.
fold has quit [Quit: WeeChat 0.4.3]
alpounet has joined #ocaml
fold has joined #ocaml
alpounet has quit [Ping timeout: 240 seconds]
* whitequark imagines
<Drup> :D
Eyyub has quit [Ping timeout: 272 seconds]
Simn has quit [Quit: Leaving]
thomasga has joined #ocaml
dapz has joined #ocaml
hausdorff has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Sto andando via]
hhugo has quit [Quit: Leaving.]
slash^ has quit [Read error: Connection reset by peer]
SethTisue has quit [Quit: SethTisue]
maattdd has joined #ocaml
Eyyub has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
SethTisue has joined #ocaml
SethTisue has quit [Client Quit]
alexst has joined #ocaml
thomasga has quit [Quit: Leaving.]
robink_ is now known as robink
tane has quit [Quit: Verlassend]
avsm has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 264 seconds]
maattdd has joined #ocaml
axiles has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
hausdorff has joined #ocaml
eikke__ has quit [Ping timeout: 272 seconds]
hhugo has joined #ocaml
eikke__ has joined #ocaml
parcs has quit [Quit: WeeChat 0.4.3]
ustunozgur has quit [Remote host closed the connection]
parcs has joined #ocaml
maattdd has quit [Ping timeout: 248 seconds]
ontologiae has joined #ocaml
maattdd has joined #ocaml
ustunozgur has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
ontologiae has quit [Quit: WeeChat 0.4.0]
ontologiae has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hausdorff has quit [Remote host closed the connection]
Eyyub has quit [Ping timeout: 264 seconds]
kaustuv has joined #ocaml
<kaustuv> what happened to the old wiki for ocamlbuild and camlp4 on brion.inria.fr?
<kaustuv> and are the pages available somewhere?
<def`> hi kaustuv, did you solve your problem about merlin starting on every keystroke?
<Drup> kaustuv: it moved to ocaml.org, iirc
<kaustuv> def`: no, unfortunately. I've decided to just turn merlin-report-warnings off
<kaustuv> Drup, hnrgrgr: thanks!
maattdd has quit [Ping timeout: 255 seconds]
<def`> kaustuv: is it possible that a minor mode is saving the buffer on keystroke? There is no reason for merlin to check this way. You can try by just disable error report on save
<kaustuv> def`: the precise issue is: I start to write a match function, hit C-x C-s (which I hit every five seconds or so), merlin immediately gives a warning about non-exhaustive patterns, and then as I edit the function the display and minibuffers flicker constantly as the multiline warning gets repeatedly written to the minibuffer on every keystroke
<kaustuv> s/match function/match/
<kaustuv> not to mention that the whole function is fontified with compile-warning-face, overriding all other fonts
<def`> Ok, setting merlin-error-after-save to nil should disable this behavior
<kaustuv> I think I tried that, but it still doesn't remove the warning markers and warning fonts when I'm editing the function
<kaustuv> But my memory may be a bit faulty here. Checking again now...
<kaustuv> Hmm, did you mean merlin-error-after-save to non-nil (as the docstring implies)? Mine's set to t.
<kaustuv> Err, setting it to nil turns all error reporting off, including errors, which are actually kind of useful.
ontologiae has quit [Ping timeout: 252 seconds]
ustunozgur has quit [Remote host closed the connection]
<def`> hmm, if you feel this is a usability issue, could you report it on https://github.com/the-lambda-church/merlin ?
Eyyub has joined #ocaml
<def`> it's hard to find settings satisfying differents workflows, and even harder if we are not aware :)
rand000 has quit [Quit: leaving]
oriba has joined #ocaml
<kaustuv> I've been running it with warnings off for a day or two and it's not been too terrible. If error-after-save is nil, how do I manually ask Merlin to check the buffer and report issues?
alexst has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
<def`> kaustuv: M-x merlin-to-end
<kaustuv> Awesome. Thanks!
alexst has joined #ocaml
<kaustuv> One suggestion I will use is not to use compile-warning-face and compile-error-face for merlin's error markers. They are usually designed to be garish and easily visible fonts, but since many errors also cause an error mark over the whole function it obscures important details
<kaustuv> gah s/use/make/
eikke__ has quit [Ping timeout: 255 seconds]
eikke__ has joined #ocaml
inhahe has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
eikke__ has quit [Ping timeout: 272 seconds]
ebzzry has joined #ocaml
hausdorff has joined #ocaml
<Rizo_Isrof> Drup: well, code beauty may be a subjective quality in programming but I think the point with haskell is that there are elegant and clean ways to encode some practical domains with it. Yes, beauty by itself is absurd. But I’m not sure if sometimes sacrificing functionality and power in favor of _beauty_ may bring much harm to a language.
ollehar has quit [Ping timeout: 255 seconds]
alexst_ has joined #ocaml
<Drup> except that, in haskell, the beautiful (and idiomatic) code is very often not efficient. And it's quite common for library maintainers (including ghc) to break all retro compat because they can make their interface oh-so-slightly elegant.
<Drup> elegance in code is good, but it's not worth sacrificing other desirable qualities for it
WraithM has joined #ocaml
alexst has quit [Ping timeout: 240 seconds]
<Rizo_Isrof> Good point! But I think this particular problem is a problem of the “oh-so-slightly elegant” culture and not of the language itself.
<Drup> indeed
<Drup> but the culture is part of the language, in some way :)
<Rizo_Isrof> One good example in my opinion is Functors and higher order modules vs Type Classes and higher kinded polymorphism – the former is more general and more powerful but it’s also requires more effort to be used. While the latter simplifies the commom use cases and results in a more concise and clean code.
<Drup> (actually, both are mostly as expressive)
<Drup> I tend to say that you compare spaghetti at definition site (functors) with spaghetti at usage site (type classes) :p
<Rizo_Isrof> Forgiv me if Im wrong, I just started to learn OCaml some weeks ago. As far as I know Type classes allow you to have only one implementation for a specific type, while with Functors you may have as many as you wish.
<Drup> (because debuging code with a fmap applied to the element inside the state of a writer monad is not my idea of fun)
<Drup> (and that's only 3 monads imbricated, with that much typeclasses)
<Rizo_Isrof> ok, that seems fair!
<Drup> (you can do *so* *much* *worse*)
<Drup> Rizo_Isrof: you can work around this issue with newtype in haskell
ontologiae has joined #ocaml
<Drup> (there is a paper with a formal proof of the equivalence of functors and type classes)
<pippijn> Drup: equivalence doesn't necessarily mean much
<Rizo_Isrof> pippijn: seems to be encoding issue – that happens when you try to use apps in a language different of yours system’s language.
<Drup> it means you can use one for the other, with the proper encoding
<pippijn> yes
<Rizo_Isrof> But the encoding does matter.
<Drup> what it doesn't say, of course, is how easy is it
<pippijn> you can use any turing complete language to encode any program that can be encoded in any other turing complete language
<pippijn> modulo I/O primitives
<Drup> and basically, it's an inversion of control. at definition vs. at usage
<Drup> so, it all depends of the problem
<Drup> (that's why people want type classes in ocaml too :p)
<Rizo_Isrof> I think what really matters is the definition of the **idiomatic and maintainable code** in each of the languages – the comparison must be made there. And what I am saying is that, the code in OCaml tends to look more practical, precise and verbose, while in Haskell it’s more clean and compact in general (when the code matches the problem).
<pippijn> Rizo_Isrof: unless you want it to be fast in haskell
<pippijn> then it becomes progressively uglier
<pippijn> but the same holds for ocaml
jonludlam_ has quit [Read error: Connection reset by peer]
jludlam has quit [Read error: Connection reset by peer]
<pippijn> if you want maximum performance, the code may be ugly
eikke__ has joined #ocaml
<Drup> pippijn: I lack ocaml for the small amount of magic the compiler is doing
<pippijn> lack?
<Drup> the mental model need to understand how the code will behave at runtime is simple
<Drup> it's not true for haskell at all
<pippijn> ah, yes
<pippijn> I like that
<Drup> I like* bll ~~
<BitPuffin> yeah it's quite nice
<Rizo_Isrof> it’s a world closer to reality
<Rizo_Isrof> As I said initially I’m working on a small graph database and I decidet to implement the core of the project in both Haskell and OCaml. I just cant decide… so I’ll let the time help me.
<Drup> pick another project and do it in the other language :p
<Rizo_Isrof> what project/language would you suggest?
<BitPuffin> operating system written in cobol
dapz has joined #ocaml
<Drup> poor BitPuffin, traumatized since childhood :(
<BitPuffin> lol
<BitPuffin> I'm 19 :D
<Rizo_Isrof> luckily I never used cobol, my generation writes everything in javascript :P
<Drup> BitPuffin: then I was right on point :D
<BitPuffin> to be honest cobol is probably a bit cooler than javascript
eikke__ has quit [Ping timeout: 240 seconds]
WraithM has quit [Ping timeout: 272 seconds]
<Drup> no, you can compile proper languages to javascript
<Drup> you can't compiler proper languages to cobol.
<BitPuffin> sure
<Drup> Rizo_Isrof: hard to answer in all generality
<Drup> the graph database thingy would be interesting in both languages
<BitPuffin> but I mean if someone comes up to me and says "Hey someone wrote a kernel in javascript" I would go "omg ew why? javascript is lame", but if it was cobol, I would be like "damn son, props!"
<Drup> BitPuffin: you do know someone *did* wrote a kernel in js ?
eikke__ has joined #ocaml
<BitPuffin> Drup: no and I hope I never do
<BitPuffin> well
<Drup> you do know :D
<BitPuffin> there was a guy who wrote a linux emulator, but that was probably more a hardware emulator
<BitPuffin> Drup: you wrote a kernel in javascript?
<Drup> of course not, I'm not crazy
<Drup> hum, actually ...
<Rizo_Isrof> I never understood this kind of masochism
<BitPuffin> Rizo_Isrof: I would say OCaml, not because I prefer OCaml I love both, but I'd imagine with a graph database you'll need to fall back on some imperative programming for some parts, and that's not as awkward in OCaml as it is in haskell
<Drup> (but not crazy this way)
<BitPuffin> that said
<BitPuffin> haskell has better parallelism support
<Drup> and an excellent STM library, which may be interesting for a database.
<BitPuffin> STM? Sexually transmitted mutations?
<Drup> Software Transaction Model
<Rizo_Isrof> people on #haskell mentioned it too
<Rizo_Isrof> it helps a lot having it in databases
<BitPuffin> ah
<BitPuffin> clos guess though
<Rizo_Isrof> really close
<BitPuffin> Rizo_Isrof: well you would probably write your own in ocaml if there isn't one already if you decided to go with ocaml
<Rizo_Isrof> Yes, but actually my main problem right now is how to model the thing. Or to be more precise hot do encode it with the language.
<BitPuffin> the thing?
<Drup> that's always the hard part when learning a new paradigm, yes
<BitPuffin> the databes? or the STM
<Rizo_Isrof> the database model
<BitPuffin> they way you'll implement it will most likely be very similar in both languages
<Drup> actually, I don't think so
<Rizo_Isrof> I come from python background and in my head everything is an object you know :P
<BitPuffin> also keep in mind that you do have laziness in ocaml as well, it's just not the default
<Drup> (ocaml and haskell idioms are very different)
<BitPuffin> Rizo_Isrof: yeah, I started with java :P
<BitPuffin> where everything must absolutely be in a class
<BitPuffin> Drup: sure, but it's still mostly just passing algebraic datatypes around to functions
<BitPuffin> and mathing on them
<BitPuffin> etc
<Rizo_Isrof> you’re right if all you have is basic datatypes, but what I you start extending your model with complex relations and “inheritance” of concepts, etc.
<BitPuffin> that said haskell is a bit weirder because you need to work around its hatred towards imperative programming and side effects
ontologiae has quit [Ping timeout: 248 seconds]
<Rizo_Isrof> You’ll have to start using modules/type classes and that’s the terrain I’ve never been before
<BitPuffin> yeah, ocaml doesn't have type classes
<BitPuffin> that's a big difference
<Rizo_Isrof> Is it that complicated to work around the impure work in haskell?
<BitPuffin> I'm not sure
<Rizo_Isrof> there’s a rumor saying that haskell is the finest imperative programming language too
<BitPuffin> full disclosure it was quite a few months since I was learning haskell and I didn't even finish the book :P
<BitPuffin> not that I wasn't interested, haskell is cool, but I was busy
<Rizo_Isrof> sincerely I think this must be one of the most difficult choices since the time I start programming
madroach has quit [Ping timeout: 252 seconds]
<Rizo_Isrof> And I really did invest a lot of time trying to understand how the two languages work, aspects of the community, the development process, etc.
<Drup> bah
<Drup> just write some stuff in it, there is no other way to learn anyway
<BitPuffin> that it's the finest imperative language is probably something only haskell fanboys would say
<BitPuffin> like
<Drup> write it once, it will be crappy, then write it another time from scratch
<BitPuffin> those who write everything in haskell
madroach has joined #ocaml
<BitPuffin> Rizo_Isrof: to be honest both would be perfectly fine choices
<BitPuffin> so it's not like there is a wrong choice
<Rizo_Isrof> yes, I finally decided to write in parallel some basic implementation in both languages
<BitPuffin> if someone can write a graph db in python which sounds like a silly idea then a graph database in either of these languages is excellent and interesting :P
<Drup> (I would advice to do something different in the other language)
tobiasBora has joined #ocaml
<Rizo_Isrof> I could write one part of the project in OCaml and another one in Haskell
<Drup> you could, it doesn't make it a good idea :x
tobiasBora is now known as tobiasBora_
NoNNaN has quit [Remote host closed the connection]
tobiasBora_ has quit [Client Quit]
tobiasBora has joined #ocaml
<Rizo_Isrof> why not? i’m not saying I would mix both languages in the same project. But writing the core in OCaml and a web-site backend in Haskell could be an interesting exercise.
tobiasBora is now known as tobiasBora_
<Rizo_Isrof> (I plan to have a webui.)
NoNNaN has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> (I would do the other way around)
<Rizo_Isrof> you mean haskell for the core and ocaml for the web part?
<Drup> (actually, I would not try to mix two languages like that at all)
<Drup> learn one language correctly, then learn the other
<Rizo_Isrof> The main idea is to actually gain the feel of each of the languages
<Drup> (or use them on two different unreleated projects)
<Drup> if you try to practice both at the same time, you will just get confused
tobiasBora_ has quit [Remote host closed the connection]
<Rizo_Isrof> Maybe you’re right!
tobiasBora has joined #ocaml
<BitPuffin> you could also write it in idris
* BitPuffin runs and hides
<BitPuffin> (because when a man has too many options, offer another option, amirite)
<Rizo_Isrof> actually it was one of my initial candidates
<Drup> coming directly from python without any type theory knowledge, it might be a bit violent :p
<Rizo_Isrof> but first - its not mature enogh, and second - I think it would be better to learn haskell before starting to do the proof-based programming
<BitPuffin> Drup: using any of these language with no experience of good type systems is a bit violent
hausdorff has quit [Remote host closed the connection]
<Rizo_Isrof> I’m not a “virgin” python programmer, I’ve used C++, D and Java a lot too.
tobiasBora has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 248 seconds]
tobiasBora has joined #ocaml
<Rizo_Isrof> other options were: Lisp (Racket), Rust, Go and Julia… but as you know I ended up only with Ocaml and Haskell.
<BitPuffin> well
<BitPuffin> those don't really have good typesystems either :P
vfoley has joined #ocaml
<Rizo_Isrof> that’s why I like ocaml and haskell more
<Rizo_Isrof> :P
<BitPuffin> exactly :D
<vfoley> How do you choose between type t = { mutable x: int } and type t = { x: int ref } ?
<BitPuffin> or you could say
<BitPuffin> exhaskelly
<BitPuffin> ..god how forced
<BitPuffin> vfoley: you pick the first one
<BitPuffin> because the second option is
<Drup> vfoley: always the first
<BitPuffin> type t = {x: {value: mutable int}} or whatever
<BitPuffin> ie, ref is just a record with a mutable value
<BitPuffin> :P
<BitPuffin> so yeah, always the first
hausdorff has joined #ocaml
tobiasBora has quit [Remote host closed the connection]
darkf has joined #ocaml
tobiasBora has joined #ocaml
<Rizo_Isrof> Drup: BitPuffin: Thanks for you comments and suggestions!
<Drup> vfoley: https://github.com/ocaml/ocaml/blob/trunk/stdlib/pervasives.ml#L202 here is how ref is implemented
<BitPuffin> Rizo_Isrof: hey no problem, thanks for listening :P
<BitPuffin> Drup: that said I don't really see the point with ref's. My language will simply have mutables
<BitPuffin> you can do let const foo = .. let foo = ... or let mut foo = ...
<BitPuffin> const means known at compile time
<Drup> yeah, that's just hardcoding ref in the language
<BitPuffin> sure
hhugo has quit [Quit: Leaving.]
<BitPuffin> but mutable records are also hardcoded :P
tobiasBora has quit [Remote host closed the connection]
<Drup> but you need only one of them : mutability at the record level or the identifier level
tobiasBora has joined #ocaml
<Drup> since you can define one with the other