nicoo has quit [Write error: Connection reset by peer]
mbuf has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
mbuf has joined #ocaml
samrat has joined #ocaml
<kakadu>
def`: How new merlin interface distinguish .ml from .mli while performing `errors` command?
mbuf has quit [Ping timeout: 248 seconds]
samrat has quit [Ping timeout: 276 seconds]
jbrown has joined #ocaml
mbuf has joined #ocaml
nomicflux has quit [Quit: nomicflux]
<def`>
kakadu: with the file name
<kakadu>
Oh, indeed
<kakadu>
I forgot dash in `ocamlmerlin single errors filename src/kernel/mocaml.mli < src/kernel/mocaml.mli`. Merlin gived me some diagnostics but nothing about unused command line switches and I thought it was OK
freyr has quit [Remote host closed the connection]
sam___ has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
freusque has joined #ocaml
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 240 seconds]
aantron_ has joined #ocaml
malina has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
rostero has joined #ocaml
dhil has joined #ocaml
malina has joined #ocaml
copy_ has joined #ocaml
malina has quit [Client Quit]
hermaeus has left #ocaml ["Killed buffer"]
BitPuffin|osx has quit [Ping timeout: 240 seconds]
freusque has quit [Ping timeout: 246 seconds]
xuanrui has quit [Quit: Ex-Chat]
trevorriles_ has joined #ocaml
aantron_ has quit [Remote host closed the connection]
aantron_ has joined #ocaml
mbuf has joined #ocaml
sam____ has joined #ocaml
<ShalokShalom>
kakadu: so far as i understand, lays Reason the basic for other ports of another syntax, is Python also possible?
<ShalokShalom>
i guess the indentation is tricky
<Drup>
but Python is not only a syntax, it's also a (dynamic) type system and a specific semantics
<Drup>
Reason is just a syntax, the type system and the semantics is OCaml's
<Drup>
Your question ... doesn't really make sense to me :|
<kakadu>
He wants automatic translator from OCaml-like syntax to different langauges
sam____ has quit [Ping timeout: 240 seconds]
<kakadu>
I don't know the detail of Reason implementation
<kakadu>
I think that "new" language should be parsable by OCaml parser, isn't it Drup?
tane has joined #ocaml
<Drup>
No, that's what -pp is for
<Drup>
(which is what reason uses)
al-damiri has joined #ocaml
<Drup>
You can plug in arbitrary parsers, as long as you return the same AST
<kakadu>
So, it could be anything. You just pass a translator from anything to OCaml AST using -pp option?
<Drup>
yes
<kakadu>
So, to implement OCaml to Python transformation we need more tricks there : reusing parser and typechecker from the compiler, writing custom pretty-printer and having separate compiler executable?
tokomak has quit [Remote host closed the connection]
<kakadu>
(Let's forget about defferences about semantics)
<kakadu>
differences*
<kakadu>
It's probably the way as Buclescript implemented?
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
mrvn has quit [Ping timeout: 240 seconds]
ayxih2 has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
tokomak has joined #ocaml
<theblatte>
kakadu: the part you're talking about would be more like some sort of Bucklescript (or js_of_ocaml) targetting Python instead of Javascript
<theblatte>
Reason has little to do with that part
<kakadu>
yeah, I understand
<Drup>
(also, it's called a compiler :D)
<rks`>
transpiler*
<rks`>
: )
<Drup>
ಠ_ಠ
<theblatte>
a compiler backend*
<companion_cube>
:DD
<companion_cube>
gg rks`
ygrek has quit [Ping timeout: 246 seconds]
fmardini has joined #ocaml
fmardini_ has joined #ocaml
fmardini has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
xuanrui has joined #ocaml
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 240 seconds]
<ShalokShalom>
PPX
<ShalokShalom>
and PP
<ShalokShalom>
i mean in general a synatx for newbies like me
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 255 seconds]
freusque has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
tautologico has quit [Quit: Connection closed for inactivity]
ShalokShalom has quit [Quit: No Ping reply in 180 seconds.]
ShalokShalom has joined #ocaml
mbuf has quit [Quit: Leaving]
peterpp has joined #ocaml
<peterpp>
all of a sudden I get an error when compiling with ocamlbuild: Exception Sys_error("src/mymodule.ml.depends: No such file or directory").
<companion_cube>
in doubt, have you removed _build and tried again? ^^
<peterpp>
when I run it a couple times, then it usually works
<peterpp>
it's annoying nevertheless
<companion_cube>
strange. you don't run builds in parallel I suppose
rossberg_ has quit [Ping timeout: 255 seconds]
freusque has quit [Ping timeout: 240 seconds]
sam___ has joined #ocaml
rossberg_ has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
sam___ has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
<peterpp>
companion_cube, no
peterpp has quit [*.net *.split]
tokomak has quit [*.net *.split]
trevorriles_ has quit [*.net *.split]
kakadu has quit [*.net *.split]
ristos has quit [*.net *.split]
vicfred has quit [*.net *.split]
mal`` has quit [*.net *.split]
M-jimt has quit [*.net *.split]
M-jimt has joined #ocaml
vicfred has joined #ocaml
peterpp has joined #ocaml
ristos has joined #ocaml
kakadu has joined #ocaml
tokomak has joined #ocaml
mal`` has joined #ocaml
trevorriles_ has joined #ocaml
ayxih2 has quit [Ping timeout: 240 seconds]
ayxih has quit [Quit: Leaving]
ayxih2 has joined #ocaml
ayxih2 has quit [Client Quit]
ayxih has joined #ocaml
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
peterpp has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Leaving]
vicfred has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
kakadu_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 260 seconds]
ayxih has quit [Quit: \x050fff31483cb0c03148]
aantron_ has quit [Quit: leaving]
jao has joined #ocaml
ayxih has joined #ocaml
sam____ has joined #ocaml
_andre has quit [Quit: leaving]
sam____ has quit [Ping timeout: 255 seconds]
peterpp has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
fmardini has joined #ocaml
mengu has joined #ocaml
fmardini_ has quit [Ping timeout: 240 seconds]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
sepp2k has quit [Quit: Leaving.]
pzp has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
coventry has joined #ocaml
<coventry>
Is there a no-argument version of the backslash function syntax, "\x -> 1"?
<orbifx[m]>
coventry: I think that's just Haskell
ayxih has quit [Ping timeout: 240 seconds]
<coventry>
orbifx: Really? My next question was: Also, how can I get the standard "bind" notation, ">>=", in ocaml, as demonstrated in the first example here? https://blogs.janestreet.com/bind-without-tears/
<orbifx[m]>
coventry: `fun () -> 1`
<coventry>
The blog post says it's about OCaml... is it really about Haskell only? Meh.
<orbifx[m]>
Wait, mixing up different questions here
<orbifx[m]>
The closest to a _function_ which takes no argument, is `fun () -> ...`
<coventry>
Sorry, yes... Different page. Never mind, I was confused.
<orbifx[m]>
you can't have a function without a parameter
<coventry>
Thanks.
<orbifx[m]>
Regarding binds, let me see what the post is on about first
<octachron>
coventry, for the other question, bind operators (>>=) are generally defined by library that provides a monadic interface
<orbifx[m]>
Ok, that is really out of date and I don't rememend it
<coventry>
Thank you.
<orbifx[m]>
Are you coming from Haskell?
<coventry>
orbifx: Most of my experience with monadic programming is from Haskell, yes.
<peterpp>
coventry, I'm curious: what led you to ocaml?
<orbifx[m]>
Ok. OCaml allows un-pure function and mutation., so monads are not as essential and prevalent.
<orbifx[m]>
Do you want to use them for a specific application?
<coventry>
Just to clarify, the first exercise on this page: http://www.cs.cornell.edu/courses/cs3110/2016fa/l/23-monads/rec.html for the monadic implementation of "add" with the "int option" arguments, I'll have to define my own ">>=" and "return" or find them somewhere else, since option is different from the Maybe module at the top of the page, right?
<orbifx[m]>
coventry: that >>= comes from Lwt, which works monadically
<orbifx[m]>
In the attacker_minimal
<coventry>
So not a language feature. Great, that clears up a lot. Thanks again.
<orbifx[m]>
ocsigen.org/lwt/3.1.0/api/Lwt
<orbifx[m]>
No, OCaml by itself doesn't provide any monads to my knowledge, because it doesn't really need them.
<orbifx[m]>
Lwt is a library for cooperative threads and programming. So it's a layer above OCaml threads which are a bit harder to manage explicitely.
<orbifx[m]>
Regarding your exercise, the >>= in that Maybe monad, is not the same as >>= in Lwt. They exist under different scopes. OCaml doesn't allow function overloading. Nor classes in the way Haskell does.
<coventry>
Is it clear from that attacker_minimal context how ">>=" got into the namespace? Does using Lwt_unix bring it into the namespace for the duration of that expression or something?
<orbifx[m]>
No, somewhere else
<coventry>
Oh, "Open Lwt.Infix".
<coventry>
Again, really appreciate the help!
<orbifx[m]>
You are welcome
<Drup>
I'm not sure tezos is a beginner-friendly codebase ;)
<Drup>
(I'm pretty sure the code is very good, on the contrary. But I'm also quite sure it uses numerous fairly advanced features of OCaml)
<orbifx[m]>
I suppose he ended up there under that assumption that monads in OCaml are like Haskell monads
sam___ has joined #ocaml
<coventry>
Yeah, I did.
<Drup>
well, monads are the same, the language support is not :p
<orbifx[m]>
Yeah
sam___ has quit [Ping timeout: 255 seconds]
copy_ has quit [Quit: Connection closed for inactivity]
infinity0_ has joined #ocaml
infinity0 is now known as Guest18524
infinity0_ is now known as infinity0
infinity0 has joined #ocaml
infinity0 has quit [Changing host]
Guest18524 has quit [Killed (verne.freenode.net (Nickname regained by services))]
ayxih has joined #ocaml
ayxih has quit [Client Quit]
FreeBirdLjj has joined #ocaml
peterpp has quit [Remote host closed the connection]
mrsmkl has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
zv has quit [Quit: WeeChat 1.9]
zv has joined #ocaml
zv has quit [Client Quit]
mengu has quit [Remote host closed the connection]
zv has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
zv has quit [Quit: WeeChat 1.9]
zv has joined #ocaml
zv has quit [Client Quit]
zv has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
jagare has joined #ocaml
jagare_ has joined #ocaml
jbrown has quit [Remote host closed the connection]
Rome has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
rostero has quit [Quit: Connection closed for inactivity]
wagle has quit [Quit: No Ping reply in 180 seconds.]
wagle has joined #ocaml
relrod has quit [Ping timeout: 240 seconds]
Rome has joined #ocaml
FreeBirdLjj has joined #ocaml
cbot has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
pierpa has joined #ocaml
sam___ has joined #ocaml
tautologico has joined #ocaml
jagare has quit []
jagare_ has quit [Quit: Leaving...]
xuanrui has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
bruce_r has quit [Ping timeout: 246 seconds]
sh0t has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 246 seconds]
tokomak has quit [Remote host closed the connection]
mengu has joined #ocaml
FreeBirdLjj has joined #ocaml
kakadu__ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]