adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
michaelneale13 has joined #ocaml
michaelneale13 has quit [Remote host closed the connection]
Fare has joined #ocaml
malfunct has joined #ocaml
kleimkuhler has joined #ocaml
malfunct has quit []
kleimkuhler has quit [Quit: kleimkuhler]
moei has quit [Quit: Leaving...]
moei has joined #ocaml
zwisch25 has joined #ocaml
zwisch25 has quit [Remote host closed the connection]
SPACE_AIDS has joined #ocaml
nokomprendo has quit [Quit: Leaving]
<oni-on-ion> no threads in utop? =/
JimmyRcom has joined #ocaml
kalio has quit [Quit: WeeChat 2.2]
kalio has joined #ocaml
jim7j1ajh is now known as jimt
SPACE_AIDS has left #ocaml [#ocaml]
tormen_ has joined #ocaml
JimmyRcom has quit [Ping timeout: 245 seconds]
tormen has quit [Ping timeout: 252 seconds]
mfp has quit [Ping timeout: 252 seconds]
silver has quit [Read error: Connection reset by peer]
JimmyRcom has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<_y> oni-on-ion, you can, you just need to work around those two things
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
ggole has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
<oni-on-ion> hmm. i will try a later version for thread
<oni-on-ion> if its a bug
kleimkuhler has joined #ocaml
kleimkuhler has quit [Client Quit]
KeyJoo has joined #ocaml
pierpal has quit [Remote host closed the connection]
<def`> _y: utop is probably already using threads
<def`> (if I remember well, the utop binary itself is linked with threads)
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
keep_learning has joined #ocaml
keep_learning_M has joined #ocaml
bartholin has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
Nathan20551 has joined #ocaml
keep_learning_M has joined #ocaml
Nathan20551 has quit [Remote host closed the connection]
elfring has joined #ocaml
TheLemonMan has joined #ocaml
JimmyRcom has quit [Ping timeout: 244 seconds]
Fare has quit [Ping timeout: 244 seconds]
KeyJoo has quit [Ping timeout: 246 seconds]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
orbifx1 has joined #ocaml
jnavila has joined #ocaml
mfp has joined #ocaml
dx has quit [Quit: RIP]
dx has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnavila has quit [Ping timeout: 246 seconds]
kvda has joined #ocaml
steenuil_ has quit [Ping timeout: 272 seconds]
steenuil has joined #ocaml
jnavila has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
jnavila has quit [Ping timeout: 264 seconds]
orbifx1 has quit [Read error: Connection reset by peer]
orbifx1 has joined #ocaml
keep_learning_M has joined #ocaml
kakadu has quit [Remote host closed the connection]
keep_learning_M has quit [Client Quit]
Haudegen has joined #ocaml
KeyJoo has joined #ocaml
tane has joined #ocaml
orbifx1 has quit [Ping timeout: 245 seconds]
orbifx1 has joined #ocaml
orbifx1 has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
keep_learning_M has joined #ocaml
silver has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning__M has joined #ocaml
sagax has joined #ocaml
<sagax> hi all!
keep_learning__M has quit [Client Quit]
keep_learning_M has joined #ocaml
MEME_SUPREME has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Quit: Leaving]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Remote host closed the connection]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
keep_learning_M has joined #ocaml
sjk1 has joined #ocaml
sjk1 has quit [Remote host closed the connection]
FranciscoD has joined #ocaml
<jacobian> You can do simple proofs
<jacobian> oops
FranciscoD has quit [Remote host closed the connection]
<sagax> heh
<sagax> channel it's alive
<sagax> great
<oni-on-ion> =)
<sagax> how to write another language with OCaml?
<sagax> what i must read to do this?
<tane> sagax, what does that mean: "other language"?
<sagax> maybe something dsl, i think
<oni-on-ion> i would take a look at "sexp" ppx extension from jane street.
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
avantgardist19 has joined #ocaml
avantgardist19 has quit [Ping timeout: 252 seconds]
pmetzger has joined #ocaml
<pmetzger> sagax: try reading the dragon book for an overall view. there's also Appel: https://www.cs.princeton.edu/~appel/modern/ml/
<sagax> thanks
<pmetzger> The dragon book is the most thorough overall introduction but it isn't ML oriented. https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools
<pmetzger> These cover much more than just how to build a DSL, they cover compiler implementation in general.
pmetzger has quit []
<keep_learning_M> sagax Also you can try https://github.com/kanaka/mal, and http://dev.stephendiehl.com/fun/
<sagax> thanks
<sagax> will see
<keep_learning_M> In second link implementation language is Haskell, but you can translate it to OCaml.
<ggole> val map_result : ('a -> ('b, 'c) result) -> 'a list -> ('b list, 'c) result
<ggole> Is there a usual name for this?
<ggole> (Or the option variant.)
<companion_cube> it's "traverse" in haskell, I believe
v01t11 has joined #ocaml
<ggole> That's vague even for Haskell :/
<ggole> Thanks though
<companion_cube> well it kinds of "inverts" two functors, right?
<companion_cube> T F a -> F T a, something like that
<companion_cube> so, like `'a option list -> 'a list option`
<ggole> Right, and this is the fusion of map with that function
<companion_cube> ah yes
<companion_cube> typically I have similar CCResult.map_l
MEME_SUPREME has quit [Quit: FUUUUUUU]
v01t11 has quit [Ping timeout: 252 seconds]
<_y> def`, maybe, but modules are apparently not exposed to the user, even in utop-full
orbifx1 has joined #ocaml
<_y> companion_cube, any thoughts on transforming an iterator into a generator using the thread scheduler ? http://paste.awesom.eu/PdzF&ln
<_y> regarding performance, usability, drawbacks i have not seen, this-is-terrible-never-do-that advices…
<companion_cube> performance will be absolutely terrible
<companion_cube> :D
<companion_cube> I mean, try to benchmark it, you'll see
<_y> sure
<companion_cube> otherwise, it's a funny thing to implement
<_y> on the other end, is there another way to achieve this before algebraic effects land ?
<ggole> Shades of call/cc
<companion_cube> there's delimcc, but it's also a hack
<companion_cube> otherwise, try to use `seq` when you need gnerators? :?
<companion_cube> :/
<ggole> You can't really do much with List.iter style iterators other than break out of them in OCaml.
<ggole> Interfaces need to expose more than that.
<companion_cube> ggole: well, the thread system allows it, you just pay 2 context switches for each element ^_^'
<ggole> I've often wondered if there's some really nice iteration approach that I've been missing all this time
keep_learning_M has quit [Quit: Leaving]
<ggole> External and internal are the usual styles, and they both suck at different things
<companion_cube> there's probably a "no free lunch" thing lurking deep in there
<ggole> Or we should have been programming in systems with lightweight stackful coroutines all along
<ggole> Dunno
<companion_cube> you also get tradeoffs with these
<companion_cube> like slower FFI
<ggole> Yeah
<companion_cube> with effects, OCaml will get into this lightweight stackful coroutines space
<companion_cube> which is fine, I think — OCaml isn't designed to favor performance above everything else
<_y> what are these ?
<_y> companion_cube, that said, if the each step of the iterator is slow enough, the added cost of context switches may be acceptable
<companion_cube> segmented stacks, I think — make stacks easy and fast to copy so you can implement generators' `yield` easily
<companion_cube> (or, for effects, the performing of an effect, which takes the current stack as a continuation)
<companion_cube> _y: in what world would this happen? :D
<ggole> I thought the purpose of segmented stacks was to limit their size?
<companion_cube> hmmmm
<companion_cube> if the iterator is really slow to yield, you can also just write a generator from the start, probably, _y
<_y> companion_cube, i don’t know really, i have no idea of real-world costs
<_y> a prime sieve, for example ?
<companion_cube> a thread switch is slow :D
<_y> companion_cube, but some algorithms are hard to design as a generator, or unreadable
<thizanne> they can possibly be a little less convenient, but you can always convert your generator to an iterator so they shouldn't be hard
<companion_cube> _y: yeah, sure, I guess we should just wait for effects
<companion_cube> (hiding the generator in a thread is generally unsafe, too, if it depends on non-threadsafe state)
<_y> (yes)
kleimkuhler has joined #ocaml
JimmyRcom has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
ziyourenxiang has quit [Ping timeout: 252 seconds]
kleimkuhler has quit [Quit: kleimkuhler]
kleimkuhler has joined #ocaml
orbifx1 has quit [Ping timeout: 246 seconds]
JimmyRcom has quit [Ping timeout: 252 seconds]
Fare has joined #ocaml
neatonk has quit [Ping timeout: 272 seconds]
Haudegen has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 245 seconds]
cryptodechange4 has joined #ocaml
cryptodechange4 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
kleimkuhler has quit [Quit: kleimkuhler]
mwsb15 has joined #ocaml
mwsb15 has quit [Remote host closed the connection]
KeyJoo has joined #ocaml
kleimkuhler has joined #ocaml
kakadu has joined #ocaml
jnavila has joined #ocaml
orbifx1 has joined #ocaml
tormen_ has quit [Quit: Lost terminal]
sagax has quit [Quit: Konversation terminated!]
kleimkuhler has quit [Quit: kleimkuhler]
tormen has joined #ocaml
moei has quit [Quit: Leaving...]
jnavila has quit [Ping timeout: 252 seconds]
byzafk29 has joined #ocaml
JimmyRcom has joined #ocaml
byzafk29 has quit [Ping timeout: 260 seconds]
asdfyqn has joined #ocaml
asdfyqn has quit [Remote host closed the connection]
jave has quit [Quit: ZNC - http://znc.in]
jack5638 has quit [Ping timeout: 244 seconds]
jack5638 has joined #ocaml
ggole has quit [Quit: ggole]
tobiasBora has quit [Quit: WeeChat 1.6]
tane has quit [Quit: Leaving]
Fardale has quit [Ping timeout: 240 seconds]
_y has quit [Ping timeout: 268 seconds]
jave has joined #ocaml
Fardale has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
aydio has joined #ocaml
kleimkuhler has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Fare has quit [Ping timeout: 252 seconds]
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
aydio has quit [Quit: WeeChat 2.2]
jao has joined #ocaml
_y has joined #ocaml
kleimkuhler has quit [Quit: kleimkuhler]
moei has joined #ocaml
orbifx1 has quit [Ping timeout: 240 seconds]
bartholin has quit [Remote host closed the connection]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
orbifx1 has joined #ocaml
f32ff_ has joined #ocaml
f32ff_ has quit [Remote host closed the connection]
kleimkuhler has joined #ocaml
orbifx1 has quit [Ping timeout: 252 seconds]
neatonk has joined #ocaml
Amgine2 has joined #ocaml
Amgine2 has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
JimmyRcom has quit [Ping timeout: 244 seconds]
sagax has joined #ocaml
JimmyRcom has joined #ocaml
jnavila has joined #ocaml
JimmyRcom has quit [Ping timeout: 246 seconds]
kleimkuhler has quit [Quit: kleimkuhler]
jnavila has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
erkin has quit [Remote host closed the connection]
erkin has joined #ocaml
JimmyRcom has joined #ocaml
JimmyRcom has quit [Ping timeout: 252 seconds]