<Drup>
Algebr: it doesn't seem to handle password :/
paradoja has quit [Ping timeout: 245 seconds]
<Drup>
(nor ssl)
yminsky has joined #ocaml
prsn has quit [Ping timeout: 272 seconds]
<Algebr>
=/
prsn has joined #ocaml
<companion_cube>
gah, I've got mixed feelings about qtest
<companion_cube>
it's really great to have inline tests, but it's really limited on the random tests side
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
bugabinga has quit [Ping timeout: 246 seconds]
bugabinga has joined #ocaml
bobfang has quit [Remote host closed the connection]
bugabinga has quit [Ping timeout: 256 seconds]
ebzzry has quit [Ping timeout: 245 seconds]
prsn has quit [Ping timeout: 256 seconds]
sepp2k has quit [Quit: Konversation terminated!]
ghostpl_ has quit [Remote host closed the connection]
prsn has joined #ocaml
bugabinga has joined #ocaml
beginner has quit [Quit: Leaving]
waneck has joined #ocaml
AltGr has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
BlackMustard has quit [K-Lined]
codefo has joined #ocaml
yminsky has quit [Quit: yminsky]
yminsky has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
prsn has quit [Ping timeout: 264 seconds]
`eeks has joined #ocaml
prsn has joined #ocaml
bobfang has joined #ocaml
bobfang has quit [Client Quit]
yminsky has quit [Quit: yminsky]
JohnD has joined #ocaml
reem has quit [Remote host closed the connection]
JohnD has quit [Excess Flood]
x1n4u has joined #ocaml
reem has joined #ocaml
xinau has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
prsn has quit [Ping timeout: 252 seconds]
mfp has quit [Ping timeout: 245 seconds]
badon has quit [Quit: Leaving]
reem has quit [Remote host closed the connection]
prsn has joined #ocaml
reem has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
prsn has quit [Ping timeout: 256 seconds]
prsn has joined #ocaml
mfp has joined #ocaml
tnguyen has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
tnguyen has quit [Quit: tnguyen]
yminsky has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
prsn has quit [Ping timeout: 250 seconds]
prsn has joined #ocaml
badon has joined #ocaml
mfp has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
<tobiasBora>
Hello !
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<tobiasBora>
I would like to add a kind a little scripts in a project, and I would like to use something like ocamlscript in order to keep a simple to use/modify set of scripts
<tobiasBora>
Is this project dead ? (I didn't see any modification for one years) If yes does an alternative exists ?
<tobiasBora>
And does it support opam well ?
<tobiasBora>
(and I don't use ocaml myscript.ml because I need to use external libraries and I'm affraid it won't work correctly... Well... Will it ? I'm going to try ^^)
yminsky has quit [Quit: yminsky]
Algebr has joined #ocaml
JohnT has joined #ocaml
mfp has joined #ocaml
prsn has quit [Ping timeout: 255 seconds]
yminsky has joined #ocaml
prsn has joined #ocaml
ygrek has joined #ocaml
darkf has joined #ocaml
JohnT is now known as HomeLate
HomeLate is now known as cjh-
cjh- is now known as cjh_
cjh_ is now known as cjha
<Algebr>
Is there an Lwt_unix analogue for Unix.localtime?
<Algebr>
or Unix.time
<Drup>
well, it's not blocking, what would be the time ?
<Drup>
the point*
<Algebr>
Is that the general rule? If it possibly blocks then look in Lwt_*?
dolio has joined #ocaml
<Drup>
I guess, yes
prsn has quit [Ping timeout: 255 seconds]
prsn has joined #ocaml
<Algebr>
Drup: What's the trick/extension that turns a unit Lwt.t into just unit? Just wrap it in an ignore?
<Drup>
depends, do you want to wait for it or not ?
<Algebr>
no, I don't want to wait
cjha is now known as kaneeni
<Drup>
use Lwt_async then.
<Drup>
Lwt.async*
<Drup>
actually, no, Lwt.ignore_result doesn't wait iirc, use that
<Algebr>
And if I just use regular ignore?
<Drup>
cf la doc de Lwt.ignore_result
kaneeni is now known as somefag
somefag has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
JohnT has joined #ocaml
reem has joined #ocaml
claudiuc_ has quit [Ping timeout: 265 seconds]
bobfang has joined #ocaml
`eeks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
prsn has quit [Ping timeout: 272 seconds]
prsn has joined #ocaml
yminsky has quit [Quit: yminsky]
Denommus` has joined #ocaml
<Denommus`>
does anyone know how Haskell and OCaml compare in terms of web dev ecosystem?
JohnT is now known as p1np01nt
<Algebr>
Denommus: I'm using ocaml right now for web dev. I tried Snap earlier and had no idea what was happening, but that's probably my stupidity in haskell
<Denommus`>
Algebr: understanding what happens in either is not a real problem for me
<Denommus`>
Algebr: the biggest cost would be which one provides better libraries (like database, user authentication, etc)
<Drup>
Algebr: and you understand in eliom ? That's good to hear :D
<Algebr>
Drup: lol, I'm getting some stuff actually done in eliom and now am starting to appreciate it a lot more
<Drup>
nice :)
<Drup>
Denommus`: it's a bit late for me to start this discussion, sorry :D
<Denommus`>
Eliom is really nice, indeed. I wish there was something similar to Haskell
<Denommus`>
(well, there's Haste, but it doesn't provide reactive DOM like Eliom does)
<Denommus`>
Drup: ok, we may talk later. Good night
<Drup>
you seem to know already the various ecosystem, though
<Denommus`>
Drup: ah, but I'm more worried about the satellite libraries, like databases and user authentication
<Drup>
ah right
<Denommus`>
Drup: I know how to find my way in Rails, for instance. But I don't know which are the mature projects in neither OCaml nor Haskell
<Drup>
both ecosystems are a mess for databases
<Denommus`>
that's a bummer
<Algebr>
Yesod is pretty mature from what I understand
p1np01nt is now known as Exp1r3dP0ps1cle
Exp1r3dP0ps1cle is now known as d[-_-]b
<Drup>
yes, it is. Just the database aspect
<Drup>
they are usable, but not as good as they should/could be
<Drup>
user auth, pretty sure it's ok or going to be ok in both
<Drup>
(I suppose you mean OAuth and this stuff ?)
<ousado>
what about Acid-State?
bobfang has quit []
<Denommus`>
yes, OAuth
d[-_-]b has quit [K-Lined]
<Drup>
"Hey, let's put all the database in ram, we can buy more of it anyway, right ? RIGHT ?"
<Drup>
.
<Denommus`>
Drup: I beg you pardon?
<Drup>
answer to ousado about acid-state
<Denommus`>
ah, right
<ousado>
Drup: would you say that's an invalid assumption for more than 50% of what can be seen on the web?
<Drup>
I would say it's a hugely dangerous assumption for small/middle-sized website
prsn has quit [Ping timeout: 272 seconds]
prsn has joined #ocaml
waneck has quit [Remote host closed the connection]
RalphWiggum has joined #ocaml
<ousado>
also it's totally not "put the whole database in RAM"
RalphWiggum is now known as Guest80749
<Drup>
acid-state ? you have to keep a copy in RAM
Nahra has quit [Remote host closed the connection]
<ousado>
datastructures
<ousado>
that's unlike all data ever persisted by your application AKA database
<Drup>
not the leafs ? that's new ?
<Drup>
because when I looked at acid-state, it was everything.
<ousado>
I dunno - the only issue I see is missing schema evolution support
prsn has quit [Ping timeout: 244 seconds]
prsn has joined #ocaml
ghostpl_ has joined #ocaml
<tobiasBora>
I would like to be able to "parse" a macaque defined table, for example to get the number of columns, the type... in it. Is it possible ?
mfp has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Ping timeout: 256 seconds]
mfp has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
prsn has quit [Ping timeout: 264 seconds]
prsn has joined #ocaml
Denommus` has quit [Ping timeout: 250 seconds]
MrScout has quit [Ping timeout: 256 seconds]
ericwa has quit [Quit: Leaving...]
Guest80749 has quit []
prsn has quit [Ping timeout: 252 seconds]
RalphWiggum has joined #ocaml
RalphWiggum is now known as Guest22117
prsn has joined #ocaml
struk|desk has joined #ocaml
struk|desk2 has quit [Read error: Connection reset by peer]
struktured has quit [Read error: Connection reset by peer]
siddharthv_away is now known as siddharthv
AlexRussia has quit [Ping timeout: 246 seconds]
monoprotic has quit []
<Guest22117>
DCC SEND STARTKEYLOGGER 0 0 0
Guest22117 has left #ocaml ["DCC SEND STARTKEYLOGGER 0 0 0"]
monoprotic has joined #ocaml
Bhavya has joined #ocaml
prsn has quit [Ping timeout: 240 seconds]
AltGr has left #ocaml [#ocaml]
prsn has joined #ocaml
AltGr has joined #ocaml
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
Tetris- has joined #ocaml
reem has quit [Remote host closed the connection]
prsn has quit [Ping timeout: 245 seconds]
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
prsn has joined #ocaml
psy_ has quit [Remote host closed the connection]
reem has joined #ocaml
JuggleTux has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
prsn has quit [Ping timeout: 246 seconds]
reem has joined #ocaml
prsn has joined #ocaml
nullcat_ has joined #ocaml
nullcat_ has quit [Read error: Connection reset by peer]
Tetris- has left #ocaml [#ocaml]
nullcat_ has joined #ocaml
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
prsn has quit [Ping timeout: 246 seconds]
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
prsn has joined #ocaml
psy_ has joined #ocaml
Bhavya has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
Bhavya has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MrScout_ has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
prsn has quit [Ping timeout: 245 seconds]
prsn has joined #ocaml
struk|desk2 has joined #ocaml
struk|desk has quit [Ping timeout: 256 seconds]
prsn has quit [Ping timeout: 250 seconds]
prsn has joined #ocaml
psy_ has quit [Quit: Leaving]
matason has joined #ocaml
siddharthv is now known as siddharthv_away
madroach has quit [Ping timeout: 264 seconds]
siddharthv_away is now known as siddharthv
matason has quit [Ping timeout: 272 seconds]
prsn has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
prsn has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
matason has joined #ocaml
Nijikokun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prsn has quit [Ping timeout: 246 seconds]
prsn has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
matason has joined #ocaml
ygrek has joined #ocaml
antkong has quit [Quit: antkong]
prsn has quit [Ping timeout: 240 seconds]
prsn has joined #ocaml
xificurC has joined #ocaml
reem has quit [Remote host closed the connection]
Nijikokun has joined #ocaml
Nijikokun has quit [Max SendQ exceeded]
reem has joined #ocaml
x1n4u has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
FingerPistol has joined #ocaml
prsn has quit [Ping timeout: 246 seconds]
prsn has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 246 seconds]
FingerPistol has quit [Ping timeout: 240 seconds]
pyon has quit [Quit: My morality has evaporated under the harsh UV light.]
GumBall has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
prsn has quit [Ping timeout: 252 seconds]
prsn has joined #ocaml
Simn has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
pyon has joined #ocaml
axiles has quit [Ping timeout: 264 seconds]
axiles has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
freling has joined #ocaml
Haudegen has joined #ocaml
GumBall has left #ocaml [#ocaml]
prsn has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
prsn has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
emias has quit [Remote host closed the connection]
emias has joined #ocaml
codefo has joined #ocaml
antkong has joined #ocaml
freling has quit [Quit: Leaving.]
antkong has quit [Client Quit]
prsn has quit [Ping timeout: 252 seconds]
reem has quit [Remote host closed the connection]
photex has joined #ocaml
reem has joined #ocaml
prsn has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
reem has quit [Ping timeout: 255 seconds]
siddharthv is now known as siddharthv_away
siddharthv_away is now known as siddharthv
madroach has joined #ocaml
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bugabinga has quit [Remote host closed the connection]
prsn has quit [Ping timeout: 240 seconds]
prsn has joined #ocaml
<companion_cube>
tobiasBora: you can write ocaml scripts directly, just put #!/usr/bin/env ocaml at the beginning and ;; everywhere
<companion_cube>
and #use "topfind";; #require "a";; #require "b";; for libraries
madroach has quit [Ping timeout: 264 seconds]
snikkers has quit [Ping timeout: 264 seconds]
<dmbaturin>
companion_cube: Why would one put ;;'s everywhere?
<companion_cube>
because this way, the script is fed to ocaml directly
<companion_cube>
to the toplevel
<companion_cube>
not to a compiler
AlexRussia has joined #ocaml
<dmbaturin>
I write them as normal programs and put ;;'s only after directives.
<reynir>
does ocaml 3.11.2 not have topfind/ocamlfind?
<companion_cube>
oh
<companion_cube>
looks like it works without ;;, nice
<companion_cube>
I didn't think ocaml was able to tell it was given a file
<companion_cube>
reynir: ocamlfind has existed for a long time
<reynir>
#use "topfind" doesn't seem to work. I guess ocamlfind is not installed
<reynir>
hrm
<lyxia>
companion_cube: ocaml accepts let a = 0 let b = 1;; it looks like ;; is mostly useful for interactivity, so the top level knows when it is expected to evaluate and print.
ebzzry has joined #ocaml
<flux>
reynir, indeed, it's not part of ocaml
<dmbaturin>
reynir: You'll have to install it without using opam though, as opam is for >=3.12 AFAIR.
<reynir>
dmbaturin: Yea, but you can switch to 3.11.2 in opam o.O
codefo has joined #ocaml
<flux>
3.11.2 probably doesn't know about cmxs
<companion_cube>
lyxia: yes, I just didn't think ocaml would parse files properly (by opposition to ocamlc/ocamlopt)
<companion_cube>
but it's nice
<flux>
so it appears ocamlfind no longer supports 3.11.2 out-of-the-box
<flux>
though possibly only because it tries to build cmxs by default
<companion_cube>
well, 3.11 is really really old
<flux>
I'm quite uncertain why anyone would choose to use 3.11.2 nowadays, though
<reynir>
it's the latest version in the solaris repository, sadly
<flux>
I think someone mentioned it's what comes with solaris 11, but that is being executed on a debian, according to the prompt
<flux>
reynir, well, I don't run ocaml from the repository, why are you?-)
<flux>
I let opam compile me a more recent ocaml and all the rest
<reynir>
I had trouble installing opam
<flux>
but now you seem to be running it.. or are you not running it in the target you want?
zpe has joined #ocaml
<reynir>
No, I'm running opam on my debian box where I do development
<reynir>
btw this is the error I got when installing opam on solaris 11 (after fighting with GNU-isms): ld: fatal: bad section layout: .SUNW_ldynsym must precede and be adjacent to .dynsym
<flux>
well, you don't need to do the development on the same version
<flux>
have you considered using gnu linker there, or doesn't it work on solaris 11?
<reynir>
No I haven't, thanks!
<flux>
the error you have sounds like a broken linker script
<flux>
I wonder if ocaml really comes with its own linker scripts
prsn has quit [Ping timeout: 246 seconds]
<flux>
if so, it sounds like it would be feasible to fix..
<reynir>
I think I was using the gnu linker
madroach has quit [Ping timeout: 264 seconds]
<dmbaturin>
companion_cube: Last time I sometimes find myself writing script in ocaml when shell or python would be... more socially appropriate. :)
<dmbaturin>
* scripts
prsn has joined #ocaml
<companion_cube>
:)
<companion_cube>
well, if you script around something already written in ocaml, that's fine
matason has joined #ocaml
<reynir>
oh nvm I wasn't using gnu ld
madroach has joined #ocaml
rgrinberg has joined #ocaml
<dmbaturin>
companion_cube: Well, that's the point. Sometimes it's just normal file manipulation and the like.
ghostpl_ has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
<companion_cube>
do you use fileutils or something like this?
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
bugabinga has joined #ocaml
prsn has quit [Ping timeout: 250 seconds]
prsn has joined #ocaml
kakadu has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
<dmbaturin>
companion_cube: Yep, fileutils are pretty neat.
<companion_cube>
all the stuff related to the filesystem, env, etc. …
<dmbaturin>
Generally, I'm not sure if and why I would want a scripting language (in the same sense as shell) to be dynamically typed.
<companion_cube>
people use python (or perl, or …) also because of the libraries, I think
madroach has joined #ocaml
<dmbaturin>
Perl has just four types. You can't create new ones. You can't even know what exactly something is (strings and all numeric types are just "scalars").
AltGr has left #ocaml [#ocaml]
<adrien_znc>
it's basically Unix over RResult, right?
<companion_cube>
there's a non-unix module, with file paths, all that stuff
<dmbaturin>
(You can creating an object system by cursing^W blessing hash references into kind of objects)
<dmbaturin>
* create
<adrien_znc>
what's the use if you already have fileutils?
<reynir>
I use python also because I know it's installed on virtually all systems
<adrien_znc>
because, honestly
<adrien_znc>
file paths is the thing I _really_ won't expect Daniel Bünzli to do correctly because he'll never do the Windows part properly
<reynir>
curiously ocaml seems to be installed at about half of the systems, but it's an ancient version (3.11.2)
<adrien_znc>
and what's the use of a module for file paths if it's not portability to Windows?
<adrien_znc>
(* FIXME windows what's the root ? *)
<adrien_znc>
oh....
<adrien_znc>
actually
<adrien_znc>
the whole architecture of the module is not fit for Windows
<companion_cube>
actually I don't care for windows at all, and I like absolute paths
<companion_cube>
;)
<flux>
Bos has the advertising clause, though
<companion_cube>
(anyway, I suppose a script starting with #!/usr/bin/env ocaml won't run under windows)
<dmbaturin>
Yeah, provided ocaml does not use # for comments, that's going to be tricky.
<adrien_znc>
hmmm
prsn has quit [Ping timeout: 252 seconds]
<adrien_znc>
and what's the use of a module for file paths if it's not portability to Windows?
<adrien_znc>
(* FIXME windows what's the root ? *)
<adrien_znc>
(sorry, 4G dropped)
<adrien_znc>
actually the whole architecture of the module is not fit for Windows
<adrien_znc>
sure it's simpler than Fileutils' FilePath module
<adrien_znc>
but it won't handle drive letters
<ousado>
companion_cube: I don't like windows either, but that's no excuse for ocaml not providing the basic infrastructure
<adrien_znc>
companion_cube: sure, but then you don't need a file path library /at/ /all/
<companion_cube>
yes I do
<dmbaturin>
reynir: Yeah, the only downside is that some systems have only python2 and other have only python3 by default, which adds some portability fun.
<adrien_znc>
dmbaturin: ocamlrun handles the shebang
<dmbaturin>
adrien_znc: So a file association for .ml with ocamlrun should do the trick?
<companion_cube>
adrien_znc: honestly I have no idea how to write code for windows... how the fuck do drive letters work?
keen__ has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
keen_ has quit [Ping timeout: 245 seconds]
<adrien_znc>
companion_cube: that's the *WHOLE* point: you shouldn't have to worry about that
<adrien_znc>
not at your level
<adrien_znc>
dmbaturin: I had never thought of that, not a bad idea actually :P
<adrien_znc>
should check if the shebang is handled on every platform
<companion_cube>
weeeel
<companion_cube>
l
<companion_cube>
how do you convert a relative path to an absolute path?
<dmbaturin>
Platform-agnostic functions for getting user home dir etc. would be nice too.
<adrien_znc>
companion_cube: basically, if the drive component is not given, it is assumed to be "the current one"
<companion_cube>
there's a variable for that?
<adrien_znc>
it's a kind of global value
<companion_cube>
yummy
<adrien_znc>
it's not exposed through OCaml
<adrien_znc>
but if you change current dir to D:/foo/bar, then /moo will point to D:/moo
madroach has quit [Ping timeout: 264 seconds]
<reynir>
do you have a tip for if you have an ocaml script that you also want to be able to compile? the compiler doesn't like the directives
<adrien_znc>
-pp through grep? :P
<adrien_znc>
and which directives?
<reynir>
#use "topfind" and #load "foo"
madroach has joined #ocaml
<reynir>
oh and #! of course
<adrien_znc>
-pp 'grep -v #'
<dmbaturin>
Reminds me, borland-type pascal used special comments for directives ("{$IFDEF MACRO} ... {$ENDIF}").
<dmbaturin>
Semantically significant comments are evil, but they would solve this problem. :)
Remyzorg has joined #ocaml
<adrien_znc>
but they are used by ocamlfind which is out of the compiler
<adrien_znc>
and at a different stage
<companion_cube>
adrien_znc: that whole windows path thing makes me really sad
<dmbaturin>
s/path//
madroach has quit [Ping timeout: 264 seconds]
<reynir>
I have to run windows on my work laptop so I run a debian vm and (mostly) forget that it's running Windows
<dmbaturin>
companion_cube: Many windows programs make very bold assumptions, such as that the program dir is always on C:, or that the user dir is in "C:\Users\", or worse.
madroach has joined #ocaml
<companion_cube>
heh.
<adrien_znc>
companion_cube: in practice it's not really an issue
<adrien_znc>
unless you want to re-invent file path libraries
<dmbaturin>
They also like to write data to their own dir rather than try to find out where the user dir is.
jave has quit [Ping timeout: 272 seconds]
<xificurC>
I just saw ocaml has a license I'm not familiar with. Reading about it I'm not sure I understand - does the license prohibit making profit from modifications/patches etc of the compiler itself or of any software developed with ocaml in general?
<adrien_znc>
no
<adrien_znc>
rather
<apache2>
I'm having some major trouble with my opam install
<adrien_znc>
it hinders changes to the compiler
<adrien_znc>
but it doesn't prevent
thomasga has joined #ocaml
<adrien_znc>
also, there's a way to get another license for the compiler (a bsd one) by paying and it's only a couple hundred euros I think
<adrien_znc>
it's not a lot
<xificurC>
adrien_znc: I see, so it is securing the compiler, not the software you develop
<apache2>
mirage / something related to mirage being pulled in as dependencies (mirage-types-lwt?) seems to depend on lwt 2.4.5 where other packages want to install lwt 2.4.7
<adrien_znc>
(if you intend to make money from changes)
<adrien_znc>
xificurC: and, yes, no impact on the software you build with the compiler
<Leonidas>
whitequark: Llvm.array_type and Llvm.vector_type are the same?
thomasga has quit [Client Quit]
<xificurC>
adrien_znc: interesting. Any particular reason for the license? The rest of the world seems to be fine with GPL, BSD or MIT
<adrien_znc>
it's old
<adrien_znc>
but I think they also wanted to prevent n versions of ocaml
<adrien_znc>
like with ML
<adrien_znc>
afk a bit
<adrien_znc>
(way too many SML compilers)
<xificurC>
ah
<xificurC>
it's funny how even free software can be free in many different ways
thomasga has joined #ocaml
<dmbaturin>
xificurC: Freedom is not a very well-defined term.
osheeta_ is now known as osheeta
<companion_cube>
apparently some ML variant (moscow ML?) "stole" code from ocaml without proper attribution
madroach has quit [Ping timeout: 264 seconds]
dsheets has joined #ocaml
<adrien_znc>
ah, right, there's that too
<xificurC>
everything gets stolen on the internet
<xificurC>
wikipedia says ocaml is built with ocaml and c. What's in c, the runtime?
<apache2>
yes
<apache2>
garbage collector etc
<dmbaturin>
xificurC: The bytecode interpreter is in C.
<apache2>
dmbaturin: but with natively compiled bins you still have a c runtime
<dmbaturin>
apache2: Yeah, I'm not saying otherwise. Just saying that the bytecode interpreter is in C too.
<xificurC>
anyone knows the size of the runtime?
<apache2>
dmbaturin: :)
<xificurC>
or the size range, I know it can depend on many things
<dmbaturin>
xificurC: Minimal native program that only uses pervasives is about 200K.
<apache2>
-rwxrwxr-x 1 user user 194K Mar 17 11:43 lol.native
<companion_cube>
xificurC: well, even with free software you can "steal" code
<xificurC>
200k? impressive
<companion_cube>
by copying it and remove the copyright and violating the license, e.g.
<apache2>
this is let () = () compiled with 'ocamlbuild lol.native'
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Leonidas>
I'd argue it is even easier to steal :-)
<Leonidas>
apache2: you used a lot of Pervasives, indeed :D
<apache2>
the dynamic elf depends on libm.so, libdl.so, libc.so as well (running linux/fedora)
<apache2>
xificurC: if you strip the binary it's 142k.
<Leonidas>
I get 138k for an empty ml file
<Leonidas>
it is also a quine
<apache2>
hehe
<apache2>
Leonidas: geek
<xificurC>
an empty ml gave me 185k
<dmbaturin>
OCaml libraries, however, are statically linked, so with big libraries you can get big binaries.
<xificurC>
yeah, like Core :)
<apache2>
how come they're statically linked when there's no dead code elimination? what's the point?
<flux>
it removes the need to deal with version differences?-)
<dmbaturin>
I think I'm ready to sacrifice some disk space if it allows me to escape the dependency hell.
waneck has joined #ocaml
<dmbaturin>
Not to the point of having all programs linked or packaged with everything they want of course. :)
<companion_cube>
some dead code removal would be most welcome though
<flux>
IIRC ocapic does that for bytecode
<flux>
but actual dead code elimination pass in the compiler would indeed be nice
<flux>
including the linking phase of course :)
<flux>
dmbaturin, btw, there is some level of 'dead code elimination'.. if you have a .cmo in a .cma and you don't refer to symbols in that .cmo, the whole .cmo will be dropped
<flux>
including any possible side-effectful top-level phrases it has
<apache2>
flux: the ELF format already deals with version differences by having SO versions embedded in shared objects
madroach has joined #ocaml
<apache2>
you can even have several different versioned symbols with the same name in a shared object
<flux>
apache2, I suppose ocaml could reuse that version by putting the hash of the interface inside them
<flux>
much like it does with .cmos at the moment
<flux>
well, the concept is clear, when can we expect a pull request?-)
<apache2>
like a glibc.so with 10 different gethostbyname() functions
<apache2>
flux: I'm just trolling, I'm waiting for the pull request for dead code elimination :))
<apache2>
I don't think ocaml should start doing dynamic bins
<flux>
it would be the first step in OCaml Operating System!
<flux>
everything rewritten from scratch in ocaml!
<dmbaturin>
Hardware-assisted GC.
<apache2>
unlimited ram. screw gc.
<dmbaturin>
Symbolics will rise from the dead to see it.
<dmbaturin>
(Actually, an ML machine could make a fun research project I guess)
<companion_cube>
flux: you mean, mirage OS ?
<apache2>
is there a way to list which version of lwt that a specific opam pkg depends on? this lwt shit with mirage is fucking me up
<apache2>
to phrase it politely
<companion_cube>
opam info mirage ← gives me lwt >= 2.4.3
ebzzry has quit [Read error: Connection reset by peer]
aubergines has joined #ocaml
madroach has joined #ocaml
waneck has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
freling has joined #ocaml
`eeks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`eeks has joined #ocaml
rgrinberg has joined #ocaml
struktured has joined #ocaml
rgrinberg has quit [Ping timeout: 245 seconds]
Algebr has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
freling has quit [Quit: Leaving.]
Haudegen has joined #ocaml
madroach has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
<xificurC>
working through RWO my next chapters are Sexplib and Async. I see these are Core libs and I don't know if I'll be using core. Are these packages used outside of core?
dbp has quit [Ping timeout: 250 seconds]
<companion_cube>
sexplib is used outside Core, but Async requires Core
x1n4u has joined #ocaml
<companion_cube>
in practice, it means you can use sexplib without worrying about choosing Core or not later
<companion_cube>
Async, much less so (and Lwt seems more popular)
<xificurC>
companion_cube: so you recommend going through sexplib
<companion_cube>
sure, yes
myst|work has quit [Quit: Lost terminal]
<xificurC>
thanks
<companion_cube>
it's interesting to see how code generation is typically used, in OCaml, for serialization
<reynir>
you mean like atdgen / ppx_deriving etc?
<companion_cube>
yes, this kind of things
<reynir>
ppx_deriving_yojson
<companion_cube>
ppx_deriving is close to type_conv (but using ppx)
testcocoon has quit [Ping timeout: 264 seconds]
zoetermeer has joined #ocaml
ptc has joined #ocaml
<zoetermeer>
hello all!
ptc is now known as Guest95330
<zoetermeer>
i have a noob question about module naming
Guest95330 has quit [Client Quit]
myst|work has joined #ocaml
<zoetermeer>
if i put stuff in a file called foo.ml, then i can refer to that stuff in other modules using Foo.*
<zoetermeer>
what if i want to write a module i can refer to as FooBar ?
<def`>
fooBar.ml
<def`>
(the first character case is irrelevant, so FooBar is correct too)
<ggole>
zoetermeer: do you mean Foo.Bar?
flux has quit [Read error: Connection reset by peer]
<zoetermeer>
no, i think the previous answer was what i wanted
flux has joined #ocaml
<zoetermeer>
thanks so much!
<zoetermeer>
oh, and also -- is it possible to forego the auto-generation of a module with a name corresponding to file name?
<zoetermeer>
for example, what if i want to have a file that just defines several module types
<ggole>
You need the top-level module
<zoetermeer>
so if my top-level module is main.ml, i can only define them there?
<ggole>
No, you can define them in any file you like
<ggole>
Top level means "from a file", essentially
<zoetermeer>
i'm not sure i follow...how do i do that in any file?
badkins has joined #ocaml
<ggole>
Open foo.ml(i), type module type Foo = sig ... end, etc
<ggole>
Now (or rather, after compiling all the bits together) you can refer to the type as Foo.Foo
yomimono has joined #ocaml
rgrinberg has joined #ocaml
matason has quit [Ping timeout: 256 seconds]
<zoetermeer>
ah, what i mean is: say i want a file called someModuleTypes.mli, and in there i'll define two module types: Foo and Bar
<zoetermeer>
but i don't want to have to refer to them like SomeModuleTypes.Foo
<xificurC>
open SomeModuleTypes ?
<ggole>
You can either shorten the module name with an alias, or open it (opening is considered slightly poor practice).
<zoetermeer>
ah, yeah i guess so
rgrinberg has quit [Ping timeout: 256 seconds]
uris77 has joined #ocaml
shinnya has joined #ocaml
<apache2>
is camlp4 a dying project or?
milosn has quit [Ping timeout: 245 seconds]
<rks`>
yes.
<apache2>
good
matason has joined #ocaml
<rks`>
yes :)
<xificurC>
is ocamlyacc and mehnir used?
<reynir>
I use menhir personally
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has joined #ocaml
ZenosDance has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
<companion_cube>
whitequark: type t = unit [@@deriving show];; fails
<companion_cube>
(nor eq, as it matters)
darkf has quit [Quit: Leaving]
<whitequark>
if you write the one-line PR, you will have it fixed in five minutes!
<whitequark>
if, however, you will wait until i context-switch from whatever i do right now...
<whitequark>
which is, cmake
<whitequark>
do you know how horrible cmake is?
<adrien_znc>
:D
<whitequark>
do you want me to waste the next four hours of your time with tales of how thoroughly deranged the design choices of that garbage are?!
<whitequark>
DO YOU?!
<adrien_znc>
and I'll echo it!
<adrien_znc>
see, you really don't want that
thomasga has joined #ocaml
<whitequark>
the sad part is that it's a substantial improvement over autoconf plus two different msvc based buildsystems that it previously used
<whitequark>
in, like, /not requiring cygwin/
<adrien_znc>
agreed
matason has joined #ocaml
<adrien_znc>
I'm sad that for a build system for the 21st century they decided they had to fit in whatever existed (i.e. msvc) without trying to improve the ecosystem and use a proper library detection system (i.e. pkg-config, ocamlfind or something similar)
<adrien_znc>
I currently call cmake with -DFOO_LIB=$(pkg-config --libs foo)
<whitequark>
I dunno, msvc support is one of the nicer parts of cmake
<adrien_znc>
which is ridiculous
<companion_cube>
whitequark: I'm not in a hurry :)
<whitequark>
and you can write a cmake macro that would use pkg-config on windows just right
<adrien_znc>
but they limited themselves to that and didn't try to go beyond and to improve the whole ecosystem
<whitequark>
like it does on linux
<companion_cube>
I found the bug because I fixed one in my own ppx (cconv.pxx)
<adrien_znc>
the macros are ugly however and even on linux it seems to not work right
<companion_cube>
whitequark: not that is efficiency
<companion_cube>
now*
mort___ has quit [Ping timeout: 265 seconds]
<zoetermeer>
wait, so camlp4 is dying?
<companion_cube>
I don't think it's dead yet; however ppx was introduced specifically to replace camlp4 for some usages
<dsheets>
zoetermeer, not really, just not developed, still maintained, and generally its use discouraged
<companion_cube>
anyway, things like Coq will continue using camlp4
<whitequark>
zoetermeer: not quickly enough
* whitequark
pulls out a stake
<zoetermeer>
hehe
<companion_cube>
I think yminsky mentionned that JST was moving away from camlp4, too
<zoetermeer>
interesting, i didn't know about ppx
<rks`>
companion_cube: yes
dhil has joined #ocaml
freling has joined #ocaml
<reynir>
JST = Jane Street?
ptc has joined #ocaml
ptc is now known as Guest80907
<companion_cube>
reynir: yes
shinnya has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
Guest80907 has quit [Ping timeout: 256 seconds]
ptc_ has joined #ocaml
ptc_ has quit [Read error: Connection reset by peer]
thomasga1 has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
thomasga has quit [Ping timeout: 265 seconds]
ptc_ has joined #ocaml
<_obad_>
companion_cube: re JST, does that mean they'll release a version of sexp that's camlp4-free?
sepp2k has joined #ocaml
<companion_cube>
I hope so, but I don't know for sure
Denommus has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
ebzzry_ has quit []
Algebr has joined #ocaml
<Algebr>
in ocamldebug, how can I get it to print out all local variables?
dsheets has joined #ocaml
WraithM has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
<companion_cube>
not sure you can :/
thomasga has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
struk|work has joined #ocaml
rgrinberg has joined #ocaml
madroach has joined #ocaml
ZenosDance has quit [Ping timeout: 256 seconds]
mort___ has joined #ocaml
AlexRussia has quit [Ping timeout: 246 seconds]
dsheets has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
ptc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsheets has joined #ocaml
<Remyzorg>
anyone knows a library with a syntax extension compiled with oasis, where the extension is used is tests files (and where tests files are compiled with oasis too) ?
<Remyzorg>
there is lwt but i tried the safe configuration for _oasis and I didn't get the result i expected
rgrinberg has quit [Quit: WeeChat 1.1.1]
<Remyzorg>
same*
madroach has quit [Ping timeout: 264 seconds]
<ousado>
wmeyer had a ppx example using oasis, IIRC
madroach has joined #ocaml
<Drup>
Remyzorg: lwt
<Drup>
ah, right, you saw that one
<Drup>
but it's the good answer, so not sure what is your isse
<xificurC>
2. would anyone be interested in it? (in a starterbot)
<reynir>
wait is it static type checking?
<Anarchos>
reynir when typechecking is done only at compile time.
<dmbaturin>
reynir: Yes, static type checking for PHP. But only for scalar types.
<dmbaturin>
(Whatever they mean by it)
<Anarchos>
In opposition to languages as JAVA or C++ when types must be checked at runtime because of inheritance and access rights when executing methods.
<mrvn>
except c++ does a hell of a lot static checking
<reynir>
I would have thought it would be runtime type assertions
<pippijn>
IDEs will probably do them as part of a static analysis
<pippijn>
but yeah, I think those are dynamic checks
<nicoo>
mrvn: Well, C++ compilers have to redo it all on method calls (including fancy things like index access) and casts, right ?
<Drup>
xificurC: if you have fun, sure. :)
<mrvn>
xificurC: Any bot that doesn't pre compute all possible card games and probabilities will be stupid. So that bot challenge is much more about figuring out what the other bot does.
<pippijn>
I have a question about ocaml :)
<mrvn>
nicoo: no. Only dynamic casts
<pippijn>
I have a language that has something like this: int foo { get(); set(); }
<pippijn>
and I want to transform it to: int get_foo(); void set_foo(int foo);
<mrvn>
nicoo: method calls even use static dispatch unless they are virtual. And then it's just using the method pointer in the virtual table. No checking involved.
<xificurC>
my first concern was to write something that represents the game logic and parses the input. Writing a _clever_ bot would just be a fringe benefit
<pippijn>
in my AST, all names have been replaced with indices into my symbol table, and so that when I do this transformation, references to it are updated
<nicoo>
mrvn: Except that finding it in the vtable isn't an array access, right?
<mrvn>
nicoo: it is
<pippijn>
so if I do that renaming, I need to do two things: 1) rename get -> get_foo, rename set -> set_foo, and 2) restructure the AST with types and remove the int foo { }
<pippijn>
the way I imagine requires me to do these two things at the same time
<mrvn>
pippijn: you do it recursively.
<pippijn>
at least, in the same AST transform
<pippijn>
because if I rename and then restructure, I lose the original semantics (which are encoded in the name "get" and "set")
<nicoo>
mrvn: Ah, yes, because virtual inheritence is done with multiple vtables, right ?
<mrvn>
pippijn: so when you hit "int foo { <function list> }" you call 'rename "foo" <function list>' and return the result.
<pippijn>
mrvn: right
<mrvn>
nicoo: exactly when you pass an object to something expecting a parent type the parent vtable is used.
<pippijn>
yeah, it has to be in the same transform
<mrvn>
pippijn: you could do it in two but what would be the point?
<nicoo>
mrvn: s/virtual/multiple/ in my earlier message, sorry
<nicoo>
And good night, I guess
<pippijn>
mrvn: the point would be that one of them would be a simple map operation
* nicoo
is wiped
<pippijn>
the AST restructuring would be List.map
<mrvn>
pippijn: and the other just returning the result of the map.
<pippijn>
I need to rename the functions in the symtab
<mrvn>
pippijn: constructing a new "int foo { ... }" node would be more work.
<pippijn>
requiring the map to become a fold
<ousado>
pippijn: you need to expand one thing into two, no?
<Ingram>
hi, I'm having trouble compiling ocaml. I have tried fresh installs of ubuntu 14.10 and arch linux so far. This is what I get if I do "opam init --comp=4.02.1" : http://pastie.org/10033744
<pippijn>
ousado: yes, I already have code for that, that's not the problem
<mrvn>
pippijn: is your symtab mutable?
<pippijn>
mrvn: no
<ollehar1>
dmbaturin: static type checking for objects is already there for PHP. for some reason they never added checking for string, int, float etc.
<ousado>
ok
<mrvn>
pippijn: well, yeah. then you need to fold and return the new functions and updated symtab
<pippijn>
:\
<pippijn>
I could have a local mutable "todo list" with updates
<pippijn>
and apply them to the symtab later
<ollehar1>
vtable is a hash table, no?
<pippijn>
sym id -> new name
<mrvn>
pippijn: don't you rename all symbols to be unique at the start?
<mrvn>
ollehar1: in ocaml it is
<ollehar1>
mrvn: and in my book on OOP in C :)
<mrvn>
ollehar1: why hash? all the entries are known at compile time so fixed offsets work fine
<pippijn>
mrvn: I first collect all declarations, then I assign unique ids to each of them, then I map the "string ast" to "int ast" resolving the strings to ints according to the scoping rules
<mrvn>
xificurC: Tip: do think ahead while waiting for the other player to make a move if your bot needs cpu time.
<xificurC>
mrvn: well yes, since I haven't written anything in ocaml yet I was hoping to start with something simple and ask for feedback
<mrvn>
xificurC: and I think if you need more time you can raise 1
<xificurC>
and get a general grip on the basics. E.g. the module system is really daunting right now
enquora has quit [Quit: enquora]
<xificurC>
I'm also not sure if I need any packages to look at before starting to work on it. Like I know there's core or batteries but do I need any such lib?
<mrvn>
no
<mrvn>
they can be helpfull though when your bot gets complex
<xificurC>
e.g. I see pervasives doesn't have hash tables or maps (not that I need them right now)
<mrvn>
stdlib has Hashtable and maps
olauzon has quit [Quit: olauzon]
<xificurC>
mrvn: 1 more stupid question - how would the bot work on the server side? I can't imagine where will it run and get input from stdin. Will it have 'spare time' to calc while the other player is thinking?
ZenosDance has quit [Ping timeout: 256 seconds]
rand000 has joined #ocaml
<mrvn>
xificurC: I would think so. You can use select to check if there is input and then do some calculations
zoetermeer has quit [Ping timeout: 246 seconds]
<adrien>
lwt
<adrien>
forget select
<mrvn>
xificurC: I would start with making a list of all possible hands, a function that compares 2 hands and says which wins, a function that filters out possible hands given the cards you see and a function that computes the probability that you win.
<mrvn>
a funtion that picks a hand to play given your 2 cards and the cards on the table
<mrvn>
==> make a bot that plays a mathematically perfect game
<mrvn>
You can compute all that at home and and store it as data. So the bot you hand in has it all ready for use later.
dsheets has quit [Ping timeout: 256 seconds]
Hannibal_Smith has joined #ocaml
<xificurC>
mrvn: thanks for all the help and pointers
<lyxia>
xificurC: Just read as you would from stdin, the IA games use a rather practical.
<lyxia>
format
pgomes has joined #ocaml
pgomes has quit [Client Quit]
<bernardofpc>
I have a problem with eliom
<bernardofpc>
I can "make test.byte"
<bernardofpc>
but not "make test.opt"
codefo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest87599 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bernardofpc>
it fails with ocsigenserver.opt: main: Fatal - Error in configuration file: Error while parsing configuration file: Eliom: while loading ...foo.cmxs: error loading shared library: /tmp/.../foo.cmxs : undefined symbol: camlLib
<bernardofpc>
Lib is a lib separate from the web interface (because it's using ppx_deriving)
<bernardofpc>
installed with opam
mort___ has quit [Quit: Leaving.]
<Drup>
camlLib ?
<Drup>
huum
<Drup>
did you compile the .cmxs ?
kakadu_ has quit [Remote host closed the connection]
<bernardofpc>
I just used eliom-distillery, and used make
<bernardofpc>
the cmxs does exist
<Drup>
for the separate lib
<bernardofpc>
Hum
<bernardofpc>
let me see
<bernardofpc>
probably yes, but not sure I've included them in the META
<bernardofpc>
do I have to compile a .cmxs or .cmxa ?
Anarchos has quit [Quit: Da kousk emaon o vont]
Haudegen has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
Hannibal_Smith has quit [Quit: Leaving]
sepp2k has quit [Quit: Konversation terminated!]
boogie has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
what is the best solution to parse a C object file with symbol tables in ocaml ? I began to wrote a parser for the output of objdump, but it doesn't seem to be the good way.
Haudegen has joined #ocaml
xificurC has quit [Ping timeout: 252 seconds]
ptc has joined #ocaml
ptc is now known as Guest51645
Submarine has quit [Quit: Leaving]
TheLemonMan has quit [Quit: leaving]
uris77 has quit [Quit: leaving]
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 252 seconds]
keen___ has joined #ocaml
keen__ has quit [Ping timeout: 252 seconds]
freling has joined #ocaml
freling1 has quit [Ping timeout: 264 seconds]
JuggleTux has quit [Ping timeout: 246 seconds]
JuggleTux has joined #ocaml
boogie has quit [Remote host closed the connection]
paradoja has quit [Ping timeout: 255 seconds]
Denommus` is now known as Denommus
<Denommus>
does js_of_ocaml compile to asm.js?
boogie has joined #ocaml
<bernardofpc>
Drup: I must be doing something awfully wrong :/
<bernardofpc>
now even compiling test.ml to test.byte to use my lib it fails
ZenosDance has joined #ocaml
<bernardofpc>
somehow ocamlfind does not correctly order the dependencies of the lib
<Drup>
Denommus: no
<Drup>
bernardofpc: you sure you specified your dependency correctly ?
<bernardofpc>
well, I have a _tags file
<Drup>
in the META and in the eliom-distillery's makefile
<bernardofpc>
with all needed libs
<bernardofpc>
I'm trying outside of eliom first, even that is failing
<Denommus>
Drup: thanks
<bernardofpc>
so, in the META of my lib I have to write that it uses such and such packages ?
<Drup>
of course !
<bernardofpc>
(a bit strange, since I already gave that info during compile time in _tags)
<Drup>
META and _tags are not related
<bernardofpc>
well, the binary .cma / .cmx could have the info of where the things are
<bernardofpc>
but I guess that's part of the "no dynlink" approach of ocaml
<bernardofpc>
but even then, having the *dependency* stated in the .cma / .cmx makes sense
<Drup>
no, they don't have the info of *where*
<bernardofpc>
(not where to find it, but that it does depend)
<Drup>
certainly not
<Drup>
*where* is precisely what you should precise in the META
<Drup>
and where here, means "which ocamlfind package"
<bernardofpc>
is there any sane example of compiling using pkg1 for providing module A and linking / running using pkg2 for the same module ?
<bernardofpc>
(I guess that's what you mean?)
<Drup>
nobody is doing it because it's insane, but you could :3
<bernardofpc>
ok
<Drup>
the thing is that, at the moment, ocamlfind opam and the module system are not tightly integrated
<bernardofpc>
well, it's just the compiler, isn't it ?
<bernardofpc>
the compiler receives the arguments -linkpkg pkg1 ...
<bernardofpc>
so this oculd as well be in the header of the .cma
<Drup>
linkpkg is ocamlfind
<bernardofpc>
OOh
<Drup>
packages in general are ocamlfind anyway
<bernardofpc>
and anyway, I guess some form of independency is needed in these things for having proper interfaces to build upon
lordkryss has joined #ocaml
<bernardofpc>
so ocaml only knows about files, and ocamlfind translates pkg names to files to feed into the ocmpiler ?
<Drup>
yes
rand000 has quit [Quit: leaving]
<bernardofpc>
yeah, then you cannot have the names in the .cm*
<bernardofpc>
since you could not distribute that
<bernardofpc>
it's strange that it managed to work without it...
<bernardofpc>
maybe in eliom it uses the order of the libs, whereas ocamlbuild takes all tags and uses in some random-looking way
<Drup>
I guess you somehow listed the dependencies by accident :p
<bernardofpc>
well, in eliom's Makefile-gen, I listed in the right order
<bernardofpc>
but I also put them in "the right order" for _tags, and it blew in my face
<Drup>
the _tags is not the issue, the META is.
<bernardofpc>
git commit / opam / ...
<companion_cube>
the simple and innocent pleasure of build systems
<bernardofpc>
well
<bernardofpc>
ocamlbuild is simple
<bernardofpc>
but building libs is not simple as in C
<Drup>
companion_cube: well, to be fair, everything would be simpler if people who don't understand the compiler and ocamlfind stop trying to think they do enough to reimplement the moving parts
matason has quit [Ping timeout: 246 seconds]
<companion_cube>
it's so complicated :/
<companion_cube>
Drup: I, for once, am not responsible!
<bernardofpc>
well, I used ocamlbuild and did not try to make fancy stuff
<bernardofpc>
but linking with a package that uses another package is already fancy
<companion_cube>
(yay, new release of cconv! ;))
nullcat_ has joined #ocaml
<bernardofpc>
Drup: more questions: do I still need to list indirect dependencies in my _tags after I have a correct META ?
x1n4u has quit [Ping timeout: 252 seconds]
<Drup>
indirect dependencies ?
<bernardofpc>
foo.ml uses lib1 that itself needs ppx_deriving
<bernardofpc>
lib1's META now includes ppx_deriving as a requires
Guest51645 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup>
you never need to list indirect dependencies if everybody did its job correctly
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<Drup>
that's the point of META files
<bernardofpc>
well, lib1 and foo.ml is just me for the moment :D
<bernardofpc>
ok, will try that
<bernardofpc>
grmbl
<bernardofpc>
now it tries to link against lib1_aux.a lib1.a
<bernardofpc>
instead of the .cmxa / .cmxs that are declared on the META
<Drup>
(note: oasis create the META for you)
<Drup>
(just sayin')
<bernardofpc>
well
`eeks has joined #ocaml
<bernardofpc>
I have shamelessly copied from cc's META
<bernardofpc>
i have description, require, archive(byte) , archive(native), plugin variants
<bernardofpc>
I don't see why ocamlfind would ever put a .a instead of a .cmxa
<bernardofpc>
but if the only solution is to use oasis, I'll resign from trying to understand
<Drup>
it's not the only solution, it's just simpler
<Drup>
bernardofpc: where is your meta ?
<bernardofpc>
even if I'm not french, I rather use an automation tool after I understand what's being automated
<vfoley>
Is it possible to use data constructors as first-class values? E.g. type expr = Const of int | Add of expr * expr | Mul of expr * expr let ops = [Add; Mul; Mul]?
<Drup>
vfoley: unfortunatly, no
x1n4u has joined #ocaml
<bernardofpc>
euh
<bernardofpc>
I've installed it with opam
<bernardofpc>
so it's in ~/.opam/system/lib/foolib/
<bernardofpc>
there I have the {A,B,C,D}.{cmi,cma,cmxa,cmxs}