adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
cateches has joined #ocaml
<cateches> can someone help me with generating my documentation? I don't understand what I'm doing wrong with ocamldoc http://pastebin.com/JZ7JMheC
darkf has joined #ocaml
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
zpe has joined #ocaml
cespinoza has quit [Quit: Saliendo]
zpe has quit [Ping timeout: 250 seconds]
AltGr has joined #ocaml
tnguyen has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
ontologiae has quit [Ping timeout: 245 seconds]
nojb has quit [Quit: nojb]
bytbox has quit [Remote host closed the connection]
<whitequark> Drup: I wish the pain subsided
jwatzman|work has quit [Quit: jwatzman|work]
ygrek has quit [Ping timeout: 244 seconds]
manud has joined #ocaml
marynate has joined #ocaml
paddymahoney has quit [Ping timeout: 245 seconds]
huza has joined #ocaml
cateches has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
bytbox has joined #ocaml
WraithM has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
sheijk_ has quit [Quit: .]
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
boogie has quit [Ping timeout: 245 seconds]
macdice` has joined #ocaml
macdice has quit [Ping timeout: 244 seconds]
WraithM has joined #ocaml
jcloud has joined #ocaml
tac_ has joined #ocaml
WraithM has quit [Ping timeout: 250 seconds]
badkins has quit []
shinnya has quit [Ping timeout: 246 seconds]
appd has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
<ebzzry> what is the proper way to use Stack.create?
huza has quit [Ping timeout: 258 seconds]
q66 has quit [Quit: Leaving]
tnguyen has quit [Ping timeout: 250 seconds]
<smondet> ebzzry: let s = Stack.create () ?
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<ebzzry> smondet: it was build with 'corebuild test.native'
<smondet> ok, so first, if you use Core say so on IRC
<smondet> then
manud has quit [Quit: manud]
<smondet> you're hitting a common problem, a value cannot have a polymorphic type like that at the toplevel of a module
kyun has joined #ocaml
<smondet> let () = let s = Stack.create () in Stack.push s 42
<smondet> and so on
manud has joined #ocaml
<smondet> try in the toplevel, let s = Stack.create (), you'll see the '_a type which kind of means "polymorphic until next time it's used"
<ebzzry> smondet: let me try that
simulacrum has quit [Quit: No Ping reply in 180 seconds.]
simulacrum has joined #ocaml
larhat has quit [Quit: Leaving.]
manizzle has quit [Ping timeout: 246 seconds]
manud has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
siddharthv_away is now known as siddharthv
zpe has quit [Ping timeout: 246 seconds]
taion809 has quit [Quit: Leaving]
tnguyen has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
c74d has quit [Remote host closed the connection]
axiles has joined #ocaml
<ebzzry> smondet: what is the difference between "let () = let s = Stack.create ..." and "let s = Stack.create ..." when it is in a file?
c74d has joined #ocaml
tnguyen has quit [Quit: tnguyen]
zpe has joined #ocaml
tnguyen has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
rwmjones has quit [Ping timeout: 245 seconds]
rwmjones has joined #ocaml
tnguyen1 has joined #ocaml
tnguyen has quit [Ping timeout: 272 seconds]
<ebzzry> def`: ping
<def`> pong
ygrek has quit [Ping timeout: 260 seconds]
tnguyen has joined #ocaml
tnguyen1 has quit [Ping timeout: 250 seconds]
<ebzzry> def`: How can I make merlin-locate work. It says: Needed cmt file of module 'Core' to locate 'Stack.create' but it is not present
<Unhammer> ebzzry, using opam?
<def`> ebzzry: you need to produce cmt files. I guess you are using opam, there is a trick I don't know to do so :)
<Unhammer> you might have to
<Unhammer> $ export OPAMKEEPBUILDDIR=true
<Unhammer> $ export OCAMLPARAM="_,bin-annot=1"
<Unhammer> $ opam reinstall core # or whatever package has stack
<def`> cool thanks Unhammer \o/
<Unhammer> heh np
<Unhammer> (I have those exports in my .bashrc; probably makes opam install a bit slower and .opam a lot bigger but it seems worth it to have the source available)
<ebzzry> Unhammer: Yes, I'm using opam
<ebzzry> let me try that.
<ebzzry> btw, is there a way to create new # directives in the toplevel?
<flux> yes, ocamlfind does it (#require)
<Unhammer> also ebzzry you'll need to add the path to your .merlin
<flux> ebzzry, regarding the 'what is the difference question', the first one surely reads let () = let s = Stack.create .. in
<flux> ebzzry, or actually in <expr> and it significies 's' is accessible only within that expression
<flux> ebzzry, when it's a top-level statement (ie. in a file) it means that it's a global and is visible for all statements (and expressions) after that
<ebzzry> flux: yes, and that since let also pattern matches, the () will match a function that returns unit.
<ebzzry> Unhammer: how do I add that path to the .merlin file?
<flux> ebzzry, yes, finally the <expr> needs to return () (or not return at all)
<flux> ah, I missed your actualy problem
<ebzzry> flux: the real question that i'm too shy to ask is that how can i create a stack (with Stack.create ()) at the "global" level that expressions in the file can later use.
<flux> so the let s = Stack.create () will work if you say what its type is or have the interference decide it for you
zpe has joined #ocaml
<flux> ebzzry, the reason why let s = Stack.create () cannot have type 'a and compile is that let's say you compile that, and then you compile a.ml and b.ml which both use stack.ml
<flux> now because thet type is 'a stack, a.ml can choose to put integers in and b.ml can choose to put strings in
<flux> all stack.ml, a.ml and b.ml are separately compiled, so they don't know what choices other modules took
<flux> therefore the exported type from stack.ml must be fixed when it is compiled
<ebzzry> flux: how can i fix it?
<flux> well, do you know what kind of elements you will put in?
<ebzzry> let presume i'm going to use ints
<flux> let s : int stack = Stack.create ()
<flux> alternatively:
<flux> let s = Stack.create ()
<flux> , but, within the same file
<flux> let add_42 () = Stack.push s 42
<flux> then the type interference will the type of 's' and it compiles as well
<flux> if the 's' does not need to be shared between difference modules, ie. they can each have their own stack and then just pass it as argument, you can also have let s () = Stack.create ()
<flux> of course, then whenever s () is called a new instance is created and the caller needs to hold on to it..
<flux> I think in general perhaps it doesn't sound the best idea to have a global stack variable, especially one shared by multiple modules, but perhaps you have a case ;)
<flux> (ie. in general global variables are not a modern approach, but at some situations they can be useful)
<ebzzry> ok. btw, why won't 'let s : int stack = Stack.create ()' work?
<flux> it will?
<ebzzry> I get: Error: Unbound type constructor stack
<flux> well I was just making that up
<flux> I don't know what is a Stack module
<flux> perhaps replace stack with Stack.t
<ebzzry> ah, yes. it works with that
<Unhammer> ebzzry, this is e.g. what I had to put in the .merlin to get batteries in there:
<Unhammer> B /home/me/.opam/system/build/batteries.2.3.1/_build/src/
<Unhammer> S /home/me/.opam/system/build/batteries.2.3.1/_build/src/
<ebzzry> where keyword should I search in the manual regarding a statement like 'let s : int stack = Stack.create ()', wherein there's the use of :
<ebzzry> Unhammer: ok
<flux> ebzzry, chapter 6, 'expressions': http://caml.inria.fr/pub/docs/manual-ocaml-4.01/expr.html
<flux> "Local definitions"
<flux> but perhaps it's not very clear ;)
<flux> lots of clicking is to be done
<flux> also 6.11 Module expressions
<flux> I think I should go and say it's very unclear for someone not already familiar with a lot of ocam..
<ebzzry> flux: hmm
<flux> so perhaps the ocaml books have their place :)
<flux> I think Jason Hickey's Introduction to OCaml was said to be good, it's available as pdf
<ebzzry> flux: ok.
<def`> (and it's called a type constraint)
<flux> not sure where that particular tidbit would be covered though
<flux> I mean the part that a module must not export polymorphic values
<ebzzry> flux: thanks
<ebzzry> Unhammer: sweet. that works. thanks
<Unhammer> there's an Issue for making it do that automatically https://github.com/the-lambda-church/merlin/issues/235
hhugo1 has joined #ocaml
<ebzzry> Unhammer: however, is there a way to make it work without modifying a project's .merlin file, i.e., have a "global" .merlin file?
<Unhammer> not that I know of
<ebzzry> Unhammer: hmm. ok.
manizzle has joined #ocaml
<ebzzry> :)
<def`> if the cmts and ml /mli are not.part of opam packaging, it will be hard to mechanize
<ebzzry> hmm
oscar_toro has quit [Ping timeout: 245 seconds]
mrpantoufle has quit [Ping timeout: 260 seconds]
mrpantoufle has joined #ocaml
hhugo1 has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<Unhammer> btw, what's "EXT nonrec" for?
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
tac_ has quit [Quit: Leaving]
<def`> type nonrec t = t
<def`> where the rhs t comes from the outer scope
<Unhammer> oh, did not know you could do that :-)
<def`> it is useful when rebinding types for functor arguments, for instance
<def`> it is a language extension, used in Core
<Unhammer> aha
ygrek has joined #ocaml
igstan has joined #ocaml
cago has joined #ocaml
<ebzzry> is there a data type like a list, that can contain different types, and that data can be modified?
<flux> the way to go about that is to put your different types in a sum type and put references of such types inside the list
<ebzzry> what is a sum type?
<flux> type data = String of string | Int of int let list = [ref (String "42"); ref (Int "42)]
<flux> of course the last " is erronous :)
<flux> then let () = let a = List.hd list in a := String "12765" works
siddharthv is now known as siddharthv_away
zpe has quit [Remote host closed the connection]
larhat has joined #ocaml
dubst3pp4 has joined #ocaml
ia0 has quit [Quit: leaving]
q66[lap] has joined #ocaml
ia0 has joined #ocaml
rand000 has joined #ocaml
Kakadu has joined #ocaml
manud has joined #ocaml
nojb has joined #ocaml
gnzh has joined #ocaml
marynate has quit [Quit: Leaving]
eikke has joined #ocaml
lordkryss has joined #ocaml
<ebzzry> flux: thanks!
eikke has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
<kaustuv> What exactly does hitting 'w' during merlin-type-enclosing do?
bezirg has joined #ocaml
siddharthv_away is now known as siddharthv
Simn has joined #ocaml
<def`> kaustuv: it should put the type in the kill ring
<flux> oh, the feature is there, it was just this morning I wondered how to add it 8-)
<flux> but then I noticed there is *merlin types*
<flux> and I can copy paste it from there
<kaustuv> def`: ah, interesting. I suggest changing the message from "killed <type>" to "Copied <type> to kill-ring".
<flux> yep, works great
<flux> I was missing that from tuareg where it is done with the universal prefix
<def`> kaustuv: I agree :)
cago has quit [Ping timeout: 260 seconds]
* adrien is glad the OPW lost the W to be more general
<flux> OPW? W?-)
<adrien> Gnome's Outreach Program for Women
<flux> oh, that
<adrien> now only OP
<adrien> and now for all unrepresented groups, not only women, which imho makes much more sense
<Unhammer> perhaps Saving the World is, like programming, easier to do if you go by the pareto principle =P
Muzer has quit [Ping timeout: 260 seconds]
<kaustuv> def`: merlin has the short paths patch?
Hannibal_Smith has joined #ocaml
<def`> kaustuv: by default a few versions ago, if you add -short-paths
<def`> only if you add -short-paths nowadays*
<kaustuv> Ah, good. Just add it to merlin-command?
vogler has joined #ocaml
Muzer has joined #ocaml
<def`> kaustuv: or with a FLG entry in the .merlin
<def`> FLG -short-paths
dsheets has joined #ocaml
<kaustuv> Perfect!
octachron has joined #ocaml
<kaustuv> Ooh, what's -nopervasives for?
eikke has joined #ocaml
<kaustuv> also the docstring for -open in ocamlmerlin -help seems incorrect
<def`> it was fixed a few days ago
tty57 has joined #ocaml
ollehar has joined #ocaml
tty57 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cago has joined #ocaml
<adrien> kaustuv: doesn't use pervasives
<adrien> kaustuv: main use: building the compiler
<adrien> ocamlc -nopervasives -I ../stdlib
eikke has quit [Quit: leaving]
tty57 has joined #ocaml
igstan has quit [Quit: igstan]
eikke has joined #ocaml
<flux> I think he meant with merlin
<flux> though it -sounds- like it would do the same thing but for what ends :)
<flux> merlin is really quite something. I find myself hoping for those features when coding C :-)
<flux> maybe time to look at the more advanced emacs c integration features..
eikke has quit [Quit: leaving]
eikke has joined #ocaml
appd has quit [Quit: Leaving...]
gnzh has quit [Ping timeout: 250 seconds]
<kaustuv> Hmm, I just updated my merlin to git master, and now C-c C-l seems to be broken
igstan has joined #ocaml
<rks`> kaustuv: how so?
<kaustuv> One sec, trying to pare down into a tiny repro case
<ebzzry> why do i see 'This expression has type 'a t/127858 but an expression was expected of type 'b t/383968'?
<def`> ebzzry: name clashing, where do you see that?
AltGr has left #ocaml [#ocaml]
<Unhammer> ebzzry, typically you need to re-evaluate the rest of your file …
<flux> ebzzry, easier to just re-evaluate the whole file :)
<flux> ebzzry, it means the code refers to some type that has since been shadowed
<ebzzry> i'm trying to update a field of a record type.
<ebzzry> let me do it again.
<flux> doesn't matter if it has been shadowed with the same definition I think, though it would be nice if it worked in that case
<ebzzry> let me try it again
<def`> kaustuv: but what is happening? wrong location or do you get error messages in emacs?
<kaustuv> def`: wrong type argument: stringp, nil
<def`> kaustuv: update emacs mode
<ebzzry> interesting. restarting the ocaml process fixed it indeed. thanks for tip, guys.
<def`> kaustuv: something is wrong in mode, we are looking at that
<Unhammer> ebzzry, if you use tuareg in emacs you can typically just C-c C-b instead of restarting the process
<kaustuv> def`: ah, I see. My emacs mode is with whatever the opam package is at, not the git-master that I just pinned
<kaustuv> I'll look at it again after lunch
badon has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
eikke has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 272 seconds]
tane has joined #ocaml
ollehar has joined #ocaml
lamC has joined #ocaml
<lamC> Is there any http performance testing tool like JMeter was written by OCaml? I can't found some on https://github.com/rizo/awesome-ocaml
nojb has quit [Quit: nojb]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
kyun has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
_andre has joined #ocaml
manud has quit [Quit: manud]
eikke has joined #ocaml
lamC has quit [Ping timeout: 246 seconds]
mort___ has joined #ocaml
olasd has quit [Quit: WeeChat 1.0]
olasd has joined #ocaml
olasd has quit [Changing host]
olasd has joined #ocaml
jphx-away is now known as jphx
<jphx> evening
<jphx> if i want to make web requests, for consuming rest APIs, what package should i look at?
<flux> I would probably look at ocamlnet and yojson
<rks`> cohttp
<rks`> (+ yojson probably yes)
<jphx> thanks
<MasseR> rks`: there wouldn't be out of the box POST (urlencoded, form-data) for cohttp would there?
psy_ has quit [Ping timeout: 246 seconds]
Thooms has joined #ocaml
<rks`> MasseR: http://mirage.github.io/cohttp/ (i.e. I don't know, have a look)
tnguyen has quit [Ping timeout: 244 seconds]
rand000 has quit [Quit: leaving]
<MasseR> Yea I've been looking, and it seems like I have to roll my own
<MasseR> At least I didn't find any obvious way
<jphx> so is there a package useful for consuming rest apis? cohttp seems to be more server oriented?
<jphx> (i'm still googling the various packages)
<Drup> jphx: cohttp is both
<Drup> MasseR: well, "roll your own" is pretty much 5 lines of ocaml, but, I suppose you have to roll your own
<flux> it's asynchronicity-oriented, though?-)
ggole has joined #ocaml
<MasseR> Drup: Yeah, the specs are simple, and I have an idea how it could be done, but I'm still a relatively ocaml newb
<flux> I'm thinking netclient might be more directly applicaple, but it does have a huge interface
<Drup> flux: and it's much more heavyweight
<flux> what do you mean?
<flux> I'd imagine the code path to implement http retrieval is not that huge.
<Drup> I mean :ocamlnet:
dsheets has quit [Ping timeout: 245 seconds]
<flux> well I did mention its interface is big
<flux> it might take some time to find the bits and pieces
tty57 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux> but on the other hand you don't need to deal with monads ;-)
<Drup> bah, non-general monads are not that much of a problem, I think
dsheets has joined #ocaml
<jphx> i'm trying the beta for opam 1.2
<jphx> it's rather nice
<flux> I woudl suggest to install aspcud as well to help its solver
BitPuffin has joined #ocaml
<jphx> i did
<jphx> i dont know what exactly it does, but when i opam init it complained about missing aspcud
<jphx> so i added it
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
rand000 has joined #ocaml
siddharthv is now known as siddharthv_away
badkins has joined #ocaml
ollehar has quit [Ping timeout: 258 seconds]
fraggle-boate has quit [Ping timeout: 260 seconds]
igstan has quit [Quit: igstan]
shinnya has joined #ocaml
igstan has joined #ocaml
tnguyen has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
qiukun has quit [Ping timeout: 260 seconds]
<Unhammer> bah why is there no UTF8.enum
<Unhammer> not even .map :(
qiukun has joined #ocaml
avsm has joined #ocaml
tty57 has joined #ocaml
ollehar has joined #ocaml
tane has quit [Quit: Verlassend]
SethTIsue has joined #ocaml
igstan has quit [Quit: igstan]
nojb has joined #ocaml
ontologiae has joined #ocaml
igstan has joined #ocaml
tane has joined #ocaml
<gasche> Unhammer: post an issue / send a pull request?
ollehar has quit [Ping timeout: 245 seconds]
rand000 has quit [Ping timeout: 245 seconds]
darkf has quit [Quit: Leaving]
ollehar has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
<Unhammer> oh my bad there is a map
rand000 has joined #ocaml
ygrek has joined #ocaml
<adrien> gasche: XL said at last OUPS that he wasn't opposed to moving ocamlbuild out of the repo provided there was for sure a team of maintainer that would keep developing it
<gasche> thanks for the info; that's a difficult condition to satisfy right now
tane has quit [Quit: Verlassend]
<adrien> I think it can be fine and that you asked about it is great
<adrien> an answer on mantis is valuable
<adrien> I dunno if I'll have time for ocamlbuild myself, too much stuff on win-builds and then the cross-compilatio
igstan has quit [Quit: igstan]
larhat has quit [Quit: Leaving.]
cago has left #ocaml [#ocaml]
dubst3pp4 has quit [Quit: Ĝis la revido!]
yomimono has joined #ocaml
<gasche> (my mantis remark initially started to as an email to the three self-designated volunteers, but I'm wary of private discussions)
Thooms has quit [Quit: WeeChat 0.4.3]
<avsm> adrien: any opinions on that Appveyor thing?
<avsm> adrien: would be really nice to start upstreaming some of the WODI patches so that it just works (e.g. for Lwt) on Cygwin at least
<avsm> that seems to be a good stepping stone to MinGW
<adrien> appveyor?
<gasche> "travis that works on Windows"
<adrien> ok
<adrien> well, obviously, no opinion on it since I didn't know what it was
<adrien> hmmm
<adrien> but is it even free software?
<adrien> i.e. can it be used for anything?
bezirg has quit [Ping timeout: 250 seconds]
<MercurialAlchemi> I don't know about Travis, but Jenkins can have Windows slaves
<MercurialAlchemi> so I'm not sure why you'd want a "Travis that can run on Windows"
<adrien> I don't get the link between appveyor and wodi patches =/
<avsm> adrien: wodi seems to have a lot of local patches for packages; if those were upstreamed (or ported to opam), then we can keep packages working via appveyor builds
<adrien> ah
<adrien> but it looks like appveyor is for .net
<adrien> don't know how it accepts other things
<adrien> especially with the ocaml setup which is a bit uncommon
<avsm> I sent a mail to the caml-list — it builds OPAM fine; https://ci.appveyor.com/project/avsm/opam/history
<avsm> capturing some of the windows magic in scripts would in general let other people pick things up more easily, i think
<adrien> ah, ok
<adrien> didn't see that one go through
<adrien> too busy right now unfortunately =/
morphles has joined #ocaml
<avsm> just putting it in your mind :-)
<adrien> heh :)
<adrien> smart move ;-)
tane has joined #ocaml
<nicoo> avsm: Putting something on adrien's mind is a sure-fire way for it to get bitrot :o
<adrien> pfffffft
<adrien> polish siphash!
<avsm> :-)
<adrien> and test win-builds again but with more RAM free this time!
<nicoo> adrien: My work laptop has 12GB of RAM, this should be enough even for win-builds
<adrien> you only need 2GB I think ;-)
<adrien> well
<adrien> now that you've admitted you could run it... :)
<gasche> in any case, WODI patches certainly should get to maintainers somehow...
<gasche> s/get/go/
slash^ has joined #ocaml
<adrien> work to turn a platform-specific patch to one that can be merged upstream shouldn't be underestimated :D
<Drup> avsm: while you're here, quick question : is cowabloga actively worked on and all that ? It seems mostly adapted for openmirage.org
<nicoo> adrien: My work laptop is at my office, and I'm not
<adrien> nicoo: you slacker!
<nicoo> adrien: I'm sick
<nicoo> (and not (only) in my mind)
<adrien> oh, sorry :P
WraithM has joined #ocaml
mort___ has quit [Ping timeout: 260 seconds]
oriba has joined #ocaml
bezirg has joined #ocaml
cago has joined #ocaml
avsm has quit [Ping timeout: 258 seconds]
avsm has joined #ocaml
<avsm> Drup: its used by a few people, but not stable or anything (e.g. http://jon.recoil.org/blog)
<avsm> Drup: cleanups welcome…
<avsm> (just wanted to get it out of the website first)
<Drup> avsm: I would just like to use lambdoc and tyxml instead of cow :3
<avsm> lambdoc -> tyxml -> xmlm sounds easy enough
<Drup> doesn't even need the xmlm part
<Drup> I mean, tyxml can serialize
nojb has quit [Quit: nojb]
<Drup> (avsm: It's mostly for showcasing reasons btw, you stream music in a typesafe way, I want to write statically checked blogs :D)
<avsm> yep, no objection there!
bytbox has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 245 seconds]
ccmaru has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
marynate has joined #ocaml
* nicoo will need to play with the OCaml sound streaming thing, at some point.
eikke has quit [Ping timeout: 240 seconds]
ccmaru has quit [Ping timeout: 244 seconds]
ollehar has quit [Ping timeout: 272 seconds]
rand000 has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 258 seconds]
ollehar has joined #ocaml
bezirg has quit [Quit: Leaving.]
SethTIsue has quit [Quit: SethTIsue]
SethTIsue has joined #ocaml
SethTIsue has quit [Ping timeout: 244 seconds]
vogler has quit [Ping timeout: 245 seconds]
eugene_klm has joined #ocaml
tizoc has quit [Changing host]
tizoc has joined #ocaml
ccmaru has joined #ocaml
ccmaru has left #ocaml [#ocaml]
jwatzman|work has joined #ocaml
Anarchos has joined #ocaml
manizzle has quit [Ping timeout: 272 seconds]
fraggle-boate has joined #ocaml
koderok has joined #ocaml
q66 has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
cago has quit [Quit: cago]
boogie has joined #ocaml
octachron has quit [Quit: Leaving]
jonludlam has quit [Quit: Coyote finally caught me]
zpe has quit [Remote host closed the connection]
rand000 has joined #ocaml
Kakadu has quit [Quit: Page closed]
SethTIsue has joined #ocaml
SethTIsue has quit [Client Quit]
SethTIsue has joined #ocaml
nojb has joined #ocaml
avsm has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 245 seconds]
SethTIsue has quit [Quit: SethTIsue]
nojb1 has joined #ocaml
marynate has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
nojb1 has quit [Quit: WeeChat 1.0]
psy has joined #ocaml
psy_ has joined #ocaml
SethTIsue has joined #ocaml
psy has quit [Read error: Connection reset by peer]
jonludlam has joined #ocaml
SethTIsue has quit [Ping timeout: 244 seconds]
tty57 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
boogie has joined #ocaml
seanmcl has joined #ocaml
ontologiae has joined #ocaml
nojb has quit [Quit: nojb]
tnguyen has quit [Quit: tnguyen]
Kakadu has joined #ocaml
nojb has joined #ocaml
nojb has quit [Client Quit]
bytbox has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
nojb has joined #ocaml
<whitequark> hm
_whitelogger has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
hasbrown_delight has joined #ocaml
koderok has quit [Ping timeout: 272 seconds]
<hasbrown_delight> Hey everyone. I've tried lots of Google-ing, and tried a few different options, but I haven't yet found an editor that suits my needs. Can anyone help? Specifically, my requirements are 1) not Emacs, 2) syntax highlighting, 3) type information display (i.e. in a tooltip or a region of the screen), and 4) works with Mirage projects (not a typical
<hasbrown_delight> ocamlbuild or Makefile project--kind of both).
<hasbrown_delight> I've tried Ocaml-Top, OcaIDE (the Eclipse plugin), vim, utop (a top-level, I know), and ocaml top-level, all deficient in different ways
<hasbrown_delight> The type information display is what is most commonly missing; only Oca IDE even *sometimes* works for my project
<companion_cube> vim + merlin is pretty good
<hasbrown_delight> merlin?
boogie has quit [Remote host closed the connection]
<whitequark> or sublime text plus merlin
<companion_cube> or ed + merlin
<companion_cube> ^^
<hasbrown_delight> lol, all merlin
<hasbrown_delight> OK I will try it and see if it gives type info while editing my Mirage project
<hasbrown_delight> As a side note, I never saw this mentioned anywhere in all my Google searches...
manizzle has joined #ocaml
nojb has quit [Quit: nojb]
larhat has joined #ocaml
hasbrown_delight has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
slash^ has quit [Read error: Connection reset by peer]
hasbrown_delight has joined #ocaml
bytbox has quit [Remote host closed the connection]
<hasbrown_delight> well, hallelujah :)
<hasbrown_delight> seems to work OK
<ousado> hasbrown_delight: what exactly?
<hasbrown_delight> vim + merlin
<companion_cube> \o/
<hasbrown_delight> with a quick key map to :TypeOf, it's basically perfect
<companion_cube> hasbrown_delight: you might notice .merlin files in many Ocaml projects
<hasbrown_delight> thanks, companion_cube
<companion_cube> the completion is good too, and if you have Syntastic...
<hasbrown_delight> how can I get completion?
<hasbrown_delight> sorry, haven't looked over the docs
<hasbrown_delight> and maybe you can also tell me how to change the highlight color for :TypeOf, since you seem to be familiar with it ;)
<hasbrown_delight> maybe that's just a standard Vim color
sheijk has joined #ocaml
<hasbrown_delight> (nevermind, found the docs)
bytbox has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
bytbox has quit [Remote host closed the connection]
ontologiae has joined #ocaml
vincom2 has quit [Ping timeout: 244 seconds]
reventlov has quit [Ping timeout: 258 seconds]
sivoais has quit [Ping timeout: 272 seconds]
diethyl has quit [Remote host closed the connection]
diethyl has joined #ocaml
sivoais has joined #ocaml
reventlov has joined #ocaml
vincom2 has joined #ocaml
bytbox has joined #ocaml
<hasbrown_delight> companion_cube: sorry to keep bothering you, but do you know how to direct Merlin to find the .cmt files of all the libraries I have installed already?
<companion_cube> hmmmm it should not be necessary
<companion_cube> the .cmi should be enough if you add PKG foobar in the .merlin
bytbox has quit [Remote host closed the connection]
<hasbrown_delight> It doesn't appear to be the case. For example, package mirate-net-xen and mirage-net-unix are both in my .merlin file, but :Locate gives: "Needed cmt file of module 'Ipv4' to locate 'Ipv4.Make' but it is not present"
<hasbrown_delight> and, FWIW, :locate on the Printf constructor gives "'Printf' seems to originate from 'Printf' which could not be found"
nop0x07bc has joined #ocaml
<smondet> hasbrown_delight: yes :Locate want to find the source, so it would need more than the .cmi files
<smondet> s/want/wants/
<hasbrown_delight> you know, the name Merlin evokes such hope... I assumed everything would just 'magically' work
<hasbrown_delight> Any idea how to tell it where to find the proper files for all libraries/packages I have installed so it just does?
<ggole> You should still be able to use completion, error checking etc
<ggole> But location and opam packages is a bit of a fiddle at the moment
<hasbrown_delight> Completion seems to work
<hasbrown_delight> But :Locate definitely does not :-\
<hasbrown_delight> So I take it that I should not expect it to work right now?
<ggole> It should work if you do the necessary work manually, as in this: https://github.com/the-lambda-church/merlin/issues/234
<ggole> There's an open issue on making that more seamless.
<hasbrown_delight> hmmm OK
<hasbrown_delight> ggole: since you seem to be familiar with Merlin, do you know how to change the colors used for TypeOf highlighting? Is it just referencing a standard Vim color?
<ggole> I'm afraid I'm not sure since I use merlin from emacs ;)
<hasbrown_delight> Oh no! I'm surrounded by heathens!
<hasbrown_delight> Who know more than I do! ;)
<hasbrown_delight> I kid, I kid...
qiukun has quit [Ping timeout: 260 seconds]
<ggole> It's just customizing a variable here, I suspect it's similarly easy on the dark side.
<ggole> Don't know the details though. Sorry.
<hasbrown_delight> OK, I think it's just using the standard color scheme then
<hasbrown_delight> thanks
<hasbrown_delight> (for future reference, it is indeed using Vim's highlight color scheme, with the 'EnclosingExpr' highlight group)
ontologiae has quit [Ping timeout: 245 seconds]
<hasbrown_delight> OK, ggole, one more question: what is the actual command to open type completion? If you know in vim... I'd just like to remap it to some other key sequence
<hasbrown_delight> (nevermind, one more Vim-specific issue :). Disregard.)
<ggole> Yeah, no idea on that one.
<hasbrown_delight> OK, I think I have a reasonable IDE set up for OCaml now. Thanks for Merlin (am I correct in assuming you are the author?).
<Unhammer> should -1 be the same as (0-1) ?
<Unhammer> utop[79]> UTF8.look "meh" -1;;
<Unhammer> Error: This expression has type int -> BatUChar.uchar
<Unhammer> but an expression was expected of type int
<Unhammer> as expected
<Unhammer> but
<Unhammer> utop[82]> UTF8.look "meh" (0-1);;
<Unhammer> - : BatUChar.uchar = UChar.of_char '
morphles has quit [Ping timeout: 245 seconds]
<Unhammer> (that's a NUL, if irc doesn't show it)
<ggole> Nah, that's mostly def`. I added a few patches for the emacs side of things.
<ggole> Unhammer: <expr> -1 will unfortunately be parsed as <expr> - 1
<ggole> You need to parenthesize.
<Unhammer> utop[87]> UTF8.look "meh" (-1);;
<Unhammer> - : BatUChar.uchar = UChar.of_char '
<Unhammer> ok
manud has joined #ocaml
<Unhammer> ugh that's probably a sign I should get to bed =P
ontologiae has joined #ocaml
oscar_toro has joined #ocaml
tristero has quit [Remote host closed the connection]
oscar_toro has quit [Ping timeout: 258 seconds]
oscar_toro1 has joined #ocaml
nojb has joined #ocaml
mseve has joined #ocaml
<nlucaroni> it's annoying an upgrade to ocamlfind requires complete rebuild of opam installed packages. Is there any plan to add build tools/dependencies to the opam files to signify they aren't library dependencies?
BitPuffin has quit [Remote host closed the connection]
xs_ has joined #ocaml
bytbox has joined #ocaml
badon_ has joined #ocaml
badon has quit [Ping timeout: 244 seconds]
badon_ is now known as badon
tane has quit [Quit: Verlassend]
<smondet> nlucaroni: I think I've heard something about that yes, "build-only" dependencies
_andre has quit [Quit: leaving]
jao has quit [Ping timeout: 272 seconds]
<Drup> nlucaroni: in opam 1.2
<nlucaroni> oh nice. thanks. it seemed reasonable enough to have.
axiles has quit [Remote host closed the connection]
oscar_toro1 has quit [Ping timeout: 258 seconds]
hhugo1 has joined #ocaml
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 245 seconds]
manud has quit [Quit: manud]
ollehar has quit [Ping timeout: 260 seconds]
nop0x07bc has quit [Quit: WeeChat 0.4.3]
NoNNaN has joined #ocaml
mseve has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ggole has quit []
milosn has quit [Remote host closed the connection]
milosn has joined #ocaml
bytbox has quit [Remote host closed the connection]
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
lordkryss has quit [Quit: Connection closed for inactivity]
artagnon has joined #ocaml
<artagnon> Can I get oasis to build cpp sources independently and link it to the executable?
<artagnon> There's only a CSources directive; adding a .cc source file there doesn't seem to build it.
Simn has quit [Quit: Leaving]
manud has joined #ocaml
<Drup> more knowledgeable people will confirm, but afaik, you can't link any C++ with ocaml
<companion_cube> hasbrown_delight: oh sorry, I don't use :Locate so I thought it would work with only .cmi (as for completion) :/
<hasbrown_delight> no worries, I got it all sorted out
<companion_cube> hasbrown_delight: completion should be c-x c-o
<hasbrown_delight> Drup: for sure oyu can: just export "C" those functions
<companion_cube> (although I've been using supertab for so long that I just use tab naturally)
<artagnon> Drup: I don't want to link it with OCaml, but with the generated LLVM.
<Drup> hasbrown_delight: yeah, ok, you can do that, that's linking through the C API, and OCaml can link with stuff respecting the C api, yes.
<hasbrown_delight> I realized that Omnicomplete is actually a "legit" feature of Vim and merlin just extends it
<Drup> that's not exactly the same than linking with C++ directly
<artagnon> Right.
<Drup> artagnon: I see, I don't know :(
<hasbrown_delight> Sure. You might also be able to declare those functions as __cdecl and link directly
<Drup> as I said, I'm not knowledgeable in these questions
<artagnon> Hm.
<whitequark> Drup: you can totally link C++.
<whitequark> the easiest way is to pass -cc g++ to ocamlopt
hhugo1 has quit [Quit: Leaving.]
<artagnon> I've done that, but oasis doesn't seem to pick up my .cc files at all.
<Drup> whitequark: huum, what is impossible with C++ then ?
<whitequark> Drup: nothing?
<whitequark> artagnon: maybe use the .cpp extension?
<whitequark> it may be a problem of OASIS.
* artagnon nods
<hasbrown_delight> well, it is Turing-complete, so you're not wrong...
* artagnon tries
<Drup> whitequark: no I mean, what's impossible in making OCaml and C++ collaborating
<artagnon> Nope, it's still not compiling the file.
<Drup> you can't really bind C++ functions directly, iiuc, you need to go through C
<whitequark> Drup: oh, sure, you need to declare them as extern "C"
xs_ has quit [Ping timeout: 246 seconds]
<Drup> whitequark: once, I emitted the idea of writing an LLVM pass in OCaml, and you told me it was crazy and I could never call it back to C++, did I misunderstood ?
<Drup> (and it was also stupid, because I could just call it from OCaml and be done, but that's another thing)
<artagnon> I can't seem to make it a library either, because it wants an .ml interface (or something)
<artagnon> Drup: Objects in OCaml aren't converted to C objects for free.
<artagnon> Sorry, the other way around.
<whitequark> Drup: what artagnon says is the culprit.
<Drup> artagnon: that's obvious
<whitequark> you'd need to wrap every C++ thing in LLVM-land into something to make it manipulable by your OCaml code
<whitequark> and existing bindings don't help you much here, as they're centered around IR emission
<whitequark> not transformations
<artagnon> Right.
<artagnon> I'm writing a plugin: a gc.
<whitequark> indeed, those interfaces aren't exported in LLVM-C at all
MercurialAlchemi has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
<artagnon> I need to write C++ and link it to LLVM libs.
<Drup> "(12:25:33) whitequark: you do realize you can't make ocaml emit a shared object that clang can load?"
<Drup> right, so yes, I misunderstood
<artagnon> I'm trying to emit that shared object.
<Drup> (note: this is from 4/4/2014 :D)
<artagnon> Library.
<whitequark> Drup: actually I now think that is wrong
<artagnon> Unfortunately, the Library directive demands a Module directive pointing to a .ml file.
<whitequark> well
<whitequark> I was tasked with emitting a shared object a C++ library can load :D
<artagnon> It has nothing to do with ocaml.
eugene_klm has quit [Ping timeout: 258 seconds]
<artagnon> Oh.
<whitequark> I believe you can do -output-obj and then cc -shared it.
<whitequark> however you're left with the data representation problem
<Drup> whitequark: who gave you such a task and how is it possible you didn't scream in horror ? :D
eugene_klm has joined #ocaml
<Drup> I just realized I can cut the number of functor by 2 in tyxml, reduce the number of type annotation and make library author happier. What I don't realize is how the fuck I didn't saw it before
oriba_ is now known as oriba
<whitequark> oh whoa
<artagnon> To top off my problems, the oasis homepage is down.
<artagnon> Where can I find llvm/CodeGen/GCStrategy.h other than the sources?
bytbox has joined #ocaml
<artagnon> Is it in the llvm distribution that comes with `opam install llvm`?
<whitequark> no
<whitequark> only in LLVM source.
<artagnon> Damn it! What is this section talking about then? http://llvm.org/docs/GarbageCollection.html#plugin
<artagnon> I need the llvm sources to write a plugin?
<whitequark> yes
<artagnon> Great. Thanks for clearing that up.
<whitequark> well, only headers would work, like the llvm-X.X-dev package in Debian
<whitequark> but in general yes
<artagnon> What did I mess up now? http://pastie.org/9635772
<whitequark> first, you need --std=c++11
<artagnon> Right, fixed that.
<artagnon> What about the first three errors?
<whitequark> second, you don't just pass -I/-l
<artagnon> What should I be doing then?
eugene_klm has quit [Ping timeout: 246 seconds]
<whitequark> you need something like clang++ `llvm-config-3.4 --cxxflags --ldflags --libs`
<artagnon> Got it.
<artagnon> Built successfully! Now, I just need to get oasis to do it for me.
<Drup> krkrkr
<Drup> good luck with that part.
<artagnon> If I scrap oasis, compiling the rest of the project is a headache.
<Drup> you will probably need to add some ocamlbuild rules
* Drup grins covertly
NoNNaN has quit [Remote host closed the connection]
tnguyen has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
avsm has joined #ocaml
WraithM has quit [Ping timeout: 260 seconds]
tristero has joined #ocaml
manud has quit [Quit: manud]
jonludlam has quit [Quit: Coyote finally caught me]
badon has quit [Quit: Leaving]
tnguyen has quit [Ping timeout: 272 seconds]
tobiasBora has joined #ocaml
appd has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
badkins has quit [Remote host closed the connection]
malo has quit [Remote host closed the connection]
madroach has joined #ocaml
shinnya has quit [Ping timeout: 258 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AltGr has joined #ocaml
darkf has joined #ocaml
badkins has joined #ocaml
hasbrown_delight has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]