masterbuilder has quit [Remote host closed the connection]
xmachina has joined #ocaml
yisef has joined #ocaml
chrisz has quit [Ping timeout: 255 seconds]
chrisz has joined #ocaml
yisef has quit [Remote host closed the connection]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
waleee has quit [Ping timeout: 248 seconds]
cr1901 has quit [Read error: Connection reset by peer]
curium has joined #ocaml
bartholin has joined #ocaml
azimut has joined #ocaml
ShalokShalom has joined #ocaml
<ShalokShalom>
hi there
<ShalokShalom>
I tried OCaml once again, after years
<ShalokShalom>
I came to exactly the first step that could fail:
<ShalokShalom>
I installed Opam, and then tried to initialize it: /usr/bin/opam: "create_process" failed on /usr/lib/tar: Permission denied
Serpent7776 has joined #ocaml
rom1504 has quit [Ping timeout: 246 seconds]
rom1504 has joined #ocaml
<discocaml>
<lyhokia> are you installing ocaml globally?
<discocaml>
<lyhokia> I prefer just install opam, and then use `drom` and `opam switch` to manage my project locally, so I don't run into dependency issues
ursa-major has joined #ocaml
<ShalokShalom>
I installed OCaml from AUR
<discocaml>
<._null._> You should uninstall that AUR OCaml and install opam through the regular package manager
<discocaml>
<._null._> No reason to go through the AUR for OCaml
<ShalokShalom>
Oh sorry, I meant the regular package manager
bartholin has quit [Quit: Leaving]
<ShalokShalom>
The ocaml package from the regular repos
<discocaml>
<._null._> What about opam?
<dh`>
expn AUR?
<discocaml>
<lyhokia> I think you should never install ocaml on it's own because that implies you have to manage dependency version manually
<discocaml>
<._null._> Arch User Repository
<dh`>
ah
<discocaml>
<._null._> lyhokia: opam needs ocaml as a dependency, the thing is you shouldn't use ocaml except when managed by opam (or other ocaml-specific manager)
<ShalokShalom>
opam is also from the regular repositories
<discocaml>
<lyhokia> true
<discocaml>
<._null._> What distro are you using? Regular Arch?
<ShalokShalom>
Garuda
mima has joined #ocaml
<ShalokShalom>
I followed the instructions in the README of the OCaml Platform
<ShalokShalom>
This one does make no statements about how to get OCaml
<ShalokShalom>
If that is so critical, you might add that
<discocaml>
<lyhokia> I suggest you check out drom, it manages opam switch for you. You kinda have a cargo like workflow with it
<discocaml>
<._null._> It's not supposed to be difficult on Linux
<ShalokShalom>
For the time being, can we conclude that the regular repositories of Arch are containing proper packages or not?
<ShalokShalom>
Setting up OCaml had been regulary difficult for me on Linux
<discocaml>
<lyhokia> yes, but you should not use them directly
<ShalokShalom>
Particularly with the build tools
<ShalokShalom>
As in this case
<discocaml>
<._null._> No, don't use the standard repos for OCaml packages, they rarely work
<ShalokShalom>
I should not use what directly?
<discocaml>
<lyhokia> the ocaml compiler in regular repo
<discocaml>
<lyhokia> you should manage them with opam instead
<ShalokShalom>
I am not feeling comfortable messing around with PATH now, and I think this is worth debugging anyway.
<ShalokShalom>
It cant be the intended way to run opam, via removing something from the PATH and adding it again. :)
<discocaml>
<lyhokia> Oh I mean a directory rather than an executabl
ShalokShalom2 has joined #ocaml
<ShalokShalom2>
Puh, so my perceiption of directories and folders stays intact :D
<ShalokShalom2>
My perceiption about the stability of IRC web clients sadly as well :D
ShalokShalom has quit [Ping timeout: 246 seconds]
<discocaml>
<._null._> I'm pretty sure `/usr/lib` should never have been in your PATH and that something is wrong with that
<ShalokShalom2>
you might be right on this
<ShalokShalom2>
let me check
twillght has joined #ocaml
<dh`>
it should not be
<ShalokShalom2>
I think I added this in a hury
<ShalokShalom2>
to get something running, I think around Swift
<ShalokShalom2>
I remember being angry :D
mima has joined #ocaml
<ShalokShalom2>
You were right
<ShalokShalom2>
I removed it, and opam works now
<ShalokShalom2>
I like that it respects my shell, since its not quite common
<ShalokShalom2>
It even offers to modify the config file for me :)
<ShalokShalom2>
Its not quite common means the fish shell
ShalokShalom2 has quit [Quit: Client closed]
<discocaml>
<._null._> It basically supports sh-compliant shells, and fish
dnh has joined #ocaml
dnh has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
spip has quit [Ping timeout: 255 seconds]
<discocaml>
<lyhokia> fish is well support by most softwares running on linux by this point, rarely run in to issue with that
twillght has quit [Remote host closed the connection]
twillght has joined #ocaml
twillght has quit [Remote host closed the connection]
dnh has joined #ocaml
spip has joined #ocaml
dnh has quit [Ping timeout: 240 seconds]
spip has quit [Read error: Connection reset by peer]
mima has quit [Ping timeout: 258 seconds]
mima has joined #ocaml
ursa-major has quit [Quit: WeeChat 4.0.4]
dnh has joined #ocaml
spip has joined #ocaml
mima has quit [Ping timeout: 240 seconds]
<discocaml>
<darrenldl> @dinosaure if condition variable is to be added to miou, please don't provide the old school interface of "read boolean flag in a loop behind a mutex" or whatever the exact style is
mima has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
habnabit_ has joined #ocaml
mima has quit [Ping timeout: 250 seconds]
myrkraverk has quit [Read error: Connection reset by peer]
<discocaml>
<dinosaure> You talk about `Miou_unix.Cond.wait`?
<discocaml>
<dinosaure> I mean, currently, I'm really not convince by the `Miou_unix.Cond` API 🙂 I started some usages but yeah, we can definitely talk and improve that
<discocaml>
<darrenldl> oh it's in Miou_unix, oops
<discocaml>
<darrenldl> but yes, i have failed to find a convincing answer to why it has to be barred behind a predicate in a loop
<discocaml>
<darrenldl> whether in eio, or in here
<discocaml>
<dinosaure> yes, can you make an issue on GitHub (or I can do, just to keep a trace about that). I really would like to iterate on that and provide something simpler/better/safer for users
<discocaml>
<darrenldl> (or more specifically when is spurious wakeup useful, and so much so that the typical usage pattern must be replicated at user level as to not interfere with spurious wakeups)
<discocaml>
<dinosaure> ah ok, you want something more close to what `Stdlib.Condition.t` provides for instance?
<discocaml>
<darrenldl> type signature wise maybe, but not semantics
<discocaml>
<darrenldl> > This thread can later be woken up after the condition variable c has been signaled via Condition.signal or Condition.broadcast; however, it can also be woken up for no reason.
archtang2 has joined #ocaml
<discocaml>
<darrenldl> to me this reads like a very low-level detail, and is perhaps useful for OS level development, but i can't think of any use case in userspace
<discocaml>
<darrenldl> ah you beat me to it - was away for a bit
<discocaml>
<darrenldl> thanks!
archtang2 has quit [Ping timeout: 255 seconds]
<companion_cube>
@darrenldl there's also the fact that multiple threads might be woken up when only one resource was made available
<companion_cube>
I don't see how you go past the loop
xmachina has quit [Quit: WeeChat 4.0.4]
xmachina has joined #ocaml
cedb has quit [Quit: WeeChat 4.0.4]
<hannes>
I'm not deep into multicore etc. - but my observation is that I usually need a single-reader single-writer condition -- maybe the "create" could specify how many waiters are the maximum expected ones? and then I agree with darrenldl that a "wait : t -> ?condition:(unit -> bool) -> (unit -> 'a) -> 'a" would be useful, where [fn] being executed when condition is true and the condition has fired
<discocaml>
<darrenldl> companion_cube: if the user wants a resource counter then they should use a counting semaphore
<hannes>
looking at the stdlib condition.mli I don't quite understand why/how only wait receives a Mutex.t
<companion_cube>
hannes: I often need a multiple waiter condition, eg for a work queue
<discocaml>
<darrenldl> (or maybe i am needlessly fixated on condvar being a signaling mechanism and nothing more)
<companion_cube>
You could build the abstraction on top of it though
<companion_cube>
Just like you can build a nice retry loop abstraction on top of Atomic
<companion_cube>
But underneath, in general, you'll need a loop
xmachina has quit [Quit: WeeChat 4.0.4]
<discocaml>
<darrenldl> do we need the user to implement said loop though?
<discocaml>
<darrenldl> also for your work queue scenario: do you want spurious wakeups?
<companion_cube>
I don't care, I need the loop anyway
<companion_cube>
I don't think anyone _wants_ spurious wake ups, but they're an implementation artifact
<companion_cube>
Afaik
mima has joined #ocaml
ced2 has joined #ocaml
ced2 is now known as cedb
<discocaml>
<darrenldl> sure, but then just hide it from user
<discocaml>
<darrenldl> its not like user has a significantly better way of dealing with spurious wakeups anyway
<discocaml>
<darrenldl> though im curious why you need the loop?
John_Ivan_ has joined #ocaml
<companion_cube>
Because most often, you night be waken up only to find that some other thread got there before you
<companion_cube>
But conditions are mostly there to implement building blocks like queues or signals or whatever anyway
<companion_cube>
So users who do that should know what's going on
<haesbaert>
13:45 < hannes> looking at the stdlib condition.mli I don't quite understand why/how only wait receives a Mutex.t
<haesbaert>
^ hmm `add` is also taking the lock, or did I miss something
John_Ivan_ has quit [Quit: Disrupting the dragon's slumber one time too often shall eventually bestow upon all an empirical and indiscriminate conflagration that will last for all goddamn eternity.]
ced2 has joined #ocaml
cedb has quit [Read error: Connection reset by peer]
xmachina has joined #ocaml
ced2 has quit [Ping timeout: 250 seconds]
ced2 has joined #ocaml
Anarchos has quit [Ping timeout: 250 seconds]
wingsorc has quit [Ping timeout: 246 seconds]
waleee has joined #ocaml
ced2 is now known as cedb
John_Ivan has joined #ocaml
<hannes>
haesbaert: add in the sample code indeed uses the mutex
Serpent7776 has quit [Ping timeout: 255 seconds]
waleee has quit [Ping timeout: 246 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
bartholin has joined #ocaml
waleee has joined #ocaml
rgrinberg has joined #ocaml
kurfen has quit [Ping timeout: 250 seconds]
kurfen has joined #ocaml
<discocaml>
<darrenldl> i think requiring a loop makes sense as a building block for semaphores and work queues, since there will be a loop to double check things anyway indeed. so might as well handle the spurious wakeups in the same loop, as suggested by companion_cube
<discocaml>
<darrenldl>
<discocaml>
<darrenldl> then i guess my complaint is there should be a different (main) api when facing user, since sometimes we really just want some way to signal things
azimut has quit [Ping timeout: 246 seconds]
azimut has joined #ocaml
kurfen has quit [Ping timeout: 246 seconds]
Serpent7776 has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lilata2 has joined #ocaml
patrick__ has joined #ocaml
richardhuxton_ has joined #ocaml
_alix_ has joined #ocaml
soni__ has joined #ocaml
b0o_ has joined #ocaml
ggb_ has joined #ocaml
whereiseveryone_ has joined #ocaml
immutable_ has joined #ocaml
ymherklotz_ has joined #ocaml
Geekingfrog_ has joined #ocaml
berberman_ has joined #ocaml
Geekingfrog has quit [Ping timeout: 246 seconds]
_alix has quit [Ping timeout: 246 seconds]
richardhuxton has quit [Ping timeout: 246 seconds]
whereiseveryone has quit [Ping timeout: 246 seconds]
soni_ has quit [Ping timeout: 246 seconds]
ymherklotz has quit [Ping timeout: 246 seconds]
deadmarshal_ has quit [Ping timeout: 246 seconds]
b0o has quit [Ping timeout: 246 seconds]
ggb has quit [Ping timeout: 246 seconds]
CalimeroTeknik has quit [Read error: Connection reset by peer]
patrick has quit [Ping timeout: 246 seconds]
anpad has quit [Ping timeout: 246 seconds]
Riviera has quit [Ping timeout: 246 seconds]
slothby has quit [Ping timeout: 246 seconds]
berberman has quit [Ping timeout: 246 seconds]
immutable has quit [Ping timeout: 246 seconds]
lilata has quit [Ping timeout: 246 seconds]
lilata2 is now known as lilata
patrick__ is now known as patrick
_alix_ is now known as _alix
ggb_ is now known as ggb
richardhuxton_ is now known as richardhuxton
ymherklotz_ is now known as ymherklotz
immutable_ has quit [Read error: Connection reset by peer]
ggb has quit [Read error: Connection reset by peer]
philipwhite has quit [Write error: Connection reset by peer]
toastal has quit [Write error: Connection reset by peer]
Ankhers has quit [Write error: Connection reset by peer]
ymherklotz has quit [Read error: Connection reset by peer]
patrick has quit [Read error: Connection reset by peer]
b0o_ has quit [Read error: Connection reset by peer]
richardhuxton has quit [Read error: Connection reset by peer]
whereiseveryone_ has quit [Read error: Connection reset by peer]
soni__ has quit [Remote host closed the connection]
_alix has quit [Read error: Connection reset by peer]
pluviaq has quit [Write error: Connection reset by peer]
jakzale has quit [Write error: Connection reset by peer]
sleepydog has quit [Write error: Connection reset by peer]
henrytill has quit [Write error: Connection reset by peer]
seeg has quit [Write error: Connection reset by peer]
slothby has joined #ocaml
patrick has joined #ocaml
ggb has joined #ocaml
noddy has quit [Ping timeout: 246 seconds]
philipwhite has joined #ocaml
Anarchos has joined #ocaml
b0o has joined #ocaml
pluviaq has joined #ocaml
ymherklotz has joined #ocaml
richardhuxton has joined #ocaml
jakzale has joined #ocaml
whereiseveryone has joined #ocaml
_alix has joined #ocaml
soni_ has joined #ocaml
toastal has joined #ocaml
henrytill has joined #ocaml
seeg has joined #ocaml
anpad has joined #ocaml
anpad has quit [Changing host]
anpad has joined #ocaml
immutable has joined #ocaml
Ankhers has joined #ocaml
sleepydog has joined #ocaml
ctk has joined #ocaml
deadmarshal_ has joined #ocaml
<companion_cube>
that's where you should use some observable, queue, etc. abstraction
<companion_cube>
I have mine at work
<companion_cube>
(`'a Observable.t`, where you can subscribe for events of type 'a)
Anarchos has quit [Quit: Vision[]: i've been blurred!]