lordkryss has quit [Quit: Connection closed for inactivity]
travisbrady has quit [Quit: travisbrady]
pyon has quit [Quit: Fiat justitia ruat caelum.]
pyon has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
rand000 has quit [Quit: leaving]
q66 has quit [Quit: Leaving]
darkf has quit [Read error: Connection reset by peer]
izaak has joined #ocaml
darkf has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
matthieu has joined #ocaml
travisbrady has joined #ocaml
matthieu has quit [Ping timeout: 256 seconds]
ollehar has quit [Ping timeout: 245 seconds]
manizzle has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 250 seconds]
pyon has quit [Quit: Fiat justitia ruat caelum.]
philtor has joined #ocaml
ygrek has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
WraithM has joined #ocaml
pyon has joined #ocaml
skchrko has joined #ocaml
matthieu has joined #ocaml
darkf has joined #ocaml
matthieu has quit [Ping timeout: 256 seconds]
dapz has joined #ocaml
englishm has joined #ocaml
matthieu has joined #ocaml
matthieu has quit [Ping timeout: 245 seconds]
troutwine_away is now known as troutwine
samrat has joined #ocaml
manizzle has joined #ocaml
troutwine is now known as troutwine_away
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
travisbrady has quit [Quit: travisbrady]
jao has quit [Ping timeout: 260 seconds]
tautologico has joined #ocaml
siddharthv_away is now known as siddharthv
ousado_ has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
ousado has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tautologico has joined #ocaml
matthieu has joined #ocaml
matthieu has quit [Ping timeout: 240 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
as has joined #ocaml
keen____ has joined #ocaml
Simn has joined #ocaml
as has quit [Quit: Leaving]
axiles has joined #ocaml
siddharthv is now known as siddharthv_away
izaak has quit [Ping timeout: 260 seconds]
matthieu has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
badon has quit [Ping timeout: 245 seconds]
matthieu has quit [Ping timeout: 250 seconds]
Hannibal_Smith has joined #ocaml
matthieu has joined #ocaml
matthieu has quit [Ping timeout: 250 seconds]
samrat has joined #ocaml
arj has joined #ocaml
fraggle_laptop has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
nojb has joined #ocaml
izaak has joined #ocaml
fold has quit [Ping timeout: 272 seconds]
flazz is now known as zz_flazz
nojb has quit [Ping timeout: 245 seconds]
izaak has quit [Ping timeout: 240 seconds]
matthieu has joined #ocaml
ggole has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
matthieu has quit [Ping timeout: 240 seconds]
platz has joined #ocaml
badon has joined #ocaml
hhugo has joined #ocaml
matthieu has joined #ocaml
Nahra has quit [Remote host closed the connection]
siddharthv_away is now known as siddharthv
badon has quit [Ping timeout: 240 seconds]
gasche has quit [Ping timeout: 240 seconds]
badon has joined #ocaml
izaak has joined #ocaml
parcs has quit [Ping timeout: 260 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
pgomes has joined #ocaml
izaak has quit [Ping timeout: 250 seconds]
ollehar has joined #ocaml
ygrek has joined #ocaml
<scriptdevil>
I am reading Real World OCaml now. It heavily relies on Core, even when corresponding functions exists in the standard library like List.exists. I accidentally discovered this when I ran OCaml without open Core.Std;;
<scriptdevil>
My question is whether this is how OCaml is done nowadays? Is the standard library pretty much obsoleted by Core.Std?
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux>
there are folks that use Core.Std
<flux>
I don't think they are the majority
<flux>
there are alternative extended standard libraries, such as Batteries (which supercedes ExtLib)
<flux>
but I would heavily recommend using something in addition to plain OCaml standard libraries even for simple programs :)
<scriptdevil>
Hmmm. The reason this might be painful is because there are subtle changes between functions with similar names... List.exists has a labelled ~f in Core.Std and it is the second argumment. In the standard library, it is the first argument without a label
parcs has joined #ocaml
<scriptdevil>
I did a tuareg-eval-buffer and I got errors. I realized only after that that the I wasn't importing Core.
<scriptdevil>
Ok. I will finish RWO using Core to get a good understanding of the language and then see if I should try some alt library.
<skchrko>
scriptdevil, yes, good idea
j_ has joined #ocaml
BitPuffin has joined #ocaml
Arsenik has joined #ocaml
<companion_cube>
RWO should really include something about Core not being the standard...
matthieu has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
demonimin has quit [Remote host closed the connection]
<ygrek>
companion_cube, there is conspiracy theory that RWO was written for the purpose to make Core de-facto standard!
<companion_cube>
it's quite likely, yes :p
<companion_cube>
or written by people for whom Core is the standard
siddharthv is now known as siddharthv_away
<rks`>
companion_cube: maybe
<rks`>
just maybe
<rks`>
you could read the book before criticising
<rks`>
because I just checked the prologue
<flux>
well, I actually wouldn't mind if -some- library became an actual standard
<rks`>
and they do say that core is not the standard library
<flux>
even though I personally am using Batteries
<flux>
it would mean you could easily write libraries that depend on it
<rks`>
(second that)
<flux>
I think people at present would not be super-happy to incorporate both batteries and core to their projects because their dependencies use different standard libraries
<flux>
so people probablyt just choose not to use any such libraries in library projects
<flux>
which means things like "you can get an enumeration with Foo.enum" cannot work
eikke__ has joined #ocaml
zpe has joined #ocaml
<companion_cube>
rks`: iirc there was no single mention of batteries
<rks`>
I never said there was
demonimin has joined #ocaml
<rks`>
do you mean to imply that batteries *is* the standard?
<companion_cube>
no
<companion_cube>
but when I looked at the last beta, there were no mentions of alternatives
<companion_cube>
the number of people who come here reading RWO, and think it's something everyone uses, is also a hint
* ggole
stdlib + NIH
j_ has quit [Read error: Connection reset by peer]
<adrien>
reading the channel, I see many people confused and thinking Core is the stdlib
<companion_cube>
I guess the majority of people that do not work at JST do the same thing
<adrien>
I understand the will not to confuse people but in this case it got the opposite effect I think
platz has quit [Quit: leaving]
_0xAX has joined #ocaml
dsheets has joined #ocaml
Kakadu has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
ocp has joined #ocaml
izaak has joined #ocaml
izaak has quit [Ping timeout: 260 seconds]
samrat has joined #ocaml
elfring has joined #ocaml
jonludlam has joined #ocaml
Anarchos has joined #ocaml
maattdd has joined #ocaml
mrvn_ is now known as mrvn
dsheets has quit [Ping timeout: 245 seconds]
maattdd has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
Simn has quit [Quit: Leaving]
dsheets has joined #ocaml
<scriptdevil>
I should have been more clear. RWO does acknowledge that Core is an alternative library
<scriptdevil>
However, it calls it the Core standard library and the book is deeply intertwined with Core.
sagotch has joined #ocaml
maattdd has joined #ocaml
numeo has left #ocaml [#ocaml]
nojb has joined #ocaml
avsm has quit [Quit: Leaving.]
izaak has joined #ocaml
locallycompact has joined #ocaml
izaak has quit [Ping timeout: 250 seconds]
Hannibal_Smith has quit [Read error: Connection reset by peer]
Gonzih has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
manizzle has quit [Remote host closed the connection]
Gonzih has quit [Ping timeout: 260 seconds]
siddharthv_away is now known as siddharthv
pgomes has left #ocaml [#ocaml]
avsm has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 245 seconds]
BitPuffin has joined #ocaml
AltGr has joined #ocaml
maattdd has joined #ocaml
Gonzih has joined #ocaml
izaak has joined #ocaml
izaak has quit [Ping timeout: 245 seconds]
sagotch has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 245 seconds]
nojb has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
BitPuffin has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
fraggle_laptop has quit [Read error: Connection reset by peer]
thomasga has quit [Client Quit]
BitPuffin has joined #ocaml
sagotch has joined #ocaml
izaak has joined #ocaml
ygrek has joined #ocaml
izaak has quit [Ping timeout: 255 seconds]
siddharthv is now known as siddharthv_away
ygrek has quit [Ping timeout: 245 seconds]
George has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
pango has quit [Ping timeout: 245 seconds]
pminten has joined #ocaml
avsm has joined #ocaml
maattdd has quit [Ping timeout: 272 seconds]
avsm has quit [Ping timeout: 255 seconds]
_andre has joined #ocaml
thomasga has joined #ocaml
izaak has joined #ocaml
avsm has joined #ocaml
izaak has quit [Ping timeout: 250 seconds]
pminten has quit [Quit: Leaving]
samrat has quit [Quit: Computer has gone to sleep.]
sagotch has quit [Ping timeout: 250 seconds]
avsm has quit [Quit: Leaving.]
englishm_ has joined #ocaml
englishm has quit [Read error: Connection reset by peer]
maattdd has joined #ocaml
bernardofpc has quit [Ping timeout: 245 seconds]
sagotch has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
bernardofpc has joined #ocaml
englishm has quit [Ping timeout: 260 seconds]
parcs has quit [Quit: WeeChat 0.4.3]
jbrown has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
sagotch has quit [Ping timeout: 256 seconds]
englishm_ has joined #ocaml
sagotch has joined #ocaml
englishm_ has quit [Read error: Connection reset by peer]
englishm_ has joined #ocaml
englishm_ has quit [Read error: Connection reset by peer]
englishm_ has joined #ocaml
izaak has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
fold has joined #ocaml
Submarine has quit [Remote host closed the connection]
izaak has quit [Ping timeout: 255 seconds]
pminten has joined #ocaml
samrat has joined #ocaml
zpe_ has joined #ocaml
deavidsedice has joined #ocaml
ivan\ has quit [Ping timeout: 245 seconds]
so has quit [Ping timeout: 245 seconds]
cthuluh has quit [Ping timeout: 245 seconds]
kerneis has quit [Ping timeout: 245 seconds]
bcucciol1 has quit [Ping timeout: 240 seconds]
jerith has quit [Ping timeout: 240 seconds]
lusory has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 240 seconds]
uggwar_ has quit [Ping timeout: 240 seconds]
bjorkintosh has quit [Ping timeout: 240 seconds]
paddymahoney has quit [Ping timeout: 240 seconds]
kerneis_ has joined #ocaml
mrpantoufle has quit [Ping timeout: 245 seconds]
bernardofpc has quit [Ping timeout: 240 seconds]
deavid has quit [Ping timeout: 240 seconds]
bernardofpc has joined #ocaml
uggwar has joined #ocaml
lusory has joined #ocaml
ivan\ has joined #ocaml
cthuluh has joined #ocaml
bcuccioli has joined #ocaml
so has joined #ocaml
bjorkintosh has joined #ocaml
paddymahoney has joined #ocaml
maattdd has joined #ocaml
jerith has joined #ocaml
ousado_ has quit [Ping timeout: 250 seconds]
ousado_ has joined #ocaml
mrpantoufle has joined #ocaml
<mbac>
hi
pminten has quit [Remote host closed the connection]
englishm_ has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
rand000 has joined #ocaml
_0xAX has quit [Ping timeout: 255 seconds]
WraithM has joined #ocaml
izaak has joined #ocaml
englishm has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
<rwmjones>
has anyone managed to make cduce work on ocaml 4.02?
<rwmjones>
s/work/compile/
tane has joined #ocaml
_0xAX has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
izaak has quit [Ping timeout: 240 seconds]
zz_flazz is now known as flazz
englishm has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
thomasga has quit [Quit: Leaving.]
englishm_ has joined #ocaml
samrat has quit [Ping timeout: 250 seconds]
englishm has quit [Ping timeout: 245 seconds]
maattdd has joined #ocaml
samrat has joined #ocaml
mcclurmc has joined #ocaml
slash^ has joined #ocaml
_0xAX has quit [Remote host closed the connection]
lordkryss_ has joined #ocaml
lordkryss_ is now known as lordkryss
arj has quit [Quit: Leaving.]
flazz is now known as zz_flazz
leowzukw has joined #ocaml
leowzukw has quit [Quit: Lost terminal]
leowzukw has joined #ocaml
englishm_ has quit [Ping timeout: 240 seconds]
englishm has joined #ocaml
skchrko has quit [Quit: Leaving]
j has joined #ocaml
j is now known as Guest98548
travisbrady has joined #ocaml
englishm has quit [Ping timeout: 250 seconds]
englishm has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
maattdd has joined #ocaml
sagotch has quit [Remote host closed the connection]
thomasga has joined #ocaml
philtor has joined #ocaml
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
philtor has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 250 seconds]
yomimono has joined #ocaml
Gonzih has quit [Ping timeout: 250 seconds]
ocp has quit [Ping timeout: 250 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
olauzon has joined #ocaml
englishm has quit [Remote host closed the connection]
philtor has joined #ocaml
dapz has joined #ocaml
englishm_ has joined #ocaml
BitPuffin has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
George has quit [Ping timeout: 246 seconds]
rand000 has quit [Quit: leaving]
nlucaroni has quit [Quit: leaving]
shinnya has joined #ocaml
<whitequark>
gaaaah
<whitequark>
*so* tempted to rewrite Sublime's OCaml highlighter to make it not exhibht exponential backtracking
bernardofpc has quit [Ping timeout: 240 seconds]
<Drup>
after ocp-index and ocp-indent, ocp-highlight ? :D
bernardofpc has joined #ocaml
<whitequark>
um, no?
<whitequark>
it's just that it's a pile of very shitty regular expressions
AltGr has left #ocaml [#ocaml]
englishm_ has joined #ocaml
zpe has joined #ocaml
jwatzman|work has joined #ocaml
englishm has quit [Ping timeout: 255 seconds]
maattdd has quit [Ping timeout: 250 seconds]
Arsenik has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Kakadu has quit [Quit: Page closed]
zpe has quit [Ping timeout: 260 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BitPuffin has quit [Ping timeout: 255 seconds]
thomasga has quit [Quit: Leaving.]
jwatzman|work has quit [Quit: jwatzman|work]
<ggole>
Slow on big files?
<whitequark>
on files which exhibit particular syntax, even
<whitequark>
so saving Ast_mapper inflicts a fifteen second delay right now
<ggole>
O_o
<whitequark>
told you, exponential backtracking
<Drup>
happy pcre
<adrien>
I get 100% CPU with asciidoc files in vim =/
troutwine_away is now known as troutwine
<adrien>
actually screen updates lag compared to my typing
<adrien>
='(
englishm_ has quit [Remote host closed the connection]
englishm_ has joined #ocaml
<ggole>
~2 billion cycles a second * N cores and we still can't edit text smoothly? Man, software.
reynir is now known as AwayNick
_0xAX has joined #ocaml
bjorkintosh has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
Simn has joined #ocaml
BitPuffin has joined #ocaml
zz_flazz is now known as flazz
samrat has quit [Quit: Computer has gone to sleep.]
philtor has quit [Ping timeout: 245 seconds]
samrat has joined #ocaml
<scriptdevil>
It would be nice if some editor understood how to indent, but highlight. I think disabling font-lock-mode would do that in emacs.
BitPuffin has quit [Ping timeout: 255 seconds]
<mrvn>
you mean like when you indent with spaces in a makefile it turns purple?
Submarine has joined #ocaml
<rinaku>
hi
<rinaku>
is there a "/dev/null"-like out_channel or file_descr in the standard library?
q66 has joined #ocaml
<rinaku>
or should I just open the real /dev/null ?
<scriptdevil>
mrvn: No, I mean it lines up the |, indents to the right position in a conditional etc.
<Drup>
scriptdevil: use ocp-indent ?
parcs has joined #ocaml
<scriptdevil>
Drup: I use tuareg + merlin. Just disabled font-lock-mode. Might be an overkill
<scriptdevil>
Also, merlin is extremely laggy in my Emacs.
<scriptdevil>
I have disabled ac-auto-start
<Drup>
(by curiosity, why don't you want code coloration ?)
<Drup>
(I basically can't read code without it, so I'm slightly puzzled)
thomasga has joined #ocaml
<adrien>
rinaku: what are you trying to do?
<scriptdevil>
Drup: As long as I can see comments and strings, I am good. However, this was just a test to see if the editing performance was better.
<Drup>
oh
<scriptdevil>
In response to whitequark's line about Sublime's 13second lag
<rinaku>
adrien: the equivalent of "... 2>/dev/null" with Unix.create_process
<Drup>
I don't think highlighting in tuareg is slow
<scriptdevil>
Drup: It isn't.
<Drup>
merlin can be slow indeed, though.
<scriptdevil>
Tuareg is well done. Merlin, however, feels like lipstick put on a monkey. Emacs and Vim probably weren't made for intelligent completion.
<Drup>
lipstick put on a monkey <3
<def`>
scriptdevil: can you share code slowing down merlin?
<Drup>
scriptdevil: merlin provides more than inteligent completion
<ggole>
I mostly use it for jump-to-definition
<adrien>
rinaku: opening /dev/null sounds like the best way, yeah; another one might be to use Unix.open_process_out
<ggole>
Which seems to work pretty well
<Drup>
def`: by the way, is there a way to give a set of warning to merlin ?
<Drup>
in a .merlin
<scriptdevil>
Drup: Nothing at all, just typing List.map in merlin throws me off when ac-auto-start is enabled since I touch type and any lag throws me off.
<def`>
FLG <compiler flags>
ygrek has joined #ocaml
<Drup>
def`: thanks
<rinaku>
adrien: ok
<scriptdevil>
Drup: It goes like Li.... st .... . m <wait a second> ap..
<Drup>
oh yeah, ac-auto-start
<scriptdevil>
Even with it disabled, The C-c Tab is a little too slow.
<Drup>
it annoys me, even if it was fast
jonludlam has quit [Ping timeout: 260 seconds]
<ggole>
Yeah, can't say I like stuff popping up while I type
<def`>
scriptdevil: that is to be expected in this case :)
<jerith>
I only ever want autocomplete when I ask for it.
<Drup>
same here
<rinaku>
adrien: I already have a list of args so create_process is a bit more satisfying than to construct a command to string and then give it to sh to deconstruct...
<rinaku>
construct a command string*
<scriptdevil>
jerith: Yeah, I still use merlin (Ocaml noob here), because I like the List.<get me the list> and see what I need
<Drup>
(and autocomplete is probably half to blame, on the slugyness side :x)
<scriptdevil>
Also C-c C-t for the type is fairly sweet.
<jerith>
scriptdevil: By default, "C-c <tab>" invokes completion.
<scriptdevil>
Drup: Is vim's integration any better?
<Drup>
I don't know
<scriptdevil>
I might also try company-mode. I don't know. I probably should try
<jerith>
That's what I use when I need it.
<ggole>
I use M-TAB, which seems fine
<Drup>
scriptdevil: I think merlin is not yet compatible with company but it should come soon
locallycompact has quit [Ping timeout: 250 seconds]
<def`>
Drup: merlin2 is
<jerith>
I should probably rebind m-<tab> to something that doesn't get eaten by my OS.
<Drup>
def`: right, that's what I heard
<Drup>
jerith: I just use TAB
<jerith>
Drup: But that's for indentation. :-)
<scriptdevil>
jerith: I worked at it from another angle. I mapped Win-Tab for the KDE switcher :P
<Drup>
emacs is cleaver enough to know when I want to complete and when I want to indent, usually
<scriptdevil>
And use M-Tab for emacs
<def`>
Drup: on most queries in debug mode, merlin answer is below human reaction time(once cmi files are in cache)
leowzukw has quit [Quit: leaving]
<Drup>
def`: on merlin2, I presume ?
<jerith>
scriptdevil: cmd+tab is already used by OSX. (I have a background app that catches alt+tab and gives me proper window switching.)
<def`>
it was on merlin1, on non pathilogical case
<jerith>
Anyway, "C-c <tab>" is good enough for me for now.
<def`>
emacs has a non negligible overhead
<Drup>
def`: ok
<Drup>
def`: because, the whole overhead of the merlin emacs mode is clearly above human reaction time
<def`>
(well ac, for the few tests I made, company was much more reactive)
<Drup>
(even
<Drup>
(even *my* reaction time, which is quite an achievement)
thomasga1 has joined #ocaml
<def`>
and it has never been a problem in vim
<Drup>
def`: is merlin2 still 4.02 only ?
<def`>
no
<Drup>
huum
<def`>
4.01 too
<scriptdevil>
def`: I will definitely check out merlin2
* Drup
pins merlin2
<scriptdevil>
Thanks.
<adrien>
rinaku: :)
<def`>
try merlin2-syntax-error branch then :)
<scriptdevil>
Ok
<Drup>
def`: I was going to ask what are the differences
shinnya has quit [Ping timeout: 272 seconds]
<def`>
Drup: a heuristic tries to print more friendly error messages
<Drup>
nice
thomasga has quit [Ping timeout: 250 seconds]
<jerith>
How do I install merlin2?
<jerith>
Do I have to build it myself from the repo?
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
_0xAX has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
<jerith>
Yay! Shiny new merlin2.
<jerith>
Except I don't really know what it's supposed to do for me that the old merlin didn't. :-)
<def`>
More robust, hopefully :)
travisbrady has quit [Quit: travisbrady]
<def`>
scriptdevil: if you have some time to spend one day, it would be nice to help us profile slow parts of merlin (submitting sample cases is enough)
<jerith>
Hrm. It seems to handle recompiles better than it did before.
* jerith
tries to figure out what he was doing before being distracted by this.
<def`>
:P
<jerith>
Oh, right. Finishing some work-related Python code I can move on to OCaml. :-)
_0xAX has joined #ocaml
yomimono has joined #ocaml
<jerith>
Work Python code done. Now back to my OCaml AMQP client so I can start prototyping work stuff in OCaml. :-)
acieroid` is now known as acieroid
travisbrady has joined #ocaml
<philtor>
Anyone familiar with Core Async? What's the difference between Async, Async_kernel and Async_unix modules? (is Async_kernel OS agnostic?)
<jerith>
philtor: I think Async_kernel is just the promise/callback machinery and Async_unix adds the I/O layer.
<jerith>
The *_unix means "stuff that talks to the OS" rather than unix specifically.
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 240 seconds]
BitPuffin has joined #ocaml
Kakadu has joined #ocaml
<philtor>
jerith: I'm trying to get something working with mirage and I'm told that mirage doesn't use sockets, I'd need a different I/O layer that's an alternative to Async_unix, I think.
<jerith>
philtor: I think I remember seeing a mirage thing that worked with Async.
bernardofpc has quit [Ping timeout: 240 seconds]
<philtor>
jerith: do you recall what it was? Would like to look at the code.
<jerith>
I was already looking for it when you asked. :-)
<jerith>
It claims to do both.
<jerith>
Look at the README.
bernardofpc has joined #ocaml
<Drup>
cohttp is functorized to work on both
<Drup>
mirage is not
<jerith>
Ah, right.
leowzukw has joined #ocaml
leowzukw has quit [Client Quit]
<philtor>
Drup: right, I'm pretty sure only cohttp_lwt works with mirage.
<philtor>
Maybe I'll have to do an Lwt implementation as well
<Drup>
philtor: yes
<philtor>
Drup: how does Mirage work without sockets?
<philtor>
cohttp_lwt seems to use Channels instead.
<philtor>
(not sure which Channel s these are)
<Drup>
I don't know much about mirage design
<yomimono>
Mirage *can* use sockets
<yomimono>
if you configure your unikernel for unix rather than xen (mirage configure --unix) and ask for a network stack that works on sockets (socket_stackv4), that's what you'll get.
<yomimono>
(apologies if I'm misunderstanding your question - someone else in #mirage may be able to answer better than me)
<philtor>
yomimono: I'd like to be able to configure for either unix or xen
ygrek has joined #ocaml
<philtor>
yes, I've been asking in #mirage, but apparently I'm in the wrong timezone :)
Guest98548 has quit [Read error: Connection reset by peer]
<mrvn>
With xen the tcp/ip modules should provide sockets
<mrvn>
(well, socket equivalents)
bernardofpc has quit [Ping timeout: 272 seconds]
bernardofpc has joined #ocaml
vincom2 has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
vfoley_ has quit [Remote host closed the connection]
<yomimono>
philtor: just looked at your actual question in #mirage - can't help you with Async, sorry to say :(
slash^ has quit [Read error: Connection reset by peer]
vincom2 has joined #ocaml
Nahra has joined #ocaml
<Drup>
whitequark: that's going to make some stuff *so easier*
<whitequark>
Drup: what will?
<Drup>
your PR
<whitequark>
ah, yeah
<whitequark>
what do you have in mind?
<Drup>
eliom
<whitequark>
oh? what does eliom need from that?
<Drup>
the -I argument
<whitequark>
oh, right, the typechecker hack
<Drup>
yes
<whitequark>
well, good for you then!
<whitequark>
also, I feel like the -for-pack is implemented in a half-assed way
<Drup>
well, I would probably have done it with a wrapper, like the current eliom version, but this is better
<whitequark>
so for example how can it produce correct full paths for exceptions if ocamlc ignores -for-pack?
<Drup>
afaict, -for-pack is indeed broken in various cases
<Drup>
def` can probably tell you which cases
<whitequark>
PR6506
troutwine is now known as troutwine_away
<def`>
whitequark: do it needs to produce full path for exceptions ? :P
<whitequark>
def`: well, um, yes?
<def`>
whitequark: why :D ?
<whitequark>
I believe -for-pack must be equivalent to making a file with module M = struct (inserted code) end
<def`>
(and well, I don't know much about for-pack, this should disappear from the compiler anyway)
<whitequark>
right now:
_0xAX has quit [Remote host closed the connection]
<whitequark>
utop # raise M.E;;
<whitequark>
Exception: M.E.
<whitequark>
so it produces full path in non-for-pack cases
<whitequark>
what should replace -for-pack?
<def`>
for-pack doesn't update path for exceptions
<whitequark>
def`: exactly. it should
<def`>
whitequark: module aliases should do the job
<whitequark>
but module aliases are different semantically
<def`>
yes
<whitequark>
although, it is possible to simulate the -pack behavior with ppx.
<def`>
some use-cases where for-pack is used should be better covered by aliases
ygrek has quit [Ping timeout: 245 seconds]
<whitequark>
ocamlnet installs for ever...
hhugo has quit [Quit: Leaving.]
jonludlam has joined #ocaml
<jerith>
ocamlnet doesn't install at all for me. :-(
<jerith>
(Which is one of the reasons I'm writing an AMQP client.)
<whitequark>
Drup: so I wanna do something with eliom
<Drup>
define "do something" :p
<Drup>
def`: I was very puzzled when merlin was yelling at me about wrong arguments
<Drup>
until I realized that the old merlin.elc was still there, and had priority over merlin.el
<jerith>
Drup: Did you have an old compile elisp somewhere?
<Drup>
. . .
<jerith>
Yup, I got that too.
<jerith>
emacs warned me that the .el was newer than the .elc, but didn't do anything about it.
zpe has joined #ocaml
claudiuc has joined #ocaml
<Drup>
merlin2 seems to be much more reliable in presence of objects.
<def`>
yes
<Drup>
it I do C-c C-t on a method at the definition point, it gives me the type of the whole object, though
<def`>
so pathological cases are recursive constructions
<def`>
they might slowdown merlin2, but will just fails in merlin1.
<def`>
what do you mean by definition point ?
<Drup>
oh, actually no, it gives me the type of the method, but the object is expanded
* Drup
tries the new merlin on errors. C-c C-x C-c C-x C-c C-x C-x C-c ... fu.
<bitbckt>
yeah... I hate that key binding.
BitPuffin has quit [Ping timeout: 255 seconds]
<Drup>
def`: merlin-type-enclosing-up/down is cycling now, it's intended ?
<dmbaturin>
If I'm writing a program that generates random string from some production rules, what is the best way to store the grammar?
troutwine is now known as troutwine_away
<dmbaturin>
How to define types so non-terminals are easy to tell from terminals etc.?
<dmbaturin>
(I'm not asking for exact definitions, just the general idea)
tobiasBora has joined #ocaml
<def`>
Drup: yes
<def`>
Drup: C-c C-r for errors
Thooms has joined #ocaml
<def`>
it was too dangerous otherwise :)
Kakadu has quit [Ping timeout: 260 seconds]
<Drup>
def`: next error is still on C-c C-x, it's not a merlin thingy ?
AltGr has left #ocaml [#ocaml]
<Drup>
hum, up and down are on merlin-type-enclosing-up/down >_<
<Drup>
M-up and M-down would be more sensible
<jerith>
Drup: "C-c up/down"?
<Drup>
(that's what I had in my personnal config, at least)
<tizoc>
hello
<Drup>
jerith: I avoid shortcut that forces me to release C midway
<tizoc>
I was reading the "modular implicits" pdf and was wondering how does a signature of a function that needs more than one module for the same type looks
<tizoc>
for example, in haskell this function `\n -> show (n + n)` has this signature `(Show a, Num a) => a -> String`
bernardofpc has quit [Ping timeout: 260 seconds]
bernardofpc has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
<tizoc>
in the pdf a print example is given, with a signature `(implicit S : Show) -> S.t -> unit` but being that the type of the non-implicit parameter is referenced from the implicit module (and not the other way around) it isn't obvious to me how this works with multiple modules that have to share `t`
<whitequark>
hmmm, good question
<whitequark>
Rust has basically (implicit S : Show + Eq), for this purpose
<whitequark>
I wonder if it could be formalized and introduced in OCaml
<Drup>
if we follow how functor works, we would have "(implicit S : Show) -> (implicit S' : Num with type t = S.t) -> S.t -> unit"
<Drup>
slightly mouthful
<whitequark>
oh, right
<whitequark>
the + module-level operator could expand to sig include S include S' with type t = t end
<tizoc>
def`: mm... I think you are the author, right? :)
<def`>
:D, yes
<Drup>
spotted x)
<def`>
(one of the authors*)
<whitequark>
so def`, what do you think on my + operator suggestion?
<Drup>
def`: C-w (the locate thingy for company) fails with a cryptic error message
<def`>
the include trick wouldn't
<def`>
work*
<whitequark>
hm, why?
<def`>
with Drup examples, you can give different path for S and S'
<def`>
and, type t is not the only constraint you want to share accross modules
<whitequark>
so would it not work, or is it not generic enough?
<def`>
it's not generic enough
<def`>
(implicit S : Show + S' : Num) would be a possibility
<whitequark>
you see, in Rust, the + thing comes up all the time. I would guess that *most* uses place several constraints on the argument
* Anarchos
is compiling merlin
<whitequark>
and it's not rare that you see five of them or so
<whitequark>
I believe that even with just type t, it would be exceptionally useful
<whitequark>
and then you could extend that to "equate all types with identical names"
<whitequark>
I mean, you can always fall back to specifying all that explicitly, if you want to
<def`>
(implicit S : Show + Num with type t)
<Drup>
def`: does the inference already work in this case ?
NoNNaN has joined #ocaml
<def`>
this could be expanded to (implicit S : Show) (implicit S : Num with type t) -> …
<def`>
with S being bound to the inclusion of both modules within the body of the function
<def`>
BUT, there might be types colliding
<whitequark>
def`: so a sequence of shorthands. (implicit S : Show + Num) equates identical types. (implicit S : Show + Num with type t and u) allows to explicitly declare types
<def`>
so a simpler definition could be Show + Num is the union of both with all colliding types equal
<whitequark>
or just that, I don't think you will need the expanded forms often
<Drup>
def`: I feel like it would be sufficient in most cases
<whitequark>
again, in Rust, you don't even have the ability to specify that
<whitequark>
and they do just fine
<def`>
Drup: yes, this only case which might be worrying is when of the module type is abstract
<Drup>
whitequark: they do fine *for now*
<def`>
(you can do (implicit S : WeirdType) (implicit G : S.T) :P
<whitequark>
Drup: they have a far larger amount of code with implicits than OCaml ;P
<Drup>
whitequark: Rust is too young to see the shortcomings of their typing approach, I think
<def`>
BUT
<whitequark>
Drup: but, you're right too
<def`>
you can stop now.
<whitequark>
def`: hm?
<def`>
this is just cosmetic issues, which might be resolved later :)
<whitequark>
yes, I agree, it's not a big deal
<Drup>
def`: hence the question, does the inference scheme you have already handle that ? :D
<def`>
Drup: there is no inference
<Drup>
oh, well.
<def`>
you give the type of the modules
<def`>
it's like packages
troutwine_away is now known as troutwine
<def`>
(there could even be a union operator at the module level for Show + Num, not specific to implicits)
maattdd has joined #ocaml
<whitequark>
module type level?
<def`>
both
<def`>
introduce the appropriate constraints on module type or module
<whitequark>
although it would probably be only useful for implicits
preyalone has joined #ocaml
<preyalone>
How can I open a module with a qualifier, so that it doesn't shadow things?
WraithM has quit [Ping timeout: 245 seconds]
<Drup>
preyalone: module M = Mymodule.Mysubmodule
<preyalone>
for example, I want to use both Failure (standard Ocaml Failure), and QuickCheck, but QuickCheck has its own Failure
yomimono has quit [Ping timeout: 255 seconds]
<preyalone>
that I don't care about but ocamlc does
boogie has joined #ocaml
<whitequark>
try open!
<def`>
you can just rebind Failure
<def`>
exception ML_Failure = Failure open QuickCheck
zpe has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
zpe has joined #ocaml
<whitequark>
wait, you can rebind exceptions?
<whitequark>
I just told someone yesterday you can't :<
<def`>
(and yes, I don't know Quichcheck interface :P)
<preyalone>
ignore works!
<preyalone>
thanks all
<preyalone>
i guess my ocamlc version was out of date; these compile errors didn't used to show up
* jerith
should probably write some tests or something.
<Drup>
don't test, just encode everything in the type systems :D
<Drup>
*dependent types ftw*
<def`>
(just Nope)
<jerith>
I can't encode variation in input data in the type system, sadly.
<Drup>
jerith: actually ... :D
<jerith>
Anyway, I need to make sure that my code generator generates the right kind of code.
axiles has quit [Remote host closed the connection]
<Drup>
(in cases it's not obvious : don't do that, I'm kidding)
<jerith>
I know.
<jerith>
I'm certainly not planning to write as many tests as I would for the equivalent Python code.
<jerith>
Because type system ftw.
flazz is now known as zz_flazz
<whitequark>
what does ./expunge in ocaml's source root do?
<jerith>
Now I need to figure out how to write tests.
ggole has quit []
preyalone has left #ocaml [#ocaml]
zz_flazz is now known as flazz
_andre has quit [Quit: leaving]
jbrown has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
yomimono has quit [Ping timeout: 272 seconds]
travisbrady has quit [Quit: travisbrady]
jbrown has quit [Ping timeout: 250 seconds]
travisbrady has joined #ocaml
ruzu has quit [Read error: Connection reset by peer]
ruzu has joined #ocaml
philtor has quit [Ping timeout: 264 seconds]
travisbrady has quit [Quit: travisbrady]
pango has joined #ocaml
olauzon has quit [Quit: olauzon]
jbrown has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
jbrown has quit [Ping timeout: 255 seconds]
jao has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
jbrown has joined #ocaml
jbrown has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
<gperetin>
does anybody know what's the status of multicore or where could I look it up? On ocaml labs page it says still "planning" but I see there is a talk at OCaml 2014 about it
rand000 has joined #ocaml
Thooms has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
thomasga has joined #ocaml
rand000_ has joined #ocaml
rand000 has quit [Read error: Connection reset by peer]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Thooms has joined #ocaml
troutwine is now known as troutwine_away
troutwine_away is now known as troutwine
philtor has joined #ocaml
rand000_ has quit [Quit: leaving]
jonludlam has quit [Quit: Leaving]
Thooms has quit [Quit: WeeChat 0.3.8]
troutwine is now known as troutwine_away
* jerith
engages in honourable combat with Travis.
<jerith>
So far it's winning.
englishm_ has quit [Remote host closed the connection]
<Drup>
jerith: did you read avsm's blog post on travis+opam ?
<jerith>
Drup: Yes.
englishm has joined #ocaml
<Drup>
then it shouldn't be too difficult
<whitequark>
jerith: you can take a look at my OCaml repos, most of them use Travis
darkf has joined #ocaml
<jerith>
I'm doing stupid things like "opam install lwt lwt.unix" because it's 1am.
spacebat has joined #ocaml
<jerith>
Ah, apparently @@ is only in 4.01+.
<jerith>
Do I want to support 4.00?
<Drup>
the only thing I do differently than the blog post is that I pin the local opam package and use that as install script
<Drup>
jerith: only if you plan to support debian stable
<spacebat>
I've had a bit of fun trying to get opam and a few modules working on debian stable - the opam site says its binary installer works for stable, however it needs a newer version of glibc than is shipped by debian
<jerith>
I put everything from the script into the Travis config directly.
<spacebat>
I'm just wondering what the best distro is to run ocaml/opam/mirage
<jerith>
Do I want to support older opam?
<Drup>
jerith: mostly, no
<Drup>
1.1+ is fine
WraithM has joined #ocaml
<jerith>
avsm has PPAs for all sorts of things.
<Drup>
spacebat: there is a ppa with pre-compiled opam for debian-based stuff
<spacebat>
oh ok, I'll have to rescan the opam docs for that
<jerith>
I should probably support 4.00. That should just be a matter of redefining @@ and |> where I use them.
<jerith>
(Which is in rather a lot of places.)
flazz is now known as zz_flazz
englishm has quit [Ping timeout: 250 seconds]
<Drup>
jerith: if you use batteries or core, they do it for you
<Drup>
(with the appropriate #ifdef)
<jerith>
I don't use either for this.
<spacebat>
is the avsm ppa suitable for debian? I thought I saw an issue indicating it was not
Hannibal_Smith has quit [Quit: Sto andando via]
<jerith>
I'm pretty sure I won't need them.
<Drup>
spacebat: I think so, but since I'm not on a debian-based distro ... :p
<Drup>
it would be sort of similar to "include Foo with t := t'
<Drup>
except it syntactic, not semantic, so it's not limitated to constraint of arity and other silly stuff
troutwine is now known as troutwine_away
<whitequark>
Drup: that code is horrifying
<whitequark>
do you know that?
<Drup>
yes, I do
<whitequark>
why do you do and type Xml.event_handler = Xml.event_handler ?..
<whitequark>
why do you reassign like two dozen types to string below?
<Drup>
I recently killed 4 of those by carefully exported signature
<Drup>
so, yes, I know how horrible they are
<whitequark>
what are you even trying to *do* here?
<Drup>
it's related to functor equality relations and how eliom's html interface is designed
<Drup>
but "Xml.event_handler = Xml.event_handler" do make sens, because it's not the same Xml module on both side
<Drup>
if you do "functor (Xml : S) -> T with Xml.event_handler = Xml.event_handler"
<Drup>
the first Xml is T.Xml
<Drup>
and the second is the argument of the functor
<Drup>
so, this kind of stuff export to the "user" the fact that T.Xml is consistent with Xml
<Drup>
(which is necessary for various reasons)
<whitequark>
>_<
<Drup>
and you can't always do Xml = Xml (which would do every Xml.foo = Xml.foo in one go) because it may conflict module subtyping. You really want to do the equality between each type, and not the whole module.
<Drup>
No, it's not pretty.
<whitequark>
are the errors as bad as I expect them to be?
<Drup>
actually, no.
<Drup>
because all this stuff is hidden on the surface
<whitequark>
hmmm
tobiasBora has quit [Quit: Konversation terminated!]
<Drup>
and -short-path helps a bit on the "various alias for the same type"
<Drup>
whitequark: anyway, my point was : you could import module signature too.
<Drup>
(and support arbitrary substituion)
<whitequark>
hm
<whitequark>
can you explain what semantics exactly do you need?