🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
Nemokosch is it possible to make a parameter of an infix operator nodal? 10:14
lizmat what would that mean? 10:26
Nemokosch that the hyper operator doesn't recurse upon encountering it?
lizmat afaik, nodality is only checked on code objvects? 10:36
*objects
Nemokosch :\ 10:50
lizmat well, there's nothing magic about "is nodal" 11:01
it's just a marker, and afaik, it is only being checked on code objets 11:02
Nemokosch it would be better to "only" check it on parameters (including self) 11:04
and that's also where it logically belongs - to the data, not to the behavior
Anton Antonov Has anyone here submitted FOSDEM 2023 talk proposal? Is the deadline for all dev rooms December 10th, 2022? 14:24
El_Che fosdem.org/2023/news/2022-11-13-ca...entations/ 14:43
tellable6 2022-12-04T20:52:42Z #raku-dev <jdv> El_Che 2022.12 rakudo release done.
El_Che deadlines of devrooms are set by the devroom orgs 14:44
global is:
Submissions will be reviewed as they are received on an ongoing basis. The final deadline is 15th December but some tracks may close earlier if they fill up or the respective call for papers specifies an earlier date.
Anton Antonov @El_Che Thanks -- good to know! 15:12
@El_Che The dev rooms I was looking at had December 10th as a deadline. 15:40
El_Che which want do you target? 15:53
japhb .tell Nemokosch $*IN.lines tries to empty stdin all the way to EOF. So you're starving the REPL. 16:03
tellable6 japhb, I'll pass your message to Nemokosch
Nemokosch can the REPL not use something else instead of $*IN? Is there no other interface to a terminal? 16:05
melezhik o/ 16:05
when rakudo 2022.12 binaries will be available on rakudo.org/downloads/rakudo ? 16:06
I am looking for rakudo-moar-2022.12-01-linux-x86_64-gcc.tar.gz 16:07
jdv iirc it typically takes a few days, no? 16:08
El_Che is it out? 16:09
jdv what is it?
is that a lyric?...
El_Che rakudo 2022.12 16:20
jdv the release happened yday 16:21
japhb Nemokosch: I'm not sure why you want this, but I'm guessing what you really need is to point $*IN somewhere else. If you redirect the input for the REPL itself, you violate the definition of stdin. Which, I mean, you could do, but why? 16:24
tellable6 japhb, I'll pass your message to Nemokosch
El_Che jdv: ok, I will create pkgs 16:25
thx
jdv i msgd you:)
El_Che really? 16:26
nothing to see here
... did I react?
maybe I updated the server and lost the message
jdv 43:49 < tellable6> 2022-12-04T20:52:42Z #raku-dev <jdv> El_Che 2022.12 rakudo release done.
^
is there a better way? 16:27
Nemokosch japhb: because I want to test a script line by line? 16:57
In shell, one can do this redirection, what about in the REPL 16:58
I think it makes perfect sense for the REPL to *not* consider the command to run "input" in the same sense as the stdin of a script 17:00
after all, if you actually run a script, the lines of the script themselves aren't the stdin within the script 17:01
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/12/05/2022-...mas-again/ 17:02
jdv lizmat: thanks!
Nemokosch it really seems more of a technical fun fact that the REPL uses the very same stdin - but could it not be done differently? 17:03
japhb If you run a script, the lines of the script are coming from a file. Thus, not stdin. It sounds like you need a debugger, not the REPL. Command-line and IDE debuggers exist for Raku. 17:09
How would you expect to test the REPL itself, if you could not just feed it input? 17:10
(And yes, the REPL probably could use a different input than $*IN with some extra work, but I don't know if it would be able to do so portably and without gotchas.) 17:11
Nemokosch to be honest, since the REPL is inherently an interactive thing, I wouldn't feel it's a huge loss if that cannot be tested automatically 17:16
anyway, it's fine if this is worth doing but I think it would be a legitimate and meaningful feature 17:18
anyway, it's fine if thisn't/ is worth doing but I think it would be a legitimate and meaningful feature
*discord being too clever with the s/ substitutions 🕵️ * 17:19
the same way it's not worth for me to mangle with debuggers if all I wanted was interactive code execution on lines of code that will form a little standalone script 17:21
eventually I ran it with raku -e probably
japhb It occurs to me that what might work best for you (assuming you don't want to learn a debugger, which I highly recommend you do, since it's a really nice tool in one's toolbox), is to reopen $*IN yourself, pointing to whatever test inputs you want. 17:31
baughb I want to read (and process) a file line-by-line, until I find an empty line, and then continue reading (and processing in a different way) line-by-line until the end. My idea was to bind `.IO.lines` with something like `my \lines = 'file'.IO.lines` and then run two for loops over it, but then I get the "The iterator of this Seq is already in 17:37
use/consumed" error. Is there some other way to do this lazily, without caching the file?
japhb baughb: Use a single loop, but have a mode flag that you set when you see the blank line, and that determines how you process each line? 17:39
You could also use a couple loops and the flip-flop operator on the first one, I suppose.
baughb ya, seems like a easy solution, but it's pretty ugly - all of the logic would be in a giant if/else 17:40
japhb baughb: `my $blank-seen; for lines() { $blank-seen ?? do-foo($_) !! do-bar($_); $blank-seen++ if /^ \s* $/; }` and then just define do-foo and do-bar? 17:44
baughb ya, I guess that's what I'll do.... I was hoping there'd be some way to keep the state of the iterator between loops 17:46
japhb baughb: I mean, you could store the iterator in a variable, and then read from that variable line-by-line, rather than all the way through, so that it is still not completely consumed at the end of the first loop. 17:51
Nemokosch sounds like this is another case of "split on value" 17:55
El_Che jdv: good question. Building atm 18:07
jdv i have nothing but questionable questions but ok! 18:14
El_Che I may anwerable answers? 18:24
jdv yes 18:25
El_Che only one falling test in first run, profile on ubuntu 20.04 18:29
nice
jdv :( 18:32
i got todos but no fails 18:33
El_Che we use to have lots op flippers
1 out of 25 builds is good
and it did not fail on the next run 18:34
jdv ha. actually even since i started there have been less flaps...
El_Che causation, correlation, potato, potahto
jdv no doubt the results of a lot of work. thanks y'all!
"progress":) 18:35
El_Che okm now I had 3 :) 18:54
t/09-moar/01-profilers.t (3x), t/04-nativecall/21-callback-other-thread.t (1x) 18:55
El_Che weekly: rakudo-pkg releases for 2022.12 + added packages for newly released alpine 3.17 21:05
notable6 El_Che, Noted! (weekly)