englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
philtom has quit [Ping timeout: 250 seconds]
englishm has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
groovy3shoes has joined #ocaml
groovy2shoes has quit [Ping timeout: 246 seconds]
BitPuffin has quit [Ping timeout: 260 seconds]
parcs has quit [Remote host closed the connection]
parcs has joined #ocaml
tac_ has joined #ocaml
groovy3shoes has quit [Ping timeout: 255 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Remote host closed the connection]
struktured has joined #ocaml
rgrinberg has joined #ocaml
tac_ has quit [Quit: Leaving]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
yacks has joined #ocaml
samrat has joined #ocaml
araujo has quit [Quit: Leaving]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
girrig_ has quit [Ping timeout: 245 seconds]
girrig has joined #ocaml
yacks has quit [Ping timeout: 258 seconds]
yacks has joined #ocaml
girrig has quit [Ping timeout: 250 seconds]
struktured has quit [Ping timeout: 272 seconds]
axiles has joined #ocaml
samrat has joined #ocaml
MercurialAlchemi has joined #ocaml
Asmadeus_ is now known as Asmadeus
siddhart1v_away is now known as siddharthv
shinnya has quit [Ping timeout: 255 seconds]
BitPuffin has joined #ocaml
runciter has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
BitPuffin has quit [Ping timeout: 255 seconds]
struktured has joined #ocaml
avsm has joined #ocaml
girrig has joined #ocaml
WraithM has quit [Ping timeout: 246 seconds]
oscar_toro has joined #ocaml
WraithM has joined #ocaml
hhugo has joined #ocaml
Simn has joined #ocaml
ebzzry has quit [Ping timeout: 250 seconds]
teiresia1 has quit [Changing host]
teiresia1 has joined #ocaml
zpe has joined #ocaml
ygrek_ has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
teiresia1 is now known as teiresias
avsm has quit [Quit: Leaving.]
samrat has quit [Quit: Computer has gone to sleep.]
sad0ur has quit [Ping timeout: 272 seconds]
cago has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
MercurialAlchemi has joined #ocaml
girrig has quit [Ping timeout: 258 seconds]
ggole has joined #ocaml
octachron has joined #ocaml
msaegesser has quit [Read error: Connection reset by peer]
WraithM has quit [Ping timeout: 250 seconds]
Kakadu has joined #ocaml
ggole has quit [Read error: Connection timed out]
ggole has joined #ocaml
shinnya has joined #ocaml
warrick_ has joined #ocaml
sad0ur has joined #ocaml
samrat has joined #ocaml
nicoo has joined #ocaml
msaegesser has joined #ocaml
NoNNaN has joined #ocaml
fold has joined #ocaml
Nahra has joined #ocaml
ebzzry has joined #ocaml
Nahra has quit [Max SendQ exceeded]
fold has quit [Max SendQ exceeded]
Nahra has joined #ocaml
siddharthv is now known as siddharthv_away
runciter has quit [Ping timeout: 272 seconds]
fold has joined #ocaml
nifty__ has joined #ocaml
nifty__ has quit [Changing host]
ggherdov__ has joined #ocaml
ggherdov__ has quit [Changing host]
leifw has quit [Changing host]
leifw has joined #ocaml
paolooo has joined #ocaml
pjdelport has quit [Changing host]
pjdelport has joined #ocaml
rfv has quit [Changing host]
rfv has joined #ocaml
robink has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
Kakadu has quit [Changing host]
Kakadu has joined #ocaml
paolooo has quit [Changing host]
paolooo has joined #ocaml
robink has joined #ocaml
robink has quit [Changing host]
robink has joined #ocaml
paolooo has quit [Ping timeout: 246 seconds]
zpe has joined #ocaml
def`_ is now known as def`
girrig has joined #ocaml
zpe has quit [Ping timeout: 258 seconds]
siddharthv_away is now known as siddharthv
oscar_toro has quit [Quit: Leaving.]
shinnya has quit [Ping timeout: 245 seconds]
jerith_ is now known as jerith
bezirg has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
ddosia has quit [Ping timeout: 250 seconds]
sgnb has quit [Remote host closed the connection]
madroach has quit [Quit: leaving]
madroach has joined #ocaml
struktured has quit [Ping timeout: 272 seconds]
siddharthv is now known as siddharthv_away
struktured has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
majoh has quit [Quit: bam bam bam bam]
majoh has joined #ocaml
siddharthv_away is now known as siddharthv
Kakadu has joined #ocaml
<Kakadu>
If I 'm going to execute long C function
<Kakadu>
than I do caml_enter_blocking_section
<Kakadu>
and my OCaml threads shoul work concurrently with the C code, am I right?
zpe has joined #ocaml
<adrien>
should be able to allocate while the C code is running, yes
tobiasBora has joined #ocaml
<tobiasBora>
Hello !
<companion_cube>
world !
<tobiasBora>
I tried to find a library to deal with big floats (16 bytes for example) but I have find only one little code which seems to be quite slow… (it has some conversions to strinh during the computation, but maybe it's not important for the computation time ?). What is the best way to deal with such case ?
<tobiasBora>
Someone gives me a library he did a while ago but I can't remember which one it is…
<ggole>
...conversion to string for addition? Nice.
gasche__ has quit [Ping timeout: 240 seconds]
gasche has joined #ocaml
ontologiae has joined #ocaml
<tobiasBora>
You are ironical I hope ?
<adrien>
big floats, you'll probably want recent hardware
<adrien>
like very recent
Kakadu has quit [Ping timeout: 246 seconds]
<adrien>
actually SSSE3 might be enough
<tobiasBora>
Well I don't want to bye a super-computer to make computations with high precision ^^ FORTRAN has an instruction to change the rumber of bytes of a float
Kakadu has joined #ocaml
<tobiasBora>
buy*
<adrien>
but if your hardware doesn't handle it, you're toast
* companion_cube
likes toasts
<tobiasBora>
But it's possible to do it on python or fortan, why not in ocaml ? I can't tell to the users of my program "please change your hardware" :-P
<adrien>
actually I'm not even sure there is x86 support for that
BitPuffin has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
octachron has quit [Ping timeout: 250 seconds]
q66 has joined #ocaml
thomasga has joined #ocaml
shinnya has joined #ocaml
fold has quit [Ping timeout: 246 seconds]
_andre has joined #ocaml
BitPuffin has joined #ocaml
dsheets has joined #ocaml
ocp has joined #ocaml
avsm has joined #ocaml
struktured has quit [Remote host closed the connection]
struktured has joined #ocaml
tobiasBora has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
siddharthv is now known as siddharthv_away
aubergines has joined #ocaml
octachron has joined #ocaml
<bernardofpc>
tobiasBora: the usual precise float is mpfr, }
avsm has quit [Quit: Leaving.]
bezirg has quit [Ping timeout: 258 seconds]
tac_ has joined #ocaml
boegel has quit [Ping timeout: 260 seconds]
rwmjones has quit [Read error: Network is unreachable]
samrat has quit [Quit: Computer has gone to sleep.]
ma82 has joined #ocaml
BitPuffin has quit [Ping timeout: 246 seconds]
huza has joined #ocaml
rwmjones has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
typedlambda has joined #ocaml
avsm has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
George_ has joined #ocaml
rand000 has quit [Quit: leaving]
englishm has joined #ocaml
thomasga has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
rand000 has joined #ocaml
avsm1 has joined #ocaml
<madroach>
is Char.compare faster than Pervasives.compare ?
<companion_cube>
probably
zpe has quit [Ping timeout: 258 seconds]
avsm has quit [Ping timeout: 260 seconds]
struktured has quit [Ping timeout: 260 seconds]
<def`>
madroach: with Char.compare, you are sure to get the specialized version, with Pervasives.compare, sometimes the compiler optimize, sometimes not
<ggole>
Char.compare will never be slower, and it makes the operation clear, too. So do use it where applicable.
<tac_>
what is Pervasives?
<ggole>
A pre-opened module containing various built-in bits
<ggole>
Bindings for +, etc
<tac_>
that's what I was going to guess
<tac_>
thanks!
jao` has quit [Ping timeout: 255 seconds]
<ggole>
See the manual for the gory details
thomasga has joined #ocaml
puzza007_ is now known as puzza007
lopex has joined #ocaml
thomasga1 has joined #ocaml
tane has joined #ocaml
thomasga has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
<tobiasBora>
bernadocfpc : thank you ! do you know if there is an ocaml binding ?
samrat has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
<aubergines>
someone uses archlinux?
<aubergines>
they updated ocaml to 4.02, but not the other packages like findlib
<def`>
aubergines: I use archlinux, but have not installed the system compiler, to avoid issues like this
<aubergines>
good idea all is mess now
ygrek_ has quit [Ping timeout: 250 seconds]
avsm1 has quit [Quit: Leaving.]
thomasga has joined #ocaml
<bernardofpc>
tobiasBora: I see mlgmp on opam, but I don't use mpfr in ocaml, just C / Python
keen_ has joined #ocaml
englishm has quit [Remote host closed the connection]
thomasga has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 272 seconds]
BitPuffin has quit [Ping timeout: 246 seconds]
runciter has joined #ocaml
morphles has joined #ocaml
thomasga has joined #ocaml
thomasga1 has quit [Ping timeout: 258 seconds]
rand000 has quit [Quit: leaving]
englishm has joined #ocaml
rand000 has joined #ocaml
BitPuffin has joined #ocaml
thomasga has quit [Ping timeout: 260 seconds]
philtom has joined #ocaml
oscar_toro has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
clamky has joined #ocaml
pminten has joined #ocaml
cago has left #ocaml [#ocaml]
clamky has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
WraithM has joined #ocaml
lpw25 has joined #ocaml
lpw25 has quit [Remote host closed the connection]
bytbox has joined #ocaml
adrien_o1w has joined #ocaml
adrien_oww has quit [Ping timeout: 260 seconds]
adrien_o1w is now known as adrien_oww
<bernardofpc>
is opam REALLY supposed to recompile every dependency when one package in a bunch fails to install ?
<bernardofpc>
I trieed mlgmp, which failed because mpfr.h headers were not available, only to discover that it will restart from the BEGINNING the compilation of all its deps
<bernardofpc>
(including camlp4)
morphles has quit [Ping timeout: 255 seconds]
WraithM has quit [Ping timeout: 258 seconds]
<bernardofpc>
in fact, it lloks like it was installed, (opam list shows it there already, compilation not finished) but it is stupid enough to require its rebuild
BitPuffin has quit [Ping timeout: 246 seconds]
<bernardofpc>
sigh
charpi has joined #ocaml
WraithM has joined #ocaml
ma82 has quit [Ping timeout: 258 seconds]
nicoo has quit [Quit: WeeChat 0.4.3]
ma82 has joined #ocaml
nicoo has joined #ocaml
ma82 has left #ocaml [#ocaml]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
avsm has joined #ocaml
tane has quit [Quit: Verlassend]
zpe has quit [Ping timeout: 246 seconds]
NoNNaN has quit [Ping timeout: 264 seconds]
aubergines has quit [Quit: leaving]
NoNNaN has joined #ocaml
octachron has quit [Quit: Leaving]
tobiasBora has quit [Ping timeout: 260 seconds]
jbzza has joined #ocaml
<jbzza>
I would intuitively like to do something like this:
<jbzza>
type fruit = (type apple of Gala | RedDelicious) | (type orange of Orange) | (type juice of (fruit apple) | (fruit orange))
rgrinberg has joined #ocaml
<jbzza>
How can this be accomplished?
<jbzza>
Hmm, let me make my example more clear
<ggole>
You want to nest data types?
<ggole>
Usually you introduce a constructor of the same name: type fruit = Apple of apply | Orange of orange | ...
<ggole>
Alternatively, polymorphic variants allow for inclusion.
runciter has quit [Quit: work]
<jbzza>
Ok, thanks
rand000 has quit [Ping timeout: 260 seconds]
jbzza has quit [Quit: Page closed]
tobiasBora has joined #ocaml
rand000 has joined #ocaml
<charpi>
Hi
lpw25 has joined #ocaml
<charpi>
I have some question regarding cohttp development
<charpi>
I noticed that cohttp do not support multipart form out of the box
<charpi>
As a way to learn a bit of ocaml, I'm trying to add this feature to cohttp
<charpi>
on a blog post, I saw that Str should not be used because it's not reentrant
tobiasBora has quit [Ping timeout: 272 seconds]
<charpi>
what alternative can you suggest me ? I need some regexp splitting.
zpe has joined #ocaml
avsm has quit [Quit: Leaving.]
<flux>
charpi, pcre
<flux>
good that the good messages is going thru, nobody should use Str ;)
<charpi>
well ... i saw that by luck
araujo has joined #ocaml
<charpi>
the blog post was talking about Regexp but apparently this package is not on opam
<flux>
hmm, never heard of that
<flux>
pcre is prehaps a bit unpretty in that it's not pure ocaml, but rather bindings to a C-library
<flux>
Str, only the other hand, caused be grieves by randomly failing when I used Str.split from different threads at the same time
<flux>
as the application in question was decoding protocol of many devices connected to the server, it was not that deterministic to figure out the reason..
<flux>
sometimes it would just come out wrong :)
<nicoo>
flux: Str is definitely not thread-safe
<nicoo>
charpi: ocaml-re
<flux>
a fact still not visible in its documentation.
<nicoo>
charpi: Is has a frontend, human-re, about which I heard good things but I haven't tried it (the frontend) yet
<flux>
of course it's obvious that many of the operations are inherently thread-unsafe as they involve hidden state, but .split seemed safe..
<nicoo>
flux: It is visible from the types exposed in the API, but yes, it should be documented as being a piece of crap.
<nicoo>
(And taken out of the distribution, and left to die in the cold ?)
<charpi>
thanks. I will see that I can do with ocaml-re or pcre
<nicoo>
adrien: Pretty please ?
<charpi>
do you know if cohttp is already using one of them ?
<adrien>
nicoo: was?
<charpi>
hmm .. apparently ocaml-re has been removed from cohttp
<nicoo>
adrien: Write a patch to remove Str, pretty please :3
jwatzman|work has joined #ocaml
morphles has joined #ocaml
<adrien>
nicoo: hahaha
<adrien>
PAY ME!
* nicoo
shall pay in beer and Club Mate
<adrien>
:)
<adrien>
I have mate now
<adrien>
quite like it
<adrien>
afk :)
avsm has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
Submarine has joined #ocaml
Submarine has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
<def`>
k jnl
samrat has joined #ocaml
whitequa1k is now known as whitequark
bytbox has quit [Remote host closed the connection]
ggole has quit []
dsheets has quit [Ping timeout: 255 seconds]
jao` has joined #ocaml
charpi has quit [Ping timeout: 258 seconds]
jao` has quit [Changing host]
jao` has joined #ocaml
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
troutwine_away is now known as troutwine
avsm has quit [Quit: Leaving.]
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
yacks has quit [Ping timeout: 272 seconds]
Kakadu has quit [Ping timeout: 246 seconds]
hhugo has quit [Quit: Leaving.]
yacks has joined #ocaml
George_ has quit [Quit: Page closed]
jonludlam has joined #ocaml
hhugo has joined #ocaml
<MercurialAlchemi>
I'm playing with first-class modules
<MercurialAlchemi>
that's pretty cool
<MercurialAlchemi>
How much of a performance penalty am I looking at compared to statically defined modules, though?
<adrien>
maybe less than with objects
<adrien>
if they've been implemented, it means their performance is good enough
<MercurialAlchemi>
right
<MercurialAlchemi>
Is this the idiomatic way to do dependency injection at runtime?
<nicoo>
MercurialAlchemi: I've used it to do so, and it works fairly well. Much better (and safer) than what they do in Java-land :)
<adrien>
"dependency injection", not words we typically read on this channel :)
hhugo has quit [Quit: Leaving.]
<MercurialAlchemi>
hehe
<MercurialAlchemi>
well, I was thinking of something I was doing this afternoon, namely swapping out a python component at runtime based on a command line switch
NoNNaN has quit [Remote host closed the connection]
<MercurialAlchemi>
so I decided to fiddle a bit with functors and first-class modules to see if I could come up with a bare-bone OCaml program which built a module using a functor parametrized over a module whose implementation was chosen at runtime
<MercurialAlchemi>
and it works
<adrien>
yeah
<MercurialAlchemi>
without annotations or XML :)
NoNNaN has joined #ocaml
<adrien>
objects are fine too
rgrinberg has quit [Quit: Leaving.]
<adrien>
but if you don't want more than what you've described, first-class modules are going to be easier and faster
jwatzman|work has joined #ocaml
hhugo has joined #ocaml
bytbox has joined #ocaml
<MercurialAlchemi>
adrien: I've yet to find a use case for objects outside of widget hierarchies
troutwine is now known as troutwine_away
<tac_>
MercurialAlchemi: when you say 'object', do you mean subtyping?
<tac_>
surely, everything in Ocaml "is an object" :)
bytbox has quit [Ping timeout: 272 seconds]
<MercurialAlchemi>
tac_: I don't get your meaning
<adrien>
MercurialAlchemi: yeah, row polymorphism and sometimes encapsulation
<MercurialAlchemi>
tac_: my definition of 'object' is a set of behaviour coupled with a data structure
<adrien>
but strucs and modules definitely cover most of the uses
<MercurialAlchemi>
tac_: surely that's not how you'd describe records or functions or modules
<MercurialAlchemi>
adrien: yes
bezirg has joined #ocaml
<tac_>
I'm just making commentary. "Object" is a bloated, overloaded word
<MercurialAlchemi>
adrien: in my experience, inheritance is usually a recipe for awful, what-the-hell-calls-this-protected-method code
<MercurialAlchemi>
tac_: oh, sure
<MercurialAlchemi>
tac_: it's probably better to focus on specific features of OO design when talking about it
<adrien>
MercurialAlchemi: agreed; somehow I find that in ocaml it's done nicely
<MercurialAlchemi>
tac_: like records are nice but you don't get fine-grained access rights
<adrien>
probably because people don't try to make virtual methods that heriting objects will overrid
<adrien>
e
<adrien>
can be done but people don't do it
<adrien>
first-class functions help :)
<MercurialAlchemi>
well, they shouldn't
<tac_>
if your data is immutable, it shouldn't really matter who can access it
<MercurialAlchemi>
well, sometimes it isn't :)
<MercurialAlchemi>
and sometimes you store things that are implementation details
<MercurialAlchemi>
but that's where having anonymous types for modules help
<MercurialAlchemi>
so I'm not complaining too loudly
<MercurialAlchemi>
adrien: eh, well, people don't usually do that in Perl, but I have a wonderful code base with several layers of inherited garbage with virtual methods
Kakadu has joined #ocaml
<MercurialAlchemi>
you just need to wait for the right kind of programmer
<NoNNaN>
are you sure that immutable is enough?
morphles has quit [Ping timeout: 272 seconds]
<adrien>
MercurialAlchemi: crowbar is the solution
<MercurialAlchemi>
if you mean a litteral one, it's not that I haven't been tempted
nicoo has quit [Ping timeout: 264 seconds]
rom1504_ is now known as rom1504
<adrien>
:)
<adrien>
I still don't know why we have one at work but we do
nicoo has joined #ocaml
malo has joined #ocaml
bytbox has joined #ocaml
<MercurialAlchemi>
You work in a physics lab and you expect a Half-Life situation any moment?
<adrien>
I herd cats
<adrien>
taking care of the network at the office
hhugo has quit [Quit: Leaving.]
avsm has joined #ocaml
olauzon has joined #ocaml
<MercurialAlchemi>
adrien: well, herding cats with a crowbar, that sounds reasonable
<MercurialAlchemi>
but where was I?
<MercurialAlchemi>
oh yeah
<MercurialAlchemi>
OCaml is really awesome
<adrien>
:)
<MercurialAlchemi>
it only need implicits, a parallel runtimes, and about 100 times more packages
<adrien>
which packages are you after?
<MercurialAlchemi>
the other day, I was looking for a package to read/write config files
<MercurialAlchemi>
I found only one, and it's not really good
<MercurialAlchemi>
so I took the toml package and wrote a writer for it
<MercurialAlchemi>
(I should really write some tests for it and upload it, I had completely forgotten about it)
<adrien>
which kind of config files?
<adrien>
there json, sexp, ocaml-like notation, csv, xml and several others
<MercurialAlchemi>
adrien: hm, he who uses csv as configuration files does so at his own peril
<MercurialAlchemi>
I was looking for simple ini files
samrat has quit [Quit: Computer has gone to sleep.]
<MercurialAlchemi>
JSON doesn't work for me, and sexp isn't all that sexy
<MercurialAlchemi>
I won't mention XML for decency's sake
rgrinberg has joined #ocaml
troutwine_away is now known as troutwine
<adrien>
MercurialAlchemi: ah, I meant ini :D
<adrien>
although the author is the same
bezirg has left #ocaml [#ocaml]
<MercurialAlchemi>
ah
<MercurialAlchemi>
well, it combines the longstanding (?) OCaml tradition of read-my-source if you want documentation with 'download the tgz if you want the source', which is not so good to start with
<MercurialAlchemi>
but then the first thing it does when you make a new inifile is to assume that it's present and try to read it
<adrien>
haven't used it in years
<MercurialAlchemi>
the toml package isn't too bad
<Drup>
tac_: "Object" here just meant the one as defined by the OO system of ocaml.
<MercurialAlchemi>
it just doesn't have a writer
<Drup>
MercurialAlchemi: why not contribute it back to the toml package directly ?
<MercurialAlchemi>
on the other hand, lambda-term looks full of treasures, but isn't exactly replete with documentation
<Drup>
lambda-term documentation is fine
<Drup>
it lacks tutorials
<MercurialAlchemi>
Drup: well, that's what I was saying, I should finish my writer (AFAIK, it's incomplete) and write some tests
<Drup>
(which is a quite different task)
<MercurialAlchemi>
Drup: I know that I spent quite some time looking at the examples before figuring out what I needed to do
<MercurialAlchemi>
I should make a better mustache package too, the one I found isn't very satisfactory
hhugo has joined #ocaml
<Drup>
MercurialAlchemi: It took me quite some time for lambda-term too
<companion_cube>
MercurialAlchemi> it only need implicits, a parallel runtimes, and about 100 times more packages ← I sense sarcasm :D
<MercurialAlchemi>
companion_cube: no, no
<MercurialAlchemi>
companion_cube: ok, it needs an effect system too
<Drup>
ahah
<MercurialAlchemi>
companion_cube: and then it will be perfect
<Drup>
to be what, perfect ?
<Drup>
ok, I can't disagree for perfection
<companion_cube>
I'd start with implicits
<MercurialAlchemi>
well, implicits and the parallel runtime are on their way
<MercurialAlchemi>
so, that's 2 out of 4
rand000 has quit [Quit: leaving]
<Drup>
MercurialAlchemi: ocaml packages is not in a terrible state, though
<Drup>
(compared to other languages)
<Drup>
+landscape
<dmbaturin>
What does "let () =" really do? Why we can bind a value to the value of unit rather than a name?
<adrien>
it does nothing
<adrien>
it just makes sure the right-hand is of type unit
<Drup>
dmbaturin: it's because the construct is "let <pat> = <expr> "
<dmbaturin>
Drup: Are there any other cases when "let <constructor> = expr" can be/is used?
hhugo has quit [Quit: Leaving.]
englishm has quit [Remote host closed the connection]
rand000 has joined #ocaml
<Drup>
Of course
<Drup>
let { x ; y ; z } = <expr>
<asmanur_>
let (x, y) = expr
Anarchos has joined #ocaml
<dmbaturin>
Well, true.
<dmbaturin>
Those are constructors as well.
<Drup>
if you have some type with one constructor, let's say "type url = Url of string" (to make them distinguishable from raw strings) you could say "let (Url s) = <expr>"
<dmbaturin>
type foo = Foo ;; let Foo = Foo ;; Seems to work as well. :)
<Drup>
sure, it's equivalent to unit ...
<Drup>
you can technically also do this with normal patterns
<Drup>
let (Some x) = <expr>
<Drup>
but it's BAD
<Drup>
(and the compiler will rightfully warn you about it
<dmbaturin>
Warn about non-exhaustive matching?
<Drup>
yes
<Anarchos>
who read the article of blelloch and harper about optimal purely functional algorithms versus cache utilisation ?
englishm has joined #ocaml
hhugo has joined #ocaml
<dmbaturin>
Anarchos: I didn't. Got a link?
troutwine is now known as troutwine_away
<MercurialAlchemi>
Drup: back
<MercurialAlchemi>
the OCaml landscape package is interesting
<MercurialAlchemi>
it ranges from wat? to "what the hell, that's totally awesome"
<Drup>
MercurialAlchemi: indeed
<Drup>
The amount of small utilities packages is not optimal
<MercurialAlchemi>
interestingly, you often have a single implementation of a given thing, but often of very high quality
<Drup>
but the big packages are usually really good
<MercurialAlchemi>
yep
<MercurialAlchemi>
also, opam looks pretty good when it works
<Drup>
it's getting better)
<Drup>
:p
<MercurialAlchemi>
switching compilers and being able to uninstall stuff and work with native dependencies and all that crap that so many language package managers don't get right
<MercurialAlchemi>
I've so far avoided most of the toolchain and rely on oasis instead, so I don't have a strong opinion on it
<MercurialAlchemi>
I suspect that a lot of it is redundant and would be much more user friendly as a single binary-with-options instead
<adrien>
"it" being?
<axiles>
let {x; y; _} = <expr>
<adrien>
:)
<Drup>
axiles: you don't need the _
<axiles>
Drup: oh, yes indeed
<adrien>
doesn't it depend on a warning?
<MercurialAlchemi>
adrien: well, you got ocamlbuild, and ocamlopt and ocamlfind and ocamloptp and...
<adrien>
9 Missing fields in a record pattern.
<Drup>
yeah
<Drup>
it's not enabled by default
<adrien>
yup
<MercurialAlchemi>
adrien: I didn't even know I had so many ocaml$something binaries on my system
<adrien>
MercurialAlchemi: ocamloptp is for profiling (like ocamlcp)
<adrien>
ocamlbuild, well, build system
<MercurialAlchemi>
well, I don't want a "profiling compiler", I just want flags to give to my compiler and a target type
<adrien>
actually I wasn't aware that ocamloptp existed
<adrien>
MercurialAlchemi: ocamlbuild does that roughly
<MercurialAlchemi>
yeah, but I don't see the point of the lower level tools
<adrien>
different projects
<adrien>
you at least need ocamlc, ocamlc.opt, ocamlopt, ocamlopt.opt
<adrien>
actually, maybe the two .opt could be merged
<MercurialAlchemi>
that's kind of what I am saying
<adrien>
and then when you add something like ocamlbuild and ocamldoc
<adrien>
they all sit at different stages of the bootstrap process
<MercurialAlchemi>
if you look at the rust compiler, you get 'build', 'run', 'test', 'doc', 'pkg', 'sketch' and 'help'
<MercurialAlchemi>
where sketch invokes a REPL
<MercurialAlchemi>
much easier to deal with
<MercurialAlchemi>
not that it's a dealbreaker or anything, but it's unnecessary complexity, I'd say
<adrien>
but there's 20 years between the two :)
<MercurialAlchemi>
oh, sure
<MercurialAlchemi>
better have the crap in the toolchain than the crap in the language
<adrien>
and there isn't the same split model of bytecode and native code
<MercurialAlchemi>
but this complexity can be hidden behind command line options
<MercurialAlchemi>
you don't need different binaries
<adrien>
for hald the stuff I have that starts with "ocaml", I'm not sure they could be merged, or at least not actually
<adrien>
half*
<MercurialAlchemi>
it's like the French administration: I don't care if department X needs different papers from department Y, I just want to send the minimal amount of paperwork necessary and get a result
<axiles>
for example ocamllex/yacc
<MercurialAlchemi>
that's a bit different, because it doesn't compute ocaml files
<MercurialAlchemi>
and as far as I'm concerned, it doesn't really have anything to do with the compiler
<MercurialAlchemi>
adrien: what couldn't you imagine unified?
<MercurialAlchemi>
crazy projects? now we're talking
<adrien>
MercurialAlchemi: it hasn't changed that often
<Drup>
ocapic is really crazy x)
<adrien>
:)
<MercurialAlchemi>
but, well, alright, the bootstrapping part may be a bit of an issue
<MercurialAlchemi>
but I could imagine that many of these binaries could go away without problem
<adrien>
I really wish bootstrap was cleaner and simpler but currently it's a mess and some of these binaries can't be merged
<adrien>
I'm not even sure ocamllex/yacc don't exist before ocamlc
dsheets has joined #ocaml
lpw25 has quit [Remote host closed the connection]
<MercurialAlchemi>
yeah
<MercurialAlchemi>
it's not really a big deal from my point of view
<MercurialAlchemi>
I just like to complain
avsm has quit [Quit: Leaving.]
<axiles>
adrien: from the sources, ocamlyacc seems to be a C program
<companion_cube>
just use menhir ;)
<Drup>
MercurialAlchemi: complaining is good, you don't make anything better without starting by an healthy rant :D
<MercurialAlchemi>
a coworker once suggested that I should be a consultant with the business model of telling people to pay me a lot of money so I could tell them how much their tech sucked
<MercurialAlchemi>
:D
<adrien>
axiles: ah, thanks, I thought there was at least one of the two that was C but really wasn't sure anymore
<adrien>
companion_cube: patch welcome!
<MercurialAlchemi>
yep, unfortunately I don't have time to do anything about it
<adrien>
companion_cube: good luck
<companion_cube>
adrien: oh, in the compiler?
<companion_cube>
I meant in general
<axiles>
companion_cube: the fact that one is written in OCaml and the other is not is a goood argument
<adrien>
:DD
<companion_cube>
just ship its bytecode ;)
* adrien
feels like using /kick
jonludlam has quit [Ping timeout: 245 seconds]
* whitequark
grumbles about typerex
<whitequark>
"just ship bytecode" (╯°□°)╯︵ ┻━┻
<companion_cube>
:D
* nicoo
lends whitequark his baseball bat
<Drup>
whitequark: I asked lefessant about it
<companion_cube>
compile to scheme and ship it with a scheme VM
<whitequark>
(if some of you responsible for typerex are reading: yes, I will bring it up EVERY SINGLE TIME)
<nicoo>
You can have my shovel and my backyard if you want
<Drup>
(since I'm in the same office as him)
<whitequark>
nicoo: hehehe
<Drup>
whitequark: and the answer was "I'm not going to change my mind about that, it works better on windows this way"
<companion_cube>
nicoo: since when do you have a backyard?
<Drup>
I didn't bother to argue.
<nicoo>
companion_cube: Since I'm unemployed and living at my parent's (for 3 weeks)
<whitequark>
Drup: *shrug* I'll just do my best to discourage anyone from ever using ocp-build.
<adrien>
nicoo: \o/
<companion_cube>
nicoo: you're a disgrace and a parasite for our hard-working society
<adrien>
nicoo: I have some work for you :]
troutwine is now known as troutwine_away
axiles has quit [Remote host closed the connection]
<MercurialAlchemi>
oh god, is typerex *another* build chain?
jonludlam has joined #ocaml
<MercurialAlchemi>
I think it's a symptom of dissatisfaction
<nicoo>
MercurialAlchemi: No. It is like merlin, but doesn't work (from what little I remember)
<MercurialAlchemi>
nicoo: well, ocp-build says it's a build system for ocaml
<whitequark>
ocp-build used to be dependent on typerex or something. it doesn't really matter, the thing is that ocp-build requires bootstrapping.
<MercurialAlchemi>
but I see that ocp-index is more a merlin-like thing
<whitequark>
and so they ship bytecode, and getting stuff dependent on ocp-build to build is a complete nightmare.
<MercurialAlchemi>
whitequark: ok?
<whitequark>
if you're not using the latest released version of ocaml that is
<companion_cube>
whitequark: so I heard some people whose name start with "adri" wish for ppx_deriving_sexp
<whitequark>
companion_cube: planned
<companion_cube>
:D
<whitequark>
hopefully by end of week
<whitequark>
there are also some discussion with [REDACTED] on how to make everything in ecosystem interact better
<whitequark>
so I want the releases of sexp and of new ppx_deriving to coincide, I think
<companion_cube>
can we meet [REDACTED] some day?
ygrek_ has joined #ocaml
<whitequark>
I think it will not be a problem for you to communicate with someone from [REDACTED]
<Anarchos>
red-acted, is it a functional language from north corea ?
<nicoo>
Anarchos: [REDACTED] indeed.
<dmbaturin>
Anarchos: North Korea is imperative.
<Drup>
and quite dis-functionnal
<dmbaturin>
Interesting that the USSR did very little functional programming research, if any.
<Anarchos>
dmbaturin lol and Drup re lol
<whitequark>
the first USSR-born Lisp was in 1968 I think
<MercurialAlchemi>
(totally off-topic, but I'm reading fascinating article about women and education - and it was actually theorized that studying was dangerous for women, because they couldn't possibly both use their brain and their reproductive functions)
<dmbaturin>
Well, there was some research, but it never got any popular even in academia AFAIR. I'm not old enough to judge from personal experience, but from available books and papers it seems like it.
<MercurialAlchemi>
what did Soviet programmers code in?
<MercurialAlchemi>
C?
<Anarchos>
MercurialAlchemi wtf ?
<dmbaturin>
MercurialAlchemi: Algol, Pascal, Fortran, assembly. Lots of assemly.
<whitequark>
MercurialAlchemi: depends on time period. C, Ada, FORTRAN, ALGOL, I think...
<whitequark>
Pascal and assembly, indeed.
<MercurialAlchemi>
Anarchos: I'm told mysogyny looks better when you are disguised as a scientist
<MercurialAlchemi>
ada?
<dmbaturin>
Everything looks better when you are disguised as a scientist, even science!
<whitequark>
Ada was oddly popular, it seems
<MercurialAlchemi>
I thought that was mostly a Dod thing
<companion_cube>
whitequark: I hoped to become [REDACTED] in place of the current [REDACTED], but I guess I'll only be [REDACTED³] now
<dmbaturin>
MercurialAlchemi: Only very late, but it did gain limited popularity. Also, some safety-critical stuff was in Modula-2.
<whitequark>
I have no idea, it seems odd to me too
<whitequark>
I know someone who still writes in Ada for Cortex-M chips
<MercurialAlchemi>
but they were still running Windows?
<MercurialAlchemi>
not the people's own operating system?
<whitequark>
there was no Windows while USSR lasted, only DOS
<MercurialAlchemi>
hm
<MercurialAlchemi>
yeah, right, obviously
<dmbaturin>
MercurialAlchemi: The most popular platform since 80's was a soviet clone of S/370.
<dmbaturin>
Also, there were some PDP and VAX-like machines.
<whitequark>
fun fact: in russian, "The Ada Language" reads exactly the same as "The Language of Hell"
<dmbaturin>
Ada is my favorite imperative language.
<MercurialAlchemi>
whitequark: good one
<whitequark>
companion_cube: I ... have no idea, in fact
<MercurialAlchemi>
come to talk about OCaml, stay to discuss USSR technologies
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<MercurialAlchemi>
I'm trying to access the Programming Guide and Reference Manual, but it must buried in a nuclear bunker
WraithM has quit [Ping timeout: 258 seconds]
<adrien>
"vintage"
<dmbaturin>
Hence "sort of". And there's no compiler source code.
<MercurialAlchemi>
yeah, none of this html 2.0 shit here
<MercurialAlchemi>
at least the russian version is accessible
<MercurialAlchemi>
F1 = A .And. (B .Or. C)
<MercurialAlchemi>
F2 = (A .And. B) .Or. (A .And. C)
<MercurialAlchemi>
F = F1 .Imp. F2
<MercurialAlchemi>
B = 0
<MercurialAlchemi>
A = 0
<MercurialAlchemi>
F
<MercurialAlchemi>
END
<MercurialAlchemi>
m'okay
<Drup>
everytime I see "END", I expect to see the credits rolling, it's very confusing when it's a keyword in a programming language
<dmbaturin>
Well, OCaml has "end" too.
<MercurialAlchemi>
Drup: like begin... end in ocaml?
<Drup>
it's not big and capitalized enough to trigger the movie conditioning.
<MercurialAlchemi>
or struct end I guess
<MercurialAlchemi>
:)
<dmbaturin>
Pascal has "end."
<MercurialAlchemi>
we need a language with 'and they lived happily ever after, and never crashed.'
<dmbaturin>
let ... and they lived ... in should work.
jwatzman|work has quit [Quit: jwatzman|work]
<dmbaturin>
Just trigger an unused variable warning.
<MercurialAlchemi>
teehee
NoNNaN has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 250 seconds]
olauzon has quit [Quit: olauzon]
troutwine_away is now known as troutwine
NoNNaN has joined #ocaml
ygrek_ has quit [Ping timeout: 258 seconds]
<MercurialAlchemi>
I wonder how an ocaml-and-batsch-based configuration management system would turn out
<MercurialAlchemi>
It would suck, like all configuration management systems, but how much?
<dmbaturin>
What exactly you mean by configuration management?
<MercurialAlchemi>
puppet, ansible...
<dmbaturin>
There are several absolutely unrelated concepts with that name. :)
<dmbaturin>
I don't think pupper or ansible suck. Their use case range is just not as broad as their authors often want to convince us it is.
<dmbaturin>
* puppet
<MercurialAlchemi>
well, it always becomes messy when you need to do something a bit involved
<MercurialAlchemi>
I think Nixos shows a lot of promise, though
<MercurialAlchemi>
one day I'll have time to investigate it some more
<MercurialAlchemi>
what makes it suck less is that it expresses the entire state of the machine (well, mostly) in a declarative way
Submarine has quit [Quit: Leaving]
<MercurialAlchemi>
which something like ansible will never do
<MercurialAlchemi>
even though it's trying to be a declarative system
thomasga has joined #ocaml
jwatzman|work has joined #ocaml
<dmbaturin>
MercurialAlchemi: That's absolute offtopic, but I'm working on a thing that will let you define API calls and execute config generators based on it, in a stateful way (that is, with versioning and rollback).
<MercurialAlchemi>
dmbaturin: config generators for what?
<dmbaturin>
For anything you write them for.
<MercurialAlchemi>
mm
<dmbaturin>
It's in python though, maybe I should have better used ocaml, not sure.
<MercurialAlchemi>
so I curl into your service to upload a new configuration for apache, it generates a new apache conf and it knows how to restart apache?
WraithM has joined #ocaml
jonludlam has quit [Ping timeout: 250 seconds]
<dmbaturin>
MercurialAlchemi: Not quite. You send calls for "I want a new virtualhost that listens on port XXXX and uses /path/to/www as root and {a bunch of other parameters}". The framework then executes scripts that check its consistency (including, possibly, consistency with the network or, say, firewall configs), and either generate the apache config or aborts with error.
struktured has joined #ocaml
<MercurialAlchemi>
dmbaturin: bah, you can probably switch to ocaml later and have the same LOC, unless you run into the common "there is no lib for that" issue
<dmbaturin>
Yeah, could be. Tree datastructures used there are asking for algebraic datatypes.
<MercurialAlchemi>
dmbaturin: How can that work? I don't see how you could abstract over any number of configuration formats in a meaningful way
<MercurialAlchemi>
dmbaturin: so you upload a curly file?
<dmbaturin>
MercurialAlchemi: Normally you just shell commands or API calls, but loading it is also possible.
<dmbaturin>
If you've seen JunOS, you should know what I mean.
tobiasBora has joined #ocaml
jwatzman|work has joined #ocaml
<MercurialAlchemi>
dmbaturin: I haven't
<MercurialAlchemi>
dmbaturin: I think if I did something like this, that I'd piggy-back on the work already done in Nix and upload Nix expressions or something that compiles to Nix expressions, and then add rules to detect failure and trigger a rollback
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
<MercurialAlchemi>
on that, I'm off to bed
<dmbaturin>
Now we can get back to ocaml. :)
<dmbaturin>
Drup: Also, if ";" is an operator, why it can't be called in (;) form?
<Drup>
; is not an operator
<Drup>
it's part of the syntax
<dmbaturin>
Well, the correct question would be why it's not an operator.
<Drup>
It would need compiler support anyway. I suppose it could be a proper operator, but it's not that important
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
jonludlam has quit [Ping timeout: 272 seconds]
cateches has joined #ocaml
<cateches>
how much of an overhead is there in using ocaml callbacks in an otherwise C application?
jonludlam has joined #ocaml
<cateches>
I'm trying to weigh whether or not it makes sense to write a lot of my utilities in ocaml (because it's nice, not because of existing libs for my purposes) if the rest of my application isn't in ocaml
thomasga has quit [Quit: Leaving.]
<smondet>
Drup: dmbaturin: if `;` was an operator we would have unit -> 'a -> 'a OR 'b -> 'a -> 'a, with the compiler supprt we have mix of both: warning instead of type error
rgrinberg has quit [Quit: Leaving.]
cateches has quit [Quit: Page closed]
englishm has quit [Remote host closed the connection]
oscar_toro has quit [Ping timeout: 255 seconds]
Kakadu has quit [Quit: Konversation terminated!]
zpe has joined #ocaml
Simn has quit [Quit: Leaving]
zpe has quit [Ping timeout: 250 seconds]
jonludlam has quit [Ping timeout: 272 seconds]
jao` has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
rgrinberg has joined #ocaml
thomasga has quit [Quit: Leaving.]
girrig has quit [Ping timeout: 246 seconds]
troutwine is now known as troutwine_away
Denommus has quit [Ping timeout: 250 seconds]
araujo has quit [Ping timeout: 260 seconds]
Denommus has joined #ocaml
girrig has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
darkf has joined #ocaml
NoNNaN has quit [Remote host closed the connection]