ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nopf has quit [Remote host closed the connection]
dsheets has joined #ocaml
Simn has joined #ocaml
vpm has quit [Ping timeout: 276 seconds]
kushal has joined #ocaml
Reshi has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu has quit [Changing host]
mengu has joined #ocaml
Reshi has joined #ocaml
mengu has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Changing host]
mengu has joined #ocaml
FreeBirdLjj has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
butts_butts has joined #ocaml
wolfcore has quit [Ping timeout: 260 seconds]
d0nn1e has quit [Ping timeout: 276 seconds]
d0nn1e has joined #ocaml
wolfcore has joined #ocaml
jwatzman|work has joined #ocaml
mengu has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
silver has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<maker>
File "src/jws.mli", line 22, characters 0-0:
<maker>
Error: Syntax error
<maker>
riiight
pierpa has joined #ocaml
<mehdib>
something funny: let f ~x = x;; f 1;; gives - : x:(int -> 'a) -> 'a = <fun> and (f : x:int -> _) 1;; gives - : int = 1
ggole has joined #ocaml
amnn has joined #ocaml
amnn has quit [Client Quit]
Stalkr has joined #ocaml
Stalkr has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
toomuchtvrotsurb has joined #ocaml
octachron has joined #ocaml
<octachron>
mehdib: functions with a labeled argument and a polymorphic return type have a special behavior: they are never considered as fully applied
toomuchtvrotsurb has quit [Ping timeout: 250 seconds]
<octachron>
another fun corner case to consider: "let g x y = f ~x ~x:y;;"
<mehdib>
:)
<maker>
:O
butts_butts has quit [Ping timeout: 265 seconds]
<mehdib>
and then g f;; gives - : '_a -> '_a = <fun>
<mehdib>
and g f f;; gives - : x:'_a -> '_a = <fun>, however unlike f 1;; , g f f 1;; gives an error
<mehdib>
but (g f f : x:int -> _) 1;; gives 1 and (g f f : x:_ -> _) 1;; gives - : x:(int -> '_a) -> '_a = <fun> ...
dsheets_ has joined #ocaml
dsheets has quit [Read error: Connection reset by peer]
lolisa has joined #ocaml
Stalkr has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dsheets has joined #ocaml
Stalkr has quit [Ping timeout: 250 seconds]
sepp2k has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sepp2k has joined #ocaml
Reshi has joined #ocaml
Reshi has quit [Ping timeout: 276 seconds]
kakadu has joined #ocaml
nopf has joined #ocaml
Nahra has quit [Ping timeout: 250 seconds]
tane has joined #ocaml
Mercuria1Alchemi has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
dhil has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
dario3 has joined #ocaml
butts_butts has joined #ocaml
govg has joined #ocaml
dsheets has joined #ocaml
tennix has quit [Ping timeout: 252 seconds]
gautv has quit [Ping timeout: 240 seconds]
gautv has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
manjaro-kde5 has joined #ocaml
gautv has quit [Ping timeout: 276 seconds]
dhil has quit [Ping timeout: 250 seconds]
manjaro-kde5 has quit [Ping timeout: 244 seconds]
chelfi has quit [Ping timeout: 264 seconds]
ousado has quit [Ping timeout: 264 seconds]
Asmadeus has quit [Ping timeout: 264 seconds]
ousado has joined #ocaml
Asmadeus has joined #ocaml
def` has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
chelfi has joined #ocaml
tennix has joined #ocaml
dario3 has quit [Quit: Konversation terminated!]
rgrinberg has joined #ocaml
_y has quit [Ping timeout: 265 seconds]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
tobiasBora has quit [Ping timeout: 260 seconds]
zaquest has joined #ocaml
vpm has joined #ocaml
tobiasBora has joined #ocaml
_y has joined #ocaml
orbifx has joined #ocaml
<orbifx>
is there a comparisson of lwt to native threads anywhere?
leyyin has joined #ocaml
<tobast>
Hello
FreeBird_ has joined #ocaml
<tobast>
Anyone had to deal with an OCaml AST?
<octachron>
yes
<tobast>
We're trying to recurse on the AST to collect informations on nodes, node types, …, but we would really like to avoid the painful task of writing the whole 800-lines function to do so
<tobast>
as we just need to call a function on each node
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<rks`>
tobast: Ast_mapper Tast_mapper ?
<tobast>
rks`: don't we need to implement a function for each node type anyway with these?
<mrvn>
is there something that iterates over each method of a class and gets told what the class name is?
hay207_ has joined #ocaml
hay207 has quit [Ping timeout: 276 seconds]
bbc has joined #ocaml
<octachron>
tobast: there is also iterator equivalent ast_iterator, but yes you need to precise the behavior of the iterator/mapper over each node type
<tobast>
octachron: if it is only over each node type, it's still easier
<def`>
This is tricky and rely on a lot of GC internal :)
<Enjolras>
def`: i'm not sure i want to read such a code. I want to remain sane :p
hay207__ has quit [Ping timeout: 244 seconds]
hay207__ has joined #ocaml
<def`>
Enjolras: I tried to implement without stubs
<def`>
but the problem is that safepoint are too hard to predict
<def`>
so GC could run at unexpected places, ... falling back to C is the best to ensure no GC runs :P
iZsh has quit [Ping timeout: 276 seconds]
iZsh has joined #ocaml
<Enjolras>
def`: wow. You actually did it :o
<Enjolras>
probably it would be a bit easier with Gc.promote. At least you can rule minor gc out of the party. But still it looks very hacky
<def`>
There is a Gc.promote?
<Enjolras>
mpu: just use fast hashing :).
<def`>
If you decent performances, you have to deal with minor heap
<def`>
(I would like to have such structure in stdlib, this might be useful, for multicore OCaml for instance)
<def`>
(not this implementation of course :))
wolfcore has quit [Ping timeout: 244 seconds]
dario2 has joined #ocaml
toomuchtvrotsurb has joined #ocaml
wolfcore has joined #ocaml
dario2 has quit [Quit: Konversation terminated!]
mistermetaphor has joined #ocaml
g4143 has joined #ocaml
<mpu>
Enjolras: In my case, I know stuff won't be copied, and taking the pointer is safe.
<mpu>
(it is safe regardless of copies)
<mpu>
How does Hashtbl.hash work on an Obj.t?
<mpu>
Probably the same as on the object itself.
<mpu>
GC is a good point, though...
<mpu>
I'll just cache the result of my function inside the object itself.
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
g4143 has quit [Quit: Ex-Chat]
<Enjolras>
Hashtable use polymorphic compare and polymorphic compare on Obj.t does pysical compare i think
<Enjolras>
let foo1 = Obj.repr (`Foo 33) in let foo2 = Obj.repr (`Foo 33) in let hash = Hashtbl.create 4 in List.iter (flip (Hashtbl.add hash) 1) [foo1; foo2]; Hashtbl.iter (fun _ b -> print_int b) hash;;
<Enjolras>
11- : unit = ()
<seliopou>
how does one configure oasis to display the full ocamlbuild commands that are being executed?
dexterph has quit [Ping timeout: 250 seconds]
<Enjolras>
hmm but hash is the same
<Enjolras>
543984111
<Enjolras>
543984111
sepp2k has quit [Quit: Leaving.]
<companion_cube>
seliopou: look into _build/_log
<seliopou>
companion_cube: thanks!
<companion_cube>
or use something like XOCamlbuildExtraArgs: -classic-mode
<companion_cube>
(something like this(
<seliopou>
ah ok
<ggole>
Obj.t is only at the type level, values of Obj.t are just regular values with their types changed
<Enjolras>
yeah forgot there were no such thing as specialized hash function
<companion_cube>
and it's hard to write good hash combinators -_-
<companion_cube>
especially with 63 bits
<ggole>
Well, there is the Hash functor for that
<companion_cube>
which functor?
<ggole>
Hashtbl.Make?
<companion_cube>
ah! but it assumes you have a hash function already
<Enjolras>
not exactly the same thing as specialized compare
dsheets has quit [Remote host closed the connection]
<ggole>
Oh I see, you are talking about implementing one. Right.
<companion_cube>
compare combinators are easier than hash combinators
<Enjolras>
hash combinator is hard. I'ven ever seen a language with this in stdlib
<companion_cube>
hmm, doesn't rust have this?
<ggole>
iirc Java has something like it, although it's in OO style rather than combinatorial style
<Enjolras>
not really. There combinator doesn't combine well. It depends on ordering
<companion_cube>
I mean, they have a Hash trait and the double dispatch trick for using it with several hash functions
<companion_cube>
of course it depends on ordering
<companion_cube>
why wouldn't it?
<companion_cube>
[a;b;c] should not hash the same as [c;b;a]?
<ggole>
If it didn't depend on ordering of fields, wouldn't it be inconsistent with equality that works in field order?
<Enjolras>
In rust, if you want to hash 'a * 'b you can't get the hash of a and the hash of b and combine them
<Enjolras>
you have to hash 'a * 'b
<Enjolras>
so you can't combine hash, you have to rebuild the hash from scrash for the tuple
<companion_cube>
ah, I see
dsheets has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
<companion_cube>
but you can see it the other way: to combine two hashes, just hash their pair
<Enjolras>
yes, but it prevents implementing cashing.
octachron has quit [Ping timeout: 250 seconds]
butts_butts has quit [Read error: Connection reset by peer]
<Enjolras>
So basically you always have to rehash deep nested structures even you if you have already computed parts of it
butts_butts has joined #ocaml
<Enjolras>
whic can be a problem
<companion_cube>
caching*
doecnt has joined #ocaml
<companion_cube>
I'm not sure why you'd have to do this? you could stre the hash in the structure, and use it for the impl of Hash
<Enjolras>
sorry my connection is really bad right now i can't read what i type
slash^ has joined #ocaml
<Enjolras>
companion_cube: but it means you need full control on the hashed object representation.
<Enjolras>
or you need to wrap it in tuples
<Enjolras>
it's not very nice
<companion_cube>
well I'm not sure how you could od it differently
darkf_ has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube>
mpu: do you know you can tweak the default hash function?
<companion_cube>
look at Hashtbl.hash_param for looking deeper into the object
dhil has quit [Ping timeout: 276 seconds]
darkf has quit [Ping timeout: 250 seconds]
dexterph has joined #ocaml
ril has joined #ocaml
darkf_ is now known as darkf
doecnt has quit [Ping timeout: 240 seconds]
kushal has joined #ocaml
butts_butts has quit [Ping timeout: 240 seconds]
yunxing has joined #ocaml
strmpnk has quit [Remote host closed the connection]
pootler_ has quit [Remote host closed the connection]
l1x has quit [Remote host closed the connection]
dch has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
toomuchtvrotsurb has quit [Remote host closed the connection]
dch has joined #ocaml
l1x has joined #ocaml
strmpnk has joined #ocaml
larhat1 has quit [Quit: Leaving.]
shinnya has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
pootler_ has joined #ocaml
shinnya has quit [Ping timeout: 265 seconds]
shinnya has joined #ocaml
shinnya has quit [Read error: Connection reset by peer]
lolisa has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermetaphor has joined #ocaml
shinnya has joined #ocaml
lokien_ has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
orbifx has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
mistermetaphor has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
rand__ has joined #ocaml
darkf has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
dexterph has quit [Remote host closed the connection]
dexterph has joined #ocaml
butts_butts has joined #ocaml
kakadu has quit [Quit: Page closed]
toomuchtvrotsurb has quit [Remote host closed the connection]
dhil has joined #ocaml
kushal has joined #ocaml
yunxing has quit [Remote host closed the connection]
sh0t has joined #ocaml
toomuchtvrotsurb has joined #ocaml
kushal has quit [Quit: Leaving]
butts_butts_ has joined #ocaml
butts_butts has quit [Read error: Connection reset by peer]
dexterph has quit [Remote host closed the connection]
butts_butts_ has quit [Ping timeout: 246 seconds]
mistermetaphor has joined #ocaml
Guest33283_ has left #ocaml [#ocaml]
yunxing has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
sh0t has quit [Ping timeout: 250 seconds]
Reshi has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
ggole has quit []
A1977494 has joined #ocaml
MorTal1ty has joined #ocaml
A19774941 has quit [Ping timeout: 276 seconds]
Reshi has quit [Ping timeout: 250 seconds]
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 276 seconds]
<seliopou>
uhhh... what's the special incantation to get flambda working in 4.03?
<seliopou>
so the standard 4.03 switch won't do the trick?
<flux>
correct
<seliopou>
ahah
<seliopou>
so "hidden behind a flag" really means "hidden behind a compile-time flag"?
aphprentice_ has joined #ocaml
dsheets has joined #ocaml
scarygelatin has joined #ocaml
<flux>
yes
<flux>
in other words, it's not enabled by default in the compiler
sh0t has joined #ocaml
Nahra has joined #ocaml
hay207 has quit [Quit: Konversation terminated!]
dsheets has quit [Ping timeout: 260 seconds]
<flux>
apparently it was more trouble than its worth to support both optimizers (the old and the new) so it was chosen to err on the safe side
<flux>
a future release would enable flambda by default
govg has quit [Ping timeout: 260 seconds]
yunxing has quit [Remote host closed the connection]
<flux>
and even a more future release might drop the old optimizer altogether I imagine
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
aphprentice_ is now known as aphprentice
shinnya has quit [Ping timeout: 240 seconds]
mistermetaphor has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
yunxing has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
dsheets has joined #ocaml
dhil has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 276 seconds]
<rseymour>
so did anyone see my troubles w/ turning a json-schema.org json-schema into something resembling a 'type' in ocaml? I would love to turn a json-schema into a .atd file for example
yunxing has quit [Remote host closed the connection]
<mpu>
Where can I find the freaking documentation for Ocamlbuild plugin extensions?
<mpu>
Like, the list of commands available (S, A, ...)
yunxing has joined #ocaml
<Drup>
mpu: in the .mli ... :x
tautologico has joined #ocaml
<mpu>
I'm pretty sure ocamlbuild could be a nice tool, but right now the documentation is just incredibly bad.
rand__ has quit [Ping timeout: 276 seconds]
tane has joined #ocaml
<mpu>
So when I use "dep", the thing depended upon gets added to the build command?
<mpu>
This is very inconvenient as I need to have some libraries before this on my linking command.
<mpu>
(actually after this)
<Drup>
mpu: have you looked at gasche's tutorial ? it's in the ocamlbuild repository now
butts_butts has joined #ocaml
<rseymour>
so my thought is for some variable of type tt can I do tt [@@ deriving ____]
tane has quit [Quit: Verlassend]
infinity0 has quit [Ping timeout: 250 seconds]
Simn has quit [Quit: Leaving]
infinity0 has joined #ocaml
yunxing has quit [Remote host closed the connection]