»ö« 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.
HoboWithAShotgun hwg: github.com/holli-holzer/perl6-Unit-SI 00:02
i moved the offending test to the top of the only test file 00:03
Zoffix is getting ---INIT___ a bunch of times; then "This type (Submethod) does not support positional operations" 00:04
HoboWithAShotgun: what rakudo version are you on? 00:05
HoboWithAShotgun This is Rakudo version 2017.08-91-g9785356 built on MoarVM version 2017.08.1-128-gde6dced 00:06
homebrewn
Zoffix Yeah, runs on 2017.08 00:07
Looks like some bug was introed afterwards :o
Zoffix Between 2017.08 and 2017.09 00:07
HoboWithAShotgun i seem to have a talent to find these :-D 00:08
Zoffix .tell AlexDaniel if bisections and regressions are your thing, seems something got broken between 2017.08 and 2017.09. If you run the t/01-* test, in 2017.08 it shows some output, but on 2017.09 it crashes with " 00:09
yoleaux Zoffix: I'll pass your message to AlexDaniel.
Zoffix grr
AlexDaniel .
yoleaux 00:09Z <Zoffix> AlexDaniel: if bisections and regressions are your thing, seems something got broken between 2017.08 and 2017.09. If you run the t/01-* test, in 2017.08 it shows some output, but on 2017.09 it crashes with "
Zoffix AlexDaniel "This type (Submethod) does not support positional operations": github.com/zoffixznet/perl6-Unit-SI
AlexDaniel let's see…
Zoffix Line points to definition of this sub: sub postfix:<V> ($value) returns Unit::SI is export {
return $value does( Unit::SI[ %UNITS<volt><signature> ] ); 00:10
};
HoboWithAShotgun: "but even if that is wrong, it doesnt explain why i see the same value for $a and $b" but you're calling callwith with same args (and could use `callsame`) aren't you? 00:14
Why is it expected for them to change?
HoboWithAShotgun yes, but at least for the first invocation. i mean $a is supposed to be the LHS and $b to be the RHS of the infix 00:15
Zoffix oh 00:17
If I do `my $a = 12V; my $b = 12A; say "== $a, $b";` in test file I get both as 12A 12A
Zoffix And there's no volt method in Units::SI 00:19
AlexDaniel: looks like the regression likely just changed the error. ^ the "volt" thing is in the same method that errors out on more recent rakudos
oh wait... maybe it don't gotta have methods 00:20
AlexDaniel how long does it take to run that test file…
Zoffix right, never mind
AlexDaniel doesn't make it in 10 seconds here :) 00:21
Zoffix AlexDaniel: ages. 11.8s to precomp; 0.6 afterwards
HoboWithAShotgun compiling all the operators takes a while 00:22
for whyever 00:23
Zoffix m: multi sub infix:<==> (Int, Int) is default {say "here"; nextsame }; multi sub infix:<==> (Int, Int) { say "there" }; say 42 == 42
camelia here
here
there
True
Zoffix m: multi sub infix:<==> (Int, Int) is default {say "here"; nextsame }; say 42 == 42
camelia here
here
True
Zoffix m: multi sub infix:<zz> (Int, Int) is default {say "here"; nextsame }; multi sub infix:<zz> (Int, Int) { say "there" }; say 42 zz 42
camelia here
there
True
HoboWithAShotgun facepalms and replaces ( @$.si-signature Z @$signature ).grep({ $_[0] != $_[1] }).elems == 0; by 00:24
Zoffix m: multi sub infix:<z> (Int, Int) is default {say "here"; nextsame }; multi sub infix:<zz> (Int, Int) { say "there" }; multi sub infix:<zz> (Int, Int) { say "there" }; say 42 zz 42
camelia Ambiguous call to 'infix:<zz>'; these signatures all match:
:(Int $, Int $)
:(Int $, Int $)
in block <unit> at <tmp> line 1
HoboWithAShotgun can it maybe possibly be
that identical ints are in the same container
Zoffix HoboWithAShotgun: the first 100 are cached yeah 00:25
HoboWithAShotgun that explains why we see the 12A 12A
it's 12V == 12A,
see?
Zoffix c: 2017.08 class Foo is Int {}; my $x := Foo.new: 2; $x does role Meow {}; my $y := Foo.new: 2; $y does role Moo {}; dd [$x.^name, $y.^name] 00:26
committable6 Zoffix, ¦2017.08: «["Int+\{Meow}", "Int+\{Moo}"]»
Zoffix c: HEAD class Foo is Int {}; my $x := Foo.new: 2; $x does role Meow {}; my $y := Foo.new: 2; $y does role Moo {}; dd [$x.^name, $y.^name]
committable6 Zoffix, ¦HEAD(322dcc9): «["Foo+\{Meow}", "Foo+\{Moo}"]»
Zoffix HoboWithAShotgun: not really
HoboWithAShotgun: oh, now I do. Yeah, you're mixing right into the cached constant
HoboWithAShotgun: you need `Int.new($value)` up in there; thought it only recently got fixed to Do The Right Thing 00:27
AlexDaniel well, the big picture is here: gist.github.com/Whateverable/1fa08...2fbc5d4f04
Zoffix recently as in... a few commits before 2017.10 release
HoboWithAShotgun you mean it should work like this, it just doesn't because my perl is outdated 00:29
Zoffix HoboWithAShotgun: not how you have it, but if you add Int.new($value) to get a new object instead of the cached constant, then yeah, then it'll work and yeah, that works correctly only on 2017.10 release 00:30
HoboWithAShotgun: also, it only affects values under 100, so you could test with 120V == 120A
Zoffix HoboWithAShotgun: also, you could do `use nqp; nqp::div_I(nqp::decont($value), 1, $value.WHAT)` instead of Int.new releases, but note that very soon that nqp op hack will stop working (so you'd need to use Int.new instead) 00:32
HoboWithAShotgun will not enter where will be dragons until i am confident in slaughtering griffins, tyvm 00:34
uh, mixed persons, that means bad luck 00:35
Zoffix m: use nqp; constant can-Int-new = ?try 'nqp::boxI_I(1, 1, Int)'.EVAL; sub rebox-Int {can-Int-new ?? Int.new($^v) !! nqp::div_I(nqp::decont($v), 1, $v.WHAT) }; my $x := rebox-Int 2; $x does role Meow {}; my $y := rebox-Int 2; $y does role Moo {}; dd [$x.^name, $y.^name]
camelia ["Int+\{Meow}", "Int+\{Moo}"]
Zoffix c: 2017.08 use nqp; constant can-Int-new = ?try 'nqp::boxI_I(1, 1, Int)'.EVAL; sub rebox-Int {can-Int-new ?? Int.new($^v) !! nqp::div_I(nqp::decont($v), 1, $v.WHAT) }; my $x := rebox-Int 2; $x does role Meow {}; my $y := rebox-Int 2; $y does role Moo {}; dd [$x.^name, $y.^name]
committable6 Zoffix, ¦2017.08: «["Int+\{Meow}", "Int+\{Moo}"]»
HoboWithAShotgun also, no point when it's deprecated anyway
Zoffix HoboWithAShotgun: what is?
HoboWithAShotgun the nqp hack you mentioned 00:36
Zoffix You could use ^ that. But it's a hack and we don't support users' use of nqp
HoboWithAShotgun (where will be dragons) == nqp
Zoffix HoboWithAShotgun: it won't be deprecated. just optimized and optimization will remove the side effect that it reboxes it
I mean, use Int.new, sure, just keep in mind users with older compilers won't get the stuff working right 00:37
Anyway, the OP issue... 00:38
m: multi sub infix:<==> (Int, Int) is default {say "here"; nextsame }; say 42 == 42
camelia here
here
True
Zoffix m: multi sub infix:<ZZ> (Int, Int) is default {say "here"; nextsame }; say 42 ZZ 42
camelia here
Nil
Zoffix Looks like something to do with `==` op
Gonna take a look at it after fixing callyalater's issue :) But again, the fix (if it's broken and needs fixing) won't be on 2017.08 compiler :)
Yeah, looks like a proper bug; using `UInt` types instead of `Int`s + is default doesn't run it twice 00:39
m: multi sub infix:<ZZ> (Int, Int) is default {say "here"; nextsame }; say 42 ZZ 42 00:40
camelia here
Nil
Zoffix m: multi sub infix:<==> (Int, Int) is default {say "here"; nextsame }; say 42 == 42
camelia here
here
True
Zoffix m: multi sub infix:<==> (Int, Int) is default {say "here"; nextcallee; nextsame }; say 42 == 42
camelia here
True
Zoffix HoboWithAShotgun: you could use ^ that hack to workaround it
Zoffix is getting paranoid about all the people who like to quote me
"BREAKING: Rakudo developer telling users to work around bugs with hacks twice in 5 minutes!!!" 00:41
AlexDaniel I don't know if it helps, but 00:42
gist.github.com/Whateverable/ae2cf...857f8b502b (2017-09-15) github.com/rakudo/rakudo/commit/3d...489bf0cf4b
isn't it weird that it's a revert?
HoboWithAShotgun zoffix: the haters would deem themselves proofed correct, the hopeful will have sympathy and the rest won't probably give a flying clusterfibonacci 00:43
i was told to avoid the f word and fibonacci was the only other one i could think of :) 00:44
zoffix: btw, there is a similar issue in the Str method 00:46
it also gets called twice *sometimes*, i worked around that
may be the same cause
AlexDaniel Zoffix: well I'd say that there's something wrong about that commit, but that's a huge diff of nqp stuff so no idea. A revert is not supposed to introduce completely new behavior, but this one was done manually so ¯\_(ツ)_/¯ 00:49
Zoffix AlexDaniel: OK thanks. I'll leave the buggy code open on one of the desktops. Maybe will remember to try to golf it later 00:50
m: class Foo { method Str is default { say "here"; nextsame } }; Foo.new.Str 00:51
camelia here
Zoffix HoboWithAShotgun: where?
AlexDaniel we just need a bot that would golf things
ZofBot: learn it plz
committable6: 3de6f3388^,3de6f3388 gist.githubusercontent.com/AlexDan...tfile1.txt 00:52
committable6 AlexDaniel, Successfully fetched the code from the provided URL.
AlexDaniel, gist.github.com/30b427ffbec52a3714...5c79035785
Todd_ Hi All, I have a computer that is giving me fits with my pm6's. Error while compiling /home/linuxutil/Pause.pm (Pause) This appears to be Perl 5 code. There is both a Pause.pm and a Pause.pm6. But I still get this error, even when I rename Pause.pm 01:03
Any word of wisdom? This does not happen on three other computers. 01:04
Todd_ This is Rakudo version 2017.06 built on MoarVM version 2017.06 implementing Perl 6.c. 01:04
Todd_ How do I get Perl6 to check for pm6 first? Is there a way to tell "use" to use the extension? 01:08
HoboWithAShotgun ok, I can't use Int.new in my postfix or else i must provide a multi for Rats et al, so i figured 01:09
m: my $x = 2; say $x.WHAT.new( $x + 3 );
camelia 5
HoboWithAShotgun but then
my $x = 0.3; say $x.WHAT.new( $x + 0.2 );
m: my $x = 0.3; say $x.WHAT.new( $x + 0.2 );
camelia Type check failed in binding to parameter 'nu'; expected Int but got Rat (0.5)
in block <unit> at <tmp> line 1
Zoffix Rat.new takes two args: numerator and denominator 01:10
HoboWithAShotgun ah i see
would it have killed them adding another new? ;-) 01:11
Zoffix Todd_: it does check .pm6 first: github.com/rakudo/rakudo/blob/mast....pm#L9-L45 01:12
Todd_ changing Pause.pm to Pause.pm.000 did to work. 01:12
Zoffix weird 01:12
Zoffix & 01:13
Todd_ I have to change the Pause.pm to Pause5.pm 01:13
timotimo Todd_: that was fixed in 2017.07
github.com/rakudo/rakudo/commit/e1...5742bf077b - Todd_ you can apply this change locally and that'll fix things 01:15
Todd_ I just did a `dnf upgrade rakudo` and it is fixed. Thank you!
timotimo ok 01:16
HoboWithAShotgun meh. Rat.new is an only method, so i cant monkey patch another one in 01:24
MasterDuke HoboWithAShotgun: maybe you could do what you want by wrapping it? 01:26
Geth doc: 97da18d52c | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
convert improper subtitles to heads

