ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
sheijk has quit [Quit: .]
nojb has joined #ocaml
AltGr has joined #ocaml
AlexRussia has joined #ocaml
nojb has quit [Quit: nojb]
madroach has quit [Ping timeout: 250 seconds]
nojb has joined #ocaml
madroach has joined #ocaml
badon has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
nojb has quit [Quit: nojb]
Simn has quit [Quit: Leaving]
mcc has quit [Ping timeout: 244 seconds]
dtak has joined #ocaml
<dtak> Hello there. I'm tying to write a parser using ocamllex and menhir. I want to implement an "open" function to include other source code before actual compilation. Will you please tell me what to start from? any useful functions in Lexing or other?
shinnya has quit [Ping timeout: 250 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
dtak_ has joined #ocaml
dtak has quit [Quit: Page closed]
nojb has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
MrScout_ has joined #ocaml
MrScout has quit [Ping timeout: 272 seconds]
boadie has joined #ocaml
MrScout_ has quit [Ping timeout: 258 seconds]
nojb has quit [Quit: nojb]
AlexRussia has joined #ocaml
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 245 seconds]
NoNNaN has quit [Remote host closed the connection]
badon has quit [Ping timeout: 244 seconds]
rand000 has quit [Quit: leaving]
enitiz has quit [Remote host closed the connection]
marynate has joined #ocaml
enitiz has joined #ocaml
kapil__ has joined #ocaml
darkf has joined #ocaml
hugomg has quit [Quit: Leaving]
milosn has quit [Read error: Connection reset by peer]
_5kg has quit [Ping timeout: 265 seconds]
_5kg has joined #ocaml
milosn has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
jao has quit [Ping timeout: 258 seconds]
dtak_ has quit [Remote host closed the connection]
dtak has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
dtak has quit [Ping timeout: 255 seconds]
AltGr has left #ocaml [#ocaml]
dtak has joined #ocaml
AltGr has joined #ocaml
hilquias` has joined #ocaml
hilquias has quit [Ping timeout: 240 seconds]
myyst has quit [Ping timeout: 272 seconds]
myyst has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
dtak has quit [Remote host closed the connection]
govg has joined #ocaml
govg is now known as Guest71641
dtak has joined #ocaml
kalzz has quit [Ping timeout: 265 seconds]
dtak has quit [Remote host closed the connection]
samrat has joined #ocaml
kalzz has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
samrat has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
Guest71641 has quit [Quit: leaving]
enitiz has quit [Ping timeout: 255 seconds]
shinnya has joined #ocaml
struktured has quit [Ping timeout: 258 seconds]
struktured has joined #ocaml
_5kg has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
AlexRussia has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
govg has joined #ocaml
axiles has joined #ocaml
_5kg has joined #ocaml
ggole has joined #ocaml
kakadu has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
MercurialAlchemi has joined #ocaml
marynate has quit [Ping timeout: 240 seconds]
marynate has joined #ocaml
chinglish has joined #ocaml
marynate has quit [Ping timeout: 255 seconds]
marynate has joined #ocaml
alkoma has quit [Remote host closed the connection]
pyon has quit [Quit: no quirks allowed]
ygrek has joined #ocaml
araujo has quit [Ping timeout: 265 seconds]
araujo has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
davine has joined #ocaml
davine has left #ocaml [#ocaml]
jonludlam has joined #ocaml
marynate has quit [Quit: Leaving]
Simn has joined #ocaml
tharugrim has quit [Ping timeout: 244 seconds]
tharugrim has joined #ocaml
AlexRussia has quit [Ping timeout: 252 seconds]
oriba has joined #ocaml
pyon has joined #ocaml
AltGr has left #ocaml [#ocaml]
myyst has quit [Ping timeout: 272 seconds]
myyst has joined #ocaml
AlexRussia has joined #ocaml
AlexRussia has quit [Ping timeout: 245 seconds]
tharugrim has quit [Quit: ZNC - http://znc.in]
tharugrim has joined #ocaml
ebzzry has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
oriba has quit [Read error: Connection reset by peer]
oriba_ has joined #ocaml
oriba_ has left #ocaml [#ocaml]
AlexRussia has quit [Ping timeout: 265 seconds]
badon has joined #ocaml
AlexRussia has joined #ocaml
araujo has quit [Quit: Leaving]
AlexRussia has quit [Ping timeout: 258 seconds]
ontologiae has joined #ocaml
ingsoc has joined #ocaml
AlexRussia has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
psy has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 252 seconds]
brendan has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
lordkryss has joined #ocaml
avsm has joined #ocaml
larhat has joined #ocaml
kapil__ has joined #ocaml
govg has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ocaml
hugomg has joined #ocaml
BitPuffin has joined #ocaml
ygrek has joined #ocaml
Pepe_ has quit [Ping timeout: 240 seconds]
Pepe_ has joined #ocaml
samrat has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
govg has joined #ocaml
huza has joined #ocaml
ontologiae has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
rks` has quit [Quit: leaving]
rks` has joined #ocaml
enitiz has joined #ocaml
oscar_toro has joined #ocaml
wwilly has joined #ocaml
willy_ has quit [Ping timeout: 244 seconds]
demonimin_ is now known as demonimin
koderok has joined #ocaml
koderok has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
milosn has quit [Read error: Connection reset by peer]
psy has joined #ocaml
Thooms has joined #ocaml
milosn has joined #ocaml
sol__ has quit [Remote host closed the connection]
someTSd has joined #ocaml
someTSd has left #ocaml [#ocaml]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
AlexRussia has joined #ocaml
vanila has joined #ocaml
<vanila> Hi!
<vanila> Is there a gopher server written in ocaml?
hilquias` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
darkf has quit [Quit: Leaving]
hilquias has joined #ocaml
badkins has joined #ocaml
<flux> ..
oscar_toro has quit [Ping timeout: 245 seconds]
jita has joined #ocaml
koderok has joined #ocaml
koderok has quit [Remote host closed the connection]
AlexRussia has quit [Quit: WeeChat 1.1-dev]
shinnya has quit [Quit: ZNC - http://znc.in]
AlexRussia has joined #ocaml
AlexRussia has quit [Changing host]
AlexRussia has joined #ocaml
Submarine has quit [Ping timeout: 258 seconds]
huza has quit [Quit: WeeChat 0.3.8]
<gasche> vanila: not that I know of, but it wouldn't be terribly hard to add
<gasche> (for example as a part of OCamlnet)
<vanila> thanks gasche!
oriba has joined #ocaml
marynate has joined #ocaml
<gasche> some people have been active in both the Gopher and OCaml world, e.g. John Goerzen
matason has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
govg has quit [Ping timeout: 258 seconds]
ygrek has joined #ocaml
ygrek_ has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
enitiz has quit [Ping timeout: 240 seconds]
ygrek_ has joined #ocaml
ebzzry has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
sigjuice has quit [Ping timeout: 245 seconds]
ygrek_ has joined #ocaml
sigjuice has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
govg has joined #ocaml
sigjuice has quit [Ping timeout: 256 seconds]
sigjuice has joined #ocaml
osheeta has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
mearnsh has quit [Changing host]
mearnsh has joined #ocaml
lajto has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
hilquias has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
leowzukw has joined #ocaml
ingsoc1 has joined #ocaml
ingsoc has quit [Ping timeout: 252 seconds]
lajto has quit [Remote host closed the connection]
Arsenik has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
luigy has quit [Ping timeout: 240 seconds]
ingsoc1 has quit [Quit: Leaving.]
luigy has joined #ocaml
marynate has quit [Ping timeout: 258 seconds]
marynate has joined #ocaml
gdsfh1 has quit [Quit: Leaving.]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
AlexRussia has quit [Ping timeout: 244 seconds]
<Tekk_> I'm having some trouble trying to figure out wtf the type inference engine is doing here..
<Tekk_> making a tiny sdl2 binding
<Tekk_> on line 45 it complains "expression has type int -> int -> sdl_renderer but expression was expected of type int"
<ggole> -1 is probably parsed in a way you don't expect
<ggole> Replace it with (-1)
<Tekk_> huh
<Tekk_> yeah
<ggole> I still run into that one every now and then.
<Tekk_> just a bug in the parser theN?
<Tekk_> then*
<ggole> No, it's intended
<Tekk_> what's the value in that?
<ggole> Well, -x and -1 should probably parse the same way
<ggole> And y -x is the same as y - x, eg, a call to binary -
jita has quit []
<Tekk_> oh, so it's to do with the -
<Tekk_> so it was taking it as (win - 1)
<Tekk_> and since win is a window type it didn't like that
<ggole> Actually - binds more loosely than application, so it was (sdl_create_renderer_f win) - (1 flags)
<Tekk_> despite the fact that the only way to make the type match on sdl_create_renderer_f was to take it as a negative
jao has quit [Read error: Connection reset by peer]
<Tekk_> alright
<ggole> The parser is entirely ignorant of types
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
<Tekk_> mhm
<Tekk_> thanks ggole
<ggole> nw
<malc_> Tekk_: ~-1 will allow you to get rid of the braces
<Tekk_> okay
gdsfh has joined #ocaml
shinnya has joined #ocaml
malc_ has quit [Ping timeout: 264 seconds]
<smondet> Hi, is anyone else having trouble with Travis-CI builds with the `osx` backend? I can't get opam to work: I hit this: https://github.com/ocaml/opam/issues/1853 and if I build from source it always wants to build Boost (Why the f*#!?) which timeouts the travis build
AlexRussia has joined #ocaml
malc_ has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
marynate has quit [Quit: Leaving]
mcclurmc has joined #ocaml
jonludlam has quit [Ping timeout: 252 seconds]
<Tekk_> Oh, another thing. I can't get utop to build
<Tekk_> which is a bit annoying
<Tekk_> Undefined identifier: OCAML_VERSION in uTop.cmmo.ml
<Tekk_> has anyone run into that?
<ggole> Are you installing it from opam?
<Tekk_> mhm
struktured has quit [Ping timeout: 258 seconds]
<ggole> Hmm.
<ggole> If you're using an oldish system compiler, I'd consider trying a switch to a newish release
enitiz has joined #ocaml
<Tekk_> probably it..
<Tekk_> huh
<Tekk_> not that old
<Tekk_> 4.01.0
<Tekk_> I'll update though
<ggole> That should be recent enough. :|
leowzukw has quit [Quit: leaving]
<ggole> A bug report might be in order.
AlexRussia has joined #ocaml
AlexRussia has quit [Changing host]
<Tekk_> bug report is already up for it :)
matason has quit [Quit: Leaving...]
leowzukw has joined #ocaml
oskarth has joined #ocaml
<avsm> smondet: boost is because of the aspcud dependency, and the illegal instruction due to some missing cflags to support older x86 cpus
<avsm> smondet: aspcud should be bottled, but there's a no-apscud variant in the homebrew package you could try
<avsm> smondet: travis osx support lags behind a bit though, so unsure what version of homebrew they ship with.
leowzukw has quit [Quit: leaving]
jao has quit [Read error: Connection reset by peer]
davine has joined #ocaml
davine has left #ocaml [#ocaml]
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
Thooms has joined #ocaml
<smondet> avsm: thanks! I think I got working with `brew install opam --HEAD` (I mean, now it fails later :) )
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<avsm> smondet: would be very useful to have notes on this as an issue on https://github.com/ocaml/ocaml-travisci-skeleton
gridaphobe has quit [Quit: WeeChat 0.4.3]
<Tekk_> oh, in the meantime is there any way to force a specific version of something with opam?
<Tekk_> because I think the last release worked
brendan has joined #ocaml
bytbox has quit [Remote host closed the connection]
<avsm> Tekk_: opam install foo.1.0.0
<avsm> smondet: thanks!
Thooms has quit [Quit: WeeChat 1.0.1]
oriba has quit [Ping timeout: 250 seconds]
jbzaaa has joined #ocaml
<jbzaaa> There is a package which binds OCaml to libcurl -- OCurl -- that I would like to use. I installed it via opam, but I am unsure on how to utilize this module in OCaml source.
<jbzaaa> Can anybody assist? I am a newbie to this kind of stuff.
<def`> usually with ocamlfind packages
<def`> the "ocamlfind list" command will list all the packages you have
<def`> ocurl should be there
<def`> then it depends on your build system, but basically you have to add the relevant package
<def`> manually: ocamlfind ocamlopt -package ocurl -c myfile.ml
<def`> manually: ocamlfind ocamlopt -package ocurl -linkpkg -o mybin myfile.cmx
<Tekk_> jbzaaa: ocamlfind ocaml{c,opt} -linkpkg -pkg ocurl
<Tekk_> or so
<Tekk_> package, that's it :)
avsm has quit [Quit: Leaving.]
<jbzaaa> @Teikk_ Hmm, what does that do exactly... it produced an executable for me
mcclurmc has joined #ocaml
matason has joined #ocaml
mcclurmc_ has quit [Ping timeout: 264 seconds]
psy has quit [Quit: Leaving]
samrat has quit [Quit: Computer has gone to sleep.]
oriba has joined #ocaml
hilquias has joined #ocaml
Averell- has joined #ocaml
Averell- has left #ocaml [#ocaml]
<hugomg> jbzaa: ocamlopt is the native code Ocaml compiler, which generates executables. (ocamlc is the bytecode compiler). If you want to use ocamlopt by itself, you would need to use the "-I" flag to specify what folders to search in for dependencies and libraries you are using. What ocamlfind does is that it knows where packages are installed to it calls ocamlopt for you with the appropriate "-I" parameters
<jbzaaa> Thanks all for the help!
jbzaaa has quit [Quit: Page closed]
dtak has joined #ocaml
<nickmeharry> Hi all, I'm having a typing issue and I feel like I'm missing something obvious: https://gist.github.com/nickmeharry/79362caf2a600579ee0e
<nickmeharry> This is a reduce example of a problem I hit in a personal project of mine.
<nickmeharry> Basically, I explicitly marked "foo" as polymorphic, but the type checker is enforcing it to be the smallest type I've defined.
WraithM has joined #ocaml
<nickmeharry> The intent is that the type parameter to t is one of b or c, which both share a in common.
alkoma has joined #ocaml
<ggole> Arguments are monomorphic
<nickmeharry> It's not that it's being inferred with '_a, though. It's being inferred with the concrete "a" type.
<ggole> So if you use a function passed as argument at one type, that's the type it is all throughout the function.
<nickmeharry> (I now realize I should've picked different names for my types)
<nickmeharry> Right. My current guess as to what's happening is that I reuse my handle_var function in handle_a by casting it to 'a
<nickmeharry> And somehow that type variable is being assinged a fresh value, namely "a"
<nickmeharry> I guess I'm not sure of the scope of type variables?
<ggole> Looks like foo is not polymorphic at all
<nickmeharry> Right, that's the problem. I explicitly marked it as such, but the compiler is not beliving me.
vanila has quit [Quit: Leaving]
<ggole> Somewhat confusingly, let f : 'a -> 'a = ... is not a polymorphic annotation
<ggole> It's just a type variable. It will happily unify with a concrete type.
<ggole> If you want a polymorphic annotation, you need to explicitly quantify: let f : 'a . 'a -> 'a = ...
<nickmeharry> Hmm, ok. I'll try that.
<ggole> (And this is different again from having a polymorphic argument.)
<nickmeharry> Ok, different error now. I've updated the gist.
<nickmeharry> Appearently a can't be cast to [< c ] ?
<ggole> It can, try that on its own
<nickmeharry> Still confused then. This seems to work, but I thought that's what I'm doing below?
<nickmeharry> let _ = ((`A : a) :> [< c ])
jao has quit [Ping timeout: 252 seconds]
struktured has joined #ocaml
<ggole> It's not really clear to me what's going on there.
<ggole> You could try just removing all the annotations, that seems to work
<nickmeharry> If I take those off, I'm back to the restrictive type.
<nickmeharry> Not polymorphic.
<nickmeharry> bar and baz are given the same types, a t list -> int list
<nickmeharry> When they need to have b and c, respectively.
lajto has joined #ocaml
<nickmeharry> Thanks for your help, by the way. Though it looks like I'm back to reading the manual, searching for the lifetimes of type variables.
<ggole> Hmm, maybe you need impredicative polymorphism.
<ggole> Which involves passing a record with a polymorphic field.
<ggole> I'm not sure if this works with constraints though.
<nickmeharry> I'm not entirely sure if the constraint is necessary, but I put it in so I didn't have to handle cases that don't make sense.
<nickmeharry> I'll look into that next.
segmond has quit [Ping timeout: 256 seconds]
<ggole> OK, I can make this type with bar given [< z ] t list -> int list
<ggole> But I don't think it actually solves your problem.
<nickmeharry> Where does z come from?
<ggole> Er, it's my renaming of your c
<ggole> (Because that was too confusing. Sorry.)
<nickmeharry> Ok, I figured as much. No problem.
alkoma has quit [Remote host closed the connection]
<nickmeharry> I guess I can solve this by just defining my stuff in t twice, once with b and once with c as necessary.
<nickmeharry> It duplicates code, but it should get it working at least.
<nickmeharry> (i.e. don't make t take a parameter, but hardcode in the params)
<ggole> I commented on the gist
<nickmeharry> I think I found the sentence in the manual about variable lifetimes:
<nickmeharry> "In general the scope of a named type variable is the whole top-level phrase where it appears, and it can only be generalized when leaving this scope."
<ggole> Unfortunately I have to go now. Perhaps somebody else can help you along.
<nickmeharry> I didn't know you could do that with records.
<nickmeharry> Thanks so much for your help. This might do it.
avsm has joined #ocaml
<ggole> It is likely to fail when you start trying to actually handle the variants. Since that will remove the polymorphism, the record construction will no longer type check - I think.
<ggole> But I really have to go. Good luck!
ggole has quit []
segmond has joined #ocaml
lnich has joined #ocaml
Hannibal_Smith has joined #ocaml
avsm has quit [Quit: Leaving.]
chambart has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
chambart has quit [Client Quit]
nojb has joined #ocaml
malc_ has quit [Quit: leaving]
dtak has quit []
dtak has joined #ocaml
gabemc has joined #ocaml
ontologiae has quit [Ping timeout: 258 seconds]
WraithM has quit [Quit: leaving]
jonludlam has joined #ocaml
badkins has quit [Remote host closed the connection]
badkins has joined #ocaml
mcc has joined #ocaml
keen__________15 has joined #ocaml
axiles has quit [Remote host closed the connection]
oriba has quit [Quit: Verlassend]
keen__________14 has quit [Ping timeout: 245 seconds]
mcc has quit [Client Quit]
struktured has quit [Ping timeout: 264 seconds]
nojb has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Remote host closed the connection]
nojb has joined #ocaml
nojb has quit [Ping timeout: 250 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ocaml
hilquias has quit [Remote host closed the connection]
gabemc has quit [Ping timeout: 265 seconds]
hilquias has joined #ocaml
kakadu has quit [Remote host closed the connection]
lajto has left #ocaml ["http://quassel-irc.org - Chatee cómodamente donde sea."]
jao has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
oscar_toro has joined #ocaml
dtak has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
iorivur has joined #ocaml
oscar_toro has quit [Ping timeout: 258 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
funtik_ has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml