infinity0 has quit [Killed (cherryh.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
kassens has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
argent_smith has quit [Quit: Leaving.]
dakk has quit [Ping timeout: 248 seconds]
zwild has joined #ocaml
ryanartecona has joined #ocaml
ryanartecona has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
ryanartecona has quit [Ping timeout: 246 seconds]
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
ryanartecona has joined #ocaml
silver__ has quit [Read error: Connection reset by peer]
ryanartecona has quit [Quit: ryanartecona]
jlam_ has joined #ocaml
mfp__ has quit [Ping timeout: 240 seconds]
jlam has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
andreas_ has quit [Quit: Connection closed for inactivity]
coventry has joined #ocaml
<coventry>
How does ocaml infer that a & b are integers here? let rec range a b = if a > b then [] else a :: range (a+1) b;; ==> val range : int -> int -> int list = <fun>
<Drup>
you add 1 to a, so a is integer. Then you compare b to a, so b and a have the same type
<coventry>
Ah, the 1. Thanks. Thought there was some weird recursion inference.
shinnya has quit [Ping timeout: 260 seconds]
<gasche>
shon: I shon module abstractions
coventry has quit [Remote host closed the connection]
troydm has joined #ocaml
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 255 seconds]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 268 seconds]
jlam has joined #ocaml
jlam1 has joined #ocaml
jlam has quit [Ping timeout: 240 seconds]
jlam_ has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
mengu has quit [Quit: Leaving...]
ryanartecona has joined #ocaml
pierpa has quit [Quit: Page closed]
ryanartecona has quit [Quit: ryanartecona]
jlam has joined #ocaml
jlam1 has quit [Ping timeout: 268 seconds]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 240 seconds]
kassens has joined #ocaml
spew has quit [Quit: foobar]
kassens has quit [Ping timeout: 260 seconds]
ygrek has joined #ocaml
ziyourenxiang has joined #ocaml
cschneid has quit [Ping timeout: 255 seconds]
cschneid has joined #ocaml
ryanartecona has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
lostman has joined #ocaml
<lostman>
hi all. i'm trying to build something with jbuilder and i have main file in src/main.ml and a bunch of modules in some other directories: src/one src/two, etc. how can i point jbuilder to include these modules as if they were in same directory as main? there's glob for files but that works with rules and i'm pretty sure i should just write (executable (name main) ...) stanza
<rgrinberg>
You can't do that now. But you can turn modules in different directories into libraries and depend on those in your executable stanza
samrat has quit [Ping timeout: 276 seconds]
Merv_ has quit [Remote host closed the connection]
<lostman>
how do I do that? do I need jbuild file in each directory?
samrat_ has joined #ocaml
jnavila has joined #ocaml
Simn has joined #ocaml
<rgrinberg>
yeah
enterprisey has joined #ocaml
dakk has joined #ocaml
nanoz has joined #ocaml
nanoz has quit [Changing host]
nanoz has joined #ocaml
nanoz has left #ocaml ["Leaving"]
Merv_ has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
andreas_ has joined #ocaml
butts_butts has quit [Remote host closed the connection]
hannes has quit [Read error: Connection reset by peer]
cranmax has joined #ocaml
hannes has joined #ocaml
Anarchos has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
enterprisey has quit [Remote host closed the connection]
argent_smith has joined #ocaml
letoh_ has joined #ocaml
letoh has quit [Ping timeout: 255 seconds]
<Leonidas>
jbuilder has documentation but I still find it surprising so I scout other people's examples
mfp__ has joined #ocaml
dakk has quit [Read error: Connection reset by peer]
lostman has quit [Quit: Connection closed for inactivity]
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
dhil has joined #ocaml
rwmjones has quit [Ping timeout: 246 seconds]
fraggle_ has quit [Read error: Connection reset by peer]
rwmjones has joined #ocaml
dakk has joined #ocaml
jnavila has quit [Read error: No route to host]
jnavila has joined #ocaml
fraggle_ has joined #ocaml
zpe has joined #ocaml
rwmjones has quit [Ping timeout: 246 seconds]
zpe_ has joined #ocaml
zpe_ has quit [Read error: Connection reset by peer]
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
alexyan has joined #ocaml
<alexyan>
Hello! I am writing an OCaml binding to js library using js_of_ocaml. Now I need to parse json incoming from js function. What is the right way to do this? My incoming type is Js.json Js.t
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
<Leonidas>
alexyan: you can match on it, I suppose?
alexyan has quit [Quit: Ухожу я от вас]
cranmax has quit [Quit: Connection closed for inactivity]
alexyan has joined #ocaml
<alexyan>
Leonidas: Can you provide an example of what you mean, please?
zpe has quit [Ping timeout: 276 seconds]
<Leonidas>
alexyan: sorry, I'm at work, so can't try it out right now.
<Leonidas>
alexyan: you could create a thread on discuss.ocaml.org in the meantime, maybe I get to it later :|
<alexyan>
Leonidas: Thanks, I'll post there a bit later
<johnelse>
alexyan: I used https://github.com/mirage/ocaml-rpc to do this a couple of days ago - you can use the ppx to generate a parser for your types
<def`>
with state monad, you are limited to (what I recently learned is ...) "well-bracketed" control flow: for each call there is a return
<def`>
with continuation monad, you can resume a part of the control multiple times
<def`>
abort it, etc.
jlam1 has joined #ocaml
jlam2 has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
jlam1 has quit [Ping timeout: 255 seconds]
mbrock has joined #ocaml
jlam_ has joined #ocaml
jlam2 has quit [Ping timeout: 240 seconds]
jlam1 has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
jlam_ has joined #ocaml
jlam1 has quit [Ping timeout: 240 seconds]
jlam1 has joined #ocaml
Enamex_ has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 248 seconds]
samrat_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
samrat_ has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
ski has quit [Ping timeout: 268 seconds]
jlam has joined #ocaml
jlam1 has quit [Ping timeout: 248 seconds]
<orbifx[m]>
Are effects going to become part of the default standard library and functions? Or will one have to "enable" or "select" multicore with effects?
sam__ has quit [Ping timeout: 268 seconds]
<mrvn>
Has anyone used googles protocol buffers with ocaml?
<flux>
I would expect after a transition period there would be only multicore ocaml, if only some optimized "single core mode" in it would exist
jlam_ has joined #ocaml
<flux>
but that's, like, just an opinion ;)
<mrvn>
flux: how would that be "only"?
<flux>
one compiler for example
<flux>
could be a switch in the runtime
<flux>
OCAMLRUNPARAM even
<mrvn>
I imagine it is like threads. Using the thread switch gives you a different runtime and links in different libs.
jlam has quit [Ping timeout: 260 seconds]
<mrvn>
don't think a runtime option is feasable.
<flux>
the transition period might be long, because old ocaml C bindings won't work out-of-the-box with mc
<mrvn>
flux: hmm, why not?
<flux>
for one, you cannot anymore have raw C pointers in OCaml heap
<mrvn>
flux: you already can't have that
<flux>
but you can port old code to new ocaml and that code will (should?) then work with mc
<orbifx[m]>
mrvn: haven't used protobufs, but I've used msgpack if it's any help
<flux>
yes, but to enable that "not havaing it" you need to use a compiler option while compiling ocaml?
<mrvn>
flux: I thought the introduction of ephemerals for lazy made raw pointers broken.
<flux>
mrvn, well, I haven't read about that
<flux>
I think there are also some changes related to initializing or assigning values
<flux>
all these changes would be part of ocaml main line, but old code is still incompatible..
<mrvn>
Raw pointers are alkready borken in case the address later falls into a heap. But in the past most people ignored that. ONly happens with dangling pointers.
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
<mrvn>
flux: I think as long as you don't have a dangling pointer even with MC they would work just fine.
<flux>
I don't think it has been historically well documented that storing raw pointers is bad. nowadays perhaps better.
<mrvn>
flux: I don't think it is bad. I also don't think having the pointer later fall into a heap is a concern as you should never have a dangling pointer anyway.
<mrvn>
I just think it is inconvenient since you don't have a finalizer with a raw pointer.
<beginner>
@mrvn: have you used other message encoding libaries, just out of curiosity?
<mrvn>
beginner: pickle in python, which is a HUGE security risk.
<flux>
mrvn, it does say "affecting those functions which expose raw pointers into mutable parts the OCaml heap (which is not a safe thing to do on multicore)"
dhil has joined #ocaml
<flux>
but that's of course vice versa of what I was saying
<mrvn>
"raw pointers into mutable parts the OCaml heap"? That would crash the GC anyway.
<flux>
hmm, no
<flux>
so functions expose raw pointers in the OCaml heap
<mrvn>
That's what you get when a dangling C pointer later points into the heap. i.e. when a memory region is reused as heap later.
<flux>
raw pointer I understand to mean C-allcoated memory
<flux>
I don't see any mention of "dangling" there :)
<mrvn>
does it mean a pointer pointing into the heap or storing a pointer pointing somewhere else in the heap?
<flux>
I think the whole ocaml heap map is going away
<flux>
so it cannot know if the pointer is an ocaml one of a C one
<flux>
s/of/or/
<mrvn>
flux: that would mean "storing pointers in the heap", not "pointers into the heap". The later crashes the GC now.
<mrvn>
IIrc the "pointers into the heap" is already being broken by ephemerals, at least to some degree.
<mrvn>
aeh, storing pointers in the heap
<mrvn>
And yeah, the problem is "it cannot know if the pointer is an ocaml one or a C one" is the problem.
<mrvn>
-is the problem
<orbifx[m]>
is that not mitigated by what tag is used?
<mrvn>
flux: It's just that iirc that part already gets broken before MC.
<mrvn>
orbifx[m]: no tags on raw pointers
<flux>
mrvn, well that's just it, I don't see a point declaring that something is going to be broken under MC if it's already broken?-)
<mrvn>
flux: ephemerals probably came later or in parallel
<flux>
the PR is from January, though, ephemerals came way earlier?
<mrvn>
Not sure when (or if) they got merged into mainline. I dropped out of the thread after a while when it got to technical.
<mrvn>
still using stone age old ocaml from the old Debian stable.
<orbifx[m]>
hannes: just reading your blog. Nice work.
<flux>
btw, were you at some point interested in distributed file systems?
<flux>
sheepdog is not exactly one, but it's still pretty interesting.
<mrvn>
always
<orbifx[m]>
flux: link?
<orbifx[m]>
mrvn: what is your interest in protobufs?
<mrvn>
orbifx[m]: Looking into it for work under python because pickle allows remote code execution. Seems like a good replacement.
<flux>
what, you want _less_ features.. :)
<mrvn>
yeah, I don't like my message protocol to be turing complete.
<flux>
but think how much more expresive that is!
<mrvn>
but try to determine if a message is malicious. That's the halting problem for one thing.
<flux>
just check the evil bit from the packet
<mrvn>
that's the thing, now such thing unless you have tcp/ip.
<orbifx[m]>
flux it's not even written in OCaml? :P
<orbifx[m]>
mrvn: does python not support MsgPack?
<flux>
orbifx[m], no :(
<flux>
I'm fine with that. but I wish libvirt was written in ocaml. 'An unknown error occurred', thanks..
beginner has quit [Ping timeout: 260 seconds]
<orbifx[m]>
:P
<mrvn>
I want MC ocaml to be mainline so I can have a multi-core mirage OS.
<flux>
and use it for.. ?
<flux>
a shell for mirage would be nice. something like utop with steroids.
<mrvn>
perferably everything. desktop, internet, games
<mrvn>
flux: have you tried building utop to mirage?
<flux>
no
<flux>
I'm sort of expecting it won't work, though?
<flux>
or even basic ocaml toplevel
<mrvn>
don't see why it shouldn't. You have a console and IO.
<flux>
do you have file system for looking up .cmi files?
<flux>
well, maybe basic toplevel usage wouldn't even need those
<mrvn>
last I checked, years ago, there were block devices and nfs.
<mrvn>
someone should have written an FS by now.
<flux>
but they were probably not provided under the Unix interface
<flux>
and I bet that's what ocaml toplevel/utop use
<flux>
well, or even Pervasives
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
samrat_ has joined #ocaml
jlam_ has joined #ocaml
FreeBirdLjj has joined #ocaml
jlam has quit [Ping timeout: 268 seconds]
sgronblo has quit [Ping timeout: 260 seconds]
alexyan has left #ocaml ["Ухожу я от вас"]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
Simn has quit [Quit: Leaving]
jlam has joined #ocaml
jlam_ has quit [Ping timeout: 268 seconds]
jlam_ has joined #ocaml
jlam__ has quit [Read error: Connection reset by peer]
Anarchos has quit [Remote host closed the connection]
Anarchos has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
dakk has quit [Ping timeout: 255 seconds]
dakk has joined #ocaml
sgronblo has joined #ocaml
shinnya has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
pzp has joined #ocaml
govg has quit [Ping timeout: 248 seconds]
ryanartecona has joined #ocaml
sgronblo has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
spew has quit [Quit: foobar]
<flux>
here's a FREE coding idea! a fuse-based daemon/file system that is intended for writing (ie. tv recording, log files), where (given a set of mount points) it automatically falls back to secondary (or tertiary etc) should the primary file system return error/time out. recovery would happen with user-appointed merging tool.
<flux>
(such a great and feasible idea that I'm going to write it down to my ideas-list)
zpe has joined #ocaml
sgronblo has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
Sakarah has joined #ocaml
vgrocha has joined #ocaml
samrat_ has quit [Ping timeout: 255 seconds]
pluplog has joined #ocaml
ziyourenxiang has quit [Ping timeout: 260 seconds]
sgronblo has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
copy_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
kakadu has quit [Quit: Konversation terminated!]
sgronblo has quit [Ping timeout: 240 seconds]
nightblues has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 255 seconds]
TheLemonMan has joined #ocaml
malc_ has joined #ocaml
Merv_ has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
cranmax has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
kakadu has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
sam__ has joined #ocaml
ryanartecona has joined #ocaml
sgronblo has joined #ocaml
sam__ has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
sz0 has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
sgronblo has quit [Ping timeout: 246 seconds]
Enamex_ has joined #ocaml
tane has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
zpe has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
dhil has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
ousado_ has quit [Quit: Konversation terminated!]
ousado_ has joined #ocaml
pluplog has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 248 seconds]
shinnya has joined #ocaml
Merv_ has joined #ocaml
ousado_ has quit [Read error: Connection reset by peer]
ousado_ has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
LACampbell has joined #ocaml
sgronblo has joined #ocaml
sgronblo has quit [Ping timeout: 258 seconds]
nicoo has joined #ocaml
tane has quit [Quit: Leaving]
two_wheels has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
two_wheels has joined #ocaml
two_wheels has quit [Client Quit]
jlam__ has joined #ocaml
jlam has quit [Ping timeout: 246 seconds]
Enamex_ has quit [Ping timeout: 260 seconds]
two_wheels has joined #ocaml
two_wheels has quit [Read error: Connection reset by peer]
two_whee_ has joined #ocaml
two_whee_ has quit [Client Quit]
cranmax has quit [Quit: Connection closed for inactivity]
zpe has joined #ocaml
jnavila has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 255 seconds]
sam__ has joined #ocaml
sgronblo has joined #ocaml
sam__ has quit [Ping timeout: 240 seconds]
sgronblo has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
Sakarah has quit [Remote host closed the connection]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sh0t has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
maarhart has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sam__ has joined #ocaml
pierpa has joined #ocaml
maarhart has quit [Ping timeout: 240 seconds]
<LACampbell>
how do you guys update compilers? I did opam switch, but I think I didn't eval `opam config env`, so now I am having to recompile all my libraries again. os it that normally required anyway?
<Armael>
you always have to recompile all your libraries
Enamex_ has joined #ocaml
<LACampbell>
looks like the package I wanted to use isn't available in 4.05 anyway! oh well.
<Armael>
is it on github? you could open an issue there
<LACampbell>
I think I will. I might be mistaken of course, I'm always confused by opam. but we'll see
<LACampbell>
ok it's there when I do "opam list"
<LACampbell>
sorry - "opam search $name"
<LACampbell>
but "opam install $name" says "no package matches $name"
<Armael>
which package is it?
<LACampbell>
cohttp
Anarchos has quit [Quit: Vision[0.10.1]: i've been blurred!]
saml has quit [Remote host closed the connection]
<Armael>
hmm, funny, on a fresh 4.05.0 switch, the solver found a solution to install cohttp, by installing its first version (0.9.1)
<Armael>
I suspect some version constraint to be missing somewhere
<Armael>
otherwise, on my computer `opam install cohttp.0.22.0` indeed says its not installable, because of ppx_deriving
<LACampbell>
I do constantly mess up my opam state
<Armael>
which apparently is not yet available for ocaml 4.05
<LACampbell>
maybe I will init again
<Armael>
well it won't help, you'll have to wait for ppx_deriving to work with ocaml 4.05
<LACampbell>
then how is it yours can figure out to install 0.9.1, but mine can't?
<LACampbell>
ie, is it my fault? (:
<Armael>
no idea. you probably do not want to install a cohttp version that old though :p (sept 2012...)
<LACampbell>
well I'll make an issue on their github. we'll see what they think
<Armael>
mm it compiled, so no faulty contraint version
pzp has quit [Quit: Connection closed for inactivity]