»ö« 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.
cale2 something that is handy... maybe like a csv parser? 00:00
AlexDaniel is there any way to make perl 6 repl preserve the history? 00:01
I'm using readline
timotimo it should preserve the history when it uses readline 00:03
worst case, use rlwrap 00:04
[Coke] m: class :: { 5_0000; 1 } 00:05
camelia WARNINGS for <tmp>:
Useless use of constant integer 1 in sink context (line 1)
Useless use of constant integer 50000 in sink context (line 1)
AlexDaniel timotimo: it doesn't 00:06
[Coke] any way to make that not complain?
AlexDaniel m: class :: { 5_0000; eager 1 }
camelia WARNINGS for <tmp>:
Useless use of constant integer 1 in sink context (line 1)
Useless use of constant integer 50000 in sink context (line 1)
AlexDaniel ah
m: class :: { eager 5_0000; 1 }
camelia WARNINGS for <tmp>:
Useless use of constant integer 1 in sink context (line 1)
Useless use of constant integer 50000 in sink context (line 1)
AlexDaniel :|
[Coke]: but what is this code doing? 00:07
like, why would you have something like this?
[Coke] part of the xt/examples-compilation.t I'm working on; I can't seem to catch the warning, either. 00:08
AlexDaniel timotimo: no, it doesn't preserve the history if I rerun it
timotimo: normal history works, yes
00:08 IRCFrEAK joined, IRCFrEAK left
[Coke] (er, the output) 00:08
with that code in $code, I do this: { $*ERR = IO::String.new(); $*OUT = IO::String.new(); try EVAL $code } 00:09
and that warning is still output.
IOninja m: class :: { eager 5_0000; $ = 1 } 00:10
camelia WARNINGS for <tmp>:
Useless use of constant integer 50000 in sink context (line 1)
IOninja m: class :: { $ = 5_0000; $ = 1 }
camelia ( no output )
IOninja m: eager 5000
camelia WARNINGS for <tmp>:
Useless use of constant integer 5000 in sink context (line 1)
AlexDaniel still does not understand why would you ever have something like this
IOninja hmmm
AlexDaniel but eager was working some time ago, no?
c: HEAD~500 eager 5000 00:11
committable6 AlexDaniel, ¦«HEAD~500»: WARNINGS for /tmp/_Z2P5njeEE:␤Useless use of constant integer 5000 in sink context (line 1)
AlexDaniel 6c: eager 5000
committable6 AlexDaniel, ¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10,2016.11,2016.12,2017.01,HEAD»: WARNINGS for /tmp/gKpMsRE8V3:␤Useless use of constant integer 5000 in sink context (line 1)
AlexDaniel no
[Coke] AlexDaniel: the examples compiler wraps every code snippet in an anonymous class so we can test method declarations. 00:12
and type/Int.pod6 has a block with a bunch of constants showing syntax.
and then I golfed it. 00:13
IOninja um... why does it wrap them in a class? 00:14
timotimo [Coke]: you'd want to use "quietly", i'd expect
00:14 espadrine left
IOninja It won't help 00:14
[Coke] m: quietly class :: { 5_00000; True }; 00:15
camelia WARNINGS for <tmp>:
Useless use of constant integer 500000 in sink context (line 1)
[Coke] m: class :: { quietly 5_00000; True };
camelia WARNINGS for <tmp>:
Useless use of constant integer 500000 in sink context (line 1)
Useless use of constant value True in sink context (line 1)
[Coke] timotimo: already tried that. :)
IOninja m: BEGIN $*ERR.close; class :: { 5_0000; 1 } 00:16
camelia ( no output )
[Coke] IOninja: Note that my first pass had *ERR overridden into an IO::String 00:17
and yet it was still emitted on the main $*ERR, apparently.
There's no way to get the effect of 'perl6 -c' IN rakudo, is there? 00:19
IOninja prolly don't reach it from dynamic scope or something?
[Coke] (shellig out to 'perl6 -c' is super slow; but using EVAL means I have to actually -run- the code) 00:20
*shelling
timotimo damn 00:21
00:21 pyrimidine left
timotimo it's probably the compilers using "say" and "note" from nqp to output their stuff 00:22
00:22 pyrimidine joined
timotimo those don't look at $*OUT and $*ERR i don't think 00:22
IOninja m: say try EVAL 'sub {INIT return; class :: { 5000; 42 } }()'
camelia (signal SEGV)WARNINGS for /home/camelia/EVAL_0:
Useless use of constant integer 42 in sink context (line 1)
Useless use of constant integer 5000 in sink context (line 1)
IOninja m: say try EVAL 'sub {CHECK return; class :: { 5000; 42 } }()'
camelia Nil
[Coke] jezu.
IOninja timotimo: how come $*ERR.close works?
[Coke] nice segfault. also great idea. :) 00:23
IOninja m: say try EVAL 'sub {CHECK return "all is good, bruh"; class :: { 5000; 42 } }()'
camelia Nil
IOninja hm
timotimo because that closes the underlying file descriptor
IOninja timotimo: and $*IN.close doesn't? 00:24
AlexDaniel I still don't buy the idea of wrapping something into a class blindly
timotimo in what way does it not work?
IOninja I still don't get why it's wrapped in a class at all...
[Coke] IOninja: so a bare 'method' works.
which is most of the examples being testing in the Type/ pages.
IOninja timotimo: last three lines in this log: irclog.perlgeek.de/perl6-dev/2017-...i_14129069 00:25
I see.
[Coke] AlexDaniel: What's your alternative?
AlexDaniel [Coke]: add some heuristics to look for methods?
[Coke] Sure, we already have a check, easy enough. 00:26
AlexDaniel … or wrap everything in class :: { method foo { ……… } }
m: class foo { method foo { method abc { 42 } } } 00:27
camelia ( no output )
IOninja m: EVAL 'sub {CHECK return; class :: { 5000; 42 } }()'
camelia ===SORRY!===
Attempt to return outside of any Routine
IOninja orly?
tis a bug or?
AlexDaniel IOninja: well, LTA for sure
IOninja m: sub {CHECK return; class :: { 5000; 42 } }()
camelia ===SORRY!===
Attempt to return outside of any Routine
IOninja m: sub {INIT return; class :: { 5000; 42 } }()
camelia (signal SEGV)WARNINGS for <tmp>:
Useless use of constant integer 42 in sink context (line 1)
Useless use of constant integer 5000 in sink context (line 1)
IOninja rt.perl.org/Ticket/Display.html?id=130825 00:29
I guess it don't make any sense for it to work
'cause the sub would be executed after CHECK and INIT and we're asking it to time travel there.
[Coke] IOninja: I jsut need a 'return', I don't need to make it run sooner. 00:33
oh. or I can just wrap it all in if False { }
00:36 Actualeyes left 00:40 aborazmeh joined, aborazmeh left, aborazmeh joined
ZzZombo WTF, I can't drag selected text in Atom?? Reminds me why I refused to use it, lack of crucial features that even Notepad has. 00:44
samcv good * 00:45
AlexDaniel m: say ‘good’, ** 00:46
camelia good**
hobbs I can't say I've ever tried to do that in my life 00:51
samcv commas are useful in say. been using them more recently 00:53
to avoid having to ~ them all
AlexDaniel yup
it is not identical though 00:54
m: say ‘good’, **
camelia good**
AlexDaniel m: say ‘good’ ~ **
camelia sub (*@_) { #`(Sub|33031456) ... }
AlexDaniel m: say “good {**}”
camelia good HyperWhatever<69369648>
hobbs good HyperWhatever indeed. 00:55
Geth doc/coke/examples: 349ecc67b8 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Use EVAL instead of perl6 -c

Compile but execute as little as possible.
00:56
00:58 Actualeyes joined
samcv welp Unhandled exception in code scheduled on thread 19 01:00
01:06 cibs left 01:08 cibs joined 01:16 pyrimidine left 01:30 mcmillhj joined 01:37 andrzejku joined
andrzejku what to do when you cann't sleep at night :S 01:39
01:39 BenGoldberg joined
ZzZombo Have sex 01:40
andrzejku not possible 01:44
cale2 andrzejku: Are you in a coding mood or a writing modd? 01:46
ZzZombo Open astrophysical lecture with lots of formulea and try to comprehend them. 01:47
andrzejku my kid woke me up and I cann't back to sleep 01:48
probably coding mood
:P
ZzZombo Just don't release it ever :P
andrzejku maybe it is time to do some perl 01:49
cale2 andrzejku: Do you already program in perl6? Or are you going to pick it up now? 01:50
andrzejku I read many Perl6 things 01:51
but mostly I need pick it up
AlexDaniel andrewalker: write some tests perhaps? github.com/perl6/roast/issues 01:52
01:53 Actualeyes left
cale2 AlexDaniel: Tests still need to be written? 01:54
ZzZombo Can I make <.ws> non-greedy? I want it not to grab the newline after it. 01:55
oh, can't I just use \s*?\n
[Coke] wonders why we have code samples with nested B<> and L<> formtting codes. 01:56
andrzejku AlexDaniel that could be too hard for me :P
AlexDaniel cale2: well sure 01:57
cale2: unless the amount of open issues is 0, yes, some tests are needed :)
Geth doc/coke/examples: 9e394d46df | (Will "Coke" Coleda)++ | doc/Language/control.pod6
change coding style
01:58
doc/coke/examples: c36dd9a66c | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Handle Pod Formatting codes
ZzZombo token value { [<string> || \w+]\s*?\n } 02:01
token string { '"' <( [\N | \\\N]*? )> '"' }
Yet "!#$w52\"" doesn't get rid of the "" even though it should by the rules value->string?
Geth doc: ccdedd387b | (Will "Coke" Coleda)++ | doc/Type/Proc.pod6
remove trailing whitespace
02:03
doc: a2568a5324 | (Will "Coke" Coleda)++ | doc/Type/IO.pod6
fix typo
02:04 ufobat left
ZzZombo According to Grammar::Trace, the value rule NEVER calls the string rule, yet it matches. WTF? 02:06
[Coke] yay, examples test runs in ⅓ the time. 02:08
02:14 pyrimidine joined 02:16 Actualeyes joined
ZzZombo m: say so "!#$w52\"" ~~ /'"' <( [\N | \\\N]*? )> '"'/ 02:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$w52' is not declared
at <tmp>:1
------> 3say so "!#7⏏5$w52\"" ~~ /'"' <( [\N | \\\N]*? )> '"'/
ZzZombo m: say "!#w52\"" ~~ /'"' <( [\N | \\\N]*? )> '"'/
camelia Nil
ZzZombo m: say '"!#w52\""' ~~ /'"' <( [\N | \\\N]*? )> '"'/
camelia 「!#w52\"」
ZzZombo wtf 02:20
here is works
it*
IOninja rules don't backtrack; regexes do. 02:24
andrzejku: easy: take a sleeping pill 02:25
andrzejku lulsh I hate sleeping pills d;
that's unhealthy
IOninja They're safe enough to give pregnant women. 02:26
andrzejku I am not pregnant :S
AlexDaniel … fair enough…
IOninja heh
dat logic
02:30 labster left
ZzZombo why is there a page for docs.perl6.org/language/list but no for hash? 02:31
IOninja because hashes are easier to understand. 02:33
"Hashes and Maps: you know what to do, bruh"
There is one for Setty/Baggy, so those hash-likes are covered.
IOninja glances at trends on Twitter and Facebook 02:35
So nazis are like celebrities in the US now? Wow
02:37 cdg joined 02:38 newbie1 left
cale2 nazis are everywhere now. they're your baker, your barber, and under your bed 02:38
Any news on the perl6 toolchain? I'm reading docs about where it's headed in the future. I'm wondering what step it's at now 02:39
02:39 aborazmeh left
hobbs IOninja: not last time I checked? 02:39
samcv ZzZombo, there's this docs.perl6.org/type/Hash 02:40
IOninja cale2: bug jdv79
cale2 Reason I ask is because I'm working on a little tutorial about up-to-date module publishing 02:43
IOninja hobbs: half a million tweets and 170K facebooks for some nazi guy. I'd say that's celebrity area :) 02:44
cale2 I'm using zef for sure, but I'm looking for the most up-to-date authoring tool as well
IOninja buggable: eco distribution
buggable IOninja, Found 5 results: Test::META, Distribution::Common, Distribution::Common::Remote, Task::Noise, Ddt. See modules.perl6.org/#q=distribution
IOninja buggable: eco Ddt
buggable IOninja, Ddt 'Distribution Development Tool a replacement for mi6': github.com/kalkin/Ddt
IOninja cale2: that's probably the most one. Though I never used any... 02:45
cale2 ahhh, so mi6 is out of date... did not know
IOninja cale2: well... that's just some author's claim.
cale2 I think many newbies will be accustomed to things like `cargo new` or `mix new` and shebam, your directory structure is built
IOninja *[citation needed] :) 02:46
cale2 The citation is literally my own self :)
IOninja And everyone's like you, naturally ;) 02:47
cale2 In any case, mi6 is the better name
sad if it's abandoned D:
IOninja What makes you think it's abandoned?
Last commit was a month ago.
cale2 oh, nice :) 02:48
IOninja ....
In fact, if you discount a typo fix, Ddt is only 7 days newer and I never heard of anyone using it, other than its author. 02:50
cale2 ah
IOninja: did you see this? github.com/WildYorkies/perl6-state...-ecosystem 02:51
I'm looking for help from others to beef that up. Sort of a companion to "most wanted modules" 02:52
andrzejku hey I know that's very late but could look at my algorithm? 02:55
github.com/damaxi/Algorithm/blob/m..._number.p6 02:56
in my results binary search is slower
02:56 mcmillhj left
andrzejku however there less steps to do but logic is more complicated 02:56
IOninja MY EYES! 02:58
cale2: well, I don't use Perl 6, so it's kinda of little interest to me :)
hobbs well yeah, that's much more complicated code, and doesn't use a simple for loop, and you're dealing with a really small case 02:59
cale2 IOninja: that's what everyone says :P
andrzejku hobbs ? I did tests for 1000 when 999 03:00
is guess number
and binary search is slower every time
hobbs yes, and 1000 is a very small number
andrzejku :S
ok?
what number should I choice
hobbs I suppose the binary search is just fucked up 03:01
IOninja cale2: sounds like you should start showing it to users of Perl 6 then :)
andrzejku Looking for value: 80000
Guessed value: 80000
Increment search 0.0267904761904762
Guessed value: 80000
Binary search 0.0999639665589252
how the fuck find algorithm is implemented in Perl6? 03:02
:D
hobbs well yeah, that too. Actually I'm having a hard time figuring out why your code even *works* for values over 100 instead of looping forever 03:04
I guess because that else case eventually makes it count by 1
andrzejku hobbs it is checked
hobbs meaning what? 03:05
andrzejku for every case there long2(n) computations
and this is constant
while simple increment look up is n
in worst case
however something wrong with perl 03:06
hobbs that would be true if your code wasn't broken.
03:07 labster joined
andrzejku or I need analyze case with list of elements 03:07
what could be more hard to iterate
probably it is perl6 paradox 03:08
if your code need to invoke many things make it simpler and idiotic it would be faster anyway 03:09
:D
hobbs probably you're typing line after line of utter nonsense
which is the same way your code came about :)
andrzejku no
lulsh 03:10
hobbs I added "say $mid" to your binary search loop, notice anything? paste.scsys.co.uk/554563
andrzejku amm shit happend
i hardcoded :D two variables wait 03:11
cale2 andrzejku: IDK about your algorithm, but you should add a MAIN sub to your script. sub MAIN(:$min = 1, :$max = 200) 03:13
and do `my Int $guess = ^$max.pick` 03:14
andrzejku hobbs thnks :) for help now it is working
Looking for value: 80000
Guessed value: 80000
Increment search 0.0270540940359567
Guessed value: 80000
Binary search 0.000606746010671407
cale2 sure I will fix it
there no more perl6 paradox :D
cale2 you can also run perl6 on glot.io/new/perl6 03:16
andrzejku cale2 are you about ^$max.pic? 03:18
cale2 m: say ^200.pick
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^2007⏏5.pick
^200
cale2 m: say (^200).pick
camelia 72
cale2 there we go lol. wrap it in parens
andrzejku m: say (1..100).pick
camelia 84
hobbs ($min..$max).pick even :)
BenGoldberg m: say ^200 .pick; 03:19
camelia 179
andrzejku the ^ pick from 0
cale2 m: my $max = 200; with $max { .pick.say }
camelia 200
cale2 m: my $max = 200; with $max { .pick.say } 03:20
camelia 200
cale2 m: my $max = 200; with $max { say $_.pick }
camelia 200
cale2 m: my $max = 200; with $max { say ^$_ .pick }
camelia 192
cale2 haha
yeah, it picks from 0
min..max would work
m: my $max = 200; with $max { ^$_ .pick.say } 03:21
camelia 163
BenGoldberg m: say ^2.pick xx 20;
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^27⏏5.pick xx 20;
(^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2 ^2)
BenGoldberg m: say ^2. pick xx 20;
camelia 5===SORRY!5=== Error while compiling <tmp>
Decimal point must be followed by digit
at <tmp>:1
------> 3say ^2.7⏏5 pick xx 20;
BenGoldberg m: say ^2 .pick xx 20;
camelia (0 0 0 0 1 1 0 1 0 1 0 1 0 0 0 1 1 0 0 0)
hobbs andrzejku: paste.scsys.co.uk/554564 -- this seems more reasonable (and 10x faster) 03:23
hmm, actually that has an off-by-1 that needs a fix 03:24
I think "$low = $mid + 1" repairs it :) 03:25
03:27 zengargoyle joined
andrzejku hobbs yeah :D 03:27
hobbs 1 kind of proximity 03:28
03:29 noganex_ joined 03:32 noganex left 03:40 grondilu joined
grondilu Hello, #perl6 03:40
I thought about a one-liner to check for typo in a text:
my @dict = slurp("/usr/share/dict/american-english"); say $text.grep(none(@dict)) 03:41
I'm wondering if it's reasonable to use the C<none> junction with thousands of words 03:42
BenGoldberg my %dict := Set.new: slurp("/usr/share/dict/american-english"); say !%dict{$text} 03:43
grondilu (btw I forgot a .words above)
BenGoldberg Any junction with more than a handful is most likely to be less efficient than using a hash or set. 03:44
grondilu ok
03:46 andrzejku left 03:48 cale2 left 04:03 cdg left 04:06 geekosaur left 04:08 geekosaur joined 04:11 pyrimidi_ joined, pyrimidine left 04:19 khw left 04:25 itcharlie joined 04:27 ilbelkyr left
ZzZombo WTF is this zef thing, why does it suddenly spit out a huge wall of text of MS Powershell usage? 04:27
04:27 nebuchadnezzar left 04:28 nebuchadnezzar joined 04:43 AlexDaniel left
ugexe because i didnt want to think of how to spit out a wall of powershell usage not-suddenly 04:49
04:50 ilbelkyr joined 04:57 Cabanoss- joined 05:01 Cabanossi left, Cabanoss- is now known as Cabanossi
ZzZombo WTF 05:02
Lucida COnsole CAN display 「"My Data"」 no problem in the IRC client, but not in cmd window even after chcp 65001 05:04
05:10 wamba1 joined 05:11 mr_ron left 05:12 itcharlie left 05:19 skids left 05:31 xtreak joined 05:43 cibs left 05:45 cibs joined 05:47 CIAvash joined 05:55 cibs left 05:56 cibs joined 05:58 mroy joined, ZzZombo left
mroy Will perl6 have IO::Socket::UNIX? 06:00
Btw, hello all. 06:01
06:05 curan joined 06:07 Resol_ joined
masak hello, mroy 06:07
as to your question, I don't know 06:08
in Rakudo, there's currently IO::Socket::INET and IO::Socket::Async
mroy Thank you, masak. There is IO::Pipe. Wanted to try IO::Socket::UNIX with perl6. 06:10
06:10 Resol left 06:11 ZzZombo joined 06:16 labster left, eroux left, astj left 06:17 astj joined
mroy Also searched for socketpair. Oh, it's no where to be found in perl6. Where are thou my friend socketpair. :) 06:18
masak mroy: are you aware of the possibility to Inline::Perl5? 06:26
masak often suspects that people who complain about missing modules are not aware of Inline::Perl5 :)
06:26 gdonald left, gdonald joined
mroy Thanks masak. 06:27
Was hoping for UNIX domain sockets via socketpair, similarly as in perl5. 06:30
ZzZombo WTF, seriously 06:32
06:32 bwisti left
ZzZombo why the fuck cmd window refuses to show 「 and 」 as such??? 06:32
I even changed to font to one that does have them.
06:38 wamba1 left
masak could be encoding related rather than font related 06:40
Windows is well-known for doing its own thing with encodings
geekosaur chcp 65001 06:43
06:44 ufobat joined
geekosaur (uh, be aware that that setting breaks some versions of git; note down the current setting first, if you try it) 06:46
06:51 mr_ron joined 06:52 bjz joined
ZzZombo geekosaur: doesn't do shit, I already invoked it. 06:52
geekosaur ok, then I guess you're in one of those lovely areas where windows does its own thing, like masak said :/ 06:53
06:53 RabidGravy joined
geekosaur (also, for grins and giggles, try powershell) 06:54
not that it's that likely to help if cmd doesn't work, but...
ZzZombo the thing is, why does it clearly works in IRC and not in the stupid console window? 06:55
geekosaur what are you using for irc?
ZzZombo mIRC
mroy masak, socketpair is mentioned in Synopsis 32 github.com/perl6/specs/blob/master...ary/IO.pod 06:56
geekosaur ok, that'd make sense. the problem with cmd is that it tries to be backward compatible; "chcp 65001" helps to some extent but doesn't 100% remove the backward compat stuff
which is why powershell might do better
mroy, the synopses are quite old at this point. a decision was made to move anything that wasn't portable into the ecosystem, but I don't think anyone's done anything with socketpair yet 06:57
06:58 mr_ron left
mroy thanks geekosaur. was thinking the same in regards to not being portable and the likely reason not in perl6 yet. 06:58
geekosaur ("portable" ~~ /windows || unix/)
mroy seeing the synopses gave me some hope 06:59
that socketpair may be available in perl6 one day
geekosaur whereas older perl originated on unix and portability to windows has always been rather rough edged as a result
mroy that makes sense 07:00
07:00 Actualeyes left 07:04 rindolf joined 07:06 wamba1 joined 07:11 darutoko joined 07:14 BenGoldberg left 07:15 Actualeyes joined 07:23 RabidGravy left 07:34 jjido joined 07:40 jjido left 07:44 mroy left 07:50 bjz_ joined 07:53 bjz left 07:54 ufobat_ joined 07:57 ufobat left
grondilu m: say [\+] ^10 .tail 07:58
camelia 45
grondilu ^is that normal? If it is, it's cool, because it means I can use the reduction metaoperator and call a method from it without using parenthesis? 07:59
m: say [\+] ^10 .elems 08:00
camelia 10
ZzZombo Holy fuck 08:02
Is there really NO monospaced font suitable for console window that supports 「 and 」??? 08:03
I've tried like 10 new fonts already, they either aren't accepted by cmd.exe or lack them.
08:06 pyrimidine joined, pyrimidi_ left 08:07 jjido joined
masak ZzZombo: maybe you should try #windows-font-swearing instead? 08:10
ZzZombo I'm banned there, didn't meet the swearing quota. 08:11
anyway, gotta go.
08:11 ZzZombo left
arnsholt ZzZombo: My PuTTY shows them, uses Courier New 08:11
Bah!
.tell ZzZombo I get 「 and 」 in PuTTY with Courier New, FWIW 08:12
yoleaux arnsholt: I'll pass your message to ZzZombo.
08:12 jjido left
grondilu so basically in rosettacode.org/wiki/Evaluate_binom...ts#Perl_6, I could write: [*] ($^n ... 0) Z/ 1 .. min($n - $^p, $p) .Int 08:14
instead of: ([*] ($^n ... 0) Z/ 1 .. min($n - $^p, $p)).Int
08:16 robertle left
masak grondilu: yes, but I don't think the spaces version is an improvement on the parens version; rather the opposite 08:17
I'm biased, but I do think it's less clear relying on the precedence behavior of the spaces 08:18
it's like `!important` in CSS -- things were already hard enough before it 08:20
in this case, precedence is already challenging enough, and the parens help clarify. with the spaces, you add another dimension of uncertainty and possible confusion
...unless of course your goal is to appear clever above being clear -- in which case, go right ahead :P 08:21
08:22 zakharyas joined
grondilu yeah, I admit I don't even know exactly what precedence make it work 08:22
08:22 xtreak left
grondilu but I hate parenthesis so much... 08:22
08:24 xtreak joined
masak you should use Forth or something ;) 08:25
grondilu lol I was think about it just after I wrote that 08:26
*thinking
masak or Brainfuck 08:27
08:27 salva left
grondilu :/ 08:27
Forth is very respectable a language, don't mock it
masak not my intent to mock anything 08:28
just listing languages that don't parenthesize expressions 08:29
arnsholt Or just use lots and lots of intermediate variables =)
grondilu yeah but you went straight form Forth to Brainf*. But nevermind
masak though I do believe both of those languages use `[` and `]` for delimiting things, so I guess it depends how far your aversion goes
grondilu: can you think of a third language? I'm curious. 08:30
grondilu: for what it's worth, I also admire Forth quite a bit
grondilu not one in mind, no.
masak then I feel less bad for mentioning those two together ;)
arnsholt I almost added Smalltalk, but it does parenthesise expressions. It's just invocations that are paren-less 08:31
masak I still remember (I think it was) nothingmuch who implemented a Forth in Haskell in the early Pugs days 08:32
think he called it "harrorth" or something
and his comment on Forth was that it was much deeper and more interesting than he had previously realized, and that his implementation didn't do it justice
or something to that effect
grondilu yeah, Forth is definitely cool 08:33
masak also, please don't mock Brainfuck :P it may not be a respectable language, but it's a very minimal Turing Tarpit, with emphasis on the "Turing" 08:34
arnsholt I'm a bit sceptical of stack based languages. But that's probably due to my only exposure to them being the BibTeX style language, which is a bit idiosyncratic
masak irclog.perlgeek.de/perl6/search/?n...q=harrorth tells me I got the name of the language ("harrorth") right, as well as the author (nothingmuch) 08:35
but I can't archive.org from where I am, and the original link is dead 08:36
arnsholt: I think there is something genuinely interesting going on in the realm of typed stack-based languages, such as Cat and Kitten
I investigated that a little bit when I was toying with a hobby drawing language :)
08:37 wamba1 left
arnsholt Oh, typed stack languages. That sounds delightfully mind-bending, actually =) 08:38
masak yeah 08:39
file it under "shows promise, but the mind-bending parts are problematic"
arnsholt =D
masak I remember something about "how do we represent a vararg on the stack?"...
arnsholt Heh 08:45
08:45 poska joined 08:48 dakkar joined 08:49 mr_ron joined 08:52 grondilu left 08:57 mr_ron left 08:59 gdonald left 09:00 bjz_ left 09:03 jonas1 joined, xtreak left 09:04 bjz joined 09:06 agentzh joined 09:09 BooK joined 09:10 bjz left 09:11 bjz_ joined 09:14 salva joined 09:18 abraxxa left, abraxxa joined 09:19 pyrimidine left 09:25 labster joined, labster left, labster joined 09:28 bjz_ left 09:34 bjz joined 09:35 g4 joined 09:41 bjz_ joined 09:42 pmurias joined 09:43 xtreak joined, bjz left 09:56 wolfram joined
wolfram Postscript is stack based and should work without parenthesing expressions -- but I don't know it too well 09:58
10:00 xtreak left
TimToady says HI from HI 10:02
10:02 xtreak joined 10:08 andrzejku joined 10:13 ggoebel left 10:14 bjz joined 10:15 bjz_ left 10:16 ZzZombo joined, ZzZombo left, ZzZombo joined 10:18 pyrimidine joined 10:19 tharkun left
andrzejku hello :) 10:20
10:21 lukaramu joined
andrzejku yesterday Perl6 helped me to go sleep 10:21
last night*
10:26 ggoebel joined
samcv :) 10:28
10:30 tharkun joined 10:36 astj left, TEttinger left 10:37 astj joined 10:42 astj left
zengargoyle i miss me some Forth. it was my third language after TRS-80 Basic and Turbo Pascal. it was the only PD language for the Amiga at the time where you could get down into the guts of the OS. 10:48
10:53 salva left, salv0 joined
lizmat TimToady o/ 10:53
andrzejku the intresting thing which I admit and someone show me last night here 10:54
github.com/damaxi/Algorithm/blob/m..._number.p6
masak today's discussion about typed stack languages made me start dreaming again about my figure-drawing language :)
andrzejku this is faster ( $mid + $multiplier * (($high - $mid).abs / 2)).round(1) than $mid + $multiplier * (($high - $mid) div 2) 10:55
10:56 mr-foobar left
masak those are not the same, though. there's an .abs missing on the second one 10:57
what about `+> 1`, though? :)
10:57 mr-foobar joined
andrzejku +> 1? 10:58
masak m: say 11 +> 1
camelia 5
masak bit-shift to the right by 1 step 10:59
andrzejku oh okay I just checked it
masak I'm not entirely serious in proposing it
it feels like the kind of premature optimization that's evil almost by default 11:00
andrzejku masak, that was written on my Assembler book :)
11:05 astj joined 11:09 astj left 11:15 abraxxa left 11:28 abraxxa joined
ZzZombo It appears I have incapable to understand what exactly is this make stuff and why it it needed. I'm trying to parse a grammar and make a data structure out of it for later use. 11:33
yoleaux 08:12Z <arnsholt> ZzZombo: I get 「 and 」 in PuTTY with Courier New, FWIW
timotimo ZzZombo: let me try to explain 11:34
you know how when you capture something in your regex like a <realsuperhero>?
ZzZombo IDK, I tried that as well, with chcp 65001 active, no effect/
timotimo: yes. 11:35
timotimo you can access the things the realsuperhero regex/token matched through $<realsuperhero>?
11:35 pyrimidine left
ZzZombo yup 11:35
11:35 pyrimidine joined, xtreak left
timotimo when you call "make" where you have the $/ that belongs to the realsuperhero regex (i.e. in the realsuperhero regex itself, or in an action method called realsuperhero), that will set the value of $<realsuperhero>.made 11:36
the action method will be called when a match has succeeded, and its most common task is to build a piece of the final datastructure and attach it to the match result using "make" 11:37
of course you're free to put the "make" as close towards the TOP as you want, and grab data from deeper submatches 11:38
moritz though the deeper you go, the more you couple the code to structure of the regexes
timotimo really, action methods is a way to spread out mostly self-contained chunks of "match tree to datastructure" code "closer to" where the match happens 11:39
yes, what moritz said
11:39 xtreak joined
tbrowder mornin #per6 11:39
ZzZombo say I have string 'a { b=z x { y=d} }', I have working grammar to parse that but I don't get how to make a data structure that reflects the given layout using action class. 11:40
11:41 CIAvash left
timotimo the rule that's responsible for b=z would "make $<first>.Str => $<second>.Str" or "make [$<first>.Str, $<second>.Str]" or something like that 11:42
the rule that's responsible for "a { ... }" would do something like "make $<submatches>.map(*.made)" 11:43
tbrowder ref: p6 run command, the last several days i've been warned about possible dire consequences when allowing user strings to be inserted into the command. can anyone show a regex that would warn of all, or at least most, bad chars and char combos that would cause a problem?
ZzZombo yea, I got that one, but I don't see how to "attach" inner group into the root. 11:44
tbrowder would that be useful in the docs?
11:44 Actualeyes left
timotimo well, ideally you'd have a proto regex that'll match either a thing with a =, or a thing with { } 11:44
and you + that
so your $<theprotoregex> will contain all those matches, regardless of whether it's one of the = things or one of the { } things 11:45
and their .made will be a suitable thing to just put into the resulting list
ZzZombo hm... does it have to be a protoregex? Currently it's an alternating group like <key> <value> || <group> 11:46
timotimo doesn't have to 11:47
in that case your best bet is to put it into ( ), so that you have the ordering from that thing 11:48
and then you'd do something like $/.list.map({ $_<key> ?? $_<key>.Str => $_<value>.Str !! $<group>.made })
andrzejku is there something like perl6doc command? 11:52
ZzZombo hmm, you use just 'make stuff' but docs.perl6.org/language/grammars tells me to use '$/.make stuff'. Is it the same? 11:53
ranguard andrzejku: github.com/perl6/doc
andrzejku ranguard, mm? grep? 11:54
ranguard "p6doc -- an attempt to write something like 'perldoc' for Perl 6" - that not what you are after? 11:56
andrzejku :) p6doc? 11:57
11:58 labster left 12:05 Actualeyes joined, tojo joined
tojo my %hash = foo => 1; 12:08
if %hash<a>:exists {
say "not gonna print this";
}
my $key = 'b';
if %hash«$key»:exists {
say "why i'm here";
}
hey, can someone point me to right direction here? :)
masak m: my %hash = foo => 1; my $key = 'b'; if %hash«$key»:exists { say "why i'm here" }; say "alive" 12:09
camelia why i'm here
alive
masak huh.
I... I call bug.
m: my %hash = foo => 1; my $key = 'b'; if %hash«$key»:exists { say "why i'm here" }; say %hash.perl 12:10
camelia why i'm here
{:foo(1)}
tojo huh :D
but ok :) i'll have to go around this then and issue bug report about this somewhere 12:18
tbrowder fancy quotes instead of braces? didn't know that was permitted
masak tojo: email to [email@hidden.address]
tojo: helps a lot of you just paste the backlog above into the email
especially my interaction with camelia, but also the rest helps as background 12:19
tbrowder: it's strangely consistent with q and qq, see :)
CIAvash[m] m: my %hash; my $key = 'a'; dd %hash«$key»
camelia (Any,)
tojo masak: sure, i'll but all the info i have. thx! 12:20
masak de rien 12:24
tbrowder masak: ok, i guess i need to dive into that more. at any rate, i think that part oh hash docs probably could use some love... 12:25
masak: any thoughts on a regex for checking run args before use? 12:26
timotimo m: my %hash; my $key = 'a'; dd %hash«$key» 12:27
camelia (Any,)
timotimo m: my %hash; my $key = 'a'; dd %hash«$key»:exists
camelia (Bool::False,)
12:27 cibs left
timotimo m: my %hash; my $key = 'a'; dd %hash{$key}:exists; dd %hash{$key,}:exists 12:27
camelia Bool::False
(Bool::False,)
masak m: my %hash; my $key = 'a'; say so %hash«$key»:exists 12:29
camelia True
masak m: say so (False,)
camelia True
masak there we go
timotimo m: my %hash; my $key = 'a'; say all %hash«$key»:exists
camelia all(False)
timotimo m: my %hash; my $key = 'a'; say so all %hash«$key»:exists
camelia False
masak a list of one False element boolifies to True
timotimo of course
masak but why would %hash<a> be an item while %hash«$key» is a list? 12:30
timotimo yeah, that's the bug
masak aye
timotimo m: my $key = "a"; dd «$key»
camelia slip("a",)
timotimo is it meant to be like this?
12:30 kurahaupo joined
timotimo committable6: release my $key = "a"; dd «$key» 12:31
committable6 timotimo, ¦«release»: Cannot find this revision (did you mean “Prague”?)
timotimo committable6: releases my $key = "a"; dd «$key»
masak m: dd <a>
camelia "a"
committable6 timotimo, ¦«2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10,2016.11,2016.12,2017.01,HEAD»: slip("a",)
masak I would expect «$key» to eval to "a" also, I think
timotimo well, that part has been like that forever at least
masak I can see how that might have happened 12:33
12:33 cibs joined
masak I mean, «» isn't something one'd reach for if one wanted just a string 12:33
because %hash{$key} would work just as well 12:34
timotimo right
though when you've started with using < > everywhere and then get told "«» is the interpolating variant of < >", i can see why you'd reach « » instead of { } 12:35
masak aye 12:36
12:37 xtreak left 12:42 cibs left 12:44 robertle joined, cibs joined
abraxxa is there a module for html parsing which supports css selectors? 12:45
I'm using Web::Query::LibXML in Perl 5 for that
12:48 effbiai left 12:50 effbiai joined, effbiai left, effbiai joined, pyrimidine left, pyrimidine joined
timotimo so should we be slipping the one element, realize that it's just one element, and just return a single value instead? 12:53
abraxxa and which http client module is recommended?
ZzZombo m: class A::B { has $.r; method a { $.r='x' } };my $a=A::B.new;$a.a; 12:58
camelia Cannot modify an immutable Any
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo you need either "has $.r is rw" or access $!r from inside method a 12:59
ZzZombo m: class A::B { has $.r; method a { $!r='x' } };my $a=A::B.new;$a.a;
camelia ( no output )
tbrowder abraxxa: gfldex recommends his HTTP::Client
abraxxa tbrowder: ok. what about HTTP::UserAgent? 13:01
abraxxa likes how zef installs are atomic, one module fails, none of the deps stays installed 13:02
ZzZombo "Cannot look up attributes in a Grammar::VDF::Actions type object"
??
moritz instantiate it? 13:03
ZzZombo $/.make($!root=$<section>.made); <- this is the origin of the error, if I remove $!root=
it works
timotimo yeah, pass :actions(Grammar::VDF::Actions.new)
ZzZombo k
timotimo i mean, in the .parse call 13:04
ZzZombo works, thanks
CIAvash[m] abraxxa: there is Dom::Tiny, but I haven't used it github.com/zostay/p6-DOM-Tiny/blob...M/Tiny.pm6
timotimo is that the Valve Data Format? 13:05
abraxxa they all seem to assume internet connectivity for testing 13:10
CIAvash[m]: thanks, missed that one on modules.perl6.org 13:11
ZzZombo what is the XX operator? 13:13
timotimo it's for betraying folks
we call it "the double-cross"
m: say [[1, 2], <a b>] XX [[9, 8], <x y>] 13:14
camelia ((([1 2] [9 8])) (([1 2] (x y))) (((a b) [9 8])) (((a b) (x y))))
timotimo m: say [[1, 2], <a b>] XX [[9, 8], <x y>
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in array composer; couldn't find final ']'
at <tmp>:1
------> 3say [[1, 2], <a b>] XX [[9, 8], <x y>7⏏5<EOL>
expecting any of:
statement end
timotimo oops
m: say [(1, 2), <a b>] XX ((9, 8), <x y>)
camelia ((((1 2) 9) ((1 2) 8)) (((1 2) x) ((1 2) y)) (((a b) 9) ((a b) 8)) (((a b) x) ((a b) y)))
timotimo that's what i meant to do the first time 13:15
no, actually
m: say ((1, 2), <a b>) XX ((9, 8), <x y>)
camelia (((1 9) (1 8) (2 9) (2 8)) ((1 x) (1 y) (2 x) (2 y)) ((a 9) (a 8) (b 9) (b 8)) ((a x) (a y) (b x) (b y)))
sergot does anyone know if Perl Foundation participates in GSoC this year? :)
yoleaux 19 Jan 2017 11:29Z <kalkin-> sergot: can you please glance at io-socket-ssl/#17? any hints how I can fix this issue and submit a PR back would be great!
19 Jan 2017 12:33Z <kalkin-> sergot: never mind my previous message. my bad
timotimo sergot: i think nobody volunteered to do the necessary work? and now it's too late i believe
sergot timotimo: yes, the deadline was 9th of February iirc 13:16
:( 13:18
13:19 bjz left
IOninja m: dd «a» 13:20
camelia "a"
IOninja m: my $x = "a"; dd «$x»
camelia slip("a",)
13:20 rurban joined
IOninja m: my $x = "a"; dd «$x $x» 13:21
camelia ("a", "a")
masak IOninja: looking at the above, I can't swear that the bug isn't a feature after all 13:26
IOninja tries to parse the double negative...
13:27 cale2 joined
IOninja You swear it's a feature? 13:27
jnthn m: say <<foo>>.WHAT
camelia (Str)
tbrowder abraxxa: i haven't actually tried either client yet, i'm going with gfldex's rec, and it should handle https, most important to my need, can't say about other client. also UI looks like style i like.
ZzZombo <timotimo> and then you'd do something like $/.list.map({ $_<key> ?? $_<key>.Str => $_<value>.Str !! $<group>.made })
jnthn m: my $foo = 'x'; say <<$foo>>.WHAT
camelia (Slip)
jnthn m: my $foo = 'x'; say <<$foo>>.perl
camelia slip("x",)
jnthn m: my $foo = 'x y'; say <<$foo>>.perl
camelia slip("x", "y")
timotimo that's what i said, yeah
ZzZombo apparently .list() returns ().
what do 13:28
abraxxa tbrowder: it works nicely, only the tests assume internet connectivity
timotimo what does your regex look like?
jnthn m: my $foo = 'x'; say <<"$foo">>.perl
camelia "x"
abraxxa DOM::Tiny fails some tests, force-installing it now
13:28 lichtkind joined
IOninja oh heh 13:28
timotimo oh, wait, you want $/[0].list probably
ZzZombo token key-value { <name>\h+<value> }
rule section { <(<name> '{' [<key-value> || <section>]* '}')> [\n || $] }
cale2 m: ^200.pick.say
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3^2007⏏5.pick.say
WARNINGS for <tmp>:
Useless use of "^" in expression "^200.pick.say" in sink context (line 1)
200
jnthn The thing about <<$x>> is that we cannot tell - syntactically - how many elements it's going to produce
Because we split the interpolated thing on whitespace 13:29
timotimo ah
IOninja m: ^200 .pick.say
camelia 10
jnthn Notice how where we can, in <<"$x">>, we do indeed give back a Str
timotimo i told you to put it into ( ) and + that
you have [ ] and * - please use ( ) and * instead
abraxxa would be nice to make zef ask if a module should be installed anyways on test failure to not have to run all tests again
13:29 mr_ron joined
IOninja abraxxa: --force 13:29
abraxxa IOninja: yes, for another run
ZzZombo whoops
IOninja abraxxa: --/test (or --/tests) 13:30
m: my $foo = 'x y'; say <<$foo $foo>>.perl
camelia ("x", "y", "x", "y")
jnthn And if you want to argue that <<$x>> should return Str when it can, and Slip when it can't, then just think how much more confusing it'll be when `if %h<<$x>>:exists { }` suddenly becomes true because $x contains whitespce. :-)
IOninja :)
Yeah, makes sense in that framing 13:31
13:31 lukiramu joined
IOninja Seems it's always true 13:33
m: my %h = :42a, :72b; my $x = 'z'; if %h<<$x>>:exists { say "hi"}
camelia hi
IOninja m: my %h = :42a, :72b; my $x = 'a b'; if %h<<$x>>:exists { say "hi"}
camelia hi
IOninja m: my %h = :42a, :72b; my $x = 'y z'; if %h<<$x>>:exists { say "hi"}
camelia hi
jnthn Right, 'cus it always returns a non-empty list 13:34
IOninja huh
jnthn m: my %h = :42a, :72b; my $x = 'z'; if %h<<"$x">>:exists { say "hi"}
camelia ( no output )
IOninja m: my %h = :42a, :72b; my $x = 'y'; dd %h<<$x>>
camelia (Any,)
jnthn m: say so(False,)
camelia False
IOninja oh lol
m: say so (False,) 13:35
camelia True
13:35 lukaramu left
jnthn That's what I wnated :) 13:35
13:36 perlpilot joined
abraxxa what are I'm doing wrong here? my @pdf-uris = $dom.find('a[href$="pdf"]').map(URI.new(*.attr('href'))); 13:37
without the URI.new it works
timotimo you're passing a WhateverCode to URI.new, is that what you want?
and you're calling that URI instance with everything in the result of .find
jnthn Probably meant .map({ URI.new(.attr('href')) }) or so 13:38
abraxxa I want to return URI objects instead of Str
IOninja what jnthn said.
jnthn Whatever-currying doesn't happen inside of argument lists
abraxxa that works and is easier to understand, thanks
jnthn It has to be at the top level
IOninja .map: *.attr('href').&{URI.new: $_}; # Fight the Man 13:39
abraxxa wuhhahhaa 13:40
timotimo yup
abraxxa that's even more confusin
confusing
having a block which is called per element is easier to grasp
URI's absolute and relative methods are deprecated 13:41
IOninja abraxxa: I wouldn't recommend using that. It'll croak on many real-world URLs
<a href="foo.bar/whoops a space"></a> <--- try that one 13:42
timotimo or data: urls
IOninja <a href="foo.bar/?I♥u"></a> # that'll choke it too IIRC 13:43
Basically anything that doesn't conform to the spec... and since when web developers rigidly followed the spec :)
abraxxa my goal is to either set the absolute url from the fetched page if the links on it are relative 13:44
IOninja Yup, throws on both of my examples. 13:45
13:45 araraloren joined
IOninja Mojo::URL:from<Perl5> is pretty good when it comes to Real World™ URLs 13:46
abraxxa this is just a simple script to show the weekly menu pdf ;)
it currently has absolute URIs but had relative in the past
ZzZombo difference between .append and .push for Hash? 13:57
masak m: for "append", "push" -> $method { my @a = 1, 2, 3; @a."$method"([4, 5]); say @a.perl } 13:59
camelia [1, 2, 3, 4, 5]
[1, 2, 3, [4, 5]]
masak ZzZombo: ^
IOninja that's not a Hash...
masak oh, for Hash!
IOninja :)
s: %, 'append'
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/80e0...sh.pm#L282
IOninja s: %, 'push'
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/80e0...sh.pm#L255
IOninja Ahhhh 14:00
masak not sure what those two methods even do on Hash, to be honest
IOninja m: my %h = :a[42, ]; %h.push: "a" => <a b c a>; dd %h 14:01
camelia Hash %h = {:a($[42, ("a", "b", "c", "a")])}
IOninja m: my %h = :a[42, ]; %h.append: "a" => <a b c a>; dd %h
camelia Hash %h = {:a($[42, "a", "b", "c", "a"])}
IOninja ZzZombo: ^
masak Perl 6 is weird :P
ZzZombo welp 14:02
IOninja Yeah, existence of these is pretty weird
And their impl is 99% identical; and both use helper methods whose impl is 99% identical :P
Man, this stuff's documented too, ZzZombo 14:05
jnthn They're useful if you're aggregating values by hash key 14:06
ZzZombo I couldn't find the difference just by looking at the docs.
IOninja You can type the routine name in the search box and then click on it and scroll to the type in question.
ZzZombo <ZzZombo> I couldn't find the difference just by looking at the docs. 14:07
IOninja yeah 14:08
fixing it
tbrowder abraxxa: hm, can't help there, maybe cobble together yr own local server for testing 14:09
ZzZombo ===SORRY!===
Type Array does not support associative indexing.
ugh, how helpful.
Where is that exactly?
IOninja buggable: 8ball where is that exactly? 14:11
ZzZombo: we can't make it more helpful without knowing of the issue. Report such errors. 14:12
huggable: rakudobug
huggable IOninja, Report bugs by emailing to [email@hidden.address]
ZzZombo I'm still investigating. 14:13
14:14 mcmillhj joined
Geth doc: 611d6d24f3 | (Zoffix Znet)++ | doc/Type/Hash.pod6
Include difference between Hash.append/Hash.push

  irclog.perlgeek.de/perl6/2017-02-21#i_14137771
