<octachron>
Warning 666 : You are trying to use GADTs, have you yet sold your soul to the type-checker god ? :p
malina has joined #ocaml
jamesst20 has joined #ocaml
cbot has quit [Quit: This computer has gone to sleep]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mali__ has joined #ocaml
mali__ has quit [Remote host closed the connection]
cbot has joined #ocaml
demonimin has joined #ocaml
demonimin has joined #ocaml
etc has joined #ocaml
<etc>
Hi! So I'm trying to work with ocamlc directly and am trying to understand a bit more about how ocamlbuild works
<etc>
ocamlc requires that you put arguments in the right order so that modules can only depend on the ones before them in the order
<etc>
but ocamlbuild allows you to specify a .native file and will determine the order of the modules for you, as well as if there is a recursive reference
jmasseo has quit [Ping timeout: 256 seconds]
<etc>
there's got to be some logic that does this in ocamlbuild - I couldn't find it though. Does anyone have a code pointer to where ocamlbuild or ocamlc determines the correct order for modules?
<zozozo>
there is ocamldep
<zozozo>
which computes an over-approximation of the dependencies of a file iirc
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
<etc>
Ah that's exactly what I was missing - thanks!
moei has quit [Quit: Leaving...]
larhat has quit [Quit: Leaving.]
mengu has quit [Remote host closed the connection]
etc has quit [Quit: leaving]
octachron has quit [Quit: Leaving]
lucasem has joined #ocaml
<lucasem>
Could someone explain what the syntax |> does?
<lucasem>
It's used in Yojson's examples, and I want to understand what it's actually doing
infinity0 has quit [Remote host closed the connection]
<lyxia>
it's reverse application. x |> f = f x
<lyxia>
you can do neat pipelines like this
<lyxia>
x |> f |> g |> h = h (g (f x))
<lucasem>
cool! Seems pretty convenient in conjuction with @@ too
<lucasem>
thanks!
infinity0 has joined #ocaml
rcsole has joined #ocaml
calculemus has quit [Read error: Connection reset by peer]
calculemus has joined #ocaml
rcsole has quit [Ping timeout: 240 seconds]
wtetzner has joined #ocaml
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
wtetzner has quit [Remote host closed the connection]
jmasseo has joined #ocaml
jbrown has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
<jamesst20>
Hi
<jamesst20>
Could someone explain me why the function "ajouter" which takes a tree and a word to add as a parameter, doesn't change the tree outside the function ? (Returns unit) http://pastebin.com/Fce3rQAe
cbot has quit [Quit: This computer has gone to sleep]
P4Titan has joined #ocaml
jbrown has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<P4Titan>
Hi all. I need to convert an OCaml record I created into bytes are quickly as possible
<P4Titan>
Does anyone have any ideas? Marshalling is still too slow for me
<P4Titan>
I don't need to rebuild this type afterwards tho, I just need its bytes
<P4Titan>
since I'm hashing it
<zozozo>
P4Titan: do you want the bytes, or do you simply want to hash your record ?
<P4Titan>
to hash the record
<P4Titan>
SHA256
HKei has quit [Quit: Lost terminal]
<P4Titan>
I already have installed a library with a C backend to hash bytes w/ an entire assortment of algorithms
<zozozo>
well, instead of going through bytes, you could directly hash the fields of your record
<P4Titan>
that's not exactly what I looking for though...
<zozozo>
what do you mean ?
<P4Titan>
type t = {
<P4Titan>
n_time : Uint32.t [@key 3];
<P4Titan>
hash_merkle_root : Uint256.t [@key 2];
<P4Titan>
hash_prev_blk : Uint256.t [@key 1];
<P4Titan>
n_bits : Uint32.t [@key 4];
<P4Titan>
n_nonce : Uint32.t [@key 5];
<P4Titan>
txs : Transaction.t list [@key 6]
<P4Titan>
} [@@deriving protobuf]
<P4Titan>
is my record, Transaction and Uint256 etc are implemented by myself as well
<zozozo>
please paste your code on some site (not on the chan), it's more readable, ^^
<zozozo>
since, you define Uint256 and Tansaction.t, you could provide hash functions for those, and then combine the hashes to hash your record
<P4Titan>
I can already hash this record though. I'm just wondering if there is a quick way to dump an OCaml type so that I can hash it
<P4Titan>
right now, I serialize it (using protobuf as you can see), which makes my bytes and hash that
<P4Titan>
tbh, that is good enough for my intents and purposes for now
<zozozo>
well, there's always the polymorphic hash function
<zozozo>
well, serialising it before hashing is not the most eficient way, but it works too
<P4Titan>
ya
<jamesst20>
zozozo: Any chance you know the answer to my question :) ?
<zozozo>
jamesst20: sure, what do you think line 12 of your example does ?
<jamesst20>
zozozo: I truthfully wish the ! on my var with @ would add the element to the list in the reference
<zozozo>
that's not what it means, ^^
<jamesst20>
zozozo: What does it do ?
<zozozo>
(first adive: you should use the -strict-sequence option)
<zozozo>
the ! operator returns the value of a reference
<zozozo>
if you want to update the value of a reference r, you should use ':='
<jamesst20>
ahhh right !
<zozozo>
so for instance, if you have an int list ref r, in order to add something to the head, you could do something like: r := 1 :: !r
<jamesst20>
In C++, *ptr = value updates the value hence why I made that mistake
<jamesst20>
Some day, I'm gonna be a pro with functional langage ^^
<zozozo>
in ocaml a = b is the equality test, adn returns a boolean
<zozozo>
this is why you should us ethe -strict-sequence option : it will warn you whenever you do something like a = b; e, since a = b is of type bool when you expect it to have type unit
<jamesst20>
zozozo: It did warn me that the operator @ should return unit in my case
<jamesst20>
zozozo: It's why I left a "; ()" at the end
<jamesst20>
zozozo: I am not sure to know how to add the flag -strict-sequence option
<jamesst20>
I am using Sublime Text with REPL
<jamesst20>
zozozo: Woohoo it works :D !
<jamesst20>
zozozo: and the warning is gone :D
rpg has joined #ocaml
<zozozo>
just add the option -strict-sequence to the command that starts the REPL (for isntance 'ocaml -strict-sequence')
<zozozo>
warnings are usually useful in finding out what goes wrong in your program, ^^
FreeBirdLjj has joined #ocaml
<jamesst20>
zozozo: Unsure where the command is, I just click "Repl toplevel"
<jamesst20>
zozozo: That's true
<zozozo>
I d'ont really known Sublime text, so I can't help you about that, sorry
<jamesst20>
Sure no problem, I will google it :)
silver has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 268 seconds]
rpg_ has joined #ocaml
rpg has quit [Ping timeout: 268 seconds]
dch_ has quit [Remote host closed the connection]
rpg_ has quit [Ping timeout: 240 seconds]
rpg has joined #ocaml
rcsole has joined #ocaml
wtetzner has joined #ocaml
<jamesst20>
Does else if exists in OCaml?
rcsole has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 260 seconds]
<okeuday_bak>
yeah, you just use "else if", so it is just a new if
copy` has quit [Quit: Connection closed for inactivity]
<jamesst20>
Thank you, I though it was the reason why I was getting an error, but it was just a missing parenthesis my bad
<jamesst20>
I can't find how to do pattern matching with a ref list
<jamesst20>
I found on google match a with | _, { contents = (c, n) :: t } -> (* Do something *) but I don,t understand what is that underscore
<jamesst20>
ohh wait nvm
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jamesst20>
Is there a way to make 2 conditions in one if ? Like if a and b then
ygrek has quit [Ping timeout: 260 seconds]
<okeuday_bak>
jamesst20: yeah, the C syntax: &&
<jamesst20>
okeuday_bak: But be same for OR ? ||
<okeuday_bak>
yes, its just that "!" is "not" in OCaml
<jamesst20>
okeuday_bak: Alright :) Thank you, it's good to know
tizoc has quit [Read error: Connection reset by peer]
govg has joined #ocaml
wtetzner has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
jao has quit [Ping timeout: 255 seconds]
swistak35 has quit [Ping timeout: 240 seconds]
rcsole has joined #ocaml
rcsole has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
jamesst20 has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
AlexDenisov has joined #ocaml
jamesst20 has quit [Ping timeout: 240 seconds]
P4Titan has quit [Ping timeout: 260 seconds]
AlexDenisov has quit [Ping timeout: 255 seconds]
AlexDenisov has joined #ocaml
_whitelogger has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
dch_ has joined #ocaml
freusque has joined #ocaml
MercurialAlchemi has joined #ocaml
rcsole has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
rcsole has quit [Ping timeout: 268 seconds]
fre has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
cbot has quit [Quit: This computer has gone to sleep]
dch_ has quit [Ping timeout: 260 seconds]
dch_ has joined #ocaml
jamesst20 has joined #ocaml
cbot has joined #ocaml
basro has joined #ocaml
basro_ has quit [Ping timeout: 255 seconds]
malc_ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
jamesst20 has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
john51 has quit [Ping timeout: 268 seconds]
rcsole has joined #ocaml
john5 has joined #ocaml
alfredo has joined #ocaml
dhil has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
dch_ has quit [Remote host closed the connection]
Simn has joined #ocaml
dch_ has joined #ocaml
freyr has joined #ocaml
<freyr>
Hi. I use opam 2 beta
<freyr>
opam update shows
<freyr>
The following would require downgrades or uninstalls, but you may upgrade them explicitly:
<freyr>
ocaml.4.06.0
<freyr>
What does it mean?
<freyr>
I use 4.04 switch
<freyr>
opam upgrade*
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
silver has joined #ocaml
ygrek has joined #ocaml
nojb has joined #ocaml
nojb has quit [Client Quit]
AlexDenisov has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
dch_ has quit [Read error: Connection reset by peer]
dch_ has joined #ocaml
zpe has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
dch_ has quit [Ping timeout: 268 seconds]
dch_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
larhat has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
rcsole has quit [Ping timeout: 240 seconds]
snhmib has joined #ocaml
FreeBirdLjj has joined #ocaml
dch_ has quit [Quit: ZZ]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
mengu has joined #ocaml
freyr has quit [Quit: Lost terminal]
rcsole has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ia0 has quit [Quit: reboot]
ia0 has joined #ocaml
AlexDenisov has joined #ocaml
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 260 seconds]
kakadu has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
dch_ has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
Athas has joined #ocaml
<Athas>
Hi, are there generic binary/precompiled releases of OCaml available for Linux? I can find only distribution-specific packages.
<Athas>
Oh, I found one in the folder containing the .deb packages.
<flux>
athas, what kind of use do you have for them? I think it may be preferable to use just 'opam' to manage your ocaml installation (and it does it by compiling from source)
<flux>
though opam can use a self-installed ocaml compiler as well
FreeBirdLjj has joined #ocaml
<Athas>
flux: I just need a recent (4.03) version of OCaml to compile a program someone sent me.
<Athas>
Said program just uses a Makefile to call ocamlopt. Is opam useful there?
FreeBirdLjj has quit [Remote host closed the connection]
<flux>
probably not
<flux>
if it uses ocamlfind then it is more likely useful
<flux>
if it depends on non-builtin packages, it is useful
<Athas>
Hm, and that tarball I found was of 4.02...
<Athas>
I guess I'll compile it from source.
<flux>
it's pretty fast to compile ocaml
<Athas>
Good!
<flux>
not like ghc.. :-)
<Athas>
Yeah, I usually do Haskell, and the compile times are not something I enjoy...
<Athas>
The price of an optimising compiler, I guess.
<flux>
it's super-fast if you only need non-optimized byte code compiler, but I guess the native code binary building won't take much longer
<Athas>
Done now.
<Athas>
That was very very fast.
<flux>
yes :). benchmarked on my laptop, make -j4 world takes 34 seconds, make -j4 world.opt on top of that takes 52 seconds
<Athas>
Took maybe two minutes here, bug I'm running on battery power.
<Athas>
A world of difference from compiling GHC, that's for sure.
fre has quit [Ping timeout: 240 seconds]
fre has joined #ocaml
jamesst20 has joined #ocaml
dhil has joined #ocaml
fre2 has joined #ocaml
fre2 has quit [Client Quit]
fre has quit [Read error: Connection reset by peer]
jamesst20 has quit [Ping timeout: 255 seconds]
_snhmib has joined #ocaml
zpe has quit [Remote host closed the connection]
mfp has joined #ocaml
snhmib has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
dhil has quit [Remote host closed the connection]
cbot has quit [Quit: This computer has gone to sleep]
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
balod has quit [Remote host closed the connection]
john51 has joined #ocaml
balod has joined #ocaml
\h is now known as h11
TheLemonMan has joined #ocaml
h11 is now known as \h
jamesst20 has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesst20 has quit [Ping timeout: 240 seconds]
fre has joined #ocaml
_andre has joined #ocaml
<infinity0>
the debian ocaml team is unfortunately awol and i don't have enough time to take care of it myself
<infinity0>
4.03 is in debian experimental and i'll do 4.04 next week in marrakech
<infinity0>
but there's hundreds of packages that need to be recompiled and i certainly don't have time for that myself
<flux>
doesn't computer do the recompiling.. :)
AlexDenisov has joined #ocaml
<flux>
I wonder how much of a wasted effort it is to even package ocaml. opam is the king..
<flux>
I used to use debian packages before opam, though. (though I did use godi a bit as well)
<flux>
on the other hand! if you want to provide ocaml-written programs to debian, you must have all the deps in debian as well
<flux>
so I guess that's a solid reason to support those packages
govg has quit [Ping timeout: 260 seconds]
<infinity0>
yeah there's automatic compilation scripts but i don't know how they work myself, it's not a standard debian thing and for ocaml i hear it's just stephane's personal collection of scripts
<infinity0>
opam is source-based and every user has to spend the time waiting for everything to compile
<infinity0>
non-ocaml dependencies are expressed more easily in debian packages
<infinity0>
it's something that language-specific package managers ought to have a generic solution for, we have the same issue trying to package rust programs for debian
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
<infinity0>
what's worse, sometimes rust package developers use this inability, as a reason to write too-strict versioned-depends in their own packages, which makes it hard to package again in a system-level package manager that can support proper version constraints between all packages
<infinity0>
i haven't come across an example of that for ocaml, but that's likely just because the ecosystem is smaller
govg has joined #ocaml
jamesst20 has joined #ocaml
dxtr has quit [Quit: quit]
skunkwerks has joined #ocaml
dxtr has joined #ocaml
dch_ has quit [Remote host closed the connection]
dxtr has quit [Client Quit]
caw has quit [Ping timeout: 252 seconds]
mbrock has quit [Ping timeout: 252 seconds]
rfv has quit [Ping timeout: 252 seconds]
arc- has quit [Ping timeout: 252 seconds]
flux has quit [Remote host closed the connection]
flux has joined #ocaml
dxtr has joined #ocaml
jamesst20 has quit [Ping timeout: 260 seconds]
dxtr has quit [Client Quit]
dxtr has joined #ocaml
mbrock has joined #ocaml
rfv has joined #ocaml
caw has joined #ocaml
dxtr has quit [Client Quit]
arc- has joined #ocaml
dxtr has joined #ocaml
d0nn1e has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ocaml
tizoc has joined #ocaml
bobbypriambodo has joined #ocaml
jeffmo_ has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
richi235 has quit [Quit: No Ping reply in 180 seconds.]
jeffmo_ is now known as jeffmo
richi238 has joined #ocaml
skunkwerks has quit [Remote host closed the connection]
skunkwerks has joined #ocaml
skunkwerks is now known as dch_
dch_ is now known as Guest75657
Guest75657 is now known as dch__
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
_whitelogger has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
lucybun has quit [Quit: lucybun]
Soni has quit [Remote host closed the connection]
john51_ has joined #ocaml
stephe has joined #ocaml
lucybun has joined #ocaml
john51 has quit [Ping timeout: 240 seconds]
Denommus has joined #ocaml
Denommus has quit [Client Quit]
Denommus has joined #ocaml
jamesst20 has quit [Ping timeout: 240 seconds]
lucybun is now known as ne
Soni has joined #ocaml
bobbypriambodo has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
rpg has joined #ocaml
ne is now known as lucybun
dhil has joined #ocaml
rpg has quit [Client Quit]
govg has quit [Ping timeout: 260 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ocaml
AlexDenisov has joined #ocaml
dch__ has quit [Ping timeout: 240 seconds]
dch_ has joined #ocaml
sepp2k has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
govg has quit [Ping timeout: 255 seconds]
jamesst20 has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
jamesst20 has quit [Ping timeout: 255 seconds]
jabroney has joined #ocaml
apache3 has quit [Remote host closed the connection]
apache3 has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
shinnya has joined #ocaml
jamesst20 has joined #ocaml
infinity0 has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
infinity0 has quit [Remote host closed the connection]
jamesst20 has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
mengu has joined #ocaml
infinity0 has joined #ocaml
AlexDenisov has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ciniglio has quit [Ping timeout: 256 seconds]
rcsole has quit [Ping timeout: 240 seconds]
fre has quit [Quit: WeeChat 1.7]
rcsole has joined #ocaml
rcsole has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
wtetzner has joined #ocaml
th5 has joined #ocaml
kolko has joined #ocaml
jamesst20 has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
wtetzner has quit [Remote host closed the connection]
Denommus has quit [Ping timeout: 255 seconds]
jnavila has joined #ocaml
Denommus` is now known as Denommus
shinnya has quit [Ping timeout: 255 seconds]
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
malina has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
moei has joined #ocaml
tane has joined #ocaml
AlexDenisov has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Read error: Connection reset by peer]
jamesst20 has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 240 seconds]
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
AlexDenisov has joined #ocaml
ciniglio has joined #ocaml
cbot has joined #ocaml
jnavila has quit [Ping timeout: 255 seconds]
jlongster has joined #ocaml
espinoza has joined #ocaml
<espinoza>
hey... hope it's cool to ask a noobish question. learned ocaml in college but in a very academicky setting, so i'm struggling a bit with tooling. i'm trying to use the Deque that comes with Batteries, but when I compile with `ocamlfind -package batteries myfile.ml`, I get the error: `Error: Error while linking river.cmo: Reference to undefined global `BatDeque'`. in my file, I do an `open Batteries.Deque ;;` and use the stuff from th
Athas has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
infinity0_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0 is now known as Guest90591
Guest90591 has quit [Killed (card.freenode.net (Nickname regained by services))]
infinity0_ has quit [Changing host]
infinity0_ is now known as infinity0
infinity0 has quit [Remote host closed the connection]
espinoza has quit [Quit: Page closed]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
jnavila has joined #ocaml
jamesst20 has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
jamesst20 has quit [Ping timeout: 255 seconds]
infinity0 has joined #ocaml
richi238 has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
jamesst20 has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
jamesst20 has quit [Ping timeout: 260 seconds]
richi235 has joined #ocaml
malc_ has quit [Remote host closed the connection]
richi235 has quit [Remote host closed the connection]
jamesst20 has joined #ocaml
richi235 has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
<Leonidas>
jerith: you wouldn't believe but I actually reviewed your PR in reasonable time :p
<Leonidas>
also, I very much like where this is all going, super excited :)
jamesst20 has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
mengu has joined #ocaml
nahra has quit [Read error: Connection reset by peer]
nahra has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
Armael has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
Armael has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 260 seconds]
orbifx has joined #ocaml
ollehar has joined #ocaml
<jeroud>
Leonidas: :-D
yomimono has joined #ocaml
kolko has quit [Ping timeout: 240 seconds]
<orbifx>
ello #ocaml
<companion_cube>
hellorbifx
_andre has quit [Quit: leaving]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
Denommus has quit [Ping timeout: 255 seconds]
jamesst20 has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
jamesst20 has quit [Ping timeout: 260 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
<Leonidas>
hej orbifx!
<orbifx>
Hello companion_cube; Leonidas
<orbifx>
companion_cube: how is the "much release" going
AlexDeni_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
<companion_cube>
slowing down
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
awang has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
<awang>
Does anyone know what caml_apply2 and caml_apply3 are in the OCaml libasmrun source code?
AlexDenisov has quit [Client Quit]
<awang>
I'm trying to compile OCaml, but some tests in the test suite fail when trying to load dllunix.so because those symbols aren't defined
ryanartecona has joined #ocaml
<awang>
And there doesn't seem to be any mention of what they were supposed to do
<companion_cube>
awang: they are used for applying curried functions
<companion_cube>
to 2 (resp. 3) arguments
<awang>
companion_cube: Makes sense
<awang>
Any idea why they don't seem to have an implementation, though?
<Drup>
this seems highly fishy
<Drup>
are you compiling on an exotic arch or doing anything irregular ?
<awang>
Compiling on x86_64
<awang>
Only irregular thing I can think of doing is messing with -flto
<awang>
But it doesn't seem to me that -flto should break anything because there doesn't appear to be a definition in the first place
<companion_cube>
I don't know -flto
<awang>
Link time optimization
<orbifx>
awang: what builds dllunix?
<awang>
orbifx: Sorry, I don't quite understand. Do you mean what make target?
<Drup>
awang: -flto on the runtime ? Won't that do dead code elimination and remove symbols that are not used inside the runtime ?
<Drup>
A lot of symbols are exported for use by the generated code but not used inside the runtime itself
averell has quit [Quit: .]
<awang>
Drup: Maybe? I thought that it wouldn't do that for libraries because of situations like this
<awang>
Oh, is it a generated function?
<awang>
The generated code is deleted before the test suite, then?
wtetzner has joined #ocaml
<Drup>
caml_apply ? No, it should be defined inside the runtime
<awang>
libasmrun?
<awang>
and/or libcamlrun?
<Drup>
IIRC (you should check) libasmrun is for native code, libcamlrun is for bytecode
<awang>
Right, that's what I thought
<Drup>
You can ask on mantis, but I would guess lto is not enabled for rather good reasons :p
<awang>
Symbol doesn't seem to be in libcamlrun
<Drup>
someone is probably going to give you a well argumented answer
<orbifx>
is it possible to get the file & number of where an exception was raised?
<Drup>
orbifx: compile with -g and run with "OCAMLRUNPARAM=b" to enable backtraces
<orbifx>
thanks Drup
<awang>
The symbols seem to be undefined in a non-flto build, too
<Drup>
then you are doing another fishy thing :D
<awang>
:(
<awang>
Wait
<awang>
Should libcamlrun *and* libasmrun be linked to dllunix.so?
<awang>
Although I don't think that would help...
<Drup>
Not sure, it's a bit lower in the compiler than I usually work ^^'
kakadu has quit [Remote host closed the connection]
<awang>
What part do you normally work on?
<Drup>
frontend, so parsing+typing
<awang>
Sounds fun!
<awang>
Any big improvements and/or features in the works?
<Drup>
from me ? not really, since my stuff will probably live as an independent patch
ollehar has quit [Quit: ollehar]
<orbifx>
anyone familiar with Re_str? is it string_match I should use if I want to extract a string matching a regex?
<companion_cube>
there is stuff in Re for this
<companion_cube>
stuff like Re.Group, iirc
<orbifx>
sounds too serious, all I want is a substring :P
<companion_cube>
well, group 0
jnavila has quit [Remote host closed the connection]
<orbifx>
Re_str is state full 0.0
<orbifx>
state-full*
<orbifx>
?
<yomimono>
stateful
<companion_cube>
it emulates Str, so I think so
<companion_cube>
use Re_posix for saner regex
<companion_cube>
(or directly combinators in Re)
<awang>
I think I may have figured out part of the mess I've dug myself into.
<awang>
Drup: I think you're right; it did have something to do with dead code elimination, but not in the place I was originally looking at
<awang>
Or at least I think it had to do with dead code elimination
<orbifx>
companion_cube: is re_posix pure?
<companion_cube>
I think so
<orbifx>
yomimono: any pure implementations of regex?
<awang>
So dllunix.so has the undefined symbols _caml_deugger_cleanup_fork and _caml_debugger_fork_mode, which are defined in the runtimes
<companion_cube>
orbifx: just look at the API, anyway
<awang>
So normally, the runtimes get statically linked into the executables and those symbols are found normally
basro_ has joined #ocaml
<awang>
But it seems -flto removes those symbols, making dyld freak out and complain about the missing symbols
<awang>
*removes those symbols from the executables
<awang>
So the next thing I tried was to link the runtimes into dllunix.so
averell has joined #ocaml
<awang>
First the bytecode runtime, then the asm runtime
<awang>
But the asm runtime has undefined symbols of its own
<Drup>
orbifx: re is pure, just use the part that does not try to emulate Str's insane API
<awang>
Those would have been part of the executable, so dyld wouldn't have checked when -flto wasn't used
<awang>
But now that they are part of the shared library, dyld needs to find definitions
<awang>
Although I'm not entirely sure why statically linking libasmrun lets you get away with undefined symbols still...
<awang>
But I think that could the approximate order of events
<orbifx>
ow I see.. so it's just re_str which has impurity?
basro has quit [Ping timeout: 268 seconds]
<awang>
So no -flto for me :(
<companion_cube>
orbifx: I think so
<orbifx>
thanks, checking the api now
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Drup>
(actually, the main API is not pure either, but it's at least referentially transparent)
<companion_cube>
what's the difference, in practice? :p
th5 has quit []
<Drup>
companion_cube: You can't observe the mutability (except by looking at performances)
<companion_cube>
that's what I call pure
awang has quit [Ping timeout: 260 seconds]
<Drup>
It's not, since each call to Re.exec will determinize part of the automaton, which is saved for latter calls to exec
<Drup>
but it's referentially transparent, since you can't observe that by looking at the returned value.
<companion_cube>
that's as pure as haskell's lazy evaluation :-)
<companion_cube>
(ok, it's not thread safe, might be onto sth)
<Drup>
yeah, it's not thread safe :)
<orbifx>
precisely
<Drup>
(but it's really not that bad)
<orbifx>
part of why I want to avoid it. So it there a pure implementation?
<Drup>
orbifx: not any good one. Just put a mutex around Re.exec calls
<companion_cube>
a really pure one, that would be quite slow…
<Drup>
(if you use multithreading)
<companion_cube>
(of course there's only one clean way of using mutexes :])
<orbifx>
I don't
<companion_cube>
then there's no point not using re
<orbifx>
huh?
<companion_cube>
if you don't use multithreading
<Drup>
Yeah, I don't see what's your problem
<orbifx>
impurity :P
<orbifx>
allergic to it
<companion_cube>
go write haskell ;-)
<companion_cube>
or coq, maybe
<orbifx>
did write haskell many moons ago. I don't like their tools :P
<orbifx>
it seems that for all the immutability of Haskell, their tools are far too mutable :P
<companion_cube>
I really don't see the problem with referentially transparent mutability
<orbifx>
re-entrancy?
<companion_cube>
hum, what?
<Drup>
something not re-entrant is due to global initialization
<Drup>
So, no, that's unreleated
<orbifx>
ok so it's safe if initialised locally
<orbifx>
almost used like a closure?
maattdd_ has joined #ocaml
<Drup>
no, it's safe when not used concurently, which can not really happen in OCaml unless you use Re.exec in different threads (*not* Lwt promises, those are fine)
<orbifx>
yes, preemptive ones would have any issue though right?
malina has quit [Read error: Connection reset by peer]
<Drup>
the yield in Lwt/Async can only happen at specific points (in the bind, usually), so you don't have any issue
____________ has joined #ocaml
malina has joined #ocaml
basro_ has quit [Ping timeout: 268 seconds]
<orbifx>
yeah
rgrinberg has quit [Ping timeout: 255 seconds]
tane has quit [Ping timeout: 260 seconds]
<orbifx>
how do I make re_posix match the shortest match?
ryanartecona has quit [Quit: ryanartecona]
wtetzner has quit [Remote host closed the connection]
sh0t has quit [Remote host closed the connection]
<Drup>
Re.shortest
<orbifx>
i've not used Re much in the past; where does that (argument?) go?
<Drup>
It's a combinator, it takes a (non compiled) regex and return a regex
<orbifx>
thanks
Ptival has joined #ocaml
Simn has quit [Quit: Leaving]
dch_ has quit [Quit: ZZ]
Ptival has left #ocaml [#ocaml]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]