🦋 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. |
|||
00:22
arkiuat left
00:29
arkiuat joined
00:35
Sgeo joined
00:53
kjp left
00:54
kjp joined
00:55
kjp left
00:56
kjp joined
01:31
kylese left
01:32
kylese joined
01:37
kaskal left
01:47
Sgeo_ joined
01:49
Sgeo left
02:15
kylese left
02:16
kylese joined
02:18
arkiuat left
02:46
Guest93 joined
02:47
arkiuat joined
03:12
Guest93 left
03:32
vasko4 left,
vasko4 joined
03:37
Aedil joined
03:45
kylese left
03:47
kylese joined
03:49
librasteve_ left
04:55
modula joined,
defaultxr left
05:08
deoac left
07:01
Aedil left
07:29
arkiuat left
07:35
Sgeo_ left,
wayland76 joined
08:13
dakkar joined
|
|||
disbot4 | <jubilatious1_98524> @voldenet The size is a hard-sell if you're trying to get schools to try installing Raku on a RaspberryPi... . | 08:18 | |
Voldenet | different hardware, different tradeoffs | 08:24 | |
disbot4 | <jubilatious1_98524> @voldenet prove to me Rakudo loads, compiles, and runs on a RaspberryPi. If it doesn't then it's a limitation of the Raku language, not a tradeoff. | 08:30 | |
Voldenet | hmm I could actually check if it builds on some arm soc | 08:49 | |
I think that even 512 rpi would be able to run raku and that is the absolutely smallest one | 09:08 | ||
09:14
apac joined
09:25
arkiuat joined
09:29
lichtkind joined,
arkiuat left
|
|||
disbot4 | <jubilatious1_98524> @Voldenet I disagree. | 09:32 | |
<jubilatious1_98524> @voldenet I disagree. | 09:33 | ||
Voldenet | I'll actually test it on some ancient SoC in a few days and post results (I hope sd card is not dead) | 09:54 | |
09:55
arkiuat joined
10:00
arkiuat left
10:20
Aedil joined
|
|||
disbot4 | <holmdunc> I run some Python on Google Cloud Functions and the free tier offers 128MB memory 🙂 | 10:29 | |
10:30
arkiuat joined
10:35
arkiuat left
|
|||
tbrowder | m: use Test; my Bool $v = True; is $v, True; | 10:46 | |
camelia | ok 1 - | ||
10:57
arkiuat joined
11:02
arkiuat left
|
|||
disbot4 | <antononcube> BTW, Mathematica/ Wolfram Language runs on RasberryPi. | 11:03 | |
<antononcube> www.wolfram.com/raspberry-pi/ | 11:04 | ||
tbrowder | m: use Test; class Foo { has $.a = 0; method a($v?) { if $v.defined { self.a = $v } else { self.a } }}; my $o = Foo.new; $o.a: 3; is $o.a, 3; | 11:19 | |
11:20
arkiuat joined
|
|||
camelia | (timeout) | 11:20 | |
tbrowder | as expected. why doesn't rakudo give any error msg about the conflict in method and attribute names? | 11:23 | |
seems like that could be detected fairly early in the grammar | 11:24 | ||
11:25
arkiuat left
|
|||
tbrowder | on my host it just hangs till i kill the program | 11:26 | |
anyhow, i know it should be obvious, but i get sucked down that rabbit hole too often because... | 11:29 | ||
11:42
arkiuat joined
11:47
arkiuat left
|
|||
lizmat | tbrowder: the self.a calls the method a on the invocant: that's an infinite loop in your program | 11:51 | |
use Test; class Foo { has $.a = 0; method a($v?) { with $v { $!a = $_ } else { $!a } }}; my $o = Foo.new; $o.a: 3; is $o.a, | 11:52 | ||
m: use Test; class Foo { has $.a = 0; method a($v?) { with $v { $!a = $_ } else { $!a } }}; my $o = Foo.new; $o.a: 3; is $o.a, | |||
camelia | Cannot resolve caller is(Int:D); none of these signatures matches: (Mu $got, Mu:U $expected, $desc = "") (Mu $got, Mu:D $expected, $desc = "") in block <unit> at <tmp> line 1 |
||
lizmat | m: use Test; class Foo { has $.a = 0; method a($v?) { with $v { $!a = $_ } else { $!a } }}; my $o = Foo.new; $o.a: 3; is $o.a, 3 | 11:53 | |
camelia | ok 1 - | ||
lizmat | m: use Test; class Foo { has $.a = 0; multi method a($v) { $!a = $v }; multi method a() { $!a }}; my $o = Foo.new; $o.a: 3; is $o.a, 3 # better to use multis | 11:54 | |
camelia | ok 1 - | ||
12:15
arkiuat joined
12:16
kaskal joined
|
|||
SmokeMachine | tbrowder: the only way to call a attribute (called a) is with $!a… self.a and $.a calls methods… not attributes… | 12:24 | |
12:25
arkiuat left
|
|||
SmokeMachine | has $.a do not mean it’s creating an attribute $.a… but it means that it’s creating a attribute $!a and a method a… | 12:25 | |
lizmat | tbrowder: what SmokeMachine said :-) | 12:28 | |
SmokeMachine | tbrowder: So, when you do: has $.a; method a {…} its overriding the method that would be created by the declaration $.a… so when inside of method a you do self.a, it will call itself again… entering an infinite loop… | 12:33 | |
tbrowder: I just realised I may have misinterpreted your question… are you saying that the compiler should give an error when a method is overriding a method created by the attribute declaration? | 12:35 | ||
12:37
arkiuat joined
|
|||
SmokeMachine | (By overriding I mean: if I remember it well, if the class already have a method with the attribute’s name, it doesn’t even tries to create the accessor method) | 12:40 | |
(I only read that part of the code when I start developing Red… too long ago… I’m not sure anymore…) | |||
12:42
arkiuat left
12:59
arkiuat joined
13:03
arkiuat left
13:32
arkiuat joined
13:36
arkiuat left
13:56
wayland joined
13:57
wayland76 left
14:02
arkiuat joined
14:07
arkiuat left
14:20
Sgeo joined
14:25
merp left
14:26
merp joined
14:35
arkiuat joined
14:40
arkiuat left
|
|||
disbot4 | <librasteve> weekly: dev.to/melezhik/raku-sparrow6-swis...linux-2ngh | 14:54 | |
14:55
librasteve_ joined
|
|||
librasteve_ | lizmat: i wonder if we will need to include both new and old grammars for use 6.d purposes? | 14:57 | |
weekly: dev.to/melezhik/raku-sparrow6-swis...linux-2ngh | |||
notable6 | librasteve_, Noted! (weekly) | ||
librasteve_ | nota | ||
notable6 used to work from Discord … now only IRC btw | 14:58 | ||
15:01
arkiuat joined
15:06
arkiuat left
15:15
arkiuat joined
15:35
rir_ joined
15:36
lizmat left
15:37
lizmat joined
15:54
rir_ left,
rir left
16:23
apac left
16:31
arkiuat left
16:43
arkiuat joined,
dakkar left
16:47
arkiuat left
17:00
arkiuat joined
|
|||
Geth | raku.org/proto-25: e339f68751 | librasteve++ | .cro.yml add cro.yml |
17:07 | |
raku.org/proto-25: 5da55b8fb4 | librasteve++ | 3 files bring in ci |
17:14 | ||
17:18
deoac joined
|
|||
Geth | raku.org/proto-25: 1b6464104d | librasteve++ (committed using GitHub Web editor) | README.md update process, install |
17:32 | |
17:35
Guest9 joined
|
|||
arkiuat | m: my $s = 'old string'; $s ~~ tr/dol/wne/ | 17:43 | |
camelia | ( no output ) | ||
arkiuat | m: my $s = 'old string'; $s ~~ tr/dol/wne/; say $s | ||
camelia | new string | ||
arkiuat | m: my $s = 'old string'; ~($s ~~ tr/dol/wne/) | ||
camelia | WARNINGS for <tmp>: Useless use of "~" in expression "~($s ~~ tr/dol/wne/)" in sink context (line 1) |
||
arkiuat | m: my $s = 'old string'; say ~($s ~~ tr/dol/wne/) | 17:44 | |
camelia | new string | ||
17:46
LainIwakura joined
|
|||
arkiuat | m: my $s = 'old string'; say +($s ~~ tr/dol/wne) | 17:49 | |
camelia | ===SORRY!=== Error while compiling <tmp> Malformed replacement part; couldn't find final / at <tmp>:1 ------> = 'old string'; say +($s ~~ tr/dol/wne)<HERE><EOL> |
||
Geth | raku.org/proto-25: 54b674fef2 | librasteve++ (committed using GitHub Web editor) | README.md nice badge |
17:50 | |
arkiuat | m: my $s = 'old string'; say +($s ~~ tr/dol/wne/) | ||
camelia | 3 | ||
arkiuat | there's the numification to 3 | ||
sorry about all that. I'm still a novice at irssi and apparently I did something that switched windows between #raku-doc and #raku while I was trying to ask that question | |||
the question went to #raku-doc! which doesn't have Camelia. So here is the question: | 17:51 | ||
disbot4 | <librasteve> 42 | ||
arkiuat | The documentation for ~~ says "see ACCEPTS documentation for the type on the right-hand side of the operator". StrDistance doesn't have a documented ACCEPTS method, and neither does its parent Cool, and the behavior documented for the ACCEPTS method of Any (Cool's parent class) is not what I see going on here. So which ACCEPTS method is getting called by ~~ here? | ||
librasteve_ | good question | 17:53 | |
arkiuat | the thing that stringifies to 'new string' and numifies to 3 is a StrDistance object | ||
I've always found Raku's ~~ operator a little confusing, and this is one reason why! | 17:54 | ||
librasteve_ | i guess(!) that `~~ tr/a/b/` is a syntax sugar for trans(a,b) | 17:57 | |
docs.raku.org/routine/trans#(Str)_method_trans | |||
17:59
melezhik joined
|
|||
librasteve_ | not quite sure how to ground that out (hopes people with “actual knowledge” will chime in) | 17:59 | |
arkiuat | thanks, that's helpful. So I guess in this case, it's class Code's ACCEPTS method that is getting called, which makes sense | ||
18:00
Guest9 left
|
|||
melezhik | after some recent feedback I decided to update sparrowhub.io - so to make it official Sparrow project web site, de-facto it was, I just now am making this clear, comments, feedback are welcome, thanks. It's WIP | 18:00 | |
librasteve_ | cool! | 18:01 | |
arkiuat | the doco for ACCEPT in class Code says that ACCEPTS (and therefore ~~) just returns the result of the called code | ||
18:05
melezhik left
18:06
melezhik joined
|
|||
librasteve_ | please can you post the code (snippet) that makes a StrDistance | 18:07 | |
oh sorry - just found it - my guess #1 wrong, please ignore | 18:09 | ||
docs.raku.org/language/operators#t...literation | 18:10 | ||
arkiuat | right, that's the page whence I copied out the snippets I started with | 18:11 | |
librasteve_ | lol | 18:12 | |
arkiuat | I still think you led me in the right direction though, and that it is the ACCEPTS method from class Code that is getting called here | ||
melezhik++ | |||
18:24
melezhik left
|
|||
tbrowder | ah, duh, a multi, thnx | 18:32 | |
librasteve_ | weekly: I decided to update sparrowhub.io/ | 18:40 | |
notable6 | librasteve_, Noted! (weekly) | ||
disbot4 | <librasteve> htmx.org/examples/infinite-scroll/ would be cool for sparrowhub.io/search?q=all (my feedback) | 18:41 | |
18:48
LainIwakura left
|
|||
disbot4 | <librasteve> another feedback is that you can now employ github.com/librasteve/Hilite to do your raku code highlighting | 18:52 | |
<librasteve> (I am impressed with your current highlighting btw - just trying to herd that together with Hilite) | 18:53 | ||
18:56
LainIwakura joined
|
|||
tbrowder | SmokeMachine: hm, yes that was my original question | 19:01 | |
SmokeMachine | tbrowder: sory for the unneeded explanation then... :( | 19:02 | |
tbrowder | no, that's all good info, thnx | 19:04 | |
19:12
human_blip left
19:16
human_blip joined,
LainIwakura left
19:19
apogee_ntv left
19:20
Guest96 joined
19:21
Guest96 left
19:26
LainIwakura joined
|
|||
lizmat | weekly: raku.land/zef:l10n/L10N::ZH | 20:50 | |
notable6 | lizmat, Noted! (weekly) | ||
21:04
apac joined
21:41
human_blip left
21:43
human_blip joined
21:50
apogee_ntv joined
21:59
apac left
22:01
LainIwakura left
22:29
deoac left
22:42
arkiuat left
22:50
lichtkind left
22:55
arkiuat joined
22:59
arkiuat left
23:00
LainIwakura joined
23:05
librasteve_ left
23:28
arkiuat joined
23:33
arkiuat left
|
|||
wayland | .tell melezhik Thanks for the Sparrow website. I've updated my Pathways of Entry article to link to it. | 23:46 | |
tellable6 | wayland, I'll pass your message to melezhik | ||
wayland | .tell melezhik What your page is missing is an explanation of why one would want to use Sparrow rather than eg. running commands in bash ( sparrowhub.io/examples would be shorter as a bash command). Does it run on multiple servers? Is it so that you can ensure state on them? You may be having the same problem as Raku: too many features highlight none. But your website should start with a list of the use cases. HTH, | 23:51 | |
tellable6 | wayland, I'll pass your message to melezhik |