and decrease :skip-test, improve layout and highlight
01:29
synopsebot Link: doc.perl6.org/language/grammar_tutorial
wander [Coke], can I use =for code :method to substitute :skip-test 01:38
when I write bare token?
the example code is `token command { \w+ }' 01:39
timotimo did work today: github.com/dnmfarrell/Perl6-One-Liners/issues 01:51
HoboWithAShotgun how do i ask a variable for the exponent if expressed scientifically? 02:07
so for 125 it should return 2
cause 1.25 e 2
Zoffix m: 125.log(10).Int.say 02:10
camelia 2
HoboWithAShotgun mathhs :)
i was good in geometry and probabilities 02:11
the rest... meh
HoboWithAShotgun m: 0.0031125.log(10).Int.say 02:12
camelia -2
Geth doc: e84a5ea377 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Update grammar_tutorial.pod6
02:39
synopsebot Link: doc.perl6.org/language/grammar_tutorial
Todd_ how do you read a raw key off the keyboard? 03:05
Zoffix
.oO( someone should write a blog post about that )
03:08
For advent...
huggable: advent 03:09
huggable Zoffix, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...7/schedule
Geth doc/W4anD0eR96-patch-1: f09aa72e42 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Add example "Add actions directly", review needed

Since this tutorial shows actions in grammar only by associating a action object, I add an example to introduce write actions directly.
As a nonnative, maybe there is some improper expression in the text.
Thank for your review!
Zoffix Todd_: it's something along the lines of using Terminal::Print or termios to set terminal to non-buffering mode and then you can just use getc or something
eco: Terminal::Print
buggable Zoffix, Terminal::Print 'Asynchronous printing to your terminal -- as a simple grid': github.com/ab5tract/Terminal-Print 03:10
Zoffix eco: termios
buggable Zoffix, Term::termios 'termios routines for Rakudo Perl 6': github.com/krunen/term-termios
Zoffix Todd_: that gets asked often; you can probably find answers if you search the chat log: irclog.perlgeek.de/perl6/2017-10-28
Todd_ thank you all! I have some reading to do. 03:11
Geth doc: W4anD0eR96++ created pull request #1635:
Add example "Add actions directly", review needed
Todd_ looking at github.com/krunen/term-termios, in the loop, I have to press a key before it reads the second key. ??? 03:23
geekosaur yes because it's looking for a combining character. there's something or other to change that low level behavior that I don;t recall of the top of my head 03:29
but since perl 6 works by default at the grapheme level, it does that by default
Zoffix You could try switching $*IN to binary mode ($*IN.encoding: Nil) and using .read(1)
instead of .getc
Todd_ I am not following. how would I write `my $c = $*IN.getc;` in encoding? 03:37
geekosaur I ... don;t even understand the question 03:39
Zoffix Todd_: are you trying to read the key or read one character?
geekosaur perl; 6 is already doing encoding, that is why it is waiting for more. Unicode graphemes can consist of multiple characters 03:39
Todd_ I am trying to read one charatcter at a time. Flush first, so I only get new stuff 03:40
Zoffix Todd_: it'd often need to read more than one character; otherwise it doesn't know when you've finished entering your character.
Zoffix m: say [.encode.bytes, .chars] with "a" ~ "\x[308]" x 1000 03:41
camelia [2000 1]
Todd_ I am looking for one instance of any key on the entire keyboard being pressed. Weird keys too. 03:41
Zoffix Todd_: ^ that's a 2000-byte single character
geekosaur Todd_, good luck with that.
(a) shift doesn;t send a character 03:42
(b) F1 sends, depending on the exact terminal, up to 5 or so
Todd_ well, how do I read everything else, except shift. I will compromise on that 03:42
Zoffix Why "good luck"? There are many programs that read presses like Ctrl and Shift 03:43
Like most video games
geekosaur by not using a terminal, yes
if you are using a GUI you can get raw key events
if you are using a video game console you get raw key codes
geekosaur temrinals are neither 03:43
zostay does zef precompile during installation? 03:44
Zoffix zostay: yes
zostay hmmm
Todd_ this is how I do it in Perl 5. vpaste.net/reOF7
Zoffix Presumably you can set the same modes with termios module or whatever 03:46
Todd_ xterm, terminal, ssh, xrdp
geekosaur try pressing F1
Todd_ I want it all.
geekosaur that does not handle it
heh. F1 doesn;t even go to the terminal on my system, it pops up help. 03:47
Todd_ chuckle. It asks me if I was to read teh Xfce manual. I will compromise 03:47
geekosaur lpaste.net/359585 03:51
to get any rawer than that, you'd have to use X11 operations and process key events; I don't know if anyone has xcb bindings for perl 6 yet
Todd_ in the example for termios, the furst key I press gets ignored. The second one gets read.
Todd_ maybe I typod something. I will copy and paste. 03:55
No such method 'ord' for invocant of type 'Buf[uint8]' But a lest it read the first key
geekosaur hm. that error is probably correct, if you go to fully raw mode you are not working with Str any more 03:56
ptogrammers always think a string is a string. They're always wrong but most languages let them get away with it and silently do the wrong thing in many cases 03:57
(or verbosely, for e.g. early python 3 releases)
wander m: my @primes = ^100000 .hyper.grep: *.is-prime; say @primes; 03:58
camelia (signal XCPU)
wander m: my @primes = ^100000 .hyper.grep: *.is-prime; say @primes.head(10);
camelia (signal XCPU)
Todd_ and it really messed up my terminal, leaving it in raw mode. 03:59
geekosaur hm, it should have reset it. I didn't change that part
oh, wait. because of the error. 04:00
type: stty sane
then control-J
(NOT enter!)
Todd_ that fixed it 04:01
:-)
geekosaur testing this time before sending update... 04:05
lpaste.net/359585#a359587 04:07
more correct would be to extract the byte from the Buf, but this will do 04:08
Todd_ And it works! Thank you!
Will you update github.com/krunen/term-termios ? 04:09
geekosaur no but I'm filing an issue. the author can decide how best to deal with it. 04:15
github.com/krunen/term-termios/issues/10
Todd_ sweet
Actually, under line 19, add: 04:17
$termios.setattr(:FLUSH);
Todd_ Here is my module and a test program for it. Bang away on keys whilst you wait the five seconds. Note that they all get dumped. vpaste.net/y37Pe 04:21
Man that was a head scratcher! Thank you Geekosaur. Don't forget to :FLUSH. That did not sound too good. :-) 04:24
geekosaur it's actually documented for IO::Handle#getc although it doesn't tell you what to do about it 04:25
(I seem to recall a within the past month or so moarvm commit that made it possible to avoid the extra wait?)
Zoffix Todd_: perhaps you'd like to write a blog about how to do what you did? We need more authors for our Advent Blog and that topic is commonly asked
huggable: advent
huggable Zoffix, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...7/schedule
HoboWithAShotgun PUTs his head to REST 04:28
i am sorry. good night guys
Zoffix \o
Todd_ I was in the process of writing it up on the mailing list. I am tenacious but I am really only a dead beginner, so I am not sure other than the mailing list how I can be of help. I share and blab a lot over on the mailing list/
Zoffix Todd_: you don't need to be an expert to write a post :) You did accomplish the task after all. 04:29
Todd_ I stood on the shoulders of giants! 04:31
Zoffix :)
.tell callyalater the quote braid bug is now fixed: c: HEAD $ = ""; sub postfix:<!> { [*] ^$^f+1}; say "{ 5! }"; Sorry it took longer to fix than original promised :) 04:35
yoleaux Zoffix: I'll pass your message to callyalater.
Zoffix beds
wander m: say "abc"~~/:r a [b+ || bc] $ / 04:40
camelia Nil
ryn1x . 04:44
wander m: my token tok { b .* d }; dd "b11d" ~~ &tok; 04:49
camelia Nil
wander what's wrong?
geekosaur I don;t think that means what you intended 04:54
&foo means you are talking about the sub/method/rule/token itself as an object. A Str is not a token. 04:55
m: sub foo { 'a' }; dd foo; dd &foo; 04:56
camelia "a"
Sub foo = sub foo () { #`(Sub|54778752) ... }
wander m: my regex number { \d+ [ \. \d+ ]? }; say "32.51" ~~ &number; 04:57
camelia 「32.51」
geekosaur hm, but it is a Callable and ~~ will match by calling it. but it calls it incorrectly since a token is only defined in the context of a Grammar iirc? 04:58
not the main perl 6 language
wander my token number { \d+ [ \. \d+ ]? }; say "32.51" ~~ &number; 04:59
m: my token number { \d+ [ \. \d+ ]? }; say "32.51" ~~ &number;
camelia 「32.51」
geekosaur right
m: my token tok { b .* d }; tok("b11d")
camelia No such method '!cursor_start' for invocant of type 'Str'
in regex tok at <tmp> line 1
in block <unit> at <tmp> line 1
geekosaur and the Failure is converted to a Nil by the smartmatch
wander m: my token tok { \d+ [ \. \d+ ]? }; say &tok.ACCEPTS("32.51"); 05:00
camelia 「32.51」
wander a ~~ &b not eqauls to &b.(a)
wander m: say "b11d" ~~ /:r b .* d / 05:01
camelia Nil
geekosaur no, it's not 100% the same, ~~ does more stuff than just rearranging
it thunkifies, it sets $_ locally, it does a number of other metasyntactic things 05:02
wander ok
I rewrite it in "b11d" ~~ /:r b .* d /, it shows the match fails.
have nothing to do with token, grammar,... 05:03
geekosaur no, it has to do with :ratchet 05:04
wander right
thank you, I see that
that's what I concentrate on, whether I write a wrong regex/token 05:05
geekosaur smells like :ratchet is iperating at the wrong level. it's preventing the .* from backtracking instead of preventing backtracking from re-entering the regex (which is kinda irrelevant here, I think). or if :r has that effect when standalone then this might be a gotcha 05:06
because .* will, if ratcheted, commit to consuming the rest of the string and not backtrack to allow the d to be literally matched
wander yes 05:07
geekosaur and it looks like this is expected, so perhaps use of .* in a regex with :r should be in the Traps documment 05:08
*document
regex really expects to be used with things like keywords that don't require backtracking to work 05:09
Todd_ I forgot how to trim a \n off the end of a sting. Trim seems to only get the white space. 05:20
geekosaur works here? 05:22
pyanfar Z$ 6 'my $x = "foo\n"; dd $x.trim' 05:23
"foo"
note that if you got a literal \n into it, it wont be whitespace and won't be removed 05:24
pyanfar Z$ 6 'my $x = q{foo\n}; dd $x.trim'
"foo\\n"
Todd_ $HostName ~~ s/\n//; worked. I do not understand pyanfar
geekosaur that is my prompt
and 6 is an alias for running perl 6 one-liners
(that I borrowed from lizmat++ --- note that only zsh seems to allow numeric alias names, not bash) 05:25
geekosaur ('pyanfar Z$' --- host name and prompt announcing it as zsh instead of bash or etc. my dotfiles check for zsh, bash, ksh, and various vendor /bin/sh) 05:26
wander pod issue 05:52
=head1 X<Creating Grammars|class,Grammar;declarator,grammar>
=SUBTITLE Group of named regexes that form a formal grammar
then the =SUBTITLE is hidden 05:53
how can I do what I want? or it is unsupported?
piojo_ .tell stmuk When I was talking about archlinux support for rakudo star, I was really talking about DESTDIR support. That's all that's needed for us to be able to make packages, both third party and official. 07:32
yoleaux piojo_: I'll pass your message to stmuk.
stmuk_ piojo_: I think distro packages probably should be starting with packing rakudo itself rather then star. Star would be a meta package of rakudo itself and modules. Rakudo is supposed to have DESTDIR support although last time I looked I was unclear whether it was complete 08:06
piojo_: In fact rakudo itself is probably 3 packages -- nqp, MoarVM and rakudo proper 08:08
piojo_: its probably worth checking what Debian and OpenSUSE have done already
dominix hi all 08:09
I have a tricky things. How do I declare my first elemnet of an array to be empty when using <> 08:10
for ex : my @aa = < empty foo bar> 08:11
if I say : my @aa = < "" foo bar>; it doesn't works
it may be trivial, but I don't find. 08:12
piojo dominix: What do you mean by an empty value? An empty list? An empty string? the "Any" type value? 08:32
either way, the short answer is that you can't do it with <>, because only literal strings are allowed 08:33
You can add an empty string with <<>> (or "«»"), but even with that, it's not a true empty string, but an IntStr 08:34
m: say «'' 'second element' third fourth».perl
camelia (IntStr.new(0, ""), "second element", "third", "fourth")
piojo The first element can be interpreted as an empty string, or as 0.
piojo stmuk_: I'll add a note to the rakudo-star (3rd party) package suggesting people install rakudo instead. 08:37
piojo stmuk_: this is a psychological problem, more than anything else. When I first installed perl6, I found there was no perl6 software/package, so I searched for what it was called. All the blogs talk about installing "rakudo star", so that's what I searched for. (To find that it didn't work.) I didn't know what "rakudo" was, but I thoughtit would be less appropriate, since it's not the recommended software... 08:38
it's only a minus for user acquisition--it makes very little difference to a current user. 08:39
stmuk_ to be frank the packaging of perl 5 in distributions historically has usually led to upstream advice to avoid it 08:49
probably because CentOS etc. ship years old versions .. probably less of a problem with arch :) 08:50
although anyone installing the current debian stable rakudo (2016.12) will probably find many modules no longer work 08:52
eg. DBIish 08:53
piojo Haha 08:56
Yeah, Arch ships perl 5.26. If anything, it upgrades too often! 08:57
piojo This isn't a distro where you're supposed to avoid or go beyond the official and 3rd party packages. It's no "slackware" 08:58
dominix well, the only trick I've found is to unshift @aa, ""; 09:05
dominix my @aa = <foo bar>; unshift @aa, ""; 09:06
dominix this is what I need, is «'' foo bar» equivalent ? 09:07
of course it is not 09:12
geekosaur it's likely equivalent enough 09:16
dominix what do you guys think about naming perl6 6lang or something other. 09:17
is rakudo appropriate enought to illustrzte another branch of perl ? 09:18
geekosaur m: my @a = <0 a b>; dd @a[0] -- I suppose you also dislike this 09:20
camelia 5===SORRY!5=== Error while compiling <tmp>
No valid trait found after also
at <tmp>:1
------> 3 <0 a b>; dd @a[0] -- I suppose you also7⏏5 dislike this
geekosaur whoops, comment...
m: my @a = <0 a b>; dd @a[0] # I suppose you also dislike this
camelia IntStr @a = IntStr.new(0, "0")
geekosaur <> and << >> make allomorphs. Perl 5 also does this but neither tells you nor gives you a choice in the matter 09:21
empty strings can always be used as zeroes, numeric strings can always be used as numbers. The allomorph is how Perl 6 does the same thing 09:22
dominix nice 09:23
geekosaur m: my @a = <<"" a b>>; dd @a[0]
camelia IntStr @a = IntStr.new(0, "")
geekosaur if you use it as a Str, it's an empty Str 09:24
m: my @a = <<"" a b>>; say @a[0]
camelia
geekosaur m: my @a = <<"" a b>>; say '|' ~ @a[0] ~ '|' 09:25
camelia ||
tyil a friend of mine asks if there's a suitable replacement for WWW::Mechanize in perl 6
AlexDaniel dominix: why not (‘’, |@a) ? 09:50
squashable6: next 09:52
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 6 days and ≈0 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel Next squashathon will be for perl6/doc 09:55
knight__ Ehm, what does it means method perl? 09:56
example something.perl..
AlexDaniel .tell Zoffix squashathon poster plz? :) 09:57
yoleaux AlexDaniel: I'll pass your message to Zoffix.
moritz knight__: it returns a string that is valid perl code 09:58
knight__: which tries to reproduce the original object as good as possible
m: say [1, 2, 3].perl
camelia [1, 2, 3]
AlexDaniel relevant docs: docs.perl6.org/routine/perl#class_Mu
Geth perl6-most-wanted: 617535a590 | (Patrick Spek)++ | most-wanted/modules.md
Add WWW::Mechanize to the most-wanted modules list
10:01
knight__ Thank you.
chakli Hi, anything wrong with this program? perl6 -e 'my $x=1;(1,{my $y=$_+$x; $x=$_;$y;}...^4000000).grep({$_%%2}).sum.say' 10:08
chakli more than 15 min and still running 10:10
nvm got it should be * > 4000000 10:13
teatime without the linebreak it's a syntax error, weird 10:14
AlexDaniel teatime: where? 10:15
teatime lol nm the syntax error was typing 'perl6 -e' into the REPL 10:16
AlexDaniel haha
stmuk_ piojo: I just started github.com/stmuk/rakudo-packages 10:17
AlexDaniel chakli: hi. What about something like this? (1, 1, * + * ... * > 400000) 10:18
chakli: it seems like you need two latest values and you can do that by simply having something that takes two arguments
chakli oh, didnt know 10:19
AlexDaniel chakli: so WhateverCode like * + * will do, or you can try { $^a + $^b }
or even -> $a, $b { $a + $b }
m: say (1, 1, -> $a, $b { $a + $b } … * > 10000)
camelia (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946)
AlexDaniel or if you don't want two leading 1 then maybe even this: 10:20
m: say (1, -> $a, $b=1 { $a + $b } … * > 10000)
camelia (1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946)
chakli b has a default arg here? 10:21
AlexDaniel yea, it has a default value
chakli m: (1,1,->$a,$b {$a+$b}...* > 4000000).grep({$_%%2}).sum.say
camelia 4613732
AlexDaniel there are so many ways you can write it :) 10:22
chakli doing some project eulers with perl6 10:23
teatime what does { # some block }...300 do? 10:24
teatime wait nm 1 sec 10:24
AlexDaniel docs.perl6.org/language/operators#infix_...
argh, that link didn't work so well 10:25
teatime > {300}..305
-> ;; $_? is raw { #`(Block|94671787949184) ... }..305
I thought .. would make a non-lazy list
AlexDaniel teatime: err, no, .. is for creating range objects 10:26
it's not really a list or anything, it's just an object with min and max values
chakli m: (->$a=1, $b=1 {$a+$b}... * > 4000000).grep({$_%%2}).sum.say
camelia 4613732
teatime right, true
AlexDaniel it's Iterable and Positional, so you can do all sorts of things with it 10:27
but by itself it's just an object holding min and max values
chakli: actually, that's a very interesting way to do it 10:28
teatime heh I had a totally wrong idea of .. and ..., good to have cleared that up 10:30
AlexDaniel interesting old gist: gist.github.com/AlexDaniel/1e2d1c50963d37c5d43a 10:35
I was looking for a comprehensive list of ways you can create a callable 10:36
patrickz .seen bduggan
yoleaux I haven't seen bduggan around.
AlexDaniel I thought that I had it, but I guess not?
knight__ is there any example for creating own "chaining methods" a.meth1.meth2? 10:56
sena_kun m: class A { method a() { say "Kon-Kon"; self; }; method b() { say "Woof"; self } }; A.new().a().b(); 10:58
camelia Kon-Kon
Woof
sena_kun something like that?
knight__ Ok, I understand, thank you. 11:00
Geth marketing: a815395a92 | (Zoffix Znet)++ | 11 files
Add 2017.11 SQUASHathon poster
11:08
stmuk_ wonders if going to the Barcelona Perl Workshop next weekend will be safe 11:18
lizmat stmuk_: usually all hell breaks loose *after* the Perl event 11:18
stmuk_ hahaha yeah like Kiev :) 11:19
AlexDaniel .tell lizmat plz mention the next SQUASHathon in p6weekly: twitter.com/zoffix/status/924232852551716864
yoleaux AlexDaniel: I'll pass your message to lizmat.
lizmat . 11:20
yoleaux 11:19Z <AlexDaniel> lizmat: plz mention the next SQUASHathon in p6weekly: twitter.com/zoffix/status/924232852551716864
lizmat will do :-)
AlexDaniel lizmat: more: default branch switched to “master”: rakudo.org/2017/10/27/main-developm...to-master/ , github issue tracker is now open: irclog.perlgeek.de/perl6/2017-10-24#i_15345892 11:23
lizmat: “samcv++ # first person to do a MoarVM release” irclog.perlgeek.de/moarvm/2017-10-26#i_15359680 11:24
lizmat .
you mean other than jnthn of course :-) 11:25
I would qualify jnthn as a person as well :-)
AlexDaniel as he puts it in the next message, he is “zeroth” :)
lizmat aahhh ok, clear :-)
stmuk_ jnthn probably qualifies as several people from a productivity perspective :)
AlexDaniel stmuk_: not only jnthn, have you seen recent contributions by Zoffix++ ? :) 11:26
stmuk_: two weeks ago the number of RT tickets went *down*! gist.github.com/AlexDaniel/0f20a50...d1d94002e2 11:27
stmuk_ true!
AlexDaniel ( even though during the same period I was populating the ticket queue with regression tickets :P ) 11:29
stmuk_: and then there's samcv who overdelivered way too much for the unicode grant 11:30
tbh most rakudo devs are very productive :) it makes me feel less than a whole human :D 11:31
lizmat :-) 11:31
stmuk_ :) 11:36
geekosaur piojo, there's still at least two reasons to avoid the distro package: 11:42
(1) you dont control when things get upgraded, upstream does. bad if you are developing and the API changes when you do a system update 11:43
(2) the system may be using that package and its dependents, and replacing versions with newer ones may break the system
geekosaur (someone tried that with perl on debian. dpkg utilities depend on perl, or did at the time. dpkg broke *badly* and they ended up reinstalling) 11:44
aaaand it looks like most of that got missed, whoops
piojo, there's still at least two reasons to avoid the distro package: 11:45
(1) you dont control when things get upgraded, upstream does. bad if you are developing and the API changes when you do a system update
(2) the system may be using that package and its dependents, and replacing versions with newer ones may break the system
so it's still a good idea to avoid distro packages if you are developing stuff
stmuk_ geekosaur: while agreeing with most of what you say .. I'd say there are practical reasons for using distro packages in large organizations 11:49
so it depends on what sort of development is happening
geekosaur to a point, yes. I;ve been there. and quite a few largs orgs actually maintain their own packages specifically so they have control over the issues I mentioned
(like the one I used to work for) 11:50
most of them also have isolation so devs are in an environment where they see the dev-intended version instead of the system one
stmuk_ there are developers who probably should use vendor supplied languages in some situations (although I doubt anyone on this channel should) 11:51
geekosaur (heck, if the org is big enough, it actually rolls its own *distribution*)
(usually based on some vendor distro but updated on the org's schedule, with org-required variations, and fully regression tested and supported by the org with upstream vendor only brought in when necessary / problem is replicated on unmodified vendor distro) 11:52
stmuk_ all that works fine until the one person who set it all up leaves :) 11:55
bbl
geekosaur you haven't worked in a truly large org, I see 11:58
I'm talking F50. there ain't no "one person" 11:59
(I continue to be amazed at how little open source types know about large corporations. Including folks like Red Hat --- who is losing many of their enterprise customers over RHEL7 and doesn't seem to be able to understand why.) 12:01
stmuk_ I've worked in organisations of 100K+
lizmat stopped when it reached 5K+ 12:11
lizmat the parties just became too large, too crowded and too loud :-) 12:11
Geth doc: 00d9800590 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
add hint for devs
12:14
synopsebot Link: doc.perl6.org/language/tables
patrickz On my machine `zef install App::Cpan6` fails with: gist.github.com/patzim/ce3a1da1380...e0df184182 12:42
Can someone verify it's not only me? 12:43
sena_kun indeed. 12:45
patrickz I'll report it 12:46
sena_kun consider opening an issue at github.com/scriptkitties/perl6-App-Cpan6/issues 12:46
oh, I am too slow.
patrickz++
patrickz Just did my first CPAN module upload. Yay! Will see how that goes... 13:21
buggable New CPAN upload: RPi-ButtonWatcher-0.0.1.tar.gz by PATRICKZ cpan.metacpan.org/authors/id/P/PA/...0.1.tar.gz 13:26
poohman m: say "Hello all"; 13:31
camelia Hello all
poohman I am trying to make a grammar for a pdf file - just trying to extract text without using pdftotext 13:33
get a "Malformed UTF-8" when trying to read it or parse it using Grammars 13:34
AlexDaniel poohman: fwiw, have you looked at existing PDF modules? modules.perl6.org/search/?q=pdf
moritz poohman: yes, PDFs tend to contain binary data
and grammars aren't well suited for those, I fear
poohman any way to directly read the raw data 13:35
oh ok
moritz sure, you can .read() it into Blog
or .slurp(:bin)
AlexDaniel Blob* 13:36
poohman but cant coax the parsefile method by passing arguments?
Did look at the existing PDF modules - but this is just to play around 13:37
buggable New CPAN upload: RPi-Device-ST7036-0.0.3.tar.gz by PATRICKZ cpan.metacpan.org/authors/id/P/PA/...0.3.tar.gz 15:16
gfldex how the world sees Perl 6 (through the eyes of my blog): screenshots.firefox.com/5OgIRlewbX...dpress.com 15:19
(also firefox screenshots are nice) 15:20
knight__ Hello, I am using a module CSV::Parser and also I have installed libtext-csv-xs library, I am still getting this error. 15:31
perl6 test.p6
Could not find symbol '&CSV'
also I used zef install CSV::Parser
knight__ What is the problem? 15:32
knight__ I understand, about missing symbol 15:32
but what shall I install?
gfldex knight__: could you provide the source of test.p6 please? 15:33
knight__ wait 15:33
tbrowder gfldex: nice chart, looks like it should be linked to the perl6.org site and updated regularly, 15:38
gfldex tbrowder: the weekly might provide better numbers 15:39
moritz and in December the p6advent blog 15:40
tbrowder sure. can you share the code?
gfldex there is no code but making one shouldn't be to hard
Geth ecosystem: patzim++ created pull request #378:
RPi::Device:ST7036 moved to CPAN
15:41
gfldex you can ask wordpress to provide those stats
tbrowder i would love to find p6 people near me—pms seem to be fading away in se us.
Geth ecosystem: 2cf9a59a9f | (Patrick Zimmermann)++ (committed using GitHub Web editor) | META.list
RPi::Device:ST7036 moved to CPAN
15:42
ecosystem: 0676ef74fa | lizmat++ (committed using GitHub Web editor) | META.list
Merge pull request #378 from patzim/patch-2