14:17
14:17 pyrimidine left 14:20 agentzh left
IOninja m: my @a = lazy (); say WHAT @a.pop 14:20
camelia (Failure)
IOninja m: my @a = lazy (); say WHAT @a.shift
camelia (Failure)
IOninja m: my @a = lazy (); say WHAT @a.push: 42
camelia Cannot push to a lazy list
in block <unit> at <tmp> line 1
IOninja inconsistent...
14:21 agentzh joined 14:22 cdg joined, cdg left, cdg joined
Geth doc: b6a1b5ddc5 | (Zoffix Znet)++ | doc/Type/Array.pod6
Use more precice language / Mention Array.append throwage

  ...on lazy arrays
14:23
14:23 geekosaur left, skids joined
IOninja m: []<42> 14:25
camelia Type Array does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja m: BEGIN []<42>
camelia ( no output )
IOninja huh?
m: say BEGIN []<42>
camelia ===SORRY!===
Type Array does not support associative indexing.
14:25 geekosaur joined
IOninja m: constant x = []<42>; say x 14:26
camelia ===SORRY!===
Type Array does not support associative indexing.
IOninja ZzZombo: it's probably somewhere in that area ^
trying to take an assoc index from an array at compile time 14:27
14:27 bwisti joined
rurban I stumbled over the LINK phaser, but don;t see any implementation or usage. Is LINK still valid? 14:28
IOninja m: constant %h = :42a; %h.^name.say 14:29
camelia Pair
ZzZombo well, I commented out some lines temporarily, since I have more pressing concerns. gist.github.com/ZzZombo/5caa51f9b2...56920a0d8, I can't make this to work, how do I parse anything via grammars and shape a data structure to follow the parsed thing?
IOninja Because of course it's a Pair -_-
rurban: never heard of it. Where did you stumble on it?
rurban docs.perl6.org/language/phasers 14:30
Must have been a very early design. nqp doesnt have it, or not yet
IOninja rurban: don't see it anywhere in the sauce, or specification.
rurban docs.perl6.org/language/phasers#LINK 14:31
IOninja I mean in rakudo's source
jnthn I think it was speculated in response to some discussion or other; the git history of the design docs may have some background.
rurban It's nowhere. If it would be in nqp src/NQP/Actions.nqp
[Coke] that text is directly lifted from design.perl6.org/S04.html, btw.
We should remove it from the doc site. 14:32
IOninja way ahead of you
[Coke] IOninja++ rurban++
rurban Because I want to finalize cperl phases, and this sounded odd. 14:33
jnthn It doesn't make clear what it thinks of as link time, though, nor what it thinks it is for
(Or what problems it would solve)
Geth doc: 5c85fdd331 | (Zoffix Znet)++ | doc/Language/phasers.pod6
Remove LINK phaser

