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 :))
<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
<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
<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>
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
<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]