Kakadu has quit [Remote host closed the connection]
palomer has quit [Ping timeout: 272 seconds]
palomer_ has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
palomer_ has quit [Ping timeout: 246 seconds]
palomer has joined #ocaml
Algebr has quit [Ping timeout: 260 seconds]
madroach has quit [Read error: Connection reset by peer]
^elyse^ has quit [Quit: Leaving...]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
Muzer has joined #ocaml
madroach has joined #ocaml
struk|desk|away is now known as struk|desk
madroach has quit [Read error: Connection reset by peer]
ncthom91 has joined #ocaml
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
Algebr has joined #ocaml
Algebr is now known as Guest23894
infinity0 has quit [Ping timeout: 272 seconds]
madroach has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madroach has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
ygrek has joined #ocaml
struk|desk is now known as struk|desk|away
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
nullcatxxx_ has joined #ocaml
nullcatx_ has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
jbrown has quit [Ping timeout: 272 seconds]
madroach has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
madroach has joined #ocaml
<ollehar>
anyone awake?
<ollehar>
is there anyway I can transfer my hashtable type information to the runtime system magically?
<ollehar>
that is, my gc.
<ollehar>
right now I'm trying to generate structs in llvm that holds the type information, but it's hell.
struk|desk|away is now known as struk|desk
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
<struk|desk>
ollehar: hashtable information? you mean your data that is contained in a hashtable ocaml datastructure?
madroach has quit [Read error: Connection reset by peer]
ncthom91 has joined #ocaml
madroach has joined #ocaml
<ollehar>
struk|desk: yes. and I want to export it to C during compilation so it can be read by the gc.
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
Guest23894 has quit [Ping timeout: 240 seconds]
teknozulu has joined #ocaml
<teknozulu>
Hey. Using 4.02.3, the utop from opam segfaults on start. So I removed it and tried to build it from source, however the make install only created lib files, but no executables. Where did I screw up?
madroach has joined #ocaml
struk|desk is now known as struk|desk|away
madroach has quit [Read error: Connection reset by peer]
<teknozulu>
ugh, got my directories figured out, but this one crashes as well, caused by a malloc
struk|desk|away is now known as struk|desk
madroach has joined #ocaml
<struk|desk>
teknozulu: theres a nice issue / reddit thread about problems like that..have you seen it?
madroach has quit [Read error: Connection reset by peer]
<struk|desk>
I've also seen it crash when ppx + camlp4 is mixed, but I doubt that is the case for you
<teknozulu>
damnit, I just remembered
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<teknozulu>
doing eval `opam config env` makes it work
<teknozulu>
I just need to put it in my config on this vm
<struk|desk>
yep :)
<struk|desk>
been there, done that
<teknozulu>
I feel like I'm going to need this tattooed on the back of my hand or something.
<struk|desk>
I got so sick of that, I now have a shell script which installs ocaml + opam and edits the shell accordingly. but annoyingly, you still have to run that stupid command once in the shell you started everything from. lol
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
ncthom91 has joined #ocaml
<ollehar>
struk|desk: bashrc?
tristero has quit [Quit: tristero]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
<struk|desk>
ollehar: I check for the presence of that, yes, or .profile I believe
madroach has joined #ocaml
mcint has quit [Quit: hibernating...]
<ollehar>
hm ok
ollehar has quit [Quit: ollehar]
lewis1711 has joined #ocaml
<lewis1711>
' (Invalid_argument "invalid index: 0 for array with indices (-2,-1)")' Just got this error message. sometimes I really question using core. it has a lot of things I regard as idiosyncratic. like an array backing a dequeue having two negative indicies
Guest89422 has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madroach has quit [Read error: Connection reset by peer]
lewis1711 has quit [Ping timeout: 260 seconds]
struk|desk is now known as struk|desk|away
madroach has joined #ocaml
struk|desk|away is now known as struk|desk
mac10688 has quit [Ping timeout: 246 seconds]
johnelse has joined #ocaml
johnelse is now known as Guest92020
<struk|desk>
ok time to stop shopping for bookshelf speakers for myself and instead do some ocaml...here we go!! ...
pharvey has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
gaze__ has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
lewis1711 has joined #ocaml
madroach has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
madroach has quit [Read error: Connection reset by peer]
ril has joined #ocaml
nullcatxxx_ has joined #ocaml
govg has joined #ocaml
ncthom91 has joined #ocaml
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
JacobEdelman has quit [Quit: Connection closed for inactivity]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JacobEdelman has joined #ocaml
madroach has joined #ocaml
madroach has quit [Ping timeout: 246 seconds]
dfjskla is now known as grai
Sorella has quit [Quit: Connection closed for inactivity]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
madroach has joined #ocaml
hay207 has joined #ocaml
<hay207>
hi guys, where to find documentation about list.reduce in my linux system?
cody` has quit [Quit: Connection closed for inactivity]
<companion_cube>
hay207: sorry to ask, but why do you favor reduce over fold?
<hay207>
i just want a good documentation, to learn the language
<companion_cube>
sure, but in most cases List.fold_left should work
<dmbaturin>
Does anyone use the inotify library? The very example from the docs gives me Unix.EINVAL.
contempt has quit [Disconnected by services]
<companion_cube>
sorry, which example?
contempt has joined #ocaml
<dmbaturin>
contempt: The "Unix-style interface" example from the README.md in whitequark's repo.
<dmbaturin>
* companion_cube
<companion_cube>
hmm, I get EINVAL too
<companion_cube>
the lwt API works, though
malc_ has joined #ocaml
contempt has quit [Ping timeout: 272 seconds]
govg has quit [Read error: Connection reset by peer]
govg_ has joined #ocaml
contempt has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
jpdeplaix has quit [K-Lined]
sz0 has joined #ocaml
^elyse^ has quit [Quit: Leaving...]
contempt has quit [Disconnected by services]
contempt has joined #ocaml
^elyse^ has joined #ocaml
ollehar has joined #ocaml
orbifx has joined #ocaml
sbrouf has quit [Ping timeout: 265 seconds]
pothepanda has quit [Quit: Leaving]
pharvey has quit [Ping timeout: 252 seconds]
sbrouf has joined #ocaml
orbifx has quit [Ping timeout: 246 seconds]
contempt has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
ohama has quit [Ping timeout: 276 seconds]
contempt has joined #ocaml
d0nn1e has quit [Ping timeout: 255 seconds]
d0nn1e has joined #ocaml
Sorella has joined #ocaml
lewis1711 has joined #ocaml
contempt has quit [Ping timeout: 240 seconds]
contempt has joined #ocaml
<Kakadu>
Can somebody explain why opam doesn't tryes to remove package during reinstall? http://paste.in.ua/1112/#44
<Kakadu>
I do not see the same lines which I see after `opam remove ...`
<Kakadu>
And I get an error about ocamlfind package is already installed because of that
<Kakadu>
s/tryes/try/
mac10688 has joined #ocaml
ohama has joined #ocaml
jbrown has quit [Quit: Client exiting]
<Kakadu>
Well, it seems that opam doesn't look at uninstall command from the recipe while reinstall................
palomer has joined #ocaml
lewis1711 has left #ocaml ["Ex-Chat"]
govg_ has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
dhil has joined #ocaml
govg has joined #ocaml
larhat1 has quit [Quit: Leaving.]
JacobEdelman has joined #ocaml
ril has joined #ocaml
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
<companion_cube>
gasche: superbe email
FreeBird_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
struk|desk|away is now known as struk|desk
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
ril is now known as ril[away]
ril[away] is now known as ril
zpe has quit [Ping timeout: 240 seconds]
^elyse^ has quit [Quit: Leaving]
mort___ has joined #ocaml
dhil has quit [Quit: Leaving]
jackweirdy has joined #ocaml
larhat1 has joined #ocaml
^elyse^ has joined #ocaml
larhat1 has quit [Quit: Leaving.]
larhat1 has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
sbrouf has quit [Ping timeout: 246 seconds]
<gasche>
companion_cube: thanks
Tekilla has joined #ocaml
zpe has quit [Remote host closed the connection]
struk|desk is now known as struk|desk|away
zpe has joined #ocaml
ncthom91 has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
govg has quit [Ping timeout: 256 seconds]
<octachron>
I didn't remember that Caml Light had a close module directive
govg has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
ollehar has quit [Ping timeout: 255 seconds]
mort___ has left #ocaml [#ocaml]
BitPuffin|osx has joined #ocaml
orbifx has quit [Ping timeout: 246 seconds]
govg has quit [Quit: leaving]
govg has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has joined #ocaml
orbifx has joined #ocaml
jbrown has joined #ocaml
ollehar has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
<ollehar>
help. I'm stuck.
<ollehar>
can I serialize an ocaml hashtable and access it in C?
<companion_cube>
sounds like a very dangerous thing to do
<ollehar>
because C?
<ollehar>
I wanted to generate type information for the gc, but doing it using the llvm api is...
<ollehar>
hard.
<ollehar>
looking for alternatives.
govg has quit [Quit: leaving]
<companion_cube>
some people have already tried compiling OCaml into LLVM, but yes, seems like the GC is a problem
govg has joined #ocaml
<ollehar>
no no, this is still my godless php-compiler.
<ollehar>
I just want a quick way to generate type information for the gc on how to collect the structs/classes without methods.
<ollehar>
ach, maybe I should just google deeper.
<gasche>
ollehar: I would rather serialize an association list
<gasche>
it is easy to move from the hashtable to the list on the OCaml side, and then the result is much easier to traverse from the C side
<gasche>
(or an array of pairs, for that matter)
<ollehar>
gasche: hi gasche. that might be a better idea. no lib for doing that already?
<ollehar>
maybe I should just generate the C-code for that. ugh.
<gasche>
well
<gasche>
both on the OCaml or C side this should only be a couple lines of code
FreeBirdLjj has quit [Remote host closed the connection]
<gasche>
creating an association list is one fold away, and iterating on the list from the C side does require using the OCaml-C FFI, but should not be terribly difficult either
<companion_cube>
if it's about serialization, then it would be better to use some neutral format
<ollehar>
hm
<companion_cube>
for instance, json, or protobuf
<companion_cube>
something easier to read from C than the OCaml marshal format
<ollehar>
that's a very good point
<ollehar>
then I only need a lib in C to read the file.
<gasche>
I think it depends on whether the C part runs in the same process and is already supported by an OCaml runtime
<ollehar>
no, the C-part is the GC.
<ollehar>
it's the language runtime. that needs the type-information.
<ollehar>
I might be missing something basic, it's the first compiler I make. ^^
sbrouf has joined #ocaml
<gasche>
but is the OCaml table generated on the fly while the program is running, or statically at compile time?
<ollehar>
statically.
<gasche>
well then neither in-memory nor serialization are required: you can just stuff the info in the generated code, can't you?
<ollehar>
yes! but it's f-ing hard to do it using the llvm api.
<ollehar>
constant pointer to constant structs from constant arrays etc etc.
<ollehar>
and come to think of it, having type-information available as json might be useful for other things.
ncthom91 has joined #ocaml
ril has joined #ocaml
malc_ has quit [Quit: leaving]
<ollehar>
well, thanks for the tips! :)
nullcatxxx_ has joined #ocaml
cojy has joined #ocaml
mcint has joined #ocaml
^elyse^ has quit [Quit: Leaving]
contempt has quit [Ping timeout: 256 seconds]
contempt has joined #ocaml
jeffmo has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
^elyse^ has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
lobo has joined #ocaml
contempt has quit [Ping timeout: 246 seconds]
jeffmo has quit [Quit: jeffmo]
contempt has joined #ocaml
orbifx has joined #ocaml
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
^elyse^ is now known as ely-se
ely-se has quit [Quit: Leaving]
ely-se has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
darkf has quit [Quit: Leaving]
octachron has quit [Quit: Leaving]
<sbrouf>
anyone has an example of how to use the Batteries print functions (on a list) ?
ely-se has quit [Quit: Leaving]
ely-se has joined #ocaml
pyon has joined #ocaml
<ollehar>
sbrouf: List.iter (fun p -> print p)?
<sbrouf>
yes i'm currently doing something like that ollehar
<ollehar>
sbrouf: it's not enough? :)
Tekilla has quit [Quit: Quitte]
<sbrouf>
i just hope there would be some way to automatize the transformation of a type to a string.....
<ollehar>
sbrouf: that would be ppx_deriving
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sbrouf>
yes the show module could do the job, thanks a lot !
<pyon>
Foo.foo and Foo.bar are different abstract types, and `qux` has no constructor of type `bar qux`, but that module type checks. :-|
mac10688 has quit [Read error: Connection reset by peer]
<Maelan>
the fact that you do not have known constructors for an abstract type does not mean you cannot have values of that type
<Maelan>
it only means you cannot build such values by yourself, you have to rely on the astracting module
<pyon>
Let's say I change the definition of `qux`, in both the signature and the structure, to `type _ qux = F : foo qux | B : bar qux`.
<pyon>
Couldn't I do `match (x : bar qux) with B -> "all is fine"` ?
<Maelan>
abstract types are not necessarily distinct
<Maelan>
so here if you do not match F you will have a non-exhaustive pattern matching
<Maelan>
and a match failure
<pyon>
Ah, so I always have to cover all constructors, even if I'm matching a value of type `bar qux`, which should rule out the constructor `F`?
<Maelan>
since foo qux might be equal to bar qux, i guess so
mcint has joined #ocaml
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
<gasche>
pyon: inside the module Foo, foo and bar are equal
<gasche>
if you want to export types that you know are incompatible, type abstraction is too strong (because it loses this information)
<pyon>
gasche: Obviously. But, what about outside?
<gasche>
you can use private types
<gasche>
well outside nobody knows whether they are equal or not
<gasche>
but if you used at the interface, say
<gasche>
type foo = Foo type bar = Bar then that would be explicit
<pyon>
Ah.
<pyon>
In SML, outside of the module, `foo` and `bar` are distinct, period. But I have no idea what OCaml does here.
<gasche>
you are confusing "I don't know whether they are equal" and "I know they are different"
<gasche>
in SML, you never need to prove disequality, at most you need to prove equality (and for those you fail)
<gasche>
with GADTs, as you use here, sometimes you need to prove disequality (or rather incompatibility) to ensure that a case cannot happen
<pyon>
Ah.
<gasche>
to be able to prove that two things are distinct, they cannot be both unknown
<pyon>
Right now, I'm having trouble installing OCaml on my machine, but, if I tried this in the REPL, the exhaustiveness checker would complain, righgt?