Guest85090 has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 250 seconds]
<Drup>
with ?
madroach has joined #ocaml
<bernardofpc>
stupid question ++ : if I have a module type that says " ... val cmp : t -> t -> int ", and then I give it "type t = float ... cmp = Pervasives.compare" , will it have been specialized ?
<companion_cube>
you need to write let cmp (x:float) y = Pervasives.compare x y
<bernardofpc>
even if the type says it is float -> float -> int ?
<bernardofpc>
but ok
<bernardofpc>
(btw, I suck at programming with compare instead of > :///)
<bernardofpc>
guess I'll make gt / ge / lt / le once and for all
<companion_cube>
you can use ocamlc -dlambda or something like this to see whether it's been specialized or not
NoNNaN has quit [Remote host closed the connection]
<companion_cube>
lt x y is like compare x y < 0
<smondet>
bernardofpc: you can always try `ocamlopt -S` to see if the code was specialized
<bernardofpc>
companion_cube: just realized that
NoNNaN has joined #ocaml
<bernardofpc>
but I did hack a bit more : let (%>) a b = compare a b > 0
<companion_cube>
heh
<bernardofpc>
(and all other three)
<bernardofpc>
reading clarity ++
<bernardofpc>
(so cool to just test the let binding with 2 %> 3 in the toplevel and realize it's the easy direction that holds)
<bernardofpc>
ok, now I have to learn hackish operator precedence to make %> bind tighter than +-*/
<bernardofpc>
(or use parends)
<Drup>
use >.
larhat has joined #ocaml
hausdorff has joined #ocaml
larhat has quit [Quit: Leaving.]
q66[lap] has quit [Read error: Connection reset by peer]
q66[lap] has joined #ocaml
<tobiasBora>
Drup: I forgot to specify in "type ('a) mytype = {record...} " the ('a) and I though during a few seconds that ocaml didn't accept "implicit types" in records ===> Stupid (or tired (or both))
BitPuffin has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 255 seconds]
<bernardofpc>
Drup: thanks
q66[lap] has quit [Read error: Connection reset by peer]
q66[lap] has joined #ocaml
sheijk_ has quit [Ping timeout: 255 seconds]
hausdorff has quit [Remote host closed the connection]
q66[lap] has quit [Read error: Connection reset by peer]
sheijk has joined #ocaml
darkf has joined #ocaml
q66[lap] has joined #ocaml
hugomg has joined #ocaml
badkins has quit []
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
sheijk has quit [Quit: .]
Trin00 has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
hugomg has quit [Quit: Leaving]
<Drup>
AltGr: do libIndex gives access to the parameters of a functor ?
<AltGr>
they're just ignored at the moment
<Drup>
ok
<AltGr>
but you get them in resolved interfaces of instances
ygrek has joined #ocaml
<Drup>
in ocp-browser, it would be interesting to show them if they are a named signature
<Drup>
(too much cluter if they aren't)
<Drup>
I could add that to the todo list
<Drup>
(since you are doing todos :D)
q66 has quit [Quit: Leaving]
<pyon>
Does Foo.mli have to be explicitly specified in calls to ocamlc?
AltGr has left #ocaml [#ocaml]
expo873 has quit [Quit: Connection closed for inactivity]
<MercurialAlchemi>
nobody expects documentation in an OCaml project!
darkf has quit [Quit: Leaving]
<MercurialAlchemi>
guess I'll dive into it when I have a bit of time
<companion_cube>
you mean, documentation of the code itself?
<companion_cube>
in this case ppx_deriving isn't even a library, I don't know what proper documentation should look like
<MercurialAlchemi>
I'm already happy to get a useful readme
<whitequark>
it has a library part and documentation for it, too
Thooms has quit [Ping timeout: 272 seconds]
badkins has joined #ocaml
dsheets_ has joined #ocaml
<MercurialAlchemi>
I see that
dsheets has quit [Ping timeout: 264 seconds]
<MercurialAlchemi>
very nice
<companion_cube>
still, waiting for opam-doc...
badkins_ has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 258 seconds]
<octachron>
I wonder : am I the only one to be distressed that in "a.{a,b}" "a,b" is not a tuple?
badkins has quit [Ping timeout: 240 seconds]
<whitequark>
should it have been {a;b} ?
<nojb>
octachron: why should it be ?
<ggole>
octachron: The x, y in Foo (x, y) isn't a tuple either
<ggole>
(If Foo is a two-arg constructor.)
<octachron>
whitequark: I think {a;b} would have meshed better with the rest of ocaml syntax.
samrat has joined #ocaml
<whitequark>
I'm not sure
travisbrady has quit [Ping timeout: 255 seconds]
<ggole>
Then it just looks like record fields instead of a tuple?
<octachron>
At least Foo(a,b,c) does not change wildly its behavior in function of the number of parameters
<octachron>
ggole: or like a list or an array
<octachron>
The semantic of ";" is already context dependent
<ggole>
Same as ,
<ggole>
I really don't see the objection, it's just like .[] and .() (but with more arguments).
<flux>
those iteration/mapping/folding functions for trees look sweet :)
ingsoc has joined #ocaml
<flux>
but what is this a.{a,b}-syntax related to?
<ggole>
It's sugar for bigarray access
<flux>
oh, that
Thooms has joined #ocaml
<flux>
but isn't it a bit like tuple in that context?-o
<ggole>
Arguments are a bit like a tuple :p
<octachron>
flux: except for the parser trickery that is used to implement a.{x}, a.{x,y}, a.{x,y,z} and a.{x,y,z,w} as completely unrelated function... yes
hausdorff has joined #ocaml
<ggole>
Completely unrelated? They're all bigarray modules.
<ggole>
And the parser trick is the same as .() and .[], which I presume you don't object to.
<Drup>
ggole: what he means is that "a.{x,y}" is not parsed as "a.{ (x,y) }".
<octachron>
After reflexion, my unease stems from the amount of special syntax introduced to support just the Bigarray module
<ggole>
So you would like to see .[] and .() extended in a similar (perhaps more uniform) way?
q66[lap] has quit [Read error: Connection reset by peer]
samrat has quit [Ping timeout: 264 seconds]
q66[lap] has joined #ocaml
samuel02 has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
<octachron>
Or to see (.{}) de-extended. And I am not sure which solution will be the more useful
typedlambda has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest61123
testcocoon has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
Guest61123 has quit [Ping timeout: 240 seconds]
slash^ has joined #ocaml
samrat has quit [Client Quit]
mcclurmc has joined #ocaml
psy_ has quit [Remote host closed the connection]
demonimin_ has joined #ocaml
demonimin_ has quit [Changing host]
demonimin_ has joined #ocaml
samrat has joined #ocaml
demonimin has quit [Ping timeout: 272 seconds]
dsheets_ has quit [Ping timeout: 250 seconds]
hausdorff has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
hausdorff has joined #ocaml
nlucaroni has joined #ocaml
hausdorff has quit [Remote host closed the connection]
circ-user-etfiX has joined #ocaml
q66[lap] has quit [Read error: Connection reset by peer]
q66[lap] has joined #ocaml
avsm has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
badkins_ is now known as badkins
<gdsfh>
(reading yesterday chat. just to clarify: I don't like camlp[45], I like revised syntax; I don't think Stream is simple and nicely done, I think it's just understandable (if one have a strong need to do it) and usable in practice.)
samrat has joined #ocaml
Thooms has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<Drup>
gdsfh: sorry for the deformation ;)
<Drup>
I must say the revised syntax is strongly associated to camlP4 in my mind, so I transmisted the taste from one to another
<flux>
I like some parts of the revised syntax, but not others
<flux>
but I suppose it's now dead. we will likely never see a better syntax for ocaml :)
<flux>
..though the whitespace thing, now that could have some promise! if it weren't dead as well ;)
<MercurialAlchemi>
there is a revised syntax?
<MercurialAlchemi>
or rather, the current syntax is the revised form?
<flux>
yes, no
hausdorff has joined #ocaml
dsheets_ has quit [Ping timeout: 250 seconds]
<MercurialAlchemi>
so it's a future syntax?
<flux>
more like alternative future syntax ;)
<flux>
it was implemented as a preprocessor with campl4
<flux>
now that campl4 is going to way of dodo, so is the revised syntax
<Drup>
and it's mandatory to use it for camlp4 extensions
<Drup>
which, personally, always takes me by surprise.
circ-user-etfiX has quit [Ping timeout: 244 seconds]
<Drup>
yes
<Drup>
you are editing a library, and suddenly, you enter the camlp4 area, and the syntax is different
manizzle has quit [Ping timeout: 255 seconds]
dsheets_ has joined #ocaml
<MercurialAlchemi>
I kind of like the revised style of constructors
<MercurialAlchemi>
mandatory else doesn't sound bad either
<whitequark>
Drup: which version is X.[] from?
<Drup>
4.02 I think
<MercurialAlchemi>
apart from that, it's not great
<companion_cube>
whitequark: hmm, a bit sad there isn't ppx_deriving.read (reverse of show, ideally)
<octachron>
whitequark: 4.02
<whitequark>
companion_cube: it's ocamlc ;D
<companion_cube>
noooes
<flux>
hmm.. here's an idea for a custom deriving plugin.. in a game, you could have records made 'debuggable, runtime-modifiable, inspectable', which would allow one to telnet to a running program, list all such values, and perform modifications on them
<whitequark>
use ppx_deriving_yojson if you want reading back
<companion_cube>
whitequark: yes, I'm probably going to use that
<whitequark>
flux: this cannot be done with the current runtime
<whitequark>
as far as I'm aware
<flux>
whitequark, why not?
kakadu has quit [Ping timeout: 246 seconds]
<whitequark>
or rather, you need custom constructors and some heavy bookkeeping, I think
<flux>
well, yes
<whitequark>
implement it :D
<flux>
:)
<flux>
maybe I will! well, some poor version of it.
<flux>
hmm, the work to make it function with objects might be a bit too big :)
<Drup>
isn't it somehow related to biniou ?
<whitequark>
ppx_deriving doesn't support objects anywhere
<flux>
;(
<whitequark>
in most places it doesn't really make much sense
<flux>
true
<whitequark>
you'll need to plug in custom printers anyway
psy_ has joined #ocaml
<flux>
perhaps it would be something completely unrelated to deriving
lordkryss has quit [Quit: Connection closed for inactivity]
<companion_cube>
ppx_inherit
<Drup>
I think it wouldn't be a deriver
<Drup>
hum, that's not biniou
<Drup>
ah, bisect, obviously !
samrat has quit [Quit: Computer has gone to sleep.]
<Drup>
basically, bisect rewrite your program by instrumenting it. it's camlp4 based but it doesn't matter much, I think, since it doesn't change the syntax
<whitequark>
it's ppx-based in fact
hugomg has quit [Ping timeout: 258 seconds]
<whitequark>
well, it has both
<Drup>
oh ? ok
<flux>
object val mutable accel : float = 0 [@@introspect] .. end and from there on it could work like magic. by using magic.
<whitequark>
bisect is probably one of the first ppx things in the wild
<Drup>
interesting
<Drup>
the opam package still needs camlP4
<whitequark>
yeah
<Drup>
did you used it ? is it nice in practice ?
<whitequark>
bisect is ok
<whitequark>
oh, its configure script support -no-camlp4
manizzle has joined #ocaml
testcocoon has joined #ocaml
octachron has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 256 seconds]
hugomg has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
arj has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
circ-user-etfiX has joined #ocaml
jonludlam has quit [Ping timeout: 256 seconds]
MrScout has joined #ocaml
arj has joined #ocaml
badkins has quit [Ping timeout: 256 seconds]
hausdorff has quit [Remote host closed the connection]
emery has joined #ocaml
arj has quit [Ping timeout: 255 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest52705
circ-user-etfiX has quit [Ping timeout: 265 seconds]
q66 has joined #ocaml
Guest52705 has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 250 seconds]
jao has quit [Ping timeout: 250 seconds]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
hausdorff has joined #ocaml
claudiuc has joined #ocaml
manizzle has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
vogler has quit [Ping timeout: 255 seconds]
q66[lap] has quit [Read error: Connection reset by peer]
badon has joined #ocaml
q66[lap] has joined #ocaml
pierpa` has joined #ocaml
arj has joined #ocaml
struk_at_work has joined #ocaml
arj has quit [Ping timeout: 264 seconds]
nojb has quit [Quit: nojb]
manizzle has quit [Ping timeout: 272 seconds]
<gasche>
ggole: your use-case is now also optimized, thanks for asking
pierpa has joined #ocaml
<gasche>
< Drup> and it's mandatory to use it for camlp4 extensions
<gasche>
it's not mandatory, it's only that it is more convenient in quotations as it is less ambiguous
<ggole>
Ooh, it's like christmas.
<ggole>
gasche: thanks, I appreciate it.
<gasche>
(the revised syntax is in many ways noticeably nicer than the classic one -- and in some ways much less pleasant)
lordkryss has joined #ocaml
circ-user-etfiX has joined #ocaml
Thooms has joined #ocaml
manizzle has joined #ocaml
<whitequark>
gasche: what use-case?
arj has joined #ocaml
<ggole>
Comparing bools with =
<flux>
is that case nicer or less pleasant?-)
<flux>
oh, it was about the optimization
<ggole>
Eg, type term = Bool of bool | ... let equal a b = match a, b with Bool a, Bool b -> a = b | ...
dsheets_ has quit [Ping timeout: 240 seconds]
arj has quit [Ping timeout: 245 seconds]
<Drup>
gasche: really ? you can write the parsers without the revised syntax O_o
<Drup>
I was convinced of the contrary :|
nojb has joined #ocaml
<mrvn>
isn't camlp4 obsolete anyway?
<mrvn>
being faded out
<Drup>
mrvn: you should be familiar with the term "legacy" :p
<mrvn>
legacy is something I still use because I'm too lazy to rewrite everything. But not something to talk about openly. :)
<nojb>
mrvn: it is not obsolete, but is hard to mantain and has been split off the main distribution. The idea is to migrate to ppx for many of its uses.
hausdorff has quit [Remote host closed the connection]
<seliopou>
is it possible to use a camlp4 parser on a string?
<Drup>
yes
<whitequark>
nojb: "obsolete" describes it pretty well.
<whitequark>
both morally and technically
<nojb>
whitequark: ok - but it still is actively mantained
<whitequark>
"actively" is not what I would call it, with all respect and no complaints whatsoever to diml
badkins has joined #ocaml
<whitequark>
e.g. it does not recognize the same syntax as 4.02
<whitequark>
half of the places for attributes are missing
octachron has joined #ocaml
hausdorff has joined #ocaml
badkins has quit [Ping timeout: 258 seconds]
badkins_ has joined #ocaml
nojb has quit [Quit: nojb]
hausdorff has quit [Remote host closed the connection]
Ptival has joined #ocaml
maurer has quit [Remote host closed the connection]
nojb has joined #ocaml
badkins_ is now known as badkins
maurer has joined #ocaml
arj has joined #ocaml
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
nojb has quit [Client Quit]
axiles has quit [Quit: Quitte]
_andre has quit [Quit: leaving]
arj has quit [Ping timeout: 256 seconds]
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
zpe has quit [Remote host closed the connection]
arj has joined #ocaml
arj has quit [Ping timeout: 244 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest5663
Guest5663 has quit [Ping timeout: 240 seconds]
ggole has quit [Ping timeout: 245 seconds]
hausdorff has joined #ocaml
ingsoc has quit [Ping timeout: 240 seconds]
nojb has joined #ocaml
tane has joined #ocaml
arj has joined #ocaml
avsm has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
arj has quit [Ping timeout: 264 seconds]
dsheets_ has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
manud has joined #ocaml
hcarty_ has quit [Ping timeout: 240 seconds]
hcarty has joined #ocaml
circ-user-etfiX has quit [Ping timeout: 250 seconds]
circ-user-etfiX has joined #ocaml
larhat has joined #ocaml
hausdorff has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
circ-user-etfiX has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
<companion_cube>
hmm, I should write ppx_deriving_bencode, actually...
zpe has joined #ocaml
manud has quit [Read error: Connection reset by peer]
manud has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
octachron has quit [Quit: Leaving]
manud has quit [Read error: Connection reset by peer]
manud has joined #ocaml
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
<whitequark>
do it
arj has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<companion_cube>
first I need to do stuff as cool as compiling my mail client
<dmbaturin>
Is it written in ocaml? ;)
<companion_cube>
no, sadly
<companion_cube>
I meant "compile the mail client I use"
<companion_cube>
so, how complicated is ppx_deriving_yojson?
<adrien>
I've got the solution: don't compile mail clients
<adrien>
use the web-based ones in the cloud
<companion_cube>
can't
<whitequark>
companion_cube: it's not
<companion_cube>
hmm.
<whitequark>
it has some weird-ass code to parse records
<whitequark>
oh god, and this horrible pun I for some reason plastered all over the code
<whitequark>
why
arj has quit [Ping timeout: 272 seconds]
jwatzman|work has joined #ocaml
arj has joined #ocaml
WraithM has joined #ocaml
ebzzry has quit [Ping timeout: 245 seconds]
manud has quit [Read error: Connection reset by peer]
arj has quit [Ping timeout: 255 seconds]
manud has joined #ocaml
manud has quit [Read error: Connection reset by peer]
manud has joined #ocaml
tane has quit [Ping timeout: 258 seconds]
cesar has joined #ocaml
cesar is now known as Guest34084
tane has joined #ocaml
tg has quit [Ping timeout: 244 seconds]
manud has quit [Read error: Connection reset by peer]
manud has joined #ocaml
Guest34084 has quit [Ping timeout: 255 seconds]
badkins has quit [Ping timeout: 272 seconds]
StevePerkins has joined #ocaml
StevePerkins has left #ocaml ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
arj has joined #ocaml
manud_ has joined #ocaml
manud has quit [Read error: Connection reset by peer]
tane has quit [Quit: Verlassend]
WraithM has quit [Ping timeout: 240 seconds]
arj has quit [Ping timeout: 264 seconds]
tg has joined #ocaml
hausdorff has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
Simn has quit [Quit: Leaving]
mcclurmc has joined #ocaml
hausdorff has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
hausdorff has joined #ocaml
cespinoza has quit [Quit: Saliendo]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 240 seconds]
btrace_ has joined #ocaml
manud_ has quit [Read error: Connection reset by peer]
manud_ has joined #ocaml
Submarine has quit [Ping timeout: 245 seconds]
btrace has quit [Ping timeout: 245 seconds]
WraithM has joined #ocaml
arj has joined #ocaml
Submarine has joined #ocaml
ebzzry has joined #ocaml
badkins has joined #ocaml
arj has quit [Ping timeout: 244 seconds]
Submarine has quit [Ping timeout: 258 seconds]
<struk_at_work>
whitequark: well what's the pun? now I have to know
ebzzry has quit [Read error: Connection reset by peer]
ebzzry has joined #ocaml
shinnya has joined #ocaml
hugomg has quit [Remote host closed the connection]