🦋 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.
tbrowder__ [Coke]: we now have a mac on my network. is there an irc channel for mac users? 12:26
tbrowder__ [Coke]: re looping csv: i often just use .lines and then process the resulting array 14:07
use lazy method if need be 14:08
mebbe the gc thing is the problem 14:15
librasteve o/ 14:44
does anyone have thoughts about best way to webscrape with raku ... perhaps Selenium::WebDriver? (which seems to need a bit of tlc to work on macos btw) 14:46
Geth advent/main: 80a38dba51 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2023/authors.md
Remove blog post by pheix, they appear to be AWOL
15:01
Geth advent: vushu++ created pull request #110:
Update authors.md
15:19
Geth advent/main: 80ea391e04 | (Dan Vu)++ (committed using GitHub Web editor) | raku-advent-2023/authors.md
Update authors.md (#110)
15:37
[Coke] tbrowder__: not sure on mac irc, but can ping here, a few of us have macs 15:51
tbrowder__ ok, thnx, here goes: i would like to be able to ssh into the mac from my linux box. is that doable? if so, can it be done even though the mac file system is encrypted as it wants to be? would hard wired access work if wireless wouldn’t? 15:58
lizmat on the Mac, look into Settings / Sharing 15:59
and switch Remote Login on 16:00
tbrowder__ thnx!
any mac user have a book to recommend for new users? 16:02
lizmat has been using Macs since the mid 80's, so.... 16:03
tbrowder__ of course, you wrote the book, i wish 16:04
for
ab5tract tbrowder__: there are some good ones from Big Nerd Ranch, IIRC, one second 18:00
roguerakudev Is the "no type constraints on an our-scoped variable" a compiler limitation or an intentional rule? 18:02
ab5tract roguerakudev: good question. 18:05
I can only imagine that it's a limitation with some roadblock in the way, but I'd have to double check the design docs to be sure 18:07
tbrowder__: All the best books about Mac I know come from the Mac OS X era 18:08
tbrowder__ are they still valid at all? 18:10
ab5tract roguerakudev: that said, it could be a somewhat unloved corner because our scoped variables are actually pretty uncommon in Raku code. things just don't tend to get modelled that way when you have easy access to singletons.
tbrowder__: I don't know, but as I understand it there's plenty in macOS that works the same way it did in NeXTSTEP 18:11
unfortunately some of the best also seem to be very expensive. However, there is one gem that seems to be way underpriced. check Amazon for Mac OS X Power Tools 18:13
tbrowder__ i use our scoped vars for export from installed modules maybe i need some best practice rec
roguerakudev Another fun little one - I want to have access to a dynamic variable inside a trait_mod:<is>(Sub $sub, ...) routine
the obvious approach of defining it before defining the sub which is my trait doesn't work, I'm guessing because of the other things happen during compile time 18:14
throwing a BEGIN on the definition, i.e. BEGIN my $*PLUGIN = '03-handler-definition'; yields An exception X::Dynamic::NotFound occurred while evaluating a BEGIN: Dynamic variable $*PLUGIN not found
antononcube Hmmm.... I vaguely remember seing the ''Big Nerd Ranch" before.... 18:15
roguerakudev the order* things happen during compile time, sorry
nemokosch I wonder if dynamic variables are even supported at compile time, in the HLL 18:16
ab5tract roguerakudev: does assigning it as a default value in the sub signature work? 18:16
m: sub foo($f = $*F) { $f }; my $*F = "bar"; dd foo
camelia "bar"
roguerakudev Oh, interesting... nice workaround, but I'm designing a plugin API here so I wouldn't want to ask users to do that 18:19
I wonder if there's a way I could wrap that in an interface or make it nice to use
Oh well, this dynamic variable isn't absolutely essential
ab5tract That's how it's done in the grammar/actions guts, just for reference
(the example I shared) 18:20
roguerakudev Maybe Raku AST and macros will smooth things over :P
nemokosch btw I don't think sub foo is exactly like traits 18:22
traits are evaluated during compilation, right?
ab5tract yeah, fair point. 18:23
ab5tract roguerakudev: you can always pass named arguments to the trait if you want configurability 18:25
ab5tract hard to say whether that helps you or not, not knowing the code but thought it was worth pointing out 18:26
roguerakudev Yeah, I have some other things which will also use the dynamic variable, so I was hoping to have consistency there, but I have another way in mind to design this that will work just fine 18:28
ab5tract sweet 18:30
roguerakudev also found a way around the our scoping issue :^) 18:36
just my-scope with the constraints (and hash shaping, which is also not allowed), then bind our-scoped hashes to those
it does mean it then thinks the keys are strings, which they aren't since I'm using objects keys (specifically my type with :U) 18:37
but it works, minus the complaining about using an uninitialized object in string context, which I can fix by using .WHICH on the type object in the lookup 18:38
e.g. %Foo::hash{Subtype.WHICH} 18:39
ab5tract ah, nice trick! 18:43
I wonder if you could wrap that in a class and do that internally in an AT-KEY method 18:44
not easily, if you are attached to the `%` sigil.. 18:45
tonyo . 19:41
roguerakudev I am rather attached to the sigil :^) 20:33
I like my sigils
guifa rogueraakudev: you can export dynamic variables 20:51
tonyo lizmat: what's the right way to go about submitting a grant request these days? 23:48
lizmat truly, I wouldn't know 100% for sure: I don't think it has really changed though 23:49
tonyo i have one regarding ecosystem code. do i need RSC approval before submitting to TPF? that's what it was last time i submitted
err, i submitted to tpf directly last time
lizmat I think it's: 1. submit to TPRF, TPRF then asks RSC if it's valid (because there are very few people with Raku knowledge on the Grant Committee 23:51
but [Coke] has been sitting closer to the fire than me, so he may have better innfo
tonyo ty lizmat 23:59