<Khady>
Is there something to do add except the `no-alias-deps` flag?
lopex has joined #ocaml
Haudegen has joined #ocaml
mort___ has joined #ocaml
yomimono has joined #ocaml
<mort___>
quick opam questin - can i pin to a specific git commit? (and if so, how? :)
<Drup>
opam pin add <name> <repo>#<tag>
<mort___>
ta
<Drup>
(tag being anything adressable in git, so a branch, a commit, ..)
sepp2k has joined #ocaml
FreeBirdLjj has joined #ocaml
jabesed has quit [Ping timeout: 240 seconds]
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
netrobyatmobile has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
Simn has joined #ocaml
BitPuffin has joined #ocaml
ely-se has quit [Quit: leaving]
igoroliveira has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
ely-se has joined #ocaml
freehck has quit [Ping timeout: 240 seconds]
Sorella has joined #ocaml
rgrinberg1 has joined #ocaml
dsheets has joined #ocaml
rgrinberg1 has quit [Ping timeout: 250 seconds]
ryanartecona has joined #ocaml
accname has quit [Ping timeout: 240 seconds]
igstan has joined #ocaml
yomimono has joined #ocaml
charpi has joined #ocaml
igstan has quit [Quit: igstan]
rgrinberg1 has joined #ocaml
larhat1 has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
ceryo has joined #ocaml
<Leonidas>
I thing this is called a 'commitish' in git lingo.
<Leonidas>
*think
* Leonidas
was super surprised by function names containing the word "don't"
<Leonidas>
turns out this is completely valid but feels strange
<Leonidas>
let o'caml = 42;;
freehck has joined #ocaml
<python476>
talking about ocaml, I have some exercises to finish
<Enjolras_>
Leonidas: this is mostly useful at the end of identifier
<flux>
and even more useful when you have derivates of a function ;-)
<Enjolras_>
Leonidas: let f' = id in let f x = f' @@ fst x
<Enjolras_>
stuffs like this
<companion_cube>
+1
<companion_cube>
gah, design choices
<companion_cube>
I have like 3 ou 4 slightly different versions of the same AST
<Leonidas>
Enjolras_: yes, I've seen this often, but seeing it inside an identifier and not at the end has still surprised me
<companion_cube>
and I'd like not to duplicate all the code around them, but it's *hard*
<Leonidas>
but I use a language that has "-" inside identifiers, so whatever :-)
<Enjolras_>
add GADT's
<python476>
Leonidas: and * around ?
<Enjolras_>
let a-b = a - b :D
<flux>
or do it like sql. you can use anything as an identifier, as long as it's in double quotes
<flux>
let "B subtracted from A" = a - b
<Leonidas>
python476: yes.
<Leonidas>
*?*, completely valid.
<python476>
I love that fact too
<Leonidas>
Enjolras_: yes, I always wanted a language where a-b would be a valid name and a - b subtraction.
<Enjolras_>
flux: sql doesn't allow anything. Only ascii
<Enjolras_>
at least not mysql
ryanartecona has quit [Quit: ryanartecona]
<companion_cube>
Enjolras_: I tried, it works but it's TERRIBLE
<companion_cube>
so many type annotations and magic
<companion_cube>
I'd like something that can be maintained by a human being
<ggole>
companion_cube: living with duplication vs removing it with ugly machinery is always a nice choice to have to make
<companion_cube>
yay
<companion_cube>
I'm going to try the `private alias + views` route
<Enjolras_>
as someone told me recently, there is a DRY department in hell
<flux>
enjolras_, well, ie. newlines are fair play in PostgreSQL
<Enjolras_>
newline is in ascii set :)
<flux>
well, ä isn't ;-)
<companion_cube>
maybe the DRY department is in competition with the GADT department
<ggole>
GADT can lead to code duplication of its own, too
<companion_cube>
did I mention the fact that GADTs make the type parametric, which prevents me from using first-class modules?
<Enjolras_>
companion_cube: it's the same
<flux>
enjolras_, select * from "☃"; works just fine ;)
<companion_cube>
gah this is so annoying
sepp2k has joined #ocaml
<ggole>
companion_cube: what's different about the ASTs?
<companion_cube>
every time I remove one case, out of roughly 10
<companion_cube>
yay
<ggole>
Oh, that problem. Right.
<ggole>
There's no good solution for this in OCaml as far as I know.
<companion_cube>
yes, I know, but I'm still looking for one -_-
<companion_cube>
so far I've thought about: 1/ GADT 2/ polymorphic variants 3/ private aliases
<companion_cube>
(+ views)
<companion_cube>
I didn't consider the visitor pattern though
<ggole>
4/ assert false
<companion_cube>
yeah, but that makes me a sad panda
larhat1 has quit [Quit: Leaving.]
<ggole>
I don't disagree, but I also don't think the other choices are much better.
<companion_cube>
I'm wondering, too
<companion_cube>
or maybe, make very very local views
<companion_cube>
I mean, use the all-cases type everywhere but have a view that hides the `assert false` away
<ggole>
Seems like the machinery would outweigh any possible benefit?
<companion_cube>
that one's pretty lightweight, actually
<companion_cube>
funny, there's a burst of activity on batteries, after months of silence
<ggole>
Then maybe I'm thinking of something a bit different.
kushal has joined #ocaml
<companion_cube>
all that for 30-something `assert false`
<companion_cube>
maybe I should forget this
mort___ has quit [Quit: Leaving.]
accname has joined #ocaml
mort___ has joined #ocaml
<companion_cube>
haha such hack
<groovy2shoes>
what'd you wind up with?
<ggole>
Obj.magic to get the type indices you want?
<companion_cube>
nah
* ggole
relived/disappointed
<companion_cube>
I'm trying the "private alias + view for each AST"
<ggole>
Er, relieved
<companion_cube>
but because I don't want to copy module types everywhere just to remove a few things in them, I'm going to hide stuff by changing their type to [`Not_available]
<ggole>
Ah, that is a bit untidy.
<companion_cube>
say I have 9 cases out of 10; the function that builds the 10-th case will now be of type [`Not_available], because this way I don't have to copy the 9 other types
<companion_cube>
:D
<groovy2shoes>
ah
<companion_cube>
that's not so ugly after all
<groovy2shoes>
it might be a bit untidy, but I'd argue it's less untidy than copy+pasting a bunch of AST code
<companion_cube>
yes, especially because the code to copy-paste includes printing, substitutions, smart constructors, etc.
<companion_cube>
don't want to copy the 40 or 50 function signatures to remove one constructor
jeffmo has quit [Quit: jeffmo]
<ggole>
assert false doesn't have that problem ;)
<ggole>
But it probably does make you itch a bit.
MercurialAlchemi has quit [Ping timeout: 240 seconds]
libertas has joined #ocaml
jimt has quit [Ping timeout: 240 seconds]
<libertas>
Hi, I need some help. I'm doing a MOOC on Ocaml and have to find the minimum integer for an array. We have not learned yet about the head :: tail construct, so I'm trying to pass elements in a recursive way, but I'm not able to do this in a functional way
<dmbaturin>
^elyse^: Apparently it does. There is no separate package for it.
<^elyse^>
I can't wait to program in OCaml. :D
<dmbaturin>
groovy2shoes: To my understanding, the only thing it absolutely needs from cygwin is the assembler. It probably can be replaced with the assembler from mingw.
SomeDamnBody has joined #ocaml
<SomeDamnBody>
I can't pin packages locally
contempt has quit [Ping timeout: 272 seconds]
<SomeDamnBody>
whenever I try I get: Synchronizing with <local directory> Your request can't be satisfied <package> is not available because the package is pinned to
<SomeDamnBody>
so I don't know what to do
contempt has joined #ocaml
ryanartecona has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
jeffmo_ has joined #ocaml
<SomeDamnBody>
nevermind a dependency was pinned that didn't match the new dependency needs for the to be pinned package
Haudegen has joined #ocaml
jeffmo has quit [Ping timeout: 260 seconds]
jeffmo_ is now known as jeffmo
ryanartecona has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 250 seconds]
nullcatxxx_ has joined #ocaml
orbifx has joined #ocaml
ryanartecona has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
sepp2k has quit [Quit: Leaving.]
Kakadu has joined #ocaml
ygrek has joined #ocaml
pierpa has joined #ocaml
jeffmo has quit [Ping timeout: 246 seconds]
jeffmo has joined #ocaml
rgrinberg1 has quit [Read error: Connection reset by peer]
rand has joined #ocaml
<^elyse^>
I'll write a parser today probably
<^elyse^>
got the AST sorted out
^elyse^ has quit [Quit: Leaving]
Guest38 has quit [Read error: Connection reset by peer]
kushal has quit [Quit: Leaving]
raphaelss has joined #ocaml
larhat1 has quit [Quit: Leaving.]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has quit [Ping timeout: 240 seconds]
Algebr has joined #ocaml
^elyse^ has joined #ocaml
freehck has quit [Remote host closed the connection]
<Algebr>
Don't remember if I asked this before, how can I do mutally recurisve classes? class foo = object method thing : bar end and class object bar method g : foo end
fleaswallow has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<ggole>
class foo = object method f = 0 end and bar = object method g = 1 end
octachron has quit [Quit: Leaving]
ggole has quit []
<^elyse^>
Can I get Menhir to tell me more about conflicts than just their existence?
accname has joined #ocaml
<thizanne>
menhir --explain
zpe has quit [Remote host closed the connection]
rgrinberg1 has joined #ocaml
<thizanne>
and then you have a yourfile.conflicts file
<Algebr>
ggole: Ah! thank you, didn't realize i didn't need the extra class keyword
<Algebr>
but its makes sense
larhat1 has joined #ocaml
larhat1 has quit [Remote host closed the connection]
larhat1 has joined #ocaml
ncthom91 has joined #ocaml
nullcatxxx_ has joined #ocaml
python476 has quit [Ping timeout: 246 seconds]
jeffmo has quit [Quit: jeffmo]
accname has quit [Ping timeout: 240 seconds]
<Algebr>
Why do methods not have as strong type inference abilities as plain functions
ril has joined #ocaml
orange8` has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
<def`>
inference of higher rank polymorphism is not decidable afaik
<def`>
and more practically, not principal
<^elyse^>
thizanne: yes that helped thanks! <3
orbifx1 has joined #ocaml
tristero has quit [Ping timeout: 244 seconds]
mfp has joined #ocaml
jeffmo has quit [Quit: jeffmo]
jeffmo has joined #ocaml
<^elyse^>
woo, my parser compiles
<^elyse^>
time to ship it!
jeffmo has quit [Client Quit]
jeffmo has joined #ocaml
grapevines has joined #ocaml
<grapevines>
test
<companion_cube>
parser for what language?
MercurialAlchemi has quit [Ping timeout: 264 seconds]
grapevines has quit [Client Quit]
sapotecharts has joined #ocaml
<sapotecharts>
Any easy way that I can fix this error with an argument to the interpreter?
<sapotecharts>
Error: This expression has type (int option -> 'a) -> (int option -> 'a array -> 'a) -> 'a as 'a but an expression was expected of type
<sapotecharts>
(int option -> 'a) -> (int option -> 'a array -> 'a) -> 'a as 'a
<sapotecharts>
vs (int option -> bool) -> ('c option -> 'b array -> bool) -> bool as 'b
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube>
this type is weird
<sapotecharts>
Yeah it's weird, but it is okay, I am doing stuff with Scott encoded data.
<companion_cube>
a problem, here, is that you would have to unify bool with 'b
<companion_cube>
but then that would make bool equal to a function type...
<sapotecharts>
Can't I just tell the type system to be quiet?
<companion_cube>
oh :D
<companion_cube>
not really, no
<companion_cube>
you can use -rectypes to weaken it a little
<companion_cube>
(careful with the nontermination in t he typechecker, then)
<^elyse^>
companion_cube: one I'm working on
<^elyse^>
companion_cube: about the binary size
<companion_cube>
oh wait, isn't it Emily or something like this?
<^elyse^>
currently I have AST and parser, and it's 300 kB
<^elyse^>
so that's quite reasonable
mfp has quit [Ping timeout: 260 seconds]
jeffmo has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ocaml
sapotecharts has quit [Quit: Page closed]
^elyse^ has quit [Quit: Leaving]
jeffmo has joined #ocaml
^elyse^ has joined #ocaml
Algebr has quit [Remote host closed the connection]
orange8` has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dmbaturin>
companion_cube: mcc's Emily is dynamically typed AFAIR.
<dmbaturin>
I should look into it again now when she doesn't make design changes every day. :)
ncthom91 has joined #ocaml
orange8` has joined #ocaml
lobo has quit [Quit: leaving]
jeffmo has quit [Ping timeout: 255 seconds]
jeffmo has joined #ocaml
orange8`` has joined #ocaml
mac10688 has joined #ocaml
wolfcore has quit [Ping timeout: 240 seconds]
orange8` has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
ygrek has joined #ocaml
wolfcore has joined #ocaml
nullcatxxx_ has quit [Read error: Connection reset by peer]
<^elyse^>
what is Emily?
<^elyse^>
also eww dynamic typing!
wolfcore is now known as Guest95941
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orange8`` has quit [Quit: ERC (IRC client for Emacs 24.5.1)]