»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
lizmat | re packages, you might want to check out nxadm.github.io/rakudo-pkg/ | 00:00 | |
00:01
astronavt joined,
silug joined
00:06
astronavt left
00:13
rindolf left
00:18
nadim_ left
00:43
patrickz_ joined
00:45
Cabanossi left
|
|||
Zoffix | "2017 Perl 6 Advent Day 2 – Perl 6: Sigils, Variables, and Containers": perl6advent.wordpress.com/2017/12/...ontainers/ | 00:45 | |
00:46
patrickz left
00:47
Cabanossi joined
00:49
margeas left
|
|||
lizmat | Zoffix: weird line ending at "implies (NL) a type-constraint" | 00:50 | |
Zoffix | Thanks. Fixed. | 00:54 | |
00:59
evalable6 joined,
ChanServ sets mode: +v evalable6
|
|||
lizmat | "$ = $ for $primes" ?? am I missing something ? | 01:00 | |
Zoffix: ^^^ | |||
Zoffix | lizmat: dunno. Why do you think you're missing something? The idea is nqp::null for $primes | ||
lizmat | shouldn't that be "$_ = $_ for $primes" ? | 01:02 | |
01:02
astronavt joined
|
|||
Zoffix | lizmat: doesn't matter. The problematic bit is the `|$primes` iteration itself, not what the for loop does | 01:02 | |
I just don't know anything better than `$ = $` for a null operation that doesn't emit a warning | 01:03 | ||
lizmat | then maybe "Nil for #primes" ? | ||
*$primes | |||
Zoffix | m: Nil for <a b c> | ||
camelia | ( no output ) | ||
Zoffix | How come that doesn't warn? | ||
lizmat | special cased afaik | ||
Zoffix | lizmat++ that is indeed better | 01:04 | |
TimToady | yes, that is special-cased | ||
01:05
comborico1611 left,
comborico1611 joined
|
|||
squashable6 | 🍕 tbrowder++ wrote a comment on “Fix table caption RT #126740”: github.com/rakudo/rakudo/pull/1291...-348654459 | 01:05 | |
synopsebot | RT#126740 [new]: rt.perl.org/Ticket/Display.html?id=126740 [POD] Pod::Block::Table node caption property is not populated properly | ||
Zoffix | Updated. | 01:06 | |
01:06
astronavt left
01:08
BenGoldberg joined
|
|||
jnthn | "It's easy to remember: it looks like a squished box" <3 | 01:08 | |
I never noticed :D | |||
Zoffix | :) | ||
Zoffix calls it a night | 01:11 | ||
\o | |||
jnthn | o/ | 01:12 | |
jnthn also, for that matter :) | |||
01:23
troys is now known as troys_
01:24
eliasr left
01:29
Cabanossi left
01:32
Cabanossi joined
|
|||
timotimo | m: my @stuff = (1, 2, (3, 4)), %(:42foo, :70bar); say flat @stuff»<> | 01:32 | |
camelia | (1 2 3 4 bar => 70 foo => 42) | ||
timotimo | m: my @stuff = (1, 2, (3, 4)), %(:42foo, :70bar); say (flat @stuff»<>).perl | 01:33 | |
camelia | (1, 2, 3, 4, :bar(70), :foo(42)).Seq | ||
01:33
astronavt joined
|
|||
timotimo | Zoffix: it may be a good idea to recommend map alongside the hyper op and point out the difference with regards to nested structures? | 01:33 | |
01:50
wamba left
01:57
pilne joined
|
|||
Zoffix | timotimo: which differences? | 02:02 | |
timotimo | m: my @stuff = (1, 2, (3, 4)), %(:42foo, :70bar); say (flat @stuff.map(*.<>)).perl | 02:03 | |
camelia | (1, 2, 3, 4, :bar(70), :foo(42)).Seq | ||
timotimo | oh, huh. | ||
i guess there wasn't one | |||
m: my @stuff = (1, 2, $(3, 4)), %(:42foo, :70bar); say (flat @stuff.map(*.<>)).perl | 02:04 | ||
camelia | (1, 2, $(3, 4), :bar(70), :foo(42)).Seq | ||
timotimo | m: my @stuff = (1, 2, $(3, 4)), %(:42foo, :70bar); say (flat @stuff»<>).perl | ||
Zoffix | m: my @stuff = (1, 2, $(3, 4)), %(:42foo, :70bar); say [].^lookup("AT-KEY").can: "nodal" | ||
camelia | (nodal) | ||
(1, 2, $(3, 4), :bar(70), :foo(42)).Seq | |||
timotimo | okay, never mind me! | ||
Zoffix | It's nodal, so it don't descend :) | ||
timotimo | that makes sense, yeah | ||
Zoffix | But I didn't check if it were when I was writing the article, so timotimo++ for noticing :) | ||
timotimo | going to bed, too | ||
02:05
joy joined
|
|||
timotimo | Zoffix++ Zoffix++ # two good posts | 02:05 | |
Zoffix | \o/ | ||
timotimo | hm. i guess i could have also contributed a post to the advent by using dragon speech recognition to circumvent my rsi | 02:06 | |
Zoffix | That would've been quite a commitment :) Rest. | 02:07 | |
Zoffix & | |||
02:16
Cabanossi left
02:17
Cabanossi joined
02:18
rp-- joined
|
|||
comborico1611 | Goodnight, everybody! | 02:21 | |
02:21
comborico1611 left
02:40
kitsunenokenja left
02:45
ilbot3 left
02:51
sivoais joined
02:53
piojo left
03:10
pentashift joined
03:11
pentashift left
03:12
cdg joined
03:15
Cabanossi left
03:16
cdg left
03:17
Cabanossi joined
03:26
astronavt left
03:35
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:43
ctilmes left
03:44
kitsunenokenja joined,
Cabanossi left
03:47
Cabanossi joined
03:50
cdg joined
03:58
rp-- left
04:15
Cabanossi left
04:16
Cabanossi joined
04:38
mson left
04:47
cdg left,
cdg joined
04:50
BenGoldberg left
04:52
cdg left
04:55
mson joined
05:07
Herby_ joined
|
|||
Herby_ | new advent of code problem up: adventofcode.com/2017/day/2 | 05:08 | |
there are some fast people out there | |||
teatime | hrm, that seems awfully easy/straightforward | 05:09 | |
teatime wonders what he's missing | |||
05:10
reportable6 left,
reportable6 joined
|
|||
Herby_ | probably nothing. the first few problems are typically pretty simple | 05:11 | |
gives the commoners like me a chance :) | |||
the difficulty does ramp up | |||
teatime | ah, it's only day 2 :) | 05:12 | |
gotcha | |||
Herby_ | .tell Zoffix: ++ on Day 2 advent article | 05:14 | |
yoleaux | Herby_: What kind of a name is "Zoffix:"?! | ||
Herby_ | .tell Zoffix ++ on Day 2 advent article | ||
yoleaux | Herby_: I'll pass your message to Zoffix. | ||
05:16
khw left
|
|||
Zoffix | Thanks. Glad you liked it. | 05:16 | |
yoleaux | 05:14Z <Herby_> Zoffix: ++ on Day 2 advent article | ||
05:37
wander joined
|
|||
wander | afternoon #perl6 | 05:38 | |
yoleaux | 1 Dec 2017 17:39Z <AlexDaniel> wander: OK rt.perl.org/Ticket/Display.html?id...xn-1511996 | ||
wander | ok | ||
05:39
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
Herby_ | I'm lacking sleep and caffeine but I'm confused with this | 05:49 | |
m: my $line = "86 440 233 83 393 420 228 491 159 13 110 135 97 238 92 396"; say $line.split(/\s/).max() | |||
camelia | 97 | ||
geekosaur | it found the lexical max | ||
not the numeric one | |||
Herby_ | doh | 05:50 | |
geekosaur | you use split, it produces Strs | ||
Herby_ | what would be the clean way to do that, given a string? | ||
simple for loop? | |||
teatime | m: my $line = "86 440 233 83 393 420 228 491 159 13 110 135 97 238 92 396"; say $line.split(/\s/)».Int.max() | ||
camelia | 491 | 05:51 | |
geekosaur | that yes | ||
teatime | is one possibility | ||
Herby_ | teatime: ++ | ||
teatime | yay I answered a question correctly | ||
Herby_ | :) | ||
05:51
kitsunenokenja left
|
|||
wander | m: my $line = "86 440 233 83 393 420 228 491 159 13 110 135 97 238 92 396"; say $line.words.max(*.Int) | 05:53 | |
camelia | 491 | ||
teatime | alas, that is nicer. | 05:54 | |
wander | wrap-handle we have :-) | ||
teatime | I might be tempted to split on [^0-9], but I guess you can trust your input | ||
wander | yes, it depends | ||
Herby_ | well, I solved Advent of Code Day 2 Part 1! adventofcode.com/2017/day/2 pastebin.com/mWqypbEr | 05:56 | |
not high achievement but I got tripped by that lexical max :( | |||
part 2 looks a tad trickier | 05:58 | ||
05:59
philomath_ joined
06:00
philomath_ left
06:06
Xliff_ joined
06:09
notbenh left,
notbenh joined
06:11
riatre joined
06:15
philomath_ joined
|
|||
Herby_ | Ok, part 2 completed. and I cleaned up part 1 | 06:27 | |
pastebin.com/jAzWKZgV | |||
If anyone has feedback on improvements, I'm all ears | |||
06:31
philomath_ left,
philomath_ joined
06:36
mcmillhj joined
|
|||
wander | Heyby_: line 21, is it `elsif`? how about $a == $b? | 06:36 | |
Herby_ | I did make a (luckily) correct assumption that they would be unique numbers for each line | 06:39 | |
are you saying to add another elsif to check if $a == $b? | |||
wander | replace `elsif` with `if` | 06:40 | |
06:40
pedh joined,
mcmillhj left
|
|||
Herby_ | ahhh | 06:41 | |
thanks! | |||
06:41
philomath_ left
06:49
pedh left
07:16
Todd joined
|
|||
Todd | HI all, A dumb question (but that never stopped me!) | 07:16 | |
Why does this work: $cmd = "/usr/bin/atop 1 1 > $GoodATop 2>&1"; $str = qqx{ $cmd }; | |||
but including the string on the qqx lie does not. Why do I need to use a variable? | 07:17 | ||
symptom: /bin/sh: /usr/bin/atop 1 1 > /opt/Cimcor/CimTrak/CimTrakServer/logs/atop.txt: No such file or directory | |||
$str = qqx{ "/usr/bin/atop 1 1 > $GoodATop 2>&1" }; doesn't work | 07:18 | ||
teatime | that's not getting shell quoted | ||
or rather, I think it is, but you put it in "" which get passed to the shell :) | |||
Todd | Oh, so leave the quotes off? | ||
teatime | try: $str = qqx{ /usr/bin/atop 1 1 > $GoodATop 2>&1 }; | 07:19 | |
yeah. qqx{} is itself the quoting construct | |||
Todd | Bugger. Thank yoU! | ||
worked perfectly Thank yoU! | 07:20 | ||
teatime | excellent. | ||
Todd | This one worked too! | 07:22 | |
my $str = qqx{ cd /opt/Cimcor/CimTrak/CimTrakServer; ./CimTrakServer.exe -Diagnostics \"Level=255\" > $GoodCimDiagErr 2>&1 }; | |||
07:22
wamba joined
|
|||
Todd | Will wonder ever cease! | 07:23 | |
geekosaur | I think the backslashes are unnecessary there | ||
teatime | do you even need to escape | ||
yeah | |||
geekosaur | in a "" string theyd be needed but here the quotes are { } | ||
so they unescape to " | |||
also I can't imagine $str contains much useful after that since you send it all to a file | 07:24 | ||
Todd | ordinarily no, but the program required it for some reason. | ||
It is ported from that "other" operating system, whose name I can not mention. | 07:25 | ||
geekosaur | qqx does because it's an expression. you probably wanted | ||
teatime | Todd: VMS? | ||
geekosaur | shell " cd /opt/Cimcor/CimTrak/CimTrakServer; ./CimTrakServer.exe -Diagnostics \"Level=255\" > $GoodCimDiagErr 2>&1 " | ||
and here you do need the escapes | 07:26 | ||
teatime | well only because you chose to use " " ;) | ||
geekosaur | also note that, as with perl 5's ``, using qqx when you don;t need the output is kinda expensive | ||
yes, I could have used « » or something instead | 07:27 | ||
also, uh, good luck running that on VMS :p | |||
directories don't work the same way, redirection requires something that looks more like JCL than Unix | 07:28 | ||
teatime looks at geekosaur. | |||
geekosaur | (yes, I know. ironically that'd actually stand soem chance of working as is on modern windows) | ||
teatime | oh, the command line | ||
geekosaur | simple Bourne-shell-style redirections have worked in cmd.exe since windows nt 3.5 and win98 (win95 had a few more limitations but I think that one did work) | 07:29 | |
ok, modulo the slashes needing to be backslashes in cmd.exe | 07:30 | ||
teatime | heh | ||
Todd | This is Fedora 27. I need the quotes and backslash when run from the (bash) command line too. I was warned by the program's tech support. It also has to run in its own directory too. Weird, but .. | 07:31 | |
geekosaur | oh, one of those programs. bad win port | 07:32 | |
in that case I would actually be surprised that the qqx one worked because perl would strip the backslashes before it went to the shell | |||
Todd | I asked this last time, but has anyone come up with a better perl 6 for win 32? I really do not want to use Perl 5. | 07:33 | |
geekosaur | last I heard the win32 build reliably ran out of memory | ||
while building | 07:34 | ||
Todd | I got the above to work trial and error. I had the 2>&1 redirect wrong and you guys helped me figure it out. | ||
geekosaur | might be fixable but I don't think we have anyone working on perl 6 who has a win32 setup | ||
(like, I have a windows vm always running but it's 64 bit) | 07:35 | ||
07:35
anant joined
|
|||
Todd | that is what I heard. Any way to build a win32 msi on a 64 bit system? | 07:35 | |
anant | Does perl6 support nested classes? | ||
teatime | yes. | ||
geekosaur | (and insufficient memory to run a second concurrently, and I use the main one often enough that shutting it down kinda messes things up) | ||
it would have to be a cross-build and I don't think that's currently supported | 07:36 | ||
Todd | bugger. | ||
teatime | ... did I just lie | ||
geekosaur | (windows has odd restrictions. best bet might be to try to get a wow32 build env; not sure how painful that is.) | ||
nested classes should work fine | |||
Todd | anyone know what the P5 equivalent of slurp and spurt is? | 07:37 | |
geekosaur | but accesses might be funny | ||
Todd | When building Wine Staging, I have a "./configure --disable-win64" option. Nothing like that for Perl6? | 07:39 | |
geekosaur | don't think there is a spurt. slurp is { my $o = select $fh; local $/ = undef; my $r = <$fh>; select $o; $r } assuming $fh is the filehandle (this can be simplified a bit in some circumstances) | ||
anant | I didn't an example of a nested class in docs.perl6.org/language/objects | ||
geekosaur | that tells wine to not build win64 emulation into it, not that it should build a win32 program | ||
anant | I didn't = I didn't see | ||
Todd | no sign of either over on perldoc.perl.org/index-functions.html#S | ||
geekosaur | it'll generate a 64-bit executable that only handles win32 emulation | ||
m: class A { has $.a; class B { has $.b }}; my $x = A::B.new(b => 6); say 'alive' | 07:40 | ||
camelia | alive | ||
geekosaur | so it may depend on what you mean by nested | 07:41 | |
since it's mostly namespacing not e.g. need an A to make an A::B | |||
heh. back in the old days FileHandle.pm had a slurp but it looks like current IO::Handle lacks it | 07:45 | ||
07:45
aborazmeh left
|
|||
geekosaur | I recall it being somewhat discouraged | 07:46 | |
although there were two camps on the issue | |||
anant | Thanks geekosaur and teatime :) | ||
teatime | geekosaur++ | 07:47 | |
anant | teatime++ | ||
geekosaur | oh, if you wanted that nested class to only be accessible nside of class A, it's 'my class B { ... }' | 07:51 | |
07:53
darutoko joined
|
|||
anant | ok. Are nested classes discouraged in general? I searched many perl6 tutorials, but didn't see them mentioned. | 07:53 | |
buggable | New CPAN upload: Inline-Go-0.0.4.tar.gz by AZAWAWI cpan.metacpan.org/authors/id/A/AZ/...0.4.tar.gz | ||
geekosaur | not so much discouraged as of dubious use | 07:54 | |
07:55
Todd left
|
|||
anant | Hmm. Does Perl6 have a "Zen" guide like Python (www.python.org/dev/peps/pep-0020/) | 07:56 | |
geekosaur | nope. | ||
anant | It would be nice to have :) | 07:57 | |
I liked how the Python Zen said: Flat is better than nested. | |||
geekosaur | python is One Correct Way; perl is There Is More Than One Way To Do It | ||
anant | ah! | ||
geekosaur++ | |||
geekosaur | which is why perl 6 mixes OO, FP, procedural, etc. and lets you mix and match according to need or convenience | 07:58 | |
I imagine some conventions will eventually be agreed on by the community, but p6 is young enough that there aren't many such yet | 08:00 | ||
wander | still so many things TODO | 08:03 | |
anant | Hmm. | 08:04 | |
wander | that is why i am somewhat anxious about our Advent Calendar Day1. feature `but` has several known bugs | 08:05 | |
but, perl6 makes code happy | 08:06 | ||
08:06
rindolf joined
|
|||
geekosaur | well, it *was* about ruining christmas... :p | 08:06 | |
wander | that is the most important to me, my thoughts could be expressed freely | 08:07 | |
08:09
setty1 joined
08:12
anant left
08:21
nadim joined
08:23
sena_kun joined
08:28
Cabanossi left
08:31
Cabanossi joined
08:39
a3f joined
08:48
mson left
08:51
donaldh_ joined
08:52
donaldh_ is now known as donaldh
08:58
philomath_ joined
08:59
philomath_ left
09:00
philomath_ joined
09:09
troys_ is now known as troys
09:11
raiph left
|
|||
Geth | mu: 972e9bc5ce | (Moritz Lenz)++ | misc/perl6advent-2017/schedule Per 6 advent: commit to day 8 |
09:24 | |
09:25
philomath_ left,
philomath_ joined
09:26
Phi_mb joined,
Phi_mb left
09:29
domidumont joined
09:35
philomath_ left,
Phi_mb joined,
Phi_mb left
09:36
domidumont left,
domidumont joined
09:43
troys left
09:48
cdg joined
09:52
cdg left
09:58
Cabanossi left
10:01
jeek left,
Cabanossi joined
10:17
pdcawley joined
10:18
stmuk left,
stmuk joined
10:22
rindolf left
10:29
Cabanossi left
10:31
Cabanossi joined
10:34
pdcawley left
10:39
reportable6 left,
reportable6 joined
10:40
someuser left
10:42
margeas joined
10:47
rindolf joined
10:48
reportable6 left
10:49
reportable6 joined,
ChanServ sets mode: +v reportable6
10:50
reportable6 left,
reportable6 joined
|
|||
AlexDaniel | squashable6: status | 10:51 | |
squashable6 | AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 1 day and ≈1 hour. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel, Log and stats: gist.github.com/db790f480c845f3b3e...c78e787ee0 | |||
AlexDaniel | reportable6: 2017-12-01T07:33:00Z 2017-12-02T06:00:00Z | 10:52 | |
reportable6 | AlexDaniel, OK, working on it! This may take up to 40 seconds | ||
10:52
reportable6 left,
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
AlexDaniel | reportable6: 2017-12-01T07:33:00Z 2017-12-02T06:00:00Z | 10:52 | |
reportable6 | AlexDaniel, OK, working on it! This may take up to 40 seconds | ||
bartolin | kupopo: yeah, unfortunately the jvm backend was badly broken when Rakudo Star 2017.10 was released. it should look a bit better (and actually be installable) on HEAD. there are major problems, still (e.g. 'make' does not work before 'make test', nativecall is broken). i added some details to your gist: gist.github.com/shicks/27df7cf0d86...50942d4c62 | 10:53 | |
yoleaux | 1 Dec 2017 23:56Z <lizmat> bartolin: is gist.github.com/shicks/27df7cf0d86...50942d4c62 something you'd expect from a "make install" ? | ||
reportable6 | AlexDaniel, gist.github.com/7535fa27421221ed95...8ed234dd79 | ||
AlexDaniel | wander: ↑ progress so far :) | ||
bartolin | AlexDaniel++ | 10:54 | |
AlexDaniel | buggable: tag MOLD | 10:55 | |
buggable | AlexDaniel, There are 191 tickets tagged with MOLD; See fail.rakudo.party/t/MOLD for details | ||
wander | AlexDaniel++ | 10:58 | |
hahainternet | .min and .max on an array of strings gives back nonsense results | 10:59 | |
».Numeric solves it, but I wouldn't expect them to give back such weird outputs | 11:00 | ||
AlexDaniel | hahainternet: why so | ||
hahainternet | the strings don't get coerced into the numbers they represent though, i am far too perl6 ignorant to discover why | ||
AlexDaniel | m: say <abcdoeu sthiozeu uloeuhal>.max | ||
camelia | uloeuhal | ||
AlexDaniel | m: say <abcdoeu sthiozeu zzozzzt uloeuhal>.max | ||
camelia | zzozzzt | ||
AlexDaniel | m: say <abcdoeu sthiozeu zzozzzt uloeuhal>.min | ||
camelia | abcdoeu | ||
hahainternet | AlexDaniel: i understand | ||
but this kinda violates the whole cool interoperability of strings/numbers in perl doesn't it? | 11:01 | ||
perl6* | |||
AlexDaniel | I don't think so. You gave it a list of strings, and then asked for the max element | ||
hahainternet | i actually gave it just a list, never specifying strings | 11:02 | |
(semantics i know, but from a programmer's perspective it's important) | |||
geekosaur | you have it a list of things that don't look like numbers | ||
hahainternet | they certainly do look like numbers | ||
geekosaur | if they look like numbers then you get IntStr-s | ||
if they don't then you get Str-s | |||
AlexDaniel | what's the code we're talking about? | ||
geekosaur | (this means you can actually get a mixture) | ||
hahainternet | AlexDaniel: it's just for AOC #2, for 'file'.IO.lines -> $l { my @n = $l.split(/\t/); } | 11:03 | |
presumably that produces some sort of hard String type | |||
that won't coerce in a cool way | 11:04 | ||
AlexDaniel | well, you took a string and split it, so you got strings back | ||
geekosaur | ^ | ||
hahainternet | ok, how would i recover the cool behaviour? | ||
geekosaur | we discussed thsi earlier, actually, split is a Str operation, it will always give you Strs | ||
AlexDaniel | hahainternet: $l.split(/\t/)».Cool ? :) | 11:05 | |
geekosaur | $l.split(/\t/)>>.Int (or that) | ||
AlexDaniel | that doesn't work :( | ||
hahainternet | AlexDaniel: doesn't appear to exist? | ||
geekosaur: doing ».Numeric, so that's fine | |||
AlexDaniel | .IntStr doesn't work too | ||
hahainternet | anyhow not a major complaint, but it felt a bit wart-y | 11:06 | |
AlexDaniel | lizmat: any reason why we don't have Str.IntStr ? | ||
geekosaur | too much magic has its own problems | ||
"every DWIM has a WAT" | |||
hahainternet | geekosaur: speak for your own wizardry ;) | ||
geekosaur | you say that now... | ||
hahainternet | no i know what you're saying | 11:07 | |
but it should be up to the programmer to opt in or out to the wizardry they want | |||
and i got opt-outed by default :) | |||
geekosaur | because it's easy to opt back in with the hyperop | ||
hahainternet | geekosaur: right but it isn't, that only coerces, it doesn't restore the cool behaviour i mentioend | ||
i mean my problem is solved, so ty | |||
geekosaur | and you have more control, which matters quite a lot in many cases | ||
geekosaur keeps being reminded of nancy typing | 11:08 | ||
AlexDaniel | hahainternet: but you can also think about performance. That is, should it actually look into every single element returned from .split, and check if it's a number or not? | ||
hahainternet | AlexDaniel: if it's an IntStr sure? :) | ||
geekosaur | (which was p5's "cool" behavior gone wrong plus a NaN parsing issue) | ||
hahainternet | i don't mean the existing case should be changed | ||
i would just like ».Cool or ».IntStr as you gave as an example | 11:09 | ||
AlexDaniel | hahainternet: not sure I understand, how would it know if it's an IntStr? :) | ||
hahainternet | AlexDaniel: methods are dispatched on types? i'm not suggesting .split or anything do the coercion | 11:10 | |
11:10
Aaronepower joined
|
|||
geekosaur | you seem to think a type is determined solely by looking at it. do you really want everything that touches it to have to compute its current type first | 11:11 | |
hahainternet | geekosaur: where do i think that? I just would like a way to coerce them | ||
11:09.07 < hahainternet> i would just like ».Cool or ».IntStr as you gave as an example | |||
lizmat | AlexDaniel: I don't see a reason not to have Str.IntStr | 11:13 | |
but I would make it slightly more involved than just IntStr.new(self.Int,self), because with that, any error in converting to Int becomes multi-level, and thus complicated | 11:15 | ||
m: dd "foo".Int | |||
camelia | Failure.new(exception => X::Str::Numeric.new(source => "foo", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new) | ||
lizmat | as Str.Int returns a Failure, that will explode when trying to bind | ||
so if self.Int returns a Failure, you should throw that immediately, I think | |||
wander | m: my $x = IntStr.new(12, "42"); say $x + 4; say $x; | 11:16 | |
camelia | 16 42 |
||
wander | the evil way :) | ||
AlexDaniel | m: my $x = IntStr.new(12, "I'm not a Str, get off my lawn!"); say $x + 4; say $x; | 11:21 | |
camelia | 16 I'm not a Str, get off my lawn! |
||
lizmat | not too dissimilar from dualvar() in P5 :-) | 11:28 | |
handy for things like errno(), where the Str version contains the error message | 11:29 | ||
11:31
poohman joined
11:33
stmuk left
|
|||
squashable6 | 🍕 W4anD0eR96++ opened issue “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/1292 | 11:34 | |
poohman | hello all, I have a question regarding grammar tokens - if the * is for zero or more, why does the following token work and not the next | 11:36 | |
token frame {\s*<top_left>\r\n\s*<date_or_time>'</TD>'\r\n} | |||
the above works | |||
wander | mainly about consistency, not have to be kebab-case | ||
poohman | token frame {\s*<top_left>\s*\r\n\s*<date_or_time>'</TD>'\r\n} | ||
the only difference is the \s* before \r | 11:37 | ||
geekosaur | because * is greedy and \r and \n both match \s, so you have \s*\s* which is kinda asking for problems | ||
wander | what is the text? | ||
geekosaur | or put otherwise, you've given that regex *way* too much rope | 11:38 | |
wander | m: say so "\r\n" ~~ /\s*/ | ||
camelia | True | ||
wander | m: say so "\r\n" ~~ /\s*?\r\n/ | ||
camelia | True | ||
11:39
espadrine left
|
|||
wander | also note that it's 'token' | 11:39 | |
so backtracking is disable | 11:40 | ||
geekosaur | (I oversimplified that a bit; the reality is that it's got far too many ways to match --- and token is ratcheting, so once the first \s* commits to matching the \r\n, it can;t backtrack when it sees the literal ones | ||
poohman | ok | ||
geekosaur | so (a) since it can;t backtrack, it can't "unmatch" the \r and \n it committed to the first \s* and will fail when it hits them in the pattern (b) and if you make it non-ratcheting, it will be sloooooooooooooooow | 11:41 | |
squashable6 | 🍕 AlexDaniel++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348686524 | ||
🍕🍕🍕 First contribution by lizmat++! ♥ | 11:42 | ||
poohman | super - thanks | 11:44 | |
11:44
ZzZombo joined
|
|||
squashable6 | 🍕 tbrowder++ wrote a comment on “Fix table caption RT #126740”: github.com/rakudo/rakudo/pull/1291...-348686656 | 11:44 | |
synopsebot | RT#126740 [new]: rt.perl.org/Ticket/Display.html?id=126740 [POD] Pod::Block::Table node caption property is not populated properly | ||
squashable6 | 🍕 lizmat++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348686720 | 11:45 | |
11:49
Aaronepower left
11:50
pdcawley joined
11:52
ctilmes joined
|
|||
squashable6 | 🍕 W4anD0eR96++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348687536 | 12:01 | |
AlexDaniel | buggable: tag TESTNEEDED | 12:07 | |
buggable | AlexDaniel, There are 49 tickets tagged with TESTNEEDED; See fail.rakudo.party/t/TESTNEEDED for details | ||
12:11
ChoHag joined
|
|||
squashable6 | 🍕 W4anD0eR96++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348688003 | 12:11 | |
12:19
Aaronepower joined
|
|||
pdcawley | jamesnvc: I'm not sure that Emacs has a concept of a <menu> key by default. However, you can pick something (say Key_Menu or whatever) and then use `key-translation-map` to map from whatever emacs thinks it is initially, to `(kbd "<menu>")`, and you should be able to bind to `(kbd "<menu>")` rather than the weird name. | 12:20 | |
AlexDaniel | pdcawley: that's great to know, but is it the right channel? :D | 12:27 | |
pdcawley | Arse! | ||
And, it turns out, I'm wrong. Emacs _does_ know about the menu key. | |||
AlexDaniel | pdcawley: yeah, it defaults to M-x I think | ||
12:29
kitsunenokenja joined,
poohman left
|
|||
pdcawley | AlexDaniel: Keyboards are weird. | 12:29 | |
AlexDaniel just realized he has no menu key | |||
(there's PrtSc on its place, wtf) | 12:30 | ||
12:30
ChoHag left
|
|||
AlexDaniel | pdcawley: some keyboard *layouts* are weirder. I remapped my spacebar to AltGr :) | 12:32 | |
pdcawley | AlexDaniel: Don't talk to me about weird layouts. I've got a KeyboardIO model 01, 64 keys in an an approximation of the Malt layout ('E' on the left thumb, ANIS/THOR on the home row. | 12:33 | |
AlexDaniel | (or is it other way around? What I meant is that my spacebar is AltGr now) | 12:34 | |
pdcawley: oh, that one is cool. Have you seen X-Bows by the way? Another relatively similar keyboard, although it probably doesn't come with a crazy keyboard layout :) | 12:35 | ||
pdcawley | Nope. But I do have an original Maltron that I've cut down to a 64 key matrix, rewired and rebrained to do NKRO and other such stuff, and a Kinesis that I keep meaning to hack palm keys into (and possibly rebrain, but it's got more sophisticated hardware than the Maltron, which was entirely hand wired to begin with. | 12:37 | |
AlexDaniel | maaaan… keyboardio should really come with perl 6 manual or something :D | 12:38 | |
12:38
epony joined
|
|||
pdcawley | AlexDaniel: Yeah, I'm sure obra will be up for that. Right after he's managed to get enough enclosures out of his wood suppliers to ship everything after the first 1000 kickstarter orders. | 12:39 | |
AlexDaniel: Not. (And not just because I just spotted obra lurking in here) | 12:40 | ||
12:42
poohman joined,
poohman left,
poohman joined
12:44
Cabanossi left
12:46
Cabanossi joined
12:54
stmuk joined
|
|||
AlexDaniel | obra: imgur.com/a/J06Ve | 12:54 | |
12:56
ChoHag joined
|
|||
El_Che | wow, man, those keyboard are expensive | 13:04 | |
(on the other hand, I spend €92 today on a mouse) | 13:05 | ||
"jesse vincent" <-- p5's Jesse vincent? | 13:07 | ||
13:08
natrys joined
13:12
ChoHag left
13:19
ctilmes left,
ctilmes joined
13:20
konsolebox left,
konsolebox joined
13:21
xcm left
13:23
xcm joined
13:28
Cabanossi left
13:31
Cabanossi joined
13:35
poohman left
13:40
mson joined
|
|||
tyil | Zoffix: poke | 13:42 | |
Zoffix: in the advent article, under the "The One And Only" heading, it has a sentence "Since scalars, as the same suggests, contain just one thing… ", should "same" not be "name" there? | |||
13:42
pmurias joined
|
|||
pmurias | in roast we test tan(pi/2) | 13:43 | |
is-approx tan(my num $ = π/2), (sin(π/2) / cos(π/2)) | 13:44 | ||
is tan(pi/2) something we can expect sane values for | |||
AlexDaniel | pmurias: I dunno, but fwiw python returns something similar | 13:47 | |
13:47
cdg joined
|
|||
AlexDaniel | and ruby too | 13:49 | |
squashable6 | 🍕 jnthn++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348693494 | 13:53 | |
🍕🍕🍕 First contribution by jnthn++! ♥ | |||
pmurias | jnthn: how should I get more than 14 digits of a floating point number in NQP? | 13:54 | |
13:54
piojo joined
|
|||
jnthn | pmurias: No idea, I thought the "normal" stringification of a float would include all of the available precision? | 13:55 | |
If not, maybe we should check why not. | |||
lunch, bbiab | |||
13:55
rindolf left
|
|||
pmurias | jnthn: it's set to 14 | 13:56 | |
err 15 | 13:58 | ||
a double has ~15.9 decimal digits of precision | 13:59 | ||
13:59
rindolf joined
|
|||
dogbert17 | pmurias: I seems to remember there being a few RT's about that. Perhaps AlexDaniel has the RT numbers in his head :) | 14:00 | |
14:03
poohman joined
|
|||
pmurias | the problem I have is that when emitting floating point literals I get wrong numbers | 14:04 | |
AlexDaniel | down to 179 MOLD tickets \o/ | ||
pmurias | what are MOLD tickets? | 14:05 | |
AlexDaniel | dogbert17: no idea. RT#127184 ? | 14:06 | |
synopsebot | RT#127184 [open]: rt.perl.org/Ticket/Display.html?id=127184 [BUG] One digit short to correctly stringify a double | ||
AlexDaniel | pmurias: tickets that were not updated in more than one year or so | 14:07 | |
fail.rakudo.party/t/MOLD | |||
squashable6: status | 14:08 | ||
squashable6 | AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈21 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel, Log and stats: gist.github.com/15ec6884b94a7088aa...1c430be6a3 | |||
dogbert17 | AlexDaniel: yes, and perhaps RT #127201 as well | 14:14 | |
synopsebot | RT#127201 [new]: rt.perl.org/Ticket/Display.html?id=127201 sprintf() float precision cannot go beyond 15[efg] | ||
AlexDaniel break & | 14:23 | ||
14:24
philomath_ joined
14:28
domidumont left
14:29
ChoHag joined
14:30
domidumont joined
14:35
domidumont left
14:36
steve joined
|
|||
AlexDaniel | here is a low-hanging fruit that can close 3 tickets: RT#124624 | 14:36 | |
synopsebot | RT#124624 [open]: rt.perl.org/Ticket/Display.html?id=124624 [LHF] :./S02-magicals/KERNEL.t line:8 reason: 'unimpl 0KERNEL' | ||
14:37
poohman left
14:38
poohman joined,
poohman left
14:39
philomath_ left
|
|||
AlexDaniel | Actually 5, if you also unfudge $*DISTRO tests | 14:39 | |
14:40
philomath_ joined,
poohman joined
|
|||
AlexDaniel | and 7 if you do the same with $*VM | 14:41 | |
pmurias | m: say $?KERNEL | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$?KERNEL' is not declared. Did you mean 'Kernel'? at <tmp>:1 ------> 3say 7⏏5$?KERNEL |
||
pmurias | m: say $*KERNEL | 14:42 | |
camelia | linux (4.4.70.18.9.default) | ||
AlexDaniel | actually 16, if you do the same with $*PERL… :) | ||
pmurias | AlexDaniel: $?KERNEL has to be actually implemented first before we unfudge it right? | ||
AlexDaniel | didn't we decide to have $*KERNEL instead of $?KERNEL? or is there supposed to be a difference? | 14:43 | |
14:44
Cabanossi left
|
|||
pmurias | isn't $?KERNEL the kernel we are compiling under as opposed to the $*KERNEL we are running under? | 14:45 | |
14:46
Cabanossi joined
|
|||
AlexDaniel | uhhhh… I see… | 14:46 | |
yeah, I guess I'm wrong then | 14:47 | ||
pdcawley | El_Che: And the first perl 6 project manager Jesse Vincent, yes. Or obra. | 14:49 | |
14:52
philomath_ left
|
|||
AlexDaniel | well ok, at least these tickets no longer have mold because I linked them all together | 14:54 | |
14:56
raiph joined
|
|||
wander | m: .say for [[1,2,3]][0] | 15:04 | |
camelia | 1 | ||
wander | m: .say for [[1,2,3]][0].Array | ||
camelia | 1 | ||
wander | m: .say for [[1,2,3],][0] | 15:05 | |
camelia | [1 2 3] | ||
wander | m: .say for [[1,2,3],][0].Array | ||
camelia | 1 2 3 |
||
wander | most frequent asked question about 'container' | 15:06 | |
15:08
poohman left
|
|||
wander | m: say |[[1,2,3],[4,5,6]] | 15:08 | |
camelia | [1 2 3][4 5 6] | ||
wander | m: say [|[1,2,3],|[4,5,6]] | ||
camelia | [1 2 3 4 5 6] | ||
jnthn | Well, single arg rule as well as containers :) | 15:09 | |
pmurias | hmm, is there a way to exactly serialize a double to javascript? | 15:13 | |
wander | m: say reduce { $^a.append: $^b.flat }, [[1,2,3],[4,5,6]] | 15:17 | |
camelia | [1 2 3 4 5 6] | ||
15:22
SHODAN joined
15:24
ctilmes left
|
|||
wander | m: say [1,2,3] + [4,5,6] | 15:26 | |
camelia | 6 | ||
wander | m: say +[4,5,6] | ||
camelia | 3 | ||
El_Che | pdcawley: nice project. I saw something on twitter about it. | 15:28 | |
15:32
darutoko left
15:44
domidumont joined,
Cabanossi left
|
|||
wander | m: say gather for [[1,2,3],[4,5,6]] { .take for .flat } | 15:44 | |
camelia | (1 2 3 4 5 6) | ||
15:45
khw joined
15:46
Cabanossi joined
15:50
mson left
|
|||
wander | m: [[1,2,3],[4,5,6]].join('#').split('#') # dirty | 15:51 | |
camelia | ( no output ) | ||
15:58
rindolf left
16:02
rindolf joined
|
|||
Herby_ | o/ | 16:10 | |
Zoffix | tyil: thanks. Fixed. | 16:16 | |
Herby_: you were looking for containers article the other day. It's now up: perl6advent.wordpress.com/2017/12/...ontainers/ | 16:17 | ||
Herby_ | Zoffix: o/\o gonna read it this morning, just waiting for my coffee to brew :) | 16:18 | |
16:33
perlpilot_ joined
16:34
Sgeo_ joined
|
|||
squashable6 | 🍕 zoffixznet++ wrote a comment on “MOP ^add_method could be renamed as ^add-method”: github.com/rakudo/rakudo/issues/12...-348703641 | 16:40 | |
16:43
Zoffix left
16:44
ZzZombo left
16:47
ZzZombo joined
16:54
ctilmes joined
|
|||
El_Che | developers.slashdot.org/story/17/1...edium=feed | 16:56 | |
First comment hasn't been claimed yet :) | |||
timotimo | didn't we have some kind of decision to have underscores as part of "internalsy" names? | 17:08 | |
17:08
poohman joined
17:11
someuser joined
|
|||
teatime | heh, (10!) seconds is exactly 6 weeks. neat. | 17:12 | |
17:13
sftp joined
|
|||
timotimo | hm, 3 * 4 is already 12, and 2 * 12 is 24, that's the "60 seconds per hour" bit | 17:14 | |
um, that's the 24 hours per day bit, of course | 17:16 | ||
take 6 and 10 to get the 60 seconds per hour | |||
17:16
sftp left
|
|||
teatime | that's a neat way of looking at it that did not occur to me. | 17:16 | |
timotimo | you're left with 4, 5, 7, 8, 9; it's probably easy to figure out how to re-arrange them to get to 6 weeks, but i'm in a tiny hurry | ||
teatime | </nerdsniped> | 17:17 | |
timotimo | m: (6 * 7 * 24 * 60) / (2 * 3 * 4 * 6 * 10) | ||
camelia | WARNINGS for <tmp>: Useless use of "/" in expression "(6 * 7 * 24 * 60) / (2 * 3 * 4 * 6 * 10)" in sink context (line 1) |
||
timotimo | m: say (6 * 7 * 24 * 60) / (2 * 3 * 4 * 6 * 10) | ||
camelia | 42 | ||
timotimo | m: say 4 * 5 * 7 * 8 * 9 | ||
camelia | 10080 | ||
timotimo | i made a mistake somewhere | 17:18 | |
m: say (6 * 7 * 24 * 60) / (2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10) | |||
camelia | 0.016667 | ||
17:18
perlpilot_ left
|
|||
timotimo | so .. not quite? | 17:18 | |
teatime | wth | 17:19 | |
m: say (6 * 7 * 24 * 60 * 60) / (2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10) | |||
camelia | 1 | ||
timotimo | oh, haha | ||
i forgot to go from minutes to hours | 17:20 | ||
or equivalently from seconds to minutes | |||
17:22
sftp joined
17:26
nadim left
17:30
nadim joined
17:38
patrickz joined
17:39
patrickz_ left
17:42
patrickz left
17:43
patrickz joined
17:45
llfourn_ joined,
llfourn left
17:49
patrickz_ joined
17:52
patrickz left
17:54
patrickz joined
17:55
patrickz_ left
17:58
patrickz left
17:59
patrickz joined
18:04
cdg left,
patrickz left
18:05
cdg joined
18:08
Zoffix joined
|
|||
Zoffix | m: say flat [[1,2,3],[4,5,6]]».<> | 18:08 | |
camelia | (1 2 3 4 5 6) | ||
Zoffix | wander: ^ | ||
18:09
patrickz joined
|
|||
wander | wow | 18:09 | |
Zoffix | wander: you just need to decont two inner Arrays. perl6advent.wordpress.com/2017/12/...rs/#decont | ||
18:09
cdg left
|
|||
wander | if only I don't put the stuff decont into a new container | 18:10 | |
Zoffix | m: say flat ((1,2,3),(4,5,6)) # or not use Arrays in the first place | ||
camelia | (1 2 3 4 5 6) | ||
wander | thanks a lot, looks I didn't read the post attentively :P | 18:12 | |
Zoffix | You can also write your gather/take version like this: | ||
m: say flat gather [[1,2,3],[4,5,6]]».take | |||
camelia | (1 2 3 4 5 6) | ||
Zoffix | But note that that method destroys information from Hashes: | ||
m: say flat gather [[1,2,3],[4,5,6], %(:42foo, :60meow)]».take | |||
camelia | (1 2 3 4 5 6 42 60) | ||
Zoffix | m: say flat gather [[1,2,3],[4,5,6], %(:42foo, :60meow)].map: *.take # this won't tho | 18:13 | |
camelia | (1 2 3 4 5 6 foo => 42 meow => 60) | ||
18:13
patrickz left
18:14
patrickz joined
|
|||
wander | "Hyper operators are defined recursively on nested arrays.", huh | 18:14 | |
Zoffix | Where's that from? | ||
wander | under docs.perl6.org/language/operators#..._Operators | 18:15 | |
Zoffix | m: say :foo.^roles | ||
camelia | ((Associative)) | ||
Zoffix | m: say gather :42foo».take | ||
camelia | (42) | ||
Zoffix wonders if that's actually a bug :/ | 18:16 | ||
18:16
domidumont left
|
|||
Zoffix | m: say -« [[[1, .5], 2], 3]; | 18:17 | |
camelia | [[[-1 -0.5] -2] -3] | ||
wander | m: say [[1,2,3],[4,5,6]].flatmap(*.self) | 18:19 | |
camelia | (1 2 3 4 5 6) | ||
wander | interesting | ||
Zoffix | inconsistency; descends into itemized iterables yet method form doesn't | ||
s: &METAOP_HYPER_PREFIX | 18:20 | ||
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/4fca...ps.pm#L519 | ||
18:20
patrickz left
|
|||
Zoffix | s: [], 'dispatch:<hyper>' | 18:21 | |
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/4fca...Mu.pm#L855 | ||
Zoffix | s: &HYPER | ||
SourceBaby | Zoffix, Sauce is at github.com/rakudo/rakudo/blob/4fca...ps.pm#L529 | ||
Zoffix | m: [[[1, [.5, 1]], 2], 3]».&[-].say | 18:23 | |
camelia | [[[-1 [-0.5 -1]] -2] -3] | ||
Zoffix | m: [[[-1, [.5, -1]], -2], 3]».abs.say | 18:24 | |
camelia | [[[1 [0.5 1]] 2] 3] | ||
Zoffix | .oO( am I misremembering? :S ) |
||
18:24
patrickz joined
|
|||
wander | it reminds me of this guy | 18:27 | |
m: [[[1, [.5, 1]], 2], 3]»(&say) | |||
camelia | 1sub say (| is raw) { #`(Sub|51541408) ... } 0.5sub say (| is raw) { #`(Sub|51541408) ... } 1sub say (| is raw) { #`(Sub|51541408) ... } 2sub say (| is raw) { #`(Sub|51541408) ... } 3sub say (| is raw) { #`(Sub|51541408) ... } |
||
Zoffix | I guess I confused .flat not descending into containerized iterables with ». not descending with nodal callables | ||
teatime tries to figure out what wander's last example is doing | 18:28 | ||
18:29
pmurias left,
kitsunenokenja left
|
|||
Zoffix | m: [[[1, [.5, 1]], 2], 3]»(&say) | 18:30 | |
camelia | 1sub say (| is raw) { #`(Sub|47003008) ... } 0.5sub say (| is raw) { #`(Sub|47003008) ... } 1sub say (| is raw) { #`(Sub|47003008) ... } 2sub say (| is raw) { #`(Sub|47003008) ... } 3sub say (| is raw) { #`(Sub|47003008) ... } |
||
Zoffix | oops | ||
m: sub meow ($x, $y) { dd [$x, $y] }; [[[1, [.5, 1]], 2], 3]»(&meow) | |||
camelia | [1, sub meow ($x, $y) { #`(Sub|65895176) ... }] [0.5, sub meow ($x, $y) { #`(Sub|65895176) ... }] [1, sub meow ($x, $y) { #`(Sub|65895176) ... }] [2, sub meow ($x, $y) { #`(Sub|65895176) ... }] [3, sub meow ($x, $y) { #`(Sub|65895176) ... }] |
||
Zoffix | m: say (1, 2, 3) »+« (42) | ||
camelia | Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length left: 3 elements, right: 1 elements in block <unit> at <tmp> line 1 |
||
Zoffix | m: say (1, 2, 3) »+» (42) | ||
camelia | (43 44 45) | ||
Zoffix | I'm guessing like this, except meow() instead of `+` and &meow instead of 42 | 18:31 | |
Zoffix & | |||
18:31
Zoffix left
|
|||
teatime | I def. still don't get it. | 18:32 | |
buggable | New CPAN upload: PDF-Font-0.1.1.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...1.1.tar.gz | 18:33 | |
18:35
pmurias joined
|
|||
TimToady | m: [[[1, [.5, 1]], 2], 3]».&say | 18:36 | |
camelia | 1 0.5 1 2 3 |
||
18:36
patrickz_ joined
|
|||
TimToady | m: 1»(&say) | 18:37 | |
camelia | 1sub say (| is raw) { #`(Sub|60519792) ... } | ||
TimToady | I have no idea what that thinks it's doing... | ||
teatime | welp I no longer feel bad about it :) | 18:38 | |
TimToady | m: 1(&say) | ||
camelia | No such method 'CALL-ME' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
wander | m: my @a = [1,2,3]; @a>>++; say @a # normal use | 18:40 | |
camelia | [2 3 4] | ||
18:40
patrickz left
|
|||
wander | note that | 18:40 | |
m: [1,2,3]>>&say | 18:41 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix at <tmp>:1 ------> 3[1,2,3]>>7⏏5&say expecting any of: postfix |
||
wander | m: [1,2,3]>>(&say) | ||
camelia | 1sub say (| is raw) { #`(Sub|60384624) ... } 2sub say (| is raw) { #`(Sub|60384624) ... } 3sub say (| is raw) { #`(Sub|60384624) ... } |
||
TimToady | I have no idea what that thinks it's doing... | ||
wander | so it escapes | 18:42 | |
TimToady | that should be trying to call 1 as a subroutine, passing it &say as the first arg, which should fail | ||
m: 1(&say) | |||
camelia | No such method 'CALL-ME' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
TimToady | like that | ||
say is both being called and used as data somehow | |||
teatime | yar | 18:43 | |
18:44
noganex left
|
|||
wander | maybe it trans to say(1, &say) | 18:45 | |
when >>++, postfix:<++>($a) is called(still 'maybe') | |||
18:46
noganex joined,
cdg joined
|
|||
TimToady | but (&say) is not a valid postfix, except insofar as it passes &say as an argument to something | 18:46 | |
and that something has to be Callable | 18:47 | ||
this is definitely somewhere in the "undefined behavior" realm | |||
wander | yes, so you can see `[1,2,3]>>&say` throws "expecting any of: postfix" | ||
however the form (&say) escapes for some reasons | 18:48 | ||
TimToady | m: [1,2,3]».&say # it requires the . | ||
camelia | 1 2 3 |
||
TimToady | not that you should be using say with hypers in any case | ||
since order of evaluation is undefined | 18:49 | ||
18:49
cdg left,
patrickz_ left
|
|||
TimToady | errands & | 18:49 | |
18:49
cdg joined
18:50
patrickz joined
|
|||
wander | m: say [1,2,3]>>(sub {dd @_}) | 18:51 | |
camelia | [1, sub (*@_) { #`(Sub|66679448) ... }] [Nil Nil Nil] [2, sub (*@_) { #`(Sub|66679448) ... }] [3, sub (*@_) { #`(Sub|66679448) ... }] |
||
18:54
cdg left
|
|||
wander | m: [&say, &say]>>(42) | 18:54 | |
camelia | No such method 'CALL-ME' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
wander | it should be &say(42), however looks like 42.(&say, 42) now | 18:55 | |
m: [&say, &say]>>.(42) # workaround | |||
camelia | 42 42 |
||
teatime | wth | ||
how does that work?! | 18:56 | ||
18:56
cdg joined
|
|||
AlexDaniel | ma6ic | 18:57 | |
teatime | oh, I forgot 42.say works heh | 18:58 | |
le whoops | |||
AlexDaniel | that's irrelevant :) | ||
m: &say(42) | |||
camelia | 42 | ||
AlexDaniel | m: &say.(42) | ||
camelia | 42 | ||
teatime | but isn't it trying to do 42(&say) ? | ||
er | 18:59 | ||
ok I just give up | |||
18:59
patrickz_ joined
19:01
patrickz left
19:04
patrickz joined
19:05
kitsunenokenja joined
|
|||
wander | m: sub f() { say 42 }; [&f, &f]>>(); | 19:05 | |
camelia | ===SORRY!=== Unknown QAST node type NQPMu |
||
19:06
patrickz_ left
|
|||
wander | s: Grammar | 19:06 | |
SourceBaby | wander, Something's wrong: ERR: Cannot resolve caller sourcery(Grammar); none of these signatures match: ($thing, Str:D $method, Capture $c) ($thing, Str:D $method) (&code) (&code, Capture $c) in block <unit> at -e line 6 | ||
19:09
patrickz left
19:14
patrickz joined
|
|||
AlexDaniel | reportable6: list | 19:20 | |
reportable6 | AlexDaniel, gist.github.com/22af8503523d183b34...b0f135a95f | ||
AlexDaniel | reportable6: 2017-12-01T07:33:00Z 2017-12-02T18:00:00Z | ||
reportable6 | AlexDaniel, OK, working on it! This may take up to 40 seconds | ||
19:20
reportable6 left,
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
AlexDaniel | oh gosh please someone fix GH#1278 :) | 19:20 | |
synopsebot | GH#1278 [open]: github.com/rakudo/rakudo/issues/1278 [SEGV] Another SEGV in whateverable | ||
AlexDaniel | reportable6: 2017-12-01T07:33:00Z 2017-12-02T18:00:00Z | 19:21 | |
reportable6 | AlexDaniel, OK, working on it! This may take up to 40 seconds | ||
AlexDaniel, gist.github.com/b3b546a1ad9be8eb50...d83c199c14 | |||
bartolin | for a second I thought, reportable6 responded to your "oh gosh please someone fix ..." with "OK, working on it! This may take up to 40 seconds" :-) | 19:23 | |
AlexDaniel | ha, you wish… | 19:24 | |
.oO( jnthnable? ) |
|||
bartolin | lol | ||
19:25
patrickz_ joined
19:26
patrickz left
19:28
Cabanossi left
19:29
comborico1611 joined
19:30
patrickz joined
19:31
patrickz_ left,
Cabanossi joined
|
|||
TreyHarris | Is there a shorthand way for accepting <st nd rd th> numeric options and merging them so you can do :0th :1st :2nd :3rd fun? | 19:33 | |
19:35
releasable6 left,
patrickz_ joined,
releasable6 joined
19:36
patrickz left,
unicodable6 left,
unicodable6 joined,
ChanServ sets mode: +v unicodable6,
bisectable6 left,
committable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
committable6 joined,
eliasr joined
|
|||
AlexDaniel | TreyHarris: I think the answer is no: github.com/rakudo/rakudo/blob/5929...1042-L1066 | 19:39 | |
TreyHarris | AlexDaniel: And I think it's yes? | 19:42 | |
one sec, checking | |||
AlexDaniel | m: sub foo(:st(:$nd)) { say $nd }; say foo :2nd | 19:43 | |
camelia | 2 True |
||
AlexDaniel | m: sub foo(:st(:$nd)) { say $nd }; say foo :1st | ||
camelia | 1 True |
||
AlexDaniel | the syntax is backwards so you can't alias more than one it seems? | 19:44 | |
TreyHarris | m: sub ordinated( :st(:nd(:rd(:th(:$num)))) ) { $num //= "Nothing"; say "I got $num." }; ordinated(:0th); ordinated(:1st); ordinated(:2nd); ordinated(:3rd); ordinated(:4th) | ||
camelia | I got 0. I got 1. I got 2. I got 3. I got 4. |
||
TreyHarris | You just can't variablize the last one unlize there are just two. | 19:45 | |
Uh.... optionize the variable | |||
Er, mumblize the mumble | |||
AlexDaniel | :O | ||
this is awesome | 19:47 | ||
TreyHarris | m: sub ordinated ( :st(:nd(:rd(:th(:$num = -1 )))) ) { say "I got $num." }; ordinated(:0th); ordinated(:1st); ordinated(:2nd); ordinated(:3rd); ordinated(:4th) | 19:50 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse named parameter; couldn't find right parenthesis at <tmp>:1 ------> 3sub ordinated ( :st(:nd(:rd(:th(:$num7⏏5 = -1 )))) ) { say "I got $num." }; ord |
19:51 | |
AlexDaniel | m: sub ordinated ( :st(:nd(:rd(:th(:$num))))=-1 ) { say "I got $num." }; ordinated(:0th); ordinated(:1st); ordinated(:2nd); ordinated(:3rd); ordinated(:4th); ordinated() | ||
camelia | I got 0. I got 1. I got 2. I got 3. I got 4. I got -1. |
||
TreyHarris | AlexDaniel++ | 19:53 | |
jnthn | m: sub ordinated(:st(:nd(:rd(:th($num))))) { say $num }; ordinated(:1th) | ||
camelia | 1 | ||
TreyHarris | I coulda sworn I tried that first | ||
jnthn | m: sub ordinated(:st(:nd(:rd(:th($num))))) { say $num }; ordinated(:1num) | ||
camelia | Unexpected named argument 'num' passed in sub ordinated at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
jnthn | Note that if you omit the : before $num then it isn't one of the exposed names | ||
You can in fact do this any time you want to have one external name for a named parameter but put it into a variable of a different name | 19:54 | ||
AlexDaniel | github.com/perl6/doc/issues/1696 | ||
TreyHarris | oh, duh, I did try it, but I tried to name it "ordinated-2", which isn't a legal sub name. :-P | 19:56 | |
AlexDaniel | m: sub ordinated ( :st(:rd(:th(:$nd)))=-1 ) { say "I got $nd." }; ordinated(:0th); ordinated(:1st); ordinated(:2nd); ordinated(:3rd); ordinated(:4th); ordinated()' | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3ated(:3rd); ordinated(:4th); ordinated()7⏏5' expecting any of: infix infix stopper statement end statement … |
||
AlexDaniel | m: sub ordinated ( :st(:rd(:th(:$nd)))=-1 ) { say "I got $nd." }; ordinated(:0th); ordinated(:1st); ordinated(:2nd); ordinated(:3rd); ordinated(:4th); ordinated() | ||
camelia | I got 0. I got 1. I got 2. I got 3. I got 4. I got -1. |
||
jnthn | That's another way to avoid an unexpected bonus name for it, yes :) | 19:57 | |
AlexDaniel | maybe it'd make sense to support something like :st:nd:rd:th($num) | 19:58 | |
ctilmes | Should :3st be an error? | ||
TreyHarris | jnthn: "bonus name"? what's the "bonus name"? | ||
AlexDaniel | TreyHarris: ordinated(:32num) | ||
TreyHarris | ctilmes: no, specifically for the benefit of non-English-speakers, th/st/rd/nd are interchangeable | 19:59 | |
jnthn | TreyHarris: If you do sub foo(:nd(:st(:$num))) { } then you can pass it as :num($value) too | ||
TreyHarris: Make it just sub foo(:nd(:st($num))) { } and the $num name is purely for internal use | |||
wander | m: say :6lang | 20:00 | |
camelia | Unexpected named argument 'lang' passed in block <unit> at <tmp> line 1 |
||
TreyHarris | jnthn++ I think in an effort to be pithy, the docs leave out examples like that. Thanks | ||
jnthn | .oO( Well, that's a pithy ) |
||
wander | m: (:6lang).say | ||
camelia | lang => 6 | ||
TreyHarris | ctilmes: I think that was specifically mentioned in Apocalypse <mumble> in 2002 | 20:01 | |
I know this because I can remember the desk I was sitting in when I read that and thought, "ah, makes sense" | 20:02 | ||
AlexDaniel | aliases are not even documented I think. Maybe a little bit in docs.perl6.org/language/functions#sub_MAIN | ||
wander | m: (:6lang).say; (:perl6).say | ||
camelia | lang => 6 perl6 => True |
||
TreyHarris | AlexDaniel: re your issue, is that an faq, or for a useful example of aliasing in functions.pod6? I'll take the issue and write it up | 20:03 | |
AlexDaniel | TreyHarris: I'd say aliasing should be documented, and this can be one of the examples | 20:04 | |
TreyHarris | (Though as an FAQ it's an easy add, for functions we should add a bit about aliases.) | ||
AlexDaniel: agreed. | |||
AlexDaniel | TreyHarris: also this docs.perl6.org/language/functions#sub_MAIN should probably link to that newly written section | 20:05 | |
20:05
tailgate joined
|
|||
TreyHarris | AlexDaniel: yup, saw that, thanks. | 20:05 | |
20:07
mson joined
|
|||
TreyHarris | Ack! | 20:07 | |
AlexDaniel: Meant to cancel my comment since you just added the same, but closed the issue by mistake | |||
20:08
comborico1611 left
20:09
eliasr left
|
|||
squashable6 | 🍕 AlexDaniel++ opened issue “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/1293 | 20:10 | |
🍕 AlexDaniel++ labeled issue “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/1293 | |||
20:11
donaldh left,
eliasr joined,
donaldh_ joined
|
|||
TreyHarris | AlexDaniel: are lang-spec issues now going straight to rakudo? I was ill and dropped out of actively monitoring things for a few months | 20:11 | |
20:11
patrickz joined
|
|||
TreyHarris | (Referring to the rakudo issue mentioned just now, 1293) | 20:12 | |
AlexDaniel | TreyHarris: previously they went to RT, so now that we're using rakudo/issues as an alternative to that, yeah. | ||
TreyHarris: in an ideal world we'd want them to be on roast/issues | |||
20:12
donaldh_ is now known as donaldh
|
|||
TreyHarris | AlexDaniel++ thanks. | 20:12 | |
Before I start integrating this, anyone written a POD6 editing mode for any common editor? Not that I need it, just always like to try such things, especially if I've been away awhile. | 20:13 | ||
20:14
patrickz_ left
|
|||
TreyHarris | AlexDaniel: And while I'm trying to get catch up, is there a simple-summary place I can read to catch up to the ecosystem/CPAN deal now as compared to, say, the begininng of the year (when we'd create a package with mi6, push it up to you own repo, and submit a link to perl6/ecosystem)? | 20:19 | |
I was nearly done with a package that I need to finish but need to update it first | 20:20 | ||
Can we get squashable6 to report an perl6/doc issues too? | 20:21 | ||
Herby_ | I think Zef is broke on my Windows 10 running 2017.10: gist.github.com/sylints/ec6dd9aece...3013efe5da | ||
any ideas? | |||
I can't install modules | |||
20:22
wander left
|
|||
TreyHarris | Herby_: github.com/ugexe/zef/issues/213 ? | 20:26 | |
AlexDaniel | TreyHarris: this particular squashathon is not about doc tickets, so it doesn't report stuff about the doc repo. github.com/rakudo/rakudo/wiki/Mont...Squash-Day and github.com/rakudo/rakudo/wiki/MOLD...QUASHathon | 20:28 | |
TreyHarris: as for the ecosystem, I don't think much changed, but see this: docs.perl6.org/language/modules.ht...le_to_CPAN | 20:29 | ||
Herby_ | TreyHarris: thats why they pay you the big bucks. That fixed the problem. Thanks! | ||
TreyHarris | AlexDaniel: Well, that section of modules.pod6 was written in the past month, so that counts :-) Thanks | 20:30 | |
Herby_: they do? Where do I collect my check? | 20:31 | ||
:-D | |||
20:31
pmurias left
20:32
yqt joined,
benchable6 left
20:33
benchable6 joined,
ChanServ sets mode: +v benchable6
|
|||
Herby_ | :) | 20:33 | |
squashable6 | 🍕 zoffixznet++ wrote a comment on “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/12...-348718558 | 20:39 | |
TreyHarris | I thought the autogenerated html files like in routine/ contained the source pod6 file(s) in comments, but I don't see them anymore... is there a place they've migrated, or do you just have to figure it out yourself? | 20:42 | |
20:43
lizmat left
20:44
Cabanossi left
20:46
Cabanossi joined,
kaare_ joined,
pdcawley left
|
|||
squashable6 | 🍕 treyharris++ wrote a comment on “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/12...-348718976 | 20:46 | |
🍕🍕🍕 First contribution by treyharris++! ♥ | |||
TreyHarris | squashable6: 🤩 | 20:47 | |
squashable6 | TreyHarris, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable | ||
TreyHarris | heh | ||
AlexDaniel | buggable: pizza TreyHarris | 20:49 | |
buggable | TreyHarris, enjoy this slice of Margherita pizza, my friend! Yummy 🍕 | ||
Herby_ | is there a way to what functionality the bots in this channel have? | 20:51 | |
for instance, is there a bot that return perl 6 modules that fit a tag? | |||
*is there a way to see | |||
Morfent | i think i might port net::dns to perl 6 | 20:52 | |
TreyHarris | Morfent: it's only 5 years old, from the CPAN history? That really surprises me, I feel like I've known about it forever | 20:54 | |
TreyHarris realizes that "only 5 years old" is a ridiculous statement for a software library, but for important CPAN modules, it's not | 20:55 | ||
AlexDaniel | Herby_: github.com/perl6/doc/issues/711#is...-235414744 | 20:59 | |
Herby_: as far as I know only whateverables have reasonable documentation | 21:00 | ||
Herby_ | AlexDaniel: thanks | 21:02 | |
21:05
pdcawley joined
|
|||
squashable6 | 🍕 zoffixznet++ opened issue “Passing named args witho…”: github.com/rakudo/rakudo/issues/1294 | 21:23 | |
🍕 zoffixznet++ opened issue “LTA error with named arg…”: github.com/rakudo/rakudo/issues/1295 | 21:25 | ||
🍕 zoffixznet++ labeled issue “LTA error with named arg…”: github.com/rakudo/rakudo/issues/1295 | |||
21:31
someuser left
|
|||
Herby_ | greppable: ftp | 21:37 | |
greppable6: ftp | |||
21:40
greppable6 joined,
ChanServ sets mode: +v greppable6
|
|||
AlexDaniel | greppable: ftp | 21:40 | |
greppable6 | AlexDaniel, gist.github.com/13dfebd0fe7798dac5...3b89a371d1 | ||
AlexDaniel | Herby_: ↑ some bots are off due to github.com/rakudo/rakudo/issues/1280 | 21:41 | |
Herby_ | gotcha | 21:42 | |
21:44
rindolf left
|
|||
AlexDaniel | greppable: \bftp\b | 21:48 | |
greppable6 | AlexDaniel, gist.github.com/4d1c6d7b0251dadc11...37d54086e5 | ||
squashable6 | 🍕 zoffixznet++ wrote a comment on “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/12...-348723095 | 21:57 | |
21:59
eliasr left
|
|||
DrForr | I've got to get to bed, but here's a suggestion for the Test module - Add 'multi subtest( Hash, Str ) { note "Subtests without a body are not recommended" }' as I keep accidentally writing subtest { #'() }, 'to be filled-in'; and the error is somewhat nonintuitie. | 22:10 | |
yoleaux | 1 Dec 2017 22:30Z <AlexDaniel> DrForr: Please check RT#125299 and do something with it. I really don't understand what has to be done in order to close it. If it's just that the line number of the starter has to be mentioned, then it was done in github.com/rakudo/rakudo/commit/3e...965336147c | ||
DrForr | O hai. Will check in a second... | ||
22:11
comborico1611 joined,
comborico1611 left
22:13
sena_kun left
|
|||
DrForr | .tell AlexDaniel RT tels me I have no permissions to viiew that ticket, Please feel free to close it. | 22:15 | |
yoleaux | DrForr: I'll pass your message to AlexDaniel. | ||
AlexDaniel | . | ||
yoleaux | 22:15Z <DrForr> AlexDaniel: RT tels me I have no permissions to viiew that ticket, Please feel free to close it. | ||
AlexDaniel | RT#125299 | ||
wtf where did the ticket go | |||
DrForr | I can view it in the public tracker, I can't view it when logged in. | 22:16 | |
AlexDaniel | rt.perl.org/Ticket/Display.html?id=125299 | ||
hmmm | |||
DrForr | Likely because of how I entered it, IE. via email. If you have perms to edit it, feel free to close it and paste this log for explanation. | 22:17 | |
geekosaur | that's kinda a thing with rt.perl.org, yeh | 22:19 | |
annoying af | |||
22:20
dmaestro joined
|
|||
DrForr | Blasted keyboard. Must get to bed here, like I said you hav my blanket permission to do whatever you like with the bug. | 22:23 | |
El_Che | funny, bed and blanket in same sentence | ||
DrForr | And the same room in my case. Brand new duvet too. | 22:24 | |
El_Che | DrForr: cold in Prague? | 22:25 | |
DrForr | It was snowing this afternoon; I have a loft space here, and the (upward-facing) windows were covered in frost. | 22:26 | |
Okay, bedtime it is. G'night, good luck with RT. | 22:29 | ||
22:34
lizmat joined
|
|||
AlexDaniel | DrForr: marked as 「testneeded」 | 22:39 | |
22:46
wamba left
22:47
natrys left
22:53
kitsunenokenja left
|
|||
squashable6 | 🍕 jnthn++ wrote a comment on “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/12...-348726245 | 22:53 | |
Herby_ | rookie question incoming... | 22:56 | |
how should module naming conventions work? sometimes I see Net::FTP convention | 22:57 | ||
other times I just see FTP | |||
why one or the other? | |||
If I wanted to create a module for the oxford dictionary api, should I name it Oxford::Dictionary? or just Dictionary | |||
that seems to be something Python avoids, for one reason or another | 22:58 | ||
ctilmes | Or Dictionary::Oxford so later someone else makes a similar API to Dictionary::Foo | ||
Herby_ | ah | ||
good point | |||
22:59
Cabanossi left
|
|||
Herby_ | one more dumb question: does the file structure matter with the naming convention used? | 23:00 | |
23:01
donaldh left
|
|||
Herby_ | If I use Dictionary::Oxford, does my file structure need to be: ./lib/dictionary/oxford.pm6 | 23:01 | |
ctilmes | Perl5 makes a concerted effort to maintain organization of module hierarchies. It kind of failed at that. IMHO, it is much less important in Perl 6 world | ||
Herby_ | or should it be ./lib/oxford.pm6 | ||
23:01
Cabanossi joined
|
|||
ctilmes | Convention would be to match file tree to name scheme, but it actually doesn't have to. | 23:02 | |
Herby_ | thats what I assumed but I never knew for sure. | ||
thanks | |||
23:04
dmaestro left
|
|||
ctilmes | You have to put it somewhere it can be found in the manner you cause it to be searched for. | 23:07 | |
jnthn | If you want it to work with -I then you need to follow the directory structure | ||
ctilmes | docs.perl6.org/language/modules#Finding_Modules | 23:08 | |
jnthn | If you don't care about that (though it'd make development a bit "fun" :P) then one doesn't *have* to follow the convention, however :) | ||
Herby_ | gotcha | 23:09 | |
thanks for that link ctilmes | |||
jnthn | As ctilmes said, though, trying to build some neat hierarchy isn't something we worry about so much in the Perl 6 world. Searching and tags have won as ways of people fidning stuff. | 23:10 | |
23:12
kitsunenokenja joined
|
|||
Herby_ | makes sense. as a beginner I just want to make sure I stick to any standard conventions if there are some | 23:12 | |
23:13
ShalokShalom joined
|
|||
AlexDaniel | .tell wander good news!!! I think your RT comment went through | 23:13 | |
yoleaux | AlexDaniel: I'll pass your message to wander. | ||
AlexDaniel | squashable6: status | ||
squashable6 | AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈12 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel, Log and stats: gist.github.com/d14b219452916bb401...b4b84c73dc | |||
23:21
Aaronepower left
|
|||
timotimo | so ... the official csv games use 100x more lines in their hello.csv than we do in our test-t | 23:28 | |
but almost all of them are faster than rakudo is at the task | |||
geekosaur was going to say "they're also probably 100x faster" :p | 23:29 | ||
timotimo | yup. | ||
geekosaur | we... have a ways to go | ||
timotimo | the slowest seems to be ruby, which takes about 9.3 seconds | 23:30 | |
Herby_ | and what is p6 at? | ||
timotimo | takes just below 3 seconds now | 23:31 | |
maybe we want to have a version based on libcsv, too :P | 23:32 | ||
the luajit version uses that adn clocks in at just below a second | |||
23:34
dmaestro joined
23:36
mson left
|
|||
timotimo | since the input file is 23 megs big, taking a second means you're doing 23 megs per second | 23:40 | |
at that point you might as well be bottlenecked by spinning rust and filesystem :P | |||
our csv library spends barely any time doing GC, that is good | 23:42 | ||
i'm refering to percentage-wise, though | 23:43 | ||
14 seconds in total | |||
the gc runs 9950 times | |||
we're still spending 20.7% of total time doing splitting | 23:46 | ||
3.46% of that is sorting the indices of different split-pieces found in the string (adds up to 13 secodns) | 23:47 | ||
Herby_ | This API requires headers in the get request. app_id = 123, app_key = xyz . How do I use those in an HTTP::UserAgent get request? | ||
I'm poking around the documentation but I can't quite figure it out | |||
23:50
yqt left
|
|||
timotimo | it looks like headers get put as named arguments into the call | 23:51 | |
i see an example with post rather than get that passes X-Foo => "foodle" | |||
so it's probably the same way for get | 23:52 | ||
23:52
kitsunenokenja left
|
|||
Herby_ | something like: my %response = $ua.get($url, {app_key => $app_key, app_id => $app_id}) ? | 23:54 | |
timotimo | no, without the braces | 23:55 | |
i think what you pass as a hash there would be form data for post requests and such | 23:56 | ||
squashable6 | 🍕 vendethiel++ wrote a comment on “Proposal: easier syntax for multiple param aliases”: github.com/rakudo/rakudo/issues/12...-348729378 | 23:58 | |
🍕🍕🍕 First contribution by vendethiel++! ♥ | |||
Herby_ | timotimo: that works. thank you | ||
timotimo | YW | 23:59 |