🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
Geth | doc/master: 5 commits pushed by Coke++ | 00:09 | |
doc: dd20c71e38 | Coke++ | 2 files fix typo |
00:23 | ||
00:23
camelia joined
00:49
yuplushi left
01:01
tejr left
01:08
m_athias left,
tejr joined
01:19
m_athias joined
01:24
dataangel left
|
|||
rypervenche | If I want to simply rename keywords, terms, etc. in a slang, should I be copying the tokens/rules verbatim from Grammar.nqp and then making changes to them? Or is a smaller bit a code OK to use? | 01:24 | |
I've seen that slangs like Slang::Mosdef don't copy the grammar's rules exactly the same. I'm not sure if that's because the grammar is changed, it's not necessary, or it just happens to be ok in this instance. | 01:26 | ||
I should probably ask this in the morning :P | |||
01:35
molaf left
01:48
molaf joined
02:24
Cabanossi left
02:26
Cabanossi joined
|
|||
codesections | I hope you get an answer – I've been curious about the same thing. And the (vaguely) related question of how to write a slang that *doesn't* edit an existing grammar, but starts from scratch instead | 02:29 | |
02:32
rindolf joined
02:41
fooist left
|
|||
rypervenche | So far I've been pretty successful with lower level things by copying the entire token/rule and then adding a | to get the custom term that I want. | 02:51 | |
03:23
yuplushi joined
04:23
nativecallable6 left,
shareable6 left,
quotable6 left,
committable6 left,
benchable6 left,
notable6 left,
bloatable6 left,
bisectable6 left,
coverable6 left,
tellable6 left,
reportable6 left,
statisfiable6 left,
sourceable6 left,
linkable6 left,
unicodable6 left,
greppable6 left,
evalable6 left,
releasable6 left,
sourceable6 joined,
bisectable6 joined,
greppable6 joined
04:26
benchable6 joined,
reportable6 joined,
nativecallable6 joined,
unicodable6 joined,
releasable6 joined,
statisfiable6 joined,
notable6 joined,
committable6 joined,
evalable6 joined,
bloatable6 joined,
shareable6 joined,
quotable6 joined,
linkable6 joined,
coverable6 joined,
tellable6 joined
04:29
zacts joined
04:45
Xliff joined
|
|||
Xliff | Very weird results. Can someone tell me why this doesn't work? | 04:45 | |
repl.it/@Xliff/VictoriousUtilizedT...#main.raku | |||
04:45
andrzejku joined
|
|||
Xliff | ^^ jnthn timotimo vrurg | 04:46 | |
rindolf | Xliff: strcat(%c) - percent | 04:50 | |
Xliff | Rindolf: Ah. Actually making changes, still. Try now. | 04:51 | |
moritz | [Coke]: yes, autounfudge was my doing, originally | 04:52 | |
04:53
AlexDaniel left
|
|||
rindolf | Xliff: ah, why do you wish to call strcat()? it is insecure and inefficient: www.joelonsoftware.com/2001/12/11/...to-basics/ | 04:56 | |
Xliff | Because it is simple and it should work. | ||
rindolf: What I'm really trying to do - determine if I can use literals in nativecall defs. | 04:57 | ||
The answer looks like a "yes" for the first call. | 04:58 | ||
rindolf | Xliff: i doubt it | ||
Xliff | The subsequent results were surprising. | ||
OK, that's the fixed use-case, now. | 04:59 | ||
It should work. It doesn't. Why? | |||
Even if I replace 'cat' with Str, the results are still the same. | |||
05:08
gnufr33dom joined
05:20
zacts left
05:26
holli__ joined
05:41
bocaneri joined
05:58
aluaces joined
06:11
andrzejku left
06:12
zacts joined
06:34
cgfbee joined,
gnufr33dom left
06:40
Archenoth left
06:41
Archenoth joined
06:47
Sgeo left,
andrzejku joined
06:53
dolmen joined
06:58
maettu joined
07:12
maettu left
07:13
holli__ left
07:16
Mawile joined
07:20
Archenoth left
07:22
aluaces left
07:32
tejr left
07:37
pecastro joined
07:38
tejr joined
07:42
holli__ joined
07:43
skyl4rk left
07:46
andinus joined
07:58
dakkar joined
08:00
maettu joined
08:11
aluaces joined,
sena_kun joined
08:20
andrzejku left
08:24
holli__ left
08:31
molaf left,
skids left
08:36
ChoppedBacon left
|
|||
timotimo | Xliff: my first thought is, again, to throw valgrind at it | 08:37 | |
which i'm doing right now | |||
08:39
ChoppedBacon joined
|
|||
timotimo | Xliff: i assume the final expected string is actually "Baracat", not "Barcat"? | 08:40 | |
frustratingly, turning jit off seems to make it work? | 08:41 | ||
but i would assume it has something to do with malloc and free being called in whatever order with whatever arguments | 08:42 | ||
08:44
skyl4rk joined
|
|||
timotimo | anyway, it's doing dirty things with memory in terms of use-after-free | 08:45 | |
Xliff: ^ | |||
08:56
aluaces left
08:57
holli__ joined
08:58
Doc_Holliwould joined
09:01
holli__ left
09:04
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
09:37
Black_Ribbon left
09:43
Doc_Holliwould left
09:44
maettu left,
xinming joined
09:52
aluaces joined
09:55
MasterDuke left
10:01
Doc_Holliwould joined
10:23
Noisytoot joined
10:30
Noisytoot left
10:31
Noisytoot joined
10:38
dolmen left,
Altai-man joined
10:41
sena_kun left
10:54
Noisytoot left
11:02
Doc_Holliwould left
|
|||
codesections | Is there a way to "disassemble" or otherwise view the contents of a .precomp file in a human-readable way? | 11:17 | |
11:23
fluca1978 joined
|
|||
fluca1978 | I'm sorry I've read somewhere, but I'm not finding it anymore, why is ~~ evaluated on the right side? a ~~b is evaluated as b.ACCEPTS( a ) | 11:30 | |
moritz | fluca1978: there are two reasons for that | 11:50 | |
the first is that a symmetrical smartmatching was tried first, and people didn't like how it behaved, at all | |||
second reason: that's how people think, at least in English. "Is $thing an integer"? becomes $thing ~~ Int | 11:51 | ||
fluca1978 | thanks moritz, probably year of java raped my mind: a.equals( b ) | 11:52 | |
11:52
patrickb joined
|
|||
moritz | fluca1978: then I wish a speedy recovery :D | 11:53 | |
fluca1978 | thanks moritz | 11:54 | |
11:54
fluca1978 left
|
|||
codesections | I realize the user already left the channel, but I really hope phrases like "$thing raped my mind" don't become common here. It's much less inclusive/friendly than how I think of Raku and our community | 11:56 | |
11:57
epony left
11:58
epony joined,
patrickb left
11:59
dolmen joined
|
|||
lizmat | codesections++ | 11:59 | |
moritz | codesections: agreed; it rubbed me the wrong way, but I couldn't really articulate why | 12:02 | |
timotimo | codesections: after you toss out the first bytes from a precomp file, "moar --dump blah.moar" will give you bytecode | 12:03 | |
lizmat | timotimo: which first bytes ? | 12:04 | |
and why do we need to toss ourselves ? | |||
12:04
maettu joined
|
|||
timotimo | it's got the dependency information in it | 12:04 | |
only need to cut stuff until the third \n, or i guess until you find \nMOARVM | 12:06 | ||
i agree that moar --dump should perhaps learn to skip these bytes by itself | |||
codesections | timotimo: thanks, exactly what I wanted | 12:12 | |
12:16
ufobat joined
|
|||
ufobat | oi :D | 12:16 | |
12:36
molaf joined
12:37
kent\n joined
12:40
dolmen left
12:41
dolmen joined,
dolmen left
12:42
dolmen joined
12:55
Doc_Holliwould joined
|
|||
cpan-raku | New module released to CPAN! XML::Actions (0.4.6.2) by 03MARTIMM | 12:55 | |
13:03
[Sno] left
13:06
__jrjsmrtn__ joined
13:07
_jrjsmrtn left
13:11
kensanata joined
13:12
sno joined
13:13
zacts left
13:17
gnufr33dom joined
13:23
gnufr33dom left
13:30
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:33
maettu left
13:42
gnufr33dom joined
13:44
aborazmeh left,
Doc_Holliwould left
13:48
maettu joined
13:51
yangzq50 joined
13:52
kent\n left
13:59
kent\n joined
|
|||
kawaii | Hello, hoping there might be someone else here with Redis experience, and knowledge of sets. I'm working on a wordfilter bot, and want to use Redis as a kind of hot-storage for the wordlist. www.irccloud.com/pastebin/66EZY9Ok/ | 14:00 | |
But it seems like no matter what I do, the data becomes a flat list. | 14:01 | ||
Redis certainly allows set values with spaces in, so I wonder if it's something to do with the Redis::Async module and how it sends the data. | 14:02 | ||
codesections | I know at least a bit about Redis and Raku sets, though I've not yet used Redis with Raku. Where is the $redis variable in the code you pasted from? | ||
Redis::Async? | 14:03 | ||
kawaii | codesections: yep, it's simply `my $redis = Redis::Async.new('127.0.0.1:6379');` | ||
Altai-man | kawaii, if it's Redis::Async, you can create an issue, it seems like an unmarshalling "bug" (?). The author is usually pretty responsive. | 14:04 | |
kawaii | Altai-man: I'll do so, just wanted to make sure I wasn't missing something obvious :) | 14:06 | |
Altai-man | kawaii, well, this seems like a module-specific issue, it's just that method returns something X and not Y. You can convert that, of course, but this will kinda decrease performance (as in: more things to do - slower). | 14:07 | |
14:11
MasterDuke joined
14:12
maettu left
|
|||
codesections | interesting. I wasn't familiar with eredis, and it doesn't seem to be in many repos. Interesting choice to build on that instead of upstream redis | 14:18 | |
14:18
gnufr33dom left
|
|||
codesections | ... and building eredis from source requires more time than I'm willing to invest in this right now. Sorry I can't be more help :( | 14:21 | |
kawaii | codesections: no problem, I raised an issue, and yes it's a little tricky to get the module working compared to most others :P | 14:22 | |
14:24
gnufr33dom joined
|
|||
Grinnz | hiredis is the usual lib to work with | 14:30 | |
never heard of eredis | |||
codesections | Yeah, I hadn't either, which is why I thought it was interesting. | 14:31 | |
Grinnz | it does look like it's either quoting your command incorrectly or interpreting the results incorrectly | ||
because you're right, values can contain spaces as well as any other byte | 14:32 | ||
codesections | On the other hand, I *have* rolled my own Redis client with just the functionality I needed before, which is almost shockingly easy | ||
Grinnz | yes, the protocol is quite simple | ||
Geth | ¦ doc: codesections self-assigned Add detailsabout compile-time phasers github.com/Raku/doc/issues/3591 | 14:36 | |
14:39
sena_kun joined
14:41
Altai-man left
14:45
zacts joined
14:46
gnufr33dom left
14:49
gnufr33dom joined
|
|||
kawaii | codesections: somewhat figured it out, if I send $badwords.keys instead of just $badwords it stores it correctly as a set, instead of just storing the whole thing as a string :) | 14:50 | |
codesections | m: my $s = SetHash[Str].new("peach tea","banana","watermelon","apple"); say $s.keys.WHAT; say $s.keys.map({.WHAT}) | 15:03 | |
camelia | (Seq) ((Str) (Str) (Str) (Str)) |
||
codesections | kawaii: that seems pretty odd to me -- $badwords.keys is a Seq of strings. It's... odd API design to need to send a Seq of Str to get a Set, and not let you send a Set | 15:05 | |
15:10
maettu joined
|
|||
kawaii | codesections: yeah seems odd, but what can I say, oh well :) github.com/CurtTilmes/perl6-eredis/issues/4 | 15:14 | |
15:16
natrys joined
15:19
maettu left
15:37
hungrydonkey joined
15:42
Doc_Holliwould joined
15:48
zacts left
15:50
skids joined
|
|||
tbrowder | .tell jjmerelo i still can't see any update to the docs from 2+ weeks ago | 15:51 | |
tellable6 | tbrowder, I'll pass your message to JJMerelo | ||
15:56
gnufr33dom left
16:08
kensanata left
16:12
aluaces left
16:19
robm joined
16:28
Altai-man joined,
Sgeo joined
16:29
sena_kun left,
Altai-man left
16:31
sena_kun joined,
dakkar left
16:37
dolmen left
16:40
hungrydonkey left,
hungryd88 joined
16:45
ufobat_ joined
16:49
VZ joined,
ufobat left
|
|||
VZ | m: my token t { Init '(' ~ ')' (\S+) }; my regex r { Init '(' ~ ')' (\S+) }; my $str = 'Init(1)'; say &t ~~ $str; say &r ~~ $str; | 16:52 | |
camelia | Regex object coerced to string (please use .gist or .raku to do that) False False in block <unit> at <tmp> line 1 Regex object coerced to string (please use .gist or .raku to do that) in block <unit> at <tmp> line 1 |
||
VZ | m: my token t { Init '(' ~ ')' (\S+) }; my regex r { Init '(' ~ ')' (\S+) }; my $str = 'Init(1)'; say $str ~~ $t; say $str ~~ &r; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$t' is not declared. Did you mean '&t'? at <tmp>:1 ------> 3S+) }; my $str = 'Init(1)'; say $str ~~ 7⏏5$t; say $str ~~ &r; |
||
VZ | m: my token t { Init '(' ~ ')' (\S+) }; my regex r { Init '(' ~ ')' (\S+) }; my $str = 'Init(1)'; say $str ~~ &t; say $str ~~ &r; | ||
camelia | Nil 「Init(1)」 0 => 「1」 |
||
VZ | hi, could somebody please explain why "~" doesn't seem to work inside tokens, but only inside regexes? I don't see how is it related to :sigspace... | 16:53 | |
17:05
zacts joined
17:09
zacts left
17:10
Tirifto joined
17:33
rabin joined
17:40
rabin left
|
|||
rypervenche | So I've been working on a Slang to allow other words to be used in Raku for things like sub, method, class, etc. I was curious if it's possible to add another word to call "say" as both a sub and method. | 17:42 | |
What I'm currently working on: gitlab.com/rypervenche/slang-chine.../tree/test | |||
17:42
natrys left
|
|||
CIAvash | VZ: `\S+` is eating `)`, because token doesn't backtrack. see docs.raku.org/language/regexes#Ratchet | 17:45 | |
17:45
Doc_Holliwould left
17:53
clarjon1 joined
17:54
Altai-man joined
17:55
hungryd88 left
17:56
hungrydonkey joined,
sena_kun left
18:13
natrys joined
|
|||
VZ | @CIAvash thanks, I thought `~` was somehow smart enough to prevent this from happening... is there some more idiomatic way of doing this than using `(<[\N] - [)]>+)` or something like that? | 18:24 | |
CIAvash | VZ: not sure, but you can make it non-greedy: `\S+?` | 18:27 | |
VZ | yes, I guess this is the best thing to do, just in case there are nested parenthesis there -- thanks again! | 18:28 | |
18:28
Tirifto left
|
|||
CIAvash | yw | 18:31 | |
18:32
bocaneri left
18:34
VZ left
18:35
VZ joined
|
|||
[Coke] | codesections++ | 18:37 | |
codesections | hm? | 18:38 | |
[Coke] | deep in review | ||
18:41
ufobat_ left
|
|||
Xliff | . | 18:46 | |
timotimo: So JIT is optimizing things in a way where memory is getting freed before output. | 18:48 | ||
timotimo | yeah, just good ol' timing- and side-effect-sensitive code :) | 18:53 | |
Xliff | So what would be the best way to make it work? | 18:55 | |
timotimo | use CArray instead of Str | 19:08 | |
or fiddle around with explicitly-managed? | 19:09 | ||
VZ | oops, actually testing the suggestion above, using `\S+?` doesn't work when there is more than one character inside the parenthesis | 19:13 | |
m: my token t { Init '(' ~ ')' (\S+?) }; say 'Init(12)' ~~ &t; | 19:14 | ||
camelia | Nil | ||
codesections | tbrowder: The other day, you were asking about uses of `zef nuke`. I just found myself in a situation where running `zef nuke site home` seemed like the best way out | 19:17 | |
rypervenche | m: my regex t { Init '(' ~ ')' (\S+) }; say 'Init(12)' ~~ &t; | 19:19 | |
camelia | 「Init(12)」 0 => 「12」 |
||
19:30
rindolf left
|
|||
CIAvash | VZ: then I think you should either go with the character class you wrote or use regex instead of token. Not sure there is another way. | 19:34 | |
VZ | yes, I've ended up with | 19:35 | |
token non-paren { <[\N] - [)]>+ } | |||
token init-option { Init '(' ~ ')' (<.non-paren>) } | |||
19:36
aluaces joined
|
|||
VZ | to finish with this, I think it might be useful to spell this out in docs.raku.org/language/regexes#Til...structures as it goes into some much more advanced stuff without mentioning this gotcha, which seems much more basic | 19:37 | |
19:45
natrys left,
[Sno] joined
19:46
MasterDuke left
19:47
rindolf joined
19:48
sno left
19:54
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
20:03
VZ left
20:13
MasterDuke joined
20:18
billN1VUX joined
20:22
rindolf left
20:28
cpan-raku left
20:40
wamba joined
20:43
cpan-raku joined,
cpan-raku left,
cpan-raku joined
20:50
wamba left
|
|||
tbrowder | codesections: did that blow away your $HOME/.zef stash? | 20:55 | |
codesections | Yep. | 20:56 | |
Which was the idea – I somehow messed up my upgrade from 2020.06→07 in a way that confused zef about which modules I had installed | |||
tbrowder | i had to do that manually in the early days of zef upon suggestions by ugexe and moritz | ||
20:56
wamba joined
|
|||
Altai-man | codesections, how do you upgrade? | 20:57 | |
tbrowder | situation has been much better since then. what do you think was the problem? a rogue module? | ||
codesections | Altai-man: I don't really have a system, which is probably the issue :D Do you have a recommendation? | 20:58 | |
tbrowder | i really have enjoyed the rakudo-pkg for debian. painless | 20:59 | |
and (knock on wood) i have had no problems with it running on multiple debian hosts | 21:00 | ||
codesections | tbrowder: I think it was just user error. I started with Rakudo Star, then installed Raku 2020.06 from a binary, then installed 2020.07 from source – and the first couple of those were before I'd gotten serious Raku, so I probably wasn't as careful as I should have been | ||
Maybe I'll try that out for 2020.08 | 21:01 | ||
tbrowder | i used to always install from source. i suggest starting now and forget your old method. | 21:02 | |
codesections | The only thing is, I *do* still want to have a source version around, so that I can hack on the compiler. But that _probably_ shouldn't be my main raku executable :D | 21:04 | |
tbrowder | once it's working: sudo apt update: sudo apt upgrade... | ||
(or aptitude or apt-get) | |||
easy peasy | |||
21:04
wamba left
|
|||
tbrowder | i do the same thing. rakudo hacking is done in a local dir away from main sys | 21:05 | |
21:05
wamba joined
|
|||
tbrowder | if i started over i might use docker | 21:06 | |
21:19
wamba left
21:23
Doc_Holliwould joined
21:24
bbkr left
|
|||
Geth | ¦ doc: coke self-unassigned Change from p6doc to rakudoc github.com/Raku/doc/issues/3203 | 21:25 | |
¦ doc: coke self-assigned Pod::Cache isn't safe for concurrent access github.com/Raku/doc/issues/3466 | 21:26 | ||
21:26
leont joined
21:36
MasterDuke left
21:44
robm left,
robm joined
21:45
Xliff left
21:56
sena_kun joined
21:57
Altai-man left
22:05
KotH left,
KotH joined
|
|||
codesections | weekly: www.codesections.com/blog/raku-uni...mpilation/ | 22:20 | |
notable6 | codesections, Noted! (weekly) | ||
codesections | ^^^^ Just made my first blog post about Raku – I'd welcome any thoughts/feedback/criticisms | 22:21 | |
22:21
Cabanossi left
|
|||
lizmat reads | 22:22 | ||
22:23
Cabanossi joined
22:30
sena_kun left,
sena_kun joined
22:37
billN1VUX left
22:46
aluaces left
22:51
billN1VUX joined
22:53
Geth left,
Geth joined
|
|||
rypervenche | Another dark solarized user :) | 22:56 | |
22:57
pecastro left
22:58
Tirifto joined
|
|||
codesections | rypervenche: ha, I've actually moved away from Solarized (and most syntax highlighting in general) for my personal code – these days I use Nordless, which barely even counts as a colorscheme emacsthemes.com/themes/nordless-theme.html | 23:00 | |
but I figure it's nice to have a bit more color than that in a blog post :) | |||
rypervenche | lizmat: Do you happen to know where I might look to be able to call a sub or method by another name in a slang? I've been able to figure out everything else except for things like "say" and ".new". It hasn't been as straight-forward. | 23:06 | |
23:07
wamba joined
23:10
Tirifto left
23:14
Doc_Holliwould left
23:15
sena_kun left
23:53
leont left
|