»ö« 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.
llfourn timotimo: thanks! I didn't watch it yet :o. Hopefully I get some time soon to fixup Spit. 01:00
llfourn disappears
lookatme .o/ 02:00
comborico1611 Goodnight, Perl people. 02:23
Thrush I have two regular expression questions: 03:12
First, how do I emulate the s///e option from Perl 5?
And second, if I have a regular expression where I have case-sensitivity turned off (with the :i adverb), how do I turn it back on in the middle of the expression? 03:13
timotimo for the second, you can use :!i
what does the e option for substitutions do? 03:14
(i've never used perl5)
it seems to be about having $foo in the latter part be replaced with the contents of the variable $foo?
timotimo m: my $foo = "this stuff"; $_ = "hello there"; s:g/e/$foo/; say $_ 03:15
camelia hthis stuffllo ththis stuffrthis stuff
timotimo if i understand your question correctly, perl6 already does /e by default
oh, or maybe you want to have the name of a variable inside the to-be-matched string and put the contents of that in? 03:16
m: my $hey = "HEY"; my $ho = "HO"; $_ = "!!hey!! and !!ho!!"; s:g/'!!' (.*?) '!!'/{::('$' ~ $0)}/; say $_ 03:17
camelia HEY and HO
timotimo like that?
Thrush timotimo: The s///e modifier lets you put code in the substitution portion.
timotimo you can either just put code inside curly braces inside the substitution portion, or you can use the "assignment syntax" version of the s operator: 03:18
m: $_ = "beep boop foo bar"; s:g/ ... ' '/ = ("a".."z").pick; say $_ 03:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed replacement part; couldn't find final /
at <tmp>:1
------> 3 s:g/ ... ' '/ = ("a".."z").pick; say $_7⏏5<EOL>
expecting any of:
postfix
timotimo oops
has to be brackets
m: $_ = "beep boop foo bar"; s:g[ ... ' '] = ("a".."z").pick; say $_
camelia bxboibar
timotimo m: $_ = "beep boop foo bar"; s:g[ ... ' '] = ("a".."z").pick; say $_
camelia bmbfpbar
timotimo m: $_ = "beep boop foo bar"; s:g« ... ' '» = ("a".."z").pick; say $_
camelia bpbvdbar
timotimo any kind that perl6 understands is fine 03:19
hope that helps! i'm off to bed 03:20
o/
(oh, the only ones that aren't allowed there are ( ) parenthesis)
Thrush timotimo: Well, that's pretty cool. Thanks. I'll have to study that. 03:21
timotimo: I was just reading about the brackets of substitution today. I didn't know you could assign it code, though.
piojo m: <a b c>».say 04:10
camelia a
b
c
piojo I just found out the above doesn't work in the windows REPL 04:10
Malformed UTF-8 at line 1 col 10 in sub nativecast at D:\rakudo\share\perl6\sources\51E302443A2C8FF185ABC10CA1E5520EFEE885A1 (NativeCall::Types) line 5
piojo oh, it's coming from Linenoise. Let me uninstall that and see if it persists 04:12
piojo Without Linenoise, it just prints "> Decoder may not be used concurrently" endlessly 04:13
MasterDuke_ piojo: did you run `chcp 65001`? i believe that's needed for unicode support in the windows command line
testaccount 04:14
BenGoldberg If you're using powershell, then [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8 04:15
piojo MasterDuke_: after running that command, the test simply makes rakudo quit
But I can run it with perl6 -e "<a b>».say"
so console unicode support is not the problem.
but term I/O unicode support may be the problem.
ZzZombo Shouldn't github.com/rakudo/rakudo/blob/nom/.../ChangeLog use the `.md` extension in order to use Markdown syntax highlighting? 04:18
piojo MasterDuke_: by the way, in windows 10, unicode support is present in CMD, but that command breaks it
I mean, chcp 65001 breaks it 04:19
MasterDuke_ huh, i don't really use windows, but i thought that was needed. maybe only for pre-windows10... 04:19
piojo I can't speak for the older versions 04:21
piojo files rakudobug
TEttinger chcp can generally be expected to break console functionality. I've sometimes had it work 04:31
piojo Something else unicode related is that matches aren't printed correctly on Windows, either in the REPL or from "perl6 -e ..." 04:45
m: say "a" ~~ / . /
camelia 「a」
piojo Those boundary characters become something nasty, like "「" 04:46
But the terminal CAN handle those characters, since I can input them (by copy/paste) 04:47
but rakudo won't print them, even when I write something as plain as: say '「'
ZzZombo m: say List ~~ Seq 05:34
camelia False
ZzZombo m: say Seq.^parents
camelia ()
ZzZombo m: say List.^parents
camelia ()
ZzZombo m: say List.^roles
camelia ((Positional) (Iterable))
ZzZombo m: say Seq.^roles 05:35
camelia ((Sequence) (PositionalBindFailover) (Iterable))
wander m: List.^mro.say 05:42
camelia ((List) (Cool) (Any) (Mu))
wander m: Seq.^mro.say
camelia ((Seq) (Cool) (Any) (Mu))
lizmat clickbaits p6weekly.wordpress.com/2017/11/13/...explained/ 08:27
sproctor So I had a rather strange thought yesterday and I was trying to work out if it's good practice. Basically I'd like a breakable timed promise. The trick I came up with : sub breakable-timer ( $time where * > 0, &block --> Promise ) { my $flag = Promise.new; Promise.in($time).then( { if $flag.status ~~ Planned { $flag.keep( &block() ); } } ); return $flag } 09:13
Now I'm trying to work out if that's Evil or not. 09:14
It returns a Promise that will eventually call the given block and return the result. But you can break that promise (or keep it) to NOT call the block. 09:15
This is mainly a thing I'm thinking about with Supplies and multiple events in quick succession.
moritz sproctor: sounds sensible, though your code might contain a race condition 09:21
lizmat sproctor: what you basically need is an Promise.in() that isn't vowed
sproctor lizmat: That's be cool. 09:24
moritz or a promise combinator that can also fail a promise 09:25
sproctor moritz: yeah.... If I made it into $flag.status ~~ Planned && $flag.keep( &block() ) would that fix it? Or I just wrap it in a try block. 09:26
moritz m: my ( $p1, $p2 ) = Promise.new xx 2; my $p3 = Promise.anyof($p1, $p2); $p2.break("foo"); say $p3.status 09:26
camelia Planned
sproctor (I mean I guess it's why the Promise factory stuff isn't generally breakable) 09:27
Ven`` o/, #perl6. 09:32
Ven`` I think I already asked this a few months ago, but I totally forgot... Is there a way to write `role C[::F[_]] {}`? 09:36
Basically, taking a type parameter that can be parameterized (higher-order).
moritz I don't think you can 09:38
Ven`` aw :(. 09:39
actually I think I remember being told the same thing, because with specialization, such a thing would make the type-system turing complete, i'm fairly sure.
Garland_g[m] I think I found some sort of bug with the RAKUDO_EXCEPTIONS_HANDLER=JSON flag. 09:40
Garland_g[m] The code that produces it is 'my Var $var;' 09:41
but only when that flag is set
lizmat could you gist that ? 09:42
Ven`` wonders if there's a way to coerce the type parameter into a ParameterizedRole or something, that could be used in signatures later. 09:43
Ven`` .ask jnthn Is there a way to take a parameterized role as a role parameter? 09:44
yoleaux Ven``: I'll pass your message to jnthn.
Garland_g[m] gist.github.com/Garland-g/64fa200a...b6d80e9935 09:46
lizmat m: BEGIN my $R = Rational[Int,Int]; role B[::T] { dd T }; dd B[$R] # Ven``
camelia Rational[Int,Int]
B[Rational[Int,Int]]
Ven`` lizmat: I mean, T is an instantiated parameterized role 09:47
lizmat Garland_g[m]: I have to be afk soon, but will look at that in a few hours
Ven`` I probably poorly explained myself.
I meant taking a role you can parameterize. Like role B[::T[_, _]] { dd T[Int, Int]; }; B[Rational]; 09:48
of note: role B[::T[::A, ::B]]{} doesn't work either, and "should" mean a different thing 09:49
lizmat afk& 09:50
Ven`` .ask jnthn I'm afraid I'm unclear, as usual. I mean taking a role you can parameterize. Like role B[::T[_, _]] { dd T[Int, Int]; }; B[Rational]; 09:51
yoleaux Ven``: I'll pass your message to jnthn.
moritz Ven``: you might be able to workaround by using role B[::A, ::B, ::T] { } and inside the body then use T[A, B]
piojo whoa, I just discovered IO.slurp isn't threadsafe! 09:52
Ven`` moritz: nope, because then T cannot be parameterized
piojo when I slurp the contents of a ton of files in an "await do for { start { } }" loop, it occasionally throws exceptions saying "Cannot assign to an immutable value" 09:53
Ven`` it doesn't know T takes parameters
piojo when I'm only calling $file-path.IO.slurp; on that line, with no assignment
moritz Ven``: well, using T[A, B] inside the role body will result in an array if T isn't parameterized 09:54
Ven`` moritz: gist.github.com/vendethiel/b7cf91e...77d680aede 09:55
my rakudo is maybe a month old 09:56
moritz m: role F[::T, ::A, ::B] { dd T[A, B] }; F[Rational, Int, Int] 09:56
camelia 5===SORRY!5=== Error while compiling <tmp>
T cannot be parameterized
at <tmp>:1
------> 3role F[::T, ::A, ::B] { dd T[A, B]7⏏5 }; F[Rational, Int, Int]
moritz doens't change on a newer rakudo 09:56
so, no dice 09:57
jnthn m: role F[::T, ::A, ::B] { dd T.^parameterize(A, B) }; F[Rational, Int, Int] 10:05
camelia WARNINGS for <tmp>:
Useless use of constant value F[Rational, Int, Int] in sink context (line 1)
jnthn m: role F[::T, ::A, ::B] { dd T.^parameterize(A, B) }; say F[Rational, Int, Int] 10:06
camelia (F[Rational,Int,Int])
jnthn m: role F[::T, ::A, ::B] { dd T.^parameterize(A, B) }; say F[Rational, Int, Int].new
camelia Rational[Int,Int]
F[Rational,Int,Int].new
jnthn Ven``: ^^
piojo IO.slurp is not threadsafe, but open/lines().cache/close is 10:38
seems strange to me.
Ven`` jnthn: awesome! thanks. 10:40
That's really cool :D.
jnthn: Now I need to figure out how to get that in type signatures :) 10:41
m: role F[::F] { sub map(:(::A --> ::B), F.^parameterize(A) --> F.^parameterize(B) 10:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot put required parameter after variadic parameters
at <tmp>:1
------> 3role F[::F] { sub map(:(::A --> ::B), F7⏏5.^parameterize(A) --> F.^parameterize(B)
expecting any of:
Ven`` m: role F[::F, ::A, ::B] { constant FA = F.^parameterize(A); constant FB = F.^parameterize(B); sub map(:(A --> B), FA --> FB) { } } 10:44
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a constant
at <tmp>:1
Exception details:
No such method 'parameterize' for invocant of type 'Perl6::Metamodel::GenericHOW'
in block at <tmp> line 1…
Ven`` I guess "constant" is the wrong phase. 10:44
Ven`` jnthn: is there an "INSTANTIATED" phaser or somesuch? 10:46
jnthn No, because the role's body block runs each time it's instantiated, so there's no need for a phaser
Ven`` mh 10:47
m: role F[::F, ::A, ::B] { my \FA = F.^parameterize(A); my \FB = F.^parameterize(B); sub map(:(A --> B), FA --> FB) { } }
camelia ===SORRY!===
No compile-time value for FA
Ven`` seems like there's a need for a phaser, or something that's compile-time-for-that-role 10:48
jnthn m: m: role F[::F, ::A, ::B] { -> ::FA, ::FB { sub map(:(A --> B), FA --> FB) { } }(F.^parameterize(A), F.^parameterize(B)) }
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot put required parameter after variadic parameters
at <tmp>:1
------> 3-> ::FA, ::FB { sub map(:(A --> B), FA -7⏏5-> FB) { } }(F.^parameterize(A), F.^para
jnthn Ah, hmm 10:49
Ven`` m: role F[::T, ::A] { say "hello"; }; role F[List, ::A] { say "A"; }; F[List, Int]; 10:52
camelia WARNINGS for <tmp>:
Useless use of constant value F[List, Int] in sink context (line 1)
Ven`` m: role F[::T, ::A] { say "hello"; }; role F[List, ::A] { say "A"; }; F[List, Int].new;
camelia A
Ven`` m: sub f(:(::A --> ::B) $f, A $a --> B) { $f($a) } 10:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed parameter
at <tmp>:1
------> 3sub f(:(::A --> ::B)7⏏5 $f, A $a --> B) { $f($a) }
expecting any of:
constraint
piojo Would anyone else like to try to see if IO.slurp is not threadsafe on their computer, or if it's just me? I posted a testcase here: gist.github.com/lefth/6d71ca714ca2...1ceb41334d 11:06
Ven`` m: role F[::F, ::A, ::B] { -> ::FA, ::FB { sub map(&a:(A --> B), FA --> FB) { } }(F.^parameterize(A), F.^parameterize(B)) } 11:07
camelia ( no output )
piojo It needs to be run several times to throw an exception, so I'm running it in a loop: while perl6 concurrency-test.p6 .; do :; done
Ven`` jnthn: I just had a brainfart ^ seems like it might work!
piojo And I'm running it in a rather big directory, on an SSD so the test goes faster. 11:08
I also put in some (commented out) lines that just open a file and call .lines.cache, .close to show that that seems to work. It's something specific in slurp() that causes the problem.
Ven`` m: role F[Array, ::A, ::B] { sub map(&a:(A --> B), Array[A] $a --> Array[B]) { Failure.new } }; F[Array, Int, Str](*.Str, 5); 11:11
camelia Cannot invoke this object (REPR: Uninstantiable; )
in block <unit> at <tmp> line 1
Ven`` jnthn: ^
the error is LTA 11:12
Ven`` should maybe say something about CALL-ME? 11:13
m: role F[Array, ::A, ::B] { method m(&a:(A --> B), Array[A] $a --> Array[B]) { Failure.new } }; F[Array, Int, Str].new.m(*.Str, 5); 11:14
camelia No such method 'ACCEPTS' for invocant of type 'A'
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
Ven`` m: role F[Array, ::A, ::B] { method m(&a:(A --> B), Array[A] $a --> Array[B]) { Failure.new } }; F[Array, Int, Str].new.m(*.Str, Array[Int].new(5))
camelia No such method 'ACCEPTS' for invocant of type 'A'
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo <ZzZombo> Shouldn't github.com/rakudo/rakudo/blob/nom/.../ChangeLog use the `.md` extension in order to use Markdown syntax highlighting? 11:15
araraloren I don't think ChangeLog can use markdown syntax, it has its own format 11:20
sproctor moritz: I got a version of my Breakable timer working without race conditions. Sort of. It's got a class and atomicint flags... but it does what I wanted. So that's nice. 12:18
moritz sproctor: great! Will you release it as a module? 12:20
wander quite curious about what LTA stands for
moritz LTA = Less Than Awesome 12:21
wander .
sproctor moritz: Well I'm working on a module at the moment to wrap IO::Notifcations and add some info and I was needing it for that. But... I could make it stand alone. I might want to tidy it up a bit more... 12:22
But yeah. Why not it's useful. I think.
Plus I need to fix the construtor. Currently you do Timer.new().start() which is a bit pants. But I'll get the first version in github on my lunch break. 12:24
sproctor github.com/Scimon/Timer-Breakable So I'm letting the Travis job(s) run and then I may upload this. CPAN is the preferred option now right? 13:41
More tests required. Comments and critiques welcome.
(Helps if I turn on Travis of course) 13:43
lizmat .tell Garland_g[m] testing a fix for your problem 13:45
yoleaux lizmat: I'll pass your message to Garland_g[m].
[Coke] lizmat++ weeklies again. I can barely review irc at this point. :) 13:48
lizmat .tell Garland_g[m] github.com/rakudo/rakudo/commit/3cba620404 13:56
yoleaux lizmat: I'll pass your message to Garland_g[m].
sproctor So, Travis passed and I figured it's a 0.0.1 build. Might as well release it and let people kick the tyres. (Plus... I'm kind of terrified of releasing a module and I figured if I didn't do it now I'd keep putting it off). 14:04
So, My First CPAN Module. That's cool.
buggable New CPAN upload: Timer-Breakable-0.0.1.tar.gz by SCIMON cpan.metacpan.org/authors/id/S/SC/...0.1.tar.gz 14:13
sproctor :D 14:14
sena_kun sproctor++ 14:18
sproctor It needs some testing especially race condition testing. (Which I've done locally but writing them for unit tests is going to be fun). 14:20
geospeck which tool do you recommend for creating the skeleton of a module? App::Mi6 ... 14:36
sproctor That's what I used :) 14:37
geospeck :+1: 14:41
sproctor Need to get my head around the .pause file (I just manually updloaded the tar ball from mi6 dist) 14:45
timotimo the format is just
user SPROCTOR
password foobarbaz
sproctor Just those? 14:46
timotimo no piece of documentation exists to tell you this m(
sproctor I wasn't sure on the format. Cool.
ilmari sproctor: metacpan.org/pod/distribution/CPAN...FIGURATION 14:48
sproctor ilmari++
ZzZombo ?? 14:50
m: dd :a<b>
camelia block <unit>()
timotimo dd doesn't take named arguments 14:52
m: dd
camelia block <unit>()
timotimo m: dd (:a<b>) 14:53
camelia :a("b")
ZzZombo dd dd 14:53
m: dd dd
camelia block <unit>()
Nil
ZzZombo m: dd &dd 14:54
camelia Sub dd = sub dd (| is raw) { #`(Sub|46714608) ... }
ZzZombo shouldn't it throw/warn for no argument?
timotimo it could 14:55
wait, you mean no argument 14:56
no, it's for printing out where in the code you are
m: sub blah { bloop }; sub bloop { dd }; blah;
camelia sub bloop()
araraloren m: dd
camelia block <unit>()
timotimo m: sub blah { dd; bloop; dd }; sub bloop { dd }; blah; 14:57
camelia sub blah()
sub bloop()
sub blah()
araraloren I have not seen this use before. 15:00
timotimo a not very known feature
of course dd is a rakudo-only thing, not a perl6 feature
araraloren So in Perl6 how can we dump a object ? 15:01
.perl ?
m: say &dd.perl
camelia sub dd (| is raw) { #`(Sub|51740496) ... }
timotimo sure 15:02
timotimo dd has the benefit of also printing out what var was passed 15:02
m: my Str $foo = "hello"; dd $foo
camelia Str $foo = "hello"
araraloren m: my Str $foo = "123"; say $foo.perl 15:03
camelia "123"
araraloren and the type :) gotta sleep, Good Night 15:03
Geth marketing: d979039e6c | (Zoffix Znet)++ | 4 files
Update "Introducing Perl 6" brochure

  - Incorporate feedback from woolfy
  - Fix errors reported on GitHub
  - Generate print-quality PDF with bleeds
15:13
Geth marketing: 71c3ed5ea5 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
Link to Camelia's terms of use
15:28
sproctor (So it turned out I'd commented out some tests while I was trying to get vows to work and 0.0.1 still had them commented out. I figured this was a great chance to test out the .pause file and mi6 upload.) 15:45
buggable New CPAN upload: Timer-Breakable-0.0.2.tar.gz by SCIMON cpan.metacpan.org/authors/id/S/SC/...0.2.tar.gz 15:53
jdv79 m: class A { has %!h; method foo { if ! %!h{"b"}:exists {} } }; say A.new.foo 16:01
camelia Unexpected named argument 'exists' passed
in method foo at <tmp> line 1
in block <unit> at <tmp> line 1
jdv79 what is going on there?
timotimo you need parens around that part 16:02
adverbs like that attach to the "outermost operator" before them
for some reason
jdv79 wut
haha. o. k.
timotimo you're passing :exists to prefix:<!>
jdv79 lovely
thanks 16:03
that's not confusing or anything for a newbie
timotimo totally
jdv79 maybe the error messaage could say what callable the "named arg" is being attached to
timotimo that would be good, yeah 16:06
BBL
lizmat but hard, looking at BOOTSTRAP, line 642
at that point, apparently it only knows about the capture and the signature 16:07
nothing about the object it is being attached to
jdv79 hmm:(
Ulti m: say [Nil].pick; say [].pick 16:09
camelia (Any)
Nil
jnthn We should fix Backtrace.pm 16:10
lizmat Ulti: nice catch
jnthn: what's wrong with it ?
[Coke] m: say [Nil].perl;
camelia [Any]
Ulti the thing is this though:
m: say [1,2,Nil,3] 16:11
camelia [1 2 (Any) 3]
jnthn lizmat: It strips out the name of call where the error was thrown, because it's in CORE.setting
Ulti you sort of do want it... 16:11
jnthn lizmat: If it didn't do that, then it would be clear it was prefix:<!> that couldn't receive the arg
[Coke] Ulti: yah, it looks funny, but it seems to follow the rules.
lizmat Ulti: I think [] is to be a shortcut for Array.new() 16:12
which implies Any as the default value
Ulti [Coke]: yeah its just I am wondering what those rules are with a list with a single value thats Nil it feels like the Nil ness might want to spread a bit more
lizmat m: my @a is default(Nil) = 1,2,Nil,4; dd @a
camelia Array @a = [1, 2, Nil, 4]
Ulti o___O now that does surprise me 16:13
lizmat m: dd :[Nil]
camelia [Any]
Ulti m: my @a is default(Nil) = []; dd @a
camelia Array @a = []
Ulti ok thats at least sane 16:13
Ulti but yeah this comes to me playing in Python where their random.choice([]) explodes with an exception because None could be a value of the list and I wondered about Perl 6 and thought well [].pick returning Nil was ok because Nil can't be in the list and thats why [Nil].pick made sesne 16:15
Ulti but that default Nil scares me 16:15
Ulti it breaks that logic 16:16
so I think that might be the broken thing here
though you did sort of ask to shoot yourself in the foot
comborico1611 Hello, all. 16:20
Ulti hi 16:22
lizmat Ulti: yeah, but we do need "is default(Nil)" for those cases we actually want to pass on a Nil value 16:27
timotimo jdv79: don't forget there's also :!exists as well as unless 16:28
scimon Have you ever had a filling fall out? Currently finding Timer::Breakable a bit like that. Third version uploaded... I'll go clean up my PAUSE account in a sec. But this one has a proper constructor. 17:19
scimon Definitely last change today. 17:20
[Coke] I don't understand the reference, but yes, I have had a filling fall out. Most disconcerting. 17:22
scimon When I had it happen I couldn't help poking the hole with my tongue. Over and over. 17:23
So Whilst I'm supposed to be workign through a pile of BAU tickets my brain kept wandering back to this.
buggable New CPAN upload: Timer-Breakable-0.1.0.tar.gz by SCIMON cpan.metacpan.org/authors/id/S/SC/...1.0.tar.gz
scimon Anyhoo. Signing off for today. 17:24
lizmat scimon++ 17:42
ryn1x_ Trying to learn OO in Perl6. I get an error: "Cannot look up attributes in a MC::Aero type object" with this short code example: pastebin.com/98pK6bh9 . What am I doing wrong? 17:50
geekosaur 'type object' means you have an undefined value instead of an object 17:51
wander rynlx_: what is the whole project? 17:52
[Coke] ryn1x_: that code compiles fine here.
lizmat ryn1x_: Is there an Aero.new in your code?
wander this pm6 file itself don't raise exception
geekosaur right, it'll happen when making the object because no guarantees as ti what's initted in what order? 17:53
wander so maybe the code using this module is wrong
lizmat ryn1x_: if there's no "Aero.new" in your code, then that's the problem 17:54
raiph ryn1x_: Do the :D / :U type "smileys" make sense to you?
ryn1x_ I have a Aero.new... let me pastebin the code calling this module.. 17:54
pastebin.com/hmVc4J5g 17:55
ryn1x_ I get OK 1; OK 2; then the error "Cannot look up attributes in a MC::Aero type object" 17:56
[Coke] ;last line should be $pi.close, probably 17:57
perlpilot yep
[Coke] you're calling .close on the type object.
ryn1x_ Shoot... that was dumb.. I was renaming things and called close on the class not the new object... 18:00
raiph ryn1x_: imo it's important that you ask more questions until the error message makes 100% sense to you 18:04
lizmat dinner& 18:14
ryn1x_: method close(Aero:D:) { # <-- would ensure it can only be called on an instance 18:16
in which case the error would have been:
Invocant of method 'a' must be an object instance of type 'Aero', not a type object of type 'Aero'. Did you forget a '.new'? 18:17
s/a/close
really dinner&
[Coke] I wonder if we should add syntax support for class vs. instance methods. 18:25
so that "class method barf" would only work on :U, e..g
er, e.g.
Garland_g[m] .tell lizmat[m] Thanks. 18:35
yoleaux Garland_g[m]: I'll pass your message to lizmat[m].
13:45Z <lizmat> Garland_g[m]: testing a fix for your problem
13:56Z <lizmat> Garland_g[m]: github.com/rakudo/rakudo/commit/3cba620404
[Coke] ... oh, right, I can probably put that in a module. :| 18:36
[Coke] adds that to the pile!
El_Che is reading this: www.reddit.com/r/perl/comments/7bm...or_perl_6/ 19:08
El_Che as a user of both langs :) 19:09
teatime that's a more interesting iteration of that question than usual 19:10
he probably really would be better served by python for his uses, but I feel him 100% on preferring the perl style, regexes, and one-liners 19:11
it says he already knows C and Haskell. I've set out to learn Haskell like thrice and haven't succeeded yet. 19:12
El_Che he'll end up with quite a few extra languages :) 19:13
geekosaur this is not necessarily a bad thing
El_Che it's a good thing 19:14
ryn1x_ Thanks for the tip lizmat 19:15
El_Che chromatic joined the discussion :)
ryn1x_ Is there a conventional way to implement a timeout for IO::Socket::INET since it is not built in?
steeznson hello all, I am currently trying to write a regex matching letters, unicode, whitespace and punctuation. So far I have: my $regex = regex { <:N + :L + [\s\t\n] + [!..?]>+} . Which smart matches with "Hello, world!" but does not work as a regex in my grammar. anyone have any ideas?
geekosaur steeznson, why wouldn;t you just declare it as a regex method outright, so you can use it with <foo> ? 19:17
regex whatever { <:N + :L + [\s\t\n] + [!..?]>+ } 19:18
steeznson I am declaring it as a regex method outright, in my grammar it has `regex foo { <:N + :L + [\s\t\n] + [!..?]>+}`, I was just making it easy to copy into the interactive shell 19:19
geekosaur you probably want rx instead of regex
you have set $regex to a code object
steeznson ah i'll try that
geekosaur you;d have to invoke it as $regex.() and I'm not sure how youd best do that inside of a grammar, aside from <{ }> 19:20
steeznson so is rx a method of regex?
ryn1x_ Maybe I should use this: docs.perl6.org/routine/anyof with my socket methods? Best way to implement a timeout? 19:21
steeznson i'll have a look at the docs again, thanks for the hint geekosaur 19:22
geekosaur basically regex {} is a subclass of sub {}
ryn1x_, I think you want something related to Promises
moritz geekosaur: actually, regex {} is a subclass of method {} 19:25
m: say Regex.^mro
camelia ((Regex) (Method) (Routine) (Block) (Code) (Any) (Mu))
geekosaur mm, right
in any case it's still nto simply a quoted regex, it's a chunk of code that must be run somehow. smartmatching a Code evaluates it; simply naming it inside a grammar doesn't 19:26
ufobat_ is this document still up to date? github.com/rakudo/rakudo/blob/mast...windows.md because i can't get rakudo compiled on my windows vm 19:32
Geth mu: koorchik++ created pull request #28:
Update schedule: "Language Independent Validation Rules (LIVR) for Perl6"
19:41
Geth mu: a29a0cacbc | (Viktor Turskyi)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Update schedule
19:45
mu: 0788eaba42 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
Merge pull request #28 from koorchik/patch-1

Update schedule: "Language Independent Validation Rules (LIVR) for Perl6"
piojo_ ‎ufobat_: I built many times on Windows 10 (not a VM, just Windows), and those commands look strange to me 20:03
I compiled with the same commands the linux build is compiled with
But I did have to create a copy or link so "gmake" could be invoked as "make"
I don't believe the compilation used Visual Studio in any way--just Strawberry Perl and possibly some bit or piece from MSYS, which also supplied a compiler (which I also had installed) 20:05
geekosaur rakudo can be built either way 20:06
El_Che ufobat_: may I be so bold to ask you to document your finding? I also want to look once I have some time 20:19
raiph .tell zoffix "We know 6d will have an alias. What if that alias was the brand alias that we chose to promote?" www.reddit.com/r/perl6/comments/78...l/dptlagj/ 20:24
yoleaux raiph: I'll pass your message to zoffix.
El_Che dunno why, but Rakudo grew on me (I know about the lang/impl difference, but that's a problem for later when there are 39 competing implementations :) ) 20:26
teatime hrm, how many discrete steps are there between 0.0 and 1.0 in a double 20:33
moritz on the order of 2**63 20:34
no, that can't be right
but, well, quite a few :-)
teatime yar, looks like the answer is "plenty", for my needs 20:36
piojo_ floating point is the gift that keeps on giving
You really only need to understand it so infrequently that after you look up the docs and learn what you need, you can forget it again. 20:37
So you'll have the pleasure of learning it over and over again :)
lizmat
.oO( like pack/unpack parameters in P5 :-)
20:37
teatime piojo_: I do that with so many things 20:38
luckily they are much faster to learn subsequent times 20:39
moritz teatime: ok, at least 2**52 20:41
the 64 bit of a double are sign + 11 bits exponent + 52 bits significand 20:42
and the for one exponent that signfies the range from 0 to 1, there are 2**52 possible cases for the significand 20:43
teatime yup
which is def. plenty
moritz and then there can be degenerate cases, where the exponent is smaller, but still lands you in that range
piojo_ @raiph I'd rather Perl 6 have an alias than just 6.d. People don't understand that treating perl 5 and 6 as though they were the same is like mixing up c and c++/STL/boost 20:46
ufobat_ El_Che, it worked for me on the 2nd time :-( uninstalled basically every VS software, perl, git, and reinstalled it
El_Che, i just had *more* stuff on in before, where it didnt work
El_Che, so.. guide works
piojo_, does strawberry ship a gcc and stuff, yeah probably for xs modules.. 20:47
piojo_ ‎ufobat_‎ I'm about 99% sure it does, but I'm on a linux computer at the moment 20:48
ufobat_ windows is full of mysteries to me 20:49
ugexe what windows problem? 20:51
piojo_ my SSD is so full of windows :'( 20:52
good night, folks 20:53
ugexe i had entire process automated including installing visual studio 2017 community but switched to a windows image that already includes it 20:54
but you have to be sure to use the right VS tools command prompt (not cmd.exe), or run C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 (or wherever this is for your system) if you want to use cmd.exe 20:55
ufobat_ spectests are running now, i am happy :)
ugexe otherwise you can run into mixed up compiler stuff 20:56
ufobat_ i haven't had this file on my disk, i mean the SetEnv.cmd
ugexe if you have VS you should I think
ufobat_ let me see if it is there now
ugexe it might be in a different path though, naturally they make it impossible to programtically guess it 20:57
ugexe its based on windows ver -and- vs version 20:57
ufobat_ nope i still coudn't find it 20:58
Zoffix raiph: I don't understand the question 21:08
yoleaux 20:24Z <raiph> Zoffix: "We know 6d will have an alias. What if that alias was the brand alias that we chose to promote?" www.reddit.com/r/perl6/comments/78...l/dptlagj/
El_Che Zoffix: I understand as chaning name every release. Something like debian codenames? 21:09
Zoffix raiph: oh, you mean using the language version's name as a name for the language?
lizmat
.oO( Divali Perl 6 )
21:10
Zoffix So every year all blog authors and book authors and resume writers would edit their work for the new name? Don't really see it as a viable or desirable path
El_Che there goes our google raring
lizmat
.oO( many small rankings make one big one )
21:11
oh, eh, not
Zoffix "Yes, I know 12 programming languages...." 21:12
El_Che using the release name in combination with, let's say "Rakudo", could work (again, like Debian)
ryn1x_ if I have method a() {} how can I method b() {do things; return a();} I get a file not found error... is there a special syntax for calling a method from a new method in the same class? 21:21
timotimo you want to return self.a() 21:22
ryn1x_ thanks timotimo, that worked 21:24
Garland_g[m] I've been looking at the naming thread that was posted. I actually really like the idea of naming it after a butterfly, so I went looking for butterflies that had a similar pattern to Camelia. I found this: en.wikipedia.org/wiki/Aglais_io 21:40
comborico1611 It's almost supper time! 23:00
ivans it usually is, somewhere 23:03
here it's 6am :D 23:04
comborico1611 Ah, no. You think to globally. 23:05
comborico1611 Too* 23:05
comborico1611 Ivans, let me guess. Russia? 23:06
ivans it's where I'm from 23:07
but right now I'm in vietnam
comborico1611 You must be in China then.
Wait. No you need to be more there other direction.
Hawaii?
Hmm. I thought you'd be two hours behind if you were there. 23:08
The Vietnamese make great shoes! Ever heard of Vibram toe shoes? 23:09
ivans I don't think I have!
it's all slippers here
comborico1611 Best shoes I've ever worn.
comborico1611 Vibram makes the inner sole for many shoes, as well. 23:09
South Vietnam? 23:10
ivans yea 23:11
comborico1611 And you speak Vietnamese? 23:11
ivans not at all, I'm here just temporarily 23:12
I do speak Khmer though :p
comborico1611 Never heard of it!
I use to take pride in my knowledge of the 10 most spoken languages. 23:13
ivans the language of Cambodia
10, that's quite a number
comborico1611 It's an eye-opening list.
Also i use to know all the nations of the world.
I probably can still nail most of them. 23:14
ivans I know 300 digits of pi, for what it's worth
south-east asia is like a second home by now
comborico1611 Heh. Reminds me of math geek movies. That's always in there -- how far they can go to pi. 23:15
But 300 digits is crazy.
I'm amazed what the mind can do. 23:16
comborico1611 Ivans, it sounds like your the adventurer type. 23:17
You're
ivans yeah, most certainly
it's why I'm in #perl6 :D
El_Che fedora 27 is out, pkgs being built as we speak 23:18
comborico1611 I remember i tried to install red hat 6? I failed. 23:19
I hate traveling. I hate adventures.
comborico1611 How long have you been with Perl6? 23:20
ivans I used pugs for some simple things 10 years ago
I've read the mailing list on and off
getting more into it again 23:21
comborico1611 I see. But i mean Perl6, not Perl.
El_Che comborico1611: pugs was perl6 23:22
comborico1611 Do you ride a nice bicycle or motorcycle there in SE Asia?
Hmm! Haven't read that before. So he was following for a long time.
El_Che (en.wikipedia.org/wiki/Pugs_(programming)) 23:23
I drove a bellorussian bike on the mountains in Vietnam
it was fun :)
ivans it was "the" perl6 for a short while
motorcycle for me mostly
comborico1611 I love motorcycles. But too dangerous here in America.
El_Che comborico1611: we got a ministre out of it 23:24
the first perl6 ministre in history
comborico1611 Do you ride in the rain?
ivans with perl5 I've been since 1990's
El_Che comborico1611: en.wikipedia.org/wiki/Audrey_Tang
ivans most rains are fairly short so I avoid them when I can 23:24
the rainy season basically means lots of short bursts of rain
now the dry season is coming so there won't be much rain at all for a while 23:25
but when I have to, I can hold an umbrella while riding :D
comborico1611 Haha.
ivans or wear a raincoat
comborico1611 I must go. Thank you, Che, for the links!
ivans have a good morning/day/night
El_Che see you 23:27
For whoever is concerned, Fedora27 packages online: nxadm.github.io/rakudo-pkg/ 23:29