betawaffle20 has quit [Remote host closed the connection]
<sagotch>
Drup: ah... thanks
<Niamkik>
yeah, i've read and tried them, but I was thinking about a library like haskell-cloud or in Erlang like model
<Niamkik>
Like, I don't know, spawning a thread with a dedicated stack and something like that
<Drup>
sagotch: well, actually, scratch that, you should consider it more like an intrinsic
<ZirconiumX>
If you want those, use those
<ZirconiumX>
Erlang has excellent concurrency support
<Niamkik>
I was just a question :)
<Niamkik>
It*
<Niamkik>
I already use Erlang, and I'm currently learning ocaml for some reasons
<Niamkik>
So, just asking if a kind of library should exist in ocaml ecosystem :)
<Niamkik>
thanks for the answer btw
<sagotch>
Drup: Sorry I did not get what you mean by "considering it more like an intrinsic"
<ZirconiumX>
Like a compiler intrinsic
<Drup>
sagotch: An intrinsic is a primitive that is interpreted by the compiler itself
jaar has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfp has joined #ocaml
<sagotch>
I see, thanks for the definition. So, in a for i = 0 to String.length x - 1 loop, why should one do not use the unsafe version? would compiler be smart enough to actually use it?
<ZirconiumX>
It performs no bounds checking IIRC
<Drup>
sagotch: If you are doing that, it's probably fine .... except you could just use String.iter(i) instead.
<sagotch>
Of course, this was a dummy example.
<sagotch>
ZirconiumX bound checking is done by going from 0 to length - 1
<ZirconiumX>
Obviously
<ZirconiumX>
But I meant the function itself performs no bounds checking
<Drup>
Of course if you get it wrong, it's at beast a segfault, and at worse a CVE. Up to you to decide if the (often tiny) perf improvement is worth it.
<Drup>
best*
<ZirconiumX>
Does the compiler optimise out bounds checks that it can prove?
<sagotch>
ZirconiumX: that was my question about the compiler being smart enough :0
<Drup>
I wouldn't bet on it
<Drup>
You can try! :)
<ZirconiumX>
OCaml on godbolt, when? :P
<def`>
i am sure it would optimise the one it can prove are correct, however I doubt it tries to prove anything :]
<sagotch>
XD
<ZirconiumX>
I guess someone should count how many bounds checks there are in some hot code
pierpal has quit [Read error: Connection reset by peer]
ozzymcduff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
raduom has joined #ocaml
_whitelogger has joined #ocaml
ozzymcduff has joined #ocaml
johnelse_ has joined #ocaml
<zozozo>
ZirconiumX: or just benchmarks applications with and without the -unsafe flag
johnelse has quit [Ping timeout: 264 seconds]
quipa has joined #ocaml
<xvilka>
Niamkik: I don't think OCaml supports actor model
<xvilka>
nor any library I heard of
maufred has quit [Ping timeout: 264 seconds]
johnelse has joined #ocaml
<xvilka>
Niamkik: you might want to give a try to Elixir though, if you want higher-level and more modern language than Erlang, but keeping the same model
johnelse_ has quit [Ping timeout: 268 seconds]
johnelse has quit [Quit: Lost terminal]
<ollehar>
xvilka: lwt?
freyr69 has joined #ocaml
<ZirconiumX>
Lwt isn't actor model
ziyourenxiang has joined #ocaml
<ollehar>
bah
<ollehar>
ZirconiumX: it is if you believe it in your heart
<Ulrar>
So what would be the ocaml equivalent of php's openssl_verify ? I have data, a pem cert and a signature and I want to verify that the signature is valid and issued by that certificate
pierpal has joined #ocaml
spew has joined #ocaml
Haudegen has quit [Remote host closed the connection]
<xvilka>
uh
<xvilka>
today is my worst day with OCaml
<xvilka>
so many problems everywhere
<xvilka>
ctypes lib, decompress library from mirage, now simple bindings for zlib can't be used for some unknown reason
pierpal has quit [Ping timeout: 260 seconds]
Denommus has joined #ocaml
<xvilka>
even if I put the line as the first, without any interference from the other modules, still same result
jaar has joined #ocaml
Fare has joined #ocaml
pmetzger has joined #ocaml
Fare has quit [Ping timeout: 255 seconds]
<xvilka>
seems like a jbuilder error this time, sigh
matti19 has joined #ocaml
neatonk has quit [Remote host closed the connection]
neatonk has joined #ocaml
matti19 has quit [Remote host closed the connection]
gtrak has joined #ocaml
<def`>
xvilka: do you have another module named zlib?
pierpal has joined #ocaml
<xvilka>
def`: no, only "decompress" but it provides only "Zlib_inflate" and "Zlib_deflate"
Fare has joined #ocaml
|jbrown| has joined #ocaml
bartholin has quit [Ping timeout: 272 seconds]
bartholin has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
pmetzger has quit []
loli has quit [Quit: WeeChat 2.2]
malina has joined #ocaml
freyr69 has quit [Remote host closed the connection]
<ibnfirnas>
xvilka, Niamkik: you can model things as actors using Jane Street's Pipe module
<companion_cube>
Drup: not always a tiny perf improvement, though :-)
<companion_cube>
a reason for using Array.iteri and the likes, is that they use unsafe accessors, and in some cases it can be significant
<ec>
when I open vimr (my GUI editor), it only has my *global* `$PATH`, fairly obviously. It doesn't have the `/Users/ec/Sync/Code/excmd-parser/_opam/bin` that opam prepends; nor does it have the `$OPAMSWITCH` envvar.
<theblatte>
I let opam edit my shell and editor config and that seems to be enough. "opam user-setup" will do that automatically for you
ollehar has quit [Remote host closed the connection]
quipa has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
bezirg has joined #ocaml
Solprefixer has joined #ocaml
Solprefixer has quit [Remote host closed the connection]
al-damiri has joined #ocaml
sagotch has quit [Quit: Leaving.]
malina has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
malina has quit [Quit: Throwing apples of Montserrat]
Drup is now known as Drat
ziyourenxiang has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
Bronsa has quit [Ping timeout: 272 seconds]
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
bezirg has quit [Client Quit]
troydm has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
bezirg has joined #ocaml
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
FreeBirdLjj has joined #ocaml
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
jaar has quit [Quit: Leaving]
Haudegen has quit [Remote host closed the connection]
jnavila has joined #ocaml
troydm has joined #ocaml
lynn_ has quit [Read error: Connection reset by peer]
lynn_ has joined #ocaml
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
leah2 has quit [Ping timeout: 272 seconds]
bezirg has quit [Remote host closed the connection]
<ec>
but `MyCool.Mod.func …` does *not* compile to something that can be called as `MyCool.Mod.func(…)`; it compiles to `MyCool[/*Mod*/6].func(…)`
<dmbaturin>
It's a concurrent TCP server with (shudder) a mutable reference.
<ec>
which is completely undiscoverable / undocumented, and not stable, from the JS side … meaning MyCool.Mod is basically only useful right now if it's entirely internal to the parent module
<Niamkik>
dmbaturin: Oh! This website is your! It helps me a lot today!
<Niamkik>
dmbaturin: really thanks for this one! :)
<dmbaturin>
I may want to rewrite that page to use the new promise terminology.
<Niamkik>
(it works with a copy paste, but, I had some trouble when I tried some "improvements"... :p)
<ec>
can you even mention Discord users thru the bridge
<dmbaturin>
Niamkik: If you want some parts extended or clarified, I can try to do it. I tried to keep the program minimal but bloating it a bit for instructive value sounds justified.
<dmbaturin>
No, that title is just a placeholder, it won't stay. ;)
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
* Niamkik
download it!
tarptaeya has quit [Quit: Konversation terminated!]
dmiles has quit [Read error: Connection reset by peer]
malina has joined #ocaml
pierpa has joined #ocaml
bartholin has quit [Remote host closed the connection]
dmiles has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
jao has joined #ocaml
Geekingfrog has quit [Ping timeout: 255 seconds]
Geekingfrog has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
<discord>
<Bluddy> ec: yes
inr has quit [Read error: Connection reset by peer]
inr has joined #ocaml
pierpal has quit [Ping timeout: 255 seconds]
<discord>
<struktured> ec: hmm trying to figure out how I didn't run into that problem, maybe I don't reference submodules within my library project and that lets me get away with it
Denommus has quit [Remote host closed the connection]
neatonk has quit [Ping timeout: 268 seconds]
caente has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
malina has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 260 seconds]
gtrak has joined #ocaml
Guest48474 has quit [Quit: leaving]
DanielRichman has joined #ocaml
ibnfirnas has quit [Quit: Good bye]
ibnfirnas has joined #ocaml
kakadu has quit [Remote host closed the connection]