<whitequark>
and yeah, was thinking about ppx_clang
<whitequark>
Drup: should've said
<whitequark>
are you ~watching~ me
<Drup>
that's not spying if you are publicly staring something :D
* Drup
watches whitequark 0_0
troutwine is now known as troutwine_away
claudiuc_ has quit [Remote host closed the connection]
claudiuc has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
cody__ has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
avsm has quit [Quit: Leaving.]
<dmbaturin>
Drup: That's not spying indeed, it's just open source intelligence. ;)
lordkryss has quit [Quit: Connection closed for inactivity]
philtor has joined #ocaml
Algebr has joined #ocaml
<Algebr>
When you go from a higher level language to a lower level one, isn't it the case that you "lose" some information? I'm trying to go from three address code to C and its kinda hard.
ebzzry has quit [Ping timeout: 246 seconds]
<Drup>
yes, it can happen
<Algebr>
I can kind of cheat by adding type info to the three address code, but then would that still count as three address code..
<Drup>
the other way around too
ebzzry has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
<Drup>
is it very important that you rigidly stick to the canonical definition of 3 address code ? :p
<whitequark>
LLVM is 3AC and has type information
<Drup>
(there are more type informations in the IR than in the bindings !)
<Drup>
:3
zarul has quit [Ping timeout: 245 seconds]
<whitequark>
Drup: lol
dmbaturin has quit [Ping timeout: 244 seconds]
<Algebr>
yea, I think I'm gonna cheat a little bit...
<Algebr>
well, if its good enough for Lattner, its good enough for me
dmbaturin has joined #ocaml
philtor has quit [Ping timeout: 244 seconds]
q66_ has quit [Quit: Leaving]
<dmbaturin>
Anyone ever used ocamldebug?
<Drup>
once or twice, by curiosity
<dmbaturin>
I don't have a particular problem with it, just curious if anyone uses it. :)
<Drup>
I don't think anyone use it really
<dmbaturin>
I don't think I've been in a situation where a debugger could help so far.
<whitequark>
ocamldebug is unusable
<Drup>
oh, there are lot's of situation where a debugger can help
<Drup>
just not ocamldebug ^^'
zarul has joined #ocaml
ebzzry has quit [Ping timeout: 272 seconds]
ebzzry has joined #ocaml
malo has quit [Remote host closed the connection]
philtor has joined #ocaml
dorei has quit []
nifty has quit [Read error: Connection reset by peer]
nifty has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
Khady has quit [Remote host closed the connection]
Khady has joined #ocaml
Khady has joined #ocaml
Khady has quit [Changing host]
dinosaure has quit [Ping timeout: 250 seconds]
typedlambda has joined #ocaml
dinosaure has joined #ocaml
WraithM has quit [Quit: Lost terminal]
philtor has quit [Ping timeout: 246 seconds]
hexo has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
samrat has joined #ocaml
philtor has joined #ocaml
philtor has quit [Ping timeout: 272 seconds]
n0v has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
n0v has joined #ocaml
claudiuc has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
iorivur has joined #ocaml
samrat has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
iorivur has quit [Ping timeout: 240 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
yomimono has joined #ocaml
yacks has quit [Ping timeout: 250 seconds]
pyon has quit [Quit: Fiat justitia ruat caelum.]
koderok has joined #ocaml
yacks has joined #ocaml
siddharthv_away is now known as siddharthv
ggole has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
samrat has joined #ocaml
rgrinberg has joined #ocaml
samrat has quit [Client Quit]
philtor has joined #ocaml
michael_lee has joined #ocaml
samrat has joined #ocaml
philtor has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
arj has joined #ocaml
koderok has quit [Quit: koderok]
maattdd has joined #ocaml
koderok has joined #ocaml
Submarine has joined #ocaml
yomimono has quit [Ping timeout: 250 seconds]
maattdd has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Quit: Leaving.]
Simn has joined #ocaml
hexo has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
typedlambda has joined #ocaml
toroidalcode has quit [Ping timeout: 260 seconds]
pyon has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
pgomes has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
pgomes has left #ocaml [#ocaml]
ygrek has quit [Ping timeout: 255 seconds]
cago has joined #ocaml
natrium1970 has joined #ocaml
<natrium1970>
What is the purpose of the ‘a. in let const : ‘a ‘b. ‘a -> ‘b -> ‘a = fun x y -> x ?
<natrium1970>
In the REPL, I get the same type, ‘a -> ‘b -> ‘a with or without the ‘a ‘b.
mbac has quit [Ping timeout: 260 seconds]
BitPuffin has joined #ocaml
<whitequark>
"for all 'a and 'b, 'a -> 'b -> 'a"
<whitequark>
"'a." literally means "for all 'a"
AltGr has joined #ocaml
<natrium1970>
But I get the same result without it.
<def`>
a type constraint only ensure that the actual type is an instance of the type scheme
<def`>
const : 'a -> 'b -> 'a = fun (x : int) y -> x
<def`>
val const : int -> 'a -> int
<def`>
would be accepted, since it is an instance of 'a -> 'b -> 'a with 'a = int, 'b = 'a (ok, that's confusing, I realised only after that the top-level would rename the type variables :P)
<def`>
with the forall, you force 'a and 'b to stay variables
<natrium1970>
With or without the forall, it the REPL prints val const : 'a -> 'b -> 'a = <fun>
<def`>
Ok. Read my example.
eikke__ has joined #ocaml
<natrium1970>
I don’t understand your example. It isn’t accepted by Ocaml, or I’m not typing in the right thing.
<def`>
let const : 'a -> 'b -> 'a = fun (x : int) y -> x;;
<natrium1970>
I believe I understand that. Now where does forall come into play?
<ggole>
It's a bit unfortunate that variables in ascriptions will unify with anything :(
<natrium1970>
I’m thoroughly confused.
<def`>
natrium1970: if you want the constraint to behave as a concrete type, you have to add the forall (which are not appearing in the final type as you observed)
<natrium1970>
Can you give an example where the forall is required (and will not work without it)?
<ggole>
natrium1970: without being qualified with forall a type variable can unify with any concrete type, which is probably not what you want.
<ggole>
By adding forall you can ensure that the definition is as polymorphic as you expect it to be
<def`>
natrium1970: in my example, you have to add the forall to catch the fact that the definition is not what you expected
dsheets has joined #ocaml
<ggole>
Eg, let x : 'a = 1 will typecheck, but let x : 'a . 'a = 1 will not.
<ggole>
natrium1970: so forall is pretty much never required (for this purpose)
BitPuffin has quit [Ping timeout: 255 seconds]
<ggole>
Wait, I guess it's necessary for polymorphic recursion
<natrium1970>
In particular, the one that starts off type 'a perfect_tree =
<ggole>
Are you using Core?
<ggole>
If not, just rearrange the arguments
<natrium1970>
Oh, I guess everything on that site must assume that you are.
<def`>
yes :)
<natrium1970>
One more thing, since people here are so helpful: what does the ‘ after “const” do in “let const' (type a) (type b) (x : a) (y : b) : a = x “?
<def`>
it's just a different name
<natrium1970>
Oh, okay. Thanks.
<def`>
you can always add ' in ocaml identifiers
<ggole>
Useful for naming related versions of things f, f', f'', etc
<def`>
(it's juste incorrect at the first position because it could either be a type name 'a 'b, or a character literal 'c')
<def`>
type variable name*
bezirg has joined #ocaml
_0xAX has joined #ocaml
mfill has joined #ocaml
mfill is now known as ap0calypse
thomasga has joined #ocaml
michael_lee has quit [Quit: Ex-Chat]
thomasga has quit [Client Quit]
thomasga has joined #ocaml
yacks has quit [Ping timeout: 250 seconds]
yacks has joined #ocaml
natrium1970 has quit [Quit: natrium1970]
eikke__ has quit [Ping timeout: 240 seconds]
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
Kakadu has joined #ocaml
claudiuc has quit [Ping timeout: 246 seconds]
steshaw_ is now known as steshaw
MercurialAlchemi has joined #ocaml
steshaw has quit [Changing host]
steshaw has joined #ocaml
Arsenik has quit [Remote host closed the connection]
Arsenik has joined #ocaml
bezirg has quit [Remote host closed the connection]
ygrek has joined #ocaml
eikke__ has joined #ocaml
rand000 has joined #ocaml
Arsenik has quit [Remote host closed the connection]
hhugo has joined #ocaml
lordkryss has joined #ocaml
Arsenik has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Arsenik has quit [Remote host closed the connection]
Arsenik has joined #ocaml
avsm has quit [Quit: Leaving.]
BitPuffin has joined #ocaml
ousado has quit [Ping timeout: 240 seconds]
claudiuc_ has quit [Ping timeout: 272 seconds]
ousado has joined #ocaml
Hannibal_Smith has joined #ocaml
anddam has quit [Ping timeout: 272 seconds]
anddam has joined #ocaml
thomasga has quit [Quit: Leaving.]
Hannibal_Smith has quit [*.net *.split]
axiles has quit [*.net *.split]
_`_ has quit [*.net *.split]
vbmithr_ has quit [*.net *.split]
bcucciol1 has quit [*.net *.split]
Hannibal_Smith has joined #ocaml
bcucciol1 has joined #ocaml
vbmithr_ has joined #ocaml
axiles has joined #ocaml
_`_ has joined #ocaml
iorivur has joined #ocaml
bjorkintosh has quit [Ping timeout: 272 seconds]
sepp2k has joined #ocaml
bjorkintosh has joined #ocaml
bezirg has joined #ocaml
maattdd has joined #ocaml
Hannibal_Smith has quit [*.net *.split]
axiles has quit [*.net *.split]
_`_ has quit [*.net *.split]
vbmithr_ has quit [*.net *.split]
bcucciol1 has quit [*.net *.split]
iorivur has quit [Ping timeout: 272 seconds]
avsm has joined #ocaml
hhugo has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
bcucciol1 has joined #ocaml
axiles has joined #ocaml
_`_ has joined #ocaml
vbmithr_ has joined #ocaml
divyanshu has joined #ocaml
avsm has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 245 seconds]
fraggle__ has joined #ocaml
eizodo has joined #ocaml
_andre has joined #ocaml
fraggle__ has quit [Client Quit]
fraggle-boate has joined #ocaml
fraggle-boate has quit [Client Quit]
fraggle-boate has joined #ocaml
<bernardo1pc>
The following compiler descriptions are been DELETED: -> s/are been/have been/, no ?
<bernardo1pc>
(opam update, version 1.1.1)
pminten has joined #ocaml
iorivur has joined #ocaml
fold has quit [Ping timeout: 264 seconds]
hhugo has joined #ocaml
koderok has quit [Quit: koderok]
<ggole>
Or possibly "are being"
<bernardo1pc>
nope
<bernardo1pc>
(I mean, interpreting as the line above that says that something happened "upstream", this is "past")
samrat has quit [Quit: Computer has gone to sleep.]
ollehar has quit [Ping timeout: 272 seconds]
maattdd has joined #ocaml
dereinzige has quit [Read error: Connection reset by peer]
dereinzige has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
bytbox has joined #ocaml
<Drup>
asmanur: you really don't want to change the default keymap ? :/
<Drup>
whitequark: which part is hilarious ?
<asmanur>
:D
<whitequark>
Drup: well
<whitequark>
deriving includes code that could use deriving
badon has quit [Ping timeout: 260 seconds]
<Drup>
ah, right :D
<Drup>
well
<asmanur>
Drup: you can disable the feature if you don't want it
<Drup>
tbh, I wouldn't want to deal with a bootstraped deriving
<asmanur>
or modify the keymap
badon has joined #ocaml
<Drup>
asmanur: it doesn't change the fact that it's not a sensible default ...
<whitequark>
Drup: I wouldn't actually even need bootstrapping for ppx_deriving
<whitequark>
as long as the dependency tree is, well, tree
<Drup>
whitequark: sure
<Drup>
asmanur: also, how do I *remove* stuff from the keymap ?
<asmanur>
(define-key keymap (kbd key) nil)
<whitequark>
Drup: what is {< syntax for?
<Drup>
whitequark: {< >} is functional object update
<whitequark>
oh, right
<asmanur>
you can redefine the keymap altogether as well
<ggole>
The problem appears to be the unwind-protect in merlin-highlight
<whitequark>
Drup: what does TRY do in camlp4 grammars?
<ggole>
I'm not sure exactly how it interferes though
<asmanur>
oh right
<asmanur>
C-g kills the unwind-protect but does not go higher ?
<whitequark>
eh. I'll just try some yoloengineering
<Drup>
whitequark: I suppose it's an option ?
<ggole>
C-g should trigger the code in the unwind-protect
<Drup>
"do that, if it doesn't work, do this other thing" ?
<asmanur>
yes
<asmanur>
so C-g is not caught by the keymap
<whitequark>
hrm
<ggole>
But it should propagate to be a command, too, ending the scope of the temporary overlay keymap.
<Drup>
whitequark: I'm not a camlp4 expert at all
<ggole>
That doesn't seem to happen though.
<Drup>
(in fact, I really dislike the parser technique used by camlp4)
<asmanur>
ggole: no i don't think so
<asmanur>
when you press C-g inside when executing a unwind-protect
<asmanur>
probably the keymap of the buffer does not matter
<ggole>
...hmm
<asmanur>
the unwind protect is exactly used to do that
<asmanur>
(if you remove it, then the overlay does not disappear on C-g)
<ggole>
If you remove it and unconditionally execute the code there, you mean?
<asmanur>
yes
<ggole>
Right.
ollehar has joined #ocaml
<ggole>
But C-g should not skip the code in an unwind-protect.
<ggole>
Unless there's special handling for it, maybe.
<asmanur>
no it does not skip it
<asmanur>
but it's consumed there
<ggole>
That's a bit surprising.
<asmanur>
yes
<asmanur>
and there's no way to tell whether we delete the overlay because sit-for exited or C-g was pressed
<asmanur>
(well we could use a var but it's a bit ugly)
<ggole>
Hmm, might be doable with condition-case
<ggole>
Still ugly but locally ugly.
<whitequark>
Drup: deriving tests don't run
<whitequark>
make: *** No rule to make target 'bimap.mli', needed by 'bimap.cmi'. Stop.
<Drup>
pffr x)
Thooms has joined #ocaml
* whitequark
groans
philtor has joined #ocaml
<ggole>
asmanur: that works, but throwing quit again doesn't actually help :/
<asmanur>
arf
Anarchos has joined #ocaml
BitPuffin has joined #ocaml
<ggole>
I'm beginning to think that there is a bug or missing part of the design in set-temporary-overlay-map
<ggole>
What does it do in the presence of a signal? I think it just continues, which is not what we want.
<whitequark>
Drup: oh. ocsigen/deriving, not jaked/deriving
<Drup>
oh yeah
<Drup>
you were looking at the wrong one ?
<whitequark>
yes
<Drup>
I have the memory of telling you something about one of your fork, who was the actual official repository
<Drup>
"you should make it a standalone repository and replace the previous one"
<Drup>
you told me "naah, but people are used to forking, they won't get it wrong"
<Drup>
well :)
<ggole>
...but why does it work the first time? O_o
<whitequark>
Drup: the problem would be exactly same
<asmanur>
ggole: :D
<asmanur>
are you sure the signal is getting to the overlay map ?
<ggole>
Well, signals are not really key bindings
<ggole>
Hitting C-g is pretty much the same as (signal 'quit ())
<ggole>
OK, I have a snippet of merlin independent code that reproduces the problem. I gotta hit the hay, but I'll ask about it on the emacs mailing list tomorrow.
<asmanur>
great, thanks!
<ggole>
o/
ggole has quit []
_andre_ has quit [Quit: leaving]
Hannibal_Smith has quit [Quit: Sto andando via]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 246 seconds]
ollehar has quit [Quit: ollehar]
rand000 has quit [Quit: leaving]
avsm has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
avsm has quit [Client Quit]
badon has quit [Ping timeout: 240 seconds]
S11001001 has quit [Read error: Connection reset by peer]
S1100100` has joined #ocaml
lgm has quit [Ping timeout: 260 seconds]
S1100100` is now known as S11001001
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
Arsenik has quit [Remote host closed the connection]
bjorkintosh has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
<whitequark>
raise (Underivable ("deriving: types called `a' are not allowed.\n"
<whitequark>
lol what
bjorkintosh has joined #ocaml
cdidd has quit [Ping timeout: 250 seconds]
<dmbaturin>
Why this name should be bad?
<whitequark>
I have no idea
<bytbox>
It seems that if I have module type S;; module type T = functor (M : S) -> sig end;; I cannot then write module type U = T(My_S). Am I missing the obvious?
<bytbox>
I should think this would be possible, as a natural extension of doing the same thing with modules.
<Drup>
bytbox: why would be My_S an instance of the module type S ?
<bytbox>
Drup: sorry, that was supposed to be implicit. In this case, My_S is an instance of module type S.
BitPuffin has joined #ocaml
<Drup>
ok, it's a very partial copy paste
<Drup>
I had this issue recently
<bytbox>
Drup: haha, closer to exposition. I'd be happy to put up a pastebin if that's preferred
rgrinberg has quit [Quit: Leaving.]
<Drup>
the solution is to do "module type Foo = functor (M : S) -> sig module type T = .... end
<Drup>
and then call Foo(My_S).T
cdidd has joined #ocaml
<Drup>
(solution provided by our local moderatly experienced ocaml, def`)
<Drup>
ocamler*
<bytbox>
huh. Is that just a hack around a compiler bug, or is there a fundamental reason that this /should/ be necessary?
<Drup>
I think it's just a weird syntax restriction
<bytbox>
blargh
<bytbox>
ok, thanks
badon has joined #ocaml
<Drup>
basically, Foo(Bla) is not a valid syntax for a module type
<bytbox>
one wonders why it can't be made so :)
<Drup>
probably because no one bothered.
Algebr` has quit [Ping timeout: 264 seconds]
Nahra` has joined #ocaml
puzza007_ has joined #ocaml
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
esden has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 260 seconds]
strmpnk has quit [Ping timeout: 260 seconds]
jrw has quit [Ping timeout: 260 seconds]
hexo has quit [Ping timeout: 260 seconds]
gperetin has quit [Ping timeout: 260 seconds]
puzza007 has quit [Ping timeout: 260 seconds]
jennmoneydollars has quit [Ping timeout: 260 seconds]
ggherdov has quit [Ping timeout: 260 seconds]
freling has quit [Ping timeout: 260 seconds]
jennmoneydollars has joined #ocaml
strmpnk_ has joined #ocaml
Nahra has quit [Remote host closed the connection]
demonimin has quit [Read error: Connection reset by peer]
gperetin has joined #ocaml
badon_ has joined #ocaml
puzza007_ is now known as puzza007
jrw has joined #ocaml
hexo has joined #ocaml
demonimin has joined #ocaml
freling has joined #ocaml
badon has quit [Ping timeout: 245 seconds]
badon_ is now known as badon
esden has joined #ocaml
ggherdov has joined #ocaml
maattdd has joined #ocaml
<whitequark>
Drup: ahahaha, I typed Camlp4.PreC and invoked ocp-index
maattdd has quit [Ping timeout: 240 seconds]
<Drup>
poor ocp-index
<Drup>
he doesn't deserve this
<whitequark>
I need to vent somewhere about how much I hate camlp4, but none of you deserve this
* whitequark
opens cat >/dev/null
jbrown has quit [Remote host closed the connection]
strmpnk_ is now known as strmpnk
<whitequark>
hm, I fixed it, but broke eliom
omqal has joined #ocaml
Superpelican_ has joined #ocaml
Superpelican_ has quit [Client Quit]
<Drup>
ahah xD
claudiuc has joined #ocaml
jbrown has joined #ocaml
<Anarchos>
whitequark why do you hate it ?
<whitequark>
Anarchos: do you really want me to start
englishm has quit [Remote host closed the connection]
<Anarchos>
whitequark well i don't like macros preprocessor in general, but is it somehting specific with camlp4 ?
<whitequark>
YES IT IS
jao` has quit [Ping timeout: 255 seconds]
englishm has joined #ocaml
<Drup>
x)
<whitequark>
tl;dr how the fuck does it even work and how come someone thought that making the whole ecosystem depending on a completely incomprehensible parsing solution that no one except the people who wrote it understands
iorivur has joined #ocaml
<whitequark>
is a good idea
<whitequark>
the signature for Camlp4 is about 18,000 lines long
<Drup>
(whitequark: hint : it's the same guy who wrote ocamlbuild)
<whitequark>
if you try to make toplevel write it down, it chugs away for several minutes