<Guest2650>
Thank you anyway for the website, that's kind but i will have to develop a project for school so i don't think this will help me over time
<Guest2650>
I have absolutely no idea
ohama has quit [Ping timeout: 240 seconds]
<jamesst20>
Guest2650: Samething haha OCaml for school. But I am running Mac OS X, I have installed Sublime Text with the OCaml Merlin Extension
<jamesst20>
Guest2650: What's the exact error message then ?
<Guest2650>
OCaml version 4.02.3
<Guest2650>
In emacs, after executing ocaml i get : Fatal error : exception Cmi_format.Error(_) and then Process inferior-caml exited abnormally with code 2
<octachron>
Guest2650, that error sounds like you have a version mismatches between your ocaml compiler and the standard library compiled files
espinoza has quit [Ping timeout: 260 seconds]
<Guest2650>
I had the same issue (but i have this issue too) and this is the closest problem to mine
<Guest2650>
ah
<octachron>
Guest2650, which indeed could totally be a path problem, i.e the compiler might be picking the wrong version of stdlib somehow
<Guest2650>
Yes
<Guest2650>
I think the same
<Guest2650>
But
<Guest2650>
I don't know what to do
dch_ has quit [Ping timeout: 268 seconds]
<Guest2650>
Maybe someting in $PATH or a variable called $OCAMLLIB
<octachron>
Guest2650, $(OCAMLLIB) should be the path to the stdlib, you can check if it is the case
sillyotter has joined #ocaml
<octachron>
and compare to "ocaml -where"
jabroney has left #ocaml [#ocaml]
sillyotter has quit [Client Quit]
snowcrshd has joined #ocaml
<Guest2650>
Should it be something like "usr/lib/ocaml" ? I watched in the folder, there is files like "arg.ml","list.ml"..., some directories like "ocamlbuild" and "ocamldoc"
<Guest2650>
and unfortunately ocaml -where is not working apparently
handlex has joined #ocaml
ski has quit [Quit: Lost terminal]
<Guest2650>
(Initially the variable was not the good one, i modified it) But now i have this : Fatal error: exception Typetexp.Error(_, _, _) after modifying OCAMLLIB
jao has quit [Remote host closed the connection]
jao has joined #ocaml
<octachron>
Guest2650, this sounds like the right folder. You could try to use ocamlobjinfo on the .cmi files in this folder to be sure that they are compatible with the installed binary
<octachron>
Guest2650, you could also check that the version with "ocaml -v" matches what you expect
<Guest2650>
ocaml -v is not working aswell, BUT i know that the version i'm trying to execute is 4.02.3 (this message is displayed just before the fatal error)
<Guest2650>
And i'm searching but i don't know how to use ocamlobjinfo on .cmi files
yomimono_ has quit [Ping timeout: 255 seconds]
<Guest2650>
okay i did this
<Guest2650>
but i don't really know what to conclude here, it doesn't display a version or something like that
<octachron>
but it worked (it does not work if there is a version mismatch)
<Guest2650>
Okay
<Guest2650>
That's bad
<octachron>
Do you have the same errors with ocamlopt?
al-damiri has quit [Quit: Connection closed for inactivity]
<Guest2650>
Eeeh
<Guest2650>
What to do with ocamlopt ?
<Guest2650>
It is recognized by the terminal but it shows nothing
handlex has quit [Quit: handlex]
<octachron>
So "ocamlopt -v" works but not "ocaml -v" ?
<Guest2650>
Yes it does
<Guest2650>
Exactly what i want : version 4.02.3 and the good standard lib
<Guest2650>
ocaml -v
<Guest2650>
oops
awal has quit [Ping timeout: 245 seconds]
<Guest2650>
definitely not working
phase_ has joined #ocaml
<octachron>
next possibility: try ocamlrun and ocamlrun ocaml
<jamesst20>
(If in the end you guys are not able to fix it, I guess it's still possible to run a VM with Linux :) )
francoisbabeuf__ has quit [Ping timeout: 260 seconds]
<Guest2650>
Oh man
<Guest2650>
ocamlrun ocaml display the good version + an interpreter
<Guest2650>
But alone i don't know how to use ocamlrun sorry
awal has joined #ocaml
<Guest2650>
+ jamesst20 i thought of that a while ago because it could be really good for many things. But it's not working on my computer :/
awal is now known as Guest68434
<jamesst20>
Guest2650: How come a VM is not working on your computer?
<Guest2650>
Virtualization option cannot be activated in BIOS apparently
<jamesst20>
Guest2650: I have never heard of incompatibility with a specific computer with VMWare or Virtual Box
<octachron>
Guest2650, if "ocamlrun ocaml" runs it means that the standalone "ocaml" was picking the wrong version of ocamlrun
<Guest2650>
\ o / and do you know how to fix it ? :D
<jamesst20>
Guest2650: Then a 32 Bit OS should work under VMWare
<Guest2650>
Oh, so a 32 Bit OS can run under a 64 ?
<Guest2650>
I didn't try
<Guest2650>
I will
<Guest2650>
That could be the solution i believe :)
<octachron>
Guest2650, not a solution on the top of my head (it has been years since I last used OCaml on windows), but a first possibility: locate your ocaml executable
<octachron>
sorry, better idea: it seems that under windows , ocaml looks for ocamlrun using the PATH variable
<Guest2650>
Both /bin/ocaml.exe and /bin/ocamlrun.exe are found
<Guest2650>
oh
<Guest2650>
yeah i guess you're right
<Guest2650>
but mhh
<Guest2650>
it's a bit tricky
sh0t has quit [Remote host closed the connection]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
octachron has quit [Quit: Leaving]
shinnya has joined #ocaml
FreeBirdLjj has joined #ocaml
jamesst20 has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
handlex has joined #ocaml
snowcrshd has quit [Ping timeout: 240 seconds]
silver has quit [Quit: rakede]
bobbypriambodo has joined #ocaml
bobbypriambodo has quit [Client Quit]
bobbypriambodo has joined #ocaml
bobbypriambodo has quit [Read error: Connection reset by peer]
fraggle_ has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
bobbypriambodo has joined #ocaml
fraggle_ has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
jamesst20 has quit [Ping timeout: 255 seconds]
bobbypriambodo has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
FreeBirdLjj has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
<jamesst20>
Hi
<jamesst20>
Does anyone know how to recursively loop through a ref list with pattern matching?
ygrek has quit [Ping timeout: 260 seconds]
wtetzner has quit [Remote host closed the connection]
handlex has quit [Quit: handlex]
rgrinberg has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
snhmib has quit [Quit: WeeChat 1.6]
phase_ has quit [Remote host closed the connection]
jamesst20 has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
programo has quit [Quit: Leaving]
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 255 seconds]
mengu has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
Guest82 has joined #ocaml
jamesst20 has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
bobbypriambodo has joined #ocaml
bobbypriambodo has quit [Client Quit]
Guest82 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bobbypriambodo has joined #ocaml
bobbypriambodo has quit [Remote host closed the connection]
bobbypriambodo has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
bobbypriambodo has quit [Ping timeout: 255 seconds]
govg has quit [Ping timeout: 260 seconds]
fre has joined #ocaml
AlexDenisov has joined #ocaml
jnavila has joined #ocaml
kakadu has joined #ocaml
Guest68434 has quit [Quit: ZNC 1.6.3 - http://znc.in]
govg has joined #ocaml
awal has joined #ocaml
awal has quit [Changing host]
awal has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
ygrek has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
<frefity>
does anyone have an example of using Lwt_pool to create a network connection and check that it hasn't been closed before putting it back in the pool?
Simn has joined #ocaml
alfredo has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
<frefity>
It appears to do that automatically since a closed connection will raise an exception which causes the pool to release it
govg has quit [Ping timeout: 268 seconds]
govg has joined #ocaml
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 240 seconds]
octachron has joined #ocaml
dch_ has joined #ocaml
AlexDenisov has joined #ocaml
AltGr has joined #ocaml
<flux>
cool, mirage 3.0 supports KVM!
dch_ has quit [Read error: Connection reset by peer]
calculemus has quit [Quit: WeeChat 1.7]
mfp has joined #ocaml
larhat has quit [Quit: Leaving.]
_habnabit has quit [Ping timeout: 264 seconds]
_habnabit has joined #ocaml
jamesst20 has joined #ocaml
sz0 has joined #ocaml
jamesst20 has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
malfunct has joined #ocaml
malfunct has quit [Client Quit]
freechips has quit [Ping timeout: 240 seconds]
yomimono_ has joined #ocaml
calculemus has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhil has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
francoisbabeuf__ has joined #ocaml
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
malc_ has joined #ocaml
mengu has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
francoisbabeuf__ has quit [Ping timeout: 240 seconds]
average has quit [Remote host closed the connection]
snowcrshd has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
ziyourenxiang has joined #ocaml
FreeBirdLjj has joined #ocaml
_andre has joined #ocaml
AlexDenisov has joined #ocaml
AlfredENeuman has quit [Ping timeout: 240 seconds]
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
<mengu>
hi guys
<mengu>
can we think of Functors as it's taking a type and generating code for the specific type and returning a new one?
<mengu>
not type, moodule i mean
govg has quit [Ping timeout: 240 seconds]
AlfredENeuman has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
<malc_>
mengu: to quote refman: "2.3 Functors Functors are “functions” from structures to structures."
freechips has joined #ocaml
<mengu>
malc_: see? when they know their terms, they explain better :D
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ocaml
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
alfredo has joined #ocaml
alfredo is now known as alfredo[away]
alfredo[away] is now known as alfredo
alfredo has quit [Client Quit]
dhil has joined #ocaml
larhat has joined #ocaml
sepp2k has joined #ocaml
dmi3y has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBird_ has joined #ocaml
wtetzner has joined #ocaml
zpe_ has quit [Remote host closed the connection]
Muzer has quit [Read error: Connection reset by peer]
yomimono_ has quit [Ping timeout: 260 seconds]
<companion_cube>
grrr, but why is Lwt_result deprecated, really
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has joined #ocaml
AlexDenisov has joined #ocaml
jamesst20 has joined #ocaml
<Drup>
companion_cube: there is a bug report on the question, please yell there :D
<companion_cube>
hmm I can't find it :/
larhat has quit [Quit: Leaving.]
<Drup>
hum, maybe it's closed ? the one with the deprecation notices
wtetzner has quit [Remote host closed the connection]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
th5 has joined #ocaml
jnavila has quit [Quit: It was time]
jamesst20 has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
silver_ has joined #ocaml
vramana has quit [Remote host closed the connection]
silver has quit [Ping timeout: 240 seconds]
silver_ is now known as silver
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Drazy has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
freechips has quit [Ping timeout: 255 seconds]
jamesst20 has joined #ocaml
ygrek has joined #ocaml
Denommus has joined #ocaml
freechips has joined #ocaml
handlex has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
handlex has quit [Quit: handlex]
larhat has quit [Quit: Leaving.]
shinnya has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 240 seconds]
handlex has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
<snowcrshd>
has anyone played around with Cohttp for serving large files? I'm not able to find a good example online ):
djellemah has quit [Ping timeout: 255 seconds]
djellemah_ has joined #ocaml
jamesst20 has quit [Remote host closed the connection]
handlex has quit [Quit: handlex]
jamesst20 has joined #ocaml
mengu has joined #ocaml
jamesst20 has quit [Remote host closed the connection]
tg has quit [Remote host closed the connection]
tg has joined #ocaml
dhil has joined #ocaml
ygrek has joined #ocaml
tg has quit [Quit: Leaving]
tg has joined #ocaml
larhat has joined #ocaml
rpg has joined #ocaml
rpg has quit [Client Quit]
rpg has joined #ocaml
jamesst20 has joined #ocaml
average has joined #ocaml
<rpg>
Novice question: I have been looking over some books on Ocaml, and the ones I have seem to make the following jump: basics of functional and imperative programming then jump to building modules. It seems to me that a better approach would be to do the basics of functional and imperative programming then a smaller step to USING pre-existing modules then the jump to building one's own. Is there any source that trains in this way?
dhil has quit [Ping timeout: 240 seconds]
infinity0 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
<rpg>
I find myself at a bit of a loss for how to use existing sets of Ocaml libraries and while building my own higher-level abstract modules seems definitely cool, I feel like I should cut my teeth using previously-existing modules.
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
<Drup>
rpg: what do you have trouble with exactly ?
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
<rpg>
Drup: well, for example it seems like I could write some pretty interesting Ocaml code, and get to be a better Ocaml programmer, just using things like the existing maps, and hash maps, before trying to learn how to make my own abstract modules. The book I have seems to jump straight from simple programming to engineering complex modules with various abstractions (e.g., abstract cost function).
<rpg>
I can see that for the writer it feels nice to teach the concepts of module construction, but for learning to program it is a very big step.
fre has quit [Quit: WeeChat 1.7]
infinity0 has joined #ocaml
<rpg>
E.g., writing a program that uses a pre-existing graph library with a parameterizable cost/distance function is a lot easier than building such a graph library.
<rpg>
maybe I just haven't found the right source?
infinity0 has quit [Remote host closed the connection]
<Drup>
probably. I can't really judge. My questions was more like: do you have concrete problems with using ocaml libraries right now ? :)
infinity0 has joined #ocaml
<rpg>
Drup: I was going to teach myself a little Ocaml by writing a game that involved computing shortest distances on a graph. So I don't want to write myself a new generalized graph module right away -- I'd like to just know how to use existing modules. The book I have seems to jump directly to building abstract modules without a step of just using existing ones.
infinity0 has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
<Drup>
You need to define modules to be able to use functors anyway. You'll quickly learn how to use them as soon as you learn to write them. It kind of goes together
infinity0 has joined #ocaml
<rpg>
The book I have is trying to tell me how to do things like abstract over the nature of the cost function -- but really, it would be a lot easier to see how one might *invoke* such an abstraction before jumping in to creating one.
<rpg>
Or, I want to have a hash table for my board positions. I don't want to invent a new hash table module (right now, anyway) -- I'd just like to know how to use the existing libraries.
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Drup>
which book are you using ?
jamesst20 has quit [Remote host closed the connection]
<Drup>
(I feel like you will get what you want if you just go a little bit further in the book, regardless which one it is)
<rpg>
Real World Ocaml is the book I'm using.
<rpg>
Sorry to be dense, but from my PoV, wanting to be able to use an existing hash table module to store and retrieve information should be a much simpler task than designing a hash table system with an abstract comparison operation.
<rpg>
I'm obviously not getting something, since you feel that the task of using an abstraction is no simpler than the task of building one from scratch.
<chelfi>
I may be wrong, but I think the way you use hash tables in ocaml is foreign enough that it warrants discussing the module system a bit beforehand
<chelfi>
In particular, the fact that you would use a functor to get a specialised version of your hash table module may be surprising
<chelfi>
Many languages' stdlibs provide a default hashmap implementation which pretends to work on any type, while it actually depends on a hash function being defined for your type
<Drup>
rpg: I didn't said you were wrong. I just haven't really read all the OCaml books, so I can't really help. http://caml.inria.fr/pub/docs/manual-ocaml/moduleexamples.html#sec20 also explain functors from a usage point of view even if it's not the most pedagogic source.
<rpg>
OK, that helps a little -- the idea is that in order to use the abstraction I don't just plug it in as in other programming languages, instead I build a module that mates the existing capabilities (hashtable libraries) together with features of my problem.
<rpg>
Drup, chelfi: those pointers are helpful.
<chelfi>
though there is such a default implementation in ocaml, it is idiomatic (afaict) to not depend on magic values to build your modules
<Drup>
rpg: also, you seem to assume that rwo should be read in a linear order. I don't think that's the case at all. You should look at the index and pick what you need as you need it
<chelfi>
(at least if you want your knowledge on how to use hash maps to transfer to other non trivial modules)
jamesst20 has quit [Remote host closed the connection]
<mengu>
rpg: with python, a hash map / a dict is actually a class that holds tuples with two values
<mengu>
so it's like [(key1, value1), (k2, v2), (k3, v3)]
<mengu>
so anything particular holding you back from having a list of let's say string * string?
<Drup>
mengu: the fact that's it's crap and unidiomatic in OCaml might be a good reason ;)
<rpg>
mengu: I think a difference is that there is no formal thing that bridges between a python library and its client. If I understand this discussion, the point is that the library provides a specification, and the client must provide a formalisation that shows how the library will be applied.
<rpg>
E.g., in lisp I can provide a set of functions that allows a graph to be rendered graphically. The set of functions is a protocol, but unlike in Ocaml, there's no way to formalize the protocol (or check it).
<mengu>
easy guys :D
<rpg>
(sorry about that "graph" and "graphical")
<mengu>
rpg: do you mean there is an X protocol and you define a set of funcs in that X protocol?
<mengu>
i kind of didn't get that
<rpg>
mengu: the protocol is just an informal thing. It requires that you provide methods for graph-children, graph-node-object, etc. for all of the objects that you might have in your graph.
<rpg>
if you do it right, this library will (use graphviz) to render your arbitrary graph. if you do it wrong, run time failure. I believe the claim would be that if you create the right mapping in Ocaml, you are guaranteed at compile time, that something like this protocol will behave properly.
shinnya has joined #ocaml
<Drup>
Yes, that's pretty accurate
AlexRussia has joined #ocaml
jabroney has quit [Quit: Leaving.]
<rpg>
I'm still groping a little. Looking at your chap 13 citation, it seems like the counter module is first specified, then the implementation is created by binding aspects of the module to existing library building blocks.
<rpg>
I'll try building my little boardgame example and see if I can make this work out.
slash^ has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
<mengu>
i wonder if rpg read the functors sections
<mengu>
he read 13th, so he prolly did
<mengu>
isn't functors what he wants?
<rpg>
mengu: kind of got lost in Chapter 4
<mengu>
oh, my client didn't complete your nick, i thought you left
<mengu>
rpg: i believe functors are exactly what you are looking for
<octachron>
I feel that I am getting far too used to writing user-defined indexing operators PRs …
<Drup>
octachron: are you finally writing a new one ? :p
<octachron>
Drup, yep :p. This time the syntax of the day is '.' dot-operator-char operator-char ([{ }]), i.e let ( .%() ) = …
<octachron>
with no interaction with existing code, no new primitives, no broken code anywhere
<octachron>
and a foreign enough syntax that mark the new operators as user-defined
<octachron>
at least, I quite like ".?[]"
rpg has quit [Ping timeout: 260 seconds]
<Drup>
that's would I have done too
<Drup>
+what
<Drup>
although I tend to stuff operator-char everywhere
<octachron>
Drup, and that was an idea inspired by wednesday developer meeting, so who knows?
<Drup>
(I've wanted to add custom delimiters for a while too, but I'm pretty sure everyong is going to yell at me if I propose ([{ operator-char <;-separated list> }])
<Drup>
octachron: oh really ? ok
_andre has quit [Quit: leaving]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
jamesst20 has quit [Remote host closed the connection]
nahra has quit [Remote host closed the connection]
nahra has joined #ocaml
nahra` has joined #ocaml
nahra has quit [Ping timeout: 260 seconds]
jabroney has quit [Quit: Leaving.]
rpg has joined #ocaml
<octachron>
Drup, I am not completely sure about the yelling, I would more expect an heavy silent disapproval
jao has quit [Ping timeout: 255 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
Denommus has quit [Quit: going homme]
ryanartecona has joined #ocaml
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexRussia has quit [Ping timeout: 240 seconds]
rpg has joined #ocaml
AlexRussia has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 255 seconds]
d0nn1e has joined #ocaml
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 268 seconds]
mankyKitty has quit [Ping timeout: 252 seconds]
ggherdov has quit [Ping timeout: 258 seconds]
mankyKitty has joined #ocaml
ggherdov has joined #ocaml
Tato has joined #ocaml
<Tato>
Hi! I am a guy with some experience with F# and Haskell, FP-wise. Now I am in process of having to choose a technology stack and was being intrigued by OCaml. I have some questions and I hope you can clear my doubts!
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mengu>
Tato: shoot
<mengu>
Tato: and welcome :-)
<flux>
we can't guarantee clearing.. :)
<Tato>
Thank you! I will try my luck then regarding clearing doubts ahahaha!
<Tato>
Well, so let's say that last time seeing OCaml was in my undergrad at a course about FP (conducted in F#) and I remember that the library ecosystem at the time was not great. But I am seeing lot of noise in that regard recently with the institution of OPAM. How would you compare that to the Haskell library ecosystem?
<mengu>
Tato: are you using stack? cabal?
<Tato>
I am familiar with the both.
<mengu>
so, i'm really new to ocaml, i'm idling here in case i have questions or someone asks a question that i can answer
<Tato>
And I mean, comparing them in terms of "size" and "quality" of libraries.
kakadu has quit [Remote host closed the connection]
<mengu>
so, std lib is good, but there is another library called Core by a company called Jane Street that has a lot extensions on top of std lib
<mengu>
packaging / installing packages / updating packages is really easy with opam
<mengu>
better yet, you don't download the whole internet :-D
<Tato>
My question is a bit more profound since at the time I felt that I would spend most of the time having to write external packages when in the middle of "solving" a problem.
<Tato>
For example at the time I was in need of a JSON parser and could not find a robust one, is the situation changed now?
<mengu>
Tato: of course
<mengu>
there's yojson for that
<mengu>
wanna make http requests? there's cohttp for that
<Tato>
So you would say that if you were in need of "something" you would find always a robust library in OPAM?
<mengu>
i cannot say always but most of the time
<Tato>
Also are they documented well?
<mengu>
prolly depends from package to package
<Tato>
Are you able to make a comparison with the Haskell's ecosystem?
<mengu>
i feel less informed with haskell packages
<Tato>
No prob!
<Tato>
Think will investigate that on my own.
<mengu>
Tato: but this is not python, ruby or go ecosystem as well
<Tato>
yeah! exactly, my favourite programming language is F#. I feel that for what we are developing we would have lot of fun in OCaml
<Tato>
F# is not native which sort of breaks our use case.
<Tato>
OCaml I see that it compiles natively which is great.
<mengu>
indeed
<Tato>
Then I will ask you another last question, this is a "n00b" question, since I come from F#
<mengu>
i am the n00best
<Tato>
there we can omit the final "in" after a "let"
<mengu>
no probs
<Tato>
is it possible to do the same in OCaml? :D
<mengu>
do you mean let x = in let y in?
<Tato>
yeah
<Tato>
let x = .... in
<Tato>
in F# you could do
<Tato>
let x =
<Tato>
let x = ...
<Tato>
but you think of that as having a final "in"
<Tato>
but you can omit it
<Tato>
I am asking just for syntactic pleasure :D
<mengu>
in utop we can do that but i never tried it in source :D
<Tato>
Guess I will have to try then
<Tato>
Thank you for the answers, guess I will have to play a bit in an afternoon
<mengu>
Tato: i find ocaml more readable than haskell
<mengu>
and somehow more extensible
<mengu>
Tato: and make sure you have utop
<mengu>
that's one nice shell
<Tato>
Definitely. Also it looks like that packages are better documented
<mengu>
Tato: are you doing web dev?
<Tato>
in Haskell I never parrotted the idea of types being the documentation
<Tato>
No definitely not web
<mengu>
then you are good
<Tato>
Care to explain what is the "issue" with web?
<mengu>
it's just my taste. i can go with yesod of haskell but not anything in the ocaml world
<Tato>
ah! ok! makes sense
<Tato>
We do not plan to go "web"
<Tato>
but we do lot of analytics
<Tato>
and the idea of expressing complicated computations in OCaml is funny
<Tato>
THank you for the hints will definitely take some time to investigate OCaml