🦋 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. |
|||
01:12
squashable6 left,
coverable6 joined
01:13
bloatable6 joined,
squashable6 joined,
unicodable6 joined,
benchable6 joined
01:14
committable6 joined,
notable6 joined,
reportable6 joined,
wildtrees left,
quotable6 joined,
cpan-raku left,
nativecallable6 joined
01:15
statisfiable6 joined,
releasable6 joined,
cpan-raku joined,
cpan-raku left,
cpan-raku joined,
shareable6 joined
02:10
marcusr joined
02:11
marcusr left
02:12
marcusr joined,
marcusr left,
marcusr joined
|
|||
cpan-raku | New module released to CPAN! LibXML (0.1.10) by 03WARRINGD | 02:28 | |
03:00
squashable6 left
03:01
squashable6 joined
03:06
Manifest0 joined
03:07
lgtaube left
|
|||
guifa is guessing the answer is no but … | 03:31 | ||
is it possible to detect if a variable is bound to another, if the original is not in scope (so WHICH can’t be compared) | |||
04:43
AlexDani` joined
04:47
AlexDaniel left
05:20
xinming_ left
05:21
xinming_ joined
05:26
laif joined
05:29
lgtaube joined
05:36
laif left
06:28
ZzZombo left
06:29
ZzZombo joined,
ZzZombo left,
ZzZombo joined
06:33
ZzZombo_ joined
06:36
ZzZombo left
06:37
ZzZombo_ is now known as ZzZombo
06:49
kubrat joined
06:51
stoned75 left
07:42
sarna joined,
sarna left
08:32
xinming joined
08:36
xinming_ left
08:52
laif joined
08:58
laif left
|
|||
SmokeMachine | .tell pmurias just curious… any news about the promise support? | 09:08 | |
tellable6 | SmokeMachine, I'll pass your message to pmurias | ||
09:22
abraxxa left
09:23
abraxxa joined,
pmurias joined
09:30
sena_kun joined
09:46
abraxxa left,
abraxxa joined
09:48
scimon joined
|
|||
SmokeMachine | hi pmurias! | 09:49 | |
10:02
Altai-man_ joined
10:04
finanalyst joined
10:05
sena_kun left
10:10
MasterDuke left
|
|||
pmurias | SmokeMachine: hi | 10:20 | |
tellable6 | 2019-11-20T09:08:02Z #raku <SmokeMachine> pmurias just curious… any news about the promise support? | ||
pmurias | SmokeMachine: re promises, I haven't got back to rakudo.js in a while, I'm writing my CV atm but I think once that's done I'll have some time to look into the promises | 10:21 | |
SmokeMachine | pmurias: Thanks | 10:22 | |
10:28
jnthn joined
10:34
finanalyst left
10:44
pmurias left
10:49
Guest85410 joined
|
|||
cpan-raku | New module released to CPAN! Math::FFT::Libfftw3 (0.3.2) by 03FRITH | 10:51 | |
11:30
mid_laptop joined
11:51
AlexDani` is now known as AlexDaniel,
AlexDaniel left,
AlexDaniel joined
12:03
sena_kun joined
12:05
joule joined,
Altai-man_ left,
shlomif joined
12:07
shlomif left,
rindolf left
12:08
rindolf joined
12:35
tejr joined
12:37
imataka7 joined
12:38
mid_laptop left,
imataka7 left
12:41
pmurias joined
12:42
Guest85410 left
12:44
xinming left
12:46
xinming joined
12:47
Guest38485 joined
13:00
giulianideon joined
13:03
joule left
13:21
abraxxa left
13:22
abraxxa joined
13:25
mid_laptop joined
|
|||
Geth | perl6.org: 7257ec6e9f | (Daniel Mita)++ (committed using GitHub Web editor) | source/resources/index.html Perl 6 -> Raku for exercism.io |
13:26 | |
scimon | So I've managed to write my first Advent thing (as this week work is quiet for various reasons). I now need to go through and fix my spelling. | 13:44 | |
I've also updated the p6advent-md2html.p6 script :) hope it helps. | 13:45 | ||
13:47
simcop2387 left
13:51
simcop2387 joined,
simcop2387 left,
simcop2387 joined
13:59
simcop2387 left
|
|||
tyil | scimon: `aspell -c` :D | 14:01 | |
14:02
Altai-man_ joined
14:03
simcop2387 joined
14:05
sena_kun left
|
|||
guifa | Ah crap, I submitted an issue to rakudo rather than problem solving | 14:06 | |
14:07
robertle joined
|
|||
AlexDaniel | hm, what if Cro::HTTP::Client just hangs when I try to do a request? | 14:23 | |
code: my $client = Cro::HTTP::Client.new(base-uri => "www.google.com"); say await $client.get('/first'); | 14:24 | ||
ZzZombo | Question: how does the compiler distinguish `$<foo>` as either accessing a named capture using `$/` shorthand or an anonymous state variable using just `$`? | 14:27 | |
Altai-man_ | AlexDaniel, cro is from master? Oh, stop, we had a release not so long ago... disable http/2, I am afraid. :( | ||
AlexDaniel | Altai-man_: :| | ||
Altai-man_ | AlexDaniel, an issue with CRO_TRACE=1 will be welcomed, though | 14:28 | |
AlexDaniel | Altai-man_: how do I disable http/2? | ||
Altai-man_ | AlexDaniel, :http<1.1> as an argument to `get` | ||
AlexDaniel | o that seems to work | 14:30 | |
Altai-man_: does this make sense? github.com/croservices/cro/issues/110 | 14:31 | ||
Altai-man_ | AlexDaniel, what about running with CRO_TRACE=1 logs? | 14:32 | |
14:33
mid_laptop left
|
|||
Altai-man_ | I can reproduce the hang, but logs are not very helpful, any luck they are clearer for you? | 14:34 | |
AlexDaniel | it just stops after Cro::TLS::Connector EMIT TCP Message | 14:35 | |
Altai-man_ | AlexDaniel, the same for me. :( ok, thanks, sorry for the inconvenience. | ||
AlexDaniel | yeah, a bummer :( | 14:36 | |
I can slap :http<1.1> on the client itself though, so it's a one line fix | |||
but that's… a bit weird when you're trying to fake a user agent :D | 14:37 | ||
like the existing browser one | |||
I wonder if there are any browsers that don't do http/2 | |||
Altreus | I expect TempleOS could do with a patch | 14:38 | |
AlexDaniel | :D | ||
14:50
pmurias left
15:07
pmurias joined
15:22
mid_laptop joined
|
|||
moritz | MS-DOS | 15:22 | |
AlexDaniel | Altai-man_: is there any shorthand for getting the body? | 15:28 | |
Altai-man_: I'm a bit tired of writing `await await($client.post(…)).body;` | |||
Altai-man_ | AlexDaniel, await $resp.body? no, no shortcuts I am aware of | ||
AlexDaniel | Altai-man_: maybe there needs to be something… `$client.post-body` that returns the body right away, but that looks kinda ugly | 15:30 | |
I guess I can write my own function for that but I really wish there was something for it already | 15:31 | ||
Altai-man_ | AlexDaniel, it does, and I think that the question here is that body can be streamed, like with files, for example | ||
so a shortcut for your particular case seems appropriate to me | |||
AlexDaniel | Altai-man_: sure but in most cases I just want to get the json back | ||
sub body { await await($_).body } | 15:33 | ||
15:58
zeylos joined
16:01
pmurias left
16:03
sena_kun joined,
abraxxa left,
abraxxa joined
|
|||
Altreus | AlexDaniel: don't forget there's .result | 16:03 | |
$client.post.result.body.result | 16:04 | ||
it's at least a bit tidier | |||
16:04
Altai-man_ left
|
|||
Altreus | It should return a «Promise but ResponseWithBody», which adds .body to the Promise, which just proxies self.result.body.result | 16:05 | |
imo | |||
16:06
abraxxa left
|
|||
AlexDaniel | I'll just use sub body($_) { await await($_).body } | 16:06 | |
:) | |||
16:06
abraxxa joined
|
|||
Altreus | jnthn: is that a silly idea of mine? ^ To enrole the Promises Cro returns with suitable helper methods? | 16:07 | |
I think it's called punning..? | |||
jnthn | I'm more inclined to put methods `.get-body`, `.post-body`, ..., `.request-body` onto Cro::HTTP::Client, for when you only want the body. | 16:15 | |
16:29
maettu left
|
|||
scimon | Where are we putting the Gists for the Advent calender? Links in the github.com/perl6/advent/blob/maste...9/schedule file? | 16:50 | |
moritz | scimon: why not just put it into the advent calendar wordpress? | 16:59 | |
17:02
mid_laptop left
|
|||
scimon | JJ said he recommended a gist draft... | 17:03 | |
I'll pick it up tomorrow. | |||
17:03
scimon left
|
|||
AlexDaniel | from what I remember, wordpress is absolutely horrible when it comes to code snippets and stuff | 17:11 | |
so the best process is a markdown gist which you then convert with a script | |||
17:17
robertle left
17:28
chloekek_ joined
|
|||
tbrowder | after doing the advent a few times, and struggling with wordpress, i'm thinking of writing in rakupod and using Pod::To::HTML. wordpress i think also takes raw html. | 17:52 | |
tadzik | it does, yes | 17:54 | |
generating html and copypasting it is the best way to do wordpress :) | |||
tbrowder | btw, notice there are two raku advent "sites" as wordpress calls it: the old perl6advent and the new rakuadvent site, both with the Raku in the alias or title. | 17:55 | |
AlexDaniel | ? two websites? | 17:56 | |
tbrowder | that'ts what i just saw. internally the old site has raku in the title, but there is also a raku site for which jmerelo sent invitations to join. | 17:58 | |
the new site shows no posts | 17:59 | ||
AlexDaniel | what's the link? | ||
tbrowder | in my account now i show three sites, those two plus my personal one. | 18:00 | |
let me go to my laptop... | |||
18:02
Altai-man_ joined
|
|||
tbrowder | site address: wordpress.com/view/rakuadventcalen...dpress.com | 18:02 | |
AlexDaniel | w… why?… | 18:03 | |
:S | |||
18:05
sena_kun left
|
|||
tbrowder | i dunno, ask jj | 18:09 | |
anyhoo, this page shows info on allowable html: en.support.wordpress.com/code/#html-tags | |||
AlexDaniel | jmerelo: why is there a separate raku advent blog? Why not use the existing one? | 18:28 | |
tellable6 | AlexDaniel, I'll pass your message to jmerelo | ||
guifa | jnthn: would you want me to close the github issue on rakudo re timezones and repost on problem solving? | 18:38 | |
18:48
wildtrees joined
|
|||
tyil | .tell jmerelo I've scheduled my advent blog posts | 18:56 | |
tellable6 | tyil, I'll pass your message to jmerelo | ||
tyil | feel free to review for mistakes | 18:57 | |
a proofreading would be much appreciated | |||
tbrowder | tyil: which WP site did you post on? | ||
tyil | wordpress.com/posts/my/scheduled/r...dpress.com | 18:58 | |
tbrowder | thnx | ||
19:05
MasterDuke joined
19:12
leont joined
|
|||
tbrowder | can anyone say what time is supposed to be entered in the WP scheduling window? the editor shows my local time is 6 hrs < UTC. so i assume i should schedule mine at 1801 the say before so it's published at 0001 UTC, correct? | 19:16 | |
s/say/day | 19:17 | ||
afk& (i hope we sort out desired WP site before too long) | 19:18 | ||
19:22
rindolf left
19:23
abraxxa left,
abraxxa joined
20:03
sena_kun joined
20:05
Altai-man_ left
20:17
MasterDuke left,
simcop2387 left
20:27
pmurias joined
20:43
giulianideon left
21:08
chloekek_ left
21:35
maxp69 joined
|
|||
maxp69 | p6: say 3; | 21:35 | |
camelia | 3 | ||
AlexDaniel | m: say 42 | 21:40 | |
camelia | 42 | ||
22:02
Altai-man_ joined
|
|||
Xliff | m: use MONKEY-SEE-NO-EVAL; my $search = "a"; my $replace = "b"; my $string = q[abxxabsssa]; say EVAL "\$string ~~ s:g/{$search}/{$replace}/"; $string.say; | 22:03 | |
camelia | (「a」 「a」 「a」) bbxxbbsssb |
||
Xliff | Is there any way to do that without the EVAL? | 22:04 | |
22:04
sena_kun left,
leont left
|
|||
moritz | m: my $search = "a"; my $replace = "b"; say q[abxxabsssa].subst(rx/<{ $search}>/, $replace, :global) | 22:05 | |
camelia | bbxxbbsssb | ||
moritz | Xliff: ^^ | ||
<{ ... }> is a mini-EVAL in a regex | |||
AlexDaniel | what is $search? Do you want it to be a pattern? | 22:06 | |
Xliff | Yes | ||
m: my $search = "a+"; my $replace = "b"; say q[abxxabsssa].subst(rx/<{ $search}>/, $replace, :global) | |||
camelia | bbxxbbsssb | ||
Xliff | m: my $search = "a{2..2}"; my $replace = "b"; say q[abxxabsssa].subst(rx/<{ $search}>/, $replace, :global) | 22:07 | |
camelia | abxxabsssa | ||
Xliff | m: my $search = "a{2..2}"; my $replace = "b"; say q[abxxaabsssa].subst(rx/<{ $search}>/, $replace, :global) | ||
camelia | abxxaabsssa | ||
AlexDaniel | did you mean a**2 ? | ||
Xliff | m: my $search = "a**2"; my $replace = "b"; say q[abxxaabsssa].subst(rx/<{ $search}>/, $replace, :global) | ||
camelia | abxxbbsssa | ||
Juerd | Xliff: Did you mean a**2 or a**{2..2}? | ||
Xliff | AlexDaniel++ Juerd++ | ||
m: my $search = "a**2 b"; my $replace = "z"; say q[abxxaabsssa].subst(rx/<{ $search}>/, $replace, :global) | 22:08 | ||
camelia | abxxzsssa | ||
Xliff | m: my $search = "a**2 b (..)"; my $replace = "z"; say q[abxxaabsssa].subst(rx/<{ $search}>/, $replace, :global) | 22:09 | |
camelia | abxxzsa | ||
Xliff | Niiice. | ||
22:10
maxp69 left
|
|||
Xliff | will MAIN handle (:@opt-arg) properly? | 22:16 | |
m: my @a = ( rx/a/, rx/z/ ); my $b = 'bz'; say $b ~~ @a.any | 22:42 | ||
camelia | True | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'kz'; say $b ~~ @a.any | ||
camelia | True | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'kz'; $b ~~ @a.any | ||
camelia | ( no output ) | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'kz'; $b ~~ rx/a/ | 22:43 | |
camelia | ( no output ) | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'kz'; say $b ~~ rx/a/ | ||
camelia | Nil | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'kz'; say $b ~~ rx/z/ | ||
camelia | 「z」 | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'ks'; say $b ~~ rx/a/ | ||
camelia | Nil | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'ks'; $b ~~ @a.any | ||
camelia | ( no output ) | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'ks'; say $b ~~ @a.any | ||
camelia | False | ||
Xliff | m: my @a = ( rx/a/, rx/z/ ); my $b = 'as'; say $b ~~ @a.any | ||
camelia | True | ||
22:50
cpan-raku left
22:51
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
Xliff | What's the best way to get a result out of a Junction? | 23:25 | |
my @a = <a b c d>; my @e = <a e d f>; for @e { say $_ eq @a.any } | 23:27 | ||
evalable6 | any(True, False, False, False) any(False, False, False, False) any(False, False, False, True) any(False, False, False, False) |
||
Xliff | So I want to get the 3rd boolean out of that... | ||
23:33
Altai-man_ left
|
|||
AlexDaniel | m: my @a = <a b c d>; my @e = <a e d f>; for @e { say $_ Xeq @a } | 23:35 | |
camelia | (True False False False) (False False False False) (False False False True) (False False False False) |
||
AlexDaniel | Xliff: don't use a junction then | ||
Xliff | :( | 23:58 | |
AlexDaniel: The value is stored in the Junction, why can't I access it. Especially in the case when it's NOT a boolean. | 23:59 | ||
AlexDaniel | #stopjunctionabuse | ||
jnthn | The design of junctions is predicated (pun intended :P) on their usage eventually being collapsed down to a single boolean outcome. |