RPi::Device:ST7036 moved to CPAN
knight__ gfldex: I made mistake, I was using module the Text::CSV and it was failling - missing symbol.
knight__ I changed module to CSV::Parser
and seems, that everything works... :-)
gfldex tbrowder: we could steal code from medium.com/@dschnr/using-headless-...07dffba79a 15:43
moritz doesn't see the value 15:44
sure, it's a nice visual, but does it really provide relevant information?
gfldex „relevant information“ is very subjective 15:45
moritz fwiw the one from perl6advent is very similar visually
gfldex: let me rephrase. What decisions you or somebody else do might be influenced by seeing this? 15:46
gfldex it's nice to know that the language barrier seams not to be the limiting factor for adoption
tbrowder well, if we could do more fine-grained stats it could help perl meetup planning, marketing, etc.
moritz gfldex: I'd draw a different conclusion. Since most users seems to be in the US, I should write Perl 6 stuff in English 15:48
(which I already concluded from running a German Perl 6 page for some time)
gfldex english is taught pretty much anywhere in the world, yet there are plenty of grey spots on that map 15:50
AlexDaniel squashable6: next 16:08
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 5 days and ≈17 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
HoboWithAShotgun enters the room, grabs a coffee and takes place in the corner, silently sipping 16:15
lizmat knight__: did you look at Text::CSV ? 16:17
lizmat was just wondering
ugexe "I was using module the Text::CSV and it was failling - missing symbol." 16:24
knight__ lizmat: I a use the CSV::Parser, The module which does not work (in my case) is Text::CSV and I did not check it also I gave up for searching solution...
lizmat what symbol was missing? Was that during install or during running? 16:25
knight__ running &CSV
maybe some "low level" lib... 16:26
but, I have installed libtext-csv-perl (to debian)
lizmat Text::CSV doesn't use any low level lib, it's Perl 6 code only
not even any nqp ops in it 16:27
so I'm a bit surprised
m: say Text::CSV # looks to me like you forgot to do a "use Text::CSV" ?
camelia Could not find symbol '&CSV'
in block <unit> at <tmp> line 1
knight__ Nope, 16:28
Geth doc/W4anD0eR96-patch-1: 8fa97ee522 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Update grammar_tutorial.pod6
knight__ lizmat: I am doing something important, I can test it later... 16:29
lizmat sure... as I said, I was just wondering :-)
Actualeyes :smile: 16:40
wander m: say "a(b" ~~ /a <|w> b/ 17:13
camelia Nil
wander confuse about how <|w> works
wander m: say "a(b" ~~ /a '('<|w> b/ 17:14
camelia 「a(b」
wander ok, seems it works, <|w> doesn't really match characters 17:16
geekosaur right, it matches boundaries 17:19
knight__ m: my %hash := {"jozko dezko" => "asdf"}; say %hash<"jozko dezko">; dd %hash 17:20
camelia ((Any) (Any))
Hash % = {"jozko dezko" => "asdf"}
knight__ How can I get data from hash, when key is multi word?
m: my %hash := {"jozko dezko" => "asdf"}; say %hash<jozko dezko>; dd %hash 17:21
camelia ((Any) (Any))
Hash % = {"jozko dezko" => "asdf"}
lizmat m: my %hash := {"jozko dezko" => "asdf"}; say %hash{"jozko dezko"}; dd %hash 17:25
camelia asdf
Hash % = {"jozko dezko" => "asdf"}
lizmat use { } instead of < >
knight__ Thx 17:26
wander m: dd <jozko dezko>;
camelia ("jozko", "dezko")
wander m: dd <"jozko dezko">;
camelia ("\"jozko", "dezko\"")
lizmat whatever is inside the { } is an expression, in that case the expression is "jozko dezko"
knight__ Thanks 17:27
wander m: my grammar G { token TOP { a { say "42" } b | a { say "12" } c }}.parse("ac"); 17:51
camelia 42
12
wander actions within grammar can do more than action objects, can't they? 17:52
moritz they can fire at different places 17:53
moritz but can't do more, as far as I am aware 17:53
wander gist.github.com/W4anD0eR96/badcee7...4723f7d460 17:58
how to implement ^^ with action objects? as what I know, action objects are called when match has done. 18:00
wander `class Actions { method TOP {AAA}}` equals `token TOP { BBB {AAA} }` I think 18:01
*method TOP ($/)
timotimo how does it equal that? 18:01
wander m: my grammar G { token TOP { a { say "42" } b | a { say "12" } c }}.parse("ac"); 18:06
camelia 42
12
wander how to do this with an action object? 18:07
timotimo split TOP into two separate tokens 18:09
wander right
you show a way by changing grammar
m: my grammar G { token TOP { a { say "42" } b}.parse("ac"); 18:10
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3ken TOP { a { say "42" } b}.parse("ac");7⏏5<EOL>
wander m: my grammar G { token TOP { a { say "42" } b }}.parse("ac");
camelia 42
timotimo why do you need those two blocks to fire anyway?
wander say "42" can be any code 18:11
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/P_cWQYF0l5
Two ter…
wander, Full output: gist.github.com/f0494e6d9ff50cca79...ba0fd4e4f4
timotimo i just find it surprising that both cases start with the same partial match
wander it is a problem that occurs when I write a SDT of if-statement 18:13
gist.github.com/W4anD0eR96/badcee7...4723f7d460
what's important is I need the very code performs at exactly that place
wander of course I can rewrite and put all actions suffix, but it seems action objects' method is always called after regex got matched 18:17
curious whether actions within grammar are more flexible
moritz they aren't 18:24
moritz in a compiler, for example, it would be reasonable to have some things inline in {} blocks that deal with symbol tables for example, and need to happen immediately 18:26
but to still have regular action methods that transform the parse tree into an AST
wander agree, it happens that i translate text on the fly 18:31
back to the origin question, do action objects' methods always perform after the regex got matched? 18:33
moritz yes
wander thank you
HoboWithAShotgun can anybody name a fictional programming language? you know, like Klingon just for computers 18:34
Geth doc: c091ada9c5 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammars.pod6
Update grammars.pod6

Add example about non-backtrack, fix typo and unify format
18:36
synopsebot Link: doc.perl6.org/language/grammars
Geth doc/W4anD0eR96-patch-1: a7a3bcea42 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Update grammar_tutorial.pod6
18:40
moritz HoboWithAShotgun: I can't, and I wonder if we can simply implement all languages we can think of (and find believable) 18:41
(and with "me" I mean the programming community at large; I guess I couldn't even properly implement SQL or Prolog or so)
HoboWithAShotgun how about a language which symbols are entirely chinese characters? 18:45
no punctuation, no numbers, just logograms 18:46
HoboWithAShotgun m: say 一 + 两 == 3; 18:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix == instead
at <tmp>:1
------> 3say 一 + 两 ==7⏏5 3;
HoboWithAShotgun someone in some talk in some video said you could use all numbers 18:49
that are numeric in unicode. i guess these arent 18:50
lizmat m: say uniprop("两")
camelia Lo
lizmat m: say uniprop("3") 18:51
camelia Nd
lizmat m: say uniprop("π") 18:52
camelia Ll
moritz HoboWithAShotgun: writing a programming language in a different script is just a small matter of transliteration, so that's not really in the "fictional" category for me 18:53
lizmat "Any codepoint that has the No (Number, other) or Nl (Number, letter) property can be used standalone as a numeric value" 18:53
from: docs.perl6.org/language/unicode_as...ric_values
I guess π is handled separately by Perl 6 grammar :-) 18:54
because it is a term
wander lizmat, github.com/rakudo/rakudo/commit/de...6da3ed63bf 18:55
HoboWithAShotgun puts Acme::Numbers::Chinese in the todo list 18:56
lizmat it's been a while since I've seen a '#?if !parrot' :-) 18:56
wander 16 Sep 2014 it tags, maybe others work on it later :P 18:58
wander is `#?if ... ` a macro? I have seen "macro is experimental" 19:00
lizmat wander: it's not a macro, it's a directive for the fudger that combines all of the .pm files in src/core/ to a single file that is "the setting" 19:03
available in gen/moar/CORE.setting
wander got it
poohman hello - Is this a good place to ask some questions about zef 19:04
?
moritz poohman: I'd even say there's no better place than here :-) 19:04
lizmat if you don't get an answer here, you might try #perl6-toolchain (if it gets very technical)
poohman thanks, Im trying to install the PDF module using zef and I get thefollowing error, 19:05
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block at /home/winnie/.perl6/sources/4B1D5A60B59D9541E13F76E0E2A2D550E0144053 (Zef::Client) line 106
im able to search without any problems 19:06
but get this when I try to install it 19:07
sorry if I pasted something too long
moritz tries it 19:12
ugexe probably the meta6.json file needs something changed 19:13
Geth doc/W4anD0eR96-patch-1: 11bff0a953 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/grammar_tutorial.pod6
Update grammar_tutorial.pod6
moritz I get some warnings (or errors? hard to tell yet) from the PDF test suite 19:18
just warnings, it seems
poohman this is a module name without the double semi colon - dont know if that has something to do with it 19:19
i was able to install::Grammar
sorry PDF::Grammar
the only such module I came across until now 19:20
moritz it installed fine here, with rakudo version 2017.10-3-gf40babb 19:20
poohman and how did you run it, please - zef install PDF ?? 19:22
I have 2017.10-4-g4fca94743
but i updated it just to see if something changes - had the same problem with an older build as well 19:23
El_Che btw, new packages: github.com/nxadm/rakudo-pkg/releas...g/v2017.10 19:24
moritz poohman: yes, just "zef install PDF"
El_Che I use the ubuntu 14.04 on travis
ugexe poohman: what if you do `zef install github.com/p6-pdf/PDF-p6.git` 19:25
poohman let me try it - moment
same problem 19:26
ugexe do you know what version of zef you are using? `zef info zef` 19:28
poohman ver('0.1.9')
ugexe oh, thats old so probably a bug in zef that has been fixed since 19:29
poohman I installed zef again from the share folder after the git pull 19:30
what is the latest version?
ugexe zef uninstall zef && git clone github.com/ugexe/zef && cd zef && perl6 -Ilib bin/zef install .
0.1.31
poohman thanks let me give it a go 19:32
ugexe then do `zef install PDF --deps-only`, then record the full output of `zef install PDF --debug` (so if it does not work I can take another guess) 19:36
(2 commands because you dont need to record all the dependency stuff)
poohman i think i have zef installed elsewhere - its still showing 0.1.9 - even after the new install - let me check 19:37
ugexe zef uninstall zef should remove it 19:38
github.com/rakudo/rakudo/pull/1125 # this fixes the issue with the old bin scripts getting invoked by rakudo (as noted by the last paragraph of initial message 19:41
"Additionally this fixes an issue where .script
would invoke older version bin/ scripts from ~/.perl6"
so its probably not your fault 19:42
poohman zef uninstall zef uninstalled the 0.1.31
i have another one in .perl6 folder
delete the folder?? 19:43
poohman wait ill do an uninstall with that particular zef and see if it helps 19:44
colomon o/ 19:44
poohman says no matching candidates to uninstall 19:45
ill delete .perl6 19:46
cd
timotimo zef has "nuke" commands for that purpose
colomon m: class Fred { method Dim() is DEPRECATED(‘dim’) { 1 } }; Fred.new.Dim 19:47
camelia ( no output )
colomon m: class Fred { method Dim() is DEPRECATED(‘dim’) { 1 } }; say Fred.new.Dim
camelia 1
colomon huh. getting a very different result on 2017.05-303-g5e33934 (and in real code) 19:48
“Cannot invoke this object (REPR: Null; VMNull)” 19:49
ugexe poohman yeah delete it, or `zef nuke RootDir`
er
sorry thats a different dir, yeah delete ~/.perl6
MasterDuke fwiw, i think camelia is running with some sor of 'no deprecations' env var set
mch: class Fred { method Dim() is DEPRECATED(‘dim’) { 1 } }; say Fred.new.Dim 19:50
committable6 MasterDuke, gist.github.com/475359b37e0596fb88...2fd21902e1
colomon MasterDuke: I actually get the same result on my local rakudo IF I just use the above snippet
poohman ok
colomon MasterDuke: oooo, your example there is perfect
My code works perfectly without “is DEPRECATED”, gives the “Cannot invoke” error if I add “is DEPRECATED(‘dim’)” after my “method Dim()” 19:53
colomon is having that sort of day overall — “Can you work through enough bugs to actually get at the bug you are being asked to fix?” 19:54
MasterDuke c: 5e33934 class Fred { method Dim() is DEPRECATED(‘dim’) { 1 } }; say Fred.new.Dim 19:55
committable6 MasterDuke, gist.github.com/0e56d7171c1126eb9f...d4674fd5f7
lizmat colomon: which version of rakudo are you using ? 20:09
colomon lizmat: 2017.05-303-g5e33934 20:09
lizmat wow, that's ah pretty old ? 20:10
colomon lizmat: indeed, since rakudo is an important $work tool for me these days, I don’t update it willy-nilly like in the good old days.
lizmat colomon: could you gist output with --ll-exception?
colomon lizmat: sure, hold on a sec 20:11
poohman thanks all - got PDF module installed - had to force test openSSL though because native libssl.so was not found 20:12
colomon lizmat: gist.github.com/colomon/1c509aa4ba...b627616cef 20:13
colomon it’s dying in trait_mod:<is> for DEPRECATED 20:16
lizmat g5e33934 does not seem to be a valid commit ID ? 20:17
ahh
nom
lizmat no, that shouldn't make a difference ? 20:17
timotimo yeah, need to drop the g
lizmat colomon: I assume the Math::Vector module is precomped? 20:19
colomon lizmat: I don’t know 20:20
lizmat if you add "no precompilation" to Math/Vector.pm, does it still fail then ?
colomon good call, works perfectly if I add that 20:21
lizmat lemme check if we still have that problem 20:24
colomon lizmat++
lizmat we still have that issue on precomped files :-( 20:26
colomon can you explain the issue? 20:27
lizmat github.com/rakudo/rakudo/issues/1219 20:28
colomon lizmat++
colomon is back to working on the fixes, just now with “no precompilation” 20:29
lizmat apparently something is not getting serialized
HoboWithAShotgun my unit postifxes are too tight. $voltage = 12V works, $voltage = -12V; doesnt. methinks i have to make postfix V loser than the prefix - 20:51
but how? 20:52
Herby_ o/ 21:12
Brumbazz Hi :> I've just seen the following perl6 code on stackoverflow: someList.pairs.max(*.value).key <- how does that *.value work ? What's it called ? Thanks in advance :> 21:15
HoboWithAShotgun it's called Whatever/Whatevercode and it's a pit of snakes bridged by narrow planks 21:16
HoboWithAShotgun basically the * introduces a closure and represents the argument to said closure, but only until accessed then it means the second argument and so on 21:17
so grep({ * ~~ Int }) and grep( * ~~ Int) is equivalent code 21:18
so grep({ $_ ~~ Int }) and grep( * ~~ Int) is equivalent code 21:19
Brumbazz Aha, so is value just the value of the pair ?
HoboWithAShotgun yup 21:20
Brumbazz Thanks :> I'll try to play around with it, thanks HoboWithAShotgun :> 21:21
Brumbazz awesome HoboWithAShotgun it works just as I wanted it to, thanks again :> 21:22
lizmat HoboWithAShotgun: docs.perl6.org/language/functions#...is_tighter 21:27
lizmat m: sub postfix:<V>($a) is looser(&prefix:<->) { } 21:28
camelia ( no output )
HoboWithAShotgun that seems to work. thanks lizmat 21:41
lizmat HoboWithAShotgun: cool! :-) 21:42
timotimo damn it! i completely forgot about the 0h game jam 22:28
HoboWithAShotgun decides to go have a fat puff, now that this passes: 22:54
ok 1000m / -100㎧ == -10s;