🦋 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.
melezhik @ugexe - available from rakudo.org ? 05:46
Don't see anything here for arm - rakudo.org/downloads/rakudo 05:48
nemokosch What about rakubrew? 06:18
melezhik Nemokosch: nope according this error - ci.sparrowhub.io/report/3622 06:49
nemokosch Tough luck. Well, rakudo-pkg? That's the last option known to me 06:50
melezhik I guess rakubrew relies on distros from rakudo.org which does not provide builds for ARM
rakudo-pkg does not work either , at least afik 06:51
melezhik This is why I have to bake it myself into SparrowCI workers , e.g - github.com/melezhik/SparrowCI/blob...ne.arm#L21 06:52
Like I said in the post - "So, meanwhile, one can test against a default (compiled from source) Rakudo version which is 2023.08" 06:53
So, at least SparrowCI users have this version to test against ) 06:54
When arm builds are available I will be happy to support them in SparrowCI 06:55
I mean arm Rakudo builds from official Rakudo.org repo
wayland76 Hi! I'd like to create a Supply that will be a file, then have various things tap the Supply, then actually trigger the opening of the file. I tried gist.github.com/wayland/a677bb7e3a...076648be69 and it prints out some raku objects between t1 and t2. What I wanted wazsz for it to print out the contents of the file before (or after) t3. 07:22
Anyone have any thoughts?
Or is the only way to do it to create a Supply on a Supplier, have things tap that, then open the file and feed it to the Supplier.emit function? 07:23
ab5tract I didn't realize you could call .Supply on a file. It would make sense for it to "trigger" on open, but it doesn't seem to be implemented that way 09:34
I think the solution is as you described though. 09:36
coleman More list surprises (to me) 16:57
m: my @x = ("three"); <<one two>>.append(@x);
camelia Cannot call 'append' on an immutable 'List'
in block <unit> at <tmp> line 1
coleman m: my @x = ("three"); my @y = <<one two>>; @y.append(@x); 16:58
camelia ( no output )
coleman I guess I'm just expecting the << >> construct to be an expression that yields the same thing in both positions. 16:59
However, I am still unclear on how all the coercions work, and what's immutable.
lizmat m: my @x = ("three"); my @y = <<one two>>; dd @y; @y.append(@x); dd @y 17:00
camelia Array @y = ["one", "two"]
Array @y = ["one", "two", "three"]
lizmat append and push have different semantics 17:01
m: my @x = ("three"); my @y = <<one two>>; dd @y; @y.push(@x); dd @y
camelia Array @y = ["one", "two"]
Array @y = ["one", "two", ["three"]]
lizmat is that what you're being bitten by ?
coleman I want to use append a lot, because I am concatenating command line flags from lists of strings. 17:03
And assigning to an intermediate @y, like you show here, always works 17:04
but I often try to type something like this:
<<base command>>.append(@flags); 17:05
and <<base command>> is immutable
usually it's in a sub like: sub wrap-some-command(@flags) { @x = <some command>.append(@flags) } 17:07
lizmat (@x = <some command>).append(@flags)
should work then
but I guess the case for allowing List.append returning another List, is interesting... 17:08
nemokosch yeah well, Lists and append don't work well 17:50
I don't think that creating List.append with different semantics would be a good idea, either
lizmat what different semantics? 17:54
<a b c>.append(<d e f>) would return <a b c d e f> 17:55
nemokosch instead of mutation? 18:05
lizmat yes 18:11
I think in functional programming its pretty normal to have an operation on an immutable structure return another immutable structure 18:12
*it's
nemokosch I don't think it's a good idea to create an umbrella interface that sometimes mutates and sometimes doesn't mutate 18:13
in that case, all the mutation should rather go
gfldex lizmat: IMHO .append ist just find and so is &infix:<~>. `flat(<a b c>, @b)` is not to my liking. Maybe it is time to add &infix:<|,> to CORE and give it some proper optimisations treatment. 18:25
lizmat aka <a b c> |, <d e f> would give <a b c d e f> ?
gfldex In subscripts Raku is explicit by using SemiList to indicate LoL. Anywhere else, we don't do that.
aye
lizmat hmmmm 18:26
please make an issue for it in problem-solving, so the idea won't fall through the cracks 18:27
gfldex will do
coleman Thank you all for taking the time to interpret my vague complaints about lists over the past couple of days 18:48
nemokosch I ended up defining &infix:<|,> a couple of times for myself, too 19:01