<Armael>
because I configured weechat to display "d_bot"'s messages like normal messages
<Armael>
(the config was from zozozo I believe)
mro has joined #ocaml
<Armael>
but if the bot changes name well it doesn't work anymore
rak has quit [Quit: Segmentation fault (core recycled)]
rak has joined #ocaml
<zozozo>
Armael: note that you can have multiple configurations for my script, e.g. on my instance of weechat I have it configured to work for both d_bot and d_bot_
<adrien>
Armael: then handle trailing underscores! :D
<adrien>
it merely means the bot is not currently identifier to IRC services, it's probably something fairly common
humasect has joined #ocaml
humasect has quit [Client Quit]
mro has quit [Remote host closed the connection]
jlrnick has quit [Ping timeout: 250 seconds]
<Armael>
:'(
Haudegen has quit [Quit: Bin weg.]
chrisz has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
mbuf has quit [Quit: Leaving]
<d_bot_>
<Président daren le pétrolier> Hi! I'm looking for the implementation of the stdlib `Stream` module in the compiler repo but I can't find it in the `stdlib/` directory, does anyone know its source?
<companion_cube>
it's just been removed, if you're looking at trunk
<d_bot_>
<undu> is there anywhere I can read about the reasoning behind the removal? the PR is quite empty
<d_bot_>
<Président daren le pétrolier> oh curious, thank you!
rgrinberg has joined #ocaml
<companion_cube>
the usage has been discouraged for years, although I don't remember official stuff right now
<companion_cube>
but basically, Stream is a weird, kind of slow, quirky form of iterators
<d_bot_>
<Président daren le pétrolier> I'm looking for a data structure to read line by line a file without loading it entirely in memory, I thought that the streams could be adapted
<d_bot_>
<Président daren le pétrolier> do you know of a more suitable structure for this usage?
<companion_cube>
well, the simpler is a recursive function with `input_line`
<companion_cube>
that said, Seq.t is standard now, and I have a collection of iterators that do that kind of stuff
<companion_cube>
but there's no iterator that's perfectly adapted to IOs I think, alas
bartholin has quit [Quit: Leaving]
<d_bot_>
<Président daren le pétrolier> oh ok, good to know
<d_bot_>
<Président daren le pétrolier> what are the differences between a stream and a `Seq.t`?
gwizon has quit [Quit: Lost terminal]
Haudegen has joined #ocaml
<companion_cube>
well, check out the implementations
<d_bot_>
<Président daren le pétrolier> I will do that, thank you 🙂
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
rgrinberg has joined #ocaml
mro has quit [Quit: Leaving...]
waleee has joined #ocaml
hackinghorn has quit [Remote host closed the connection]
hackinghorn has joined #ocaml
zebrag has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
<d_bot_>
<octachron> You even gave room for bikeshedding with `(let.)`, `let!` and `let+x = Some 0 in x`!
greaser|q has joined #ocaml
greaser|q has quit [Changing host]
greaser|q is now known as GreaseMonkey
<d_bot_>
<EduardoRFS> I just made it exactly the same as Reason but we can remove those, I didn't understand the `let+x = Some 0 in x` case
<d_bot_>
<VPhantom> Oh that is a nice one!
<d_bot_>
<VPhantom> For now what I do is dedicate one character per monad (`let|` for `Option.bind`, `let*` for `Result.bind` or `Lwt_result.bind` depending on context, etc.)
<companion_cube>
let.1 x = … in let.2 y = … in x,y
<companion_cube>
can't wait :p
<d_bot_>
<EduardoRFS> I guess it's better than >>=?=
<d_bot_>
<VPhantom> The notion of having a short keyword instead would definitely make things more explicit for the reader.
<d_bot_>
<octachron> `let+x = Some 0 in x` is currently valid since `x` is the start of a new token. With the extension of the `letopsymbolchar` in your PR, the expression is now tokenized as `let+x` `=` ... and triggers a syntax error.
<d_bot_>
<EduardoRFS> and as a core maintainer you cannot unsee that right?
<d_bot_>
<VPhantom> What does `let+x` currently mean in that example?
<d_bot_>
<EduardoRFS> let+ x
<d_bot_>
<VPhantom> Oh!
<d_bot_>
<davesnx> I 100% believe that landing a syntactic feature in OCaml is just opening the PR straight away
<d_bot_>
<davesnx> I love you @EduardoRFS
<d_bot_>
<EduardoRFS> I always forget that OCaml accepts a lot of code without spaces
<d_bot_>
<EduardoRFS> it's not even whitespace insensitive just not insensitive
<d_bot_>
<EduardoRFS> just insensitive
<d_bot_>
<octachron> @EduardoRFS , I cannot unsee that this is a breaking change, but it would not be the first time that we break code with missing conceptually required white spaces.
<d_bot_>
<octachron> There was a similar issue with `< 'a.?x:int -> ... >` and the custom indexing operators.
<d_bot_>
<VPhantom> Since `let.` and `let!` weren't allowed as let bindings, then the `.` or `!` make sense as the keyword "introducers" here, to me.
<d_bot_>
<EduardoRFS> ! will not cut, as gasche mentioned in the PR, so we can use `.` and multiple `.`
<companion_cube>
let<await>
<d_bot_>
<VPhantom> Yeah, `.` is more intuitive to me anyway. 😛 That PR is actually what I expected when I heard let bindings were coming, before I saw the single-symbol implementation.
<d_bot_>
<VPhantom> @companion_cube That seems unnecessarily "noisy" to me. The period is discrete, and it's half the characters also.
<companion_cube>
I was kidding :p
<companion_cube>
I do think the dot is good.
<d_bot_>
<VPhantom> Whew! 😛
<d_bot_>
<octachron> only with unicode angled brackets `let❬await❭` , `<` is a binary operator not a bracket.
<d_bot_>
<VPhantom> oh boy…
<companion_cube>
:D
<companion_cube>
the classic go solution
<d_bot_>
<EduardoRFS> I'm pretty sure golang people were using this for generics at some point
<d_bot_>
<VPhantom> All those wrapping brackets and what not is why I feel uncomfortable with the likes of Rust and Java. They're a sea of symbols compared to how clean OCaml can be.
<d_bot_>
<d4hines> I'm working on an application that uses Lwt to process incoming messages asynchronously, but I'm trying to offload expensive (pure) computations to another domain using `Lwt_domain` . However, my application also calls other programs using `Lwt_process.pmap`, which calls `Unix.fork` under the hood. This raises the error:
<d_bot_>
<d4hines> ```
<d_bot_>
<d4hines> Unix.fork may not be called while other domains were created
<d_bot_>
<d4hines> ```
<d_bot_>
<d4hines> What is the prescribed way to call other programs when using multicore?
<d_bot_>
<EduardoRFS> actually that's a good question, why does multicore banned fork? Also how can I execute a CLI without it?
<companion_cube>
EduardoRFS: can we also get `;.foo` ?
<companion_cube>
I hate `let.blabla () = …` so much
<companion_cube>
or `let+ () = …`
<d_bot_>
<EduardoRFS> no
<d_bot_>
<EduardoRFS> Didn't knew that I had veto power, but it's nice to use it
<companion_cube>
:(
<companion_cube>
sa
<companion_cube>
d
<d_bot_>
<octachron> with `create_process` and friends?
<sadiq>
You can fork but only if you've only ever had a single Domain
<sadiq>
oh I see that's already been said earlier =)
<companion_cube>
ofc the problem is if create_process and the likes are too limitd
<companion_cube>
which, they sometime are :/
<sadiq>
how might they be too limited?
<sadiq>
(am not saying they aren't, I just don't know what the other use cases are)
<companion_cube>
well, if you want to be able to pkill the process, and redirect/read stdin/stderr/stdout, and possibly enforce a timeout, and get the exit code
<companion_cube>
I think there's not one API that does all of them
<companion_cube>
I certainly havea couple of "popen" like functions that redo create_process, but with more options, because I often need a timeout on my subprocesses
vicfred has quit [Quit: Leaving]
<sadiq>
I see
<companion_cube>
also, tbh, the closing mechanism is ugly
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube>
if it was to be done from scratch, I'd definitely go with a `Subprocess.t` type, and accessorss for pid, channels, exit status (blocking and non blocking), etc.
<companion_cube>
instead of tuples :)
<sadiq>
I think it's possible to add support for Unix.fork from multi-Domain, it's just a lot of (potentially invasive) work.
<energizer>
i'm not an ocamler but i'm trying to read a bit of ocaml code. `| Indexed of 'e * 'e index list` is that `| Indexed of (('e) * ('e index list))`?
<sadiq>
It's also going to introduce some codepaths that are rarely if ever going to get exercised.
<energizer>
in terms of how the syntactic grouping works
<companion_cube>
yes
<companion_cube>
it's a pair, the second element is a list of 'e index list
<d_bot_>
<NULL> energizer: `Indexed of ('e) * (('e) index) list`
<companion_cube>
sadiq: a real problem, of course, is that fork is indeed bad
<d_bot_>
<NULL> Not exactly a pair, it's a constructor with two arguments
<companion_cube>
what's good is fork+exec or the better APIs (?)
<energizer>
d_bot_: can you add another set of () to that so i can see where `list` goes
gravicappa has quit [Ping timeout: 256 seconds]
<d_bot_>
<NULL> Oh yeah I forgot some `Indexed of ('e) * ((('e) index) list)`
<d_bot_>
<NULL> The main thing I wanted to highlight is that having parentheses around the whole product changes stuff slightly
<d_bot_>
<NULL> Also, d_bot_ is the bridging bot
<energizer>
oh you are NULL
<d_bot_>
<NULL> Yes
<companion_cube>
the obsolete version of nullptr?
<energizer>
`(Indexed of ('e)) * ((('e) index) list)` or `Indexed of (('e) * ((('e) index) list))` ?
<d_bot_>
<NULL> companion_cube: A representation of my inspiration on creating a username
<companion_cube>
apparently you could have used some pointers for inspiration
<companion_cube>
energizer: the first 'e is not in the list.
<d_bot_>
<NULL> Think of `Indexed of ('e) * ((('e) index) list)` as `{constructor_id=INDEXED; field_1: 'e; field_2: ('e index) list}`
<d_bot_>
<NULL> If you are more familiar with C, that's pretty much what it translates to
<energizer>
ok i think i get it. thanks.
Serpent7776 has quit [Quit: leaving]
rgrinberg has joined #ocaml
sagax has quit [Ping timeout: 260 seconds]
kaph has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]