Raku Conference Day 2 on Youtube: www.youtube.com/watch?v=BL9-XdC9WYI 🦋 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 14 August 2022. |
|||
00:04
duuude left
00:07
reportable6 left
00:09
reportable6 joined
00:38
melezhik joined
|
|||
melezhik | .tell lizmat looks like irc log site has no fresh logs again ... | 00:38 | |
tellable6 | melezhik, I'll pass your message to lizmat | ||
00:42
melezhik left
00:50
xinming joined
|
|||
xinming | m: class A { method t () { "class".say; } } does role { method t () { "role".say; } }; A.new.t; | 00:50 | |
camelia | Cannot use 'does' operator on a type object A. in block <unit> at <tmp> line 1 |
||
xinming | Any way to apply anonymous role to a class directly? Or what is the right way to add "around" method for existing method in the same class? | 00:51 | |
ugexe | kind of | 01:07 | |
m: (class A { method t () { "class".say; } } but role { method t () { "role".say; } }).new.t | |||
camelia | role | ||
tonyo | with meta model stuff: | 01:13 | |
m: class A {}; A.^add_role(role :: { method t {"role anon".say;}}); A.^compose; A.new.t; | 01:14 | ||
camelia | role anon | ||
xinming | ugexe: thanks. :-) | ||
long time not play with raku, and I forgot there is "but" | |||
tonyo: I don't like the way to type more than one statements. | 01:15 | ||
Prefer oneliners to DWIM | |||
tonyo | the but method fails depending on context: | ||
m: class A {} but role :: { method t { "role anon".say; } }; A.new.t; | |||
camelia | No such method 't' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
tonyo | ugexe's `but` only applies to that `new` specifically | ||
xinming | Yea, just tried, and figured that out, Seems your version is the only way | 01:17 | |
tonyo | if you're into one liners you could put it all on a line with: | ||
m: class A {}.^add_role(role { method t { "anon".say; } }) or A.^compose; A.new.t | |||
camelia | anon | ||
tonyo | (the compose bit is important so it updates the mop cache) | 01:18 | |
xinming | yea. thanks | ||
m: class A { method t { "t".say }}; A.^add_role(role :: { method t {"role anon".say;}}); A.^compose; A.new.t; | 01:27 | ||
camelia | t | ||
xinming | tonyo: After adding roles, Seems the class method is still being called. | ||
01:38
Colere left
01:43
bigdata joined
01:53
Colere joined
|
|||
tonyo | are you looking for inheritance rather than roles? | 02:11 | |
i do believe that's the correct behavior: | 02:13 | ||
m: role Z { method t {"role".say;}}; class A does Z { method t {"class".say;}}; A.new.t; | |||
camelia | class | ||
tonyo | kind of out of the loop on how the mop works since a few years ago when it changed a bit and broke the orm i wrote but you can enumerate roles if you anticipate your class being randomly added to: | 02:29 | |
m: class A { method t { "class".say; (|self.^roles).grep({$_.first.^can("t").first}).map(*.t()); }; }.^add_role(role :: { method t { "anon".say; } }) or A.^compose; A.new.t | |||
camelia | class anon |
||
tonyo | callsame and callnext seem to not work as they do with inheritance | ||
m: class A { method t { "class".say; callsame; }; }.^add_role(role :: { method t { "anon".say; } }) or A.^compose; A.new.t | 02:30 | ||
camelia | class | ||
xinming | tonyo: I don't mean inheritance, I'm looking for a way to add wrapper for a method in the class. | 02:46 | |
If you used Moose, something like, sub method { }; around method => sub { ... }; | |||
tonyo | xinming: i'd probably use .wrap instead of the role.. | 02:49 | |
m: class A { method t { "class".say; } }; A.^lookup("t").wrap(sub (\self:D) { "after".say; callsame; "after".say; }); A.new.t; | |||
camelia | after class after |
||
xinming | tonyo: Yea, thanks, I just googled and find something like that. :-) | 02:50 | |
but your example has more detailed arg. :-) | 02:51 | ||
02:53
evalable6 left,
linkable6 left
02:54
linkable6 joined,
evalable6 joined
03:31
bigdata left
04:11
Sgeo_ joined
04:14
Sgeo_ left
04:15
Sgeo left
04:18
Sgeo joined
04:20
Sgeo left
04:37
Sgeo joined
05:18
abraxxa joined
05:22
abraxxa left
05:23
abraxxa joined
06:04
Xliff joined
06:07
reportable6 left
06:10
reportable6 joined
06:28
bigdata joined
06:57
Sgeo left
07:33
duuude joined
|
|||
leont | Within a class, there was a way to specify an "argument of the same type as self", right? | 07:58 | |
08:01
Geth left,
Geth joined
08:04
Xliff left
|
|||
lizmat | ::?CLASS ? | 08:07 | |
tellable6 | 2022-08-25T00:38:56Z #raku <melezhik> lizmat looks like irc log site has no fresh logs again ... | ||
lizmat | .tell melezhik thanks for the nudge | ||
tellable6 | lizmat, I'll pass your message to melezhik | ||
08:14
dakkar joined
|
|||
leont | lizmat: thank, that's the one | 08:17 | |
it was one of those "google doesn't work for these super common words" cases | 08:18 | ||
08:21
tadzik joined
|
|||
xinming | leont: That's why human AI bots are needed here. ;-) | 08:33 | |
08:51
masak left,
sena_kun joined
08:58
duuude left
09:03
duuude joined
09:04
kylese joined
|
|||
Geth | ecosystem: 01807edceb | (Elizabeth Mattijsen)++ | META.list Freeze Terminal::ANSIColor While it is being moved to the zef ecosystem |
09:29 | |
09:29
wafflus joined
|
|||
xinming | releasable6: status | 09:39 | |
releasable6 | xinming, Next release in ≈1 day and ≈9 hours. 1 blocker. Changelog for this release was not started yet | ||
xinming, Details: gist.github.com/1c956ca151c8ca2397...a771dcc48b | |||
09:52
duuude left,
kylese left
09:59
duuude joined
10:01
euandreh left,
euandreh joined
10:03
euandreh left,
euandreh joined
10:04
euandreh left,
wafflus left
10:05
wafflus joined
|
|||
Geth | ecosystem: e5d60d2ab5 | (Elizabeth Mattijsen)++ | META.list Argh, confused Term::ANSIColor with Terminal::ANSIColor Term::ANSIColor was effectively removed by the previous commit. Since this module lives in the REA, and it has been deprecated since 2017, I saw no need to restore. This properly freezes Terminal::ANSIColor until it can be removed from the p6c ecosystem in a few days |
10:07 | |
Nemokosch | 😂 | 10:18 | |
10:19
sena_kun left
10:21
sena_kun joined
|
|||
jjatria | lizmat: looks like the change log for Terminal::ANSIColor kept some bad copy-paste from snip: github.com/tadzik/Terminal-ANSICol...Changes#L1 | 10:26 | |
tellable6 | 2022-08-18T20:15:36Z #raku <melezhik> jjatria - I have finished first working version of Cromtit - github.com/melezhik/Cromtit , you can use the one to run cron jobs for PublicSuffix - it has nice web UI, jobs dependencies and other useful features | ||
lizmat | Oops :-) | 10:27 | |
jjatria | Things that I notice while trawling the recent releases :P | 10:28 | |
lizmat | jjatria: thanks, fix committed, will be in next release | ||
wafflus | how do i do this in rakue regex101.com/r/3uBm3m/1 | 10:39 | |
10:41
Xliff joined
|
|||
lizmat | create an error ? | 10:43 | |
10:59
euandreh joined
|
|||
tbrowder | .tell skaji i have a PR for mi6 that may be useful to other mi6 users | 10:59 | |
tellable6 | tbrowder, I'll pass your message to skaji | ||
tbrowder | check it out, testing green | ||
11:13
duuude left
11:18
duuude joined
|
|||
Xliff | gist.github.com/Xliff/c7e4b55598de...64c541ca9a | 11:20 | |
11:24
euandreh left
11:26
euandreh joined
11:27
euandreh left
|
|||
lizmat | Xliff: better posted on #cro ? | 11:42 | |
11:59
wafflus left
12:06
reportable6 left
12:07
reportable6 joined
12:18
duuude left
12:25
euandreh joined
|
|||
Xliff | lizmat: ALSO posted on #cro. | 12:26 | |
lizmat | Xliff: ah, ok :-) | ||
somehow it had de-highlighted #cro for me already :-( | |||
tbrowder | mi6 users should check my PR. it enables you to specify a second rakudoc file to be converted to Markdown. very useful for more detailed information on your repo for web browsing. | 12:27 | |
and you can ping skaji if you like it--i need it :-D | 12:29 | ||
lizmat | tbrowder: only a second? | ||
why not have it convert all .rakudoc files in a doc directory ? | 12:30 | ||
tbrowder | for now. i couldn't easily figure out skaji's code. but yes i would like that, too. this is more of a test | ||
lizmat | or something like that ? | ||
tbrowder | you are welcome to mod the PR | 12:31 | |
lizmat | I have too many of those already :-) | ||
but should be able to bring out .48 of App::Rak later today, finally | |||
12:31
jgaz joined
|
|||
tbrowder | but i think this pr can stand alone anyway | 12:32 | |
there is one glitch on the pr: i had to comment out one of his tests because it fails on me (even without my pr). testing mi6 involves its "xt" directory and i had trouble creating my own pr's test. | 12:35 | ||
but my test is working, as are all skaji's tests but one | 12:36 | ||
note my pr uses the "barename" of the second rakudoc to name the markdown file which placed in the base directory with the README | 12:39 | ||
*is placed | |||
with my pr, skaji could create a separate doc to tell pr submitters the correct way to test mi6! | 12:42 | ||
12:44
duuude joined
|
|||
Kaiepi | m: class Coolish hides Nil { method Failure { callsame } }; put Coolish.Failure | 12:45 | |
camelia | Invocant of method 'Failure' must be an object instance of type 'Cool', not a type object of type 'Coolish'. Did you forget a '.new'? in method Failure at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Kaiepi | ^ hides not recursing caught me off guard. this is kinda nice for what i'm doing, but this isn't documented. is it supposed to do this? | ||
lizmat | not sure :-( | 12:46 | |
Kaiepi | the implementation doesn't seem to have changed since way back in 2012 github.com/rakudo/rakudo/commit/64...346bef2d65 | 12:52 | |
bar some role stuff in C3MRO iirc | 12:53 | ||
xinming | Anyone here uses DBIish:ver<0.6.5> getting error 'DBDish::Pg: Can't connect: connection to server at "localhost" (::1), port 5432 failed: server closed the connection unexpectedly' randomly? | 12:58 | |
On the postgresql server, I can get error which is "could not receive data from client: Connection reset by peer" | 12:59 | ||
Is there a way to make this error more verbose for easier troubleshooting? | |||
Kaiepi | try wireshark | ||
there's --ll-exception ig | 13:00 | ||
xinming | Kaiepi: were you answering my question? | ||
Kaiepi | i say that because it seems a bit like a dns problem | ||
yes | |||
xinming | Ok | ||
Kaiepi | see if it ever tries localhost on ipv4 | 13:01 | |
xinming | termbin.com/l8t9 <--- This is the ll-exception | 13:04 | |
hmm, Let me use a local source instead | 13:05 | ||
termbin.com/f554e <--- This is version with checkout source from master | 13:10 | ||
Kaiepi: How do I use wireshark to troubleshooting the issue in cli? | 13:12 | ||
Kaiepi | there's a tshark tui tool | 13:13 | |
er | |||
just cli | |||
the connection is handled by libpq. not very familiar with it :( | 13:15 | ||
seems like hyper/race is involved in some way though. maybe it's not thread-safe? | |||
xinming | I just now removed the ::1 line in /etc/hosts, Seems the *thing* is gone. | 13:16 | |
I'll leave it for a while. | |||
I don't remove the line, I just commented it out, You said it's probably dns issue, So I thought it's probably ipv4/ipv6 mixing issue | 13:17 | ||
Kaiepi | yeah, that's along the lines of what i was thinking | 13:18 | |
13:44
linkable6 left,
evalable6 left
13:45
linkable6 joined,
evalable6 joined
13:56
bigdata left
14:02
morte_ joined
14:22
morte_ left
14:34
ab5tract joined
14:44
melezhik joined
|
|||
melezhik | o/ | 14:44 | |
tellable6 | 2022-08-25T08:07:51Z #raku <lizmat> melezhik thanks for the nudge | ||
melezhik | .tell lizmat you are welcome | ||
tellable6 | melezhik, I'll pass your message to lizmat | ||
lizmat | . | ||
14:51
melezhik left
15:17
human-blip left
15:18
human-blip joined
|
|||
xinming | Is there a way to make DBIish reconnect to database? | 15:27 | |
15:28
wafflus joined
|
|||
wafflus | how do i dof i insert named regexes into lookaheads and lookbehinds | 15:30 | |
tonyo | xinming: are you using ssl on the postgres connection? | 15:37 | |
ah, should've read further and you've solved it | 15:38 | ||
15:47
ab5tract left
16:04
duuude left
16:10
sena_kun left
16:11
sena_kun joined
16:13
abraxxa left
16:16
duuude joined
16:32
dakkar left
|
|||
Xliff | xinming: You might have to close and reconnect. | 16:35 | |
tonyo | looked like his issue was using ipv6 | ||
Xliff | xinming: For timeouts... .do('SELECT 1') on the database handle. | 16:36 | |
Ahh.... Ipv6 | 16:37 | ||
Yet another tech with great expectations it didn't live up to. | |||
The dotted quad still lives. | |||
The coloned octal never caught on. | 16:38 | ||
I mean seriously, if I have to use the word "Colon" ever again...it will be too soon. | 16:39 | ||
lizmat | .oO( everybody wants the colon :-) |
16:49 | |
xinming | Xliff: It's not timeouts, I just found now, when I restart the postgresql daemon, The app needs to be restarted again, So I'm thinking wether DBIish have builtin support for reconnect | 17:07 | |
Yea, I found it's ipv6 issue, I tried to comment the 127.0.0.1 line in /etc/hosts directly, the ::1 to localhost will also cause connection refused. | 17:09 | ||
tonyo | xinming: i'd use and just auto-reconnect github.com/CurtTilmes/raku-dbpg/bl...akumod#L85 | 17:21 | |
17:32
evalable6 left,
linkable6 left
17:33
linkable6 joined
|
|||
Nemokosch | Insert joke about v6 coming too late to save the world | 17:34 | |
17:34
evalable6 joined
|
|||
jdv | more like second system syndrome:) | 17:43 | |
Nemokosch | Calling it second system syndrome would be as faulty as calling Unix the second system of DOS | 17:48 | |
jdv | im not aware unix and dos have a strong relation. plus iirc unix came first, no? | 17:53 | |
by a decade or more i think | 17:54 | ||
xinming | tonyo: what is the best way to check the ping for the db connection? before each statement, or periodically | 17:58 | |
Nemokosch | DOS is a broader term than Unix even | 18:02 | |
DOS/360 was published in 1966, for example | |||
also, I don't know what sort of "strong relations" IPv4 and IPv6 have, other than targeting the same problem | 18:04 | ||
18:06
reportable6 left
|
|||
the point was rather, that IPv4 did have reasons to be replaced even 20 years ago but people rather hacked around it until the problems became manageable | 18:07 | ||
jdv | oh wow. when i think dos i think ibm and ms. is dos/360 strongly related to the 80s/90s dos? | ||
Nemokosch | I frankly doubt it | 18:08 | |
jdv | so you think different versions of the same protocol are not strongly related? | 18:09 | |
Nemokosch | anyway, IPv4 wasn't created with billions of devices on one network in mind | ||
I think it's merely a name - unless proven otherwise, of course. | |||
18:09
reportable6 joined
|
|||
jdv | im not sure what were talkin about anymore e cept a pissing contest | 18:10 | |
fun stuff:) | |||
Nemokosch | I wouldn't assume deep relations between two "versions" of a term as generic as "internet protocol" | ||
well, let me reiterate the point then | 18:11 | ||
> the point was rather, that IPv4 did have reasons to be replaced even 20 years ago but people rather hacked around it until the problems became manageable | |||
jdv | ok. my point was vaguely that ipv6 perhaps went too crazy and divergent. | 18:13 | |
thanks for the volley | |||
Nemokosch | by the way, you made me curious; IPv4 (then just IP, I suppose) was developed by DARPA in the seventies while IPv6 was developed by IETF in the nineties. I really don't see why they would be iterations of one product | 18:15 | |
If anything, we can imply that IETF guys weren't as clever as DARPA 🙂 | |||
p6steve | design by committee | 18:29 | |
Nemokosch | aaaand we are back to the Perl jokes 👏 | 18:31 | |
leont | It's not possible to add a COERCE method to a subset, is it? | 18:38 | |
18:47
japhb left
18:54
japhb joined
19:04
clarjon_1 joined
19:05
archenoth joined,
spacekookie left,
samebchase left,
andinus left,
ab5tract joined
19:06
samebchase joined,
spacekookie joined,
andinus joined
19:07
clarjon1 left,
Oshawott left
19:31
smimp joined,
smimp left
|
|||
tonyo | xinming: what kind of app is this? | 19:33 | |
19:37
japhb left
19:43
japhb joined
19:46
sena_kun left
|
|||
leont really wants union types, or something like that | 20:01 | ||
20:26
duuude left
20:51
ab5tract left
20:52
ab5tract joined
21:00
euandreh left
21:02
euandreh joined
21:05
Kaipei joined,
jgaz left
21:07
Kaiepi left
|
|||
japhb | lizmat: Your changes to Terminal::ANSIColor seem to have broken Grammar::Debugger. In particular, switching the uppercase "constants" from exported subs to exported constants broke lines like this one: github.com/jnthn/grammar-debugger/...r.pm6#L116 | 21:14 | |
21:19
ab5tract left
21:27
wafflus left
|
|||
japhb | Oh, I should be clear: I mention this not because it's not trivially easy to patch Grammar::Debugger, but rather because others might be tripping over the same problem. | 21:28 | |
22:02
bigdata joined
|
|||
guifa | leont: I've thought about union types, and wanted to experiment with an implementation but I couldn't figure out how to hack into is repr<> | 22:04 | |
or at least how that bit worked | 22:05 | ||
22:08
Oshawott joined
22:11
archenoth left
22:15
Colere left
22:16
Colere joined
|
|||
lizmat | japhb: meh | 22:22 | |
22:25
rba_ joined,
[dpk] joined,
pierrot joined,
ecocode____ joined,
ProperN[out] joined
22:26
PotatoGim_ joined,
BinGOs left
22:27
PotatoGim_ joined,
Name joined,
Name is now known as Guest2457
22:28
lucs_ joined
22:30
Juerd_ joined,
perlmaros_ joined,
clarjon_1 left
22:31
ecocode joined,
Scotteh_ joined
22:33
eseyman left,
Juerd left,
ProperNoun left,
ecocode___ left,
amenonsen left,
corwin left,
Scotteh left,
mykhal left,
pierrot_ left,
ecocode_ left,
tib left,
lucs left,
PotatoGim left,
rba left,
perlmaros left,
dpk left,
rba_ is now known as rba,
perlmaros_ is now known as perlmaros,
ecocode____ is now known as ecocode___,
PotatoGim_ is now known as PotatoGim,
Juerd_ is now known as Juerd
22:34
mykhal joined
22:36
Sgeo joined
22:38
tib joined,
amenonsen joined
22:40
corwin joined
|
|||
lizmat | japhb: Terminal::ANSIColor 0.7 now on zef, restored the sub interface | 22:45 | |
japhb | lizmat: OK, thanks. I'll try my full rebuild | 22:54 | |
lizmat | well, actually added it back in | 22:59 | |
japhb | lizmat: OK, that got a lot farther in my build list. Now it's failing on Testo:ver<1.003007>:auth<zef:raku-community-modules> -- No such symbol 'Terminal::ANSIColor::EXPORT::DEFAULT::&colored' | 23:18 | |
gfldex | leont: no, you can't COERCE to a subset. I tried, I really tried: gist.github.com/337fb1f3d8a8bcec0c...56124ff2b1 | 23:31 | |
23:32
bingos joined
23:40
irc_user joined
23:47
phogg left
23:49
phogg joined
23:50
phogg left,
phogg joined
|