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
philtor has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
philtom has quit [Ping timeout: 240 seconds]
philtor has quit [Ping timeout: 246 seconds]
<pyon> How do I project from a tuple? (Similar to Standard ML's #1, #2, #3, etc.)
tautologico has joined #ocaml
msaegesser has quit [Ping timeout: 255 seconds]
msaegesser has joined #ocaml
<adrien> you don't
<adrien> let a, _, _ = triplet in
<adrien> ...
<adrien> or let a, _b, _c = triplet in ...
<Drup> (not that fst and snd for pairs are predefined)
<Drup> note*
<mrvn> unfortunately one can't write 'let a, ... = n_let in '
englishm has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
pango has quit [Ping timeout: 245 seconds]
shinnya has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
rz has quit [Quit: Ex-Chat]
rz has joined #ocaml
q66 has quit [Quit: Leaving]
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
pango has joined #ocaml
ontologiae has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
rz has quit [Quit: Ex-Chat]
jao` has quit [Ping timeout: 272 seconds]
zarul has quit [Ping timeout: 264 seconds]
siddharthv has joined #ocaml
siddharthv has quit [Client Quit]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
philtom has joined #ocaml
philtom has quit [Read error: No route to host]
milosn has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
zarul has joined #ocaml
zarul has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 246 seconds]
jbbza has joined #ocaml
<jbbza> Type Checker is killing me
avi___ is now known as avi__
<jbbza> 1) Set a reference to a list, 2) Pass it to an function, which may or may not update the reference 3) Attempt to dereference it for a function call and Ocaml says the types are not compatible
<jbbza> Error: This expression has type 'a list but an expression was expected of type (((string * string * int * 'b list) list -> (string * string * int * 'b list) list -> unit) * Set.t * 'a list ref * (string * string * int * 'b list) list * (string * string * int * 'b list) list) list list
<jbbza> Should be compatible...
<mrvn> nope
ontologiae has quit [Ping timeout: 245 seconds]
<jbbza> Please elaborate
<mrvn> the two types are not the same
<mrvn> Note that there is a 'a in the second one
<jbbza> Yeah, but 'a has the type of that entire type
<jbbza> ocaml just did not deduce it for some reason
<mrvn> that would be (((((string * string * int * 'b list) list -> (string * string * int * 'b list) list -> unit) * Set.t * 'a list ref * (string * string * int * 'b list) list * (string * string * int * 'b list) list) list) as 'a) list
<jbbza> Yes, 'a has that type
<mrvn> doubtfull. And I think that would need -rectypes
<jbbza> Its not doubtful since I wrote the program, but thanks
<mrvn> try defining a type and annotating it
<jbbza> I'll look into that. Rectypes worked, thanks for the help
<mrvn> Then you need to encapsulate it in a constructor.
samrat has joined #ocaml
malo_ has quit [Ping timeout: 272 seconds]
jbbza has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
ZenosDance has joined #ocaml
oscar_toro has joined #ocaml
ggole has joined #ocaml
<mrvn> do you mean a spin lock?
Kakadu has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
chris2 has quit [Ping timeout: 272 seconds]
shinnya has joined #ocaml
axiles has joined #ocaml
chris2 has joined #ocaml
Mandus has quit [Ping timeout: 246 seconds]
ZenosDance has quit [Ping timeout: 272 seconds]
Mandus has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
MercurialAlchemi has joined #ocaml
gereedy has quit [Ping timeout: 240 seconds]
gereedy has joined #ocaml
hhugo has joined #ocaml
pminten has joined #ocaml
<companion_cube> whitequark: why do you need to specify "yojson" in your deriving library?
<companion_cube> you could just copy the type definition and underline it's compatible with yojson's one
Simn has joined #ocaml
rand000 has joined #ocaml
<whitequark> companion_cube: I'll ask the inverse question: why would I want to do that?
<companion_cube> because the type might be compatible with jsonm too, for instance :)
<whitequark> what?
<whitequark> jsonm is a purely streaming codec
<companion_cube> hmm right
<companion_cube> nevermind, I thought yojson wasn't the only non-streaming json lib
zarul has quit [Ping timeout: 255 seconds]
milosn_ has joined #ocaml
milosn_ has quit [Client Quit]
milosn_ has joined #ocaml
milosn_ has quit [Client Quit]
dnm has joined #ocaml
<whitequark> "Effectivement, le "::" n'est pas un véritable opérateur, mais bien un constructeur de type."
<whitequark> >véritable opérateur
<ggole> ?
dnm has quit [Ping timeout: 276 seconds]
hhugo has quit [Quit: Leaving.]
<def`> 'true operator' although this sentence is wrong
<def`> it's not a type constructor either (:|)
<Drup> (soon™)
<whitequark> it's pretty impressive how many french loanwords english has
<whitequark> I think it was like 80% overall?
<def`> soon what?
<Drup> (I spoke with doligez, he said "we will look at it during the next weeks")
<Drup> def`: infix constructors
<def`> (VALUE constructor, -pedantic)
<whitequark> static exceptions, try #n+1
<Drup> whitequark: why is that funny ? ^^'
<whitequark> I dunno
<whitequark> at least now xleroy seems to be in favor
<Drup> def`: oh, yes, you are right but very pedantic :p
<whitequark> def`: one thing that annoys me about merlin is how it doesn't handle completion of 1-character things
<whitequark> like Longident.t
<whitequark> or _ (placeholder)
<whitequark> but not sure if broken in merlin or ST
<whitequark> def`: also, I think we need to submit ST-merlin to package control
<whitequark> it's now good enough to be generally usable
zarul has joined #ocaml
<ggole> Hmm, completion of one character things works ok here
<ggole> At least, they get printed along with everything else
<ggole> Although completion doesn't seem to see the stdlib :/
hhugo has joined #ocaml
<whitequark> ggole: on ST?
<ggole> No, emacs
pyon has quit [Quit: Fiat justitia, ruat caelum.]
<def`> after
<def`> oops
<ggole> Hmm, completion works fine after I open the module in question
<ggole> (Even if I subsequently delete the open statement.)
<def`> global modules are loaded on demand, this can be fixed
<ggole> Ah, so if I type Longname.<tab> myself it will work
<ggole> But Long<tab> won't (until the above is done).
<def`> maybe maybe not... this can be improved, I have a few hours to kill :)
<def`> Longname.<tab> should always work
<ggole> Yeah, it works ok
<ggole> I was just a bit confused by the context-sensitive behaviour of Long<tab>
<def`> hmmm, what?
<def`> why is it.context sensitive ?
<ggole> It works if you have open Longname in the buffer, or if you have typed Longname.<tab>
<ggole> Maybe I should have said "history sensitive"
<def`> Right :)
<ggole> (Since after you've done either of those things, it will continue working.)
Anarchos has joined #ocaml
bytbox has quit [Ping timeout: 272 seconds]
ontologiae has joined #ocaml
pyon has joined #ocaml
ustunozgur has joined #ocaml
wwilly has joined #ocaml
Hannibal_Smith has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
<wwilly> bonjour
samrat has quit [Client Quit]
inr has quit [Ping timeout: 260 seconds]
inr has joined #ocaml
mhi^ has joined #ocaml
q66 has joined #ocaml
ansc has joined #ocaml
<ansc> when i try "include Num;;" in the interactive console 'ocaml' I get: "Error: Reference to undefined global `Num' "
<Drup> ansc: "#require "num";;"
thomasga has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
<ansc> thanks, it worked when I wrote "#use "topfind";;" and then "#require "num";;"
ustunozgur has joined #ocaml
thomasga has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe_ has joined #ocaml
<Unhammer> let reg = GdkPixbuf.get_pixels pixbuf ;; (* http://lablgtk.forge.ocamlcore.org/refdoc/Gpointer.html#TYPEregion – how would I pass this to a C fn that takes a "const * void"? *)
zpe has quit [Ping timeout: 240 seconds]
<Unhammer> have
<Unhammer> let cmsDoTransform = foreign "cmsDoTransform" (cmsHTRANSFORM @-> ptr void @-> ptr void @-> cmsUInt32Number @-> returning void)
zpe_ has quit [Ping timeout: 245 seconds]
<Unhammer> but don't understand how to turn the Gpointer.region into something I can send to a fn that requires a "ptr void"
samrat has joined #ocaml
bartbes_ is now known as bartbes
<Drup> you want to bind a additional function for gdk ?
<adrien> huh
hhugo has quit [Quit: Leaving.]
<adrien> I wouldn't mix ctypes with other bindings
<adrien> it's just going to be more work
englishm has quit [Read error: Connection reset by peer]
<Unhammer> nah I just want to send an image into a c functoin
<adrien> I also don't believe ctypes really saves work
<adrien> which C function?
<adrien> are you sure the format of the data returned by get_pixels matches what you need?
<Unhammer> void cmsDoTransform(cmsHTRANSFORM Transform, const void * InputBuffer, void * OutputBuffer, cmsUInt32Number Size);
<Unhammer> is the C function
darkf has quit [Quit: Leaving]
<Unhammer> I'm not sure it does, but it's the closest I've found :-)
<Unhammer> (I am – just for the challenge – trying to make a barebones image viewer that will convert the image to the monitor colour profile)
tane has joined #ocaml
ansc has quit [Ping timeout: 246 seconds]
<adrien> you need to check they match on the C side, I can't tell
hhugo has joined #ocaml
dsheets has joined #ocaml
<adrien> errrrr, there's someting I don't understand
<adrien> I'm using C bindings with static libs
<adrien> hmm
<adrien> it's crap
<adrien> the list of C libraries is stored in .cm* files and that list isn't correct
<adrien> but I can't get rid of it
cody__ has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
zpe has joined #ocaml
englishm has joined #ocaml
englishm has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 245 seconds]
englishm has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
mort___ has joined #ocaml
oriba has joined #ocaml
lbaan has quit [Quit: sleeping device]
waneck_ has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
waneck has quit [Ping timeout: 272 seconds]
samrat has joined #ocaml
shinnya has joined #ocaml
pminten has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
shinnya has quit [Ping timeout: 240 seconds]
Thooms has joined #ocaml
<def`> ggole: fixed the global modules listing with <tab>
<ggole> \o/
<ggole> I should update merlin, I guess
<def`> whitequark: update sublime-text-merlin to complete on empty input
<def`> ted*
<def`> ggole: If you want it right now :P
<ggole> I don't have a burning need, but I am behind a bit and this is a good excuse to get up to date.
dsheets has joined #ocaml
<ggole> Hmm, doesn't type check: presumably there's a change between the prerelease 4.02 I'm on and the released version.
<ggole> Buh, every time I do a fresh opam switch I fall over the fact that it doesn't install things like ocamlfind
<ggole> def`: hmm, now if you do Hashtbl.<TAB> it balks with "Sole completion".
<ggole> (Although Hash<TAB> works well, so there's progress.)
<ggole> It also moves point back beyond the ., so I suspect that it is trying to complete the module name.
<def`> ggole: could you make clean / configure / make ?
<ggole> I just did!
<def`> I have no idea what you're talking about:). But I'm afk a few hours, I ll be morr helpful later
<ggole> OK, thanks!
Ch0c0late has joined #ocaml
oriba has quit [Quit: Verlassend]
tautologico has joined #ocaml
cody__ has quit [Remote host closed the connection]
oriba has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
ggole_ has joined #ocaml
ggole_ has left #ocaml [#ocaml]
<whitequark> def`: nice, thanks!
Ch0c0late has quit [Quit: Textual IRC Client: www.textualapp.com]
Ch0c0late has joined #ocaml
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
martintrojer has quit [Ping timeout: 268 seconds]
martintrojer has joined #ocaml
martintrojer has quit [Read error: Connection reset by peer]
martintrojer has joined #ocaml
Muzer has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hhugo has quit [Quit: Leaving.]
Muzer has joined #ocaml
zpe has quit [Remote host closed the connection]
koderok has joined #ocaml
zpe has joined #ocaml
koderok has quit [Client Quit]
zpe has quit [Ping timeout: 245 seconds]
tautologico has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
hhugo has joined #ocaml
mort___ has quit [Ping timeout: 276 seconds]
ustunozgur has joined #ocaml
troutwine_away is now known as troutwine
troutwine is now known as troutwine_away
Ch0c0late has quit [Quit: Textual IRC Client: www.textualapp.com]
hhugo has quit [Quit: Leaving.]
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 240 seconds]
robink has quit [Ping timeout: 240 seconds]
robink has joined #ocaml
Submarine has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tautologico has joined #ocaml
zpe has joined #ocaml
hhugo has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
morphles has joined #ocaml
<morphles> Anyone here using oscigen/eliom? I'm trying the tutorial, but I'm having a problem, generated javascript does not run. Tutorial says alert should pop on page load but it does not. Maybe someone has any idea why that might be?
oriba_ is now known as oriba
<whitequark> morphles: I can't really say what your problem is with so little details, but here is an example that I know to work: https://github.com/whitequark/eliom-example
<whitequark> maybe that helps
ygrek has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
oriba has quit [Quit: Verlassend]
lbaan has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
ZenosDance has joined #ocaml
tautologico has quit [Ping timeout: 264 seconds]
mhi^ has quit [Quit: Lost terminal]
mcclurmc has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
mhi^ has joined #ocaml
morphles has quit [Ping timeout: 245 seconds]
wwilly has quit [Ping timeout: 260 seconds]
axiles has quit [Quit: Quitte]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
Submarine has quit [Quit: Leaving]
Hannibal_Smith has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
<ygrek> can anybody succeed installing opam-publish?
<ygrek> it fails at building cudf
<ygrek> with # ocp-build -init: unknown option '-scan'
<whitequark> ocp-build :/
<whitequark> I think ocp-index install fails with same error
<ygrek> yes, that's not the first time it fails the build for me
* ygrek wonders does anybody care or it is some sort of ocp-mafia?
tobiasBora has joined #ocaml
sad0ur has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 246 seconds]
gperetin has quit [Ping timeout: 260 seconds]
gperetin has joined #ocaml
thomasga has joined #ocaml
Nahra` has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
sad0ur has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has quit [Quit: Konversation terminated!]
<tobiasBora> Hello !
<philed> Yo!
<tobiasBora> I need to know in an Ocaml script if an Ocaml library is installed ? What is the best way to install it ?
<tobiasBora> *to check if the library is installed
<philed> Oh. No idea. Does ocamlfind expose an API ?
<tobiasBora> Well if so I don't see any documentation...
abbe has quit [Read error: Connection reset by peer]
<def`> ggole: pong?
<def`> there is the findlib api
zozozo has quit [Ping timeout: 240 seconds]
gperetin has quit [Ping timeout: 260 seconds]
esden has quit [Ping timeout: 260 seconds]
Leonidas has quit [Ping timeout: 268 seconds]
thizanne has quit [Ping timeout: 268 seconds]
<Drup> whitequark: when can we expect a contribution to the eliom tutorials ? :]
abbe_ has joined #ocaml
gperetin has joined #ocaml
<ggole> def`: eh?
<def`> ggole: what was you problem after update?
<def`> your*
<ggole> Hashtbl.<tab> gives "Sole completion"
Mandus has quit [Ping timeout: 260 seconds]
<def`> Hmm… Can't reproduce :/
MercurialAlchemi has quit [Ping timeout: 245 seconds]
<ggole> Hmm, maybe my config? Gimme a sec.
<def`> But this can happen if the cmi file doesn't match the typechecker
<def`> version
<def`> (4.02 typechecker with 4.01 or 4.02alpha stdlib)
<ggole> Hashtbl.f<tab> gives completions though
<ggole> Behaviour is the same with -Q, so it isn't my .emacs
<Anarchos> gasche are you the guy who posted on lambda-the-ultimate about blelloch ?
<def`> ggole: ok, could you produce a MERLIN_LOG ?
<ggole> I forget, is it just (setq merlin-log t) for that?
Leonidas has joined #ocaml
Leonidas has quit [Changing host]
Leonidas has joined #ocaml
<def`> (and auto-complete or company-mode ?)
<def`> ggole: M-x setenv MERLIN_LOG ~/merlin.log
<def`> then restart-process
Mandus has joined #ocaml
oscar_toro has quit [Ping timeout: 246 seconds]
<ggole> Hmm, not getting anything
<ggole> Let me try that again.
<ggole> Nope.
<ggole> Do I need to do something to flush the file?
<def`> normally not
<def`> uh, you should probably give a full path and not ~/merlin.log
<ggole> Ah wait, got it
esden has joined #ocaml
mhi^ has left #ocaml [#ocaml]
<def`> ggole: did you try to complete?
<ggole> Yep
<ggole> Maybe I'm doing something wrong. :/
<def`> then no completion query made its way to merlin :'
<philed> Merlin is awesome btw. I used to be extremely jealous of Fsharpers in Visual Studio. Not at all any more.
thizanne has joined #ocaml
<def`> and auto-complete or company-mode ?
<def`> philed: thanks :)
<ggole> I think I've mistaken some of the existing emacs completion machinery for merlin :/
<def`> :D
<ggole> But why was there a change in behaviour when I updated?
ZenosDance has quit [Ping timeout: 272 seconds]
<def`> I can't tell. But you still didn't answer my question, which could help pointing out the problem
<def`> … Which makes me guess it is auto-complete. I added some "magic auto config" for beginners, but that shouldn't affect you
<ggole> auto-complete-mode seems to work ok
<ggole> It's M-TAB that is the culprit
<ggole> But that's not your concern, that's tuareg-mode.
<ggole> Sorry for the mistake.
<def`> Strange :|
<def`> And you're welcome.
* ggole wonders if merlin could be persuaded to help M-TAB
<ggole> But I'll consider that tomorrow, time for bed.
<ggole> Thanks again.
ggole has quit []
ustunozgur has joined #ocaml
dnm has joined #ocaml
rand000 has quit [Quit: leaving]
WraithM has joined #ocaml
ollehar has joined #ocaml
zozozo has joined #ocaml
Thooms has quit [Ping timeout: 255 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Simn has quit [Quit: Leaving]
ollehar has quit [Quit: ollehar]
malo_ has joined #ocaml
oriba has joined #ocaml
cody__ has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
martintrojer has quit [Ping timeout: 255 seconds]
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
darkf has joined #ocaml
martintrojer has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
<tobiasBora> Hello !
<tobiasBora> I've a pretty strange behaviour with cmdliner
<tobiasBora> I've configured the script to match "create_website" (like git add, here add=create_website), but when I call in command line juste "create" it works !
<tobiasBora> Is it a normal behaviour to "autocomplete" ?
<tobiasBora> (note that even with "cre" it works, but not with "c")
<tobiasBora> def`: Thank you for the API I didn't saw your answer !
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
mcclurmc has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]