grep -FR 'LINK' in rakudo and roast repos turn up nothing
rurban Don't you want to ask Larry first? 14:35
jnthn Not for removing from docs :)
14:35 pyrimidine joined
IOninja rurban: we don't document things that aren't part of Perl 6 Language. 14:35
jnthn Docs are meant to cover what's implemented.
IOninja Not on that site at least.
[Coke] also: @Larry, not $Larry 14:37
rurban Where is S04?
IOninja rurban: design.perl6.org/S04.html
rurban ah, specs 14:38
IOninja speculations are they're now called :}
jnthn (To be clear, the point here being that the test suite is the language specification, not a set of documents.) 14:39
rurban I see. LINK was called FINAL until 2014
14:39 Actualeyes left
rurban larry said 2014: s/FINAL/LINK/ for clarity. We don't want people confusing this with any other kind of finalization 14:40
And he created FINAL in 2013: FINAL phase is after the main application's CHECK phase, 14:41
when the application as a whole commits to optimization policies.
In other words, a FINAL block defined in a module is not run when the
module is compiled (that would be a CHECK instead), but rather when the
application using the module is completing its compilation and linking
14:42 sena_kun joined
IOninja intresting.. 14:42
14:42 g4 left
IOninja never heard of term "linking" used in Perl 6 14:42
rurban So it will be eventually in, with more optimizations (~LTO)
inlining and whole program optimizations. like use oo :final. which is also not in yet 14:43
14:43 lichtkind_ joined
jnthn Part of the lack of hurry on that being that we do inlining across compilation units already even without that pragma. 14:44
rurban So I keep it reserved. in cperl it would be a number, not a string. that's why I have to think forward.
jnthn: it's just a hook, probably not needed for a long time 14:45
jnthn Sure
14:46 itaipu joined
rurban AFGAIK larry wanted ISA finalization be controlled by the app, not the module, so he needed that phase. 14:46
jnthn Just to be clear: back in 2013 it surely wasn't clear that you could sensibly assume deoptimization would be a possibility. In reality, all of the JVM, MoarVM, and v8 do it.
cale2 m: my @evens = $_ if .even for ^25; say @evens;
camelia No such method 'even' for invocant of type 'Int'
in block <unit> at <tmp> line 1
jnthn Once you can deopt, the incentive to declare things like `use oo :final` is greatly reduced. 14:47
cale2 m: my @evens = $_ if $_ %% 2 for ^25; say @evens;
camelia [24]
cale2 m: my @evens = $_ if $_ %% 2 for ^25; say @evens[];
camelia [24]
jnthn Since you just speculatively inline whatever fits
rurban like smalltalk, yes
or v8
14:48 lichtkind left
jnthn Yes, the question is what modern runtimes we might wish to target *don't* do it? 14:48
IOninja cale2: you keep assigning a value to the array anew each time, so at the end you have just 24 in it, which is the last value you iterated over. 14:49
rurban I went ahead with more class finalizations, to enable compile-time ISA optimizations, and detect typos in methods and fields.
IOninja m: my @a = ^25 .grep: * %% 2; say @a
camelia [0 2 4 6 8 10 12 14 16 18 20 22 24]
14:49 wamba1 joined, cognominal left
rurban But I have no numbers on that yet 14:49
cale2 IOninja: I'm trying to figure out how to achieve list comprehensions in P6 14:50
IOninja m: my @a = 0, 2 … * < 25; say @a 14:51
camelia [0]
IOninja wat
m: my @a = (0, 2 … * < 25); say @a
camelia [0]
jnthn m: say ($_ if $_ %% 2 for ^10)
camelia (0 2 4 6 8)
arnsholt 0 is less than 25, no?
IOninja oh right
arnsholt =)
IOninja m: my @a = 0, 2 … * > 25; say @a
camelia [0 2 4 6 8 10 12 14 16 18 20 22 24 26]
IOninja :)
cale2: no idea what list comprehemensions are.
arnsholt A list comprehension would usually be realized as a map in Perl (5 & 6) 14:52
jnthn IOninja: It's the name given to the syntax I just showed :)
Or so I thought ;-)
Basiaclly, (<transform> if <condition> for <list>)
IOninja Ah
arnsholt Oh, right. For loops are list-valued in 6, which gives the syntax jnthn gave
cale2 m: say $_ if $_ %% 2 for ^10
camelia 0
2
4
6
8
14:53 Resol joined
cale2 m: say ($_ if $_ %% 2 for ^10) 14:53
camelia (0 2 4 6 8)
cale2 m: my @array = ($_ if $_ %% 2 for ^10); say @array[]
camelia [0 2 4 6 8]
IOninja m: my @a = 0, 2 … * == 24; say @a 14:54
camelia [0 2 4 6 8 10 12 14 16 18 20 22 24]
IOninja m: my @a = 0, 2 … 24; say @a
camelia [0 2 4 6 8 10 12 14 16 18 20 22 24]
14:55 Resol_ left
IOninja magic \o/ 14:55
14:55 Resol_ joined 14:56 cibs left
IOninja m: say 1, 3, 9 … 243 14:57
camelia (1 3 9 27 81 243)
14:57 zengargoyle left
IOninja fancy pants 14:57
m: say 1, 3 … 243
camelia (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 …
14:57 zengargoyle joined, Resol left
cale2 would you be able to do a list comprehension type thing for maps? 14:57
hashes I mean
14:58 cibs joined
IOninja m: my %h = ($_ if $_ %% 2 for ^12); dd %h 14:58
camelia Hash %h = {"0" => 2, "4" => 6, "8" => 10}
arnsholt m: my %h = ($_ => $_*2 for ^4); dd %h # Should also work, IIRC 14:59
camelia Hash %h = {"0" => 0, "1" => 2, "2" => 4, "3" => 6}
cale2 m: say 2.even 15:00
camelia No such method 'even' for invocant of type 'Int'
in block <unit> at <tmp> line 1
cale2 m: say 2.odd
camelia No such method 'odd' for invocant of type 'Int'
in block <unit> at <tmp> line 1
IOninja m: say 2 %% 0
camelia Attempt to divide 2 by zero using infix:<%%>
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja m: say 2 %% 2
camelia True
IOninja m: say 2 !%% 2
camelia False
arnsholt (The %% operator being the nice way to write "(x % y) == 0") 15:01
IOninja m: say (5, -5, 5 … *)[^20] 15:02
camelia (5 -5 5 -5 5 -5 5 -5 5 -5 5 -5 5 -5 5 -5 5 -5 5 -5)
IOninja That's so cool.
cale2 m: my @tuples = (1,2) xx 1..4; say @tuples[] 15:06
camelia [1 2 3 4]
15:07 Actualeyes joined
cale2 m: my @tuples = (1,2) Z 1..4; say @tuples[] 15:07
camelia [(1 1) (2 2)]
cale2 m: my @tuples = (1,2) X 1..4; say @tuples[]
camelia [(1 1) (1 2) (1 3) (1 4) (2 1) (2 2) (2 3) (2 4)]
IOninja m: say (1/1, 1/3, 1/9 … ∞)[^12]».perl 15:08
camelia (1.0 <1/3> <1/9> <1/27> <1/81> <1/243> <1/729> <1/2187> <1/6561> <1/19683> <1/59049> <1/177147>)
IOninja w00t
15:09 petercommand left 15:10 petercommand joined
IOninja m: say (1, *.is-prime … ∞)[^12] 15:10
camelia (1 False False False False False False False False False False False)
IOninja Booo. Didn't do what I wanted. Perl 6 sucks.
m: say ("a", *.succ.uc, *.succ.lc … ∞)[^12] 15:12
camelia (a B C D E F G H I J K L)
IOninja Hm, I don't fully grok this thing yet...
m: say (1, { $_ .= succ until .is-prime } … ∞)[^12] 15:13
camelia No such method 'is-prime' for invocant of type 'Any'
in block <unit> at <tmp> line 1
IOninja How u do dis?
m: say (1, { repeat { $_ .= succ } until .is-prime; $_ } … ∞)[^12] 15:14
camelia (1 2 3 5 7 11 13 17 19 23 29 31)
IOninja \o/
15:16 ZzZombo_ joined
IOninja m: say (1, { (($^v^..∞).grep: *.is-prime)[0] } … ∞)[^12] 15:17
camelia (1 2 3 5 7 11 13 17 19 23 29 31)
15:17 abraxxa left 15:20 araraloren left, ZzZombo left 15:21 araraloren joined 15:27 poska left, itaipu left
IOninja m: say "Ⅳ".Int 15:28
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Ⅳ' (indicated by ⏏)
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja what is the thing were're supposed to use to get the number? 15:29
15:29 ZzZombo_ left
IOninja m: &unival 15:29
camelia WARNINGS for <tmp>:
Useless use of &unival in sink context (line 1)
IOninja m: say unival "Ⅳ"
camelia 4
IOninja cool
m: say ("Ⅰ" ... *)[^20]
camelia (Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ Ⅻ ⅠⅠ ⅠⅡ ⅠⅢ ⅠⅣ ⅠⅤ ⅠⅥ ⅠⅦ ⅠⅧ)
IOninja m: say ("Ⅰ" ... *)[^20]».unival
camelia (1 2 3 4 5 6 7 8 9 10 11 12 1 1 1 1 1 1 1 1)
IOninja 1s? 15:30
m: say ⅠⅧ
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3say Ⅰ7⏏5Ⅷ
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
st…
IOninja m: say Ⅷ
camelia 8
IOninja m: say unival Ⅷ
camelia NaN
IOninja Oh, now I get it. It's a multichar string
m: say ("Ⅰ" ... *)[^20]».&{.comb».unival.sum} 15:31
camelia (1 2 3 4 5 6 7 8 9 10 11 12 2 3 4 5 6 7 8 9)
IOninja Roman digits r hrd
15:32 abraxxa joined 15:34 ZzZombo joined, curan left 15:35 ZzZombo is now known as Guest2293
IOninja m: say ({ (my \n = ++$) %% 15 ?? "FizzBuzz" !! n %% 3 ?? "Fizz" !! n %% 5 ?? "Buzz" !! n } … ∞)[^20] 15:35
camelia (1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz)
IOninja Wanted to do this one with sequence going in roman numerals :(
15:38 astj joined
IOninja m: say $_ %% Ⅴ*Ⅲ ?? 'Fizz Buzz' !! $_ %% Ⅲ ?? 'Fizz' !! $_ %% Ⅴ ?? 'Buzz' !! $_ for ^Ⅹ*Ⅹ 15:40
camelia Fizz Buzz
1
2
Fizz
4
Fizz Buzz
Fizz
7
8
Fizz
Fizz Buzz
11
Fizz
13
14
Fizz Buzz
16
17
Fizz
19
Fizz Buzz
Fizz
22
23
Fizz
Fizz Buzz
26
Fizz
28
29
Fizz Buzz
31
32
Fizz
34
Fizz Buzz
Fizz…
IOninja ehe
ugexe .tell abraxxa it could be possible to make zef not re-test if you restart a previously failed run, i'm just not sure the best way to implement it
yoleaux ugexe: I'll pass your message to abraxxa.
abraxxa ugexe: i see
yoleaux 15:40Z <ugexe> abraxxa: it could be possible to make zef not re-test if you restart a previously failed run, i'm just not sure the best way to implement it
ugexe because usually a failed run means you want to rerun after some new command to fix the previous problem 15:41
15:41 eroux joined 15:42 astj left
ugexe so off the top of my head i can imagine it leaving some .dot-file as a marker, or passing something like --restart-run=$some-id-from-stderr 15:42
15:43 itcharlie1 joined
abraxxa ugexe: I was more thinking about a 'do you like to install it anyway?' in case of an interactive shell 15:43
ugexe I feel like I've been trying to avoid interactive stuff 15:44
[Coke] sena_kun: github.com/perl6/doc/pull/1207 is updated, more feedback welcome.
ugexe not that its wrong, but I'd like to expose it at a non-interactive level and possibly build the interactive bits on that 15:45
15:46 eroux left
sena_kun [Coke], shouldn't we add IO::String to META.json? 15:47
abraxxa ugexe: understandable for me 15:48
sena_kun [Coke], except for missing dependency, you did an awesome job, in my opinion. After some tests I didn't notice any problems and the performance is very pleasant. I'm ready to merge it and fix META.json right now if needed. Does gfldex agreed? 15:52
15:55 rurban left 15:56 rurban joined 15:58 cibs left
IOninja Recall someone wanted to add a WhateverCode candidate to head? I found a neat version of that: 15:58
m: my @a = ^100-10; say |@a … *.is-prime
camelia (-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2)
IOninja hehe :)
sena_kun About my yesterday roast-related question. I want to write some tests for :dba adverb, but it doesn't has its own section. Should I create a new file in modifiers section? 15:59
IOninja sena_kun: sure why not. Be sure to add it to github.com/rakudo/rakudo/blob/nom/...ctest.data too, so it gets run
16:00 kurahaupo left, cibs joined, kurahaupo joined, araraloren left
cale2 could you make an `is pure` trait for subs and methods? 16:00
sena_kun IOninja, okay, let'ss see what I'm able to write! Thanks.
IOninja cale2: we already have it.
ugexe m: say await start { prompt "..." } # is there a way to do a prompt that has a timeout without nativecall yet? 16:01
camelia ...»Wann treffen wir drei wieder zusamm?«
IOninja Well, the above don't work. It'll throw the socket read from other thread thing 16:02
ugexe only if it gets assigned a different thread id!
IOninja Is it possible to force it to use the same thread id? 16:03
ugexe no, but...
IOninja ...
ugexe github.com/ugexe/Perl6-Net--HTTP/b...rt.pm6#L70 you can try to reuse the thread as long as that error check itself thinks you're using the same thread id 16:04
cale2 IOninja: I see the docs now, thanks. But `is pure` is more about the final result. You can do all sorts of wacky things inside the function as long as the final result "is pure" I guess
Geth doc/coke/examples: 313c01a6e7 | Altai-man++ | META.info
Add IO::String dependency
ugexe e.g. you should be able to spam that prompt command and eventually get past the error check (although it might blow up further down the line) 16:05
16:06 gregf_ left
IOninja that sounds... horrible :) 16:06
sena_kun cale2, I'm not a specialist in optimisations, but I doubt a bit that you will gain anything from such declaration(in performance and purity areas, at least).
ugexe because that error check protects you from something that doesn't work right half the time. but sometimes half the time is enough :)
cale2 sena_kun: but you could write a quickcheck type system that greps all of the "is pure" things and makes a million tests for all of them 16:07
sena_kun To properly use purity you need to ban '=' operator(at least in its common sense, not math-related sense). It it obviously non-impreative way. 16:08
cale2, Test::Fuzz?
cale2, fuzzing testing exists not for h* only.
16:09 pyrimidine left
IOninja Our `is pure` tells the compiler it can constant fold and the thing will be evaled at compile time. 16:09
16:09 pyrimidine joined
Geth doc: 1e1985c296 | Cale++ | doc/Language/haskell-to-p6.pod6
Add rough update of list comprehensions
16:09
16:12 rurban left
IOninja m: sub foo($x, $y) { $x**$y }; $ =+(foo(2, 200000) xx 400); say now - INIT now 16:12
camelia 4.7638959
IOninja m: sub foo($x, $y) is pure { $x**$y }; $ =+(foo(2, 200000) xx 400); say now - INIT now
camelia 0.0015151
IOninja m: say 4.7638959/0.0015151
camelia 3144.278199
16:14 Actualeyes left 16:17 itaipu joined 16:19 pyrimidine left 16:20 pyrimidine joined
ufobat_ i dont know what i am doing but is this a bug: 16:20
IOninja \o/
ufobat_ m: say EXPORTHOW.WHO.perl
camelia No such method 'WHICH' for invocant of type 'Perl6::Metamodel::CoercionHOW'
in block <unit> at <tmp> line 1
IOninja heh 16:21
Don't think so.
Meta stuff is lowerlevel and doesn't have all the bells and whistles that normal types have
m: say EXPORTHOW.WHO.^methods».name.say 16:22
camelia (package_at_key merge-symbols AT-KEY gist Str name Hash AT-KEY STORE_AT_KEY ASSIGN-KEY categorize-list perl of classify-list gist Map BIND-KEY default DUMP clone keyof dynamic push WHICH append DELETE-KEY elems List iterator STORE STORE_AT_KEY Hash sort …
IOninja m: say EXPORTHOW.WHO.^name.say
camelia Stash
True
IOninja m: say EXPORTHOW.WHO..say 16:23
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say EXPORTHOW.WHO..say7⏏5<EOL>
Other potential difficulties:
Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit i…
IOninja m: say EXPORTHOW.WHO.say
camelia EXPORTHOW
True
IOninja m: Stash.perl
camelia ( no output )
IOninja m: Stash.new.perl
camelia ( no output )
IOninja shrugs
ufobat_ well.. okay :-) 16:24
16:24 agentzh left, pyrimidine left 16:27 agentzh joined
IOninja m: (Int()).HOW.perl 16:27
camelia No such method 'perl' for invocant of type 'Perl6::Metamodel::CoercionHOW'
in block <unit> at <tmp> line 1
IOninja m: (Int()).HOW.^methods».name.say
camelia (archetypes new_type name shortname target_type constraint_type delegate_methods_to delegating_methods_to pretend_to_be type_check find_method pretending_to_be CREATE bless BUILDALL new defined ACCEPTS isa)
IOninja yeah, it's pretty barebones 16:28
ufobat_ what would you suggest to read in order to understand meta programming? 16:30
IOninja ufobat_: edumentab.github.io/rakudo-and-nqp-...ls-course/
ufobat_: also, jnthn++ had a good article, but I won't be able to find it. Might've been one of the Advent articles from years back 16:31
ufobat_ yay :D thank you
IOninja ufobat_: well, I guess internals course is overkill, actually.
16:31 rurban joined
ufobat_ it wont hurt reading it, i guess :-) 16:32
IOninja But you do make a metaclass as part of it and it kinda clicks a bit
ufobat_ perl6advent.wordpress.com/2011/12/...y-and-how/ <- do you mean this one?
IOninja Or you can look at the sauce of github.com/perl7/perl7
That's the meta class that does things: github.com/perl7/perl7/blob/master...nqp#L5-L23
16:33 movl left
IOninja ufobat_: hmm don't think so. It was a really long article 16:33
16:34 khw joined 16:36 cibs left
IOninja crazy how many years some people have been here for... 5,8,10, or more 16:36
perlpilot "here" as in #perl6? 16:38
IOninja hehe: timotimo talking about being spoiled by python: irclog.perlgeek.de/perl6/2012-01-26#i_5052829
perlpilot: here as in "working on Perl 6"
16:38 cibs joined
ufobat_ IOninja, thanks for the tipps :-) 16:38
IOninja There's even a log of me offering help 10 years ago, saying I'm not good with perl lol: irclog.perlgeek.de/perl6/2007-07-25#i_69032 16:39
perlpilot Well, no one has been working on Perl 6 for more than 17 years (except maybe Chip, but it wasn't called Perl 6 then) :-) 16:40
IOninja Never heard of Chip 16:41
perlpilot Chip Salzenberg
IOninja "Perl's Chip Salzenberg Sued, Home Raided" 16:42
google headlines
perlpilot yeah, that sucked.
huf so what happened? 16:53
did he get sued into penury?
16:55 amalia__ joined, Guest2293 left
perigrin perlpilot: I think crystal or whatever it was called then was also very different 16:55
perlpilot Topaz 16:56
yeah, it was something like the quickest Perl he could build with C++ or something
perigrin or even just an attempt to build a new perl5 VM in C++ 16:57
perlpilot www.perl.com/pub/1999/09/topaz.html (google++) 16:58
perigrin pretty sure the Real Audio link there won't work on my iPad 16:59
cale2 are grammars being backported into perl5? 17:06
perlpilot cale2: There's Perl6::Rules, but I suspect you mean more "natively". If that's the case, I don't know and would ask p5p 17:07
perigrin no, nothing more native than what's on CPAN. 17:09
Also relevant are Damain's Regexp::Grammars 17:10
17:10 mcmillhj left 17:14 pyrimidine joined 17:15 mcmillhj joined 17:17 robertle left 17:19 jonas1 left 17:20 mcmillhj left 17:27 mcmillhj joined 17:29 cibs left 17:30 abraxxa left 17:31 cibs joined 17:32 mcmillhj left 17:35 sufrostico joined, sufrostico left 17:37 gregf_ joined 17:39 eroux joined 17:44 eroux left 17:45 mcmillhj joined 17:49 dakkar left 17:50 rurban left, kalkin- joined, mr_ron left
kalkin- hi 17:50
how do I get pod from a package?
Is there some magic access like Foo::Bar::.pod?
17:50 mcmillhj left 17:51 rurban joined
IOninja It's $= or $=pod or something or other 17:51
kalkin- IOninja: I thought $= is only available for the current scope 17:52
I basically want to do say My::Module.pod();
IOninja m: package Foo { ␤=begin pod␤␤=head2 woot␤␤look, a pod!␤␤=end␤␤ }; say Foo::$= 17:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead
at <tmp>:8
------> 3<BOL>7⏏5=end
IOninja umm
Well, I don't even know how to write pod lol :)
m: package Foo { ␤=begin pod␤␤=head2 woot␤␤look, a pod!␤␤=end pod␤␤ }; say $=pod 17:56
camelia [Pod::Block::Named{:name("pod")}
Pod::Heading{:level("2")}
Pod::Block::Para
woot
Pod::Block::Para
look, a pod!
]
IOninja hm
18:01 pyrimidine left 18:02 pyrimidine joined 18:03 mr_ron joined, mcmillhj joined, cale2 left
IOninja m: "/tmp/Foo.pm6".IO.spurt: qq|package Foo \{ ␤=begin pod␤␤=head2 woot␤␤look, a pod!␤␤=end pod␤␤ our \$pod = \$=pod \};| 18:05
camelia ( no output )
IOninja m: use lib </tmp>; use Foo; say $Foo::pod
camelia [Pod::Block::Named{:name("pod")}
Pod::Heading{:level("2")}
Pod::Block::Para
woot
Pod::Block::Para
look, a pod!
]
IOninja :}
See if there's anything in raw.githubusercontent.com/perl6/sp...tation.pod
18:06 go|dfish left
IOninja Or our docs builder it fishes the pods out of individual files, don't it? 18:06
timotimo no
it basically concatenates the equivalent of "return $=POD;" to the source code 18:07
IOninja ah
18:08 mcmillhj left 18:09 labster joined
IOninja m: say $=do-what-I-mean-dammit 18:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Pod variable $=do-what-I-mean-dammit not yet implemented. Sorry.
at <tmp>:1
------> 3say $=do-what-I-mean-dammit7⏏5<EOL>
18:11 khw left
IOninja So one day it will be? Cool. Will wait. :} 18:12
18:12 rurban left 18:15 mcmillhj joined
[Coke] IOninja: github.com/perl6/doc/blob/coke/exa...e.pm6#L108 18:17
that's the pod extraction routine.
(in it's soon to be new home)
gah, its
timotimo oh? 18:19
we don't have to do that terrible hack any more?
IOninja looks still pretty hackish :}
m: use lib </tmp>; use nqp; use Foo; say nqp::atkey($*REPO.loaded[0].handle.unit, '$=pod') 18:22
camelia [Pod::Block::Named{:name("pod")}
Pod::Heading{:level("2")}
Pod::Block::Para
woot
Pod::Block::Para
look, a pod!
]
IOninja kalkin-: ^ guess that's a way
"a" way
a "way"
18:23 khw joined 18:24 beatdown left
IOninja m: use lib </tmp>; use Foo; use nqp; say nqp::atkey($*REPO.loaded[0].unit, '$=pod') 18:24
camelia [Pod::Block::Named{:name("pod")}
Pod::Heading{:level("2")}
Pod::Block::Para
woot
Pod::Block::Para
look, a pod!
]
18:29 wamba1 left
IOninja hah, raiph seems to have put the homepage weekly url as announcement in r/perl6 instead of the latest weekly. Reddit complains to me that I can't vote or comment :} 18:31
18:34 wamba1 joined
timotimo ? 18:38
IOninja nm 18:41
kalkin- IOninja & Coke thanks! 18:44
18:48 labster left, eliasr joined 18:56 labster joined 18:57 SourceBaby left, SourceBaby joined, ChanServ sets mode: +v SourceBaby
IOninja Looks like there's a bug with `-n` + lines + words 18:59
s: (run(:out, <./perl6 -ne>, 'lines».words', './perl6').out.slurp-rest.say; exit)
SourceBaby IOninja, Something's wrong: ␤␤ERR: readline requires an object with REPR MVMOSHandle␤ in block <unit> at -e line 1␤␤
IOninja perl6 -ne 'lines».words' # type a few lines then press CTRL+D 19:00
oh, words is not related. Just lines() and something to eager it 19:02
Seems already reported for get() rt.perl.org/Ticket/Display.html?id=128047 19:05
19:06 mr_ron left, Tonik joined 19:07 alphah joined 19:08 RabidGravy joined 19:09 zakharyas left 19:10 mcmillhj left 19:11 mcmillhj joined
Geth doc: 7eda47ebdc | (Will "Coke" Coleda)++ | doc/Language/haskell-to-p6.pod6
remove trailing whitespace
19:12
doc: 5092740945 | (Will "Coke" Coleda)++ | 2 files
new words
19:14 pyrimidine left 19:15 pyrimidine joined
[Coke] issues installing p6doc via zef since we're using git ls-files to get files to test. (it installed OK, but I'm guessing the tests basically didn't run since it didn't find any files to test) 19:16
19:16 mcmillhj left 19:17 cognominal joined
[Coke] Not sure our sanity tests need to even be run by zef. 19:17
kalkin- How do i pipe some string to shell / run command?
IOninja I think I wrote a doc example for that somewhere... 19:18
IOninja checks
gfldex docs.perl6.org/type/Proc
kalkin- gfldex: That's the first think i checked
IOninja kalkin-: first section, last code example: docs.perl6.org/type/Proc 19:19
[Coke] kalkin-: here's an example:
IOninja give run :in, and then $p.in.say: "Hello,\nworld!";
kalkin- IOninja: ohh thanks i missed this one
[Coke] github.com/perl6/doc/blob/master/x...pell.t#L52
IOninja I guess there's either a .print or .write method as well if you don't want the newline at the end
SmokeMachine m: say ㈤ + ㈠ # 👈 sena_kun 19:20
camelia 6
19:20 pyrimidine left
IOninja sourcery! 19:20
kalkin- IOninja: afaik it's a IO::Handle which has all the nice functions
IOninja and IO::Pipe is IO::Handle
sena_kun u: ㈤
unicodable6 sena_kun, U+3224 PARENTHESIZED IDEOGRAPH FIVE [No] (㈤)
[Coke] just installed p6doc, tried "p6doc -f spurt" - got "Could not find Type::IO::Pathspurt Type::IO::Path at line 0 in:"
SmokeMachine sena_kun: I don't know why the PARENTHESIZED works but the not PARENTHESIZED doesn't... 19:21
IOninja aha, .print if you don't wnat the newline and .write takes a Blob to write
sena_kun m: say ㈠;
camelia 1
gfldex [Coke]: p6doc doesn't work, what is a know defect
IOninja u: IDEOGRAPH FIVE
unicodable6 IOninja, U+3224 PARENTHESIZED IDEOGRAPH FIVE [No] (㈤)
IOninja, U+3284 CIRCLED IDEOGRAPH FIVE [No] (㊄)
IOninja, gist.github.com/8d1d167f2ea8b1ed1d...2bed60d00d
sena_kun u: IDEOGRAPH TEN 19:22
unicodable6 sena_kun, U+3229 PARENTHESIZED IDEOGRAPH TEN [No] (㈩)
sena_kun, U+3245 CIRCLED IDEOGRAPH KINDERGARTEN [So] (㉅)
sena_kun, gist.github.com/c759d58afd9c82e1c9...347651df9f
SmokeMachine u: 五
unicodable6 SmokeMachine, U+4E94 <CJK Ideograph> [Lo] (五)
19:22 cibs left
IOninja Parenthesized works 'cause it's a `No` 19:22
19:22 darutoko left
sena_kun m: say ㈩㈠; 19:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3say ㈩7⏏5㈠;
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
s…
IOninja And I guess the one that doesn't isn't
You can't use `No` chars as digits, only as separate numbers
m: say ༳ 19:23
camelia -0.5
IOninja :) my favourite char
19:23 cibs joined
sena_kun SmokeMachine, well, you still can't write 五千一. 19:23
SmokeMachine u: ༳
unicodable6 SmokeMachine, U+0F33 TIBETAN DIGIT HALF ZERO [No] (༳)
SmokeMachine sena_kun: yes, you can't... 19:24
19:24 tojo left
SmokeMachine unless you use your slang! :) 19:24
IOninja m: sub term:<五千一> { 5001 }; say 五千一
camelia 5001
19:24 pyrimidine joined
IOninja m: say unival 五 19:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
五 used at line 1
IOninja m: say unival "五"
camelia 5
IOninja m: say unival "千"
camelia 1000
IOninja m: say unival "一"
camelia 1
IOninja What number is it? 5001?
[Coke] gfldex: is there a perl6/doc issue #? 19:26
sena_kun SmokeMachine, sure. :) Though I still didn't understand how should I add it to a braid. I tried $*LANG.define_slang("MAIN", Kazu::Grammar, Kazu::Actions), but no success.
IOninja, it is 5001.
[Coke] gfldex: also, any feedback on github.com/perl6/doc/pull/1207 ?
gfldex [Coke]: i think so
IOninja m: sub term:<五> {5}; sub infix:<千> {$^a*1000+$^b}; sub term:<一> {1}; say 五千一; say 一千五 19:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routines:
一千五 used at line 1
五千一 used at line 1
IOninja dammit
m: sub term:<五> {5}; sub infix:<千> {$^a*1000+$^b}; sub term:<一> {1}; say 五 千 一; say 一 千 五 19:28
camelia 5001
1005
IOninja \o/
gfldex [Coke]: i'm ok with the changed example test. If I got the time I may improve it a little to make it easier to use threads when that works relyable.
19:29 mcmillhj joined
IOninja sena_kun: maybe you need to do something like this? github.com/FROGGS/p6-Slang-Tuxic/pull/3/files 19:29
gfldex [Coke]: using the same precomp cache then the docs is a nice idea
sena_kun IOninja, wow, seems cool. Thanks, I'll try it!
IOninja $grammar isn't Kazu::Grammar but nqp::atkey(%*LANG, 'MAIN').^mixin(Kazu::Grammar) 19:30
19:30 cibs left
IOninja sena_kun: and .define_slang stuff is available only on HEAD rakudo 19:30
was merged right after last release 19:31
19:31 cibs joined 19:32 dotness joined
sena_kun IOninja, well, my modules are always targeted on bleeding edge. :) Though you're right, it can be quite a bad practice, so I will not commit it right now. Also, what is the state of current versioning? I need to explisity mark things as "version 1.1" and commit with META6.json version increment wouldn't help me. 19:33
Geth doc/master: 8 commits pushed by (Will "Coke" Coleda)++, Altai-man++, (Will Coleda)++
sena_kun [Coke]++
*explicity
IOninja Whatsioning of what? modules?
sena_kun yep
IOninja Just bump the version in META file
19:34 mcmillhj left
IOninja META6.json 19:34
sena_kun IOninja, does zef understand that commits before were for old version and it will pull correct commit?
19:34 rindolf left
IOninja doesn't follow the question. 19:35
tony-o_ sena_kun: it depends on how you're versioning your repo
soon, it will take the latest commit prior to the version being bumped.
IOninja oh, now I get it 19:36
19:36 mcmillhj joined
IOninja How does it know which commit got version bumped? 19:36
sena_kun tony-o_, for example, I've had 1.0. Then I do the commit with a version bump. And the next commit won't be pulled if user types something like zef install cool-1.0, right?
tony-o_ ideally, you'd bump the version every time you push but that may or may not be realistic. another option would be 'release'ing your repo
sena_kun I double this question.
tony-o_ IOninja: that information is in the repo unless you erase the commit history 19:37
i have modules.zef.pm providing that info to zef cli right now, ugexe and i are both working on integration
IOninja cool
I don't get how that info is in the repo. You fetch each commit and check if the meta version changed?
tony-o_ sena_kun: right now i believe that it pulls the last commit for that version 19:38
19:38 cdg left
tony-o_ so if you have 6 commits all with META v0.6 then you commit v0.7, it'll pull all 6 commits in v0.6 19:38
sena_kun tony-o_, awesome.
tony-o_ IOninja: a moment, i'll give you a one liner to figure that out
sena_kun: that is the way it was working, ugexe may have run into something and reverted that - i haven't been in that code for quite a while now 19:39
19:39 espadrine joined, jjido_ joined, astj joined
tony-o_ IOninja: git log -Gversion -p 'META.info' | egrep '^(commit|Date|\+\s+"version)' 19:40
change META.info to whatever your meta file is 19:41
output => gist.github.com/tony-o/dc0e6ecff75...74c8416d64 19:42
19:42 mcmillhj left
IOninja haha, clever :) 19:42
tony-o_++
sena_kun how can I specify some version to be installed? zef install Slang::Kazu-1.0 says that No candidates found. :/
19:43 andrzejk_ joined, astj left 19:44 mcmillhj joined
tony-o_ zef install 'Slang::Kazu:ver<1.0>' 19:45
sena_kun hmmm...
19:45 dotness left
tony-o_ where is slang::kazu ? 19:46
lol Slang::SQL is over 2 years old now, time flies
19:46 mr_ron joined
tony-o_ FROGGS wins with the oldest Slang tho 19:46
sena_kun tony-o_, what did you mean by "where"? github.com/Altai-man/Slang-Kazu and in the ecosystem too. 19:47
19:47 rindolf joined 19:49 amalia__ left 19:51 mcmillhj left
tony-o_ currently it doesn't look at git logs to determine version commits, that's in progress. ugexe might chime in with better info about how it looks for previous versions, iirc it's a release or current version only. 19:51
or, the ecosystem file has specific versions listed in it along with the commit to use
sena_kun ah, okay then. even so it looks quite cool. 19:52
tony-o_ you can use v1.1 19:54
19:56 jjido_ left 19:57 mcmillhj joined, jjido_ joined 20:02 jjido_ left 20:06 mcmillhj left, mcmillhj joined 20:07 tony-o_ is now known as tony-o 20:10 pyrimidine left 20:11 pyrimidine joined 20:15 pyrimidine left
tony-o actually, now i'm curious why you want 1.0 over 1.1 sena_kun ? 20:18
20:25 nicq201 joined
Geth doc: 8f1d849c82 | (Wenzel P. P. Peppmeyer)++ | 2 files
remove dep on IO::String
20:25
20:27 jjido joined 20:31 nicq201 left
sena_kun tony-o, dunno, just to test. But I don't think it is unbeilievable case when user wants some particular version that is not last. 20:32
tony-o, it is my module if it's not clear, though I doubt it was the reason of your curiosity. :) 20:33
20:39 jjido left 20:47 bjz joined, pyrimidine joined
[Coke] gfldex++ 20:49
20:55 itcharlie1 left
ugexe zef install github.com/Altai-man/Slang-Kazu/ar...c97.tar.gz 20:56
20:57 pmurias left, pyrimidine left 20:58 pyrimidine joined 20:59 ufobat_ left
ugexe or if you ever installed it previously, it would be cached in ~./zef/store/Slang-Kazu.git and could just be installed with `zef install Slang::Kazu:ver<1.0>` 21:01
TimToady 'course, any slang that ain't Tuxic is probably gonna need to be updated to be braid compatible as Tuxic was 21:02
21:03 Tonik left
Geth doc: a713d52c01 | (Brad Gilbert)++ | doc/Type/IO.pod6
remove "if possible" from run

