hurrdurrmurr has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
malina has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
malina has joined #ocaml
bruce_r has quit [Ping timeout: 258 seconds]
Jesin has quit [Quit: Leaving]
littleli has joined #ocaml
zolk3ri has quit [Quit: leaving]
p1n34ppl3 has joined #ocaml
yomimono has quit [Quit: Leaving]
sh0t has joined #ocaml
samrat_ has joined #ocaml
shinnya has joined #ocaml
nomicflux has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
nullifidian has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
malina has quit [Remote host closed the connection]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
malina has joined #ocaml
axesd9 has joined #ocaml
nullifidian has joined #ocaml
malina has quit [Quit: Throwing apples of Montserrat]
zaquest has quit [Quit: Leaving]
nomicflux has quit [Quit: nomicflux]
axesd9a has joined #ocaml
axesd9 has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
malina has joined #ocaml
cbot has joined #ocaml
zaquest has joined #ocaml
pierpa has quit [Quit: Page closed]
malina has quit [Quit: Throwing apples of Montserrat]
FreeBirdLjj has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 268 seconds]
enterprisey has joined #ocaml
nomicflux has quit [Quit: nomicflux]
enterprisey has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ocaml
kerrhau has quit [Ping timeout: 248 seconds]
enterprisey has joined #ocaml
infinity0_ has joined #ocaml
infinity0 has quit [Ping timeout: 248 seconds]
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
malina has joined #ocaml
nicooo has quit [*.net *.split]
samrat_ has quit [Quit: Leaving]
nicooo has joined #ocaml
malina has quit [Remote host closed the connection]
malina has joined #ocaml
spew has joined #ocaml
zmt00 has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
malina has joined #ocaml
malina has quit [Remote host closed the connection]
ziyourenxiang_ has joined #ocaml
ziyourenxiang has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
cbot has quit [Quit: Leaving]
JeanMax has quit [Read error: Connection reset by peer]
JeanMax has joined #ocaml
spew has quit [Read error: Connection reset by peer]
axesd9a has quit [Quit: WeeChat 1.9.1]
jao has joined #ocaml
nahra has joined #ocaml
pluplog has joined #ocaml
tane_ has joined #ocaml
p1n34ppl3 has quit [Quit: Lost terminal]
malina has joined #ocaml
bruce_r has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 248 seconds]
ziyourenxiang_ has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
orbifx has joined #ocaml
nahra has quit [Remote host closed the connection]
nahra has joined #ocaml
eni has joined #ocaml
eni is now known as Guest35436
orbifx has quit [Ping timeout: 248 seconds]
bruce_r has quit [Ping timeout: 255 seconds]
Guest35436 is now known as eni
argent_smith has joined #ocaml
andreas__ has joined #ocaml
_whitelogger has joined #ocaml
donryudragoni has joined #ocaml
snhmib has joined #ocaml
orbifx has joined #ocaml
tane_ is now known as tane
<orbifx[m]>
;)
pluplog has quit [Quit: Leaving.]
mfp has joined #ocaml
jnavila has joined #ocaml
slash^ has joined #ocaml
eni has quit [Quit: Leaving]
donryudragoni has left #ocaml ["WeeChat 1.9.1"]
jnavila has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
SpiceGuid has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
TheLemonMan has joined #ocaml
orbifx has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
zolk3ri has joined #ocaml
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
lucybun has joined #ocaml
lucybun has quit [Client Quit]
kakadu has joined #ocaml
jnavila has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 240 seconds]
nomicflux has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
<Leonidas>
oh_lawd: some like some specific changes like to nested matches or function application but some don't
<M-martinklepsch>
So I've got some basic ocaml project going, loaded a dependency (ocaml-csv) but now feel like I need one of the handful of stdlib thingies.. was thinking if going with Base since that seemed most minimal for a start but can't get it to work
<M-martinklepsch>
Getting a message Use [Stdio.print_endline] instead. but when I do so I'm getting an error Unbound module Stdio
<jmiven>
M-martinklepsch: you need to install the stdio package
<M-martinklepsch>
jmiven: thanks, does that mean Stdio is like an optional dependency of Base?
<oh_lawd>
Leonidas: I kind of feel controversial about Reason, like yeah they want to have modern syntax, but I couldn't find do-notation
<oh_lawd>
like I'd love to have a haskell with strict evaluation
<oh_lawd>
and a bit less strict ideas of purity
<Leonidas>
oh_lawd: not sure what is modern about { and }. it feels very dated
<oh_lawd>
yeah, well what they want us to believe
<M-martinklepsch>
In that case isn't it weird that I can't use the previously existing print_endline anymore?
<Leonidas>
oh_lawd: i don't think do notation is important to people coming from javascript so you're unlikely to find it there.
<oh_lawd>
hehe
<Leonidas>
oh_lawd: but you'll find jsx syntax as ppx
<oh_lawd>
but there are still important libraries that use monads
<Leonidas>
oh_lawd: have you looked at purescript?
<oh_lawd>
not doing javascript, we do compilers and backend stuff
<oh_lawd>
we don't even have a frontend
<Leonidas>
i was under the impression purescript had non-js backends
<oh_lawd>
and most of our concurrent stuff is rust
<oh_lawd>
but writing compilers is nice with either ocaml or haskell
<Leonidas>
compiler is basically the killer app for ocaml
<oh_lawd>
that's why I'm here
<oh_lawd>
and I like how ocaml is not so much about purity as haskell
<oh_lawd>
but haskell again has nicer syntax
<Leonidas>
worked on a number of those, nicer than in scala
<oh_lawd>
uh, mos def
<Leonidas>
i don't know. i wished for more purity in ocaml sometimes
<Leonidas>
i can live with both :-)
<oh_lawd>
hmm, maybe I'll try to write my rest client and/or irc bot with ocaml and haskell, see what's the result
<oh_lawd>
I can write both too, but the thing is what to introduce to the team
<jmiven>
M-martinklepsch: Base replaces the original stdlib so I don't think it's weird :-)
<oh_lawd>
and with what language you find hires
<M-martinklepsch>
jmiven: but if it replaces the stdlib, shouldn't it also depend on the things it needs to do that replacing? :D
<jmiven>
M-martinklepsch: you may want to use Base without doing IO, or to use it with js_of_ocaml
<jmiven>
so stdio is optional :-)
spew has joined #ocaml
jnavila has joined #ocaml
mrgrieves has quit [Ping timeout: 248 seconds]
mk9_ has joined #ocaml
dhil has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
mk9 has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
mk9_ has quit [Ping timeout: 240 seconds]
jbrown has joined #ocaml
donryudragoni has joined #ocaml
jnavila has joined #ocaml
mrgrieves has joined #ocaml
pmetzger has joined #ocaml
<Leonidas>
oh_lawd: i moved to denmark to code ocaml, so I guess you can see itnas attraction factor
<Leonidas>
hiring haskell programmers is probably easier though
<oh_lawd>
yeah, that's probably right
<oh_lawd>
we use now ocaml, clojure, scala, c++ and rust
<oh_lawd>
all have their space
<oh_lawd>
although I'd just rewrite rest of our c++ with rust
<oh_lawd>
my rust consumers have been chugging billions of events without ever crashing and using minimal amount of resources, c++ services give segfaults every second day
<oh_lawd>
uh, so many great languages in this world :)
catern has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.46/20161213183751]]
zmt00 has joined #ocaml
donryudragoni has quit [Quit: WeeChat 1.9.1]
spew has quit [Ping timeout: 240 seconds]
<catern>
is anyone here using ocaml from Nix/NixOS? I am just learning ocaml and not sure exactly what needs to be set up and how
<M-martinklepsch>
Is there any documentation site for Base? After opening it I can no longer use the `Printf` module it seems
<jmiven>
documentation isn't great, but is supposed to get better soon if I understand correctly
<M-martinklepsch>
jmiven: thanks! I was wondering how I could have found it myself but I noticed it's linked in the readme
<M-martinklepsch>
although in probably the worst way possible
jnavila has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mrgrieves has quit [Ping timeout: 260 seconds]
mrgrieves has joined #ocaml
<pmetzger>
What a mess. I'm trying to fix all the macports ocaml port infrastructure and it has been rotting so long you can almost smell it when you look at the Portfile files.
<Leonidas>
oh_lawd: I'd love to use Rust if I had any usecase where I couldn't afford GC. But mostly I do :-)
<oh_lawd>
well, another use case are highly parallel or concurrent apps
<oh_lawd>
I mean it's very easy to build correct concurrent apps with rust
<oh_lawd>
very easy meaning you get over the learning curve
<Leonidas>
M-martinklepsch: what jane street does nowadays is expose the original stdlib under Caml.* which comes handy sometimes
malina has quit [Quit: Throwing apples of Montserrat]
jnavila has joined #ocaml
spew has joined #ocaml
<pmetzger>
is the -Oclassic flag to ocamlopt something that used to be there and is now obsolete, or is it something that is recent? I'm having trouble getting coq to build (in macports) because it's complaining at one point that -Oclassic is an invalid ocamlopt option
dakk has joined #ocaml
<M-martinklepsch>
Now struggling to use Printf.printf after opening Base — it seems that there's only sprintf and bprintf available?
spew has quit [Ping timeout: 255 seconds]
<pmetzger>
M-martinklepsch: you might want to ask on the discourse site.
<octachron>
pmetzger, -Oclassic is flambda option, that tries (and fails) to mimic the behavior of the non-flambda enable compiler
<pmetzger>
what version of ocaml was it added in?
<pmetzger>
when the coq buildfiles call it on ocamlopt from 4.05.0 it seems to fail.
<pmetzger>
(that is, it prints that the flag is invalid.)
<pmetzger>
though it may be that something else is going on. the coq buildfiles are too smart for my ability to debug them easily.
<pmetzger>
(I've been updating macports to use 4.05.0 rather than 4.06.0 because the latter is still not building a lot of packages.)
<pmetzger>
maybe my version of findlib is too old?
mrgrieves has quit [Ping timeout: 248 seconds]
mrgrieves has joined #ocaml
sh0t has joined #ocaml
jnavila has quit [Read error: Connection reset by peer]
jnavila_ has joined #ocaml
<octachron>
The flag was introduced with flambda: 4.03
<pmetzger>
I'm going on the guess that my version of findlib is too old.
ski has joined #ocaml
<pmetzger>
yah, having updated _that_ in macports, things seem to be improving.
sz0 has joined #ocaml
kerrhau has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
dakk has quit [Ping timeout: 248 seconds]
ziyourenxiang has quit [Ping timeout: 248 seconds]
jnavila_ has quit [Ping timeout: 240 seconds]
jbrown has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Leaving]
mk9 has quit [Ping timeout: 268 seconds]
mk9 has joined #ocaml
<orbifx[m]>
martinklepsch: here?
<M-martinklepsch>
Orbifx: yeah
nomicflux has quit [Quit: nomicflux]
ansiwen[m] has joined #ocaml
<ansiwen[m]>
i'm new to functional programming. can someone give me a link to a resource explaining what a "type combinator" is? I have no idea. (google doesn't really help)
<zolk3ri>
M-martinklepsch: `=' is not the assignment operator, `=' tests for structural equality.
<M-martinklepsch>
ok cool. used interchangeably then apparently
bruce_r has joined #ocaml
mrgrieves has joined #ocaml
mrgrieves has quit [Ping timeout: 240 seconds]
<octachron>
ansiwen[m], with a high probability, you are searching for type constructors not type combinators
<ansiwen[m]>
octachron: thanks for your answer. I'm trying to understand what this is about: https://github.com/samoht/depyt
<ansiwen[m]>
octachron: so it clearly says "Yet another type combinator library"
pmetzger has joined #ocaml
<ansiwen[m]>
octachron: googling indicates, that it has something to do with functional programming (like a couple of haskell links for instance) but no real definition of it.
<octachron>
ansiwen[m], ok so this is the case of type combinators; the linked library is implenting a embeded type level system within OCaml type system
<octachron>
and implementing type combinators to make easier to define new types within the embeded type system
henrytill has quit [Ping timeout: 240 seconds]
<ansiwen[m]>
octachron: sorry, excuse my stupid question, as I said, I'm new to ocaml (but seasoned in C++ for example), so what does "embedded type level system" mean?
<ansiwen[m]>
octachron: and thanks for helping me :-)
pmetzger has quit [Ping timeout: 240 seconds]
mrgrieves has joined #ocaml
<octachron>
sorry more "embedded type system". The idea is to give a concrete representation to a type system within the language.
<octachron>
In this case, this is a dynamic typing library. So the type system being represented is the same as the host type system.
pmetzger has joined #ocaml
<octachron>
In C++, this would be equivalent to constructing a library that can concretely represents the C++ type system, with its classes, template functions etc …
<octachron>
This can be useful to implement some of the feature of dynamicly typed language within a statically typed one.
apatil has joined #ocaml
<ansiwen[m]>
octachron: ok, I see, something like RTTI in C++? like you can ask at runtime an object "of which type are you"?
mrgrieves has quit [Ping timeout: 248 seconds]
<octachron>
Yes, except that you are implementing the RTTI yourself within your host language
spew has quit [Ping timeout: 240 seconds]
<octachron>
Then you can define a type of dynamically typed values, that are a couple of value (think of a more strongly typed version of C++ void pointer) and a concrete representation of its type
<ansiwen[m]>
I see. and what are the type combinators within this? isn't a simple "struct" a type combinator already?
<octachron>
Type combinator here are more of a design pattern on how to make it easy to construct these concrete type representation
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<octachron>
For instance, the "record" and "variant" functions in your example are type combinators used to build representation for record and variant types respectively
<ansiwen[m]>
ok, like the |+ operator to construct the "meta records"?
<ansiwen[m]>
I see!
<octachron>
Yep
<ansiwen[m]>
octachron: I'm still not quite clear what problem such a library solves, but thanks a lot for that insight!
pmetzger has quit [Ping timeout: 250 seconds]
henrytill has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
<apatil>
Hi everyone, I'm trying to get ocamlmklib to build a package with -thread
<apatil>
ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
<apatil>
What am I doing wrong?
<ansiwen[m]>
octachron: would be nice if it would construct the dynamic types from the actual ocaml types, so that I can convert the "real" ocaml values to the dynamic ones and back. to remodel my types with these type combinators seems pretty tedious...
andreas__ has joined #ocaml
<M-martinklepsch>
is there destructuring like this in ocaml: let (day, month, year) = String.split ~on:'.' s in ...
<orbifx[m]>
Yes, although it's a list most likely
pmetzger has joined #ocaml
<orbifx[m]>
So `let [day; month; year] = String.split ... in`
<orbifx[m]>
This matching will raise an exception if it doesn't match
<orbifx[m]>
So you probably want to do `let ... = match String.split ... with [day; month; year] as res -> res | _ -> (*what do do with failure*)`
spew has joined #ocaml
<M-martinklepsch>
Orbifx: by it doesn't match you mean less than 3 elements?
<orbifx[m]>
yes
<M-martinklepsch>
got it
<M-martinklepsch>
thanks again :)
<octachron>
ansiwen[m], an intermediary option would be to write a ppx extension to generate the type representation à la ppx_deriving
<orbifx[m]>
martinklepsch: here is one idea: `let (day, month) = match String.split_on_char ',' "11,10" with [day; month] -> (day, month) | _ -> ("n/a", "n/a")`
<orbifx[m]>
I'm using Std string, you can use whatever String you have
<ansiwen[m]>
octachron: yes, I saw that for s-expressions you can just write "with sexp" behind your type definition. that is comfortable!
spew has quit [Ping timeout: 248 seconds]
mrgrieves has joined #ocaml
spew has joined #ocaml
<orbifx[m]>
martinklepsch: also consider making use of Option or Result. It's never too early
mrgrieves has quit [Ping timeout: 248 seconds]
spew has quit [Ping timeout: 248 seconds]
slash^ has quit [Read error: Connection reset by peer]
mrgrieves has joined #ocaml
bruce_r has quit [Ping timeout: 250 seconds]
apatil has quit [Ping timeout: 260 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
mrgrieves has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
mrgrieves has joined #ocaml
jao has joined #ocaml
jnavila_ has joined #ocaml
enterprisey has joined #ocaml
gpietro has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
apatil has joined #ocaml
kolko has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
gpietro has quit [Ping timeout: 248 seconds]
silver has joined #ocaml
nomicflux has quit [Quit: nomicflux]
olle has joined #ocaml
jnavila_ has quit [Remote host closed the connection]
bruce_r has joined #ocaml
apatil has quit [Ping timeout: 260 seconds]
silver_ has joined #ocaml
silver has quit [Ping timeout: 248 seconds]
jao has quit [Ping timeout: 240 seconds]
ibluesun has joined #ocaml
ibluesun has quit []
Soni has quit [Ping timeout: 248 seconds]
Soni has joined #ocaml
sh0t has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
sh0t has joined #ocaml
<zolk3ri>
orbifx[m]: did you manage to compile cohttp with 4.06?
<orbifx[m]>
zolk3ri: it's cohttp that has the problem for me
<zolk3ri>
I'm stuck at:
<zolk3ri>
# File "cohttp/src/code.mli", line 25, characters 15-24:
<zolk3ri>
# Error: Syntax error
andreas__ has quit [Quit: Connection closed for inactivity]
<zolk3ri>
I'll take a look at the generate.ml
<orbifx[m]>
Ow, you might need to pin the repo, instead of using the opam version
<zolk3ri>
yeah I did that
<zolk3ri>
damn safe string anyway :P
<orbifx[m]>
Meant to write 'it's cohttp-lwt that has the problem for me'
<orbifx[m]>
But there is another bug related to a difference in how the compiler handles symbol locations or something
<zolk3ri>
hmm, I got both cohttp and cohttp-lwt installed successfuly
<orbifx[m]>
Yeah, and you get stuck when trying to use them?
pierpa has joined #ocaml
<orbifx[m]>
For me it's opium which needs cohttp-lwt
<zolk3ri>
nah, my problem was not using the git repo, I had a local copy of an older version which was pinned so it didn't even compile :D
<zolk3ri>
works now though
<zolk3ri>
haven't used it yet, will try in a bit
<orbifx[m]>
:)
<orbifx[m]>
K
<orbifx[m]>
Cya all
<zolk3ri>
see you :)
kakadu has quit [Remote host closed the connection]