»ö« 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.
Zoffix m: use nqp; my int $x = 4; say nqp::isint(nqp::unbox_i($x)) 00:00
camelia rakudo-moar 6977b8: OUTPUT«0␤»
00:03 pmurias left, ShimmerFairy joined 00:06 HoloIRCUser1 joined, HoloIRCUser2 joined 00:10 HoloIRCUser3 joined, HoloIRCUser2 left, HoloIRCUser1 left 00:11 HoloIRCUser1 joined, wamba left, awwaiid left 00:13 awwaiid joined 00:14 lucasb left 00:15 HoloIRCUser3 left, Zoffix left 00:18 Zoffix joined 00:20 wongjtf99 left, djbkd_ joined 00:30 awwaiid left 00:31 awwaiid joined 00:43 Herby_ joined
Herby_ o/ 00:43
00:45 pierre_ joined
timotimo o/ 00:49
Zoffix |
/\
00:54 awwaiid left 00:55 awwaiid joined 01:03 Actualeyes joined 01:08 TEttinger joined 01:11 HoloIRCUser2 joined 01:12 HoloIRCUser1 left 01:13 awwaiid left 01:14 awwaiid joined 01:15 HoloIRCUser1 joined 01:17 FROGGS left, HoloIRCUser2 left 01:29 FROGGS joined 01:34 HoloIRCUser3 joined, HoloIRCUser4 joined 01:35 HoloIRCUser1 left, Zoffix left 01:37 awwaiid left, awwaiid joined 01:38 HoloIRCUser3 left 01:42 HoloIRCUser1 joined 01:43 HoloIRCUser4 left 01:44 HoloIRCUser2 joined 01:45 ilbot3 left 01:46 HoloIRCUser1 left 01:47 ilbot3 joined 02:00 awwaiid left 02:01 awwaiid joined 02:06 labster left 02:11 HoloIRCUser2 left 02:22 labster joined, labster left, labster joined 02:23 awwaiid left 02:24 awwaiid joined, djbkd_ left 02:25 ShimmerFairy left 02:27 rgrinberg joined 02:29 pierre_ left 02:43 pierre_ joined, rgrinberg left 02:44 eliasr left 02:45 djbkd joined 02:52 awwaiid left, noganex joined, awwaiid joined 02:55 noganex_ left 03:16 skids joined 03:17 awwaiid left 03:18 awwaiid joined 03:23 rgrinberg joined
dalek c: 4d1e453 | coke++ | doc/Language/phasers.pod6:
remove trailing whitespace
03:26
03:29 yqt left 03:40 khw left 03:42 awwaiid left 03:43 awwaiid joined 03:48 bjz left 03:49 HoloIRCUser1 joined, HoloIRCUser2 joined 03:52 _slade_ left, _slade_ joined 03:54 HoloIRCUser1 left 03:55 Actualeyes left
dalek c: cd52c6b | (Zoffix Znet)++ | doc/Programs/00-running.pod6:
Document RAKUDO_OPTIMIZER_DEBUG env var
04:01
Herby_ question 04:02
I have a hash %employee<name=>'hank', age=>40, sex=>'male'> 04:04
i want to create a new hash %promote, and add %employee<name> as the key, and all of %employee as the value 04:05
if that makes sense
04:06 awwaiid left
Herby_ how do I do that? haven't had much luck 04:07
04:07 awwaiid joined
MasterDuke m: my %employee = name => 'hank', age => 40, sex => 'male'; my %promote; %promote{%employee<name>} = %employee; dd %promote 04:11
camelia rakudo-moar 6977b8: OUTPUT«Hash %promote = {:hank(${:age(40), :name("hank"), :sex("male")})}␤»
p3rln00b m: my %employee = name=>'hank', age=>40, sex=>'male'; my %promote = %employee<name> => %employee; dd %promote
camelia rakudo-moar 6977b8: OUTPUT«Hash %promote = {:hank(${:age(40), :name("hank"), :sex("male")})}␤»
p3rln00b is too slow 04:12
MasterDuke Herby_: ^^^ are those two examples what you mean?
p3rln00b Sounds like you should be using classes rather than messing about with hashes :)
Herby_ thanks MasterDuke, p3rln00b 04:13
i should probably try to learn classes.
MasterDuke: just tried it out, that works! thanks 04:18
m: my %employee = name => 'hank', age => 40, sex => 'male'; my %promote; %promote{%employee<name>} = %employee; 04:20
camelia ( no output )
Herby_ m: my %employee = name => 'hank', age => 40, sex => 'male'; my %promote; %promote{%employee<name>} = %employee; dd %promote
camelia rakudo-moar 6977b8: OUTPUT«Hash %promote = {:hank(${:age(40), :name("hank"), :sex("male")})}␤»
Herby_ m: my %employee = name => 'hank', age => 40, sex => 'male'; my %promote; %promote<%employee<name>> = %employee; dd %promote
camelia rakudo-moar 6977b8: OUTPUT«Hash %promote = {"\%employee<name>" => ${:age(40), :name("hank"), :sex("male")}}␤»
Herby_ it doesnt like the <> versus the {}?
MasterDuke <> is for literals 04:21
04:21 jcallen left
Herby_ ahh 04:21
learn something new every day
MasterDuke it's like %hash{'$thing'}
04:21 jcallen joined
p3rln00b it's like %hash{<...>}; that is %hash<foo bar> is like %hash{<foo bar>} is like my @keys = <foo bar>; %hash{@keys}; that is, <...> syntax is a white-space-separated list and you can get a slice rather than a single value with it. 04:23
04:23 cdg joined
p3rln00b m: my %employee = name=>'hank', age=>40, sex=>'male'; dd %employee<name age sex> 04:23
camelia rakudo-moar 6977b8: OUTPUT«("hank", 40, "male")␤»
p3rln00b m: my %employee = name=>'p3rln00b', age=>17, sex=>'yes, please'; dd %employee<name age sex> 04:24
camelia rakudo-moar 6977b8: OUTPUT«("p3rln00b", 17, "yes, please")␤»
p3rln00b snickers
04:25 Derperperd joined
Derperperd hello people! 04:25
p3rln00b \o
Herby_ o/
Derperperd I’m thinking about trying out perl 6. i’ve dabbled in perl for a little and like it. is perl 6 production ready? 04:27
p3rln00b Derperperd: "production ready" means different things to different people :)
Derperperd p3rln00b: thats true. I’m basically asking if it’s reliable, fast, and stable 04:28
or if there any major changes coming to perl 6 that will overhaul major components of the language 04:29
seatek Herby_, here is how you might use a class instead
class Employee{ has $.name; has $.age; has $.sex; method promote() { say "Yay!" }} ; my $employee = Employee.new(name => 'Hank', age => 40, sex => 'male'); $employee.promote;
04:30 awwaiid left
p3rln00b Derperperd: the spec has been deemed production ready and released Dec, 2015. The compiler, on the other hand, still has bugs (as our 1400-bug bug queue testifies). It's also not as fast as other similar products. The main concern would be memory leaks, so I'd avoid using it for any long running programs. So Web-app area is definitely out IMO. Bug as far as writing programs and having them still work 2-3 years 04:30
in the future, that should be guaranteed.
04:30 awwaiid joined
p3rln00b s/Bug as far/But as far/ :) 04:31
Derperperd awesome that’s really what im looking for. the ability to write scripts in perl 6 and have them work after a couple of years of updates
seatek Derperperd, I've been putting it into some production stuff and haven't run into any issues yet -- but nothing long-running like P3rln00b mentioned 04:32
Derperperd good to hear seatek thanks
can someone tell me what rakudo star is
seatek I've been having a lot of fun learning by converting old production stuff into Perl6
Herby_ seatek, thanks for the example!
p3rln00b Derperperd: a compiler with some (rather useless) modules and documentation.
Derperperd should i be using it? 04:33
p3rln00b Derperperd: sure. That's generally what people use to "get perl 6" as it comes with pre-built binaries for Windows/Mac. It also undergoes testing with modules to ensure they work.
seatek I've been using it
p3rln00b Derperperd: you can also build more recent compiler releases: rakudo.org/downloads/rakudo/ 04:34
They get released monthly.
"rakudo" is the perl 6 compiler. 04:35
Derperperd ahh ok. just installed it! time to start playing with perl 6
seatek Herby_, sure thing :) hope it helps you see what sticking that into an Employee object might be better, because then you can write all kinds of methods, other than promote() ;)
p3rln00b \o/ 04:36
[Coke] Trying to feed an :in into a run() - any examples?
04:37 rgrinberg left
Derperperd do you guys recommend using a .pl extension or .p6 extension 04:38
is there a standard the community uses
p3rln00b Derperperd: I use .p6 to avoid confusion with Perl 5 scripts.
seatek [Coke] you mean like: say '/tmp'; run('ls'):in
Herby_ any issue using .pm6? cause thats what I've been using... 04:39
Derperperd thats probably what im going to do p3rln00b
p3rln00b Herby_: for scripts? A bit confusing, since I'd expect that to be a Perl 6 *module*.
[Coke] seatek: no, like stdin, not like parameters.
04:39 dayangkun joined
MasterDuke [Coke]: my $p = run(:out, :bin, 'ls'); run(:in($p.out), 'true') 04:39
Herby_ hmm ok, good point
[Coke] (I'd write yours as run(<ls /tmp>) 04:40
MasterDuke: thanks. Looking for something that isn't the direct result of a run() to pass as input.
p3rln00b [Coke]: I'd think this would work, but it doesn't produce any output: my $p = run "echo", :in, :out; $p.in.put: "meow"; $p.in.close; say $p.out.slurp-rest; 04:42
04:44 SourceBaby joined, flexibeast joined, Undercover joined
p3rln00b Oh, echo is a shell thing :P 04:47
04:47 Cabanossi left
[Coke] I can make the array of data I have the result of a run, will try that route. 04:50
04:51 Cabanossi joined
seatek [Coke], some reason you can't just read from $*IN -- or are you looking for some kind of way to make perl look like an "invisbile pipe" between 2 things coming from the system? 04:53
04:54 awwaiid left, awwaiid joined
[Coke] I'm not trying to -read- from in, I'm trying to generate an :in for the next thing in the pipe. Right, the latter. 04:55
I rewrote my perl6 that fixed up the data to be used as the input as an awk script so I can run() it. I feel dirty. :)
seatek yeah that's the duct tape ;) 04:57
MasterDuke my $p = run "cat", :in, :out; $p.in.say("h"); $p.in.close; say $p.out.slurp-rest
[Coke] is there a way to dump a value from a Seq? 04:59
( I want to ignore the first line of an :out ) 05:00
oh, maybe don't call .lines first.
05:02 cdg left
p3rln00b Oh, so my method actually works \o/ 05:02
Dunno why it wasn't working when I tried to use perl6 -e 'say $*IN.get' instead of cat there 05:03
oh, 'cause I typed it all as one command and not proper way :P
05:03 dayangkun left 05:04 pierre_ left
AlexDaniel [Coke]: were you looking for an example like this one: docs.perl6.org/type/Proc ? 05:04
I mean, second example on that page 05:05
dalek c: 4c836a4 | (Zoffix Znet)++ | doc/Type/Proc.pod6:
Add example of feeding Proc's STDIN from a string
05:06
05:06 firstdayonthejob joined 05:07 flaviusb joined
dalek c: a47828f | (Zoffix Znet)++ | doc/Type/Proc.pod6:
Pod6 ne Markdown
05:07
AlexDaniel hopes nobody is going to use 「run ‘ls’, :out」 in a real program 05:09
Herby_ i'm stumped 05:10
brace your eyes for my ugly test code, but if someone could take a look: pastebin.com/fviAJ3yq
that returns: {James => {DATE_TIME => 2016-10-01T02:00:00, NAME => Hank, TRANSFER_FORM => PCU, TRANSFER_TO => 2W}}
and I dont know why
05:10 cibs joined
Herby_ it should return: {James => {DATE_TIME => 2016-08-20T03:00:00, NAME => James, TRANSFER_FORM => 2E, TRANSFER_TO => ICU}} 05:11
probably missing something obvious but i'm not seeing it 05:13
05:15 HoloIRCUser2 left 05:16 bjz joined
p3rln00b Herby_: gist.github.com/zoffixznet/fb533e0...643d509aa7 05:17
05:17 awwaiid left
p3rln00b Herby_: you're assigning data, but then overwriting its value on the next loop iteration 05:17
You need a new %data per loop iteration
Herby_ hmm. how do it get overwritten if the criteria isnt met? 05:18
how does it
transfer_to eq 'icu'
AlexDaniel here I guess: %data = %($parser.get_line());
but I still don't understand it really
Herby_ sorry, i meant how does that %data line make it into %icu_transfers if it doesnt meet the criteria
p3rln00b m: my %data = <moo meow>; my %foo = foo => %data; dd %foo; %data = <lulz fail>; dd %foo 05:19
camelia rakudo-moar 6977b8: OUTPUT«Hash %foo = {:foo(${:moo("meow")})}␤Hash %foo = {:foo(${:lulz("fail")})}␤»
05:19 awwaiid joined
p3rln00b Herby_: it doesn't. You're assigning the %data object into icu, but on *each* iteration of the loop you're modifying the contents of %data 05:19
Herby_ ahh
ahhhhh
ok
that makes perfect sense 05:20
AlexDaniel another way of fixing that is to use := I guess?
%data := %($parser.get_line());
… which is actually a bit stupid… 05:21
but it works
Herby_ just tried it, and it doesn
does
thanks.
AlexDaniel and here's a solution that is even more stupid
%icu_transfers{%data<NAME>} = %@%data 05:22
which basically gives you a copy
05:23 kaare_ joined
AlexDaniel anyway, using my %data is of course the right solution 05:23
Herby_ %@% is new to me 05:24
p3rln00b it's %@ tacked onto %data; %@ is just two coercers % and @ that coerce to list (@) and then back to hash again (%) 05:25
AlexDaniel m: my %h = a => 42, b => 29; say (%h).perl; say (@%h).perl; say (%@%h).perl; say (@%@%h).perl
camelia rakudo-moar 6977b8: OUTPUT«{:a(42), :b(29)}␤(:a(42), :b(29))␤{:a(42), :b(29)}␤(:a(42), :b(29))␤»
p3rln00b m: my %data = <foo bar>; my %other-data = %%data; %data = <meow mer>; dd %other-data
camelia rakudo-moar 6977b8: OUTPUT«Hash %other-data = {:foo("bar")}␤»
p3rln00b
.oO( doesn't seem to be a need for intermediary @)
05:26
m: my %data = <foo bar>; my %other-data = foo => %%data; %data = <meow mer>; dd %other-data
camelia rakudo-moar 6977b8: OUTPUT«Hash %other-data = {:foo(${:meow("mer")})}␤»
p3rln00b There is. Just was bad test :)
m: my %data = <foo bar>; my %other-data = foo => %data.clone; %data = <meow mer>; dd %other-data 05:27
camelia rakudo-moar 6977b8: OUTPUT«Hash %other-data = {:foo(${:foo("bar")})}␤»
AlexDaniel oh, there's .clone??
seatek can you include more than 1 directory at a time with "use lib" in p6?
p3rln00b seatek: yes, it just takes a list
seatek: use lib 'foo', 'bar'; or use lib <foo bar>; etc
seatek p3rln00b oo that's much nicer :) 05:28
p3rln00b++ :)
p3rln00b \o/
seatek i was off in qw/ / land ;)
p3rln00b <...> is the Perl 6's qw/ / 05:29
AlexDaniel m: class Point { has $.x; has $.y }; my $x = Point(:10x :20y); say $x.clone
camelia rakudo-moar 6977b8: OUTPUT«Cannot coerce to Point with named arguments␤ in block <unit> at <tmp> line 1␤␤»
p3rln00b AlexDaniel: there is, but it doesn't work on everything
(yet)
m: my @a = ^10; dd @a.clone
camelia rakudo-moar 6977b8: OUTPUT«Array @a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
AlexDaniel m: class Point { has $.x; has $.y }; my $x = Point.new(:10x :20y); say $x.clone
camelia rakudo-moar 6977b8: OUTPUT«Point.new(x => 10, y => 20)␤»
p3rln00b m: my @a = ^10; my @b = @a.clone; @a = 'a' ..'c'; dd @b
camelia rakudo-moar 6977b8: OUTPUT«Array @b = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
AlexDaniel works on custom classes :o
p3rln00b oh
Well, pretty sure it's still broken on arrays. 05:30
Yeah, it's provided by Mu
s: Mu, 'clone'
SourceBaby p3rln00b, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Mu, Str); 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␤␤
p3rln00b s: Any, 'clone'
SourceBaby p3rln00b, Sauce is at github.com/rakudo/rakudo/blob/6977...Mu.pm#L611
05:31 cyphase left
p3rln00b Ah, right, it clones arrays but not iterators, so array cloning still needs fixing 05:31
m: my @a = [2, 4, 6]; my $b = @a.clone; @a.push: 8; dd $b 05:32
camelia rakudo-moar 6977b8: OUTPUT«Array $b = $[2, 4, 6, 8]␤»
Herby_ off to bed, thanks for the help 05:34
05:34 rgrinberg joined
p3rln00b Any time. 05:34
AlexDaniel m: my @a = [2, 4, 6]; say @a.WHAT; say @a.list.WHAT; say @a.list.^name 05:36
camelia rakudo-moar 6977b8: OUTPUT«(Array)␤(Array)␤Array␤»
05:36 cyphase joined
AlexDaniel so the only way to clone an array right now is to use @a[*] ? 05:38
moritz or [@a] 05:39
05:39 firstdayonthejob left, Herby_ left
moritz or my @ = @a 05:39
AlexDaniel right
05:42 awwaiid left 05:43 awwaiid joined 05:44 rgrinberg left, cyphase left 05:45 Celelibi joined 05:46 cyphase joined
seatek If people want database tests, it should be up to them to make sure the tests are run against their test databases. Am I right?? ;) 05:47
05:47 AlexDaniel left
seatek I take the silence to mean perfect agreement by all. :) 05:48
dalek c/spellcheck: 07a6217 | coke++ | doc/ (5 files):
fix typos
05:50
c/spellcheck: 3a1149b | coke++ | xt/ (2 files):
Add first pass at automated spellchecker.
c: 07a6217 | coke++ | doc/ (5 files):
fix typos
05:51
seatek file has $so-many spelling errors -- nice :) 05:52
[Coke] Surprisingly, some things actually pass. 05:53
05:54 wamba joined
seatek All I've been doing the last 3 days is writing tests. I'm wondering if this will make for a jaded view of P6 05:55
05:56 firstdayonthejob joined
dalek c/spellcheck: ed497a2 | coke++ | xt/aspell.t:
remove trailing whitespace
05:57
c/spellcheck: de6ab14 | coke++ | xt/aspell.t:
fail nicely without aspell
06:01
c/spellcheck: f70c826 | coke++ | xt/aspell.t:
remove now-unused debug var
06:06 labster left 06:07 dayangkun joined
dalek c/spellcheck: 7563e0c | coke++ | xt/aspell.t:
DRY, simplify
06:07
06:10 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'Add first pass at automated spellchecker.' 06:10
travis-ci.org/perl6/doc/builds/166156552 github.com/perl6/doc/compare/07a62...1149bd58fb
06:10 travis-ci left
[Coke] nite, #perl6 06:11
06:14 awwaiid left 06:15 awwaiid joined 06:16 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'remove trailing whitespace' 06:16
travis-ci.org/perl6/doc/builds/166157056 github.com/perl6/doc/compare/3a114...497a2a3506
06:16 travis-ci left 06:20 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'remove now-unused debug var' 06:20
travis-ci.org/perl6/doc/builds/166157484 github.com/perl6/doc/compare/ed497...0c8260b378
06:20 travis-ci left
titsuki Hi #perl6. I have a question. 06:26
What's the difference between .trans with :d and .trans without :d ? 06:27
m: my $str = "abcdabcd"; $str.trans(:d, "ab" => "").say; $str.say;
camelia rakudo-moar 6977b8: OUTPUT«cdcd␤abcdabcd␤»
titsuki m: my $str = "abcdabcd"; $str.trans("ab" => "").say; $str.say;
camelia rakudo-moar 6977b8: OUTPUT«cdcd␤abcdabcd␤»
titsuki It seems equivalent to me.
06:29 BenGoldberg left 06:31 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'DRY, simplify' 06:31
travis-ci.org/perl6/doc/builds/166157886 github.com/perl6/doc/compare/f70c8...63e0c8c488
06:31 travis-ci left 06:38 st_iron joined
st_iron good morning friends 06:38
skids m: m: my $str = "abcdabcd"; $str.trans(:d, "ab" => "A").say; $str.say; 06:43
camelia rakudo-moar 6977b8: OUTPUT«AcdAcd␤abcdabcd␤»
skids m: m: my $str = "abcdabcd"; $str.trans("ab" => "A").say; $str.say;
camelia rakudo-moar 6977b8: OUTPUT«AAcdAAcd␤abcdabcd␤»
skids titsuki: ^^
titsuki m: my $str = "abcdabcd"; $str.trans(:d, "ab" => "AA").say; $str.say; 06:45
camelia rakudo-moar 6977b8: OUTPUT«AAcdAAcd␤abcdabcd␤»
06:46 awwaiid left
titsuki skids: Thanks ! I understand the difference. 06:46
skids np
doc example could be improved, I guess. 06:47
06:48 awwaiid joined 06:55 seatek left, grondilu joined
grondilu Hello #perl6. I have a silly question. 06:56
skids hrm. Something seems off here: 06:58
06:58 bjz left
skids m: my $str = "abcdabcd"; $str.trans("abc" => "AB").say; $str.say; 06:58
camelia rakudo-moar 6977b8: OUTPUT«ABAdABAd␤abcdabcd␤»
skids m: my $str = "abcdabcd"; $str.trans("abc" => ("A","B")).say; $str.say; 06:59
camelia rakudo-moar 6977b8: OUTPUT«ABBdABBd␤abcdabcd␤»
06:59 bjz joined
FROGGS o/ 06:59
grondilu is the semantics for those even defined?
skids Hrm I wonder if I should make this a new RT or just add this to RT#129172 07:02
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129172
07:05 rindolf joined 07:06 awwaiid left 07:07 awwaiid joined 07:08 ale4L3 joined 07:12 domidumont joined 07:13 ale4L3 left 07:16 domidumont left, domidumont joined
titsuki m: subset Even of Int where * % 2 == 0; my Even $a = 2; 07:18
camelia ( no output )
titsuki m: subset Even of Int where * % 2 == 0; my Even $a = 3;
camelia rakudo-moar 6977b8: OUTPUT«Type check failed in assignment to $a; expected Even but got Int (3)␤ in block <unit> at <tmp> line 1␤␤»
titsuki grondilu: Does it answer your question ? 07:19
p3rln00b
.oO( there wasn't a question? )
07:21
m: subset Even of Int where * %% 2; my Even $a = 2;
camelia ( no output )
07:22 ale4L3 joined 07:24 ale4L3 left 07:26 jast left, jast joined
grondilu there was no question after all. Changed my mind. Too embarassed to ask. 07:26
p3rln00b heh 07:27
titsuki I see. Please forget my answer... 07:34
07:38 awwaiid left 07:39 awwaiid joined 07:45 skids left 07:52 geekosaur left, geekosaur joined
raydiak \o 07:54
08:01 rindolf left 08:03 awwaiid left 08:04 awwaiid joined 08:05 darutoko joined 08:10 flexibeast left 08:14 eliasr joined 08:20 st_iron left 08:26 awwaiid left 08:28 awwaiid joined 08:45 domidumont left 08:46 Gr1m joined 08:49 Gr1m left 08:51 awwaiid left 08:53 awwaiid joined 09:05 awwaiid left 09:06 awwaiid joined 09:08 RabidGravy joined 09:11 no-n joined, xinming left
no-n sneaks into the channel without being noticed by ilbelkyr 09:11
09:12 jargan joined, xinming joined 09:13 jast left 09:14 awwaiid left 09:19 pierre__ joined 09:24 _slade_ left 09:28 no-n is now known as ponies 09:29 ponies is now known as no-n 09:30 labster joined 09:39 awwaiid joined 09:40 darutoko left 09:45 labster left 09:50 rudolfochrist joined, rudolfochrist left 09:51 rudolfochrist joined 09:52 labster joined 09:54 awwaiid left 09:55 awwaiid joined 10:02 TEttinger left 10:03 dayangkun left 10:09 Ven_ joined 10:12 dayangkun joined, labster left 10:13 pecastro joined 10:14 pierre__ left 10:17 pierre__ joined 10:23 rudolfochrist left 10:27 awwaiid left 10:29 awwaiid joined 10:35 rindolf joined 10:46 canopus left 10:50 wamba left 10:51 wamba joined, canopus joined 10:52 awwaiid left, bjz_ joined 10:53 awwaiid joined, bjz left 10:55 Ven_ left 10:59 pierre__ left 11:00 HoloIRCUser2 joined 11:06 kaare_ left 11:07 pecastro left, dayangkun left 11:14 CIAvash joined, CIAvash left 11:15 firstdayonthejob left, awwaiid left 11:20 awwaiid joined 11:29 CIAvash joined, CIAvash left 11:33 firstdayonthejob joined 11:39 awwaiid left 11:40 awwaiid joined 11:42 rindolf left 11:54 HoloIRCUser2 left 12:02 domidumont joined, pierre__ joined 12:04 HoloIRCUser1 joined, HoloIRCUser2 joined 12:05 awwaiid left 12:08 HoloIRCUser1 left 12:09 awwaiid joined, pecastro joined 12:13 awwaiid left 12:14 awwaiid joined 12:18 zakharyas joined 12:22 pecastro left 12:25 pecastro joined 12:29 awwaiid left 12:42 awwaiid joined 12:50 awwaiid left 12:52 awwaiid joined 12:56 lucasb joined 13:03 kaare_ joined 13:17 zakharyas left 13:19 awwaiid left, awwaiid joined 13:22 bjz_ left 13:25 bjz joined, Ven_ joined 13:35 cdg joined 13:43 awwaiid left, dgl joined 13:44 awwaiid joined 14:00 bjz left 14:01 awwaiid left 14:06 awwaiid joined, Ven__ joined, Ven_ left
moritz re-posts gist.github.com/moritz/29301316955...90e4ce9e7b in case folks have missed it yesterday night 14:10
Juerd Thanks for being crazy
14:13 khw joined 14:15 awwaiid left 14:16 AlexDaniel joined, khw left, awwaiid joined 14:19 rgrinberg joined
psch ++moritz 14:19
don't think i have the writing skills and dedication, and [ptc] is probably a better editor as well :) 14:20
14:20 Zoffix joined 14:21 awwaiid left, Ven__ left, khw joined
timotimo titsuki: did you know we have a %% operator that puts % and == 0 into one? :) 14:24
14:24 awwaiid joined, Ven_ joined
Zoffix moritz, I'd be interested in being a co-author. I self-published three (crappy) books: www.lulu.com/spotlight/zofdesign so at least I have the stamina for writing 'till my fingers bleed :) 14:25
titsuki timotimo: I learned it today :) 14:26
timotimo cool :)
oh!
perlnoob already showed that
14:27 pierre___ joined
Zoffix moritz, free epubs/pdfs if you wanna take a look: temp.perl6.party/books/ 14:29
Mind Power one is a bit nutty... I wrote it when I was 23... still young and dumb :P
moritz Zoffix: wow, I'd love to have you as a co-author, I really like your writing style 14:30
Zoffix \o/
14:31 pierre__ left
moritz Zoffix: do you have thoughts yet on the style and content/scope of the book? 14:36
Zoffix moritz, at the back of my mind for a bit now, I was thinking of 'Essentials of Perl 6' or something like that. Something that isn't 1000 pages long and doesn't list every feature, but rather would make beginners comfortable with the language enough to write simple programs and be comfortable to learn harder ones on their own from docs, for example. 14:43
timotimo maybe we also want a little booklet "learning to read perl6" 14:44
what with operators and metaoperators and everything making things a little complex sometimes
and different kinds of method calls and hyper method calls and all that 14:45
psch i think that's the most interesting bits
like, a detailed and explained "long form <=> short form"
list 14:46
timotimo and maybe also examples of things put together?
moritz Zoffix: sounds good 14:47
14:51 awwaiid left 14:53 awwaiid joined, rindolf joined 14:58 finanalyst joined 14:59 finanalyst left 15:00 Actualeyes joined 15:01 rindolf left
lucs Can a class supply a sub (as opposed to a method)? 15:02
m: class Meh { sub foo { say "FOO" } } ; Meh::foo;
camelia rakudo-moar 228cbc: OUTPUT«Could not find symbol '&foo'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
psch m: class Meh { our sub foo { say "FOO" } } ; Meh::foo;
camelia rakudo-moar 228cbc: OUTPUT«FOO␤»
moritz lucs: our sub foo
lucs Aha, thanks.
moritz though a class can also supply static methods 15:03
lucs moritz: How would that go?
moritz m: class Meh { method d'oh { say "FOO" } }; Meh.d'oh
camelia rakudo-moar 228cbc: OUTPUT«FOO␤»
psch any method that doesn't use Attributes or self can be invoked on the type object
moritz lucs: it's a normal method that doesn't use any attributes
moritz too slow today 15:04
psch you can be explicit about it with the :U smiley on the invocant
lucs Nice.
psch m: class C { method f(C:U:) { say "only type object!" } }; say C.f(); try C.new.f(); say $!
camelia rakudo-moar 228cbc: OUTPUT«only type object!␤True␤Invocant requires a type object of type C, but an object instance was passed. Did you forget a 'multi'?␤ in method f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
15:05 rindolf joined
Zoffix m: class Meh { sub foo is export { say "FOO" } } ; import Meh; foo # another way, depending on what the purpose is 15:05
camelia rakudo-moar 228cbc: OUTPUT«FOO␤»
Zoffix like exporting custom ops that work on your object 15:06
15:09 skids joined 15:10 seatek joined 15:13 HoloIRCUser3 joined, HoloIRCUser2 left, HoloIRCUser4 joined 15:14 rgrinberg left 15:17 HoloIRCUser3 left 15:18 pierre___ left 15:20 BenGoldberg joined 15:23 cowens joined 15:24 girafe joined
cowens Okay, I don't want to be an asshole about this, so you can tell me to shut up about it and I will. But I saw discussion on #perl6-dev (not sure how to or if I am even allowed to join that channel) about my issues with the Str type being stored as NFC and I wanted a chance to clarify some points 15:24
psch cowens: i'm pretty sure you're allowed to join 15:25
cowens: actually i think whatever you're about to say probably should go there in the first place :)
15:25 awwaiid left
cowens do I just do a slash join or something, I am not an IRC user 15:25
psch cowens: as for "how", your client probably supports '/join #perl6-dev'
cowens thanks 15:26
15:26 awwaiid joined 15:28 pmurias joined 15:34 cowens left 15:35 cowens joined, cowens left 15:36 awwaiid left 15:37 Ven_ left 15:38 awwaiid joined, Herby_ joined
Herby_ o/ 15:38
Zoffix \o
15:39 Ven_ joined 15:45 Actualeyes left, cdg left 15:48 rgrinberg joined 15:57 HoloIRCUser2 joined 15:58 HoloIRCUser3 joined, HoloIRCUser4 left 16:00 Actualeyes joined 16:01 awwaiid left 16:02 HoloIRCUser2 left 16:03 awwaiid joined
lucasb I should probably read that whole reddit thread and the irc logs to understand what is being discussed 16:09
I lived in a ASCII-only world until I became aware of the existence of Perl 6
16:11 awwaiid left 16:12 awwaiid joined 16:13 Zoffix left 16:16 HoloIRCUser1 joined 16:18 HoloIRCUser2 joined 16:19 HoloIRCUser3 left 16:20 HoloIRCUser1 left 16:25 robertle joined 16:28 awwaiid left 16:29 awwaiid joined 16:41 pmurias left, imcsk8 left 16:42 Ven_ left, HoloIRCUser joined, imcsk8 joined 16:43 pmurias_ joined 16:46 HoloIRCUser2 left 16:49 awwaiid left, HoloIRCUser left 16:51 awwaiid joined, Cabanossi left 16:53 Actualeyes left, flaviusb left 16:54 Cabanossi joined 16:59 andrzejku_ joined 17:01 flaviusb joined 17:08 firstdayonthejob left 17:11 firstdayonthejob joined 17:15 awwaiid left 17:17 awwaiid joined 17:18 Actualeyes joined 17:21 wamba left 17:24 rudolfochrist joined 17:25 wamba joined, Actualeyes left 17:30 sjoshi joined 17:37 Actualeyes joined 17:41 sjoshi left 17:42 firstdayonthejob left
dalek osystem: 8f9e980 | (Tom Browder)++ | META.list:
update version
17:42
17:44 grondilu left 17:45 awwaiid left 17:53 firstdayonthejob joined 18:00 awwaiid joined
[Coke] how to folks feel about forcing parentheses instead of parens in the docs? 18:13
Ah, it's only in 20 places. easy peasy
18:16 kst` is now known as kst, Ven_ joined
DrForr Woot, basic Template::Toolkit compiler is working. 18:17
dalek c: 15346a5 | coke++ | doc/ (11 files):
use full word.
18:21 Ven_ left, Ven_ joined 18:22 labster joined
dalek c: c83fe47 | coke++ | doc/Language/ (2 files):
standardize on regexes
18:25
whateverable: 788e58d | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6: 18:26
whateverable: Building stuff in parallel does not work at all
whateverable:
whateverable: We've been using non-parallel version of this script for a while now.
whateverable: Instead, we just run this script several times on different ranges.
18:26 dalek left, awwaiid left 18:27 dalek joined, ChanServ sets mode: +v dalek, awwaiid joined
AlexDaniel [Coke]: actually, can't see what was wrong with “parens”, but whatever :) 18:28
dalek c/spellcheck: fce8a7e | coke++ | xt/aspell.t:
Allow filenames passed in to test on CL
18:29
c/spellcheck: d48c817 | coke++ | doc/ (11 files):
use full word.
c/spellcheck: 73f12fc | coke++ | doc/Language/ (2 files):
standardize on regexes
c/spellcheck: acd6e70 | coke++ | xt/.aspell.pws:
ignore more words
lucasb AlexDaniel: "parens" if for "parentheses" what "sup" is for "what's up" :) 18:32
*is
moritz sup, any parens around? :-) 18:33
18:33 rindolf left
AlexDaniel lucasb: except that when you type “parens” in google it defines “paren” as “a round bracket” without any issues. I do understand that it is rather new, but looks like dictionaries are catching up 18:34
I don't see this happening with “sup” 18:35
18:35 Ven_ left 18:36 Ven_ joined, rindolf joined
geekosaur "parens" has been a standard abbreviation in programming since at least when I first got started programming (call it 1985) 18:36
lucasb AlexDaniel: indeed, you're right. I didn't know it was an accepted spelling of the word. but at least wiktionary add a note "(informal)" besides the word "paren" 18:37
18:40 rgrinberg left
AlexDaniel and actually, I'd much rather change “parentheses” to “parens” everywhere, but it's probably not worth the bikeshedding 18:41
18:51 awwaiid left 18:52 awwaiid joined 18:53 Ven_ left 18:57 labster left 18:58 Ven_ joined 19:00 rgrinberg joined
DrForr msg RabidGravy Basic stash access works, going to add refinements in two axes over the evening, maybe 3. 19:00
yoleaux: tell RabidGravy Basic stash access works, going to add refinements in two axes over the evening, maybe 3. 19:01
RabidGravy cool 19:02
DrForr Oh, hi..
geekosaur 0 for 2 so for the best (two missing command chars :)
RabidGravy I'm just doing actual real TT stuff for a technical test for a contract
DrForr AH. 19:03
*Ah
19:05 labster joined 19:10 awwaiid left 19:11 awwaiid joined 19:14 domidumont left
dalek osystem: 048c6a3 | (Tom Browder)++ | META.list:
update to use version 0.1.4
19:16
19:32 labster left 19:35 awwaiid left
seatek mmm. labster 19:36
19:38 awwaiid joined
seatek on a scale of (naughty .. pure_evil) : creating database tables if they don't already exist, during unit tests for application modules. 19:43
?
19:46 TEttinger joined 19:50 lucasb left, FROGGS left 19:54 andrzejku_ left 19:56 awwaiid left 19:57 awwaiid joined 19:58 rgrinberg left 19:59 _slade_ joined 20:11 sjoshi joined, kaare_ left
moritz acceptable 20:15
at $work, we run unit test with in-memory sqlite DBs
and create the schema in there for each test new 20:16
arnsholt Sounds reasonable to me 20:17
Either in a setUp method (if you're doing JUnit style testing), or making sure to create them first as an orchestration step in a TAP-style framework 20:18
20:20 sjoshi left 20:22 labster joined, labster left, labster joined, awwaiid left 20:23 awwaiid joined
seatek awesome - I just threw them into the class CRUD tests for the tables... using PostgreSQL's CREATE TABLE IF NOT EXISTS table_name ( id SERIAL PRIMARY KEY... blah blah) 20:24
20:25 bjz joined 20:29 Derperperd left
dalek ateverable: f2f7d28 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t:
Fix faulty test

According to the logs, this test was based on bisection that failed to extract some builds properly. Not sure how I was able to pass it again several times (things used to flap, so perhaps it explains it).
Anyway, current version is right.
20:30
20:33 rindolf left 20:35 rindolf joined
AlexDaniel hey all 20:37
comtimtable6: 2014.01 say 'hello world'
committable6 AlexDaniel, ¦«2014.01»: hello world
AlexDaniel basically, that's the first release of rakudo on moar 20:39
not sure why would anybody need to run stuff on it, but hey… :)
20:41 _slade_ left
AlexDaniel for the love of all that is good and decent, don't try to bisect stuff between 2014 releases :D 20:45
(that's what's going to happen: gist.github.com/Whateverable/472a9...d74b70d94f )
basically it will say that it's one of the commits between two tags 20:46
DrForr Is there any sort of convention for classes you need to share across two driver classes, but don't really want to expose to the outside world?
[Coke] comtimtable6 ? 20:47
geekosaur the bots edit correct their names
moritz DrForr: make it a role. Document it to be private
lizmat DrForr: the only thing I can think of is something like Rakudo::Internals
aka, have a name indicating privateness
and what moritz said :-)
DrForr Roles really aren't appropriate here, I'll go with Internals. 20:48
AlexDaniel [Coke]: github.com/perl6/whateverable/issues/39 :)
20:48 firstdayonthejob left
DrForr Also github.com/drforr/perl6-Template-Toolkit is out and minimally working. 20:48
[Coke] DrForr++ 20:49
DrForr Yes, there's Template6, but this is a direct replacement for TT from Perl 5, down to the grammar.
RabidGravy cool, will look in the morning, I'm a bit softwared out tooday
DrForr Minimal in the sense that it'll interpolate [% foo %} and [% format("hello",2) %]. I'm adding a precompilation layer right now that'll let me do [% IF 1 %]stuff[% END %] but that may not get done tonight. 20:51
20:52 Ven_ left
RabidGravy The first real feature that people will want will be the [% FOREACH foo IN bars %].... I guess 20:53
I would anyway
DrForr Yeah.
ANd [% INCLUDE %]
20:54 rindolf left 20:56 awwaiid left
tadzik I use PROCESS a lot in my stuff 20:56
DrForr Patience, padawan. 20:57
tadzik (probably not too surprising :P)
20:57 awwaiid joined, Ven_ joined 20:59 rudolfochrist left 21:01 geekosaur left
RabidGravy I just realised this technical test I just did was the most Perl 5 I have written since 2014 21:01
21:02 geekosaur joined
DrForr Was it one of those "Implement a small spreadsheet" or "Here's a simple card game. Write a program that plays a hand."? 21:02
I got several of those when I was doing the rounds in the UK. 21:03
RabidGravy I did a card game for some other gig the other day
this was for a fashion retailer, it played to their interests shall we say
DrForr A... fashion retailer. With an address somewhere near Westfield by chance? :) 21:04
RabidGravy aye
DrForr Talk to either of the Daves. Their front-door HR is completely off the nut, in order to get a decent shot you need to talk to people on the inside. 21:05
21:08 Ven_ left 21:10 _slade_ joined 21:11 Ven_ joined 21:12 matiaslina joined
RabidGravy I think I'll at least get to third base 21:13
BenGoldberg is looking at Template::Toolkit, specifically the comment about EVAL_PERL being unused... considering that we've got both v5 and Inline::Perl5 ... I don't think that option is actually pointless.
21:14 bjz left
DrForr Evaluating Perl5 code is fine. Code that mucks with the Template Toolkit stash isn't. 21:15
dalek osystem: 026c28c | (Tom Browder)++ | META.list:
add auth back into module file for ecosystem use

seems like ecosystem uses author from auth tag (not META6.json) on module (which one if multiple modules?), but version from META6.json--weird!
DrForr I think I also added a note somewhere that I simply didn't want to add Inline::Perl5 as a dependency; also it might be a good test for plugin authors, if I have any eventually :) 21:18
21:18 awwaiid left
BenGoldberg I guess that makes sense... 21:18
21:20 awwaiid joined
DrForr The catch there is that I don't intend to make the P6 internals the same as P5. Can't be done simply, and I don't want to tie myself to one particular plugin architecture. 21:20
21:23 Celelibi left 21:25 Ven_ left 21:27 Celelibi joined 21:30 robertle left
Hotkeys is there any sort of like 21:33
p6 syntax highlighting stress test
AlexDaniel by stress test you mean what exactly? 21:35
lots of nested things?
or do you just want a file that uses various p6 features that most highlighters can't figure out? 21:36
Hotkeys just things that might trip up a syntax highlighters
yeah
just curious if something like that exists already
21:37 awwaiid left
DrForr Hotkeys: drforr/perl6-Perl6-Tidy on GH (not in the ecosystem yet) has t/rosetta-* which has a bunch of code that tripped up my test suites. Not the most thorough, but it does save you from retyping. 21:38
Hotkeys cool thanks I'll take a peek
AlexDaniel Hotkeys: why are you asking btw? For example, I can send you a file that I bet most p6 syntax highlighters will get wrong 21:39
DrForr Also [% IF 1 %]stuff[% END %] now works due to a separate compiler pass I just added, so I'll have a place to hang [% FOREACH... %] tags. The grammar actually lets me do [% e = IF 1 ; foo ; ELSE %]blah[% END %] but I'm nowhere near there yet.
Hotkeys I want to write a highlighting thing for perl6 for highlight.js (and then maybe try and get the discord team to include it) 21:40
just wanted something to test it against
(I know there's syntax highlighting files for p6 for other editors/etc and I'll use those for reference too) 21:41
dalek osystem/readme.install: 0a2eca4 | (Tom Browder)++ | README.install-template.md:
add a template file
21:42
Hotkeys I use discord a lot and am always sad when I can't use the code highlighting in code blocks for p6 to make it all pretty 21:43
so I figured I might as well try and get it going myself and bug them to include it (it seems they use highlight.js)
21:46 awwaiid joined 21:50 BenGoldberg left
seatek I forgot what I was doing, and there are too many things to choose from. 21:53
21:55 yqt joined, bjz joined
RabidGravy I forget what I am doing all the time. Then I just start a new module. 21:56
DrForr Yarg, I just noticed that OSCON London updated my talk with text from some *other* talk I proposed to OSCON USA. At least the rollover text on the schedule grid where everyone will be looking is right. 21:58
RabidGravy when are you over for oscon? 21:59
22:01 bjz left 22:02 bjz joined 22:03 BenGoldberg joined 22:05 awwaiid left 22:07 awwaiid joined
seatek sub & method signatures become etched in stone at compile time, don't they? that is, you can't use a variable program block to (re)define them during program execution, yes? 22:11
RabidGravy yeah, unless of course you make the routine at run time 22:12
BenGoldberg m: my &foo; sub bar { say foo(42) }; &foo := sub ($baz) { return $baz + 1 }; bar(); 22:15
camelia rakudo-moar 13f479: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3; &foo := sub ($baz) { return $baz + 1 }7⏏5; bar();␤»
BenGoldberg m: my &foo; sub bar { say foo(42) }; &foo = sub ($baz) { return $baz + 1 }; bar();
camelia rakudo-moar 13f479: OUTPUT«43␤»
BenGoldberg m: sub foo {...}; sub bar { say foo(42) }; &foo = sub ($baz) { return $baz + 1 }; bar(); 22:16
camelia rakudo-moar 13f479: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling foo(Int) will never work with declared signature ()␤at <tmp>:1␤------> 3sub foo {...}; sub bar { say 7⏏5foo(42) }; &foo = sub ($baz) { return $b␤»
BenGoldberg m: sub foo($) {...}; sub bar { say foo(42) }; &foo = sub ($baz) { return $baz + 1 }; bar();
camelia rakudo-moar 13f479: OUTPUT«Cannot modify an immutable Sub␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: sub foo($) {...}; sub bar { say foo(42) }; sub foo ($baz) { return $baz + 1 }; bar();
camelia rakudo-moar 13f479: OUTPUT«43␤»
22:16 girafe left
BenGoldberg m: sub foo(@_) {...}; sub bar { say foo(42) }; sub foo ($baz) { return $baz + 1 }; bar(); 22:17
camelia rakudo-moar 13f479: OUTPUT«43␤»
seatek yeah, i've got named parameter signatures with where clauses that would be nice to be able to generate on the fly... looking at routines for that 22:19
or i could just use a damn hash ;) 22:20
i like the cadillac with the electric windows though :) 22:21
22:22 bjz left
Util m: constant @m = <Jan Feb>; state %m_n = @m Z=> 1..2; say %m_n<Feb>; 22:26
camelia rakudo-moar 13f479: OUTPUT«2␤»
Util m: constant @m = <Jan Feb>; constant %m_n = @m Z=> 1..2; say %m_n<Feb>;
camelia rakudo-moar 13f479: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Type check failed in constant declaration of %m_n; expected Associative but got Seq (Seq)␤at <tmp>:1␤------> 3= <Jan Feb>; constant %m_n = @m Z=> 1..27⏏5; say %m_n<Feb>;␤»
Util ???
22:26 ccakes joined
p3rln00b m: constant @m = @(<Jan Feb>); constant %m_n = %(@m Z=> 1..2); say %m_n<Feb>; 22:27
camelia rakudo-moar 13f479: OUTPUT«2␤»
dalek osystem: e78aa04 | (Tom Browder)++ | META.list:
adding all valid versions (with good links to tarballs0
22:28
Util p3rln00b: thanks!
p3rln00b rt.perl.org/Ticket/Display.html?id...et-history
22:29 RabidGravy left, RabidGravy joined 22:31 wamba left 22:34 RabidGravy left 22:37 awwaiid left 22:38 awwaiid joined
tbrowder .tell Zoffix there is a PR in ecosystem for an installation template for review 22:39
yoleaux tbrowder: I'll pass your message to Zoffix.
22:45 pmurias_ left 22:47 canopus left 22:48 matiaslina left 22:52 zacts joined 22:55 canopus joined 23:01 awwaiid left 23:02 awwaiid joined 23:19 Derperperd joined 23:25 kenh83_ joined 23:26 awwaiid left 23:27 awwaiid joined 23:28 kenh83 left 23:48 aries_liuxueyang joined 23:51 awwaiid left 23:53 awwaiid joined 23:54 Derperperd left 23:56 Derperperd joined