ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
araujo has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
hhugo has quit [Quit: Leaving.]
shinnya has joined #ocaml
pkrnj has joined #ocaml
eikke__ has quit [Ping timeout: 255 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
Thooms_ has quit [Quit: WeeChat 0.4.3]
troutwine is now known as troutwine_away
shinnya has quit [Ping timeout: 250 seconds]
thomasga has quit [Quit: Leaving.]
travisbrady has joined #ocaml
hhugo has joined #ocaml
bytbox has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
philtor_ has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
philtor has quit [Ping timeout: 255 seconds]
travisbrady has quit [Quit: travisbrady]
pkrnj has joined #ocaml
travisbrady has joined #ocaml
pkrnj has quit [Client Quit]
zpe has quit [Ping timeout: 245 seconds]
dsheets_ has quit [Ping timeout: 245 seconds]
hhugo has quit [Quit: Leaving.]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
hhugo has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
badon has joined #ocaml
q66 has quit [Quit: Leaving]
travisbrady has quit [Quit: travisbrady]
troutwine_away is now known as troutwine
jprakash has quit [Quit: leaving]
johnnydiabetic has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
johnnydiabetic has quit [Ping timeout: 240 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
badon has quit [Ping timeout: 255 seconds]
claudiuc has quit [Ping timeout: 245 seconds]
ontologiae has quit [Ping timeout: 246 seconds]
travisbrady has joined #ocaml
claudiuc has joined #ocaml
araujo has joined #ocaml
troutwine is now known as troutwine_away
samrat has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
samrat has joined #ocaml
troutwine_away is now known as troutwine
pkrnj has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
zpe has joined #ocaml
troutwine is now known as troutwine_away
zpe has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
pyon has quit [Quit: Fiat justitia ruat caelum.]
<rgrinberg> is there a way to run an ocaml file like the toplevel?
<rgrinberg> i.e. dump the values and types of all identifiers
samrat has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
pyon has joined #ocaml
samrat has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
travisbrady has quit [Quit: travisbrady]
axiles has joined #ocaml
claudiuc has quit [Remote host closed the connection]
darkf_ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
samrat has quit [Quit: Computer has gone to sleep.]
rgrinberg has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
siddharthv_away is now known as siddharthv
fraggle_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
rgrinberg has quit [Quit: Leaving.]
darkf_ has joined #ocaml
rgrinberg has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
WraithM has joined #ocaml
MercurialAlchemi has joined #ocaml
zacts has quit [Quit: leaving]
darkf_ is now known as darkf
troutwine_away is now known as troutwine
zpe has joined #ocaml
troutwine is now known as troutwine_away
zpe has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
ggole has quit [Read error: Connection timed out]
ggole has joined #ocaml
Simn has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
badon has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
zpe has joined #ocaml
arj has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
BitPuffin has joined #ocaml
zpe has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
samrat has joined #ocaml
cago has joined #ocaml
AltGr has joined #ocaml
yacks has joined #ocaml
_0xAX has joined #ocaml
eikke__ has joined #ocaml
badon has quit [Ping timeout: 264 seconds]
badon_ has joined #ocaml
badon_ is now known as badon
Kakadu has joined #ocaml
dsheets_ has joined #ocaml
fold has quit [Ping timeout: 255 seconds]
NoNNaN has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
yacks has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: Leaving.]
demonimin_ has quit [Remote host closed the connection]
demonimin has joined #ocaml
NoNNaN has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
maattdd_ has joined #ocaml
bezirg has joined #ocaml
sad0ur has quit [Ping timeout: 264 seconds]
sad0ur has joined #ocaml
badon has quit [Ping timeout: 260 seconds]
yacks has joined #ocaml
dsheets_ has quit [Ping timeout: 240 seconds]
<acieroid> any idea how to do something like this? http://paste.awesom.eu/8dwb (in fact, I have a function that returns some t1 value, and I need to feed this into a function that takes a t2 value, but OCaml doesn't seem to like it)
<acieroid> the error being "This expression has type t1 but an expression was expected of type t2. The first variant type does not allow tag(s) `C"
octachron has joined #ocaml
<adrien> let (x : t2) = ((`A : t1) :> t2);;
<adrien> ?
<adrien> obviously it looks a bit weird but it might fit your actual code
<acieroid> indeed, I didn't know about :>
<acieroid> I should have read the variants page of the manual once more.
<octachron> It is quite weird to use a type constraint and a conversion on the same line
<adrien> I spent quite some time without knowing about it :)
<adrien> octachron: reduced test-case :)
<acieroid> indeed
<acieroid> thanks adrien :)
dsheets_ has joined #ocaml
dsheets_ is now known as dsheets
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
maattdd_ has quit [Ping timeout: 250 seconds]
zpe has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
sepp2k has joined #ocaml
paolooo has joined #ocaml
hhugo has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
ewd has joined #ocaml
thomasga has joined #ocaml
octachron has quit [Ping timeout: 246 seconds]
_andre has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
eikke__ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
Cariboo has quit [Quit: Leaving]
paolooo has quit [Ping timeout: 246 seconds]
lordkryss has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
siddharthv is now known as siddharthv_away
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
_5kg has quit [Ping timeout: 240 seconds]
misv has quit [Ping timeout: 244 seconds]
Nahra has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
_5kg has joined #ocaml
misv has joined #ocaml
<Drup> adrien, acieroid : probably no need for the extra parent
<Drup> x : t :> t' is valid syntax
<adrien> it wasn't valid there :P
<adrien> but I think it was parsed differently
<adrien> like
<adrien> well, try for yourself :D
<def`> One level of paren needed :)
<def`> (x : t :> t')
<def`> ((&&):o:>[>`O]) … maybe not a smiley but a valid expression in ocaml
hhugo has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
huza has joined #ocaml
Nahra has joined #ocaml
Submarine has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
yacks has quit [Read error: Connection reset by peer]
maattdd_ has joined #ocaml
englishm has joined #ocaml
huza has quit [Ping timeout: 264 seconds]
huza has joined #ocaml
tane has joined #ocaml
samrat has joined #ocaml
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
Denommus has left #ocaml ["Leaving"]
Denommus has joined #ocaml
yacks has joined #ocaml
bezirg has quit [Ping timeout: 272 seconds]
arj has quit [Quit: Leaving.]
zpe has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
sgnb has joined #ocaml
BitPuffin has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
_0xAX has quit [Remote host closed the connection]
nojb has joined #ocaml
whirm has joined #ocaml
<whirm> hi everyone
nojb has quit [Client Quit]
<whirm> I'm trying to install merlin via opam, and I'm getting "The dependency menhir of package merlin.1.7 is not available for your compiler or your OS.
<whirm> that's on an AMD64 Debian SID
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
nojb has joined #ocaml
travisbrady has joined #ocaml
<Kakadu> Which OCaml version do you have?
lordkryss has quit [Quit: Connection closed for inactivity]
huza has quit [Ping timeout: 246 seconds]
<def`> and which opam version do you have?
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
labichn has joined #ocaml
<labichn> Hey all, does anyone know how to track down the source of a "Error: No implementations provided for the following modules" error with ocamlbuild?
<def`> is the module referenced in the directory managed by ocamlbuild?
<labichn> They're Thread, Mutex, Condition, and Event, which should all be part of the stdlib
<labichn> File "_none_", line 1: Error: No implementations provided for the following modules: Thread referenced from /home/nick/.opam/4.01.0/lib/core/core.cmxa(Core)... and so on
cross has quit [Quit: leaving]
<Kakadu> Maybe it is related tolinkpkg option
cross has joined #ocaml
<def`> Hmm, something is wrong, indeed. I assume you're invoking ocambuild -use-ocamlfind and the tag package(core) ?
<rks`> you also need to have the "thread" tag.
<labichn> ocamlbuild -pkgs core,async test.native
<labichn> I'll look into the thread tag now
slash^ has joined #ocaml
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
<def`> labichn: try once with ocamlbuild -use-ocamlfind -tag 'package(core)'
<def`> just to make sure, because I had some differences with this command line, though I don't remember the details
<labichn> That was it. I thought I'd read that -use-ocamlfind had become the default behavior, must have been mistaken. It showed a different error, that I was missing core_extended, once I installed that and using the -use-ocamlfind flag it worked. Thanks, I still get mixed up with where ocamlfind/build overlap
<Denommus> can ocamllex and ocamlyacc handle utf-8 nicely?
eikke__ has quit [Ping timeout: 255 seconds]
<def`> Denommus: no (for ocamllex, ocamlyacc is charset-agnostic :))
<def`> (s/charset/encoding \& &)
<def`> Denommus: you may want to try sedlex https://github.com/alainfrisch/sedlex
<whirm> def`: 1.1.1-1+b1 (sorry for the delay)
<def`> and ocaml version?
<whirm> def`: 4.01.0-4
<Kakadu> I had some strange errors with it too and now i have upgraded opam and I'm recompiling everything that I have
<whirm> is it possible to upgrade opam from opam? :D
<Kakadu> no, AFAIR
shinnya has joined #ocaml
<Kakadu> If you have Debian Sid, you are free to install latest from source+checkinstall
<whirm> hm, if I delete ~/.opam and just install merlin, it seems to work
<whirm> (after opam init)
<whirm> but now it fails to install utop, which I had installed before
hhugo has quit [Quit: Leaving.]
nojb has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Denommus> def`: it looks interesting. Do I install it through OPAM?
<Denommus> ah, just checked. Yes
cago has quit [Quit: cago]
<whirm> ok, so only the first install operation works
<whirm> opam install utop merlin -> works
<whirm> opam install utop ; opam install merlin -> fails
<def`> :D
<whirm> is opam considered stable?
philtor_ has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
<Kakadu> I'm testing on my machine
<Kakadu> it works
WraithM has joined #ocaml
<def`> what is your opam switch? You should try with an opam-managed compiler instead of the system switch
Estivate has joined #ocaml
<whirm> def`: talking to me?
<Kakadu> Yes, he is
samrat has joined #ocaml
<whirm> def`: system C system System compiler (4.01.0)
<whirm> should I build the same version myself then?
* whirm building
<MercurialAlchemi> yeah, opam 1.1.1 is broken at the moment
shinnya has quit [Ping timeout: 272 seconds]
<whirm> MercurialAlchemi: at the moment? will it get fixed without me having to upgrade?
<MercurialAlchemi> I guess it's this one: https://github.com/ocaml/opam/issues/1605
<MercurialAlchemi> I wouldn't know
<whirm> oh, yes, I saw something similar happening to me yesterday at home
<MercurialAlchemi> All I know is that I updated recently, and now it happily wants to reinstall everything whenever I want to add something to it
<MercurialAlchemi> -> broken
<MercurialAlchemi> and to add insult to injury it doesn't even manage the reinstall
<whirm> Ok, so I will carefully make a list of the stuff I need and install everything at once :D
<whirm> MercurialAlchemi: yup, same happens to me
<MercurialAlchemi> it's probably something minor, but it makes it mostly useless
<MercurialAlchemi> I checked the Debian changelog, and the last entry is from February, so it's not a Debian maintainer breaking it by accident
<whirm> hm, I just started to learn Ocaml 2 days ago and that got me quite confused
<MercurialAlchemi> yeah, it's a bit unfortunate
<MercurialAlchemi> got into ocaml recently myself, so I understand
<def`> this behavior can be worked around mostly by disabling apscud
<def`> … yet that's not really satisfying :|
* whirm googles apscud
<def`> aspcud*
<Armael> aspcud *
<Drup> disabling ? oh ?
<Armael> (erm 3g lag)
<whirm> I tried installing a bunch of stuff, it failed building ocamlfind, which was already installed, then retried, and now it seems to be working
<whirm> is this -> https://realworldocaml.org/v1/en/html/prologue.html the best book to start with ocaml?
jprakash has joined #ocaml
<def`> For complete beginners, I heard good things about http://ocaml-book.com/
<whirm> def`: Ill take a look at it, thanks
zpe has joined #ocaml
<MercurialAlchemi> def`: I'm afraid apscud doesn't help
<MercurialAlchemi> whirm: I found RWO to be pretty good, but it doesn't cover everything
<MercurialAlchemi> whirm: it doesn't preclude from reading the manual :)
<MercurialAlchemi> whirm: but some sections are really interesting, like the part about the behaviour of the runtime
philtor_ has quit [Ping timeout: 250 seconds]
<whirm> MercurialAlchemi: well, I don't need to cover everything yet, it's my first functional language, so I just want to defend myself ATM :D
zpe has quit [Ping timeout: 245 seconds]
englishm has quit [Remote host closed the connection]
philtor_ has joined #ocaml
englishm has joined #ocaml
hhugo has joined #ocaml
<MercurialAlchemi> whirm: :)
ewd has quit [Quit: leaving]
<whirm> can you tell opam to use several processes to compile stuff?
<Kakadu> -j
<Armael> or the OPAMJOBS environment variable
<whirm> I shouldn't have RFTM :D
<whirm> thanks
<Kakadu> also, opam help <subcommand>
<whirm> ah, I checked the man page and there was nothing there
<Armael> it's in the man page for 'opam install'
<Kakadu> I did the same error!
<whirm> oh, I see
<whirm> I'm about to do: opam install -j8 async yojson core_extended core_bench cohttp async_graphics cryptokit menhir merlin utop core
<whirm> anything else I might need while learning Ocaml?
<Kakadu> It's difficult (and probably wrong) question
pminten has joined #ocaml
<def`> MercurialAlchemi: sure aspcud doesn't help, removing / not having aspcud do help
philtor_ has quit [Ping timeout: 246 seconds]
yacks has quit [Ping timeout: 245 seconds]
travisbrady has quit [Quit: travisbrady]
<whirm> Kakadu: If there's nothing obvious missing I guess itll be OK
<whirm> Ok, I'm going home, thanks all for the help! see you later
yacks has joined #ocaml
whirm has quit [Quit: WeeChat 0.4.3]
<MercurialAlchemi> def`: yep
<MercurialAlchemi> def`: I'll see if I can make sense of it this weekend
<def`> MercurialAlchemi: opam 1.2 is in preparation, that should those problems
<def`> that should FIX :D
travisbrady has joined #ocaml
ontologiae has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
samrat has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
jwatzman|work has joined #ocaml
zennist has joined #ocaml
<zennist> Can I have statements like 'if ... then .. else let ... in ...' ?
<zennist> Keep getting the compiler error: "module" or "open" or [opt_rec] expected after "let"
<ggole> Sure: you may have a different problem though
<ia0> most probably the problem is what comes just after your "let"
q66 has joined #ocaml
WraithM has joined #ocaml
tane has quit [Quit: Verlassend]
Estivate has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Estivate has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
Kakadu has quit [Ping timeout: 246 seconds]
<zennist> for let clauses, if I have 'let a = A and b = B in ...' I can really use 'a' in my 'B' expression can I?
pango_ is now known as pango
<adrien> yes
tane has joined #ocaml
_0xAX has joined #ocaml
<def`> zennist: no
* adrien parses again
<def`> :D
<adrien> right, I had read "in" instead of "and" and was quite surprised
troutwine_away is now known as troutwine
WraithM has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
<elspru> I'm having trouble compiling the codegen.ml portion of the llvm tutorial in OCaml
<elspru> it is telling me Llvm module unbound. also I can't put #use "topfind.ml" in codegen.ml since it tells me syntax error.
sepp2k has quit [Quit: Konversation terminated!]
<whitequark> elspru: you need to compile it as `ocamlfind ocamlc -package llvm codegen.ml`
<whitequark> or even better, use a buildsystem (e.g. ocamlbuild)
tane has quit [Quit: Verlassend]
Anarchos has joined #ocaml
<elspru> yes I'm using ocamlbuild
<elspru> so what should I pass to ocamlbuild to make it work?
<whitequark> ok, then add, in the simplest case, "true: package(llvm)" to your _tags file
samrat has quit [Quit: Computer has gone to sleep.]
pyon has quit [Quit: Fiat justitia ruat caelum.]
samrat has joined #ocaml
pminten has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<elspru> tag "package" does not expect a parameter, but is used with parameter "llvm"
<adrien> try pkg_llvm instead of package(llvm) I think
<adrien> well, _try_
<whitequark> adrien: nope
<whitequark> elspru: invoke ocamlbuild as ocamlbuild -use-ocamlfind
AltGr has left #ocaml [#ocaml]
<adrien> ><
<adrien> I had forgotten that wasn't default
<adrien> I need to stop doing several things at once :P
nlucaroni has joined #ocaml
<elspru> okay, it no longer gives me warning about the true: part, though same Error: Unbound module Llvm
ontologiae has quit [Ping timeout: 260 seconds]
<elspru> can see the code at http://llvm.org/docs/tutorial/OCamlLangImpl7.html if that helps
<elspru> it's at the bottom of the page
<whitequark> that's really strange
<whitequark> can you show your complete code?
<whitequark> with _tags and ocamlbuild invocation
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
troutwine is now known as troutwine_away
troutwine_away is now known as troutwine
<elspru> right so that is the complete code ^, the invocation is ocamlbuild -use-ocamlfind toy.byte
<elspru> + /usr/bin/ocamlc -c -o codegen.cmo codegen.ml File "codegen.ml", line 7, characters 0-9: Error: Unbound module Llvm
<adrien> ocamlfind list | grep -i llvm
<elspru> it's line 7 instead of line 5, since I tried putting in #use "topfind.ml" and #require "llvm" but have since commented them out.
<elspru> llvm (version: 3.4) llvm.analysis (version: 3.4) llvm.bitreader (version: 3.4)
maattdd_ has quit [Ping timeout: 260 seconds]
wwilly has joined #ocaml
<whitequark> elspru: < whitequark> ok, then add, in the simplest case, "true: package(llvm)" to your _tags file
<whitequark> you didn't do that
<whitequark> that's why it doesnt work
<whitequark> just create a _tags file with that content in the same folder as your tuy
<whitequark> toy*
pyon has joined #ocaml
<elspru> oh it didn't work the first time. now it does. there is a _tags file btw, it's listed on the site ^
<elspru> but ya, now it is telling me Unbound value DataLayout.add in toy.ml
<elspru> so ya, thanks now it is opening Llvm :-)
<whitequark> elspru: right, so, I refactored the DataLayout interface and broke it
WraithM has quit [Ping timeout: 246 seconds]
<elspru> ?
mcclurmc has quit [Remote host closed the connection]
<whitequark> you now need to use Llvm_target.DataLayout and add package(llvm.target)
<whitequark> and instead of add you need to use Llvm_target.DataLayout.add_to_pass_manager: http://llvm.moe/ocaml/Llvm_target.DataLayout.html#VALadd_to_pass_manager
<whitequark> I really should fix that tutorial -_-'
<elspru> ok that works :-).
<whitequark> excellent
<elspru> well it brakes at Error: Unbound value ExecutionEngine.target_data
<elspru> as in the DataLayout part worked :-)
<elspru> it's your tutorial?
<whitequark> it's now called data_layout and not target_data
<whitequark> no, but I'm the current maintainer of the bindings
<elspru> Error: This expression has type Llvm_target.DataLayout.t but an expression was expected of type [< Llvm.PassManager.any ] Llvm.PassManager.t
<elspru> I was thinking of sending the updated version to the mailing list. but if you are going to fix it anyways, perhaps can email it to me?
Arsenik has joined #ocaml
philtor_ has joined #ocaml
<whitequark> elspru: looks like the arguments to add_to_pass_manager are reversed
_0xAX has quit [Remote host closed the connection]
Kakadu has joined #ocaml
leowzukw has joined #ocaml
<leowzukw> Hi
<leowzukw> I'm trying to write a program with Big_int module
<leowzukw> but it don't compile
<leowzukw> I get Error: No implementations provided for the following modules: Big_int referenced from avan.cmx
<leowzukw> Do you have any idee?
thomasga has quit [Ping timeout: 250 seconds]
<adrien> how do you compile?
<leowzukw> corebuild avan.native
<ggole> Hmm, ocamlbuild should know how to find nums :/
rgrinberg has quit [Quit: Leaving.]
<ggole> Try corebuild -pkg num avan.native
<leowzukw> I'm trying
<leowzukw> I'm also using core module but commands "ocamlbuild -pkg core -pkg num avan.native" and "ocamlbuild -pkg core,num avan.native" don't work
<ggole> Same error?
<leowzukw> no, I get "Error: No implementations provided for the following modules: Thread referenced from /home/leo/.opam/4.01.0/lib/core/core.cmxa(Core)
<ggole> Well, there's progress
<ggole> I guess keep adding stuff until it works :p
<Kakadu> we can try to add `-use-ocamlfind'
<ggole> It's the default already in recent versions
<ggole> (Not sure when the changeover point was.)
rgrinberg has joined #ocaml
<leowzukw> I get 'ocamlfind: Error from package `threads': Missing -thread or -vmthread switch'
<Kakadu> so add this switches
<leowzukw> I tried but it don't work :-(
<leowzukw> I get ocamlbuild: unknown option
<Kakadu> What does it say?
<ggole> -thread isn't a package, you pass it as a flag iirc
<ggole> I forget the exactly silly dance required
<ggole> -tag thread, I suppose
thomasga has joined #ocaml
<leowzukw> It works! Thank you so much, I would prefer to use corebuild but it compile so that is ok
<ggole> Isn't corebuild pretty much the same thing?
<adrien> it's ocamlbuild plus a couple preset tags
<adrien> like "use core"
<ggole> Right.
lordkryss has joined #ocaml
<ggole> Build systems, man.
<ggole> Never met one I'd turn my back on.
<adrien> let me introduce you to cmake
<adrien> even if you don't turn your back on it, it'll stab you
<adrien> it's a pile of crap by design
<adrien> (if you're curious, I'm currently fighting it)
<leowzukw> ggole: It works with 'corebuild -pkg num avan.native'.
<ggole> adrien: good luck :(
labichn has quit [Quit: Page closed]
<ggole> leowzukw: right, I imagine that corebuild turns those other things on for you
toroidalcode has joined #ocaml
thomasga has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 250 seconds]
<elspru> Error .. /./dllllvm.so undefined symbol: LLVMGetFirstUse
thomasga has joined #ocaml
<elspru> whitequark: ?
<elspru> on the bright side, already 16 targets compiled :-)
<elspru> whitequark: I changed the argument order, that part worked.
travisbrady has quit [Quit: travisbrady]
samrat has quit [Ping timeout: 255 seconds]
<toroidalcode> elspru: I've gotten that error a couple times when working with the llvm package
samrat has joined #ocaml
<toroidalcode> IIRC I got around it by making it link statically? don't quite remember.
thomasga has quit [Quit: Leaving.]
samrat has quit [Client Quit]
philtor_ has quit [Ping timeout: 240 seconds]
hhugo has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
enquora has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Estivate has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slash^ has joined #ocaml
thomasga has joined #ocaml
<enquora> anyone around with ocamlpdf experience? need to generate PDFs in browser as well as on server. I see two c language dependencies, both for compression management. I'm presuming I'll need to replace these to target javascript?
<enquora> that should be camlpdf
<adrien> which are the C deps?
<adrien> and compression in javascript in the browser sounds painfully slow
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
travisbrady has joined #ocaml
<def`> adrien: tight loop with asm.js… it might be faster than with statically generated native code
<adrien> def`: if you can have asm.js
hhugo has joined #ocaml
<def`> adrien: chrome should be good enough, safati will soon have ftl. what else?
<adrien> we'll see :P
<adrien> what about IE? :D
<adrien> and more generally: everything currently out
hhugo has quit [Client Quit]
<def`> khtml? dillo?
<adrien> netkit
philtor_ has joined #ocaml
jprakash has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
thomasga has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
OnkV is now known as Haudegen
thomasga has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
<whitequark> elspru: have you solved your problems?
Submarine_ has joined #ocaml
<enquora> adrien: miniz.c and a flate module that uses the miniz.c file
troutwine is now known as troutwine_away
mcclurmc has joined #ocaml
Submarine has quit [Ping timeout: 255 seconds]
<Denommus> hm, is there an mode for Oasis in Emacs?
<adrien> enquora: well, miniz might be for deflate
<adrien> typically, browsers could have helpers for that
<enquora> adrien: almost certainly is for that
<adrien> I think there's also something with canvas where you can draw on the canvas and turn it into an image
<adrien> like png
<adrien> needs to be checked
<adrien> but it could do the job too
Arsenik has quit [Remote host closed the connection]
<enquora> adrien: completely new to ocaml, am currently evaluating the language for a project that needs this pdf generation. Unclear to me how one would set up a project with compile targets for both native and js which have conditional dependencies.
<enquora> are there any pointers online to that?
<enquora> a possibilitie for these c files is converting them to javascript using enscripten
<enquora> a possibility
<adrien> it's not something I practice
<adrien> typically I'd harass Drup on these topics but I'm not sure he's around
<enquora> k. My immediate need is for server side code, so I'm willing to proceed believing it can be done ;-)
<enquora> without too much grief, that is
<def`> enquora: do it on server-side without consideration for js
<def`> if it works, porting it to js should be mostly mechanical (or "easy" once you know the steps :P)
<enquora> that is my intention to begin with. I'm evaluating ocaml as one of several compile to js options, want to get a simple pdf going first
<enquora> fwiw, ocaml is the only option that has a native pdf library worth considering.
<adrien> there's one thing about camlpdf though: license
<adrien> iirc it's non-commercial
<enquora> it's lgpl 2.1 as I read it
<enquora> so it can be used as a linked lib
<adrien> hmmm
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<def`> yes. adrien: license changed recently
<enquora> but yes, I've started looking at that
<adrien> def`: oh, that's really great!
<enquora> yes, wouldn't touch it otherwise
<adrien> a few months apparently and I had probably seen it but completely forgot
BitPuffin has joined #ocaml
<enquora> also, unlike most pdf libraries available in any language, the author appears to know what he's doing
<adrien> hahaha
<adrien> reminds me: firefox's builtin pdf.js is faster than xpdf/poppler :)
<enquora> It doesn't solve my biggest problem, which is constraint-based layout, but at least it obviates the need to re-invent the PDF primitives layer
philtor_ has quit [Ping timeout: 272 seconds]
<enquora> pdf.js may have impressive perfomance (finally), but it has some distance to go yet in robustly rendering docs
<pyon> Why is there a difference between "function" and "fun"?
<def`> pyon: function <branches> is short for fun x −> match x with <branches>
<mrvn> fun x y is short for function x -> function y ->
<adrien> enquora: most recent versions have been fairly good for me in practice but really: only the most recent ones
<pyon> Oh.
<enquora> adrien: we distribute a PDF library of ~ 100 reference technical documents for offline use in Firefox, and do see rendering glitches. These docs are created in and exported from Word, though - meaining the PDF structure isn't likely to be pretty
<adrien> :)
<Denommus> is there a way to set the priority of an operator, like Haskell's infix, infixl and infixr?
<def`> Denommus: no, priority is determined by the first character
<Denommus> def`: hm, example?
leowzukw has quit [Ping timeout: 260 seconds]
leowzukw has joined #ocaml
<def`> adrien: it seems that the PDF renderer get fixed to handle corner-cases of each generators
<def`> not a good sign for PDF "format"
<enquora> it seems that the camlpdf license requires compiling and using the library as a dynamically linked one. Is this possible, in general, for ocaml?
thomasga has quit [Quit: Leaving.]
<enquora> again, seems this is going to be dependent on runtime environment
slash^ has quit [Read error: Connection reset by peer]
<def`> enquora: yes, it is
troutwine_away is now known as troutwine
<def`> note that you are not subject to the same restrictions on server-side (as you are not distributing the software)
<enquora> ah, yes, this is 2.1, rather than 3 ;-)
ontologiae has joined #ocaml
<enquora> does create a problem for using on iOS though - all libraries need to be statically linked. can use javascript version there, though
<adrien> aren't they starting to allow shared objects
<adrien> ?
<adrien> like just starting to do so
<adrien> static linking really wasn't an issue with the lgpl in the first place
<adrien> it states explicitely that you can provide objects for the user to link again
<adrien> the only issues might be with ocaml's inlining but the exception (that's probably the least know aspect)
<enquora> am reading it
<enquora> line 315 seems to start the pertinent section
<adrien> also, what's the issue with lgpl v3?
<def`> this is the same license as ZBar, which is a popular QRcode recognition library used on iOS
<def`> … used in a lot of "proprietary apps"
<enquora> lgpl, afaik, is far more restrictive in what is considered a work. but this seems to work
troutwine is now known as troutwine_away
wwilly has quit [Quit: Leaving]
Estivate has joined #ocaml
_andre has quit [Quit: leaving]
Thooms has joined #ocaml
jgw25 has joined #ocaml
troutwine_away is now known as troutwine
<jgw25> enquora: I wrote CamlPDF. Email me if you have questions or concerns :-)
<jgw25> No, I don't have a script which tells me when someone mentions me on IRC. Yes, I do occasionally read the public logs :-)
<def`> :D
<enquora> jgw25: too many questions at the moment, all of them ill-formed still ;-)
<enquora> jgw25: I can say this is one of the few pdf libraries that maps orthogonally to PDFs, while still providing relatively high-level abstractions :-)
ontologiae has quit [Ping timeout: 260 seconds]
<jgw25> Yes, I was surprised that the PDF libraries for other languages seemed rather, well, flat.
<jgw25> Especially the ones for OO languages, where they have suitable abstraction mechanisms.
<rks`> : d
<jgw25> As usual, it's proper data types and pattern matching that make it possible.
<enquora> a bit of background. We need to generate data-dense technical/engineering reports that run in offline HTML/Javascript environments as well as on server and iPad. Most of the data is tabular, and the need is for constraint-based layout such as fitting text to available vertical and horizontal space by reducing font size, adjusting kerning and word spacing. Am considering clojurescrpt as an option, but there are no native PDF libs there, so
<enquora> means starting from scratch at the PDF primitives level. CamlPDF looks nice from that aspect.
<enquora> We've been doing this for a decade, limping along using HTML and printing to PDF, but browser control over things like margins is just too weak to do this reliably when presented with a really dense page of data.
<jgw25> Be aware that CamlPDF doesn't have a high level facility for embedding a font. It's a bit low level for that. But you can use the standard 14 PostScript fonts, or start with a template document you created by "printing" something blank with some fonts embedded from another program, read it in, and add text.
<enquora> yes, I see that
<jgw25> PDF writing is, luckily, a lot easier that PDF reading.
<enquora> willing to use the standard PDF fonts, although would like to use narrow fonts some day. that would give use about a 25% improvement in character width. that's a lot of free space for our needs
<jgw25> You can also use cpdf -copy-font to steal a font from another document. Some of my customers are using that for, for example, barcode fonts.
jprakash has joined #ocaml
fold has joined #ocaml
<enquora> one other thing I don't see is support for form xobjects (if I remember the correct name for the term) - shared objects for things like page headers to avoid PDF bloat
<enquora> It appears that wouldn't be difficult to hack in, though
<enquora> jgw25: I don't see a way to get your email address?
<jgw25> That's easy. A form XObject is just referenced from a content stream. You would build it using CamlPDF's data types - no hackery required.
dsheets has joined #ocaml
<enquora> right
<jgw25> john -at- coherentgraphics.co.uk
<enquora> thks
<enquora> the real work is going to be building a constraint-based tabular layout.
<def`> hehehe
<def`> good luck, and think about releasing it as open-source if you can _o/
<enquora> def`: yes, I'm crazy to be attempting this
<enquora> but it's a necessity
<enquora> a hero is a coward who got cornered
<jgw25> Couldn't you output LaTex?
<jgw25> And then have it done for you?
Submarine_ is now known as Submarine
<jgw25> Though I'm sure that would be full of edge cases.
<zennist> Say I have an embedded match clause like this
<zennist> match a with
<zennist> | subpattern1, subpattern2 -> ...
<zennist> | pattern1 -> match c, d with
<zennist> | pattern2 -> value
<zennist> | subpattern3, subpattern4 -> ...
<enquora> must run offline in a browser app
<jgw25> Ah
<jgw25> I'm sure someone's compiled pdflatex to javascript.
<def`> zennist: begin end … around the inner match
<enquora> Yes, they have
<enquora> a subset, of course
<zennist> enquora: no other way around this?
<enquora> I'm all ears
<zennist> enquora: to be more specific, the 'begin..end' clause is only required if you have a match..with inside another match..with...?
<jgw25> Oh, I compiled camlpdf up with js_of_ocaml a few weeks ago, minus the flat support. I don't really know what to do now that I've done it, but I can confirm it works.
<jgw25> s/flat/flate/
<enquora> jgw25: problem with existing LaTex tabular macros is they take forever to converge on a an optimum
<enquora> And I have no particular desire to write my own in Tex
<enquora> even LuaTex
<jgw25> Understandable!
<zennist> enquora: I just tried enclosing that in () and that acually works
<enquora> zennist: sorry, I lost track of u - what actually works?
<jgw25> begin and end are ( and )
<jgw25> ish
<zennist> enquora: enclosing an embedded 'match..with' with parenthesis
<enquora> and, no, there is no other way. We need to do this in the browser, without native plugins, on the server, and on iOS (perhaps even Android some day)
<enquora> and, produce byte-identical documents on each platform, with the same inputs
<enquora> and, by in browser, I mean offline, with no 'net connection
<def`> wow, that quite a strong requirement :'
<Denommus> hm, can't batteries-included be installed with OPAM?
<enquora> imagine you're doing field inspections of engineering or regulatory compliance work, that needs a distributatble print copy before leaving the work site, but also downstream processing
<Denommus> well, installing it from AUR
<def`> Denommus: well it can, what's the problem ?
<def`> Denommus: avoid mixing system packages and opam packages!! (and this applies to compilers too)
<Denommus> ERROR] batteries-included is not a valid versioned package name
<Denommus> 'opam install batteries-included' failed.
<jgw25> Denommus: it's just batteries
<Denommus> oh
<Denommus> thanks
<jgw25> opam list --all
<jgw25> or opam search batteries
jgw25 has quit [Quit: drink]
leowzukw has quit [Ping timeout: 240 seconds]
leowzukw has joined #ocaml
Thooms has quit [Ping timeout: 246 seconds]
ggole has quit []
happy4crazy has joined #ocaml
artagnon has joined #ocaml
happy4crazy has quit []
<artagnon> I'm using the OCaml LLVM bindings.
<artagnon> I have this problem of not being able to reuse my structures like "if".
<whitequark> what do you mean?
<artagnon> I want to send (codegen'ed expression) as the truebranch of my if function.
<whitequark> send?
<artagnon> To the function.
<whitequark> well. you can't. the IR doesn't work like that.
<artagnon> .... but I want the codegen'ed expression to only evaluate in the if function.
<whitequark> pass a function which codegens the expression for each case instead
<artagnon> So doing let foo () = codegen'ed expression for each expression?
<artagnon> And then calling foo () in the if function?
<whitequark> something along that
<artagnon> Cool, thanks :)
philtor_ has joined #ocaml
<Drup> enquora: you gave up on patoline ?
<Drup> I mean, it's a layout engine writen in ocaml.
artagnon has left #ocaml [#ocaml]
<Drup> (at least, it contains one)
<enquora> Drup: it doesn't appear to offer anything useful in the way of tabular layout, which is the main abstraction I need. And it seems to have external dependencies. This needs to compile to javascript
happy4crazy has joined #ocaml
<enquora> camlpdf offers good abstractions and coverage of PDF primitives
<Drup> last time we discuss, the main non-ocaml dependency was caml-image
<enquora> which is rather important
<enquora> I haven't looked at it for a week, just getting back to this
<enquora> but it seems to me there were some c dependencies
<Drup> it seems either to work around that than impllementing a layout engine that is non-toyish
<enquora> even if not,
<Drup> bla
<enquora> it appears optimized for paragraph driven layout
<Drup> s/either/easier/
<enquora> which is exactly what we don't need
<enquora> our text is very short, presented in tabular format
<enquora> but I will look at it again
<enquora> Drup: u were mentioned as the person to go to with earlier about conditionally linking in libraries when compiling to different targets
ontologiae has joined #ocaml
warrick has joined #ocaml
<warrick> beginner question, what does this syntax mean: !outf !out prog
WraithM has joined #ocaml
happy4crazy has quit [Remote host closed the connection]
happy4crazy has joined #ocaml
happy4crazy has quit [Ping timeout: 260 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
<flux> outf is a reference to a function
<flux> and the function is called with two arguments
<flux> one is !out, where out is again dereferenced and prog is passed as-is
<flux> sounds to me it's something that could be done after command line argument handling in a program that has several modes
<flux> so outf is set to be the function that performs the mode functionality
<flux> and out is some argument also originating from command line input
philtor_ has quit [Ping timeout: 260 seconds]
<flux> typically they would be references because that's the way the Arg module needs to be used
mcclurmc has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
maattdd_ has joined #ocaml
<warrick> flux: wow, with almost zero context you answered my question quite thorougly
<warrick> thank you
<flux> warrick, good guess I suppose :)
<warrick> and you are exactly right, it is used for command like arguments
<warrick> i was unfamiliar with referencing dereferencing (ref/!)
Kakadu has quit [Quit: Konversation terminated!]
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
thomasga has joined #ocaml
<Drup> enquora: was I ? I did made a ugly hack to work around oasis/ocamlbuild for that, sort of x)
leowzukw has quit [Ping timeout: 245 seconds]
leowzukw has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
WraithM has quit [Ping timeout: 245 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
<Denommus> I'm still confused about how to use sedlex in a oasis project
<Denommus> I have installed it through opam and added it to BuildDepends
<Denommus> but the syntax extension doesn't exist. Do I need to put an additional thing on the source file?
<Denommus> the README just talks about findlib, not oasis
travisbrady has quit [Quit: travisbrady]
happy4crazy has joined #ocaml
<whitequark> Denommus: add sedlex.ppx as a dependency.
hhugo has joined #ocaml
<Denommus> whitequark: I added it and now when I try to make, it says File "_tags", line 19, column 0: Lexing error: Invalid line syntax.
<Denommus> whitequark: where should I put sedlex.ppx?
<Denommus> ah, I think I forgot a comma. Let's see
<Denommus> yup, now the error is different
happy4crazy has quit [Remote host closed the connection]
<Denommus> ... ok, I need some tutorial on ppx
<whitequark> Denommus: huh? probably not
<whitequark> sedlex's README should be enough
<whitequark> what is the error?
<Denommus> whitequark: syntax error
<Denommus> whitequark: I added sedlex.ppx as a BuildDepends on my _oasis file, reran oasis, ran make
<whitequark> ... post the *complete* error
<def`> Denommus: you don't have a ppx enabled ocaml, is seems
<whitequark> all salaried telepaths are on a vacation
<def`> (and yes, please always post the content of the error, it's useless otherwise :p)
maattdd_ has quit [Ping timeout: 246 seconds]
<whitequark> Denommus: ocaml version?
<Denommus> def`: I have no idea how to enable such a thing
<whitequark> source code?
<Denommus> 4.01.0
<whitequark> Denommus: you need 4.02
enquora has quit [Quit: enquora]
<Denommus> whitequark: oh. Damn, I didn't expect it to be outdated on Arch
<whitequark> 4.02 is not released yet
<whitequark> only a release candidate
<whitequark> ... or is a released version "outdated" in Arch parlance?
<Denommus> whitequark: so... I can't use sedlex yet?
<whitequark> you totally can
<whitequark> opam switch 4.02.0+rc1
<Denommus> whitequark: I just got into OCaml's world, I have no idea what's happening
<whitequark> I've been using ppx for several months already
njcomsec has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<Denommus> whitequark: hm, only 4.02.0+trunk seems to be available
<whitequark> right, it's not in opam yet. you can install +trunk, it will work just as well.
<Denommus> thanks
rgrinberg has joined #ocaml
lgm has joined #ocaml
<lgm> hello!
<lgm> i have a simple question about functors.
<lgm> Is is possible to define recursive functors (and their signatures)?
<Drup> yes, it works like recursive modules
<lgm> is there an online example, because i tried that and i got a syntax error.
travisbrady has joined #ocaml
<Drup> lgm: you need to use the expanded form
<Drup> module rec F : functor (X:Map.OrderedType) -> sig end = functor (X: Map.OrderedType) -> struct end
<Drup> and M : Map.OrderedType = String ;;
<Drup> that works
thomasga has quit [Quit: Leaving.]
<Drup> and you need to provide the type for everything ,as with recursive modules
<lgm> thanks!
<Denommus> I don't get `opam switch export`
rgrinberg has quit [Quit: Leaving.]
<Denommus> I mean, import
<Denommus> I'm trying to `opam switch import -f universe_for_system`, and it complains that `File /home/yuri/Projetos/SystemsML/universe_for_system does not exist`
zarul has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
<Denommus> AH, I just get it
<Denommus> sorry
rgrinberg has joined #ocaml
troutwine is now known as troutwine_away
cody__ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
madroach has quit [Ping timeout: 250 seconds]
troutwine_away is now known as troutwine
madroach has joined #ocaml
Simn has quit [Quit: Leaving]
shinnya has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
happy4crazy has joined #ocaml
NoNNaN has joined #ocaml
thomasga has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
thomasga has joined #ocaml
<lgm> with the expanded form i still get a complaint about an unbound module type.
<lgm> Error: Unbound module type TERM
darkf has joined #ocaml
darkf has quit [Changing host]
darkf has joined #ocaml
<Drup> you are using them as signature, but they are modules
<lgm> i thought i was declaring both
<lgm> signature and module
<lgm> that was my original question: can i declare recursive functors and their signatures?
rgrinberg has joined #ocaml
<Drup> No, but I don't think you will ever need it
<Drup> declare the signature a part
<Denommus> ocamlfind says that package sedlex.ppx was not found
<lgm> In the construction, the functor NOMINAL depends on Term of type TERM; meanwhile TERM depends on Nominal of type NOMINAL
<lgm> This is a very nice two-level type decomposition of a certain form of reflection.
<lgm> i can express it in Scala.
<lgm> i was wondering if i could express it in OCaml.