The way it was worded could lead people to think that there was a circumstance where it would use the shell. resolves #1208
21:04
21:07 jjido joined 21:09 jjido left 21:10 Tonik joined 21:20 andrzejk_ left 21:22 cdg joined 21:25 cdg left, cdg joined 21:26 TEttinger joined 21:30 jjido joined 21:34 jjido left 21:35 bjz left 21:38 RabidGravy left, sena_kun left 21:39 astj joined 21:43 jjido joined 21:44 astj left 21:47 jjido left
tony-o sql slang was written using tuxic as the model, if that doesn't work out then it'd be a good time to go back and update it so it can interpolate 21:47
alphah Noop Q: suppose I have a script that takes "add" or "del" as command line arguments, what is best practice to limit accepted args to the script? I'm thinking to create "enum" or a subset" type and pass it to MAIN sub. What would be the best practice for that? 21:50
21:50 RabidGravy joined
[Coke] could also: multi sub MAIN('add', ...) ; multi sub MAIN('del', ....) 21:52
enum support was recently added, but I don't think it's wired into the usage statements yet 21:53
21:56 jjido joined
b2gills m: multi sub MAIN('add', *@args){}; multi sub MAIN('del',*@args){} 21:58
camelia Usage:
<tmp> add [<args> ...]
<tmp> del [<args> ...]
alphah I'd like to avoid multi sub MAIN, instead I need MAIN to look like sub MAIN(Operation $operation), then can call $operation on object weather it is add or del 21:59
22:00 lukiramu left
tony-o m: multi sub MAIN('add', Str :$named-arg) {...} # this also works for named args alphah 22:01
22:01 lukiramu joined 22:02 MasterDuke left
alphah I have about 7 operations, any one of them can be first arg to the script, if I use multi sub MIAN, then I will have to create 7 multi MAIN 22:04
22:04 camelia left
alphah so the script can be called as "./script add <line> <file>" or "./script del <line> <file>" or "./script insert <line> <file>" or ... 22:06
b2gills If they are almost identical, you could have 7 MAIN subs that all just call a common sub. or you could handle everything yourself including a usage message
22:08 camelia joined 22:09 skids left, MasterDuke joined, ChanServ sets mode: +v camelia
b2gills m: enum Command <add del insert>; sub MAIN ( Command $command, $line, $file ) {...} 22:10
camelia Usage:
<tmp> <command> <line> <file>
b2gills m: @*ARGS = <add line file>; enum Command <add del insert>; sub MAIN ( Command $command, $line, $file ) { say $command } 22:11
camelia add
22:12 jjido left, RabidGravy left
b2gills an enum could be used with a USAGE sub 22:13
alphah Thanks b2gills, That did it. enum worked. Another question what is best practice , to use enum in this case or to define a subset type that has only 7 commands "add", "del",... 22:15
22:15 gdonald joined
b2gills An enum would probably be better, and possibly faster in the rest of the code you write 22:16
alphah Thanks! 22:17
b2gills by the way `sub MAIN ('add' ...)` is short for `sub MAIN ( Str $name where 'add' )` that is a subset 22:19
alphah Got that (y) 22:26
22:36 Voldenet left 22:38 astj joined, mcsnolte joined 22:41 kyan joined 22:42 Voldenet joined, Voldenet left, Voldenet joined 22:43 astj left, mcmillhj left 22:45 Tonik left 22:48 kurahaupo_ joined 22:51 kurahaupo left 22:57 devmikey joined 23:00 kurahaupo joined 23:03 kurahaupo_ left 23:10 kurahaupo left 23:21 cdg_ joined 23:23 cdg left 23:26 pyrimidine left, pyrimidine joined 23:27 gdonald left 23:28 gdonald joined 23:29 cpage_ left
IOninja enjoys a freedom you can't have in US. 23:30
Kinder Surprise egg! :)
23:31 pyrimidine left
IOninja dammit... this toy sucks 23:32
tony-o we don't have those? 23:33
IOninja They're illegal.
Can't sell food with stuff inside of it.
tony-o like razor blades and things? 23:34
IOninja :)
tony-o hah, that's a pretty legit law - thanks gubment
23:35 espadrine left 23:36 lep-delete left 23:39 telex left 23:41 lep-delete joined 23:42 cdg_ left, cdg joined
ugexe thanks trump 23:50
23:51 kyan left 23:55 telex joined, cpage_ joined 23:59 BenGoldberg joined