<ocaml784>
I installed emacs in a Windows drive but opam/merlin etc. are in Cygwin.
<ocaml784>
Can emacs enable merlin-mode ?
<ocaml784>
Should I install emacs in Cygwin?
ygrek has joined #ocaml
tobiasBora has joined #ocaml
copy` has joined #ocaml
cheater has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
zpe_ has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
cheater has joined #ocaml
AlexRussia has joined #ocaml
zirman has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 256 seconds]
cheater has joined #ocaml
<def`>
ocaml784: I think it should work
vbmithr has quit [Ping timeout: 260 seconds]
<def`>
add the emcs path from opam to load-path
<def`>
copy paste the snippet provided when installing merlin
vbmithr has joined #ocaml
<def`>
and maybe adjust the path of merlin-comman
<def`>
merlin-command* setting
Cypi has quit [Ping timeout: 260 seconds]
Cypi has joined #ocaml
Asmadeus has quit [Remote host closed the connection]
Asmadeus has joined #ocaml
shon has joined #ocaml
tmtwd has quit [Ping timeout: 245 seconds]
mloy has quit [Ping timeout: 260 seconds]
mloy has joined #ocaml
shon has quit [Ping timeout: 245 seconds]
dmbaturin has quit [Ping timeout: 260 seconds]
dmbaturin has joined #ocaml
AltGr has joined #ocaml
malc_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
ohama has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
<flux>
> The Ocsigen team is going to release Eliom 6 next week, which focuses on mobile apps. We will also release Ocsigen Start, a template with an example of multi platform application: a single code for both your Web app and mobile html5 apps (Android, iOS, Windows).
ohama has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: No route to host]
AlexDenisov has joined #ocaml
AlexDeni_ has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
Algebr has joined #ocaml
<ryu0>
andyc: unfortunately source code formatters are very much language specific, so making one for "any" language is kinda out of the question. :/
maattdd has joined #ocaml
groovy2shoes has quit [Ping timeout: 260 seconds]
zirman has joined #ocaml
groovy2shoes has joined #ocaml
zirman has quit [Ping timeout: 250 seconds]
mloy has quit [Ping timeout: 260 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
<flux>
it's really not, he wasn't asking one for 'all' languages :)
<flux>
so an example for a syntax formatter in ocaml
<flux>
it seems campl4 can do it, but it's probably WAY too complicated program for doing just that
AlexRussia has joined #ocaml
<reynir>
I've used camlp4 to format unreadable student hand-ins :P
mloy has joined #ocaml
<flux>
:-)
<ryu0>
reynir: too bad it discards comments it seems.
<flux>
does it? someone(TM) on the internet said it doesn't?
<companion_cube>
I suppose ocp-indent could reformat, in theory
TarVanimelde has quit [Quit: Leaving]
<reynir>
I think it preserved comments even though people said it woudln't
<flux>
companion_cube, but it only indents, doesn't touch the line contents
TarVanimelde has joined #ocaml
<ryu0>
reynir: really? i'm trying camlp4 with "-parser o -printer o" and it discards my comments.
<companion_cube>
flux: but I think it must tokenize, including therefore the comments
<reynir>
It was some years ago I used it
<ryu0>
ok.
<reynir>
Tried »camlp4 somefile.ml -parser o -printer o« and it preserved at least some comments. I didn't check if any were missing
TarVanimelde has quit [Read error: Connection reset by peer]
TarVanimelde has joined #ocaml
cheater has quit [Ping timeout: 248 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
ocaml784 has quit [Ping timeout: 260 seconds]
cheater has joined #ocaml
karovoid has joined #ocaml
<karovoid>
someone ?
AlexDenisov has quit [Ping timeout: 250 seconds]
AlexDenisov has joined #ocaml
jwatzman|work has joined #ocaml
<companion_cube>
maybe
karovoid has quit [Quit: Leaving.]
karovoid1 has joined #ocaml
karovoid1 has left #ocaml [#ocaml]
zpe_ has quit [Remote host closed the connection]
mloy has quit [Ping timeout: 260 seconds]
mloy has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
fre has joined #ocaml
dhil has joined #ocaml
wu_ng has quit [Ping timeout: 256 seconds]
shon has joined #ocaml
AlexDenisov has joined #ocaml
shon has quit [Ping timeout: 260 seconds]
AlexDeni_ has quit [Read error: Connection reset by peer]
AlexDenisov has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
silver has joined #ocaml
jimt has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 268 seconds]
Orion3k has quit [Ping timeout: 244 seconds]
jimt has joined #ocaml
zpe has joined #ocaml
<reynir>
hah
d0nn1e_ has joined #ocaml
Orion3k has joined #ocaml
unbalancedparen has joined #ocaml
dhil has quit [*.net *.split]
cheater has quit [*.net *.split]
mloy has quit [*.net *.split]
d0nn1e has quit [*.net *.split]
unbalanced has quit [*.net *.split]
tormen has quit [*.net *.split]
orbitz has quit [*.net *.split]
Guest71678 has quit [*.net *.split]
def` has quit [*.net *.split]
TarVanimelde has quit [Read error: Connection reset by peer]
sfri has quit [Remote host closed the connection]
TarVanimelde has joined #ocaml
mfp has joined #ocaml
dhil has joined #ocaml
mloy has joined #ocaml
cheater has joined #ocaml
Guest71678 has joined #ocaml
def` has joined #ocaml
orbitz has joined #ocaml
tormen has joined #ocaml
jstolarek has quit [Ping timeout: 248 seconds]
_andre has joined #ocaml
FreeBirdLjj has joined #ocaml
sfri has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
kakadu has joined #ocaml
zirman has joined #ocaml
vramana has quit [Quit: vramana]
jonasen has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
rwmjones has quit [Quit: ZNC - 1.6.0 - http://znc.in]
zirman has quit [Ping timeout: 244 seconds]
vramana has joined #ocaml
vramana has quit [Client Quit]
vramana has joined #ocaml
rwmjones has joined #ocaml
fre has quit [Quit: WeeChat 1.4]
Algebr has quit [Ping timeout: 265 seconds]
Artymort has joined #ocaml
Algebr has joined #ocaml
sepp2k has joined #ocaml
pierpa has joined #ocaml
jonasen has joined #ocaml
freusque has quit [Quit: WeeChat 1.5]
freusque has joined #ocaml
shon has joined #ocaml
groovy2shoes has quit [Remote host closed the connection]
shon has quit [Remote host closed the connection]
shon has joined #ocaml
orbifx-m has joined #ocaml
shon has quit [Remote host closed the connection]
<orbifx-m>
Can ocamlbuild derive a module name as ModuleName if it's file is module-name.ml?
<orbifx-m>
I pressume module_name.ml makes Module_name
<Drup>
don't use dash in your ocaml files names
<flux>
compiler probably warns about that?
<orbifx-m>
so it's either _ or nothing? And use mli if the module needs to have a capital somewhere in the middle of the filename?
<flux>
well there's also camelCase ;)
<Drup>
if you want capital in the middle, fooBar.ml
<flux>
you can have fooBar.ml or FooBar.ml (same module)
<Drup>
it's midly unidiomatic, though
<Drup>
mildly*
<flux>
I think in principle ModuleName.ml should be the superior option
<flux>
because the module name is the same as file name..
<flux>
but, it's not very common
<Algebr>
Warning 24: bad source file name: "Foo-bar" is not a valid module name, if its not a valid module name then why is it a warning and not an error?
kamog` has joined #ocaml
<Drup>
Algebr: because it doesn't matter if you never try to use it as a module
<Drup>
(like for an executable)
<Drup>
it's Extremely Bad Style, obviously
<flux>
it's probably not an error also because it wasn't originally an error or even a warning
<flux>
you just couldn't use them as modules :)
<flux>
and introducing new compiler errors is what introduces bitrot. (also: -Werror)
kamog has quit [Ping timeout: 250 seconds]
smondet has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<Algebr>
i c
dhil has quit [Ping timeout: 260 seconds]
shon has joined #ocaml
malina has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
shon has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
Algebr has quit [Ping timeout: 268 seconds]
tane has joined #ocaml
freusque has quit [Ping timeout: 258 seconds]
groovy2shoes has joined #ocaml
jao has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
zirman has quit [Read error: Connection reset by peer]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
vramana has quit [Remote host closed the connection]
jao has quit [Ping timeout: 265 seconds]
Algebr has joined #ocaml
copy` has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
<Algebr>
if you use emacs, you reallyyy need to check out the zerodark theme, its beautiful!
FreeBirdLjj has joined #ocaml
cnu- has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirmann has joined #ocaml
zirmann has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
dhil has joined #ocaml
TarVanimelde has quit [Ping timeout: 265 seconds]
TarVanimelde has joined #ocaml
noddy has joined #ocaml
cnu- has joined #ocaml
shinnya has quit [Ping timeout: 258 seconds]
vramana has joined #ocaml
zirman has quit [Remote host closed the connection]
nomicflux has joined #ocaml
malina has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
TarVanim_ has joined #ocaml
TarVanimelde has quit [Ping timeout: 268 seconds]
zpe has quit [Ping timeout: 250 seconds]
adi____ has quit [Ping timeout: 256 seconds]
adi____ has joined #ocaml
freehck has joined #ocaml
adi____ has quit [Ping timeout: 260 seconds]
yasw has quit [Quit: Page closed]
adi____ has joined #ocaml
noddy has quit [Ping timeout: 244 seconds]
sh0t has joined #ocaml
TarVanim_ is now known as TarVanimelde
vramana has quit [Remote host closed the connection]
jlongster has joined #ocaml
rgrinberg has joined #ocaml
vramana has joined #ocaml
SpaceSheep has joined #ocaml
al-damiri has joined #ocaml
zirman has joined #ocaml
cpdean has joined #ocaml
y3mato has joined #ocaml
Exagone313 has joined #ocaml
marsam has joined #ocaml
zirman has quit [Remote host closed the connection]
y3mato has quit []
<Exagone313>
Hi, how to make an editable two-dimensional array (that contains int tuples)? I don't find anything on a search engine, and I prefer not to use a simple unidimensional array (and calculate the cell each time). Thanks for your help.
<malc_>
Exagone313: Array.make_matrix?
<Exagone313>
Can you give me an example of this function, then write to a cell and show it?
<companion_cube>
let a = Array.make_matrix 10 5 0.;;
<companion_cube>
a.(7).(1) <- 42.;;
<Exagone313>
ok thanks
<companion_cube>
(or replace 42. with an int tuple, if you will)
<Exagone313>
So I don't have to use references?
<companion_cube>
no, arrays are mutable
<Exagone313>
Thanks, it halped
<Exagone313>
helped*
shon has joined #ocaml
malc_ has quit [Ping timeout: 250 seconds]
jstolarek has joined #ocaml
shon has quit [Remote host closed the connection]
<jstolarek>
Is there a way to display a custom message after opam finishes installing a package?
<jstolarek>
I'd like to display information about further setup steps required after my package is installed via OPAM
<zozozo>
jstolarek: the 'post-messages' field in the opam file
noddy has joined #ocaml
shon has joined #ocaml
<companion_cube>
^
<companion_cube>
very useful for release notes
<companion_cube>
see what merlin does for instance
<jstolarek>
thanks!
shon has quit [Ping timeout: 265 seconds]
isd has quit [Read error: Connection reset by peer]
shon has joined #ocaml
FreeBirdLjj has joined #ocaml
shon has quit [Ping timeout: 260 seconds]
<orbifx-m>
Is there a reason to avoid std Set? I think someone was saying something about concurency issues
TarVanimelde has quit [Ping timeout: 250 seconds]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
shon has joined #ocaml
TarVanimelde has joined #ocaml
noddy has quit [Ping timeout: 250 seconds]
shon has quit [Ping timeout: 256 seconds]
Mercuria1Alchemi has quit [Ping timeout: 250 seconds]
isd has joined #ocaml
noddy has joined #ocaml
esad has joined #ocaml
isd has quit [Ping timeout: 268 seconds]
freusque has joined #ocaml
SpaceSheep has quit [Quit: WeeChat 1.6]
shon has joined #ocaml
malina has joined #ocaml
shon has quit [Ping timeout: 245 seconds]
<companion_cube>
std Set is immutable, no risk of concurrency issues there…
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
cheater has quit [Ping timeout: 260 seconds]
noddy has quit [Ping timeout: 260 seconds]
zirman has quit [Ping timeout: 260 seconds]
marsam has quit [Remote host closed the connection]
malina has quit [Remote host closed the connection]
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
shon has joined #ocaml
zirman has joined #ocaml
cheater has joined #ocaml
shon has quit [Ping timeout: 250 seconds]
malina has joined #ocaml
zirman has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
orbifx-m has quit [Remote host closed the connection]
orbifx-m has quit [Quit: AtomicIRC: The nuclear option.]
jnavila has quit [Quit: It was time]
TarVanim_ is now known as TarVanimelde
dhil has quit [Ping timeout: 268 seconds]
zirman has joined #ocaml
shon has joined #ocaml
nomicflux has quit [Quit: nomicflux]
zirman has quit [Ping timeout: 250 seconds]
shon has quit [Remote host closed the connection]
shon has joined #ocaml
isd has joined #ocaml
dhil has joined #ocaml
noddy has joined #ocaml
tane has quit [Quit: Leaving]
shon has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 258 seconds]
yomimono has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
octachron has joined #ocaml
smondet has quit [Ping timeout: 260 seconds]
kamog` is now known as kamog
govg has joined #ocaml
kakadu has joined #ocaml
cheater has quit [Ping timeout: 245 seconds]
kamog has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
TarVanimelde has quit [Quit: TarVanimelde]
shon has joined #ocaml
shon has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
jao has joined #ocaml
TarVanimelde has joined #ocaml
Algebr has joined #ocaml
sz0 has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
smondet has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Remote host closed the connection]
agarwal1975 has quit [Quit: agarwal1975]
jeffmo has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
shon has joined #ocaml
agarwal1975 has joined #ocaml
shon has quit [Remote host closed the connection]
shon has joined #ocaml
tvynr has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
<tvynr>
Is there a way to do a partial include of a module? The following code doesn't work: http://pastebin.com/i71wVyF1 It fails at "include FactoredFunctorPart2(E);;" because this creates multiple local definitions of module E.
<tvynr>
What I'd like is to be able to say e.g. "include FactoredFunctorPart2(E) without E;;"
<flux>
have you tried include FactoredFunctorPart2(E) with E := F - not sure if that works, thoough
<tvynr>
Hm... so the idea is to rename the factorized functor's member module so I can hide it?
<tvynr>
Lemme try.
<flux>
actually probably it needs to be at least ..with module E := F
<flux>
but I don't remember if that works with modules at all, or with include
<tvynr>
Not sure it works with include. I'll muddle about with the syntax.
<flux>
well, it does work with 'module'
<flux>
so perhaps not then with include
<flux>
but I think that could be worked around?
<tvynr>
For "include FactoredFunctorPart2(E) with module E := F;;" I'm getting a syntax error. Destructive substitution works on functor constraints, though, right?
FreeBirdLjj has joined #ocaml
<tvynr>
Substitution apparently only works nicely inside a signature; I don't see it being applied to modules (at a cursory glance).
<flux>
I think you can maybe do: module Z = FactoredFunctorPart2(E) with module E := F include Z
<flux>
oh, well I didn't remember that either then :)
<flux>
I think regardless it might help
<flux>
you can do (Foo : ASignatureWithoutE)
<flux>
and ASignatureWithoutE you may get with module type of Foo with module E := F ?
<flux>
ah, but that breaks because the actual module doesn't introduce F :-)
<flux>
unless! you make another internal module that includes Foo, and introduces F, and.. this is getting way too complicated..
ia0_ has quit [Quit: reboot]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
shon has quit [Remote host closed the connection]
<flux>
probably just easier to create a new module in terms of the functor..
<tvynr>
So yeah: I had to write module signatures for the functor output and then use destructive substitution on the module.
<tvynr>
I suppose the "with E := E" thing forces the signature of the included module to have the exact same E (by identity) as the surrounding module?
<tvynr>
In any case, this seems to have worked, but one of my problems is that I have a lot of variant type declarations in the real functor (and the new factorized pieces) and I'd like to avoid duplicating the definitions.
<flux>
yes, so it's a non-recursive destruction, like let a = a in ..
<tvynr>
I know about "module type of Foo", but is there some way to get e.g. "module type of Foo(C)"? I couldn't get that to work.
<flux>
at least via intermediate application, module FooC = Foo(C) .. module type of FooC
<tvynr>
Hm. Fair point; that was a silly question. :)
<flux>
I would be happier if those things worked directly :). it seems the module language has these strange things missing, making it feel non-consistent.
<tvynr>
I think I bumped into a problem I hadn't anticipated with the solution we built: factored part 2 actually needs factored part 1 as input... which means I need the signature anyway, huh?
<tvynr>
Wish there were a good way to avoid duplicate type declarations. Still have yet to find one that works reliably.
<tvynr>
:(
<flux>
I think you should address the mailing list, they usually have super nice solutions :)
<tvynr>
Which mailing list is this? Is there an archive? I'd be really surprised if this hasn't come up before. Plenty of blog posts on avoiding duplicate type declarations, but I usually find them fraught with trouble.
<flux>
if you don't mind that your code suddenly is infested with first class modules ands gadts I mean.. ;-)
shon has joined #ocaml
<tvynr>
Already have first class modules. ;)
<tvynr>
GADTs are kind of trippy in OCaml, but I wouldn't mind as long as it gets me the result I want.
<j0sh__>
Drup: is there a reason furl isn't re-using the routing mechanism from tyre in its entirety?
jmiven has joined #ocaml
<j0sh__>
also it would be nice to have format-like strings for simple regexes with tyre, but as far as i figure, PPX is the only way to get that done... is that an accurate assessment?
j0sh__ is now known as j0sh
<Drup>
j0sh: in point 2: If you want a typed regex, yes
<Drup>
you need ppx
<Drup>
if you just want convenient syntax for the string part (like Tyre.regex), you can do that:
<Drup>
let posix s = Tyre.regex (Re_posix.re s)
noddy has quit [Ping timeout: 258 seconds]
<j0sh>
Drup: ahh nice trick
<Drup>
I'm considering adding it for posix and glob, which are reasonable syntaxes, but people will want it for pcre, str, ..., which are really really shitty syntaxes
<j0sh>
hehe
<Drup>
as for the furl question. furl uses tyre under the hood, so I'm not sure what you mean
<j0sh>
tyre/furl are really nice btw, and really good for learning from. especially with the blog post on diff lists.
<Drup>
thanks :)
<Drup>
I'll give a talk about Tyre in the next oups. I'll not go into the GADT details, though
<j0sh>
yeah i just noticed there seemed to be some overlapping code with tyre/furl routing, as if it wasn't completely factored yet, but i haven't looked at it really closely to see any differences yet though
<Drup>
yeaah, tyre was extracted out of furl rather violently, and I didn't really took time to polish furl (mostly because there are problems with the API)
agarwal1975 has quit [Ping timeout: 268 seconds]
<j0sh>
makes sense. i really like the idea of furl
<j0sh>
even if the API is imperfect
agarwal1975 has joined #ocaml
nomicflux has joined #ocaml
<tvynr>
Is there a way to apply a functor type to a module type? e.g. "module type Foo = (module type of Map.Make)(MySig)"? Specifically, I'd like to avoid creating the module; I just want the signature.
yomimono has quit [Ping timeout: 256 seconds]
<Drup>
tvynr: short answer is no, however, "module type of Map.Make(M)" will not actually instanciate any module, it'll just find the types
<tvynr>
That's weird. I could've sworn I tried that. It worked, tho; thank you!
<Drup>
(you can even do `Map.Make(M).t` to get the type of something ...)
<Drup>
(doesn't work on values, only types)
<octachron>
I remember having much fun (re)discovering that "module M: F(X).signature = …" was a thing with codept.
<Drup>
octachron: tyxml is a good torture case for this, if you want
Student has joined #ocaml
<Student>
Hello!
<Student>
My professor gave us one function to work with but I'm having trouble trying to understand it. The function is:
malina has quit [Remote host closed the connection]
<Student>
rec sublists = function
<Student>
| h::t ->
<Student>
let st =
<Student>
sublists t
<Student>
| [] -> [[]]
<Student>
;;
<Student>
in map (function l -> h::l) st @ st
<Student>
Can anyone explain me how the st@st can do the recurisve call?
<lyxia>
it's (map (function l -> h :: l) st) @ st
<flux>
it doesn't. the recursive call is in the previous line: let st = sublists t in
<Student>
Oh I see. So why does concatenating it to the same name does not actually return the same value?
shon has joined #ocaml
<flux>
as lyxia pointed out, you're reading it with wrong precedency
<flux>
so it's not just concatanating st with itself
<flux>
it's concatenating the result of the map applied to the st and the lambda function with st
<yomimono>
although that page is quite annoying to use, because all of the modules just say they're of type S.something, and I can't seem to find the documentation for any of the S.whatever module types