🦋 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:08
reportable6 left,
reportable6 joined
00:09
epony left
00:10
epony joined
00:16
Nemokosch left
|
|||
[Coke] | . | 00:22 | |
tellable6 | 2022-10-28T16:44:25Z #raku <Voldenet> [Coke]: original thing was Dash compatible DocSets for the Raku documentation for viewing in kapeli.com/dash | ||
00:23
Kaiepi left
00:24
Nemokosch joined
|
|||
Nemokosch | theweeklychallenge.org/blog/perl-w...188/#TASK2 hmmm, this task could be funny if it was defined properly... | 00:25 | |
like, if I have $x = $y = 42, what do I do? The only thing I can come up with is they can both go to zero in one step | |||
But that's not really what the task says | |||
Xliff | japhb: What is the Terminal::ANSIParser interface for decoded-input? | 00:37 | |
Nemokosch | with that assumption, it's a nice post condition loop task | ||
Xliff | And with today's commit, I am at 803kloc for p6-GLib-Suite | 00:42 | |
00:53
ToddAndMargo joined
|
|||
ToddAndMargo | How do I put a literal string in the target of a regex? (I know about subst.) This works, but how do I replkace teh six back slashes with a literal string? | 00:55 | |
$ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|\\\\\\|;print $x ~ "\n"' | |||
a\\\b\\\c\\\d | |||
japhb | Xliff: I don't think I understand the question ... Terminal::ANSIParser was created *after* Terminal::Print, and Terminal::Print doesn't know anything about Terminal::ANSIParser. | ||
ToddAndMargo | But this does not work: | 00:56 | |
$ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|Q[\\\]|;print $x ~ "\n"' | |||
aQ[\]bQ[\]cQ[\]d | |||
I am after replacing the a single forward slash with three back slashes | 00:57 | ||
I am not sure what you mean by Terminal::ANSIParser | 00:58 | ||
Nemokosch | ToddAndMargo: I don't understand the question (and the excerpt makes me freak out) | ||
ToddAndMargo | Oh you know what. You guys forcing me to write more clearly, I figured it out. It is the same as before source! | 01:00 | |
echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|$(Q[\\\])|;print $x ~ "\n"' | |||
I forgot the $() | |||
Thank you! | |||
All those \\\\\\\, I was having a perl 5 moment! | 01:03 | ||
Nemokosch | I never liked when somebody asks a vague question and then goes like "thanks for nothing, I figured it out", it always makes me feel like an idiot. xD | 01:05 | |
When it's usually more like only the asker knew what they meant and nobody else got a chance to answer | |||
ToddAndMargo | I was thanking you guys for forcing me to think more clearly. | 01:06 | |
Nemokosch | Sorry then. I've spent too much time with 14 "hacker" kiddos who know nothing but want everything, and obviously for free... | 01:07 | |
ToddAndMargo | Happens to me all the time. I am a small business consultant. A customer will go crazy with a problem and decide to call me. Whilst the phone rings, because their mind is thinking differently, I get "I figured it out" when I answer the phone. I tell them their computer is afraid of me! Same thing happens to me all the time when I have to | 01:12 | |
call tech support myself. I figure it out whilst I was on hold. It is because your/my brain is changing what it is doing and no long it wearing a hole in the carpet running is place. Funny how that happens! | |||
01:19
Nemokosch left
|
|||
Nemokosch | Oh right. The other thing is, nobody wants to be stupid, and whenever we decide to actually ask/call/something, we check further things | 01:20 | |
01:20
Kaiepi joined
|
|||
And focus more, in general | 01:20 | ||
However, in those skid communities, it's more like they really get stuck with something absolutely banal, like how a console program works on Windows, and then they describe it so poorly that only they can solve it afterwards xD | 01:22 | ||
01:25
Kaiepi left
|
|||
ToddAndMargo | Ya, no fooling. Part of what I have to do is to read though folks giving me what sounds "technical" when they have no idea what the term means. "My computer won't boot" means "my internet is down". "I don't have a web browser. I only have google" mean they are using "chrome browser". "My WiFi is down" mean almost anything. So you | 01:27 | |
slowly ask them what they are experiencing and slowly walk them into a proper description. It is actually fun when you get the hand of it. But it is not suppose to happen to me. Never!!! What???? Okay, once or twice. | |||
Oh ya, Go To Assist is great. Show me what is happening. | 01:28 | ||
01:46
ToddAndMargo left
02:13
epony left
02:14
epony joined
02:20
epony left
02:21
DarthGandalf left
02:36
DarthGandalf joined
02:38
japhb left
02:58
japhb joined
03:31
euandreh left
|
|||
Xliff | japhb: I understand that. What I was asking is this: What is the Terminal::ANSIParser equivalent Terminal::Print's decoded-input-supply | 03:33 | |
.tell japhb I understand that. What I was asking is this: What is the Terminal::ANSIParser equivalent Terminal::Print's decoded-input-supply | |||
tellable6 | Xliff, I'll pass your message to japhb | ||
japhb | Xliff: Ah! Terminal::ANSIParser only does the conversion of bytes or codepoints to escape sequences; it expects a $*IN pump to feed it codepoints. In theory you could use Terminal::Print::RawInput for this, with something like `use Terminal::Print::RawInput; use Terminal::ANSIParser; my $parsed = supply { my &parse-codepoint := make-ansi-parser(emit-item => { emit $_ }); whenever raw-input-supply() { | 03:59 | |
tellable6 | 2022-10-30T03:33:47Z #raku <Xliff> japhb I understand that. What I was asking is this: What is the Terminal::ANSIParser equivalent Terminal::Print's decoded-input-supply | ||
japhb | parse-codepoint($_) } };` (or somesuch, that was freehanded) | ||
Xliff: So once you have a $parsed Supply, you need to turn that into actual keys, which is a lot of what github.com/japhb/Terminal-LineEdit...#L374-L507 is doing. | 04:02 | ||
Xliff: But of course that's complicated, which is why I wrapped that up in github.com/japhb/Terminal-Widgets/...al.rakumod . | 04:03 | ||
Xliff: I guess the big answer to this is "There's no existing medium-level simple API equivalent to decoded-input-supply, but based on Terminal::ANSIParser instead of Terminal::Print::DecodedInput" -- because I wrote low-level and high-level ones instead. | 04:05 | ||
Sigh, all of this means "Spend more time on Terminal::Widgets" I guess. | |||
ETOOMANYPROJECTS | |||
japhb goes back to being very annoyed that existing terminals don't handle skin tone diversity for emoji properly | 04:07 | ||
04:13
coleman left
04:18
coleman joined
04:31
bartolin left,
jdv left
04:32
_________ left,
sivoais left,
xkr47 left,
El_Che left,
silug left,
Ekho left,
bingos left,
synthmeat left,
jmcgnh left,
shmup left,
shmup joined,
El_Che joined,
bartolin joined,
sivoais joined,
bingos joined
04:33
bingos left,
bingos joined,
lizmat_ joined,
silug joined,
Oshawott joined
04:34
synthmeat joined
04:35
Ekho joined,
lizmat left
04:36
Kaiepi joined,
archenoth left,
Kaiepi left
04:37
_________ joined,
jdv joined
04:38
xkr47 joined
04:42
mykhal left,
vrurg left,
jmcgnh joined
04:43
vrurg joined
04:47
mykhal joined
04:53
human_blip left,
dcx left,
Tirifto left,
alethkit left,
patrickb left,
tonyo left,
maettu left,
SmokeMachine left,
eof left,
maettu joined
04:54
tonyo joined,
Tirifto joined,
SmokeMachine joined
04:55
alethkit joined,
patrickb joined,
summerisle joined
04:56
dcx joined
04:57
human_blip joined
05:19
epony joined
05:38
derpydoo joined
06:07
reportable6 left
06:09
reportable6 joined
06:19
habere-et-disper joined
06:35
Tirifto left,
bartolin left,
bartolin joined
06:36
Tirifto joined,
shmup left,
shmup joined
06:37
jmcgnh left,
Kaiepi joined
06:46
jmcgnh joined
06:52
habere-et-disper left
06:57
maettu left,
maettu joined
06:59
dac joined
07:00
dcx left
07:07
Oshawott left
07:08
archenoth joined
07:18
yosik joined,
andinus` left
07:19
andinus joined
07:22
epony left
07:24
epony joined
07:33
derpydoo left
07:54
lizmat_ left,
lizmat joined
|
|||
lizmat | RakuIRCLogger | 07:55 | |
08:12
Sgeo_ joined
08:15
Sgeo left
09:00
maettu left,
maettu joined
09:03
dcx joined,
dac left
09:22
andinus` joined,
andinus left
09:23
Sgeo_ left
|
|||
Nemokosch | "goes back to being very annoyed that existing terminals don't handle skin tone diversity for emoji properly" it would be really nice to get away without statements like this | 09:25 | |
09:27
epony left
09:29
epony joined
|
|||
it would even align with -Ofun I think because I 100% refrain from bringing my politics here and it makes me lose heart to listen to this priority set of a Raku representative | 09:30 | ||
lizmat | why is a comment about a technical issue a political statement ? | 09:34 | |
Nemokosch | mostly because of the framing that this is "diversity" and something to be "very annoyed with" | 09:36 | |
lizmat | I think you're reading too much in that message: Unicode allows for a very wide range of skin tones in emojis, the "diversity" bit in that statement was about that technical reality | 09:47 | |
Nemokosch | You may be right. To be honest, reading about MUGS didn't help with my prejudice. | 09:51 | |
Although it's also a part of reality that toned emojis have low user adoption which might contribute to how important they are treated, not the other way around. | 09:53 | ||
lizmat | indeed | ||
also: "prejudice" has as first meaning according to dictionary.com: | 09:54 | ||
an unfavorable opinion or feeling formed beforehand or without knowledge, thought, or reason. | |||
I would say one should be aware of one's prejudices | |||
lizmat had a case of that yesterday, and is not proud of that | 09:55 | ||
Nemokosch | yes, I'm not saying it's a good thing | 09:56 | |
But it's based on "evidence", so to speak, and regarding the given person. I tried to kinda swallow it but I can say if I ever contribute to MUGS, it will be in the form of an "unofficial" fork because of the contribution policies written there | 09:59 | ||
lizmat | link? | ||
Nemokosch | github.com/Raku-MUGS/MUGS/blob/mai...andards.md | 10:01 | |
I'm not saying this because I want to make some "public case" about it, and therefore I don't expect you to agree with me | 10:03 | ||
It's just I personally really don't feel positive about the "CoC-first development", like enforcing certain ideals is presented as more important as the content itself | 10:05 | ||
10:09
Marcool04 joined
|
|||
Marcool04 | Hi all! | 10:09 | |
lizmat | Well, gaming, unfortunately, has been an area, and many would argue still is, a world with a lot of misogyny and prejudices | ||
Marcool04 | I'm running into some problems when using Promise.anyof | 10:10 | |
lizmat | feels right to make an extensive CoC for that | ||
Marcool04 | Specifically, I notice that docs.raku.org/type/Promise#method_anyof says "The result of the completed Promise is not reflected in the result of the returned promise which will always be Kept." | ||
how does one go about doing that then? | |||
what I'm doing is trying to make a promise-factory kind function that, given a promise and a timeout, returns a "time caped" version of the promise, that will either just do whatever the promise should have, or throw an exception in case of a timeout | 10:11 | ||
lizmat | well, in the case of the code example there, one could set a flag in the "start" block to indicate that that is the one that kept the promise | ||
Marcool04 | right | 10:12 | |
yes that was my first thought, is there no issue of concurrency there? which thread is actually accessing the Bool when and such? | |||
lizmat | well, do you want the result of the non-timeout promise ? | 10:13 | |
Marcool04 | yes | ||
so something with .then I guess... | 10:14 | ||
lizmat | and you only have 1 timeout promise, and one other promise / start block ? | ||
Nemokosch | reminds me that I should also learn Promises 😅 | ||
gfldex | Marcool04: see: github.com/gfldex/raku-proc-async-...imeout.pm6 | ||
Marcool04 | lizmat: yes one promise, and one Promise.in($timeout) | 10:16 | |
gfldex: thanks I'm just trying to see if I can fix my example with help from that | |||
(what do you recommend as a codeshare for raku code here?) | 10:17 | ||
gfldex | gist works fine | ||
lizmat | Marcool04: maybe something like; gist.github.com/lizmat/180e31661db...56bc1bf0cd | 10:19 | |
check if the returned promise is Kept, then you know it didn't timout | 10:20 | ||
Marcool04 | right | 10:23 | |
but I need to pass a Promise to the function... | |||
gist.github.com/Marcool04/cfeca8df...f6f123f10d | |||
that's something that doesn't work... | 10:24 | ||
but has all the pieces in the way I would like them to work | |||
lizmat | that's because timeout_promise is returning the "anyof" promise | ||
instead of $p ? | |||
actually $promise | 10:25 | ||
also, why do you need to pass the promise, if the promise is always the result of a start block? | 10:26 | ||
or isn't it ? | |||
Marcool04 | it isnt | ||
that's just a simplified example | |||
lizmat | updated the gist to take a promise: gist.github.com/lizmat/180e31661db...56bc1bf0cd | 10:27 | |
Marcool04 | this function is used throughout a load of calls to an network endpoint, each call is in the form of a Promise, 99% of the time the Promise will succeed, but I wanted to guard against the risk of it hanging, with a timeout | ||
lizmat: does this reflect your changes gist.github.com/Marcool04/cfeca8df...f6f123f10d | 10:29 | ||
lizmat | yeah, basically | ||
Marcool04 | still fails the test :/ | ||
or is my test badly written? | |||
lizmat | badly written tests could be a case of a failing test, yes | 10:30 | |
Marcool04 | I did wonder about that :) | ||
I commented on my gist with the output | 10:31 | ||
the code dies, but not with the correct exception apparently | |||
oh no sorry, it doesn't even die | 10:32 | ||
ok, seems to work like this: gist.github.com/Marcool04/cfeca8df...f6f123f10d | 10:38 | ||
and I've now added a "positive" test case | 10:40 | ||
where the promise doesn't time out | |||
can you see anything wrong with it? | 10:41 | ||
lizmat | passes all tests for me | ||
10:42
bingos is now known as BinGOs
|
|||
lizmat | which version of Rakudo are you using ? | 10:42 | |
10:43
drakonis left
|
|||
Marcool04 | Welcome to Rakudo™ v2022.07. | 10:43 | |
Implementing the Raku® Programming Language v6.d. | |||
Built on MoarVM version 2022.07. | |||
lizmat | hmm... weird | 10:44 | |
Marcool04 | does it look like it should fail for you? | ||
lizmat | output: gist.github.com/lizmat/8a77b851249...ba9c7d9a09 | ||
looks to me it should pass and it passes :-) | 10:45 | ||
11:06
dac joined
11:07
dcx left
11:11
derpydoo joined
|
|||
tbrowder | g'day, all | 11:23 | |
11:24
andinus`` joined
11:26
andinus` left
|
|||
tbrowder | i'm trying to access the $=pod object from an external pod file. i've tried using @dmaestro's Module::Pod and Module::Loader but it expects an installed module (Compunit**). | 11:26 | |
i think jmerelo has a suitable $=pod extractor but i haven't yet found it again | 11:28 | ||
oops, never mind. raku.land is working much better now... | 11:31 | ||
11:31
epony left
11:33
jjido joined,
epony joined
|
|||
tbrowder | the one i'm looking for is jmerelo's Pod::Load. i hope that solves my problem. | 11:35 | |
11:42
xinming left
|
|||
tbrowder | that did it--kudos to jj and dwarring: good pipeline | 11:45 | |
11:46
xinming joined
|
|||
gfldex | tbrowder: sorry for not hepling you with something you didn't need help with! :-> | 11:47 | |
tbrowder | and antonocube. three sets of modulesthat can go from markdown to pod to pdf! | 11:49 | |
gfldex: you are welcome, i'm glad you're here as backup. i tend to use this place as a sounding board :) | 11:51 | ||
my wife is not much help (artistic, not geeky) | 11:52 | ||
you folks are like sherlock holmes' dr watson | 11:53 | ||
(who is not the dummy as portrayed in the old movies) | 11:55 | ||
12:06
reportable6 left
12:07
reportable6 joined
12:09
frost9 joined
|
|||
tbrowder | well, my excitement was premature. i was fooled by no errors, but visually the md2pdf flow is not yet ready for prime time | 12:13 | |
12:21
epony left
12:23
epony joined
12:35
jjido left
12:52
jjido joined
|
|||
guifa | ugh | 12:58 | |
12:59
derpydoo left,
jjido left
|
|||
guifa | I went to go push an update to Timezones::ZoneInfo and they made some upstream code changes that prevents a tool from compiling and I don't know enough C to fix it =/ | 12:59 | |
lizmat | meh | 13:00 | |
perhaps someone on #moarvm could be of help | |||
afk for a bit& | 13:02 | ||
Xliff | \o | 13:06 | |
Hi, lizmat! | |||
guifa | I can thankfully use the C code from the previous version but yeah... this is a bit annoying =/ | 13:08 | |
Xliff | \o guifa | 13:09 | |
guifa | o/ | 13:10 | |
Nemokosch | Hello 🤠 | ||
Xliff | o/ Nemokosch | 13:22 | |
Nemokosch | What are you up to today? | 13:24 | |
13:26
discord-raku-bot left
13:27
discord-raku-bot joined
13:35
epony left
13:38
epony joined
|
|||
Marcool04 | ok lizmat, gfldex thanks for your help, I think I have something that seems to work now... | 13:50 | |
gfldex | Concurrency tends to "seem" in general. :) | 13:51 | |
Nemokosch | works "seemlessly" | 13:55 | |
Marcool04 | yeah... didn't even realise I used to caveat words in that sentence... "I think" and "seems" | 13:57 | |
two caveat words* | |||
so, it "seems", until it next blow up | 13:58 | ||
the timeout think is only a small detail of the whole mess | |||
I'm trying to write an event-driven app that can either: receive commands from a cro webservice, react to a change on a supply tied to a piece of hardware, or react to events from an MPD server which I'm talking to over a socket... | 13:59 | ||
the whole things is, how should I put it. Precarious | |||
but *seems* to work 😅 | |||
14:06
jjido joined
|
|||
tbrowder | FYI, i just discovered a fatal bug in Markdown::Grammar, issue filed. | 14:08 | |
heh, i now have a good start on an advent article! | 14:09 | ||
md -> pod -> pdf | |||
14:20
frost9 left
14:22
Marcool04 left
14:30
coleman left,
coleman joined
14:35
coleman left
14:37
coleman joined
14:46
coleman left,
coleman joined
|
|||
tbrowder | erg, a new fatal bug in Markdown::Grammar... | 14:48 | |
but workaround is available for now | 14:52 | ||
14:57
thundergnat joined
|
|||
thundergnat | Xliff (or anyone who might be interested) I saw you woes with Term::ReadKey, had struggled with that in the past. I wrote an updated Terminal::Readkey that reads multibyte characters, wonder if you could test it to see if it would be useful. | 15:00 | |
It isn't in the ecosystem yet, but is on github. github.com/thundergnat/Terminal-ReadKey | |||
Can install with zef install git://github.com/thundergnat/Terminal-ReadKey.git to test it. | 15:01 | ||
15:37
derpydoo joined
15:40
epony left
15:43
epony joined
15:46
jjido left
16:16
derpydoo left
16:34
coleman left
16:36
coleman joined
16:54
derpydoo joined
17:28
jjido joined
17:44
epony left
17:46
epony joined
17:56
Sgeo joined
18:07
derpydoo left,
reportable6 left
18:09
reportable6 joined
|
|||
[Coke] | thundergnat: 'zef test .' in a git clone passes, fwiw. | 18:14 | |
(mac M2) | |||
... your test suite isn't testing anything, though. | 18:15 | ||
ugexe | looks like doc type graphs are showing '404' for some entries such as docs.raku.org/type/Distribution::Locally | 18:21 | |
docs.raku.org/type/Distribution::L...Type_Graph | 18:22 | ||
18:30
jjido left
18:39
coleman left
18:42
coleman joined
|
|||
tbrowder | ugexe: how do you feel about “zef upgrade some::missing::module” prompting something like “not found, install?” | 18:43 | |
ugexe | honestly removing `zef upgrade` altogether makes the most sense | 18:45 | |
`zef upgrade some::module` is already almost entirely the same as `zef insall some::module` since we can't just remove the old version | 18:46 | ||
i.e. `upgrade` doesn't make as much sense when you can have multiple versions of something installed / depended on | 18:47 | ||
`zef upgrade` is sort of useful in that it installs newer versions of anything, but not `zef upgrade $thing` | 18:48 | ||
s/anything/everything/ | |||
guifa | ugexe: perhaps if "upgrade" could install the new one and then recompile modules depend on the newer one (assuming their :ver<> would prefer the newer one) it could distinguish itself more? | 18:59 | |
18:59
jjido joined
19:00
jjido joined
|
|||
guifa | I know that would definitely increase the level of complexity, though | 19:00 | |
ugexe | things like optional dependencies make it mostly impossible for now | ||
there also isn't a public api for re-precompiling things, that would require additional core functionality | 19:02 | ||
such functionality would be useful for other stuff though. for instance the core could potentially detect orphaned dependencies | 19:04 | ||
19:16
Davidian joined
|
|||
lizmat | weekly: dev.to/lizmat/dont-fear-the-grepper-5-38bf | 19:23 | |
notable6 | lizmat, Noted! (weekly) | ||
19:29
Kaipei joined
19:30
Kaiepi left
19:34
Kaipei left
19:45
derpydoo joined
|
|||
tbrowder | ugexe: for a data point yesterday i did "zef upgrade" and got a good total upgrade run for lots of modules. sorry i didn't count them | 19:46 | |
19:48
epony left,
deoac joined
19:51
epony joined
19:52
yosik` joined
19:53
yosik left
19:57
Sgeo_ joined
20:00
Sgeo left
20:10
deoac left
|
|||
guifa | ugexe: yeah I figured it wasn't anything that could be done super soon, but just an idea of how it might oculd be made distinct from install | 20:23 | |
Actually, is there a module data storage location that could be used in, say, Build.pm6 that could be shared between versions? I don't think there is, but if there were, that would definitely solve some of my tz update issues | 20:34 | ||
20:45
coleman left
20:47
coleman joined
21:00
epony left
21:32
Kaiepi joined
21:48
jjido left
22:04
jgaz joined
22:08
Xliff left
|
|||
ugexe | just do `my $storage-location = $*HOME.add(".myapp/whatever");` | 22:12 | |
22:20
japhb left
22:22
japhb joined
22:27
jgaz left
22:28
jgaz left
|
|||
guifa | works but I guess it feels a bit... unsatisfying maybe? lol | 22:30 | |
22:39
guifa_ joined
22:40
yosik` left
22:42
guifa left
22:44
habere-et-disper joined
23:05
derpydoo left
23:32
archenoth left
23:33
Kaipei joined
23:36
Kaiepi left
23:48
archenoth joined
23:58
habere-et-disper left
|