Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-01-29

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 avuserow joined #perl6
00:13 cale2 joined #perl6
00:22 bjz joined #perl6
00:25 cale2 Hey, was there ever a discussion about running perl6 on erlang's BEAM vm?
00:32 b2gills I don't recall that ever being discussed
00:35 TimToady I did have dinner with Joe Armstrong several times last year :)
00:35 TimToady but we mostly didn't talk shop...
00:37 cale2 Joe seems extremely charismatic in his talks
00:38 b2gills After taking a quick look, it looks like there would have to be a VM on top of BEAM to support the mutable nature of Perl 6
00:38 cale2 I know Lisp Flavored Erlang can use objects. Would be interesting to look into
00:39 wamba joined #perl6
00:39 cale2 How do you actually "target" a VM?
00:40 cale2 You just write code that parsers perl6 and turns it into VM bytecode?
00:41 b2gills You get nqp running on it. Then you get nqp compiling itself, Then you get nqp to compile Rakudo
00:44 cale2 Oh! So NQP exists to make this task more simple. Because the bridge from NQP to Rakudo already exists?
00:51 wamba joined #perl6
00:53 perlawhirl joined #perl6
01:02 MasterDuke cale2: yep. that's why the JVM and JS backends are mostly done in nqp
01:05 TimToady MasterDuke: you might check to see if find_symbol is running quite so hot now
01:05 MasterDuke nice, i'll run another profile
01:12 SmokeMachine i have: has $.my-attr is rw; and I want to .wrap() the my-attr method, but only setting a value ($obj.my-attr = 42) but not when getting (say $obj.my-attr)... is that possible?
01:13 brokenchicken Yes, write your own accessor
01:13 SmokeMachine I wanna do something like ".is-dirty()" method on attributes of my class... (applied by a role...)
01:13 brokenchicken Ah, OK
01:14 brokenchicken No idea
01:15 SmokeMachine I mean: class C does Dirtabble {has $.my-attr is rw}; my $c = C.new; $c.my-attr = 42; $c.dirty-attrs # my-attr
01:16 timotimo possible, but a bunch of work :)
01:16 SmokeMachine I thought something like mixing AttributeHow and wrap set_value...
01:16 timotimo no, that won't help
01:17 timotimo setting the value of an attribute hardly ever goes through set_value
01:17 timotimo ... at least i think so?
01:17 TimToady I believe that's correct
01:17 perlawhirl joined #perl6
01:17 timotimo you can run a piece of code early at compose time that'll go through all attributes and generate an accessor method for you
01:17 timotimo it'd use a proxy with a simple FETCH and a complex STORE
01:17 kurahaupo joined #perl6
01:18 SmokeMachine I think I already so a code like that many years ago... but I don't remember if it was a perl6 example or a Moose's code... :(
01:18 SmokeMachine timotimo: I tried that... but I got a infinite loop...
01:18 kurahaupo joined #perl6
01:18 timotimo i'd ask to see your code but i'm on my way to bed :)
01:19 SmokeMachine https://www.irccloud.com/pastebin/aT82QkxL/
01:19 SmokeMachine timotimo: sorry, I did send before read... good night!
01:20 timotimo maybe it jumps out at me
01:20 timotimo attr-columns? that's new to me
01:20 geekosaur joined #perl6
01:20 SmokeMachine thats my method...
01:20 timotimo oh, ok
01:21 timotimo does that already work at that time?
01:21 timotimo since the class isn't composed yet
01:21 SmokeMachine Im grepping all attires that does a specific role...
01:21 timotimo ah
01:21 timotimo at what exact point does it loop?
01:21 SmokeMachine I did a method, not a phaser... so Im just calling that method to test...
01:21 timotimo does it infinispam STORE or FETCH?
01:22 SmokeMachine FETCH
01:22 kurahaupo joined #perl6
01:22 timotimo hm, well ... you're just wrapping the methods, so it doesn't have to happen so early
01:23 SmokeMachine its happening when I try to get the value...
01:23 timotimo i'd say nextsame isn't targeting the right thing
01:23 timotimo because you're already in the FETCH method
01:23 SmokeMachine it can strores, but loops on fetching...
01:23 timotimo so you're trying to reach the next FETCH method
01:23 timotimo i'm not sure if you can have it output the state and full contents of the dispatcher from inside that method
01:24 SmokeMachine shouldn't be the samo with the store?
01:24 timotimo also, i never put "method" into proxy
01:24 timotimo yeah, that part is weird.
01:24 SmokeMachine it doesn't work with sub...
01:24 timotimo it could very well be that STORE isn't doing what you want at all
01:24 timotimo since you can't check
01:24 timotimo why doesn't it work?
01:24 timotimo oh, and also:
01:25 timotimo you can't just store the dirtyness on the attribute itself
01:25 timotimo that's shared between all instances
01:25 timotimo instead, you can give the class a private attribute that you mix in with the role that can store dirty bits for you
01:25 SmokeMachine m: my $a := Proxy.new: FETCH => sub {}, STORE => sub {}; $a = 42
01:25 camelia rakudo-moar dd514d: OUTPUT«Too many positionals passed; expected 0 arguments but got 2␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:25 timotimo well, of course
01:26 timotimo m: my $a := Proxy.new: FETCH => sub fedch {}, STORE => sub stoar {}; $a = 42
01:26 camelia rakudo-moar dd514d: OUTPUT«Too many positionals passed; expected 0 arguments but got 2␤  in sub stoar at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:26 timotimo m: my $a := Proxy.new: FETCH => sub fedch {}, STORE => sub stoar(|c) { say c.perl}; $a = 42
01:26 camelia rakudo-moar dd514d: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub fedch at <tmp> line 1␤  in sub stoar at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:26 timotimo m: my $a := Proxy.new: FETCH => sub fedch(|c) { say c.perl }, STORE => sub stoar(|c) { say c.perl}; $a = 42
01:26 SmokeMachine timotimo: that makes sense! i can't store that on the attribute! :(
01:26 timotimo interesting, that also infiniloops?
01:27 camelia rakudo-moar dd514d: OUTPUT«(timeout)»
01:27 timotimo ah, hahahaha
01:27 timotimo am i trying to output the self, which is the proxy, and so it fetches?
01:27 timotimo anyway, a bit too tired to continue this now
01:28 brokenchicken m: my $a := Proxy.new: FETCH => method(|c) { say c.perl }, STORE => method (|c) { say c.perl}; $a = 42
01:28 camelia rakudo-moar dd514d: OUTPUT«5===SORRY!5===␤Word 'method' interpreted as 'method()' function call; please use whitespace around the parens␤at <tmp>:1␤------> 3my $a := Proxy.new: FETCH => method7⏏5(|c) { say c.perl }, STORE => method (|c␤Unexpected block in infix pos…»
01:28 SmokeMachine timotimo: thanks so much!
01:28 timotimo oh btw
01:28 brokenchicken m: my $a := Proxy.new: FETCH => my method(|c) { say c.perl }, STORE => my method (|c) { say c.perl}; $a = 42
01:28 camelia rakudo-moar dd514d: OUTPUT«5===SORRY!5===␤Type 'method' is not declared. Did you mean 'Method'?␤at <tmp>:1␤------> 3my $a := Proxy.new: FETCH => my method7⏏5(|c) { say c.perl }, STORE => my method ␤Malformed my␤at <tmp>:1␤------> 3my $a := Proxy.new: FETCH => …»
01:28 timotimo do you know of perl6-all-modules?
01:28 brokenchicken huh
01:28 SmokeMachine timotimo: sorry, was that for me?
01:29 SmokeMachine m: my $a := Proxy.new: FETCH => my method (|c) { say c.perl }, STORE => my method (|c) { say c.perl}; $a = 42
01:29 camelia rakudo-moar dd514d: OUTPUT«\(42)␤»
01:29 timotimo hm. it doesn't find anything really interesting
01:29 SmokeMachine brokenchicken: ^
01:30 brokenchicken Ah right
01:30 timotimo jonathanstowe/AccessorFacade/lib/AccessorFacade.pm
01:30 timotimo might be interesting
01:32 SmokeMachine timotimo: that is!!! thanks!
01:32 timotimo eco AccessorFacade
01:32 timotimo um
01:32 timotimo buggable: eco AccessorFacade
01:33 buggable timotimo, AccessorFacade 'Provides a method trait to turn indivdual get/set subroutines into a single attribute': https://github.com/jonathanstowe/AccessorFacade
01:33 timotimo i need a bot that can tell me which other bot can do what command
01:35 TimToady .oO(How much bot would a bot bot bot if a bot bot could bot bot?)
01:40 timotimo gnite
01:40 TimToady o/
01:40 pyrimidine joined #perl6
01:40 brokenchicken night
01:41 SmokeMachine night
01:48 Ben_Goldberg joined #perl6
01:52 ggoebel joined #perl6
01:58 BenGoldberg joined #perl6
02:05 sammers hi #perl6
02:06 cale2 hey sammers
02:07 sammers hi cale2, guess everyone is sleeping
02:07 cale2 possibly lol
02:07 cale2 I'm going through this forth tutorial http://skilldrick.github.io/easyforth/
02:07 cale2 quite bizarre
02:08 evalable6 joined #perl6
02:09 unicodable6 joined #perl6
02:09 committable6 joined #perl6
02:09 benchable6 joined #perl6
02:09 bisectable6 joined #perl6
02:09 statisfiable6 joined #perl6
02:09 sammers cale2, how do you like it so for?
02:09 kalkin- joined #perl6
02:09 cale2 sammers: It's a really cool way to think about lower level programming. much more approachable than assembly IMO
02:13 aborazmeh joined #perl6
02:13 aborazmeh joined #perl6
02:13 BenGoldberg cale2, Forth is similar to ... basically every other stack oriented programming language in the world.  Postscript and befunge come to mind.
02:14 BenGoldberg And dc.
02:14 sammers cale2, maybe you can write a Forth interpreter for p6. I think there was written in p5.
02:14 BenGoldberg And lots and lots of others, but that's just off the top of my head.
02:18 cale2 sammers I was thinking about that actually. But how do you go from a p6 grammar to executing code? O.o
02:19 cale2 I guess you would parse each thing, be it a word or number, etc. Then maybe you'd use the p6 meta object to construct objects for each item that you parse?
02:19 MasterDuke TimToady: nice! looks like find_symbol went from 3rd to 4th with a definite exclusive time decrease. https://gist.github.com/MasterDuke17/faf9f7d0221529dc99b256f35baaf963
02:20 MasterDuke cale2: https://github.com/edumentab/rakudo-and-nqp-internals-course
02:21 MasterDuke has examples of creating toy interpreters
02:22 SmokeMachine m: my $a; sub a () is rw {$a}.wrap: sub () is rw {say "wrap"}; a() = 2; say $a # am I doing something wrong?
02:22 camelia rakudo-moar dd514d: OUTPUT«2␤»
02:22 cale2 MasterDuke: thanks!
02:23 SmokeMachine shouldn't that say wrap and die?
02:24 SmokeMachine m: my $a; my $b; sub a () is rw {$a}.wrap: sub () is rw {say "wrap"; $b}; a() = 2; dd $a, $b # am I doing something wrong?
02:24 camelia rakudo-moar dd514d: OUTPUT«Int $a = 2␤Any $b = Any␤»
02:24 SmokeMachine shouldn't $a == Any and $b == 2?
02:25 bjz joined #perl6
02:25 SmokeMachine m: use Test; my $a; my $b; sub a () is rw {$a}.wrap: sub () is rw {say "wrap"; $b}; a() = 2; is $a, Any; is $b, 2
02:25 camelia rakudo-moar dd514d: OUTPUT«not ok 1 - ␤␤# Failed test at <tmp> line 1␤# expected: (Any)␤#      got: '2'␤not ok 2 - ␤␤# Failed test at <tmp> line 1␤# expected: '2'␤#      got: (Any)␤»
02:37 BenGoldberg m:  my $a; my $b; sub a () is rw {$a}.wrap: sub () is rw {say "wrap"; $b}; a() = 2; dd $a; dd $b;
02:37 camelia rakudo-moar dd514d: OUTPUT«Int $a = 2␤Any $b = Any␤»
02:39 SmokeMachine BenGoldberg: seems wrong, isn't it?
02:39 BenGoldberg It does.
02:39 SmokeMachine is that a bug?
02:40 BenGoldberg m:  my $a = 2; my $b; sub a () {$a}.wrap: sub () {say "wrap"; $b}; dd a(); dd $a; dd $b;
02:40 camelia rakudo-moar dd514d: OUTPUT«2␤Int $a = 2␤Any $b = Any␤»
02:41 brokenchicken m:  my $a; my $b; sub a () is rw {$a}; &a.wrap: sub () is rw {say "wrap"; $b}; a() = 2; dd $a; dd $b;
02:41 camelia rakudo-moar dd514d: OUTPUT«wrap␤Any $a = Any␤Int $b = 2␤»
02:46 SmokeMachine m: say sub a () is rw {}.wrap: sub () is rw {}
02:46 camelia rakudo-moar dd514d: OUTPUT«Routine::WrapHandle.new␤»
02:46 SmokeMachine it "thinks" it was wrapped...
02:46 z8 joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 cale2 how do you explain the difference between a SORRY! error and a runtime error?
02:48 cale2 "could not find symbol" is runtime error, right?
02:50 geekosaur it's sometimes possible to provoke that at compile time (say, by using a phaser in an unexpected place so compiling the phaser tries to reference the wrong scope; admittedly these usually indicate compiler bugs, or at least LTA errors)
02:52 brokenchicken m: my $z = sub a {say "hi"}; dd $z; $z.wrap: sub {say "bye"}; a
02:52 camelia rakudo-moar dd514d: OUTPUT«Sub $z = sub a () { #`(Sub|78545376) ... }␤hi␤»
02:52 brokenchicken m: my $z = sub a {say "hi"}; dd $z === &a
02:52 camelia rakudo-moar dd514d: OUTPUT«Bool::False␤»
02:52 brokenchicken m: my &z = sub a {say "hi"}; dd [&z, &a]
02:52 camelia rakudo-moar dd514d: OUTPUT«[sub a () { #`(Sub|65954840) ... }, sub a () { #`(Sub|65954992) ... }]␤»
02:54 brokenchicken m: my &z = multi a {say "hi"}; multi a is default {say "bye"}; z; a
02:54 camelia rakudo-moar dd514d: OUTPUT«hi␤bye␤»
02:54 cale2 geekosaur: Reason I ask is page 34 in this PDF https://cloud.github.com/downloads/perl6/book/2012.05.23.a4.pdf
02:54 cale2 page 28 in book pages
02:54 brokenchicken So my understanding is the sub {}.wrap doesn't work because that sub object is just for that particular sub, while &foo has all the dispatcher info and stuff, which is what .wrap wants
02:55 cale2 The top example fails to compile, while the bottom fails at runtime.
02:55 cale2 You should be able to determine both at compile time
02:56 Cabanossi joined #perl6
02:56 brokenchicken m: my $z = sub a {say "hi"}; $z.wrap: sub { say "bye" }; $z()
02:56 camelia rakudo-moar dd514d: OUTPUT«bye␤»
03:04 sammers joined #perl6
03:15 Geth doc: WildYorkies++ created pull request #1167: unicode quotes messes up syntax highlighting
03:15 Geth doc: review: https://github.com/perl6/doc/pull/1167
03:16 brokenchicken cale2: messing up syntax highlighting where?
03:17 cale2 https://docs.perl6.org/type/Sub
03:17 brokenchicken Oh I see
03:17 cale2 first code block example
03:17 cale2 and the first " is invisible :S
03:20 brokenchicken u: „“
03:20 unicodable6 brokenchicken, U+201E DOUBLE LOW-9 QUOTATION MARK [Ps] („)
03:20 unicodable6 brokenchicken, U+201C LEFT DOUBLE QUOTATION MARK [Pi] (“)
03:20 brokenchicken I see them on my box
03:21 AlexDaniel \o/
03:22 cale2 I saw them on github source code. But on Chrome on my mac (it's not the newest OS version though) it's invisible
03:23 cale2 probably warrants discussion on PR
03:23 AlexDaniel discussion on how to install fonts on your machine? Hmm…
03:23 brokenchicken I think there was an issue on that topic
03:24 * samcv waves at cale2
03:24 samcv will fix that highlighing issue right after I have dinner
03:25 brokenchicken Thios one: https://github.com/perl6/doc/issues/776
03:25 * brokenchicken no longer cares about it, despite comments there suggesting otherwise :P
03:25 samcv brokenchicken, do we allow all of those quotation marks for #` quoting?
03:25 samcv probably right?
03:25 AlexDaniel yea
03:26 TEttinger I do wonder why unicode quotes are used
03:26 AlexDaniel why not
03:26 TEttinger are they easier to enter on some machines?
03:27 AlexDaniel well, here they are as easy to enter as " but that's a custom layout
03:27 samcv i just have a compose key
03:27 samcv AlexDaniel, what' the custom layout?
03:27 samcv i just have compose + < + "
03:27 cale2 samcv: how do you remember what each key combo is? You have a cheat sheet?
03:27 AlexDaniel samcv: meaning that I've created my own keyboard layout
03:27 samcv uhm i look at my compose file
03:28 TEttinger AlexDaniel: there are numerous reasons why not, ranging from the trivial (larger filesize in UTF-8 encoded files) to the more significant (fonts may not display them) to the "well duh" (shift-' doesn't need to look up a compose combo or even press a multi-key combo)
03:28 cale2 It's possible I'm missing fonts on my machine. But I don't think so. Because I can see them in the source code.
03:29 cale2 It's more likely an issue with Chrome, no?
03:29 brokenchicken I see them fine in Chrome on Win
03:29 samcv well < + " is pretty easy to remember
03:29 samcv or > + ", or > + '
03:29 samcv etc
03:30 AlexDaniel TEttinger: oh, you mean why people use unicode quotes in general, not just on that particular doc page?
03:31 TimToady makes it real easy to avoid shell quote branedamage
03:31 AlexDaniel TEttinger: well, first of all you can nest them… then you can copy-paste code into perl6 -e '' without caring about the quotes
03:31 brokenchicken m: my &z = sub a {say "hi"}; dd [&z, &a]
03:31 camelia rakudo-moar dd514d: OUTPUT«[sub a () { #`(Sub|48383000) ... }, sub a () { #`(Sub|48383152) ... }]␤»
03:31 brokenchicken TimToady: how come these ^ differ?
03:32 samcv this is my XCompose file
03:32 samcv https://github.com/samcv/dot-files/blob/master/.XCompose
03:32 AlexDaniel m: my $z = sub a {say "hi"}; dd [$z, &a]
03:32 camelia rakudo-moar dd514d: OUTPUT«[sub a () { #`(Sub|67666904) ... }, sub a () { #`(Sub|67667056) ... }]␤»
03:32 samcv also. samcv++ it's highlighted! well. i created a grammar and got github to include it :)
03:32 samcv so XCompose files are highlighted on github. looks nice
03:33 samcv more colorful in my editor though
03:33 brokenchicken m: my &z = sub a {say "hi"}; &z.wrap: sub {say "the z"}; &a.wrap: sub {say "the a"}; z; a
03:33 camelia rakudo-moar dd514d: OUTPUT«the z␤the a␤»
03:33 samcv camelia, if i don't know i just Ctrl+F my xcompose file for the symbol or name
03:34 AlexDaniel TEttinger: and the argument about having to look up compose sequences is a bit weird. If someone is using these characters daily, it is definitely not an issue for them, right?
03:34 samcv ya
03:34 samcv i have M-dash, N-dash, horizontal bar, negative minus all memorized
03:35 samcv n + - is n dash, M + - is M-dash, m + - is negative symbol (think minus)
03:35 brokenchicken Also, copy-paste from powerpoint and ilk to code doesn't require changing all the quotes, 'cause we handle them.
03:35 samcv and - + - + - is horizontal bar, used usually when quoting people
03:35 TEttinger the shell quote stuff is an excellent reason
03:35 AlexDaniel brokenchicken: oh yeah! That's a good one!
03:36 makumiku joined #perl6
03:38 AlexDaniel m: say “here is some “quoted string”, isn't it an excellent reason as well?”
03:38 camelia rakudo-moar dd514d: OUTPUT«here is some “quoted string”, isn't it an excellent reason as well?␤»
03:38 samcv also curly quotes have an opener and a closer
03:38 samcv " is ambiguous
03:38 AlexDaniel m: say "here is some \"quoted string\", isn't it an excellent reason as well?\"
03:38 camelia rakudo-moar dd514d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3 isn't it an excellent reason as well?\"7⏏5<EOL>␤    expecting any of:␤        argument list␤        …»
03:38 AlexDaniel m: say "here is some \"quoted string\", isn't it an excellent reason as well?"
03:38 camelia rakudo-moar dd514d: OUTPUT«here is some "quoted string", isn't it an excellent reason as well?␤»
03:38 AlexDaniel ewwww…
03:38 makumiku https://github.com/slidaway/cthso How should I go about getting HTTPS to work with this?
03:39 brokenchicken makumiku: drop it behind a reverse proxy
03:39 cale2 So this is all well and good, but what about that lower case double quote? That's the one I can't see.
03:39 makumiku No idea about how to do that ;-;
03:39 brokenchicken makumiku: do you have apache?
03:40 cale2 It's a double quote on the bottom of the line of text
03:40 makumiku I'd rather use nginx
03:40 makumiku but I can use apache
03:40 AlexDaniel cale2: yea. So install some fonts perhaps?
03:40 AlexDaniel I'm not sure what OS you are on
03:40 AlexDaniel ah, you said mac. Still I know nothing :)
03:41 noganex_ joined #perl6
03:42 brokenchicken makumiku: that will work too. Just google for "set up nginx reverse proxy". The idea is you start an app on port, say, 8888. It's blocked for non-local traffic. nginx listens on 443 and forwards the request to 8888. so you get the HTTPS from nginx and your app can handle the request as if it were just plain ol HTTP
03:42 makumiku I see, thanks a bunch for the help!
03:47 samcv wierd... you can close „ with left or right quotation marks
03:48 brokenchicken mhm
03:48 samcv u: low quotation mark
03:48 unicodable6 samcv, U+201A SINGLE LOW-9 QUOTATION MARK [Ps] (‚)
03:48 unicodable6 samcv, U+201E DOUBLE LOW-9 QUOTATION MARK [Ps] („)
03:48 unicodable6 samcv, https://gist.github.com/720cf1c0d473bcd8344307fd0962538a
03:48 samcv u: quotation mark
03:48 unicodable6 samcv, U+0022 QUOTATION MARK [Po] (")
03:48 unicodable6 samcv, U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK [Pi] («)
03:48 unicodable6 samcv, https://gist.github.com/eace4c4da2224b3a83b0c51179dace60
03:49 samcv that's kinda weird
03:49 samcv idk
03:49 TimToady see https://en.wikipedia.org/wiki/Quotation_mark for a brain melt
03:49 samcv „ is an opener, but we let you close it with an opener too?
03:50 samcv hmm
03:50 samcv i guess that makes sense
03:51 samcv we always need more brackets tbh
03:56 Cabanossi joined #perl6
03:56 agentzh joined #perl6
03:58 cale2 Yeah, it's U+201A and U+201E that are invisible
04:09 Cabanossi joined #perl6
04:17 samcv what os do you have camelia
04:17 samcv err cale2
04:17 samcv oh i guess he left, i have part messages hidden
04:18 brokenchicken AlexDaniel: FWIW, I'm using ≔ in Perl 7 and I must say it's terrible. Can hardly notice the difference from =, especially when tired, sleepy, and not actively trying to discern if the two look too similar
04:19 AlexDaniel brokenchicken: ≔ is full-width here, so I don't know…
04:19 AlexDaniel again, it depends on your font
04:19 * brokenchicken nods
04:20 AlexDaniel brokenchicken: it is also in the list of “questionable things” :)
04:21 AlexDaniel what should I do with that gist by the way? Do we have some sort of a wiki for brainstorming?
04:21 * brokenchicken isn't aware of one
04:22 bjz_ joined #perl6
04:22 AlexDaniel @x⁎₋₁ awwwwww
04:22 AlexDaniel too bad people want subscripts in identifiers…
04:25 AlexDaniel “Even though there are ⩵ and ⩶ characters, how are these supposed to look in a fixed-width font?” am I stupid or what?
04:26 AlexDaniel did I just imply that ⩶ is supposed to fit into the width of a narrow character?
04:26 AlexDaniel wh… what… who wrote that :P
04:41 aborazmeh joined #perl6
04:41 aborazmeh joined #perl6
04:43 Geth doc: 10b8f1a2fa | (Samantha McVey)++ | util/trigger-rebuild.txt
04:43 Geth doc: Trigger rebuild to pull in highlighter fixes
04:43 Geth doc:
04:43 Geth doc: Highlight Low-double quotation mark - Left/Right double quotation mark quoting
04:43 Geth doc: review: https://github.com/perl6/doc/commit/10b8f1a2fa
04:45 samcv lol AlexDaniel
04:45 samcv u: equality
04:45 unicodable6 samcv, Found nothing!
04:45 AlexDaniel u: equals
04:45 unicodable6 AlexDaniel, U+003D EQUALS SIGN [Sm] (=)
04:45 unicodable6 AlexDaniel, U+0347 COMBINING EQUALS SIGN BELOW [Mn] (◌͇)
04:45 unicodable6 AlexDaniel, https://gist.github.com/b4fbd07aa1f93c3defa0027712f1c481
04:45 samcv AlexDaniel, get a monospace font that sets the ≡ sign to double width?
04:45 samcv that would be one solution tbh
04:46 AlexDaniel ≡?
04:46 AlexDaniel u: ≡
04:46 unicodable6 AlexDaniel, U+2261 IDENTICAL TO [Sm] (≡)
04:46 samcv oh i guess you said that
04:46 samcv about ≔
04:46 samcv it shows wider for this non-monospace font i'm using for irc at least
04:46 AlexDaniel it is double width here too
04:47 samcv did we add in ≔ as a way to do :=?
04:47 AlexDaniel no. … at least not yet
04:47 samcv ah, not sure what brokenchicken meant then
04:47 AlexDaniel anyway, I your initial message is for brokenchicken
04:47 AlexDaniel yea
04:47 samcv oh perl 6
04:47 AlexDaniel I think*
04:47 samcv s/6/7
04:47 samcv haha
05:00 jdv79 P6opaque: no such attribute '$!state' in type Foo when trying to get a value
05:00 jdv79 except $!state is declared in the same role as the method hitting it
05:00 jdv79 so... wth man...
05:02 jdv79 i have 6 classes comsuming that role too and only one complains per run
05:09 Cabanossi joined #perl6
05:10 travis-ci joined #perl6
05:10 travis-ci Doc build passed. Samantha McVey 'Trigger rebuild to pull in highlighter fixes
05:10 travis-ci https://travis-ci.org/perl6/doc/builds/196274730 https://github.com/perl6/doc/compare/c122064ab7f0...10b8f1a2fa01
05:10 travis-ci left #perl6
05:11 agentzh joined #perl6
05:22 Geth whateverable: 8a2b349bf3 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Whateverable.pm6
05:22 Geth whateverable: Consistent ident for the bots
05:22 Geth whateverable:
05:22 Geth whateverable: So that they can be voiced on channels with a single mask.
05:22 Geth whateverable: review: https://github.com/perl6/whateverable/commit/8a2b349bf3
05:22 Geth whateverable: c8acc81410 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 3 files
05:22 Geth whateverable: Ignore messages starting with “what,”
05:22 Geth whateverable:
05:23 Geth whateverable: What, people actually start their sentences with “what,”?
05:23 Geth whateverable:
05:23 Geth whateverable: http://colabti.org/irclogger/irclogger_log_search/perl6?search=what%2C&amp;action=search&amp;timespan=&amp;text=checked
05:23 Geth whateverable: review: https://github.com/perl6/whateverable/commit/c8acc81410
05:26 woeirjisojdfio joined #perl6
05:30 samcv brokenchicken, this plugin for atom i got is pretty neat. it creates a like 'index' bar on the right that is populated by regex items
05:38 Cabanossi joined #perl6
05:44 samcv ugh and now it's not working all of a sudden
05:50 samcv nvm got it working. nice. have a whole list of all the sub's in the file on the right side and can easily click to go to them
05:51 bjz joined #perl6
05:53 CIAvash joined #perl6
06:04 labster joined #perl6
06:06 samcv how do I do a for loop that doesn't iterate over the subcomponents of things and only deos the list of variables?
06:06 samcv m: my %hash = 10 => 11; for %hash, %hash { .VAR.name.say }
06:06 camelia rakudo-moar dd514d: OUTPUT«%hash␤%hash␤»
06:06 samcv i guess that worked hmm
06:40 masak hey #perl6 -- could someone re-URL to that blog post I read recently where it says that global type names now behave differently with `use` statements?
06:40 masak was it timotimo who wrote it? or nine? or someone?
06:41 masak (turns out 007 is a victim and I didn't discover it until now, since I haven't been working on it for a while. it's easy to fix, but I'd like to reference the blog post in the commit message.)
06:44 masak I'm also getting a much clearer feeling for what the change in semantics does: if A uses B uses C, A used to get C's "global" type declarations through B -- but it doesn't any more.
06:44 masak ...segmentation fault :(
06:44 masak geez, I hope this is golfable.
06:45 masak oh; went away after I nuked lib/.precomp
06:46 masak :) :(
06:48 masak ok, that's better. All Tests Pass.
07:00 masak aha; https://github.com/rakudo/rakudo/commit/4b529c8281f9e8687721d82dd6e60495a09a8e80 actually points to http://rakudo.org/2016/12/17/lexical-module-loading/
07:00 darutoko joined #perl6
07:00 masak nine++ nine++ for that
07:00 perlawhirl joined #perl6
07:02 bjz_ joined #perl6
07:07 moritz \o
07:09 Cabanossi joined #perl6
07:12 masak hiyo moritz
07:17 ChoHag joined #perl6
07:24 moritz masak: fwiw I greatly enjoyed your lambda calculus gist the other day
07:28 Tonik joined #perl6
07:30 masak moritz: that's great to hear. I'm not done with it, by the way.
07:31 masak I'm implementing a lambda calculator, and I mean to turn the gist into an interactive page where you can try things out.
07:34 domidumont joined #perl6
07:34 moritz \o/
07:34 moritz and lol i blogged: https://perlgeek.de/blog-en/perl-6/2017-005-book-regexes-ini-parsing.html
07:35 moritz two more regex blog posts coming up, one about grammars, match trees and action methods, and the last about generating good parse error messages
07:36 masak moritz++
07:37 masak stray macro/quasi thought: a quasi encompasses even nested routines inside of it, in such a way that these can be factored out of the quasi if-and-only-if they don't contain unquotes.
07:38 masak (the corollary being that an unquote in a nested routine is more powerful than we may realize. I've now seen two real-ish examples of this.)
07:40 kurahaupo joined #perl6
07:45 kurahaupo_ joined #perl6
07:46 moritz masak: do you have links to examples?
07:47 kurahaupo` joined #perl6
07:48 pyrimidine joined #perl6
07:50 kurahaupo joined #perl6
07:51 masak m: class A::B {}; class C { has A::B $.ab .= new }
07:51 camelia rakudo-moar dd514d: ( no output )
07:51 * masak closes https://rt.perl.org/Public/Bug/Display.html?id=126975
07:52 moritz pleaes remeber to a write a test in roast for it
07:54 masak oh shucks -- guess now I have to :)
07:55 masak moritz: to answer your question about examples: yes, my favorite so far is still the 007 implementation of reduce metaops: https://github.com/masak/007/issues/176#issuecomment-240849038
07:55 masak this is a *real* macro
07:56 moritz nice!
07:56 masak it quasis a sub with a synthetic name
07:56 masak whose parameter list is a single slurpy (a not-yet-in-place 007 extension)
07:57 masak and whose body is an actual .reduce call on the slurped array
07:58 masak and the call's argument (which needs to be a 2-ary callable, recall) is an *op*, namely the one that we parsed in the macro
07:58 masak so if we parsed `[+]`, then the op is infix:<+>
07:58 masak "but what about lexical sco..." -- yep, it all works out
07:59 masak *and that's why we have all that bloody complexity with layers of lexical scoping coming out the wazoo*, so that stuff like this macro will work!
08:08 Cabanossi joined #perl6
08:11 masak by the way, if there are people here who don't mind pain^Wlong discussions and who have ever wondered why we haven't replaced the {{{ }}} syntax yet with something better, let me suggest you read through https://github.com/masak/007/issues/30 from beginning to end
08:11 masak (it's good, I think. it goes deep.)
08:22 masak aha; Zoffix++ had already added a test with afe080a028f91ff1f85d2f9fbb04dc2068eb95c0, so I'm off the hook
08:27 araujo joined #perl6
08:38 benji joined #perl6
08:38 Guest49604 left #perl6
08:38 Cabanossi joined #perl6
08:39 bseiuhrusid joined #perl6
08:43 bseiuhrusid Everytime I attempt to 'rakudobrew build moar', I run into the following problem: https://gist.github.com/anonymous/a0a287c64afb4a9f65515ef42dfa44d2
08:43 wamba joined #perl6
08:45 kurahaupo joined #perl6
08:47 bseiuhrusid anyone know how to fix this?
08:57 rindolf joined #perl6
09:22 z448 joined #perl6
09:27 RabidGravy joined #perl6
09:33 kurahaupo__ joined #perl6
09:33 sjoshi joined #perl6
09:48 dalek Inline-Python: fbee34c | niner++ | / (2 files):
09:48 dalek Inline-Python: Implement simple importing of Python modules
09:48 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/fbee34c81a
09:48 dalek Inline-Python: 49b9bcd | niner++ | / (2 files):
09:48 dalek Inline-Python: Support: use foo:from<Python>
09:48 yoleaux 28 Jan 2017 16:37Z <AlexDaniel> dalek: Please switch this bot to Geth
09:48 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/49b9bcd425
09:49 nine .tell dalek Please switch this bot to Geth
09:49 yoleaux nine: I'll pass your message to dalek.
09:53 cibs joined #perl6
09:59 RabidGravy There is one thing though - Dalek uses the IRC nick whereas Geth uses the name from github
10:03 nine RabidGravy: if that about dalek were true, it'd have said nine++, not niner++
10:04 RabidGravy Hmm, presumably it has some manually updated list somewhere then
10:16 RabidGravy further to my RPi 2 + 3 comparison yesterday, the "Stage Parse" takes 595.026 on the 2 and ~ 300 on the 3
10:18 andrzejku_ joined #perl6
10:19 Ven joined #perl6
10:35 agentzh joined #perl6
10:39 RabidGravy is this exception catchable?
10:39 RabidGravy m: use v6.d
10:39 camelia rakudo-moar d93235: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤No compiler available for Perl v6.d␤at <tmp>:1␤------> 3use v6.d7⏏5<EOL>␤»
10:40 nine I hope not? :)
10:40 ufobat joined #perl6
10:40 RabidGravy *or* if I wanted to make tests that tried with "v6.d.PREVIEW" if it was available is there a way to do it
10:42 RabidGravy specifically I have stuff that will benefit from jnthn's await changes and would like to start testing where possible
10:45 nine We are definitely going to need an API for querying the supported language version. But even then, I'm not sure how to handle your use case since the use v6.d; should be the very first statement in your compilation unit.
10:46 nine Maybe if you put the tests in a module and load that only if v6.d is supported.
10:47 nine You could then write a module that just contains use v6.d.PREVIEW; and require that and if that succeeds load the module with your tests.
10:48 RabidGravy yeah
10:50 rumble joined #perl6
10:51 RabidGravy maybe something like "$*PERL.compilers" which returns a list of all the available versions
11:05 * RabidGravy makes a super repository of all his modules for purposes of smoke testing
11:09 Cabanossi joined #perl6
11:11 Rawriful joined #perl6
11:15 AlexDaniel joined #perl6
11:19 parv joined #perl6
11:24 lukaramu joined #perl6
11:51 bjz joined #perl6
11:55 RabidGravy there https://github.com/jonathanstowe/Perl6-Modules
11:55 RabidGravy that's not all of them, just all the ones that are finished or mostly finished
12:03 nine Oh boy, Python 2's string vs. unicode handling is so messed up.
12:17 sammers joined #perl6
12:23 pyrimidine joined #perl6
12:35 geekosaur joined #perl6
12:43 eeoo joined #perl6
12:45 moritz which is the reason for Python 3
12:54 bjz_ joined #perl6
12:57 masak well, one of the bigger reasons
12:57 nine Feels like healing pain by inflicting more pain...
12:58 moritz there's certainly the pain of upgrading
12:58 moritz but I for one like pytho 3's string handling
12:58 moritz I just find it miserable that the regex engine doesn't support Unicode properties
13:02 Geth Inline-Python: 1ecd114855 | (Stefan Seifert)++ | 3 files
13:02 Geth Inline-Python: Create wrapper functions for imported Python modules
13:02 Geth Inline-Python:
13:02 Geth Inline-Python: use string:from<Python>;
13:02 Geth Inline-Python: say string::capwords('foo bar'); # prints "Foo Bar"
13:02 Geth Inline-Python: review: https://github.com/niner/Inline-Python/commit/1ecd114855
13:02 Tonik joined #perl6
13:04 bjz joined #perl6
13:04 masak grmbl; another case of Grammar::Tracer changing the outcome of the parse... :/
13:04 masak jnthn: if it's worthwhile for me to document these, I could spend some time writing it up. if not, I'll just skip it. :)
13:06 jnthn masak: Or just write a patch that makes the returned closuers have a !NFA method (or some such), perhaps by mixing in a role or smilar, which passes on the NFA of the wrapped-up rule.
13:06 jnthn *closures
13:06 jnthn I'm pretty sure that's what's to blame for the discrepancy
13:08 masak jnthn: I see we both wish I were more familiar with that codebase :P
13:08 masak heh, that reminds me. I never did finish up that series of blog posts about PGE :P
13:09 * masak .oO( to enjoy this joke, you need to be at least this old )
13:09 moritz nor the last p6 coding contest
13:12 Geth Inline-Python: fdf275b4ce | (Stefan Seifert)++ | lib/Inline/Python.pm6
13:12 Geth Inline-Python: Replace long obsolete sub native trick
13:12 Geth Inline-Python:
13:12 Geth Inline-Python: Ever since we got support for %?RESOURCES, there has not been a need for a
13:12 Geth Inline-Python: "native" sub containing logic to find the library. Perl 6 finds it for us :)
13:12 Geth Inline-Python: review: https://github.com/niner/Inline-Python/commit/fdf275b4ce
13:13 masak indeed
13:13 masak there's hope
13:14 vendethiel joined #perl6
13:14 jnthn There's not that much code in Grammar::Tracer to get familiar with :)
13:15 jnthn I'll try and remember to take a look at it.
13:15 jnthn If you've time to add a failing test case and mark it todo, that'd be even better :)
13:18 MasterDuke masak: do you have some blog posts about PGE? if so, could you paste a link?
13:18 samcv it seems it's not letting me use :exists on a hash?
13:19 nowan joined #perl6
13:20 jnthn samcv: "it's"?
13:20 jnthn m: my %h; say %h<a>:exists
13:20 camelia rakudo-moar fdcf46: OUTPUT«False␤»
13:20 jnthn m: my %h = a => 42; say %h<a>:exists
13:20 camelia rakudo-moar fdcf46: OUTPUT«True␤»
13:20 samcv i am going to try and golf it
13:20 jnthn Could be a precedence trap
13:21 samcv oh maybe
13:21 samcv if ! %PropertyNameAliases_to{$prop}:exists
13:21 jnthn I think the one sometimes run into is low-precedence negation (`not`) getting the adverb
13:21 samcv precedence maybe because of the !?
13:22 jnthn Hm, thought ! was tight enough
13:22 jnthn fwiw, I'd probably write :!exists
13:22 jnthn m: my %h = a => 42; say not %h<a>:exists
13:22 camelia rakudo-moar fdcf46: OUTPUT«False␤»
13:22 jnthn m: my %h = a => 42; say !%h<a>:exists
13:22 camelia rakudo-moar fdcf46: OUTPUT«Unexpected named argument 'exists' passed␤  in block <unit> at <tmp> line 1␤␤»
13:22 samcv i seem to be able to access self.VAR.name in augmenting a Hash, but cannot for a string
13:22 jnthn Ah, no, I got it the wrong way round. It is !
13:23 Geth Inline-Python: 7905458a9d | (Stefan Seifert)++ | README.md
13:23 Geth Inline-Python: Minimalistic documentation of new module importing feature
13:23 Geth Inline-Python: review: https://github.com/niner/Inline-Python/commit/7905458a9d
13:23 samcv m: augment class Hash {
13:23 camelia rakudo-moar fdcf46: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3augment class Hash7⏏5 {␤    expecting any of:␤        generic role␤»
13:23 Geth Inline-Python: 5a18fc7c57 | (Stefan Seifert)++ | META6.json
13:23 Geth Inline-Python: Version 0.3
13:23 Geth Inline-Python: review: https://github.com/niner/Inline-Python/commit/5a18fc7c57
13:23 jnthn That's probably because the Hash is the container, but in a string the Scalar is the container, and self is never a Scalar container
13:23 samcv m: augment class Hash { method dump { self.VAR.name ~ ':  ' ~ self } }; my $s = 'string'; say $s.dump
13:23 camelia rakudo-moar fdcf46: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3augment class Hash7⏏5 { method dump { self.VAR.name ~ ':  ' ~␤    expecting any of:␤        generic role␤»
13:24 samcv m: use MONKEY, augment class Hash { method dump { self.VAR.name ~ ':  ' ~ self } }; my $s = 'string'; say $s.dump
13:24 camelia rakudo-moar fdcf46: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3use MONKEY7⏏5, augment class Hash { method dump { sel␤»
13:24 samcv m: use MONKEY; augment class Hash { method dump { self.VAR.name ~ ':  ' ~ self } }; my $s = 'string'; say $s.dump
13:24 camelia rakudo-moar fdcf46: OUTPUT«No such method 'dump' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
13:24 samcv m: use MONKEY; augment class Str { method dump { self.VAR.name ~ ':  ' ~ self } }; my $s = 'string'; say $s.dump
13:24 camelia rakudo-moar fdcf46: OUTPUT«No such method 'name' for invocant of type 'Str'␤  in method dump at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:24 samcv yeah
13:24 jnthn method dump(\SELF:) { SELF.VAR.name } # or some such
13:24 samcv m: use MONKEY; augment class Hash { method dump { self.VAR.name ~ ':  ' ~ self } }; my %h; say %h.dump
13:24 camelia rakudo-moar fdcf46: OUTPUT«%h:  ␤»
13:25 samcv thanks jnthn :)
13:26 jnthn np
13:26 samcv ===SORRY!===
13:26 samcv When invoking 5693 'parameterize', provided outer frame 0x55870ef5e2e0 (572 'quote:sym<s>') does not match expected static frame 0x55870f6a1698 (5694 '')
13:27 jnthn o.O
13:27 jnthn Ain't seen that error for months...
13:28 jnthn lunch time; bbl
13:28 samcv k
13:33 cdg joined #perl6
13:35 brokenchicken samcv: the ≔ is in Perl 7. I find "get a better font" a poor argument as that'd be a reason any style book would advocate against its usage so we'd be adding and supporting something we can't in good conscience advocate the use of.
13:36 samcv can't see unicode quotation marks, get a better font?
13:36 samcv so can't advocate their use?
13:38 samcv idk it looks fine with my font
13:38 samcv wider even than a =
13:38 samcv this is monospace btw
13:39 samcv brokenchicken, https://a.uguu.se/pWubmIIS8UJS_Screenshot_20170129_053857.png they seem pretty easy to tell apart to me
13:39 cdg joined #perl6
13:39 MasterDuke i think it's reasonable to have as a requirement that the source code be readable with the default font from a clean install of the common OSes (windows, macos, debian, red hat, ubuntu, fedora, etc)
13:40 samcv and what font is that?
13:41 samcv so we can't use things that the 'default' font doesn't render properly?
13:41 samcv i've checked several monospace fonts i've used and they seem to render ≔ wider than =
13:43 samcv Noto Mono for sure renders it fine
13:43 brokenchicken samcv: no support for a mark is different than mark is rendered too similar to something else on many fonts. But the incident with cale2 last night shows just how much confusion it causes. He thought a qoute was missing. I wouldn't want my devs wasting their time trying to set up some Right Font™ just so they would not make a fuck up that would cost me more money
13:44 brokenchicken Actually, I fully expect all Best Practice guides to advocate against fancy ops.
13:44 samcv i mean we already have plenty of those
13:44 samcv set operators, what if peoples fonts don't have those? should we just have not added those in?
13:45 xiaomiao 'defaults' as in the standard ASCII character range? anything beyond that is not guaranteed to work
13:45 brokenchicken We actually have a good test for it already. Any time I wrote @a ∖ @b in a channel people thought it was a backslash.
13:45 samcv well just install normal fonts
13:45 xiaomiao samcv: what does that mean ...
13:46 samcv there's plenty of availible fonts that cover lots of symbols, like the Noto fonts
13:46 brokenchicken samcv: again, the argument is the similarity, not missing glyphs
13:46 samcv freely available
13:46 obfusk joined #perl6
13:46 samcv ah ok i guess that's a little different?
13:46 brokenchicken Lots different.
13:47 cdg joined #perl6
13:47 samcv sorry you brought up cale2 having a missing font, so i thought you were also using that as an argument. but i guess similarity is ok. and := is pretty easy to see and pretty close to the actual symbol
13:47 pyrimidine joined #perl6
13:51 brokenchicken dogbert17: why the dupe ticket?
13:52 brokenchicken Even wording is the same...
13:52 * brokenchicken assumes accidental re-send and closes it
13:56 samcv m: my %hash = this => 'that'; if !%hash{'that'}:exists { say ‘it's not there’ }
13:56 camelia rakudo-moar fdcf46: OUTPUT«Unexpected named argument 'exists' passed␤  in block <unit> at <tmp> line 1␤␤»
13:56 samcv this has affected me so many times
13:56 samcv is there anything that can be done about it?
13:57 lizmat m: my %hash = this => 'that'; if %hash{'that'}:!exists { say ‘it's not there’ }
13:57 camelia rakudo-moar fdcf46: OUTPUT«it's not there␤»
13:57 lizmat samcv: use :!exists
13:57 samcv so is that a no?
13:57 samcv yeah jnthn told me about i can do :!exists
13:57 lizmat ah, yes, that's a no
13:57 samcv is there anyway to improve the error reporting then?
13:57 lizmat consult jnthn TimToady for more info
13:58 lizmat adverbs attach to the outer expression
13:58 SmokeMachine timotimo: I think I got it... https://www.irccloud.com/pastebin/G24l8JVW/
13:58 lizmat so it attached to the !
13:58 lizmat and prefix<!> doesn't accept :exists as a parameter
13:59 lizmat perhaps we could make a prefix<!> candidate with :$exists!  and then make that an improved error message
13:59 brokenchicken .oO( make it accept it and throw a better error... )
14:00 lizmat but in the past jnthn has been sorta against that type of fixing
14:00 brokenchicken OK :)
14:01 brokenchicken It's the right of passage to Perl 6. Learning the precedence of prefix ops and methods :)
14:01 lizmat nobody's stopping anybody making it a PR and have a discussion about it :-)
14:02 brokenchicken m: try q|m: my %hash = this => 'that'; if !%hash{'that'}:exists { say ‘it's not there’ }|.EVAL; say $!.^name
14:02 camelia rakudo-moar fdcf46: OUTPUT«X::AdHoc␤»
14:02 brokenchicken A lot of improvement could be achieved by simply making that error say to WHERE the unexpected argument was passed.
14:02 samcv ^
14:04 brokenchicken hm, s/simply//; Doesn't look like the name is anywhere close to where that error is made.
14:06 aindilis` joined #perl6
14:20 brokenchicken Any idea where "repr-compose-protocol.markdown" the internals course mentions is at?
14:20 brokenchicken Ah https://github.com/perl6/nqp/blob/master/docs/6model/repr-compose-protocol.markdown
14:29 rindolf joined #perl6
14:31 brokenchicken m: my $x = 42; $x.^set_name('heh'); say WHAT $x
14:31 camelia rakudo-moar 7e9850: OUTPUT«(heh)␤»
14:31 brokenchicken :D
14:33 samcv heh
14:33 z448 joined #perl6
14:37 agentzh joined #perl6
14:45 ggoebel joined #perl6
14:50 sammers joined #perl6
14:50 khw joined #perl6
14:53 Cabanossi joined #perl6
15:04 moritz m: my $x = 42; $x.^set_name('heh'); say WHAT Int
15:04 camelia rakudo-moar 7e9850: OUTPUT«(heh)␤»
15:05 moritz m: role a { }; a.^set_name('foo'; say a.^name
15:05 camelia rakudo-moar 7e9850: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3le a { }; a.^set_name('foo'; say a.^name7⏏5<EOL>␤    expecting any of:␤        postfix␤»
15:05 moritz m: role a { }; a.^set_name('foo'); say a.^name
15:05 camelia rakudo-moar 7e9850: OUTPUT«foo␤»
15:05 moritz and here I thought roles were immutable
15:06 brokenchicken m: role a { }; a.^add_method: "foo", -> {say "hi"}; a.foo
15:06 camelia rakudo-moar 7e9850: OUTPUT«No such method 'add_method' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at <tmp> line 1␤␤»
15:09 espadrine_ joined #perl6
15:14 moritz mostly they're immutable because nobody besides jnthn++ and TimToady++ fully comprehend roles semantics :-)
15:15 zakharyas joined #perl6
15:16 brokenchicken m: class x { has $!y }; role a {}.^add_attribute: x.^attributes[0]; a.^attributes.say
15:16 camelia rakudo-moar 7e9850: OUTPUT«(Mu $!y)␤»
15:16 brokenchicken m: class x { has $!y }; role a {}; a.^add_attribute: x.^attributes[0]; a.^attributes.say
15:16 camelia rakudo-moar 7e9850: OUTPUT«No such method 'add_attribute' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at <tmp> line 1␤␤»
15:17 brokenchicken don't get how that method dissapears tho
15:17 moritz I guess immutable doesn't apply when you use the MOP
15:17 TimToady a.^add_attribute is not Perl 6 :P
15:18 moritz brokenchicken: roles are basically like multis, and you can only add an attribute to one candidate, not to the whole thing
15:18 brokenchicken Ah. Thanks
15:18 moritz and the name refers to the whole collection (hence RoleGroup in the name of the meta class)
15:19 moritz speaking of roles
15:19 moritz I'm still looking for a good example for my book to explain roles
15:20 moritz preferably something where their use is idiomatic, and something that's practical (no animal/mammal/pet example please)
15:20 moritz any ideas?
15:22 FROGGS joined #perl6
15:22 moritz similarly, I'm looking for a good example to explain some aspects of functional programming in Perl 6
15:24 pyrimidine joined #perl6
15:35 SmokeMachine moritz: isn't Positional a practical and good example of role?
15:36 moritz SmokeMachine: well, I want to present a practical program that a user can (or could) use, which makes use of roles
15:37 moritz that's how the book is structured: explain a problem, develop a solution, and talk about the Perl 6 features used in the solution
15:37 SmokeMachine moritz: I got it... sorry...
15:37 moritz no problem
15:40 Geth book: WildYorkies++ created pull request #87: Update subs and sigs
15:40 Geth book: review: https://github.com/perl6/book/pull/87
15:52 wizard_ joined #perl6
15:52 wizard_ Hi,
15:53 moritz ho!
15:55 wizard_ I wanted to write a  web Application using perl6, I tried to research on that there are lot of different options but I also saw that it was still under development, Is there anything like mojolicious for perl6 which I can use
15:56 moritz wizard_: you can use p5's Mojolicious using Inline::Perl5; or you can use something like http://ugexe.com/hello-web-with-puree-perl-6/ which is pure Perl 6
15:56 moritz or Dancer
16:00 nine wizard_: I happen to write a talk about this exact topic :) http://niner.name/talks/Web%20development%20and%20Perl%206/
16:01 nine wizard_: input for the talk greatly appreciated. Especially if there's something you'd like to hear/read more about.
16:01 nine wizard_: Or if I missed something which you came across
16:01 wizard_ thank you very much
16:01 wizard_ I will look into it
16:04 CIAvash joined #perl6
16:05 timotimo SmokeMachine: please note that BUILDALL runs every single time an instance is created, so every time you .new one of your objects, you'll add another layer of wrap. at least i think so. try putting a "say" in before the with ::?CLASS etc etc
16:06 wizard_ to connect to the database, where DBIsh is used, so if I want to connect to MongoDB/ElasticSeach , should I use the standard Perl driver from Mongo DB and Search::ElasticSearch module
16:06 domidumont joined #perl6
16:08 mst SmokeMachine: why would you do this on BUILDALL rather than just setting stuff up once?
16:08 mst I think perhaps you could use an attribute trait instead?
16:08 Cabanossi joined #perl6
16:09 nine wizard_: there's the MongoDB Perl 6 module. If that doesn't work out for you, you can use appropriate modules from Perl 5.
16:10 wizard_ thank you, and for elasticsearch , search::Elasticsearch ?
16:11 nine As I don't find any Perl 6 module for ElasticSearch, Search::ElasticSearch seems the way to go
16:11 pmurias joined #perl6
16:11 wizard_ cool thanks a ton!
16:14 RabidGravy An ElasticSearch module has been on my TODO for ages
16:14 RabidGravy or even an apache Lucy binding
16:15 RabidGravy the former isn't that *hard* there's just a lot of it
16:16 SmokeMachine timotimo: you are right... :(
16:16 wizard_ that would be great if there's a module :)
16:16 SmokeMachine mst: because I need to access the $!dirty...
16:16 wizard_ Elasticsearch is widely being used these days
16:17 mst that's because, unlike mongodb, it's actually useful
16:17 SmokeMachine mst: and it can't be done on a object type method...
16:18 mst SmokeMachine: well what you're doing is bizarre and polluting the class so is obviously wrong
16:19 SmokeMachine mst: I agree...
16:19 mst this is why I was wondering about attribute trait
16:19 mst you might be able to get at slots that way
16:19 mst if you can't, maybe create a _set_dirty private method and call that?
16:19 timotimo you mean !set_dirty :)
16:20 timotimo perl6 has real private methods
16:20 pyrimidine joined #perl6
16:20 SmokeMachine thats a good idea!
16:20 mst timotimo: my fingers don't know that yet
16:20 bwisti joined #perl6
16:22 timotimo :)
16:22 CIAvash samcv: Noto Mono doesn't seem to have ≔, I'm guessing another font is rendering it for you. I checked it in Emacs and GNOME Character Map.
16:23 samcv hm
16:29 jdv79 I like how the HTTP::Tinyish t tests are just a compile test and xt has the real tests
16:29 jdv79 can't decided if that's hilarious or exasperating
16:30 cognominal joined #perl6
16:35 [Coke] .
16:35 RabidGravy I'm actually considering that for Audio::Liquidsoap as I can't make the tests pass reliably everywhere
16:35 RabidGravy ;-)
16:36 RabidGravy I've also completely shagged the jenkins on my test server
16:38 Cabanossi joined #perl6
16:38 jdv79 why... would you simply silently stop parsing http headers if you don't see "HTTP/\d.\d"
16:38 jdv79 HTTP/2 is valid, right?
16:40 nine Looks like Bailador is broken and nobody noticed :/ "Nothing given for new socket to connect or bind to in method connect"
16:40 jdv79 i personally would die instead of return but ok
16:40 RabidGravy well arguably an HTTP request is valid without the HTTP version at all
16:41 jdv79 that's true.  but a resp is not, rght?
16:42 RabidGravy well it's the "be liberal what you accept, conservative what you produce" thing
16:42 RabidGravy which I think people have lost sight of in the last few years
16:43 brokenchicken jdv79: are you still talking about HTTP::Tinyish? It's just a wrapper around curl. I doubt it does any parsing of anything.
16:45 nine And HTTP::Server::Tiny even fails to install
16:46 geekosaur joined #perl6
16:46 jdv79 brokenchicken: it does and yes im talking about it and i'm filing a bug now
16:46 jdv79 simple bug
16:47 jdv79 but curious handling
16:47 cygx joined #perl6
16:47 cygx o/
16:47 cygx nine: from the slides you linked: "naked "
16:47 cygx code blocks don't care about arguments
16:48 cygx they do, they just bind a single positional argument to $_
16:48 nine cygx: yes, it might be a bit of an over simplification
16:49 brokenchicken m: {}.signature.say
16:49 camelia rakudo-moar 7e9850: OUTPUT«No such method 'signature' for invocant of type 'Hash'␤  in block <unit> at <tmp> line 1␤␤»
16:49 brokenchicken m: {;}.signature.say
16:49 camelia rakudo-moar 7e9850: OUTPUT«(;; $_? is raw)␤»
16:53 melezhik joined #perl6
16:58 cygx m: say :($a; $b); say :($a;; $b)
16:58 camelia rakudo-moar 7e9850: OUTPUT«($a, $b)␤($a;; $b)␤»
16:58 cygx ^^ curious
16:59 cygx (and, as far as I can tell, undocumented)
16:59 brokenchicken cygx: ; is just another way to write ,
16:59 brokenchicken Whereas ;; is a multi-dispatch consideration marker thing
17:01 brokenchicken .seen toolforger
17:01 yoleaux I saw toolforger 28 Jan 2017 10:13Z in #perl6: <toolforger> lizmat, rakudobugs are in and confirmed
17:03 kybr joined #perl6
17:10 RabidGravy okay unbroken my local jenkins, it is now building a rakudo with 572 changes since the last time it worked
17:14 RabidGravy (which was 6 December,) don't know what broke it
17:15 jdv79 what's the p6 equiv of p5's delete local $h{$k}?
17:16 moritz temp %h = %h; %h{$k}:delete; # iirc
17:17 brokenchicken temp %h; %h{$k}:delete
17:18 jdv79 thanks
17:18 brokenchicken jdv79: or (temp %h){$k}:delete
17:20 jdv79 what's a terse way to check for a bool hash value that'll explode if its not that - like non-existance.
17:20 brokenchicken not that is not what?
17:21 moritz die unelss %h<key> ~~ Bool;
17:21 jdv79 not a bool
17:22 moritz *unelss
17:22 moritz argl
17:22 moritz *unless
17:22 jdv79 rather, true
17:22 moritz die if %h<key> !=== True
17:22 jdv79 ah, thanks
17:25 ufobat joined #perl6
17:26 brokenchicken m: %.<key> // … 'y u no key?'
17:26 camelia rakudo-moar 7e9850: OUTPUT«y u no key?␤  in block <unit> at <tmp> line 1␤␤»
17:29 timotimo
17:32 brokenchicken m: %.<key> || ??? 'y u no key?'
17:32 camelia rakudo-moar 7e9850: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Warning: something's wrong␤  in block <unit> at <tmp> line 1␤»
17:33 brokenchicken nil?
17:34 moritz m: ??? 'foo'
17:34 camelia rakudo-moar 7e9850: OUTPUT«foo␤  in block <unit> at <tmp> line 1␤»
17:34 brokenchicken m: %.<key> || (??? 'y u no key?')
17:34 camelia rakudo-moar 7e9850: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Warning: something's wrong␤  in block <unit> at <tmp> line 1␤»
17:34 brokenchicken prolly not meant to be used that way
17:34 moritz brokenchicken: is it maybe parsed as %(.<key> || ??? '...') ?
17:35 brokenchicken That
17:35 brokenchicken That'd be weird
17:35 moritz brokenchicken: and the ??? returns a Nil that the %() tries to stringify
17:35 brokenchicken m: (%.<key>) || (??? 'y u no key?')
17:35 camelia rakudo-moar 7e9850: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Warning: something's wrong␤  in block <unit> at <tmp> line 1␤»
17:35 moritz there is no %. variable, to the best of my knowledge
17:35 brokenchicken But there's % :)
17:35 moritz m: %.<key>
17:35 camelia rakudo-moar 7e9850: ( no output )
17:35 moritz m: %.<key> || 'foo'
17:35 camelia rakudo-moar 7e9850: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "foo" in sink context (line 1)␤»
17:35 brokenchicken hm
17:36 brokenchicken Oh that one is correct
17:36 brokenchicken Ah
17:36 moritz I still think %.<key> actually does %$_.<key>
17:36 brokenchicken m: Nil
17:36 camelia rakudo-moar 7e9850: ( no output )
17:37 brokenchicken m: $_ = %(foo => 42); %.<foo> = 72; dd $_
17:37 camelia rakudo-moar 7e9850: OUTPUT«Hash $_ = ${:foo(42)}␤»
17:37 Azzham joined #perl6
17:38 Azzham left #perl6
17:38 brokenchicken m: $_ = %(foo => 42); dd %.<foo>; dd $_
17:38 camelia rakudo-moar 7e9850: OUTPUT«Any % = Any␤Hash $_ = ${:foo(42)}␤»
17:38 brokenchicken m: my %h; %h<key> || ??? 'y u no key?'
17:38 camelia rakudo-moar 7e9850: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Warning: something's wrong␤  in block <unit> at <tmp> line 1␤»
17:40 Cabanossi joined #perl6
17:44 brokenchicken m: %.<key> // ??? 'y u no key?'
17:44 camelia rakudo-moar 7e9850: OUTPUT«y u no key?␤  in block <unit> at <tmp> line 1␤»
17:48 timotimo wait wtf
17:48 timotimo ??? "y u no key" calls sink on X::StubCode.new
17:49 timotimo not only does the string not appear in the ast output, but it also outputs
17:49 timotimo Oops!!! Cannot invoke this object (REPR: P6opaque; NQPMu)
17:49 geekosaur joined #perl6
17:49 timotimo it actually outputs that error twice during --target=ast
17:49 timotimo something is Seriously Wrong here
17:50 timotimo potentially sink-related differences between // and ||?
17:50 brokenchicken yeah. And // version also has the Oops but only once.
17:50 brokenchicken And the || version has a void Want but // doesn't
17:53 brokenchicken m: Int || 'foo'
17:53 camelia rakudo-moar 7e9850: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "foo" in sink context (line 1)␤»
17:53 brokenchicken m: Int // 'foo'
17:53 camelia rakudo-moar 7e9850: ( no output )
17:54 brokenchicken m: (??? 'foo').sink.say
17:54 camelia rakudo-moar 7e9850: OUTPUT«foo␤  in block <unit> at <tmp> line 1␤Nil␤»
17:54 timotimo so the result of sinking ??? 'foo' is what gives us the Nil use
17:55 timotimo but how do we end up not having foo in the AST at all when we have a // bfore that...
17:55 brokenchicken dunno about the Nil... 'cause the output with || doesn't output the message given to 'foo' but just the default thing; and I suspect the Nil warning is due to @msg.join in warn
17:56 brokenchicken I'd guess the message is meant to be under StubCode but it doesn't get displayed past the Ooops thing
17:57 timotimo yeah
17:57 timotimo that's potentially what output that oops. i haven't looked at that output to see if it does anything strange to control flow that'd make it just disappear
18:07 curt__ joined #perl6
18:10 Cabanossi joined #perl6
18:25 hankache joined #perl6
18:30 * brokenchicken curses all the programs that use CTRL+W to close tab and CTRL+Q—which is right next to CTRL+W—to close entire program
18:31 brokenchicken Atom in particularly -_--
18:33 Juerd ctrl+w is evil enough. I'm used to that erasing the previous word, not the entire page...
18:34 agentzh joined #perl6
18:36 tadzik oh yes
18:36 tadzik but I'm still more pissed about screen's default C-a
18:36 tadzik you're unix people, you're supposed to know it means something!
18:36 tadzik and then tmux comes around and “improves” that... by using C-b
18:37 tadzik grumble grumble
18:41 Juerd But at least ^AA is still available for when you need a real ^A
18:41 Juerd It's like ~ being special in telnet and ssh, after a newline. Just escape it with another ~
18:45 setty1 joined #perl6
18:46 girafe joined #perl6
18:47 TEttinger joined #perl6
18:48 tadzik yeah, but it's still a silly default
18:48 tadzik imo
18:52 Geth doc: JJ++ created pull request #1168: Adds definition for Repository
18:52 Geth doc: review: https://github.com/perl6/doc/pull/1168
18:57 Geth doc: d9485954e9 | (JJ Merelo)++ | doc/Language/glossary.pod6
18:57 Geth doc: Adds definition for Repository
18:57 Geth doc: review: https://github.com/perl6/doc/commit/d9485954e9
18:57 Geth doc: 0791485950 | (Zoffix Znet)++ | doc/Language/glossary.pod6
18:57 Geth doc: Merge pull request #1168 from JJ/master
18:57 Geth doc:
18:57 Geth doc: Adds definition for Repository
18:57 Geth doc: review: https://github.com/perl6/doc/commit/0791485950
18:58 brokenchicken "Method caches hang off an STable"... I keep hearing this "hang off..." phrase. What does it mean?
19:03 agentzh joined #perl6
19:05 MasterDuke i interpret it as "method caches are a data structure which STable has a pointer to", but i wouldn't bet large sums on that being 100% correct
19:06 brokenchicken :)
19:06 dugword joined #perl6
19:10 Cabanossi joined #perl6
19:14 AlexDaniel m:dd %42
19:14 AlexDaniel m: dd %42
19:14 camelia rakudo-moar 7e9850: OUTPUT«Hash % = {}␤»
19:15 agentzh gfldex brokenchicken: i wrote a merge script that concate all my 8K LOC p6 code into a single .p6 file. now it always takes around 7 sec to complete.
19:16 agentzh it's even faster than a typical partial build after editing an arbitrary single .pm6 compilation unit, which usually takes 7 ~ 13 sec.
19:17 agentzh it's amazing to see compiling an all-in-one script is even faster than a partial build.
19:17 jeek joined #perl6
19:17 agentzh not to mention it is significantly faster than a full from-scratch build of every well divided compilation units.
19:17 agentzh *of all those
19:18 pyrimidine joined #perl6
19:18 agentzh which takes 31 sec.
19:18 Geth doc: d8730a58c9 | (JJ Merelo)++ | doc/Language/glossary.pod6
19:18 Geth doc: Adds pugs
19:18 Geth doc: review: https://github.com/perl6/doc/commit/d8730a58c9
19:18 Geth doc: 7ac5c1f589 | (JJ Merelo)++ | doc/Language/glossary.pod6
19:18 Geth doc: Extends PR with reference to Replsitory
19:18 Geth doc: review: https://github.com/perl6/doc/commit/7ac5c1f589
19:18 Geth doc: 274142ebeb | (JJ Merelo)++ | doc/Language/glossary.pod6
19:18 Geth doc: Fiddly and iffy and diffy
19:18 Geth doc:
19:18 Geth doc: I have no idea what they are, so I'll leave just the reference which
19:18 Geth doc: is kind of circular and will find out.
19:18 Geth doc: review: https://github.com/perl6/doc/commit/274142ebeb
19:18 agentzh but still, 7 sec is still far from good enough for test-driven development workflow.
19:19 brokenchicken Sure. We don't claim we've reached the top speed yet :)
19:19 agentzh the bearable limit is around 2 sec ~ 3 sec, IMHO.
19:20 agentzh brokenchicken: no, i was not expecting top speed, i was just hoping for human bearable speed for prototyping purposes :)
19:20 MasterDuke samcv and i each have a moarvm PR waiting for review/merge which should improve that by maybe 0.001s
19:20 samcv heh
19:21 MasterDuke 0.002s if you use a lot of Unicode Nd chars as digits
19:21 agentzh MasterDuke: 0.001s for every p6 statement? if yes, then that would be impressive for an 8K LOC code base :)
19:21 samcv agentzh, that's a pretty big change
19:21 MasterDuke agentzh: ha, total
19:22 brokenchicken I thought I saw somewhere nqp::radix is gonna be 50% faster?
19:22 samcv not as much as 50% speed boost tho ;)
19:22 samcv yeah
19:22 samcv i have a PR that does that
19:22 brokenchicken sweet
19:22 samcv for non ascii chars it's 50% faster
19:22 brokenchicken Oh. And for ascii?
19:22 MasterDuke for Unicode digits
19:22 samcv most likely the same speed
19:22 brokenchicken Ah. OK
19:22 MasterDuke my PR improves everything, but very slightly
19:22 samcv 50% faster when it sees any non ascii digits
19:23 samcv idk does that also happen when the number ends?
19:23 lizmat :q
19:23 lizmat oops
19:23 agentzh unfortunately i'm not using non-ascii chars in my current project (yet).
19:23 samcv "10 " i mean does it ever encounter like non number chars
19:23 samcv or does it basically only process numbers
19:23 agentzh but still good to see speedup!
19:23 samcv or does it have to find a stopping point?
19:23 lizmat .001 improvement for every p6 statement would make setting building in negative time ?
19:24 agentzh lizmat: lol
19:24 lizmat setting being something like 50K lines
19:24 lizmat ok, just parsing in negative time then
19:24 lizmat parsing takes about 47 seconds for me nowadays  :-)
19:24 brokenchicken samcv: it'd process that as 10 and one of the return values would tell you offset where it stopped
19:24 agentzh lizmat: in my measurement, now each p6 statement takes 0.0052s on average in the comiplation.
19:25 agentzh lizmat: so won't be negative.
19:25 agentzh just 20% better, i think
19:25 lizmat ok, so 20% better:  I'll take that
19:25 Geth doc: c6eda71ce9 | (JJ Merelo)++ | doc/Language/glossary.pod6
19:25 Geth doc: Definning the three stooges of categories
19:25 Geth doc:
19:25 Geth doc: iffie, diffie and fiddly. Defined according to copied IRC chat from
19:25 Geth doc: @timtoady as transcribed by @kalkin in #728
19:25 Geth doc:
19:25 Geth doc: Definitely not contributed to clean up the page, rather the obverse,
19:25 Geth doc: but I'm all in for cleaning, dirtying, or whatever is decided about
19:25 Geth doc: this page.
19:25 Geth doc: review: https://github.com/perl6/doc/commit/c6eda71ce9
19:25 brokenchicken m: use nqp; say nqp::radix(10, '10blarg', 0, 0)[2]
19:25 camelia rakudo-moar 7e9850: OUTPUT«2␤»
19:25 brokenchicken m: use nqp; say nqp::radix(10, '100000rg', 0, 0)[2]
19:25 camelia rakudo-moar 7e9850: OUTPUT«6␤»
19:26 agentzh lizmat: the actual number should be worse than 0.0052s though since i'm counting lines with a sole '}' char as a statement in my current estimation :)
19:26 samcv m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.max
19:26 camelia rakudo-moar 7e9850: OUTPUT«9 => nin␤»
19:27 samcv also it is odd this doesn't evaluate numerically?
19:27 samcv but i guess you can call .max on all letter things
19:28 brokenchicken s: %, 'max', \()
19:28 SourceBaby brokenchicken, Sauce is at https://github.com/rakudo/rakudo/blob/7e98504/src/core/Any-iterable-methods.pm#L1217
19:29 agentzh TimToady: one thing i'm really missing in perl 6 grammars is the feature of automatic parse error reporting, like in Parse::RecDescent: https://metacpan.org/pod/Parse::RecDescent#Error-handling
19:29 samcv i mean it just calls cmp on them, so since they're strings, they just compare as strings
19:29 samcv so i end up doing %hash.keys.».Int.max
19:30 samcv though i guess maybe i could keys.sort(+*).max too?
19:30 samcv nvm that don't work either
19:30 brokenchicken m: my %hash := :{0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'}; say %hash.max
19:30 camelia rakudo-moar 7e9850: OUTPUT«10 => ten␤»
19:31 samcv could do  %hash.keys.sort(-*)[0]
19:31 brokenchicken m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.max: +*.key
19:31 camelia rakudo-moar 7e9850: OUTPUT«10 => ten␤»
19:32 samcv hmm
19:32 samcv weird that .max sorts properly but .keys.max doesn't
19:32 samcv i know there is a reason they don't but still wouldn't expect it as the user initially
19:34 brokenchicken m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.keys.max
19:34 camelia rakudo-moar 7e9850: OUTPUT«9␤»
19:34 samcv m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.max
19:34 camelia rakudo-moar 7e9850: OUTPUT«9 => nin␤»
19:34 brokenchicken Looks propper to me
19:34 samcv m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.keys.max
19:34 camelia rakudo-moar 7e9850: OUTPUT«9␤»
19:35 brokenchicken m: my %hash := {0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'}; say %hash.keys.max
19:35 camelia rakudo-moar 7e9850: OUTPUT«9␤»
19:35 brokenchicken that doesn't :S
19:35 samcv i guess i'll use .max: +*.key then
19:35 brokenchicken m: my %hash := {0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'}; say %hash.keys[0].^name
19:35 camelia rakudo-moar 7e9850: OUTPUT«Str␤»
19:35 brokenchicken dafuq
19:36 brokenchicken Oh, I missed the second :  :)
19:36 brokenchicken m: my %hash := :{0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'}; say %hash.keys.max
19:36 camelia rakudo-moar 7e9850: OUTPUT«10␤»
19:36 brokenchicken \o/
19:37 * samcv is considering using Inline::Perl5 and generating the UCD data in perl6 and then using perl 5 to write it to the file
19:37 samcv cause that is what takes the most time
19:37 samcv is after i have all the data setup, takes forever to like. put it in rows and crap
19:40 lizmat samcv: are you using printf ?
19:42 samcv yes i guess?
19:42 samcv sprintf
19:43 pyrimidine joined #perl6
19:43 brokenchicken it's pretty slow
19:43 lizmat it's the parsing of the format every time you call it, that's making it slow
19:43 lizmat it uses a grammar  :-)
19:43 brokenchicken :)
19:44 lizmat fwiw, I'm not sure why it needs a grammar
19:44 lizmat taking sprintf out of List.fmt recently, made it 60x faster
19:44 brokenchicken :o
19:46 samcv oh i'm not even using it that much
19:46 samcv just in a few places, nowhere that gets called a ton
19:46 samcv i don't think? can check
19:47 samcv yeah no i use nqp::base_I() to convert from integers to strings
19:47 lizmat samcv: then I have no explanation for the slowness
19:47 samcv this one is pretty slow https://github.com/samcv/UCD/blob/master/UCD-gen.p6#L650
19:48 samcv it used to take like 10+ times longer before i started nqp optimizing it
19:48 wamba joined #perl6
19:48 samcv i might make %code-to-prop and %prop-to-code nqp hashes to try and get more speed or something
19:49 samcv and the point mapping for the bitfield is already a nqp array because it took a million years to make that one before i did that
19:50 lizmat https://github.com/samcv/UCD/blob/master/UCD-gen.p6#L664
19:50 samcv that part only runs for less than a second
19:50 lizmat have you tried: sort({%enumerated-properties{$^a}<bitwidth>})
19:50 samcv but i'm sure you could make it faster
19:50 samcv with only $^a?
19:51 lizmat yes
19:51 lizmat it will do a schwartzian transform for you under the hood
19:51 samcv nope. though this is where the slowness happens https://github.com/samcv/UCD/blob/master/UCD-gen.p6#L677
19:52 lizmat samcv: why is code-to-prop a hash ?
19:52 lizmat why not an array ?
19:52 samcv uhm
19:52 samcv i guess i could make it an array
19:52 samcv can't make prop-to-code an array tho
19:53 lizmat seems to take a monotonically increasing integer key
19:53 samcv yea
19:53 lizmat which spells "array" to me...  possible even a str array
19:53 samcv i will generate a minimal build, commit that to the source repo and then we can play aronud with it
19:54 samcv so we make sure it doesn't change the output
19:55 AlexDaniel m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.max
19:55 camelia rakudo-moar 7e9850: OUTPUT«9 => nin␤»
19:55 AlexDaniel m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.maxpair
19:55 camelia rakudo-moar 7e9850: OUTPUT«No such method 'maxpair' for invocant of type 'Hash'␤  in block <unit> at <tmp> line 1␤␤»
19:56 AlexDaniel m: my %hash = 0 => 'zero', 1 => 'one', 10 => 'ten', 9 => 'nin'; say %hash.maxpairs
19:56 camelia rakudo-moar 7e9850: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5one' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:57 AlexDaniel why does it attempt to numify it?…
19:57 lizmat AlexDaniel: maxpairs assumes values are numbers
19:57 lizmat it came from Baggy/Mixy
19:57 samcv so with this minimal build takes 90s to generate the bitfield rows. now gonna make a few of those changes
19:59 samcv i wish we had macros
20:02 lizmat nudge masak  :-)
20:05 moritz samcv: no idea if anybody mentioned that, but quietly + warnings is likely expensive; avoiding the warnings in the first place is typically faster
20:05 samcv well it prints tons of warnings
20:05 samcv and i have no clue why
20:05 samcv let me find the error
20:05 moritz find where they come from, and sprinkle some // '' or // 0 in
20:06 lizmat moritz++
20:08 agentzh joined #perl6
20:09 samcv well it comes from the iterator
20:10 samcv or something
20:10 samcv i will get back to you when i get some info on it
20:10 lizmat what is the warning exactly, samcv?
20:11 samcv once i finish this thing i will undo the quietly
20:13 skids joined #perl6
20:16 Vynce joined #perl6
20:17 samcv weird. i removed it and it didn't warn for every single iteration
20:18 samcv dunno if related to recent changes to rakudo but if i didn't have quietly it would warn me about something used in string context on the line that was `for %points.keys.sort(+*) -> $point {`
20:18 samcv and it didn't make any sense at all
20:18 lizmat what was that something ?
20:19 samcv it didn't tell me
20:19 lizmat so it said "used something in string context" ?
20:19 samcv Use of uninitialized value of type Any in string context
20:19 samcv something like that
20:20 lizmat ah, ok
20:20 espadrine_ joined #perl6
20:20 samcv yeah it didn't tell me what it was
20:20 lizmat no it did, it was an Any
20:21 samcv and the values were iniialized cause i could print them out each loop and i checked
20:21 lizmat m: dd Any
20:21 camelia rakudo-moar 7e9850: OUTPUT«Any␤»
20:21 samcv yeah but.
20:21 samcv none of the keys or values were Any, i could print them all out fine in the loop
20:21 samcv so i am not sure where the Any came from
20:23 timotimo agentzh: does your code happen to use a whole lot of sub infix:<foo> or similar?
20:23 lizmat hmnmm
20:23 lizmat samcv: you'r doing %points.keys.sort(+*), which implies that the keys of %points are Str or at least Cool
20:23 agentzh timotimo: nope
20:24 samcv lizmat, yep
20:24 samcv they are ordinary keys
20:24 samcv default
20:24 lizmat ok
20:24 agentzh timotimo: i haven't defined any custom operators yet.
20:24 lizmat samcv: I just blew up my line of reasoning...  :-)
20:24 agentzh timotimo: i just have a .Str() method in one of my 46 classes.
20:24 samcv lol
20:25 samcv agentzh, you don't have enough classes.
20:25 samcv should have 2000
20:25 samcv for optimim compiling speed
20:25 samcv and augment everything
20:25 samcv that's how you turn on the turbo speed
20:25 timotimo OK. we do know that defining many infixes/prefixes/whatever makes compile times blow up a whole lot
20:25 samcv ;P
20:26 agentzh samcv: lol
20:26 samcv lizmat, so we're down to 72 seconds down from 90 i think, or 80?
20:26 lizmat you said 90 before
20:26 samcv same final output, i think the removing the quietly. so that's a good improvement
20:26 samcv will be magnified greatly for full builds
20:26 samcv gonna try some of the other things now :)
20:26 lizmat well, removing the warnings would be better
20:27 agentzh samcv: i have another perl 5 project waiting to be ported over to perl 6, which has 69 classes, way more than my current one :)
20:27 awwaiid joined #perl6
20:27 agentzh samcv: most of the classes are for AST node types. that's why there are many.
20:27 samcv just make them all the same class! genius! samcv you really are smart!
20:27 lizmat timotimo: what's the whatever ?  subs in general ?
20:27 agentzh samcv: these are compilers.
20:27 samcv problem fixed
20:28 samcv ah cool :)
20:28 agentzh samcv: we're hacking on our own perl 6 dialect compiler.
20:29 agentzh using rakudo as the reference p6 impl during testing and development.
20:29 samcv i should make a grammar someday that does Unicode regex notation or something
20:29 samcv it will probably happen somewhere down the road
20:29 b2gills joined #perl6
20:29 samcv nice
20:29 agentzh hopefully ours is much more practical than rakudo in terms of compilation speed and runtime speed.
20:30 samcv and how are you achieving this magic?
20:30 agentzh Perl has to be Practical :)
20:31 moritz agentzh: do you have a link for us?
20:31 agentzh moritz: not yet, it's still under development.
20:31 samcv top secret club
20:31 agentzh moritz: a simple fib(35) recursive p6 program is already 10x faster than rakduo and 2x faster than perl 5.
20:31 agentzh but that's just a toy.
20:32 agentzh we've implemented a lot of perl 6 common features already, including OO.
20:32 agentzh targeting LuaJIT.
20:32 agentzh and OpenResty
20:33 moritz agentzh: that's great; I hope you can keep up the performance as you add more features
20:33 agentzh moritz: thanks. yeah, we haven't really started optimizations yet.
20:33 MasterDuke agentzh: have you run it against roast? if so, what % of it passes?
20:33 moritz (or decide to implement only a well-defined subset to keep performance)
20:33 agentzh moritz: the goal is to make our p6 compiler generate code that is times faster than perl 5.
20:33 agentzh perl 5 is our performance reference.
20:34 agentzh rakudo is our functionality reference.
20:34 samcv how do you plan to implement NFG string types?
20:34 agentzh MasterDuke: not yet. but we'll get to that.
20:35 agentzh samcv: i think we'll just implement features we will use ourselves when creating other compilers.
20:35 agentzh like PHP/Python/Ruby/JS on LuaJIT.
20:35 agentzh it's part of our company's business.
20:35 MasterDuke agentzh: any blog posts or articles written about it?
20:35 agentzh so we have a team working on these.
20:35 samcv so you are not planning on implementing it?
20:36 samcv or it is not planned yet?
20:36 agentzh MasterDuke: will definitely write a few. we're still in the early phase.
20:36 samcv i could always help out if this becomes profitable
20:36 MasterDuke cool, look forward to them!
20:37 timotimo lizmat: no, not subs in general, just stuff that adds to EXPR somehow
20:37 timotimo it forces the NFA to have stuff added to it and then the optimizer runs over the whole thing again
20:37 samcv lizmat, now from 72 down to 52 seconds :)
20:37 timotimo so the first time it optimizes the whole core grammar NFA, then it optimizes that + a bit, then that + another bit, then that + one more extra bit
20:38 lizmat samcv: cool
20:38 timotimo so the work it has to do increases in a stupid way
20:38 timotimo TT recently started working on something that'll let us do this more efficiently
20:38 lizmat TT ?
20:39 japhb TimToady, I presume.
20:39 yoleaux 23 Jan 2017 14:01Z <jnthn> japhb: Probably setting the encoding to ASCII might do it too. Otherwise, use .read(1) - after all, you're after bytes, not chars.
20:39 timotimo yup
20:39 timotimo i couldn't backlog today, anything good happen? :)
20:40 Cabanossi joined #perl6
20:40 brokenchicken Yes! Perl 7 can do classes now!
20:40 brokenchicken :)
20:41 gfldex timotimo: believe it or not, there was another should-I-use-unicode-operators-discussion :->
20:41 MasterDuke timotimo: if you didn't backlog #moarvm, jnthn and i figured out why i didn't see radix being JITted. turns out moar won't jit the mainline of an NQP program, had to put it in a sub
20:42 jferrero joined #perl6
20:42 MasterDuke which led to https://github.com/MoarVM/MoarVM/pull/514
20:43 timotimo oh!!
20:43 timotimo were you able to find any performance improvement with the two things?
20:44 timotimo food time :)
20:44 MasterDuke 20m iterations of nqp::radix() (with just ascii chars) was 1s faster (7s -> 6s)
20:47 agentzh joined #perl6
20:48 agentzh samcv: not yet planned.
20:49 agentzh samcv: maybe at some point in the future. not sure. not a priority right now.
20:51 bjz joined #perl6
20:51 agentzh moritz: performance is our top concern, not completeness. so we choose perl 6 features that can be practically implemented efficiently enough and ignore those that can't (at least for now).
20:51 agentzh that's our advantage.
20:51 agentzh *grin*
20:51 ugexe like how all the other perl6 compilers started?
20:52 MasterDuke timotimo: and radix is called 6k times during a rakudo build, so that's a whole 0.0003s improvement!
20:52 agentzh ugexe: i can get the sarcasm. but i want to make it clear that ours is driven by real world business requirements. it's not a pet project nor a hobby :)
20:53 agentzh we have a full-time engineering team working on it seriously.
20:53 ugexe how many of you perl6 dev people think of your work on perl6 as a pet project or hobby?
20:54 * moritz does
20:55 * lizmat has always been hobbying for a living
20:55 moritz agentzh: I'm thrilled that there's another Perl 6 compiler project now. Please keep us up-to-date, and tell us if you need any help testing or so
20:56 * gfldex goes green of envy
20:56 agentzh moritz: thanks. very much appreciated. i've already been getting a lot of help here.
20:56 kurahaupo__ joined #perl6
20:56 * MasterDuke does (enough that i'm not sure i would even call myself a perl6 dev person)
20:56 agentzh i'll definitely keep posting our progress here :)
20:57 agentzh and share any findings.
20:57 moritz agentzh: does your compiler have a name already?
20:57 rba_ joined #perl6
20:57 agentzh moritz: yes, it's called fanlang.
20:58 agentzh The word Fan means "translate" in Chinese.
20:58 agentzh since perl 6 is a wonderful language to build compilers and transcompilers.
20:58 lizmat https://www.amazon.com/FANLANG-Foldable-Kitchen-Silicone-Trivets/dp/B01JOHKTIW  :-)
20:58 agentzh lizmat: lol
20:59 agentzh we started working on fanlang since last Nov.
20:59 agentzh so it's still very young.
20:59 agentzh we're trying hard to make it production ready next month.
20:59 agentzh we're hacking crazily.
21:00 agentzh we're gonna sell products written in perl 6 and compiled by fanlang soon.
21:01 agentzh it's so much fun coding in perl 6 and also implementing perl 6, even just a core subset of it.
21:01 moritz \o/
21:01 moritz and I'll have a bigger audience for my book :-)
21:01 agentzh ah, you're working on a book?
21:02 moritz yes, https://leanpub.com/perl6
21:02 agentzh yeah, we'll also try to help promote perl 6 in the industry.
21:02 cognominal joined #perl6
21:02 agentzh moritz: nice!
21:02 moritz about 2/3 done by manuscript length
21:02 agentzh moritz: glad to see you are still actively around after so many years.
21:02 moritz so probably 20% by effort
21:02 agentzh moritz: cool!
21:03 moritz agentzh: my involvement did reduce the last two years or so; with two small kids at home it was quite difficult to muster energy for anything except work and family :-)
21:03 agentzh i just coded a 8K LOC perl 6 project last week.
21:04 moritz 8K LOC sounds like my yearly output :-)
21:04 agentzh much shorter than my original p5 version.
21:04 agentzh and also much nicer.
21:04 agentzh moritz: i said we are crazy :)
21:05 agentzh moritz: yeah, that's understandable.
21:05 agentzh moritz: i had to reduce my workload when i had my daughter.
21:05 agentzh now she's 3 years old and i can hack a lot again.
21:05 agentzh *grin*
21:06 moritz agentzh: :-)
21:06 moritz agentzh: when my older daugther was a few weeks old, I could hold her on my lap while coding; the younger was was too big and restless for that :-)
21:07 agentzh lol
21:07 agentzh yeah, older kids want to compete on the keyboard :)
21:08 moritz aye
21:08 moritz and then they would point at the screen and say "papa" ("daddy") when they saw my github profile picture
21:09 mst being sat on my father's lap watching while he wrote code is what prompted me to try doing so myself
21:11 moritz Ms. 6 loves numbers (and learned adding multi-digit numbers on paper in a under half an hour), so I hope that's a good base for some scientific or engineering interest that I can kindle
21:13 moritz now I'm looking for child-compatible biographies of female scientists or engineers to serve as role models
21:15 SmokeMachine brokenchicken: how do I create a class in perl7?
21:15 brokenchicken ugexe: I think of it as a school.
21:16 brokenchicken SmokeMachine: https://github.com/perl7/perl7#object-orientation
21:17 AlexDaniel no semcicolons, no braces…
21:18 AlexDaniel /c//
21:18 ugexe I just think its disingenuous to consider a group of paid engineers as an argument for their producing higher quality "serious' work to that of volunteers (most of whom are paid engineers themselves)
21:18 AlexDaniel s
21:18 _28_ria joined #perl6
21:18 moritz ugexe: it's just a matter of time available
21:19 moritz and building on the experience of others
21:20 brokenchicken ugexe: my code quality in rakudo is about 1000% better than stuff I write for work.
21:20 ugexe brokenchicken: my thoughts exactly
21:22 RabidGravy tum ti tum
21:23 SmokeMachine brokenchicken: why had you changed your mind about fun ton?
21:24 brokenchicken SmokeMachine: because the code that handles functions and methods is the same and having methods declared with `fun ion` was silly :)
21:26 japhb .oO( Like silly ever stopped you before ... )
21:28 SmokeMachine I was expecting something like cla Foo met foo[a] say a hod ss
21:29 pyrimidi_ joined #perl6
21:30 SmokeMachine And why had you dropped the ?????
21:34 Geth book: e68b8c721c | Cale++ | src/subs-n-sigs.pod
21:34 Geth book: Update subs and sigs (#87)
21:34 Geth book:
21:34 Geth book: * Add file extension to open('scores')
21:34 Geth book:
21:34 Geth book: Did not compile without this.
21:34 Geth book:
21:34 Geth book: * Update basics.pod
21:35 Geth book: <…commit message has 30 more lines…>
21:35 Geth book: review: https://github.com/perl6/book/commit/e68b8c721c
21:36 brokenchicken SmokeMachine: just got annoyed trying to type it
21:37 labster joined #perl6
21:39 SmokeMachine :(
21:54 bjz joined #perl6
21:58 obfusk joined #perl6
22:01 bjz_ joined #perl6
22:10 Cabanossi joined #perl6
22:13 agentzh joined #perl6
22:16 kyan joined #perl6
22:22 BenGoldberg joined #perl6
22:23 chewzerita joined #perl6
22:24 chewzerita left #perl6
22:26 dugword joined #perl6
22:33 geekosaur joined #perl6
22:38 pmurias joined #perl6
22:40 Cabanossi joined #perl6
22:42 perlawhirl joined #perl6
22:50 pyrimidine joined #perl6
22:51 MasterDuke brokenchicken: you say "You can specify parameters with square brackets:", but all the examples use round parentheses, i.e., ()
22:53 timotimo square brackets are just for role parameters, i believe?
22:53 timotimo oh
22:53 timotimo that's for perl7
22:54 gfldex moritz: i got a real word example you may be able to use in your book of role mixin in https://github.com/gfldex/perl6-concurrent-file-find/blob/master/lib/Concurrent/File/Find.pm6#L120
23:10 Cabanossi joined #perl6
23:11 brokenchicken MasterDuke: a ye, I changed that too
23:12 MasterDuke changed! how can Perl 7 be considered production-ready when it just changes out from under you like that!
23:13 perlawhirl joined #perl6
23:13 dugword joined #perl6
23:16 brokenchicken :)
23:18 Actualeyes joined #perl6
23:19 avuserow joined #perl6
23:27 * samcv is still waiting for perl 6
23:27 samcv err i meant perl 8
23:29 lep-delete joined #perl6
23:34 njmurphy joined #perl6
23:44 _28_ria joined #perl6
23:52 Vynce joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo