🦋 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 hello github.com/Raku/atom-language-perl6 does anybody know about the fate of this package? 08:51
We know about the fate of Atom itself, however the new docs site seems to use this for syntax highlight
El_Che I think VSC ate atoms lunch (both being own by MS) 09:15
Nemokosch Yes, I know... but as I said, the docs site uses it for syntax highlighting, and I don't see a quick replacement 09:18
so it's a kinda unrelated use to Atom itself
(I do think Atom was a disappointing editor that got rightfully blown away by VSC if that matters lol)
tonyo wasn't atom pretty lightweight ? 13:43
nine Atom is Chromium + nodejs. How could that ever be lightweight? 14:05
Nemokosch Atom was powerless, not the same as lightweight 14:22
VSC, the bad parts
guifa I still can't believe my number formatter code is 100ish lines. Debating between speed and elegance for properly handling negative numbers and...... sadly going to probably have to go with speed :-( 14:48
tonyo nine: seems more lightweight than VSC, but i haven't used an IDE in 15+ years now so what do i know 15:27
Nemokosch Anyway... does anyone know anything about the state of that package? 17:03
drakonis syndicate-lang.org/ this is an interesting concurrency model 17:11
osmano807 Anyone has instability problems with Comma IDE? Suddenly, Grammar Preview fails to compile grammar 17:56
lizmat_ did you upgrade Comma or Rakudo ? 18:08
osmano807 No version changes, but the grammar grew bigger and produces correct output on executable run 18:12
lizmat_ hmmm did you change anything in the grammar ? 18:14
osmano807 added some proto rules 18:15
lizmat_ I suggest taking them out and then adding them in again one by one and report the one that is causing issue 18:18
s
Nemokosch Interesting behavior spotted 20:50
Nemokosch m: sub demo(@ is rw) { say 'Yee-haw'; }; demo; 20:52
camelia Too few positionals passed; expected 1 argument but got 0
in sub demo at <tmp> line 1
in block <unit> at <tmp> line 1
Nemokosch okay, so far so good
perryprog Yee-haw 20:53
Nemokosch (not quite - because the demo function should have generated a message)
sub demo(@ is rw) { say 'Yee-haw'; }; demo (1, 2, 3);
m: sub demo(@ is rw) { say 'Yee-haw'; }; demo (1, 2, 3);
camelia Parameter '<anon>' expects a writable container (variable) as an
argument, but got '(1 2 3)' (List) as a value without a container.
in sub demo at <tmp> line 1
in block <unit> at <tmp> line 1
Nemokosch now it's getting interesting - it performed a reasonable check that it would refuse usually
m: sub demo(@ is rw) { say 'Yee-haw'; }; demo [1, 2, 3]; 20:54
camelia Parameter '<anon>' expects a writable container (variable) as an
argument, but got '[1 2 3]' (Array) as a value without a container.
in sub demo at <tmp> line 1
in block <unit> at <tmp> line 1
Nemokosch okay - this is the first lie
m: my @demo = 1, 2, 3; sub demo(@ is rw) { say 'Yee-haw'; }; demo @demo; 20:55
camelia Parameter '<anon>' expects a writable container (variable) as an
argument, but got '[1 2 3]' (Array) as a value without a container.
in sub demo at <tmp> line 1
in block <unit> at <tmp> line 1
Nemokosch serious lies going on
what happens if I name the variable? let's find out...
m: my @demo = 1, 2, 3; sub demo(@p is rw) { say 'Yee-haw'; }; demo @demo;
camelia ===SORRY!=== Error while compiling <tmp>
For parameter '@p', '@' sigil containers don't need 'is rw' to be writable
Can only use 'is rw' on a scalar ('$' sigil) parameter, not '@p'
at <tmp>:1
Nemokosch suddenly it complains about the sigil! 20:56
something seems broken here...
am I correctly assuming this is a bug?
guifa "...but got '[1 2 3]' (Array) as a value without a container" — this is accurate, though. You could not, for instance, bind to that array because the array is a literal/constant (although its values are not) 22:07
I think you have stumbled on something though
which is where Raku is trying to do some things intuitively / ugard for stuff, but maybe could use some better guidance (also, frankly, I've never felt that is rw should be seen as a warning for @ and %, not an error) 22:08
Nemokosch @demo was not "a value without a container" 22:11
actually, not even `[1, 2, 3]` was, in my opinion. `[1, 2, 3].VAR.WHAT` returns (Array), can't even unwrap it
this terminology (along with `is rw`) pretends the only container is the Scalar container 22:15
anyway - I don't think the behavior should suddenly change when you give the parameter a name?