Kakadu has quit [Remote host closed the connection]
cdidd has quit [Ping timeout: 248 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AltGr has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
johnf has joined #ocaml
jeffmo has quit [Quit: jeffmo]
cdidd has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
foolishmonkey has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
darkf has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
hanshenrik_ has quit [Ping timeout: 276 seconds]
lokien_ has quit [Quit: Connection closed for inactivity]
yunxing has quit [Remote host closed the connection]
kansi has joined #ocaml
musha68k has quit [Remote host closed the connection]
manizzle has quit [Remote host closed the connection]
Philippa has joined #ocaml
<Philippa>
'lo. Does ocaml have an equivalent of haskell's newtype or is that something to pull off via the module system instead?
struk|desk|away is now known as struk|desk2
<aantron>
equivalent in what sense? you can do type foo = Foo of bar
<Philippa>
yeah. Is it also performance-equivalent?
<Philippa>
in Haskell, newtypes don't cost anything at runtime
<aantron>
true, and no
<aantron>
you would need the module system and abstract or private types for that, yes
<aantron>
at least, if they become performance-equivalent, it is an optimization i have not yet heard of
<Philippa>
*nod* fair, and thanks
darkf has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
johnelse has quit [Ping timeout: 248 seconds]
copy` has quit [Quit: Connection closed for inactivity]
johnelse has joined #ocaml
johnelse is now known as Guest65846
struktured has joined #ocaml
manizzle has joined #ocaml
malc_ has joined #ocaml
struk|desk2 is now known as struk|desk|away
<def`>
aantron: they won't until float array are removed
<def`>
that is very likely to happen after, but the former is less sure
<aantron>
def`: curious, can you elaborate?
<aantron>
i know about the special treatment of float arrays, but im interested in how this is related
xaimus has quit [Ping timeout: 244 seconds]
xaimus has joined #ocaml
darkf has quit [Ping timeout: 244 seconds]
kushal has joined #ocaml
darkf has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 244 seconds]
<malc_>
hmmm.. ocaml is lgpl now, was it ever discussed somewhere?
darkf_ is now known as darkf
Philippa has left #ocaml ["Leaving"]
MercurialAlchemi has joined #ocaml
<def`>
aantron: asap, but I am busy right now
Sorella has quit [Quit: Connection closed for inactivity]
malc_ has quit [Ping timeout: 255 seconds]
malc_ has joined #ocaml
malc_ has quit [Quit: leaving]
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
MercurialAlchemi has quit [Ping timeout: 240 seconds]
yunxing has joined #ocaml
MercurialAlchemi has joined #ocaml
alexst has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
alexst has quit [Ping timeout: 250 seconds]
ril has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axiles has quit [Remote host closed the connection]
axiles has joined #ocaml
antkong_ has quit [Quit: antkong_]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
yunxing has quit [Ping timeout: 240 seconds]
antkong has joined #ocaml
adelbertc has joined #ocaml
aantron has quit [Remote host closed the connection]
antkong has quit [Read error: Connection reset by peer]
adelbertc has left #ocaml [#ocaml]
Simn has joined #ocaml
butts_butts has joined #ocaml
dariol has joined #ocaml
larhat has joined #ocaml
malc_ has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
hanshenrik_ has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
tg is now known as tg`
copy` has joined #ocaml
rand__ has joined #ocaml
kushal has joined #ocaml
keep_learning has joined #ocaml
octachron has joined #ocaml
Haudegen has joined #ocaml
lordf has joined #ocaml
sepp2k has joined #ocaml
sp1 has joined #ocaml
julien_t has joined #ocaml
warp has joined #ocaml
warp_ has joined #ocaml
warp has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
regnat has quit [Quit: WeeChat 1.4]
regnat has joined #ocaml
malc_ has quit [Ping timeout: 250 seconds]
malc_ has joined #ocaml
regnat has quit [Quit: WeeChat 1.4]
regnat has joined #ocaml
regnat has quit [Client Quit]
regnat has joined #ocaml
lokien_ has joined #ocaml
_andre has joined #ocaml
silver has joined #ocaml
jwatzman|work has joined #ocaml
bacam_ is now known as bacam
Kakadu has joined #ocaml
AltGr has left #ocaml [#ocaml]
Guest65846 is now known as johnelse
johnelse is now known as Guest85183
dhil has joined #ocaml
nojb has joined #ocaml
sp1 is now known as orbifx
nojb has quit [Client Quit]
nojb has joined #ocaml
<malc_>
hola nojb
<malc_>
tag, bonjour etc..
<nojb>
How do I convince opam to install a package without checking its dependencies ?
<nojb>
hi
<malc_>
nojb: no cabal hell you say.. right
<Drup>
nojb: "opam pin add -e <foo>.<version>
<Drup>
then modify the opam file however you want
<Drup>
malc_: you're a very optimistic person, aren't you ? :D
<nojb>
Drup: does this require to pin <foo> first ?
<malc_>
Drup: must confess - was called Eeyore a few times
<Drup>
nojb: yes
<Drup>
you can't just ignore dependencies
<Drup>
so your only solution is to pin something, edit the opam file and remove the dependencies
<Drup>
and, more preferably, fix the upstream package ...
<malc_>
therein lies patch to madness
<Drup>
malc_: I fail to see how, we can still remove packages ~~
<nojb>
Thanks Drup, this works fine
tg has joined #ocaml
<malc_>
Drup: sorry, it's just that anything thar requires this kind of voodoo is a no go for me
<Drup>
malc_: it doesn't
<Drup>
I have no idea what nojb is doing, but I never had to do that. Sometimes you report bug about the constraints upstream, that's normal, it happens, but I never had to ignore dependencies
rand__ has quit [Ping timeout: 240 seconds]
tg` has quit [Quit: leaving]
<Drup>
Actually, do you even use opam ? :)
<malc_>
nope
<nojb>
Drup: trying to install a package with dependencies which are available in the system, just not within opam
<Drup>
malc_: So you have no idea how good it is. ;)
<malc_>
Drup: i have pretty good idea how BAD it is
<malc_>
i'm not usin_G_ it
<malc_>
i've given it a try
<malc_>
and figured it's not for me
lmaury has joined #ocaml
Nairwolf has quit [Read error: Connection reset by peer]
Armael has joined #ocaml
<malc_>
nojb: osx is hell on earth, i've succeeded in building stuff using your recipe, but running it (even with XQuartz) is beyond my abilities (even hough i've obviously succeeded in that in the past (brew method))
Guest85183 is now known as johnelse
<nojb>
malc_: yes, there is still some way to go :)
spip has joined #ocaml
spip has left #ocaml ["Konversation terminated!"]
<nojb>
malc_: I am confident things can be improved
<nojb>
malc_: we just need to have some patience :)
<malc_>
nojb: i'm not sure that opam is the way to improve things :)
<malc_>
heh, yeah
silver_ has joined #ocaml
rand__ has joined #ocaml
silver has quit [Ping timeout: 250 seconds]
johnelse has quit [Quit: leaving]
johnelse has joined #ocaml
<orbifx>
I wasn't to download a package to edit it before installing it with opam.
<orbifx>
I'm using `opam add ..`
<orbifx>
but it doesn't actually download the files
<orbifx>
Any suggestions?
antkong_ has joined #ocaml
darkf has quit [Quit: Leaving]
<edwin>
opam source can be used to download it
<orbifx>
thanks edwin
<orbifx>
does anyone know if sexplib.syntax has been deprecated or if not, how it's installed?
alexst has joined #ocaml
Armael has left #ocaml ["WeeChat 1.3"]
slicefd has joined #ocaml
alexst has quit [Ping timeout: 250 seconds]
<Kakadu>
orbifx: Did you succeed yesterday?
<Drup>
orbifx: there is mail about that on the caml list
<orbifx>
Drup: which list? users? devs?
<orbifx>
Kakadu: no, I sourced the package now and experimenting with changing the build parameters
<Drup>
companion_cube: it suffers a lot from over-parens
<companion_cube>
yes, slightly
<companion_cube>
I need some precedence level
<Drup>
I think you should remove the ` too
<companion_cube>
no, it helps delimiting where the terms are
<Drup>
You could use another convention (the term is always after the foo:\n)
<companion_cube>
meh, I have many kinds of debug messages and there's not always a newline
<companion_cube>
anyway, colors are ✔
<Drup>
Not enough colors :p
<companion_cube>
yes, I've only started
<companion_cube>
but tags are nice for that
<Drup>
You could also use colors instead of `
<orbifx>
companion_cube: I think you are missing some font file :P
<companion_cube>
really? maybe it's fira which doesn't have enough chars
JacobEdelman_ has quit [Quit: Connection closed for inactivity]
* orbifx
is making a joke on how that screenshot has only symbols (as is the correct font file wasn't loaded)
<Drup>
companion_cube: Also, put the /2 next to idents in another color, like gray, so you can glance past it when reading the formula.
<Drup>
It's a useful trick to keep numbers on ident but still make them decently readable
<Drup>
(When I did something like that, I was using the numbers like ₁₂... for that)
<Drup>
(It was nice too)
<companion_cube>
heh
<companion_cube>
I could do that indeed
<companion_cube>
niiice indeed
<companion_cube>
(I only had to change 1 printer ♥)
th5 has joined #ocaml
<Drup>
:)
<companion_cube>
otoh I'll have to disable colors to pipe into files now
Haudegen has joined #ocaml
<Drup>
Or you auto-detect terminal capabilities
<companion_cube>
annoying...
<Drup>
not that much
<Drup>
(and you can do it inside CCFormat)
julien_t has joined #ocaml
<companion_cube>
I'll provide both and only use colors in debug
<companion_cube>
but thanks for the idea
shinnya has joined #ocaml
jeffmo has joined #ocaml
pierpa has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
rossberg has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
alexst has joined #ocaml
alexst has quit [Ping timeout: 255 seconds]
<orbifx>
how can I add a let statement in a function when it's written like: let xyz = function | .. -> .. | .. -> ... ?
<aantron>
if you want to add it before function, you have to turn it into a match expression
<aantron>
let expression*
<aantron>
instead of statement
malc_ has joined #ocaml
<orbifx>
yes sorry
<orbifx>
too long in the imperative camp :P
<ggole>
Either add an argument and match after the let, or write the function ... after the let
<ggole>
eg, let f x = let y = x + 1 in function ... or let f x a = let y = x + 1 in match a with ...
<orbifx>
do these different approaches have any conceptual significance?
<ggole>
Not really. Adding an argument may result in more efficient code.
<orbifx>
how so?
<ggole>
Calling a function with the "expected" number of arguments avoids closure construction
<ggole>
If you have let f x = let ... in function ..., the expected number of arguments (from the compilers perspective) may differ from the programmer's expectations
<orbifx>
i see
<orbifx>
thanks ggole and aantron
<ggole>
This is a little flaky because ML functions are technically all unary
<orbifx>
ok
<orbifx>
something else I noticed
<orbifx>
and want to confirm it
<orbifx>
If i have a mutable value and bind it with let (i.e. let x = some_mutable ) will x be "fixed" to value of the mutable at the time, or does it bind to the refence?
<orbifx>
cause given what I just noticed it seems to bind to the value at the time.
<aantron>
what is a mutable value? a reference?
<aantron>
or the value of a mutable record field?
<aantron>
the answer depends on that question, and asking it should also tell you what x binds to
<ggole>
Bindings are always immutable
<ggole>
But they can refer to ("point to", if you like) mutable things
<ggole>
So x is always fixed to point to a particular mutable thing
<orbifx>
Yes, they are immutable, but do they bind to the value or the refence when the binding involves a mutable value?
<aantron>
orbifx: ocaml doesnt have "mutable variables"
<aantron>
thats why you are asked to say what is going on
<orbifx>
aantron: should i be saying mutable references?
<aantron>
sorry mutable values
<aantron>
no, can you give the scenario you are asking about?
emikonia has joined #ocaml
<aantron>
if you bind x to a reference, it is that reference. if you alter !r, !x will be altered
<ggole>
I'm not sure what you mean by the "value or the reference"
<ggole>
OCaml values are pretty well defined. If you have let x = <expression>, x will be bound to the value produced by the expression.
<ggole>
That value might be a reference cell, or another mutable object.
<orbifx>
I have a type field which holds an object. If I call the let binding before the instatiation the code crashes. If I put the let binding to that object inside the function and it get called later, it's fine.
<orbifx>
Which led me to believe that the binding is binding to the value of the mutable at the point, rather then a mutable itself.
<aantron>
orbifx: there are no "mutables" in OCaml
<aantron>
there are 1. references, 2. mutable record fields (in fact 1 is a record with a 2), 3. a few data structures with mutable semantics
<aantron>
is this "type field" a mutable field of a record that you update after binding its value in a let-expression?
<ggole>
let bindings have no special rule for mutable things
<orbifx>
aantron: yes it is.
dhil has quit [Ping timeout: 248 seconds]
<aantron>
ok, then the answer is the variable in the let-expression is bound to the value that was in the field at the time the let-expression is evaluated
<orbifx>
hurray :P we got there :P
<aantron>
if you then update the record field, it affects the record, not the value that was seen in the past
<orbifx>
i figured this out but wanted a confirmation.
<aantron>
if you had bound a variable in a let-expression to the *record* itself, you could access the updated value through that bound variable
<orbifx>
is that by adding a ! ?
<orbifx>
prepending, even... ?
<orbifx>
let x = !record.field; ?
<ggole>
You use ! when you want to get the contents of a ref cell
<aantron>
no, if you have "let record = {mutable n : int}"
<aantron>
i mean
<ggole>
And not otherwise
<aantron>
damn thats messed up what i just wrote
<aantron>
its a chimera between a type definition and a value. but lets just proceed because you can figure it out :)
<aantron>
you would write let x = record, then x.n to access the mutable field
<aantron>
and as ggole said
<aantron>
if your record happens to be a reference, !r is a shorthand for r.contents
<ggole>
orbifx: ! is not special syntax or anything like that. It's just a function from reference cells to their conents.
<aantron>
the point is that it is the record that gets mutated, not the value in the record
<malc_>
# let (!) r = r.contents;;
<malc_>
val ( ! ) : 'a ref -> 'a = <fun>
<malc_>
# !(ref 10);;
<malc_>
- : int = 10
<malc_>
or let (!) {contents} = contents;;
<orbifx>
cool
<orbifx>
will take a time to memorise these
ygrek has joined #ocaml
emikonia has quit [Quit: Leaving]
rossberg has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
slash^ has joined #ocaml
butts_butts has joined #ocaml
kansi has quit [Read error: Connection reset by peer]
divyanshu has joined #ocaml
octachron has quit [Quit: Leaving]
<Kakadu>
So
<Kakadu>
do we really don't sexplib based on PPX yet?
malc_ has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
darnuria has quit [Quit: WeeChat 1.5-dev]
warp has joined #ocaml
warp has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 240 seconds]
Algebr2` is now known as Algebr
nojb has quit [Read error: Connection reset by peer]
Mandus has quit [*.net *.split]
Snark has quit [*.net *.split]
theblatte has quit [*.net *.split]
nzyuzin has quit [*.net *.split]
fold3 has quit [*.net *.split]
lukky513 has quit [*.net *.split]
ohama has quit [*.net *.split]
fds has quit [*.net *.split]
wagle has quit [*.net *.split]
dmiller has quit [*.net *.split]
jun has quit [*.net *.split]
tvaalen has quit [*.net *.split]
jerith has quit [*.net *.split]
jave has quit [*.net *.split]
luzie has quit [*.net *.split]
clog has quit [*.net *.split]
haelix has quit [*.net *.split]
nzyuzin has joined #ocaml
clog has joined #ocaml
Mandus has joined #ocaml
haelix has joined #ocaml
theblatte has joined #ocaml
Snark has joined #ocaml
fds has joined #ocaml
jun has joined #ocaml
wagle has joined #ocaml
djellemah_ has joined #ocaml
jave has joined #ocaml
lukky513 has joined #ocaml
jerith has joined #ocaml
dmiller has joined #ocaml
luzie has joined #ocaml
ohama has joined #ocaml
tvaalen has joined #ocaml
jozefg has joined #ocaml
ygrek has joined #ocaml
<jozefg>
Hey quick question: does anyone know if there's anything special to be done to make Merlin use the ppx transformations provided by sexplib?
fold3 has joined #ocaml
zoobab has quit [*.net *.split]
mj12` has quit [*.net *.split]
Madars has quit [*.net *.split]
danieli has quit [*.net *.split]
cthuluh has quit [*.net *.split]
gargawel has quit [*.net *.split]
nopf has quit [*.net *.split]
so has quit [*.net *.split]
adrien_znc has quit [*.net *.split]
jbrown has quit [*.net *.split]
eagleflo has quit [*.net *.split]
riveter has quit [*.net *.split]
asmanur_ has quit [*.net *.split]
Reventlo1 has quit [*.net *.split]
eikke has quit [*.net *.split]
mj12` has joined #ocaml
zoobab has joined #ocaml
eagleflo_ has joined #ocaml
cthuluh has joined #ocaml
so has joined #ocaml
<companion_cube>
just require the appropriate package in .merlin
gargawel has joined #ocaml
asmanur has joined #ocaml
jbrown has joined #ocaml
riveter has joined #ocaml
Reventlov has joined #ocaml
adrien_znc has joined #ocaml
lukky513_ has joined #ocaml
nopf has joined #ocaml
Madars has joined #ocaml
danieli has joined #ocaml
<jozefg>
companion_cube: Huh okay, so I should be fine with something like PKG core
<jozefg>
PKG sexplib
lukky513 has quit [Max SendQ exceeded]
<jozefg>
I seem to have made a mistake then..
<infinity0>
i have "PKG sexplib.syntax" myself
<companion_cube>
I don't know, but for me PKG ppx_deriving.std does the trick
<companion_cube>
(for instance)
jyc has quit [Ping timeout: 240 seconds]
yunxing has joined #ocaml
jyc has joined #ocaml
<jozefg>
companion_cube: interestingly adding that particular line actually causes it do something.. Thanks :)
eikke has joined #ocaml
kushal has quit [Ping timeout: 250 seconds]
Kakadu has quit [Quit: Page closed]
kushal has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
lokien_ has joined #ocaml
shinnya has joined #ocaml
ggole has quit [Ping timeout: 255 seconds]
<infinity0>
is there something in merlin/tuareg that lets me rename a variable and it'll automatically rename that in all relevant scopes (including other files, maybe?)