🦋 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:00
reportable6 left,
kjp left,
kjp joined
00:01
reportable6 joined
00:06
jpn joined
00:08
leah2 left
00:12
jpn left
00:13
guifa_ left
00:23
jpn joined
00:27
leah2 joined
00:28
jpn left
00:56
jpn joined
01:03
jpn left
01:07
NemokoschKiwi left
01:15
jpn joined
01:24
jpn left
01:26
razetime joined
01:30
jpn joined
01:35
jpn left
01:47
jpn joined
02:18
jpn left
02:32
jpn joined
02:38
jpn left
02:43
rf left
02:49
jpn joined
02:57
Homer_Simpson joined
|
|||
Homer_Simpson | . | 02:57 | |
tellable6 | 2023-01-01T13:57:13Z #raku <guifa> Homer_Simpson: guifa is a human, tellable is a bot. When you log off I can send a message prefixed to you, and tellable will tell you about it when you get back on | ||
Homer_Simpson | oh | ||
so how do I use an allomorph | 02:58 | ||
to allow ascii math and character indexing | |||
jaguart | ignoring Allomorph for the moment - give an input/result example of ascii-math and also one for character-indexing | 03:01 | |
Homer_Simpson | ok, lets say that I did my $str = "pass"; I want to be able to for example make it "past" | 03:11 | |
its just where you can perform operations on single characters, comparisons, assignments, and bitwise operators | |||
= < > <= >= != == && || etc, + - / * % ++ -- , etc >> << & | ~ etc | 03:14 | ||
jaguart | so something like "pass".at(3,:add(2)) ===> "pasu" | ||
Homer_Simpson | yes | ||
jaguart | so something like "pass".at(3,{$_+2}) ===> "pasu" | 03:15 | |
Homer_Simpson | yesterday we tried making an infix sub called `` which is really an operator but it didnt work | ||
the ide was to combine it with '' and "" but it didnt work | 03:16 | ||
you would still have \0 if you just did my $fakechar = '`c`'; or my $fakechar = `'c'`; | 03:17 | ||
but you would at least be able to trim it out becuase you can index to it | |||
so you shoudnt need a character type therefore | 03:18 | ||
what is the data type of $_ | 03:19 | ||
if you try and pass a string to a character it will fail | |||
or a float or an int (unless its maybe UInt8) | |||
03:23
Kaiepi left
|
|||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 3, {.succ} ); | 03:27 | |
camelia | past | ||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 3, {.pred} ); | ||
camelia | pasr | ||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 3, {.ord} ); | ||
camelia | pas115 | ||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 3, {.uc} ); | 03:28 | |
camelia | pasS | ||
03:29
jpn left
|
|||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 3, {.uc x 10} ); | 03:29 | |
camelia | pasSSSSSSSSSS | ||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; say "pass".&x( 2, {'bah'} ); | 03:30 | |
camelia | pabahs | ||
Homer_Simpson | yes but I did not mean just modifyinh string literals | 03:31 | |
I meant puttting it into a variable | |||
my $str = "pass"; | |||
ill try making one and passing it to that function | |||
jaguart | m: sub x ($s, $i, &y ) { $s.substr(0,$i) ~ y($s.comb[$i]) ~ $s.substr($i+1) }; my $a="pass";say $a.&x( 3, {.succ} ); | 03:32 | |
camelia | past | ||
Homer_Simpson | btw this was the old idea : sub circumfix:<``> (Str() $foo) {comb($foo);}; my @a = `'abc'`; say @a; | ||
err wait sub circumfix:<```> (Str() $foo) {comb($foo);}; my @a = `'abc'`; say @a; | 03:33 | ||
sub circumfix:<```> (Str() $foo) {comb($foo);}; my @a = ``'abc'``; say @a; | |||
ok this works thx | 03:40 | ||
03:42
jpn joined
03:48
jpn left
03:55
Kaiepi joined
03:59
jpn joined
|
|||
jaguart | I would switch from index to range | 04:05 | |
m: sub x ($s, $r, &y ) { $s.substr(0,$r.min) ~ y($s.comb[$r.bounds]) ~ $s.substr($r.max+1) }; my $a="passion";say $a, ' => ', $a.&x( 2..3, {.map(*.succ).join} ); | |||
camelia | passion => pattion | ||
jaguart | m: sub x ($s, $r, &y ) { $s.substr(0,$r.min) ~ y($s.comb[$r.bounds]) ~ $s.substr($r.max+1) }; my $a="passion";say $a, ' => ', $a.&x( 2..3, {.map(*.pred).join} ); | ||
camelia | passion => parrion | ||
jaguart | etc. | ||
04:17
jpn left
04:28
jpn joined
04:32
jpn left
04:44
jpn joined
04:50
jpn left,
vrurg_ joined
04:53
vrurg left
05:00
razetime left
05:01
jpn joined
05:03
razetime joined
05:23
jpn left
05:34
jpn joined
05:40
jpn left
05:51
jpn joined
05:55
razetime left,
razetime joined
05:56
jpn left
06:00
reportable6 left
06:02
reportable6 joined
06:40
jpn joined
|
|||
Homer_Simpson | 06:44 | ||
06:47
razetime left
|
|||
jaguart | sudo -i | 06:51 | |
jaguart hates window focus swaps | |||
Voldenet | sudo rm -rf –no-preserve-root / | 07:03 | |
oops, wrong window~ | |||
07:05
jpn left
07:16
Kaiepi left
07:36
jpn joined
07:41
jpn left
|
|||
jaguart | running test: raku -Ilib,. t/20-basic.rakutest - wanting to `use t::Utils` in my test, but not being found - what am I doing wrong? | 07:54 | |
the module path in the error message includes `.`, and ./t/Utils.rakumod is there ?? | 07:56 | ||
08:03
sena_kun joined
08:08
jpn joined
|
|||
Nahita | cannot reproduce <paste.debian.net/1265918/> | 08:09 | |
08:13
jpn left
08:25
jpn joined
08:33
Manifest0 left
|
|||
jaguart | it's because of the ./META6.json :( | 08:59 | |
if I mv META6.json .. it works, grrr | |||
can I get raku to ignore the META6.json? | 09:01 | ||
09:02
Homer_Simpson left
09:16
razetime joined
09:24
sena_kun left
09:25
sena_kun joined
09:28
synthmeat left,
synthmeat joined
09:31
epony left
|
|||
jaguart | same with prove6 - :( | 09:33 | |
09:50
Sgeo left
09:55
sena_kun left
|
|||
CIAvash | I suggest sticking with raku -I.. In your test file you can either use use lib 't' or use lib 't/lib' or something like use lib $?FILE.IO.parent. | 10:05 | |
10:46
jpn left
11:13
squashable6 left
11:15
squashable6 joined,
Kaiepi joined
11:22
sena_kun joined
12:00
reportable6 left,
reportable6 joined
12:44
atroxaper joined
|
|||
atroxaper | Hello, #raku! Happy New Year! Do you know Raku analogue of C#/Java WeakReference system? The system allows to have a reference to an object, but do not prevents of GC work on it. | 12:47 | |
Voldenet | hello and happy new year | 12:57 | |
Unfortunately there's no weakrefs | 13:01 | ||
13:11
razetime left,
razetime joined
13:12
Kaiepi left
13:15
Kaiepi joined
13:27
razetime left
|
|||
Voldenet | you can sort of cheat and implement weakrefs | 13:30 | |
by having `role WeakRefHandle { submethod DESTROY { … }}` that you'd append by `$object but WeakRefHandle($object)` to track when the instance is removed and hash with .WHICH -> instance mappings | 13:33 | ||
it's more or less how this works everywhere - you keep places to set to null and set them after instance destruction | 13:34 | ||
I'm not entirely sure if that would work well, because the instance could outlive the weakrefhandle | 13:35 | ||
Nemokosch | is DESTROY actually a specified thing? | 13:49 | |
lizmat | yes | ||
13:49
sena_kun left
|
|||
Nemokosch | oh I see now, it does appear in Roast some way... | 13:51 | |
Voldenet | m: my %a; class R { has $.p; method i { %a{$.p} } }; role H { has $.p; submethod DESTROY { %a{$!p}:delete; $!p = Nil; } }; sub add-weakref { %a{$^x.WHICH} = $^x; $^x but H($^x.WHICH); R.new(p => $^x.WHICH); }; use nqp; my @r; for ^100 { @r.push: add-weakref(class { has $.i = now; submethod DESTROY {} }.new); }; say @r[0].i; for ^1000 { nqp::force_gc() }; say @r[0].i; | 13:55 | |
camelia | <anon|1>.new(i => Instant.from-posix(1672667704.239260643)) (Any) |
||
Voldenet | as you can see, `say @r[0].i;` returns some instance and after a few gc rounds `say @r[0].i;` returns instance no more, so it sort of works | ||
it feels like a horrible code though | |||
i'm betting that `for ^1000 { nqp::force_gc(); }` is pointless but it feels stronger | 13:57 | ||
lizmat | and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/01/02/2023-...ming-away/ | ||
Nemokosch | lizmat: is it possible that the IRC logs on the website can't go past 2022.12.31? | 14:03 | |
14:07
atroxaper left
|
|||
lizmat | Nemokosch: thanks for the headsup... looks like a restart fixed it :-) | 14:08 | |
tellable6 | lizmat, I'll pass your message to Nemokosch | ||
14:25
vrurg_ is now known as vrurg
14:35
sena_kun joined
|
|||
Anton Antonov | <@297037173541175296> This is what I am doing right now -- getting all IRC messages from 2022. | 14:54 | |
15:35
linkable6 left,
evalable6 left
15:36
linkable6 joined,
evalable6 joined
15:39
ab5tract joined
15:45
razetime joined,
guifa_ joined
15:46
guifa left
15:51
ab5tract left
15:52
ab5tract joined
16:11
ab5tract left
16:29
razetime left
16:33
ab5tract joined
16:35
razetime joined
16:39
abraxxa-home joined
16:45
epony joined
16:46
jgaz joined
17:02
simcop2387 left
17:04
perlbot left,
simcop2387 joined
17:05
perlbot joined
17:25
razetime left
17:37
jgaz left
17:51
perlbot left,
simcop2387 left
17:52
Kaiepi left
18:00
reportable6 left
18:02
reportable6 joined
18:10
Homer_Simpson joined
18:32
sena_kun left
18:33
sena_kun joined
18:36
Kaiepi joined
19:15
derpydoo joined
19:38
jpn joined
19:59
simcop2387 joined
20:00
perlbot joined
20:08
jpn left
20:18
Sgeo joined
20:22
jpn joined
20:30
Homer_Simpson left
20:35
leah2 left
20:50
leah2 joined
20:59
jpn left
21:06
derpydoo left
21:10
Kaiepi left
21:24
jpn joined
21:29
jpn left
|
|||
jdv | fwiw iirc mr matt t and mr john s (dbic,ro | 21:30 | |
21:31
jpn joined
|
|||
jdv | rdbo) both basically said "youthful indiscretion" | 21:31 | |
in terms of why they built an orm | 21:32 | ||
Voldenet: ^ | |||
lizmat | yeah... my last ORM was never officially released | ||
jdv | SmokeMachine: ^ | ||
yeah... | 21:33 | ||
lizmat | although was able to make a lot of money with Class::DBI through Booking.com | ||
so, if you want to be agile and have a lot of people work on your code, an ORM might be a (temporary) solution | 21:34 | ||
jdv | at the times i was into orms and kinda defeated and asked each out of curiosity. | ||
lizmat | mind you: my last ORM has been in production for 15+ years :-) | ||
jdv | ha | ||
lizmat | it has a very fancy name: YADAL | ||
jdv | its been 10y+ since i used dbic or rdbo | ||
lizmat | Yet Another Database Abstraction Layer | 21:35 | |
jdv | ha | ||
lizmat | I'm so glad I never released it... :) | ||
jdv | nice | ||
lizmat | although I think one of the basic premises in it, would still be valid for a lot of small to medium-size projects | 21:36 | |
21:36
Xliff joined
|
|||
jdv | lore is cdbi waa created at a co in ny a colleauge of mine owned. | 21:36 | |
21:36
jpn left
|
|||
jdv | the author was the test more guy right? | 21:36 | |
lizmat | schwern you mean? | 21:37 | |
jdv | cant remember hus name. can see hus face. | ||
yes | |||
lizmat | going afk, catch you all later& | ||
jdv | kinda similar to peeps thunjnhg rolsky created mason but if was swart, | 21:38 | |
later liz | |||
*swartz | |||
21:38
NemokoschKiwi joined
|
|||
NemokoschKiwi | by the way, discord messages don't show up here | 21:38 | |
not sure which but would do that but the bridge is one-way at the moment | 21:39 | ||
jdv | is that important? this is irc. | ||
NemokoschKiwi | this irc is bridged to the #raku-irc channel of the discord server | ||
jdv | cool | 21:40 | |
NemokoschKiwi | Sorry if I wasn't clear enough, this was an issue report. | ||
This is something that normally works but clearly doesn't work for a couple of hours now | 21:41 | ||
jdv | whos fault is it? | 21:43 | |
NemokoschKiwi | now that's where it would be good to know who runs what | 21:44 | |
jdv | alexdaniel? | 21:46 | |
NemokoschKiwi | alexdaniel is virtually gone for years now | 21:47 | |
jdv | he did a lot | ||
NemokoschKiwi | that's right... | ||
jdv | the *able stuff he still does | ||
and blin is dep on that so he still is "involved" in releases. | 21:48 | ||
21:48
Kaiepi joined
|
|||
jdv | so did zoffix. he was cool. | 21:48 | |
so did timtoady. he was cool:) | |||
21:48
jaguart left
|
|||
NemokoschKiwi | well, whenever he feels like doing it. Open-source community-owned projects are not black and white | 21:48 | |
Zoffix is definitely a loss. I think oftentimes we still live off what he left behind basically | 21:49 | ||
jdv | i miss all of em | ||
21:49
jpn joined
|
|||
NemokoschKiwi | Sure, that's even more true for TimToady in a sense but for Zoffix, the situation can be kinda sorta traced back | 21:50 | |
While TimToady kind of just faded away from the involvement, I'd avoid guessing about that | |||
jdv | i wish larry the best retirement possible! | 21:51 | |
NemokoschKiwi | Damian is kind of the same | ||
you may come across them every once on github | |||
22:01
jpn left
22:02
jgaz joined
22:06
jgaz left
|
|||
jdv | theyre a decade or so apart... | 22:07 | |
anyway, good times ahead i hope. | 22:09 | ||
22:10
jaguart joined
|
|||
NemokoschKiwi | yeah I was less thinking of the decades and more of the relation to Raku | 22:12 | |
22:14
sena_kun left
22:15
jpn joined
22:19
jpn left
|
|||
jdv | damian is almost 60. larry is almost 70. :) :( | 22:25 | |
SmokeMachine | I like Red. It helps me in many things I have to do... | ||
I'd love to have some more time to work on that... | 22:26 | ||
jdv | wouldnt we all;) | ||
i imagine most of us have more ideas than time to explore them. how exciting?! | 22:28 | ||
a | 22:33 | ||
22:40
derpydoo joined
23:02
derpydoo left
|