<struktured>
actually I think theres a bug in it anyhow, so perhaps it's too terse for me
<dmbaturin>
Too pointless^W point-free for me. :)
<struktured>
a reasonable stance, for sure
<struktured>
it is fun to write super compact chaining of operators, but it begins to feel like perl if I'm not careful to maintain later
<struktured>
I do like avoiding parens though, which is kind of what is happening here
<dmbaturin>
Well, perl usually has exact opposite problem: there's too much manipulation of implicit state that is hard to follow, rather than passing something through a long chain of transparent function that is too long to follow.
<struktured>
yeah but the density can be similar, I still prefer dealing with terse mostly stateless ocaml though, just for the type system alone
<dmbaturin>
No doubt. At least you can convert point-free to knowingly equivalent pointful form with relatively simple manipulations.
<struktured>
and I just destroyed my bashrc while testing it (it updates some entries in there)
<struktured>
:)
<dmbaturin>
I guess that's the reason some people upload their config on code hosting services.
<reynir>
struktured: I'd maybe put to_append on its own line :)
<reynir>
hmm, maybe it's not really better
<struktured>
I cat'ed my bashrc earlier. phew. fixed the bugs too. Still terse though, but I should probably change it to let patterns if only to not scare away my colleagues
<reynir>
heh
<reynir>
I'd maybe write (fun re -> Re.matches re s) |> (<>) [] isntead of (fun re -> Re.matches re s |> (!=) [])
hilquias has quit [Remote host closed the connection]
<struktured>
u changed != to <> ? what's the benefit here?
<struktured>
oh wait you moved a paren too..hmm
<reynir>
my point was the parens, but <> is structural inequality
<reynir>
!= is physical inequality
<struktured>
got it, thanks
<reynir>
btw I'm not really an ocaml expert
badkins has quit [Remote host closed the connection]
<struktured>
in the given example, there is no paren around "fun re"
<reynir>
err, correct. But it's parsed as the latter
<struktured>
I see
<reynir>
(I think)
palomer has joined #ocaml
<reynir>
It looks ok to me, though, except for (<>) vs (!=) :)
<struktured>
yeah I prefer strutural I just forgot about that operator distinction in ocaml. It will NOT happen again :)
<struktured>
btw the bug was its missing a "not @@" at the beginning of the whole thing
<dmbaturin>
!= can have very unexpected effect when comparing values rather than references.
<dmbaturin>
[] == [] ;; let x = 1 in x == 1 ;; [1;2] == [1;2]
<struktured>
in java, its object.equals vs ==, but what sucks even more is by default .equals defaults to == anyhow
<dmbaturin>
Yeah, ocaml managed to make it perfectly consistent and very unusual at the same time.
<kido1412>
It uses ```ocamlopt -o hello.opt hello.ml hello_stubs.c```, I'm wondering if we could use corebuild to compile?
dsheets has joined #ocaml
thomasga has quit [Quit: Leaving.]
kido1412 has quit [Quit: Page closed]
lordkryss has joined #ocaml
freling has quit [Quit: Leaving.]
djellemah has quit [Ping timeout: 252 seconds]
<xificurC>
alcotest, ounit, qcheck, kaputt, testsimple... any recommendations?
badon has quit [Ping timeout: 255 seconds]
<dmbaturin>
I use ounit most of the time, looks like it's the most popular.
thomasga has joined #ocaml
<dmbaturin>
I find the testsuite definition syntax a bit annoying, otherwise it's fine.
<xificurC>
the page supplies a youtube video where the author uses Eclipse :o Is that common?
<dmbaturin>
Eclipse? I'm still to meet anyone who uses eclipse here (on the other hand, maybe they are silent about it :).
TheLemonMan has joined #ocaml
<xificurC>
his editing skills are subpar i must say. mouse select, right-click, copy, click, right-click, paste
<xificurC>
dmbaturin: what do you use?
* xificurC
guesses vim
<companion_cube>
xificurC: what do you want to test?
<dmbaturin>
I'm mostly a vim user, but tuareg mode and easier merlin integration made me try emacs.
<TheLemonMan>
merlin works fine in vim too
<xificurC>
companion_cube: a couple small functions, e.g. a function that tests if a hand contains a straight
<companion_cube>
in this case, I would use either one of qtest, ounit, qcheck
<companion_cube>
(depending on whether you want unit or random tests)
palomer has quit [Quit: palomer]
<companion_cube>
qtest might be the most lightweight, as you can put tests next to the code
<dmbaturin>
TheLemonMan: For some reason I couldn't get it to work with vim quickly, so I got curious if emacs integration is easier. In the end I've found out that emacs itself is not nearly as bad as I imagined it (or remember it from my early UNIX days). :)
<xificurC>
dmbaturin: I liked vim bindings when I tried it (after emacs) but didn't like the program as-is (packages, configs etc). Now i use emacs with evil mode, which is like running vim inside emacs :)
<xificurC>
dmbaturin: there's also spacemacs
<xificurC>
companion_cube: I'm not sure what random tests could I run on that, so I guess I'm stuck with unit tests
<Unhammer>
11 years with Emacs have left my fingers in a sorry state, so I've started doing M-x evil every so often
<TheLemonMan>
dmbaturin, well all you need is adding it to the rtp and start pressing ^X^O like there's no tomorrow :)
chambart has joined #ocaml
<Unhammer>
delete-blank-lines?
<dmbaturin>
Guess I should try evil.
<dmbaturin>
There once was a firefox plugin for vim-like bindings. I miss it.
<Unhammer>
vimperator?
<Unhammer>
pentadactyl?
<TheLemonMan>
Unhammer, completion :D
<Unhammer>
I've tried both, the first one was the less buggy, but it's still not too great, e.g. unusable in pdf.js
<Unhammer>
aha
Haudegen has quit [Ping timeout: 256 seconds]
<dmbaturin>
Unhammer: Vimperator. When it died, I've tried pentadactyl, but it was entirely unusable.
<Unhammer>
died? I use vimperator now .
<xificurC>
I use pentadactyl (and it works with pdf.js)
<Unhammer>
maybe that explains the bugs =P
<dmbaturin>
Well, it stopped working since some FF version and it was abandoned. Or someone revived it?
<TheLemonMan>
they didn't put out a stable release in a while but the nightlies work just fine
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<xificurC>
I just hg pull -U everytime it doesn't work anymore in firefox :)
<xificurC>
I don't know why they don't update the xpi on the addons page of mozilla, but a couple more strokes are worth the functionality it provides
<TheLemonMan>
hrm, is merlin supposed to complete the module hierarchy too ?
thomasga has quit [Client Quit]
mengu has joined #ocaml
<xificurC>
companion_cube: thanks for qtest, I will try using it. Which quickcheck library is used in it?
<xificurC>
oh I see they have their own implementation. A third one, why not
Haudegen has joined #ocaml
oscar_toro has quit [Ping timeout: 256 seconds]
Bhavya has joined #ocaml
thomasga has joined #ocaml
_andre has joined #ocaml
tnguyen has quit [Quit: tnguyen]
thomasga has quit [Quit: Leaving.]
<xificurC>
I'm still mad the package names have to be searched for. Like for qtest I have to write QTest2Lib :S
<xificurC>
(which I found with `ocamlfind list | grep 'version: 2'')
jwatzman|work has joined #ocaml
themagician has joined #ocaml
Hannibal_Smith has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Ping timeout: 276 seconds]
<companion_cube>
erf
<companion_cube>
yes, qtest is hackish in many ways
<companion_cube>
but it's quite nice once setup
<companion_cube>
dmbaturin: vimperator is pretty active
<companion_cube>
and still nice
sdothum has joined #ocaml
adc90 has quit [Read error: Connection reset by peer]
adc90 has joined #ocaml
ggole has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
thomasga has joined #ocaml
mort___ has joined #ocaml
arj has quit [Quit: Leaving.]
<xificurC>
companion_cube: looks certainly less verbose than oUnit
<Guest66832>
hi, I have an ocaml bytecode executable file that want to run on a different machine. Bytecode uses libcrypto 1.0.0 while the other machine has an older version. It is not simply possible to update the second machine. Is there any solution to run the bytecode?
<Drup>
recompile bytecode using older version of libcrypto.
<Guest66832>
or, possibly create an executable with the older libcrypto?
<Guest66832>
ah, yes
<Guest66832>
but how I can do that?
wraithm has joined #ocaml
thomasga has joined #ocaml
<Guest66832>
how I can tell ocamlbuild to use the older version of libcrypto?
<Guest66832>
which is already installed
BitPuffin|osx has joined #ocaml
<dmbaturin>
companion_cube: Is there pure ocaml gzip?
<companion_cube>
I'm not sure
<companion_cube>
people have been talking about it, afaik
mengu has joined #ocaml
<companion_cube>
would be nice to have a streaming implementation
<xificurC>
what do you mean by streams? Are you talking abotu a concept or a specific lib
<dmbaturin>
TheLemonMan: Cool, should make it possible to unpack gzipped tarballs on mirage.
adc90 has quit [Ping timeout: 246 seconds]
adc90 has joined #ocaml
<companion_cube>
xificurC: a concept
<companion_cube>
means you can encode and decode by chunks
<companion_cube>
with a good control of where the input comes from and output goes
<companion_cube>
Bünzli's libraries are a good example (uutf, jsonm, xmlm...)
<dmbaturin>
xificurC: gzip can work on byte streams rather than complete files. How stream is organized in the code is not very important, as long as it can be used to obtain the chunks.
<companion_cube>
TheLemonMan: nice
<companion_cube>
not packaged on opam yet, though; might not be finished yet
<companion_cube>
s/finished/ready/
mengu has quit [Read error: Connection reset by peer]
<dmbaturin>
Guest66832: Good question, I'd like to know it too. Should be possible.
mengu__ has joined #ocaml
mengu__ has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
Guest66832 has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
<Drup>
And another bug found by the unfortunatly disabled warning 27 !
<flux>
I guses there's some latent interest in OCaml given the upvotes on /r/programming :)
<Algebr>
as a side note, I don't understand all the people that complain about the lack of multicore in ocaml. Are they REALLY actually needing it or are they just finding something to complain about.
<flux>
well, I've had a couple times (image processing) where multi-threaded ocaml would have been a trivial way to multiply the performance. AMD 8350 here..
<flux>
sure, it's doable with processes but requires already a bit more effort
<flux>
for example if you have a X connection involved
<flux>
and copying images over pipes isn't the best idea either if your plan was to increase performance
<flux>
I don't think though that people really do that much multi-core programming. it just looms as a threat to the 'simple' way to get performance.
hilquias has quit [Remote host closed the connection]
Cyanure has joined #ocaml
shinnya has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
<flux>
of course, it remains to be seen how well it performs in various scenarios..
<flux>
at least it does have some cool technology, in particular it does some work of the GC per-core, not globally?
milosn has joined #ocaml
<flux>
I guess this is very different from the GC in caml-light, which apparently did at some point support multi-core?
<Drup>
for lilis, paralellizing the work is rather trivial but basically impossible without shared memory (due to the size of the stream produced)
<Drup>
paralleling with fork+message passing is slower than monocore just because of serialization.
<adrien_znc>
you can share memory without doing threads :)
<flux>
but then you need to be careful and perhaps change the structure of the code
<flux>
for example if you used to just send functions, you can't anymore
<Drup>
adrien: it needs to be through bigarrays no ?
<Drup>
that will ... just not do.
<flux>
you probably need to really choose what kind of shared memory structure you have, and preferably make it fit bigarrays yes
<adrien_znc>
Drup: depends :)
<flux>
I don't even know how I would handle if I had a varying amount of shared memory?
<flux>
and, of course, there's no GC for shared memory..
<adrien_znc>
yeah :)
jwatzman|work has quit [Quit: jwatzman|work]
Submarine_ has joined #ocaml
Submarine_ has joined #ocaml
adc90 has quit [Read error: Connection reset by peer]
adc90 has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
chambart has quit [Ping timeout: 240 seconds]
Gama11_ has joined #ocaml
Gama11 has quit [Ping timeout: 246 seconds]
bobry has quit [Quit: Connection closed for inactivity]
<companion_cube>
flux: I hope it won't make monocore slower
Algebr has quit [Ping timeout: 256 seconds]
* companion_cube
wants to see Drup fit a Sequence.t in a bigarray