Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-16

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:07 cpage_ joined #perl6
00:15 samcv hmm what is the way to check if a Proc::Async process is still running? I thought it was $proc.kill(0) but it's always returning 0
00:15 samcv before and after the program is killed. even after awaiting for the process is finished still returns 0
00:16 stmuk_ joined #perl6
00:17 samcv docs.perl6.org doesn't say this but S29 says:  The special signal 0 can be sent which does not actually deliver a signal at all, and is used to determine if processes are still running:  say "Still running" if $proc.kill(0); i think that's where i read about it initially
00:18 telex joined #perl6
00:25 pierre_ joined #perl6
00:25 pierre_ joined #perl6
00:40 sufrostico joined #perl6
00:47 sufrostico joined #perl6
00:49 kyclark joined #perl6
00:53 cpage_ joined #perl6
00:58 MasterDuke kyclark: "because check of the data" is either missing a "the" or should be "checking the data"
00:59 MasterDuke kyclark: "if we have a the forward or reverse strand" has an extra "the"
01:00 Actualeyes joined #perl6
01:00 samcv ahh actually S17 about proc async doesn't mention it... maybe the kill(0) isn't something you can do on proc async objects yet?
01:00 samcv S29 is about running programs other ways
01:03 samcv and the .started method for proc async objects only returns whether .start has been called on it already, not whether it's currently running
01:06 kyclark joined #perl6
01:11 sufrostico joined #perl6
01:12 kyclark Thanks.
01:12 MasterDuke samcv: .exitcode of the Proc says "Returns the exit code of the external process, or -1 if it has not exited yet.", but i guess you still wouldn't know if it actually had started yet
01:12 kyclark Is it possible to integrate matplotlib (Python) directly from Perl 6?
01:12 kyclark Or any plotting program, e.g., gnuplot?
01:13 samcv thanks MasterDuke
01:13 AlexDaniel kyclark: I think right now you'll have to use Inline::Python or something
01:13 MasterDuke kyclark: i've used SVG::Plot
01:14 samcv MasterDuke, .exitcode is not a method for Proc::Async
01:14 MasterDuke or Inline:Perl5 and Chart::Gnuplot
01:16 MasterDuke samcv: correct, it's Proc.exitcode(), you can get the Proc from awaiting the promise that Proc::Async.start() gave you
01:20 samcv i need to check after it's already been started though. how do i get the proc object created by proc::async.start?
01:21 samcv awaiting doesn't really help me since i need to determine if it's still running while it's running
01:23 canopus joined #perl6
01:28 MasterDuke Proc::Async.start(), "Returns a promise that will be kept with a Proc object once the external program exits, and that will be broken if the program cannot be started."
01:28 MasterDuke samcv: i agree, Promise, Proc, Proc::Async are all a bit confusing
01:29 Xliff Supplier, Supplies...
01:29 MasterDuke and i'm not sure how to do what you're asking
01:29 Xliff I'm still trying to go through it all.
01:29 samcv heh Xliff
01:29 Xliff MasterDuke: Sounds like he's trying to start an external program in P6, then come back later and check to see that it is still running.
01:31 MasterDuke yeah, and i don't know a great way to do that
01:31 Xliff So, I think you are fine. If you can get a Promise from Proc::Async, then as long as that promise has not been kept or broken, the program should still be running.
01:32 samcv oh MasterDuke i can do $promise.status and if it's kept then know it's not running
01:32 MasterDuke sure
01:32 samcv that works for me
01:33 samcv what i'm needing to do is before outputting to the external program, check if it's still running, and if it's not, start it again. so that should work
01:34 samcv well will just make a new promise and new proc async object into the same variables basically
01:34 Xliff samcv: $process_still_running = $async_promise.status == Planned
01:34 samcv yea
01:35 Xliff kk then.
01:35 Xliff Good Luck! ;)
01:35 samcv though idk if you can use == though
01:35 samcv i would probably use ~~.  == is for numerical equality
01:35 samcv so don't use that
01:35 Xliff It's an enum. == should be fine.
01:36 samcv ah ok
01:36 samcv it does work just tested
01:36 Xliff Good to check, though.
01:36 samcv now gonna read infix == docs :P
01:37 samcv hmm Coerces both arguments to Numeric if necessary, and returns True if they are equal.
01:37 Xliff Awww... poor puppy! ]8-)
01:37 Xliff Yes. And enums are numeric at heart.
01:37 samcv yeah. what's what i was thinking must be true
01:38 samcv otherwise it wouldn't make much sense
01:38 Xliff Although I am thinking it is not that simple in rakudo.
01:38 samcv m: say Planned.Int; say Kept.Int;
01:38 camelia rakudo-moar ee8ae9: OUTPUT«0␤1␤»
01:38 samcv it is true :)
01:39 Xliff m: say Broken.Int
01:39 camelia rakudo-moar ee8ae9: OUTPUT«2␤»
01:42 samcv my enum PromiseStatus (:Planned(0), :Kept(1), :Broken(2)); there in rakudo
01:47 ugjka joined #perl6
02:04 Xliff But of course!
02:06 Xliff Does anyone know of any examples that use LWP::Simple to send POST with form data?
02:13 dj_goku Xliff: maybe https://metacpan.org/pod/LWP::Simple::Post
02:19 skids joined #perl6
02:29 Xliff dj_goku++: Looks promising. Thanks!
02:30 Xliff Hrm...
02:30 Xliff Still a little raw, from the looks of it, though.
02:40 kyclark joined #perl6
02:41 Actualeyes joined #perl6
02:46 evdubs joined #perl6
02:46 mayathecat joined #perl6
02:46 Actualeyes left #perl6
02:48 ilbot3 joined #perl6
02:48 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:51 Actualeyes joined #perl6
02:52 dataangel joined #perl6
02:57 aborazmeh joined #perl6
02:57 aborazmeh joined #perl6
03:14 pierre_ joined #perl6
03:18 kyclark Given a list of two elements, is there a quick way to make them into a Pair?
03:19 kyclark m: "1 2".split(/\s+/)
03:19 camelia rakudo-moar ee8ae9: ( no output )
03:19 kyclark m: put "1 2".split(/\s+/)
03:19 camelia rakudo-moar ee8ae9: OUTPUT«1 2␤»
03:27 kyclark m: put %("1 2".split(/\s+/))
03:27 camelia rakudo-moar ee8ae9: OUTPUT«1    2␤»
03:27 kyclark m: say %("1 2".split(/\s+/)).WHAT
03:27 camelia rakudo-moar ee8ae9: OUTPUT«(Hash)␤»
03:28 kyclark m: put %("1 2".split(/\s+/)).perl
03:28 camelia rakudo-moar ee8ae9: OUTPUT«{"1" => "2"}␤»
03:28 labster joined #perl6
03:28 pierre_ joined #perl6
03:32 mayathecat joined #perl6
03:39 BenGoldberg joined #perl6
03:40 AlexDaniel m: say [=>] "1 2".split(/\s+/)
03:40 camelia rakudo-moar ee8ae9: OUTPUT«1 => 2␤»
03:40 AlexDaniel kyclark: ↑ ?
03:40 noganex joined #perl6
03:40 dj_goku Xliff: why not something in perl6?
03:41 kyclark Yeah, sort of.  I’ve got a file of lines that I want to make into a hash, but I’m realizing I’m going the wrong way.  But this did work:
03:41 kyclark $file.IO.lines.map(*.split(/\s+/)).flat.pairup;
03:41 AlexDaniel pairup, yeah!
03:41 kyclark I was trying to remember that [] thing.  How can I remember that?
03:42 AlexDaniel it is just a reduction
03:42 kyclark Just gotta use it some more.
03:42 AlexDaniel like in [+] 2, 5, 15, 20
03:42 AlexDaniel but you can use any other operator, e.g. =>
03:42 Xliff dj_goku: I am in the process of working on that, now.
03:43 kyclark That’s really cool.  I’m feeling small right now.  I want to convert some R code into Perl 6 and make some cool plots like I might in R or Python, but we’ve no such libraries (yet)
03:43 Xliff There's SVG::Plot
03:43 Xliff But I don't know what you are trying to do, so I couldn't tell you if that would work, for sure.
03:45 AlexDaniel committable6: stdin hello world test␤foo bar␤
03:45 committable6 AlexDaniel, STDIN is set to «hello world test␤foo bar␤»
03:45 AlexDaniel committable6: HEAD say lines.map(*.split(/\s+/, 2)).flat.pairup
03:45 committable6 AlexDaniel, ¦«HEAD»: (hello => world test foo => bar)
03:45 AlexDaniel committable6: HEAD say lines.map([=>] *.split(/\s+/, 2))
03:45 committable6 AlexDaniel, ¦«HEAD»: Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/tyoyTJqw24 line 1␤ «exit code = 1»
03:46 AlexDaniel right
03:46 Xliff m: sub a($s) { $s ~ 'a'; } "Testing"."a"().say
03:46 camelia rakudo-moar ee8ae9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub a($s) { $s ~ 'a'; }7⏏5 "Testing"."a"().say␤    expecting any of:␤        infix␤        infix stopper␤        s…»
03:46 Xliff hrm.
03:47 Xliff Just when I think I get the hang on something.
03:49 AlexDaniel m: sub a($s) { $s ~ ‘a’; }; ::("&a")(‘Testing’).say
03:49 camelia rakudo-moar ee8ae9: OUTPUT«Testinga␤»
03:49 AlexDaniel Xliff: I have no idea what were you trying to do
03:50 dj_goku Xliff: :D
03:50 AlexDaniel perhaps if you can say what your goal is, we can give a better answer
03:50 Xliff $obj."$meth"() was it?
03:50 gfldex samcv: did you check if stdout is not closed yet? (does not work for all programs tho)
03:50 Xliff A way of augmenting a class without actually using "augment"
03:51 Xliff I'll have to look it up later.
03:54 Xliff m: $a = 'aa' => 42; say $a.list;
03:54 camelia rakudo-moar ee8ae9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a = 'aa' => 42; say $a.list;␤»
03:54 Xliff m: my $a = 'aa' => 42; say $a.list;
03:54 camelia rakudo-moar ee8ae9: OUTPUT«(aa => 42)␤»
04:03 kyclark Do junction type constraints work like “Str|Regex”?
04:04 kyclark I have a method that could take either a Str or a Regex for a given param (it would be used for “split")
04:08 BenGoldberg Try it and see.
04:09 kyclark Sorry, I did, and it complained.  I guess I was wondering if I had the wrong syntax.
04:10 kyclark I thought I remembered seeing that somewhere.
04:11 MasterDuke m: sub a($b where Str|Array) { say $b.WHAT }; a([1, 2, 3]); a("abc")
04:11 camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤(Str)␤»
04:12 MasterDuke m: sub a($b where Str|Array) { say $b.WHAT }; a([1, 2, 3]); a("abc"); a(2)
04:12 camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤(Str)␤Constraint type check failed for parameter '$b'␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:17 AlexDaniel MasterDuke: this example asks for +@b :)
04:19 labster joined #perl6
04:19 AlexDaniel m: sub a(+@b) { [+] @b».chars }; say a([‘abc’, ‘a’, ‘zz’]); say a("abc", ‘z’)
04:19 camelia rakudo-moar ee8ae9: OUTPUT«6␤4␤»
04:21 raiph joined #perl6
04:21 MasterDuke i haven't played with with the different kinds of slurpy parameters. i've read the docs about + vs *, but that's about it
04:30 raiph joined #perl6
04:51 BenGoldberg m: my \SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( [] );
04:51 camelia rakudo-moar ee8ae9: OUTPUT«===SORRY!===␤No compile-time value for SorA␤»
04:52 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( [] );
04:52 camelia rakudo-moar ee8ae9: OUTPUT«Type check failed in binding to $x; expected Junction but got Array ($[])␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:52 BenGoldberg m: constant SorA = Str|Array; sub a($x where SorA) { $x.WHAT.say }; a( [] );
04:52 camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤»
04:52 pierre_ joined #perl6
04:53 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( "is this useful?" | []  );
04:53 camelia rakudo-moar ee8ae9: OUTPUT«(Junction)␤»
04:53 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( 42 | []  );
04:53 camelia rakudo-moar ee8ae9: OUTPUT«(Junction)␤»
04:53 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 | {}  );
04:53 camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:53 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 | []  );
04:53 camelia rakudo-moar ee8ae9: OUTPUT«any(42, [])␤»
04:54 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ []  );
04:54 camelia rakudo-moar ee8ae9: OUTPUT«one(42, [])␤»
04:54 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ &a  );
04:54 camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:54 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ sub { "foo" }  );
04:54 camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:55 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | [] );
04:55 camelia rakudo-moar ee8ae9: OUTPUT«any([], [])␤»
04:55 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | ( 42 & pi ) );
04:55 camelia rakudo-moar ee8ae9: OUTPUT«any([], all(42, 3.14159265358979e0))␤»
04:56 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | ( 42 & pi & sub { "why not?" } ) );
04:56 camelia rakudo-moar ee8ae9: OUTPUT«any([], all(42, 3.14159265358979e0, sub () { #`(Sub|70531392) ... }))␤»
04:56 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | sub { "why not?" } );
04:56 camelia rakudo-moar ee8ae9: OUTPUT«any([], sub () { #`(Sub|54537016) ... })␤»
04:57 BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( sub { "why?" } | sub { "why not?" } );
04:57 camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub a at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
05:15 dj_goku is there a way to add to a buf?
05:17 AlexDaniel m: my $b = Buf.new(1, 2, 3); $b.push(42); say $b
05:17 camelia rakudo-moar ee8ae9: OUTPUT«Buf:0x<01 02 03 2a>␤»
05:17 AlexDaniel dj_goku: is that what you mean?
05:22 Cabanossi joined #perl6
05:23 bjz joined #perl6
05:29 dj_goku AlexDaniel: yes! I am trying to start something up using nc -ul 9999 and interface with IO::Socket::Async, but when I try to $socket.print-to() it doesn't print out.
05:43 bjz joined #perl6
05:53 pierre_ joined #perl6
06:00 rurban joined #perl6
06:11 xinming_ joined #perl6
06:13 Tonik joined #perl6
06:21 xinming joined #perl6
06:21 pierre_ joined #perl6
06:23 wamba joined #perl6
06:30 officialsandeep8 joined #perl6
06:31 officialsandeep8 What is the difference between Perl 5 and Perl 6?
06:36 cyphase joined #perl6
06:40 rurban joined #perl6
06:42 gfldex officialsandeep8: see the 5to6-* sections on https://docs.perl6.org/language.html
06:44 domidumont joined #perl6
06:48 domidumont joined #perl6
06:50 domidumont joined #perl6
06:52 RabidGravy joined #perl6
06:52 domidumont joined #perl6
06:59 labster joined #perl6
07:00 officialsandeep8 left #perl6
07:06 cyphase joined #perl6
07:06 abraxxa joined #perl6
07:12 neuraload joined #perl6
07:13 eivindgl joined #perl6
07:15 RabidGravy boom!
07:19 darutoko joined #perl6
07:27 cyphase joined #perl6
07:27 pierre_ joined #perl6
07:33 seatek I just had to create a Crust::Middleware::Sessions::Store for databases using DBIish (instead of storing in memory/cookies). Figured I might as well upload it for others. But I don't even know where to begin. Just upload it to my own github account?
07:33 firstdayonthejob joined #perl6
07:36 gfldex seatek: yes
07:36 gfldex seatek: if you link the repo I can gladly tell you what you did wrong. :->
07:36 seatek cheeky gfldex ;)
07:36 seatek ok :)
07:37 seatek i put my public ssh key up there.... now i guess i just have to create the repo there... can't just push to something that doesn't exist there yet already i imagine
07:41 seatek ugh web interfaces
07:42 abraxxa joined #perl6
07:42 bjz joined #perl6
07:44 [ptc] seatek: if you don't like web interfaces, maybe this will come in handy: https://github.com/ingydotnet/git-hub
07:46 seatek [ptc] oh my gosh i'm going to set that up to use from now on. just did the web interface finally before i saw it though
07:48 seatek gfldex: ok there it is, and i have no idea how to write tests for it outside of here (since everyone has their own database auth stuff). but it passes all Crust::Middleware::Session tests when it's used as the storage backend
07:49 seatek https://github.com/adaptiveoptics/Cr​ust-Middleware-Session-Store-DBIish
07:52 seatek decided to use JSON::Fast from timotimo to do the serialization for the database. since it's so superior to JSON::Tiny ;)
07:52 seatek hehe
07:57 seatek honestly i hate storing any kind of session data to a database. it ends up like the... "i'll get around to that some day" garbage heap
07:57 [ptc] joined #perl6
07:58 seatek oh i should put in some column type information
08:00 moritz \o
08:00 moritz Hello from the Devops days Berlin!
08:05 [ptc] o/
08:06 [ptc] moritz: I'm interested to hear how the conference goes
08:06 [ptc] moritz: your work is a sponsor, am I right?
08:11 cyphase joined #perl6
08:14 aindilis joined #perl6
08:18 rindolf joined #perl6
08:19 TimToady d
08:20 rurban joined #perl6
08:20 moritz [ptc]: it is
08:20 moritz [ptc]: will tell you once I know :-)
08:22 rurban left #perl6
08:23 [ptc] moritz: hope you have a good tim e:-)
08:23 zakharyas joined #perl6
08:23 [ptc] *time
08:23 moritz [ptc]: thanks
08:26 seatek gfldex: i assume the perfection has left you speechless in awe
08:27 seatek gfldex: honestly, have no idea what i'm doing there. Needed a META whatever, which I completely guessed at
08:27 domm joined #perl6
08:28 seatek and it drives me nuts not having a test for it, but i don't know how i possibly could, considering it needs both the Crust PSGI interface AND a database connection
08:28 seatek so i just test it here ;)
08:28 avalenn_ is there any way to have localized month names with strftime ?
08:30 bjz joined #perl6
08:32 masak morning, #perl6
08:32 xinming joined #perl6
08:36 ufobat joined #perl6
08:37 pierre_ joined #perl6
08:38 seatek avalenn_: do you mean with DateTime::Format? I think it uses native strftime... ? so shoudl be
08:39 seatek oh docs on it say It also comes with some localizations for month and day names.
08:40 avalenn_ I tested and localization seems not to work.
08:42 avalenn_ and some strftime codes are not recognised
08:43 brillenfux joined #perl6
08:44 nadim joined #perl6
08:44 seatek %B is recognized -- i just checked
08:44 seatek it spoke french to me.. unsettling
08:45 seatek use DateTime::Format;
08:45 seatek use DateTime::Format::Lang::FR;
08:45 seatek my $d = DateTime.new(now);
08:45 seatek strftime("%B", $d, :lang<fr>);
08:45 seatek and it will say: novembre
08:48 trnh joined #perl6
08:48 trnh joined #perl6
08:49 g4 joined #perl6
08:57 avalenn_ I lacked the :lang attribute
08:58 avalenn_ thank you
08:59 brrt joined #perl6
08:59 brrt \o #perl6
09:00 brrt I would like to help out and write an advent calendar post
09:00 moritz \o/
09:04 brrt let me see if I actually have a commit bit :-)
09:04 DrForr https://github.com/perl6/mu/blob/ma​ster/misc/perl6advent-2016/schedule
09:05 DrForr I need to add mine when I come up with something.
09:05 moritz brrt: if not, tell me your github userid
09:07 dalek mu: 41619f2 | brrt++ | misc/perl6advent-2016/schedule:
09:07 dalek mu: Add myself to the advent calendar list
09:07 dalek mu:
09:07 dalek mu: Would like to write a post from the perspective of perl6 as a hackable language with a hackable JIT compiler (which is after all the aim :-))
09:07 dalek mu: review: https://github.com/perl6/mu/commit/41619f2043
09:07 brrt I can haz one
09:07 moritz brrt++
09:08 moritz everybody who can't log in on perl6advent.wordpress.com, please /msg me your email address, I'll send you an invite
09:09 brrt if you are in a pinch, I have another topic in the waiting, but that will require some more upfront work
09:09 brrt i.e. the original work was done in perl5 and in python, so it would have to be ported
09:09 brrt .ask masak I wonder what you think of the 'hackable language' idea, and if maybe 007 can fit in
09:09 yoleaux brrt: I'll pass your message to masak.
09:12 pierre_ joined #perl6
09:16 brrt moritz: I can log in
09:16 brrt so, yay
09:32 khw joined #perl6
09:33 dakkar joined #perl6
09:35 Actualeyes joined #perl6
09:42 domm joined #perl6
09:51 cdg joined #perl6
09:52 ocbtec joined #perl6
09:54 cdg joined #perl6
09:59 cyphase joined #perl6
10:10 bjz_ joined #perl6
10:12 gregf_ joined #perl6
10:15 camelia joined #perl6
10:21 camelia joined #perl6
10:23 mohae joined #perl6
10:26 dalek joined #perl6
10:26 pierre_ joined #perl6
10:27 jonas2 joined #perl6
10:30 tbrowder hi, #perl6
10:30 masak \o
10:30 yoleaux 09:09Z <brrt> masak: I wonder what you think of the 'hackable language' idea, and if maybe 007 can fit in
10:30 tbrowder o/ masak!
10:31 tbrowder I hate to be a Scrooge as we approach the Advent season, but I have a complaint about the font faces on the docs site.
10:32 masak let's hear it
10:32 masak brrt: yes -- quite possibly. let's discuss it more
10:33 tbrowder The use of the sans-serif font for most Roman text hides things form those without perfect vision, and also from those with, and I think it really must confuse those who native alphabet doesn't use all the Roman letters.
10:34 huf i dont think anyone on the internet is surprised by sans-serif fonts... that would be very strange.
10:35 huf but maybe it's harder to read, i dunno
10:35 tbrowder For example, take the module "DBIish":  The "I" looks like an 'ell' but it's an upper case "I" (eye).
10:36 brrt I think the idea of a 'hackable language' is that you can fit in any abstraction you'd like
10:37 brrt or rather, the language can evolve with your abstractions, doesn't force them on you
10:37 pierre_ joined #perl6
10:37 tbrowder Even if one must use sans-serif, there must be some that distinguish between such characters (also: the digit "one" versus the letter "ell" and digit "zero" from letter "oh"...)
10:37 huf nah, those fonts are notorious for the I1l problem
10:37 brrt that can help when new paradigms appear (like neural nets / tensorflow
10:37 huf which is why they're absolutely horrible for programming
10:38 tbrowder Uh, pardon me, but a hackable language is a poor common denominator for communication among diverse cultures.
10:38 huf wat
10:39 brrt i wonder what you mean with diverse cultures
10:39 brrt and, I disagree
10:39 masak brrt: 'hackable language' is pretty much what 007 aspires to be
10:39 brrt natural languages are hackable almost to a fault
10:39 masak tbrowder: I respectfully disagree
10:39 brrt ambiguity is a problem, but not an insurmountable
10:40 tbrowder So we each use  a word as we want it to mean, with no common definition?
10:40 tbrowder Bah, humbug!
10:40 maybekoo2 joined #perl6
10:41 masak tbrowder: don't know if you're serious, but you're putting up a bit of a strawman to knock down
10:41 masak no-one suggested words should have no fixed meaning :)
10:41 masak I would suggest that CPAN *already* shows that "hackable language" is a viable strategy
10:42 huf also this is already the case because nearly every language lets you write functions and any sizeable codebase is mostly calls to those functions
10:42 masak Perl 6 simply aims to do it a bit more formally
10:42 huf and those are already whatever you want them to be
10:42 brrt it's just that 'fixed' is a kind of relative idea :-P
10:42 huf so this is both already the case in every progland and not the case at all in any progland
10:42 huf g
10:42 huf impressive strawman :)
10:43 brrt the whole question is how to allow language to be extended while still enabling communication
10:43 brrt natural languages allow words to be... combined, and modified, and inflected (I think is the word)
10:43 brrt based on the rules of grammar and usage
10:43 dalek doc: 73f7a31 | seatek++ | doc/Language/modules.pod6:
10:43 synopsebot6 Link: http://doc.perl6.org/language/modules
10:43 dalek doc: Create META.info files not META6.json files
10:43 dalek doc:
10:43 dalek doc: Assuming that's what everyone wants now, since that's all that seems to be used.
10:43 dalek doc: review: https://github.com/perl6/doc/commit/73f7a3163e
10:43 timotimo flex all the words
10:44 brrt but it is because those changes are themselves limited by rules that we can understand what they mean
10:44 tbrowder I guess I don't understand what is meant by a hackable language (unless you're referring to Perl 6 and other such languages.  My whole problem here is the visual words on a page and being able to distinguish individual characters.
10:44 brrt and the same holds for perl6, I think
10:45 huf tbrowder: you pick the fonts you see
10:48 brrt It is a good question because the concept is not very strictly defined?
10:48 brrt unless someone knows of a definition
10:49 dalek ecosystem: 97cdaa0 | seatek++ | META.list:
10:49 dalek ecosystem: Crust::Middleware::Session::Store::DBIish added
10:49 dalek ecosystem:
10:49 dalek ecosystem: Implements a DBIish database backend store for Crust::Middleware::Session stuff
10:49 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/97cdaa01e2
10:51 tbrowder huf: okay, I can do that, but I don't usually have to customize my browser for every site I go to--just saying.
10:51 tbrowder (puts Scrooge persona away...)
10:51 huf i gave up on fonts as picked by other people long ago
10:52 huf they almost invariably pick bad ones
10:52 huf i suppose it's fashion
10:53 tbrowder Another subject: are the advent articles expected to be original, i.e., never have appeared before?
10:59 canopus joined #perl6
11:01 isacloud joined #perl6
11:02 cpage_ joined #perl6
11:22 spebern joined #perl6
11:23 tbrowder .tell moritz Are the advent articles expected to be original, i.e., never have appeared before?
11:23 yoleaux tbrowder: I'll pass your message to moritz.
11:25 spebern hi, I have a question concerning NativeCall: I want to use the following function to get the name of a excel worksheet: FREEXL_DECLARE int freexl_get_worksheet_name (const void *xls_handle, unsigned short sheet_index, const char **string);
11:25 spebern
11:25 spebern
11:25 spebern my first idea was that this should boil down to sub freexl_select_active_worksheet(Pointer $xls_handle, uint16 $sheet_index --> int32) is native(&freexl_lib) { * }
11:25 spebern
11:26 spebern ups, I meant: sub freexl_get_worksheet_name(Pointer $xls_handle, uint16 $sheet_index, Pointer[Str] $name --> int32)
11:26 spebern is native(&freexl_lib) { * }
11:26 AlexDaniel joined #perl6
11:26 rindolf joined #perl6
11:27 spebern I also tried Str $name is rw, but $name will never store the worksheet after calling the function
11:27 timotimo oooooh, you're working on excel spreadsheet support?
11:27 spebern yes I wanted to give it a try, everything works so far
11:27 timotimo that's super cool
11:27 spebern it works perfectly
11:28 spebern the only problem is the double pointer
11:28 timotimo can it handle the newest excel versions already? i see the last release is from 2015-07, so more than a year old ...
11:28 spebern it handles xls
11:28 timotimo oh, so not the new format. understood.
11:29 spebern I only found a commercial lib handling xls
11:29 spebern *xlsx
11:29 timotimo ugh ;(
11:30 spebern I thought char* boils down to Str, so shouldnt char** be "Str is rw" ?
11:30 timotimo thing is, if you pass a Str in, we'll decode it (by default to utf8) and pass a pointer to our "temporary" char array
11:31 timotimo i'm not sure how nativecall handles getting a pointer to a string back
11:31 timotimo personally, i'd probably fumble around with CArray here
11:32 timotimo oh, what. freexl ignores formulas?
11:32 timotimo that makes it not interesting to what i was thinking of >_<
11:32 spebern ok, so I'll try CArray. Thanks :-). I'm more than amazed how easy to use NativeCall already is!
11:32 timotimo good luck!
11:33 spebern only found a xlsx lib in objective c -.-
11:37 viki tbrowder: it'd be preferable, since the Advent may be read by people who saw the in-original post before.
11:42 gfldex seatek: did crust install for you without problems?
11:45 seatek gfldex: yup no problem. but that was a few days ago... something might have happened in the meantime?
11:46 gfldex seatek: i'm getting failing tests in Crust itself, some Auth stuff doesn't work
11:48 seatek gfldex: lemme try on a system i haven't used for a while -0 that never had it on it -- i'll update current stuff and give it a shot
11:51 seatek wow crust has a lot of dependencies
11:52 timotimo it brings together the best code at your fingertips
11:52 wamba joined #perl6
11:53 seatek gfldex: installed perfectly fine for me. you probably broke your perl with all the funny stuff you do
11:53 seatek timotimo: it IS sooo nice to have here :)
11:53 seatek i've been using the SCGI interface in it, with an nginx frontend
11:54 seatek timotimo: oh I'm using your JSON::Fast to serialize session data in Crust::Middleware::Sessions for DBIish backends
11:54 skids joined #perl6
11:55 seatek i figure that's best if it's so fast... ;) since it has to be done every hit on the website doing session data
11:56 timotimo yeah. i wish it were a bit faster still :|
11:56 seatek i think you might be obsessed
11:56 seatek it's very fast!
11:57 timotimo are you kidding ...
11:57 seatek i just hope it serializes all kinds of data properly
11:57 timotimo only if you accept the general slowness of perl6 :P
11:57 timotimo i'm not responsible for *that* part :D
11:57 timotimo the first version i stole from JSON::Tiny, the second version is 1:1 JSON::Faster
11:58 * masak .oO( note to self: try not to call people who make Perl 6 modules faster "obsessed" ) :P
11:58 seatek hehe true masak :)
11:59 timotimo seatek: how long would you expect a 50 megabyte json file to be loaded?
12:01 timotimo python's json module - though it is written in C if i'm not mistaken - does it in about two or three seconds. JSON::Fast takes about 45 seconds
12:01 timotimo not to mention how much RAM it noms
12:02 seatek that would be horrific!
12:03 seatek why would anyone do that?
12:04 timotimo http://clientupdate-v6.cursecdn.com/f​eed/addons/432/v10/complete.json.bz2  -  this real-life piece of data
12:04 ggoebel joined #perl6
12:05 timotimo so anyway. i'd like another factor of 10, please.
12:05 * timotimo BBL
12:06 araujo joined #perl6
12:06 araujo joined #perl6
12:06 seatek i can't even load that into my text editor in under 30 seconds!
12:06 seatek well, gedit at least ;)
12:07 masak just make sure that ain't an argument against your editor :P
12:08 masak (I just created a 50M dummy file using Perl 6. it took a few seconds to generate, and pressing `G` (end of file) in vim also made vim hesitate for a few more seconds than I expected)
12:08 masak currently trying to parse the dummy file with JSON::Fast. it's taking more than 45 seconds, I can say that.
12:08 masak (I'm on a reasonably new laptop)
12:08 seatek gedit took forever. emacs was fast. but it warned me -- REALLY.. a 50Mb file? You want to open that??
12:08 timotimo hehe.
12:09 seatek gedit was syntax highlighting it nicely though
12:09 tadzik plot twist: emacs was already loading it while asking the question to appear faster than gedit
12:09 seatek see? emacs is smart
12:09 tadzik . o O ( be like emacs )
12:11 seatek ooo wow addons :)
12:11 seatek there are just too many
12:11 seatek that's what all this means
12:12 masak process is still running
12:12 masak I think I'm now well into memory thrashing territory
12:12 seatek hehe
12:13 tadzik I imagine a trenchline along the L3 cache
12:13 seatek well, as for storing session data in json in a database -- it's absolutely the database latency that's going to cause trouble
12:13 tadzik lines being blown up
12:13 masak done!
12:13 seatek and any person storing 50Mb of data in a session deserves their servers to freeze up
12:13 MilkmanDan joined #perl6
12:13 masak real 8m18.149s
12:14 seatek wowo
12:14 masak my json data file was simply 2 million entries of the form `"foo4": 4,`
12:14 masak gonna try it with timotimo's file now
12:15 masak expecting same-ish results
12:15 jantore ccccccfnjbftnlreukervcultbnvudhleeitrhhtunib
12:15 seatek use something that will syntax highlight it
12:15 jantore oops ;-)
12:16 masak I was wrong
12:16 masak timotimo's complete.json did indeed take 45 seconds.
12:16 timotimo only a few days ago i made it go from about 1:05 to 45
12:16 masak hey, why does one file take 45 seconds and the other one 8 minutes?
12:16 masak is it because I'm building a huge hash?
12:16 Hotkeys joined #perl6
12:16 timotimo maybe
12:17 timotimo i expect hashes, arrays, strings all have different performance characteristics
12:17 masak is there a way to measure just the time of the parse, not the time of building objects in memory?
12:17 timotimo not in JSON::Fast.
12:17 seatek that would be an interesting metric
12:18 timotimo just comment out all the parts that put stuff into stuff :P
12:18 seatek it's too fast to care about such things :)
12:18 * masak does that
12:19 bazzaar joined #perl6
12:20 bazzaar o/ perl6
12:21 pmurias joined #perl6
12:21 pmurias seatek: re why would anyone do this, if you get a 50MB JSON from somewhere you have to process it somehow
12:24 arnsholt Sometimes, that's just how big your data set is
12:24 seatek pmurias: it's true. i spend so much time thinking transactionally that this seems obscene
12:24 masak it wasn't trivial to rip out object creation, because of `if $key.DEFINITE {`
12:24 masak I almost made it, though :) a more concerted effort might get me there
12:27 bazzaar m: grammar REST { token TOP { <backslash> }; proto token backslash {*}; token backslash:sym<n> { :i <sym> } } ; say REST.parse('n');
12:27 camelia rakudo-moar ee8ae9: OUTPUT«「n」␤ backslash => 「n」␤  sym => 「n」␤»
12:27 bazzaar m: grammar REST { token TOP { <backslash> }; proto token backslash {*}; token backslash:sym<n> { :i <sym> } } ; say REST.parse('N');
12:28 camelia rakudo-moar ee8ae9: OUTPUT«Nil␤»
12:28 timotimo masak: that's for signaling if we'll get a key or a value next
12:28 timotimo masak: you can just set 1 instead of a key or value there, i'm sure
12:29 iH2O joined #perl6
12:30 masak aye
12:30 masak lunch break is over though, so I'll try it some other time :>
12:30 bazzaar re. earlier discussion on use of <sym> token, with a modifier such as :i (former is compiled, latter works lexically)
12:31 KevinYang joined #perl6
12:32 bazzaar I just want to point out there are 13 lines of code that use this combination in src/Perl6/Grammar.nqp
12:32 bazzaar @linux:~/rakudo/rakudo-star-2016.10/rakudo> grep -FR ':i <sym>' src/*
12:32 tadzik perhaps a JSON::Fast::Streaming would be in order, one that doesn't build data structures but calls callbacks on thingts
12:33 tadzik (SAJ parser)
12:33 Actualeyes joined #perl6
12:34 masak tadzik: I had the same thought
12:34 viki bazzaar, good catch. The :i should be removed IMO
12:34 timotimo i had the same thought in the past, too
12:34 masak it could even riff off SAX and make corresponding events
12:35 viki bazzaar, would you submit a PR?
12:35 viki bazzaar, run make spectest after the change to ensure nothing broke
12:36 rurban joined #perl6
12:36 bazzaar viki: I was afraid someone would say that :) I'm not entirely sure how to go about it, I've got to do one for a doc change too
12:37 viki heh
12:38 * viki shall write an article for this stuff today
12:38 bazzaar I've got as far as forking and cloning the repo, but after that I am unsure
12:38 viki too many people asking and I have no good reply
12:39 Sgeo joined #perl6
12:39 viki Maybe someone can help bazzaar right now? I'm on my phone which is a pita to type on :(
12:39 bazzaar I would contribute, I just need to get over this hurdle
12:41 bazzaar Is there a step by step guide that anyone can refer me to
12:42 timotimo do you have an account on github.com? that's generally how we accept pull requests, but we can do it other ways, too
12:42 seatek the one i did was... you go to the page at github -- the file -- and hit Pull -- then you can make your changes and submit them back
12:42 seatek they get reviewed and merged back in
12:45 aries_liuxueyang joined #perl6
12:45 bazzaar yes I have an account and Moritz kindly gave me direct push access to carry out the PR
12:46 timotimo cooln
12:46 timotimo okay, when you've made your changes, ideally not committed yet, you can "git checkout -b name-of-your-change"
12:46 timotimo then you can commit your changes to be on that branch you just created
12:46 timotimo when you then "git push origin name-of-your-change", it'll land on github
12:47 timotimo when you next open up the rakudo/rakudo repository page, it'll show your just-pushed branch above the file list and have a "compare and PR" button (or something)
12:48 domidumont joined #perl6
12:49 bazzaar timotimo: (and viki, and setek) thanks for your help, I will give it a go
12:49 bazzaar apologies.. seatek
12:50 * timotimo BBL
12:50 seatek no prob bazar :)
12:50 bazzaar :)
12:51 masak tadzik: ooh
12:51 masak tadzik: could even do a JSON::Stream and have it work through Channels
12:52 masak and the `whenever` keyword and the like
12:52 masak I think that'd be a killer, but I'm not 100% sure it'd be the fastest
12:55 iH2O left #perl6
12:55 tadzik . o O ( a performance killer )
12:59 masak reading your JSON through streams isn't for everything -- but with the `whenever` sugar I could see it being sometimes really nice
12:59 masak and once you get up to things like 50M (and for certain uses) I could see it being a reasonable solution
13:00 arnsholt Especially if you only need part of the data
13:00 arnsholt In which case a pull-style system is probably useful
13:01 masak it's a sliding scale -- DOM is when you want to get into the fray and manip things. SAX/SAJ is for when you mostly want to pick up individual bits here and there, but do no modification
13:04 viki bazzaar: if moritz gave you access, you don't need a separate branch. You can just commit directly. git commit file/you/changed; *describe the change in the editor that pops up*; git push
13:06 bazzaar viki: thanks for that info
13:14 moritz .tell tbowder original content is preferred, but you can adopt existing articles if they haven't had too many readers yet
13:14 yoleaux moritz: I'll pass your message to tbowder.
13:15 yoleaux 11:23Z <tbrowder> moritz: Are the advent articles expected to be original, i.e., never have appeared before?
13:16 cyphase joined #perl6
13:17 iH2O joined #perl6
13:19 iH2O perl6s magnitude has now reached the level of a science
13:19 viki What does that mean?
13:20 iH2O means its as big as or bigger than physics
13:20 iH2O :-P
13:20 viki :/
13:20 rurban left #perl6
13:21 huf how big is physics? in m^3
13:22 masak a bit smaller than a duck, but bigger than a hamster
13:22 masak the reason people find this unintuitive is that they never see physics running around on the ground, like one might see a duck or a hamster
13:23 huf are you saying that it floats?
13:23 masak depends on the physics
13:23 masak some physics float, others sink
13:23 huf what i'm getting at here really is this: is it a witch?
13:23 masak yes. very yes
13:24 masak even a physics that sinks is a witch
13:24 [Coke] moritz;wow. logged into perl6advent.wordpress.com, clicked on the add content icon.... crashed chrome. :|
13:26 masak timotimo: forgot to say: thank you for writing JSON::Fast
13:26 masak timotimo: if nothing else, it's a very interesting showcase of the current overhead of grammars
13:31 cyphase joined #perl6
13:35 nicq20 joined #perl6
13:39 timotimo :)
13:39 timotimo thank you
13:45 Lucas_One joined #perl6
13:55 timotimo https://quickdraw.withgoogle.com/ - kinda cute
13:57 viki Seems the stuff it asks you to draw has been pre-fed to the neural net. I barelly drawn a couple of rectangles and it guessed that I was drawing a calculator.
13:58 viki Also...
13:58 viki ... KILL IT! Kill it with fire, before it spreads!
14:00 huf wow i suck at drawing :D
14:01 nicq20 The time limit does not help. >_<
14:02 huf what is a dressre?
14:02 viki It's a regex made of dresses!
14:04 dalek specs: acc747f | (Stéphane Payrard)++ | S13-overloading.pod:
14:04 dalek specs: Be more specific about coercion being a convention
14:04 dalek specs: review: https://github.com/perl6/specs/commit/acc747f10f
14:04 cdg joined #perl6
14:04 viki I suck at drawing too
14:05 viki It guessed 2/6
14:05 timotimo viki: would you go ahead and spec test jnthn's latest commit on that moarvm branch and compare timings with moarvm master?
14:07 viki 25-year-old Zoffix could draw though: http://i.imgur.com/he5hoTp.jpg
14:07 * viki cries at lost skills
14:07 viki timotimo: hm?
14:08 jnthn timotimo: Or just wait for tomorrow's numbers ;)
14:08 jnthn It'll be more interesting to measure after my patch to reduce the size of hashes too
14:08 viki timotimo: Not sure what branch you mean, so I'll wait for tomororw's numbers :)
14:10 timotimo MoarVM/rehash
14:11 timotimo right
14:11 jnthn (Spectesting that part of it now)
14:14 diakopter joined #perl6
14:16 viki timotimo: looks like it hung
14:16 viki oh nm.. just took ages for some reason
14:16 * viki re-runs
14:17 viki m: say $*VM.version
14:17 camelia rakudo-moar f03ef5: OUTPUT«v2016.10.55.g.20.c.8591␤»
14:18 viki t/spec/integration/weird-errors.t is failing
14:19 viki OLD: Files=1203, Tests=130161, 134 wallclock secs (20.46 usr  2.79 sys + 2354.09 cusr 195.34 csys = 2572.68 CPU)
14:19 viki REHASH: Files=1203, Tests=130161, 145 wallclock secs (19.95 usr  2.93 sys + 2651.93 cusr 231.11 csys = 2905.92 CPU)
14:19 mohae_ joined #perl6
14:20 viki Oh, it's "not ok 31 - using a null string to access a hash does not segfault" that fails
14:20 viki And it's fine, 'cause that change is not in that branch
14:22 dj_goku joined #perl6
14:22 domidumont joined #perl6
14:23 viki 152 wallclock secs for second run
14:23 * viki tries to run spectest instead
14:25 viki REHASH: Files=1154, Tests=53747, 94 wallclock secs (12.66 usr  2.32 sys + 1461.50 cusr 156.14 csys = 1632.62 CPU)
14:25 timotimo um, what
14:25 timotimo that can't be right
14:26 viki Well, it's really iffy of a benchmark. As I've said before, there are a couple of test files that take forever, so all the tests get smoked on 24-cores, but at the end of the stresstest you get just 1 or 2 files slowing everything else down
14:27 viki Like t/spec/integration/weird-errors.t seems to take ages to run
14:27 kyclark joined #perl6
14:27 domidumont joined #perl6
14:29 timotimo OK
14:29 timotimo weird-errors compiles and runs another program 20 times near the end, for example
14:31 viki Rebuilt with normal moarvm, spectest: Files=1154, Tests=53739, 94 wallclock secs (12.54 usr  2.37 sys + 1469.14 cusr 157.55 csys = 1641.60 CPU)
14:32 viki And t/spec/S17-procasync/many-processes-no-close-stdin.t and/or t/spec/S17-procasync/no-runaway-file-limit.t seem to be holding everything back
14:32 iH2O left #perl6
14:32 * viki still haven't played around with making the longest files run first thing
14:37 dalek joined #perl6
14:40 ggoebel joined #perl6
14:41 mohae joined #perl6
14:43 user9 joined #perl6
14:44 Khisanth joined #perl6
15:06 nicq20 So, I know there are ways to override core parts of Rakudo using the "Monkey*" modules, but is there something similar with the NQP base?
15:07 brrt not the right person to answer, but what do you mean with NQP base?
15:07 viki monkeys are pragmas
15:08 viki MONKEY-GUTS pragma gives you nqp ops, if that's what you mean...
15:09 nicq20 Probably wording this wrong (like usual for me), but I think I noticed a bug in on of the NQP classes, but I'm not sure if it really is one or not. So I wanted to mess with the code a bit to see if I can "fix" it (assuming it is flawed).
15:10 nicq20 I believe it's this part here: https://github.com/perl6/nqp/blob/mas​ter/src/vm/jvm/runtime/org/perl6/nqp/​io/AsyncServerSocketHandle.java#L38
15:11 * viki has no idea
15:11 nicq20 It might throw an acception without closing the socket.
15:11 domidumont joined #perl6
15:20 [Coke] your best bet with nqp is to work in a local checkout, edit the source, and rebuild, in my experience.
15:20 domidumont joined #perl6
15:22 nicq20 [Coke]: Ok. The tests don't seem to work on my end. I'm assuming it should be run with `prove -enqp t/` right?
15:22 viki make test
15:22 viki And there's make m-test / make j-test to test just for that backend
15:32 nicq20 Hmm... `Make test` does not do the concurrency tests. Is that on purpose?
15:33 * viki shrugs
15:33 viki nicq20: what about make m-test?
15:33 viki Maybe make test is just the rudimentary test
15:34 [Coke] nicq20: are you running rakudo's make test or nqps?
15:34 nicq20 "m-test" runs t/nqp t/hll t/qregex t/p5regex t/qast t/moar t/serialization t/nativecall
15:34 nicq20 [Coke]: NQP
15:36 iH2O joined #perl6
15:37 kyclark joined #perl6
15:39 user9 joined #perl6
15:40 snowman joined #perl6
15:41 wamba joined #perl6
15:41 kyclark Let’s say I create “class Person { has $.first_name }” and then try to create with Person.new(frist_name => “Ken”) (typo intended), how can I have the object blow up?  I was kind of hoping it would fail, but I guess I need to write my own “new” to make sure of this?
15:42 viki Yeah
15:42 viki oh
15:43 viki kyclark: depends on what you mean by blow up: blow up because the first-name is missing or because an invalid attr was given?
15:43 kyclark Invalid attr
15:43 viki 'cause for the formeer you can mark the atribute as is required
15:43 viki Yeah, for that you'll need a special new
15:43 Xliff \o #perl6
15:43 viki \o
15:43 Xliff Has LWP::UserAgent been ported to rakudo, yet?
15:43 ugexe So I was working with perl5 IO::Async on a recursive directory watcher for 30k files, and it chokes before even getting a chance to react to anything. Perl6 IO::Notification::Recursive is reacting instantly.
15:44 viki Xliff: HTTP::UserAgent ?
15:44 kyclark Hmm, “is required” will suffice for my purposes.  Thanks!
15:44 ocbtec joined #perl6
15:44 Xliff viki: Thanks. Will check. I don't know if that handles HTTPS though.
15:44 viki kyclark: can be shortened to just an exclamation mark: has $.first-name!
15:44 kyclark Ah, very nice.
15:44 viki Xliff: it does, if you have IO::Socket::SSL installed
15:45 Xliff Oh? Neat. I will check it out. It still has that on the TODO list, according to modules.perl6.org
15:47 viki star: HTTP::UserAgent -e 'say HTTP::UserAgent.new.get("https://perl6.org").content.comb(/"<title>" <(.+?)> "</title>")
15:47 camelia star-m 2016.10: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3HTTP::UserAgent -e7⏏5 'say HTTP::UserAgent.new.get("https://p␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statemen…»
15:48 viki star: use HTTP::UserAgent; say HTTP::UserAgent.new.get("https://perl6.org").content.comb(/"<title>" <(.+?)> "</title>")
15:48 camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not find HTTP::UserAgent at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository…»
15:48 viki :(
15:48 Xliff Thanks, anyways.
15:49 Xliff <tongueFirmlyInCheek>So is viki a regular thing now, zoffixBorg</tongueFirmlyInCheek>
15:49 ugexe where is this TODO at?
15:49 Xliff https://github.com/sergot/http-useragent
15:49 viki Xliff: works locally6: https://gist.github.com/zoffixznet​/6541018c7279b7ea87c81105571e6083
15:49 viki Xliff: there's no regular thing, but some things live longer than others.
15:50 ugexe the TODO is just to make it work on more platforms
15:50 Xliff :)
15:50 Xliff ugexe: Ah. That isn't very clear from the wording.
15:51 FROGGS joined #perl6
15:51 Xliff Both OpenSSL and IO::Socket::SSL are headers, and it doesn't mention anything about HTTPS support, so I assumed it lacked it.
15:51 Xliff \o FROGGS
15:51 FROGGS hi
15:51 Xliff Whee! Now I get to spend the day ripping out LWP::Simple to support HTTP::UserAgent
15:56 kyclark viki: I think the “$.first_name!” for “is required” is not right: “Negation metaoperator not followed by valid infix
15:57 viki m: class { has $.x! }.new
15:57 camelia rakudo-moar 395f36: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3class { has $.x!7⏏5 }.new␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfi…»
15:57 viki bisect: class { has $.x! }.new
15:57 bisectable6 viki, On both starting points (old=2015.12 new=395f369) the exit code is 1 and the output is identical as well
15:57 bisectable6 viki, https://gist.github.com/e45d​59b67c0dc804636e85a99131cf51
15:57 timotimo interesting, we never supported that?
15:57 viki m: class { has $.x! = 42 }.new
15:57 camelia rakudo-moar 395f36: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3class { has $.x!7⏏5 = 42 }.new␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        p…»
15:57 viki Weird, I could've swore it worked.
15:58 viki kyclark: I guess we don't support it for attributes, but it does work for named signature parameters
15:58 kyclark Got it.
15:58 nicq20 kyclark: use "is required" instead.
15:58 kyclark Roger that.
15:59 sufrostico joined #perl6
16:08 dalek perl6.org: 236b5d1 | (Zoffix Znet)++ | source/index.html:
16:08 dalek perl6.org: Add more descriptive title to home page
16:08 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/236b5d17b7
16:09 atweiden joined #perl6
16:09 dj_goku how do you know if  IO::Socket::INET connection is still open?
16:11 dalek perl6.org: 172fefb | (Zoffix Znet)++ | source/index.html:
16:11 dalek perl6.org: Update home page "news" box
16:11 dalek perl6.org:
16:11 dalek perl6.org: - Remove content from the 2015.12 release.
16:11 dalek perl6.org: - Shorten text
16:11 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/172fefb84d
16:11 ugexe try { $sock.read(0); CATCH { when /'Out of range'/ { say "Connection is still open" } }; # >:)
16:12 dalek perl6.org: bd8343b | (Zoffix Znet)++ | source/index.html:
16:12 dalek perl6.org: Fix typo
16:12 dalek perl6.org:
16:12 dalek perl6.org: icannottypetoday
16:12 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/bd8343bcd2
16:12 dj_goku hmm
16:12 ugexe https://github.com/ugexe/Perl6-Net--HTTP​/blob/master/lib/Net/HTTP/Utils.pm6#L88
16:14 dj_goku ugexe: ugh, that seems weird.
16:14 dj_goku I don't do a lot of network programming so that might seem ok.
16:15 dj_goku ugexe: is there a reason it isn't apart of IO::Socket by default?
16:15 skids joined #perl6
16:23 rurban joined #perl6
16:24 dj_goku ugexe: haha I just noticed it was your repo on github. :D
16:33 domidumont joined #perl6
16:33 ugexe its weird cause its totally a hack :)
16:33 sufrostico joined #perl6
16:34 nicq20 Anyone know of what the best way to implement a timeout for a function? It's a built-in one so I can't change it much.
16:34 ugexe thats why its in a role I can apply to the socket and not have to see it anymore
16:34 dj_goku ugexe: :(
16:35 [Coke] nicq20: my $timeout = 5; await Promise.anyof(Promise.in($timeout), start { YOUR LONG RUNNING TASK });
16:36 nicq20 [Coke]: I was thinking that too, but I want the slower of the two to stop running.
16:36 nicq20 start vows to itself, so I can't break it that way. :/
16:36 ugexe dj_goku: the correct way is probably to use the native-descriptor (https://github.com/rakudo/rakudo/b​lob/nom/src/core/IO/Socket.pm#L93) somehow, but this wasn't added until after I came up with that hack
16:37 [Coke] nicq20: Maybe jnthn knows a way to abort running code as opposed to getting control back in your main line.
16:39 sufrostico joined #perl6
16:40 nicq20 [Coke]: Ok, thanks! :) I'll ask him next time I see him on here.
16:43 jnthn Just use another Promise that the long-running task polls every so often.
16:43 jnthn And then break that in order to cancel
16:44 [Coke] jnthn: so, more of a cyanide pill than a bullet.
16:45 jnthn Yes. Bullets are generally a bad idea.
16:45 jnthn You don't know whether your code is in any reasonable state to be cancelled.
16:45 jnthn What if it's holding a lock when the bullet hits?
16:46 Xliff Aaannnd....
16:46 viki nicq20: what's the function anyway?
16:46 Xliff HTTP::UserAgent also fails this crazy auth procedure.
16:46 dj_goku ugexe: alright cool. probably could just just have a method that returns True/False if/ifnot $PIO
16:46 [Coke] so, nicq20, if you don't have any control over the long running thing, you're out of luck.
16:46 nicq20 Hmm... good point. I'm trying to setup a timeout for a IO::Socket::INET connection.
16:47 nicq20 For example, connecting to google.com on port 3 takes forever because they drop the packets.
16:48 sufrostico joined #perl6
16:52 Xliff When you have an exception like this:  X::HTTP::Response.new(:rc('Max redirects exceeded'), :response($response)).throw;
16:53 Xliff How can you retrieve $response from it?
16:53 Xliff Especially if there is already a $response in scope.
16:53 timotimo should be possible to just .response
16:53 Xliff kk
16:53 Xliff \o/
16:53 Xliff timotimo++
16:54 Xliff I was worried HTTP::UserAgent would also be a dead end, but I think I can salvage it.
16:54 timotimo worst case: bind libcurl?
16:56 viki waaaaat.. "Microsoft today announced that it is joining the Linux Foundation as a high-paying Platinum member." https://twitter.com/search?q=%22L​inux%20Foundation%22&amp;src=tren
16:56 * viki lols
16:57 viki If you can't beat 'em, join 'em? XD
16:57 timotimo i guess so
16:57 timotimo MS got money out the wazzoo, i'm glad TLF is getting some of that
16:58 timotimo but maybe they only join that to sabotage it?
17:00 dj_goku if I add my own method to Socket.pm can I just re-open the REPL and have it called? because I am getting a failure of No such method 'closed' for invocant of type 'IO::Socket::INET'
17:00 viki dj_goku: what do you mean by "add my own method"?
17:00 viki How are you adding it?
17:01 dj_goku viki: with vi? :D
17:01 viki :/
17:01 dj_goku viki: just as a test
17:02 dj_goku viki: is there a better way?
17:03 viki I don't know what your way is, so I don't know if there's a better way.
17:04 viki dj_goku: how are you adding the method?
17:04 dj_goku viki: I am using rakudobrew and I just modified all the IO/Socket.pm to add my method
17:04 dj_goku I inlined it after the close method
17:04 viki dj_goku: I'm guessing you didn't recompile anything?
17:04 dj_goku nope
17:04 dj_goku I assumed it would just work. :D
17:04 viki dj_goku: the IO/Socket.pm isn't actually used for anything what you edited is likely what rakudobrew just keeps around.
17:05 viki dj_goku: git clone http://github.com/rakudo/rakudo
17:05 viki dj_goku: then edit IO/Socket.pm
17:05 [Coke] if you want to try this sort of thing you should have a local copy of the module, and use that one, not edit the installed one.
17:05 viki dj_goku: then run perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make test; make install
17:05 [Coke] ... what viki just said while I was typing and not catching up. :)
17:05 viki dj_goku: and when making more changes you can run just `make install`. And that will build a ./perl6-m executable in that dir that will have your change in it
17:06 sufrostico joined #perl6
17:06 dj_goku I might do what Zoffix blogged about: http://blogs.perl.org/users/zoffix_​znet/2016/08/hacking-on-the-rakudo-​perl-6-compiler-mix-your-fix.html
17:06 rurban left #perl6
17:06 viki Sure, that should work too
17:06 viki dj_goku: just be sure to do IO::Socket::INET.^compose after augmentation as well
17:07 viki hmmm
17:07 viki can you even augment roles?
17:07 viki m: use MONKEY; augment role Numeric { method close { say "weee" } }; Int.^compose; 42.close
17:07 camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot augment Numeric because it is closed␤at <tmp>:1␤------> 3use MONKEY; augment role Numeric7⏏5 { method close { say "weee" } }; Int.^c␤    expecting any of:␤        generic role␤»
17:07 viki Right
17:07 viki dj_goku: that method likely doesn't work for roles, and IO::Socket is a role
17:07 viki .oO( is there a way to "reopen" a role? )
17:08 jnthn viki: Even if you managed to do that, your changes would not affect anything that had composed the role
17:08 jnthn Only things that did so in the future
17:09 viki m: use MONKEY; augment class Int does role { method close { say "self is {self}" } }; 42.close
17:09 camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'role'␤at <tmp>:1␤------> 3use MONKEY; augment class Int does role7⏏5 { method close { say "self is {self}" }␤»
17:09 dj_goku m: use MONKEY-GUTS; augment role Numeric { method close { say "weee" } }; Int.^compose; 42.close
17:09 camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3use MONKEY-GUTS; augment role Numeric7⏏5 { method close { say "weee" } }; Int.^c␤    expecting any of:␤        generic role␤»
17:09 viki m: use MONKEY; role BetterNumeric { method close { say "self is {self}" } }; augment class Int does BetterNumeric {}; 42.close
17:09 camelia rakudo-moar 4ccb2f: OUTPUT«self is 42␤»
17:09 viki \o/
17:09 viki dj_goku: ^ that's one way to make Zoffix's article's method work
17:10 dj_goku viki: alright cool
17:10 [Coke] I think in the general case you need to re-compose there.
17:10 viki MONKEY-GUTS is for nqp; MONKEY-TYPING is the one for augmentation
17:13 domidumont joined #perl6
17:15 Actualeyes joined #perl6
17:17 wamba joined #perl6
17:22 espadrine joined #perl6
17:31 nicq20 left #perl6
17:33 sufrostico joined #perl6
17:38 aries_liuxueyang joined #perl6
17:46 viki Hm... my "Perl 6 Core Hacking: The Ultimate Contributor's Guide" is already 1,200 words and I've not even touched any of Rakudo/NQP/MoarVM bits :/
17:47 viki Starting to think a dynamic web app would be more awesomer for the purpose.
17:49 labster joined #perl6
17:52 viki Yes. yes.
17:52 * viki creates perl6/contribute
18:01 kyclark joined #perl6
18:02 sufrostico joined #perl6
18:10 sufrostico joined #perl6
18:12 firstdayonthejob joined #perl6
18:14 mienaikage joined #perl6
18:15 pmurias viki: how will contribute.perl6.org work?
18:15 snowman joined #perl6
18:16 ugexe dj_goku: the way I do it is `my $socket = IO::Socket::INET.new(...) but role :: { method closed { ... } };`
18:19 sufrostico joined #perl6
18:23 Xliff How getting this when trying to request an HTTPS page using HTTP::UserAgent -- 'Cannot look up attributes in a OpenSSL type object'
18:23 Xliff Anyone run into this before?
18:23 viki pmurias: will commit a design doc soon
18:26 sufrostico joined #perl6
18:36 viki Well, now I'm self-conscious about it :D
18:46 viki pmurias: that's a start: https://github.com/perl6/cont​ribute/blob/master/DESIGN.md
18:47 viki pmurias: I want to write and play around with some code before going further with how it all work
18:48 viki pmurias: the main idea is a response to this would be a single link the user can just read: https://irclog.perlgeek.de/​perl6/2016-11-16#i_13577116
18:48 viki without daunting them with a wall of text that is our CONTRIBUTING.md files
18:48 itcharlie joined #perl6
18:51 ugexe now we just need a bot to do the contributing for us
18:57 sufrostico joined #perl6
18:58 beatdown joined #perl6
18:59 labster joined #perl6
19:31 rurban1 joined #perl6
19:33 SourceBaby joined #perl6
19:34 cyphase joined #perl6
19:34 Undercover joined #perl6
19:38 snowman joined #perl6
19:39 RabidGravy joined #perl6
19:41 domidumont joined #perl6
19:41 Exodist joined #perl6
19:42 telex joined #perl6
19:43 AlexDaniel joined #perl6
19:44 sufrostico joined #perl6
19:46 itcharlie left #perl6
19:47 kyclark joined #perl6
19:49 snowman joined #perl6
19:51 girafe joined #perl6
19:53 kyclark joined #perl6
19:54 firstdayonthejob joined #perl6
20:04 snowman joined #perl6
20:29 kurahaupo__ joined #perl6
20:31 AlexDaniel now that we have #130081 resolved, I'm wondering about this:
20:31 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130081
20:31 AlexDaniel m: grammar G { token TOP { ‘a’ || ‘abc’ } }; say G.parse(‘abc’)
20:31 camelia rakudo-moar 58a482: OUTPUT«Nil␤»
20:32 AlexDaniel m: grammar G { token TOP { [ ‘a’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
20:32 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:32 AlexDaniel so the first one is expected, right
20:32 sufrostico joined #perl6
20:32 AlexDaniel but… how does the second one work?
20:36 ggoebel joined #perl6
20:38 * viki shrugs
20:38 sufrostico joined #perl6
20:40 AlexDaniel is it alright or is it a bug?
20:42 psch m: grammar G { token TOP { [ ‘a’ | ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
20:42 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:43 viki Well, here it doesn't need to backtrack.
20:43 psch hm, i don't think that actually adds information
20:43 psch it's just LTM
20:43 psch i mean, my eval doesn't add information
20:43 AlexDaniel that's correct
20:43 psch so the actual problem seems to be that a single rule in a Grammar doesn't follow LTM?
20:44 * psch only skimmed the corresponding correspondence about "TOP has to be terminated" in the emails
20:44 psch not sure it was ML or GH, either :S
20:45 psch m: grammar G { token TOP { [ ‘abc’ | ‘ab’ ] ‘z’ } }; say G.parse(‘abcz’)
20:45 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:45 psch m: grammar G { token TOP { [ ‘abc’ || ‘ab’ ] ‘z’ } }; say G.parse(‘abcz’)
20:45 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:45 psch m: grammar G { token TOP { [ ‘abc’ || ‘ab’ ] } }; say G.parse(‘abc’)
20:45 camelia rakudo-moar 58a482: OUTPUT«「abc」␤»
20:46 psch yeah that's wonky
20:46 psch || should follow LTM afaik
20:46 viki huh
20:46 AlexDaniel huh?
20:46 timotimo didn't we just get a commit about the TOP stuff?
20:46 viki Isn't || specifically to avoid LTM and to do first-listed-match instead?
20:46 viki Yeah
20:47 psch ...is it?
20:47 timotimo yes, || is the anti-LTM one
20:47 viki The TOP stuff is fixed.
20:47 psch right, it's the sequence one
20:47 psch sorry, apparently i'm not really useful rn vOv
20:47 viki The current question is how come || backtracks in a token:
20:47 viki m: grammar G { token TOP { [ ‘a’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
20:47 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:47 viki Or rather... does it backtrack? and if it does, how come?
20:48 psch m: grammar G { token TOP { [‘a’ { say "once" } || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
20:48 camelia rakudo-moar 58a482: OUTPUT«once␤「abcz」␤»
20:48 AlexDaniel and if it's not counted as backtracking, then TOP should probably do that as well…
20:48 viki m: grammar G { token TOP { [ ‘a’ { say "wat" } || ‘abc’ {say "huh" } ] ‘z’ } }; say G.parse(‘abcz’)
20:48 camelia rakudo-moar 58a482: OUTPUT«wat␤huh␤「abcz」␤»
20:48 psch that does look backtrack-y to me
20:48 viki m: grammar G { token TOP { [ ‘ab’ { say "wat" } || ‘abc’ {say "huh" } ] ‘z’ } }; say G.parse(‘abcz’)
20:48 camelia rakudo-moar 58a482: OUTPUT«wat␤huh␤「abcz」␤»
20:49 psch m: grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] 'z' } }; say G.parse(‘abcz’)
20:49 camelia rakudo-moar 58a482: OUTPUT«1␤0␤「abcz」␤»
20:49 psch yeap
20:50 psch m: grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] {say "here"} 'z' } }; say G.parse(‘abcz’)
20:50 camelia rakudo-moar 58a482: OUTPUT«1␤here␤0␤here␤「abcz」␤»
20:50 psch ^^^ definitely
20:50 AlexDaniel committable6: all grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] {say "here"} 'z' } }; say G.parse(‘abcz’)
20:51 committable6 AlexDaniel, https://gist.github.com/0fd2​5e5fc47ee43444e11be18394f3de
20:51 AlexDaniel dammit
20:51 psch huh, it never worked before :)
20:51 AlexDaniel committable6: all grammar G { token TOP { [ 'a' {say $/.CURSOR.pos} || {say $/.CURSOR.pos} 'abc' ] {say "here"} 'z' } }; say G.parse(‘abcz’)
20:51 psch i wonder if that relates to the array interpolation regex bug i ticketed some long time ago
20:51 psch it feels faintly familiar
20:51 committable6 AlexDaniel, https://gist.github.com/e797​752987bc96b01d84675f60b305ee
20:52 AlexDaniel committable6: all grammar G { token TOP { [ 'a' {say $/.CURSOR.pos} || {say $/.CURSOR.pos} 'abc' ] {say "here"} 'z' } }; say G.parse('abcz')
20:52 psch bad quotes for old compilers?
20:52 AlexDaniel yup
20:52 committable6 AlexDaniel, https://gist.github.com/8140​19538d89ec53fca6c09269136ebd
20:52 AlexDaniel but yeah, it has always been this way
20:53 kyclark joined #perl6
20:54 AlexDaniel so “no backtracking” only means that it does not reenter rules?
20:54 AlexDaniel but inside one rule it can do whatever it wants to?
20:54 psch that's not what it *should* mean i'm pretty sure
20:55 seatek joined #perl6
20:55 AlexDaniel masak: any ideas?
20:55 psch m: say "abcz" ~~  m:r/\w+ 'z'/
20:55 camelia rakudo-moar 58a482: OUTPUT«False␤»
20:56 psch m: say "abcz" ~~  m:r/['a'||'abc'] 'z'/
20:56 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:56 psch m: say "aaaz" ~~  m:r/['a'**2||'aaa'] 'z'/
20:56 camelia rakudo-moar 58a482: OUTPUT«「aaaz」␤»
20:56 psch m: say "abcz" ~~  m:r/[.**2||...] 'z'/
20:56 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
20:57 masak AlexDaniel: sorry; not following along too closely. heading off to bed.
20:57 psch "This process of giving up characters (or in the case of alternations, trying a different branch) is known as backtracking." from https://docs.perl6.org/language/regexes#index-ent​ry-regex_adverb_:ratchet-regex_adverb_:r-Ratchet
20:58 masak AlexDaniel: but if you think there's something that feels like a bug, please do rakudobug it.
20:58 psch so, trying a different alternation is backtracking, backtracking should off in tokens and with :r
20:58 masak 'night, #perl6
20:58 psch 'nite masak
20:58 AlexDaniel sure I will, thanks anyway
20:58 psch +1 for the ticket
20:58 seatek nite masak
20:58 AlexDaniel how many things are going to break if we fix it? :|
20:58 richi235 joined #perl6
20:58 psch or a patch, of course
20:58 psch that's a fun question :)
20:59 viki A better question is how much faster stuff will become if we fix it :D
20:59 AlexDaniel that I thought about too
20:59 psch it kinda feels we like we need a regex champion, fwiw :S
20:59 viki Any idea wtf is going on here? A test in a test file fails, but if I run it as it is it succeeds: https://gist.github.com/zoffixznet​/bc223e44108e4649cad016e27165d4fe
21:00 viki The is-deeply '−FF'.parse-base(16), -255, 'can parse − sign'; and is-deeply '-FF'.parse-base(16), -255, 'can parse - sign';
21:00 psch i mean, i've kinda been letting bartolin++ carry the jvm-champion role for quite a while already, so maybe i shouldn't talk
21:00 viki Despite it succeeding for the method form too :S
21:00 psch but still
21:00 viki What does the regex champion do?
21:00 psch fix the regex engine
21:00 psch or, well, champion the development of the regex engine
21:01 viki oh.. sounds very hard :)
21:01 psch there's quite a few hairy edge cases, and -- apparently -- at least one major bug
21:01 psch yes, yes it does :)
21:01 AlexDaniel alright, I'll try to rakudobug this now…
21:01 labster joined #perl6
21:01 cdg joined #perl6
21:02 AlexDaniel but I'm still trying to see if I'm missing something. I mean, this thing was there for years and nobody noticed
21:07 viki hm
21:08 viki Looks like my issue is due to some string caching or something :\
21:08 timotimo uh oh?
21:09 viki m: use MONKEY; augment class Str { method borgle { $!value = "meow"; } }; say "foo".borgle; say "foo"
21:09 camelia rakudo-moar 58a482: OUTPUT«meow␤meow␤»
21:09 viki Or object caching or whatever this is...
21:09 viki Basically, I shouldn't modify $!value :D
21:09 AlexDaniel m: grammar G { token TOP { [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] <!> } }; say G.parse(‘abcdefghij’)
21:09 AlexDaniel good luck camelia
21:09 awwaiid what could go wrong?
21:10 camelia rakudo-moar 58a482: OUTPUT«(timeout)»
21:10 viki At least I proved my mantra to test things thoroughly, even if you know its impementation just passes the job to an already-tested thing :)
21:11 viki The only reason the bug showed up is 'cause I also ran the sub-form tests on the same strings after running them with method form
21:11 viki (and sub just forwards to the method)
21:13 viki OMFSM... I's almost half hour since I was supposed to go home from work >_<
21:17 viki I guess I can take Uber instead of the bus to make up lost gaming time :)
21:18 viki And I have an off-by-one error in error position reporting for my .parse-base improvement too :/ messy and wrong
21:18 kyclark If I want to use $*CWD as a default in my MAIN, why do I have to put it quotes or ~-prefix it to work?  E.g., sub MAIN (:$out-dir=~$*CWD) {…}
21:18 viki Better leave it off for another day.
21:18 psch huh, that Str interning thing is really annoying
21:18 psch m: say $*CWD.WHAT
21:18 camelia rakudo-moar 58a482: OUTPUT«(Path)␤»
21:19 psch kyclark: well, if you treat it like the Path it is it won't complain :)
21:19 psch kyclark: i strongly suspect it depends on what you do with it afterwards
21:19 kyclark Oh, I was thinking it was a string
21:19 viki It's a Cool
21:19 viki m: say $*CWD ~~ Cool
21:19 camelia rakudo-moar 58a482: OUTPUT«True␤»
21:19 psch m: say $*CWD.^mro
21:19 camelia rakudo-moar 58a482: OUTPUT«((Path) (Cool) (Any) (Mu))␤»
21:19 psch it *does* Cool
21:20 viki So you can treat it like a string. I dunno why it would complain to you
21:20 psch it *isa* Path
21:20 psch point being that you have to tell to be Stringy for it to be Stringy
21:20 psch which is what i was alluding to with "it depends on what you do afterwards"
21:20 psch m: say $*CWD
21:20 camelia rakudo-moar 58a482: OUTPUT«"/home/camelia".IO␤»
21:21 psch that for example already wouldn't DWYM
21:21 psch m: say "$*CWD"
21:21 camelia rakudo-moar 58a482: OUTPUT«/home/camelia␤»
21:21 viki Oh, OK. I thought MAIN complained about it, but it actually doesn't
21:21 psch kyclark: what's the next occurance of :$out-dir?  as in, the exact line of code?
21:22 stmuk_ https://www.kickstarter.com/proj​ects/1422827986/learning-perl-6
21:23 kyclark It was just coming out as nothing or empty string.  Actually, I can’t really recall.  I was messing with it this morning and was confused, but now it makes sense to know it’s a Path.  Sorry.
21:23 viki stmuk_: as someone already asked... why is there a kickstarter project when this is being published by O'Rly?
21:23 stmuk_ I've no idea
21:23 * psch only has an overly cynical opinion on this, and thus holds it in
21:24 * viki opposes that endeavour entirely
21:24 viki Though I don't know if there are reasons for it other than brian being a giant dick to me a decade ago :)
21:24 viki night all \o
21:24 * viki &
21:25 sufrostico joined #perl6
21:25 sufrostico joined #perl6
21:25 AlexDaniel if only there was some crowdfunding to improve our actual docs… :)
21:25 psch kyclark: well, if you don't know/have the codes anymore it's hard to offer specfici advice
21:25 kyclark Right, thanks.  I’m good now.
21:26 psch *specific
21:26 psch ...the letter were all there at least :)
21:26 psch +s
21:27 psch m: say "a" ~~ / [.||.||.||.||.||.] <!> /
21:27 camelia rakudo-moar 58a482: OUTPUT«Nil␤»
21:27 stmuk_ its also a bit odd you get charged more to help with early e editions
21:27 psch m: say "ab" ~~ / [.||.||.||.||.||.] [.||.||.] <!> /
21:27 camelia rakudo-moar 58a482: OUTPUT«Nil␤»
21:27 psch m: say "ab" ~~ m:r/ [.||.||.||.||.||.] [.||.||.] <!> /
21:27 camelia rakudo-moar 58a482: OUTPUT«False␤»
21:29 psch it's really weird that so many high-tier rewards are about Perl 5, actually
21:29 psch weellll, FSDO "so many"
21:29 psch i mean, in the end bdfoy is probably a Perl 5 person..?
21:32 psch m: say "ab" ~~ / [.||.||.||.||.||.] <!> /
21:32 camelia rakudo-moar 58a482: OUTPUT«Nil␤»
21:32 psch anyway, apparently i don't grok that backtracking issue :P
21:33 psch or it doesn't turn fatal in with that few alternatition/.chars
21:36 sufrostico joined #perl6
21:37 AlexDaniel m: grammar G { regex TOP { .* ‘z’ } }; say G.parse(‘abcz’)'
21:37 camelia rakudo-moar 58a482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ex TOP { .* ‘z’ } }; say G.parse(‘abcz’)7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
21:37 AlexDaniel m: grammar G { regex TOP { .* ‘z’ } }; say G.parse(‘abcz’)
21:37 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
21:37 AlexDaniel m: grammar G { token TOP { .* ‘z’ } }; say G.parse(‘abcz’)
21:37 camelia rakudo-moar 58a482: OUTPUT«Nil␤»
21:38 AlexDaniel m: grammar G { regex TOP { [ ‘a ’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
21:38 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
21:38 AlexDaniel m: grammar G { token TOP { [ ‘a ’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
21:38 camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
21:46 dnmfarrell joined #perl6
21:47 dnmfarrell hey folks, thought you might like to know there is a new kickstarter project for "Learning Perl 6" written by brian d foy and  published by O'Reilly https://www.kickstarter.com/proj​ects/1422827986/learning-perl-6
21:49 AlexDaniel /o\
21:49 AlexDaniel dnmfarrell: thanks, but yes, we know already :)
21:50 viki lol
21:50 viki dnmfarrell, ... and no one knows why :)
21:50 * viki is getting a sweet ride home
21:51 viki Literally... the guy has "CAKE" in the license plate :)
21:55 labster m: my $a = 1; class Foo { also is ::( $a ?? Str !! Int) }
21:55 camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Op␤»
21:56 viki labster, what if you use that ternary as a block in a string?
21:57 viki ummm
21:57 labster I'm trying to figure out dynamic inheritance, but QAST shouldn't be leaking either.
21:57 viki m: say ::("Int")
21:58 camelia rakudo-moar 58a482: OUTPUT«(Int)␤»
21:58 viki m: say ::(Int)
21:58 camelia rakudo-moar 58a482: OUTPUT«Use of uninitialized value of type Int in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤No such symbol ''␤  in block <unit> at <tmp> line 1␤␤Actually…»
21:58 viki riiight
21:59 redhands joined #perl6
22:00 AlexDaniel buggable: tags
22:00 buggable AlexDaniel, Total: 1395; BUG: 937; UNTAGGED: 284; LTA: 125; NYI: 92; RFC: 60; JVM: 55; CONC: 52; SEGV: 36; REGEX: 35; UNI: 28; PERF: 27; @LARRY: 22; NATIVECALL: 20; POD: 19; IO: 18; TODO: 15; PRECOMP: 14; BUILD: 11; TESTCOMMITTED: 11; OO: 10; MATH: 8; BOOTSTRAP: 6; STAR: 6; TESTNEEDED: 6; GLR: 5; OSX: 4; OPTIMIZER: 3; REPL: 3; WEIRD: 3; REGRESSION: 2; SPESH: 2; @y: 1; CONFIGURE: 1;
22:00 [Coke] the typos in the kickstarter text are disheartening.
22:00 viki m: my $a = BEGIN 1; class { also is ::("{$a ?? 'Int' !! 'Str' }") }.^mro.say
22:00 camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Op␤»
22:00 AlexDaniel viki: looks like it does not fit into one message
22:01 viki gah... tooke ages to type on the phone and it didn't work :)
22:01 labster I know, Brian even forgot to capitalize his name.
22:01 [Coke] :P
22:01 viki AlexDaniel, yeah :(
22:02 stmuk_ its in the wrong font as well!
22:02 [Coke] viki: in my shell script, I curated the tags I cared about. might be worth doing that to limit the size there. (not sure if it'll help.)
22:02 El_Che I love the idea of a "Learning Perl 6" book, but I thought brian d foy had given up on Perl 6
22:02 labster m: class Foo { also is ::("Int") };
22:02 camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Want␤»
22:02 El_Che I guess kickstarter accepts paypal
22:03 [Coke] El_Che: he did, twice, according to the kickstarter. :)
22:04 labster m: class Foo is ::("Int") { };
22:04 camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Want␤»
22:04 viki El_Che, but has he given up on creating media he's guaranteed to turn profit on based on name recognition alone? :) Who can blame hin
22:05 El_Che no, I meant about the language-in-progress
22:05 El_Che I dunno what lizmat did to him, but it worked
22:05 AlexDaniel by “it worked” you mean?
22:06 [Coke] I have so many questions about the reward levels.
22:06 [Coke] AlexDaniel: presumably that he is now planning on writing a book.
22:06 El_Che AlexDaniel: he attended a perl6 workshop (how to write modules) and is now publishing a book (maybe)
22:07 El_Che with a safari account I don't buy as many IT books as I used to do, but I wouldn't mine having some Perl 6 books at my bookshelf at work :)
22:07 moritz why does a book published by oreilly need a kickstarter campaign?
22:07 sufrostico joined #perl6
22:08 El_Che moritz: https://www.kickstarter.com/projects/1422827986​/learning-perl-6/description#project_faq_191567
22:08 awwaiid The Future
22:09 labster Because if O'Reilly won't even invite Larry to OSCON they're not very committed to Perl.
22:10 El_Che labster: I don't think it's a Perl thing. They just want best sellers
22:10 geekosaur ^
22:10 geekosaur ORA is committed to making a profit, just like any other business
22:13 moritz I'm still not sure I understand it
22:13 seatek he wants the most money possible
22:13 El_Che moritz: the risk is on the backers not on O'Reilly
22:13 moritz does the money go to brian? or to the publisher? or do they split?
22:14 seatek kickstarter looks like just to brian
22:14 seatek and it's a kinda "promise" that he'll write the book
22:14 seatek then again, maybe it will be another false start for h im
22:14 moritz ok, so O'Reilly won't give an advance
22:14 moritz but they publish the book if he write it
22:14 seatek i have no idea about that :)
22:14 El_Che moritz: I think that's it indeed. The overhead is for the backers, the royalties for brian
22:14 [Coke] brian, if you're reading this, I'm sure you could find folks here willing to comment on interim e-book versions.
22:15 El_Che but it's a guess :)
22:15 viki They're not paying him as much as he wants :)
22:16 seatek it's also advertising for his consulting services. give me money, and hey, get a discount on my consulting services!
22:16 viki [Coke], isn't that a privilege afforded only to the backers?
22:16 stmuk_ [Coke]: that costs $25
22:17 seatek the technical beauty of what's going on with Perl6 is what drew me to it, not any book or advertising
22:18 [Coke] Yes, folks, I read that. I'm mentioning that he can get that without money changing hands. (and I get that's not in his financial interest)
22:18 moritz ah well, I totally understand him
22:18 seatek i think that'll be true with most people any more -- not books for bookshelves
22:18 moritz writing a book is a shitton of effort
22:18 viki Actually, seems like the $25 gives you only the final e version. The early versions require $50
22:18 [Coke] oooh. I just followed @grover on twitter. ahhhhhh
22:19 seatek there is little point in those kinds of books any more
22:19 moritz so not wanting it go to waste is quite a reasonable motivation
22:19 moritz seatek: and yet we regularly get people asking after Perl 6 books
22:20 seatek moritz: won't last long
22:20 viki What's so special about 108 in a different baee?
22:20 viki *base
22:20 viki to Perl history
22:21 moritz seatek: I'm not so sure. Some people don't want to learn from an random sample of blog posts and reference docs
22:21 viki (the $108 reward says it is)
22:22 seatek moritz: i'm pretty sure that's the people who are used to learning from books alone. and those are fewer and fewer
22:22 viki 108 == 10 oct == 25 dec == christmas?
22:22 TEttinger viki: it's an important number in buddhism IIRC
22:22 seatek moritz: 10 years ago i saw people buying books on different things. now i never do. it's weird even to see someone using a book
22:23 moritz seatek: at least here in .de, schools still have books in school :-)
22:23 moritz s:2nd/school/class/
22:23 stmuk_ I really liked the K&D Go Programming Book
22:23 TEttinger https://en.wikipedia.org/wiki/108_(number)
22:23 seatek yeah i bet in school they still use books
22:24 viki Tettinger, and why is that important to Perl history?
22:24 gfldex seatek: what makes sense as books are quite resistant to gravity
22:24 viki TEttinger, and what's the base?
22:24 seatek books for muscle building
22:25 TEttinger good question.
22:26 El_Che stmuk_: I read it good. It was quite good, indeed
22:27 viki TEttinger: I think the 108 meaning 10 oct is a good guess, 'cause the reward is called Christmas.
22:27 seatek i'm pretty sure that discussions on the wonderful technical merits of Perl6 like can happen on reddit and stuff has far more impact than books. all the info to get in and actually try it is available immediately insteading of ponderously waiting for and wading through a book that may eventually get you to something interesting
22:27 viki moritz: what about your book? You got kickstarter yet?
22:28 El_Che "I learn english from a book"
22:28 moritz viki: no, and I don't plan to
22:28 viki Oh
22:28 AlexDaniel as I've said, I am ready to spend some time reviewing a book, if somebody writes it
22:28 moritz viki: I don't like to take money for stuff I haven't done yet
22:28 viki moritz: fair enough.
22:28 moritz AlexDaniel: will do
22:28 seatek moritz: me too
22:29 AlexDaniel though of course I am expecting to do it for free… both ways! :)
22:29 [Coke] m: (2..36).map({108.base($_)})
22:29 camelia rakudo-moar 58a482: ( no output )
22:29 [Coke] m: say (2..36).map({108.base($_)})
22:29 camelia rakudo-moar 58a482: OUTPUT«(1101100 11000 1230 413 300 213 154 130 108 99 90 84 7A 73 6C 66 60 5D 58 53 4K 4G 4C 48 44 40 3O 3L 3I 3F 3C 39 36 33 30)␤»
22:30 [Coke] 300 reminds me of sparta. I got nothing on the rest of them.
22:32 moritz regarding the schedule for my book, I currently plan to start blogging about in December
22:35 psch m: BEGIN my $a = 1; constant \type = $a ?? ::("Int") !! ::("Str"); class { also is type }.^mro.say
22:35 camelia rakudo-moar 58a482: OUTPUT«((<anon|72018304>) (Int) (Cool) (Any) (Mu))␤»
22:36 AlexDaniel OK, here's my best take on the token issue: #130117
22:36 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130117
22:36 AlexDaniel please write a comment if I got something wrong
22:43 nicq20_ joined #perl6
22:49 sufrostico joined #perl6
22:53 bilbo joined #perl6
22:54 skids joined #perl6
22:58 kyclark AlexDaniel: I would gladly have your input on my book (https://www.gitbook.com/book/​kyclark/metagenomics/details)
22:59 AlexDaniel 190 pages, great :)
23:00 kyclark I’M JUST GETTING WARMED UP!  (Sorry, I loved Scent of a Woman)
23:00 kyclark I start off with a lot of non-Perl stuff for our students, introduction to Unix, bash scripting, and HPC.
23:02 AlexDaniel kyclark: do you want me to use gitbook discussions for everything I find or can I just write you an email with all of my notes?
23:02 kyclark Email is fine.
23:02 kyclark Or discussions, whatever works.
23:02 AlexDaniel okay
23:03 gfldex seatek: i added travis support to *::Store::DBIish but it is blocked by a zef bug (https://github.com/ugexe/zef/issues/107) do you want the pull request right now anyways?
23:03 AlexDaniel ouch, bash!
23:03 kyclark I just added the Modules and OOP in the last couple of days.  I have a couple empty chapters until I can think of something to say.  Also need to come up with more chapters, probably, but trying to keep everything very focused on fully working examples that solve prolems in bioinformatics.
23:04 kyclark Bash is still bread-and-butter in bioinformatics.  Much of what we do is running existing programs and then processing the output.
23:04 canopus joined #perl6
23:04 kyclark Perl is very much our glue to bind programs together.
23:06 AlexDaniel kyclark: yeah, but I see a bunch of unquoted stuff and other issues. Anyway, I'll write it all down. Thanks, will read it instead of procrastinating, expect an email in a week :P
23:07 sufrostico joined #perl6
23:08 Xliff Is there a way to augment an existing grammar?
23:08 Xliff (Aside from ripping it out of where you found something useful and reimplementing it)
23:08 AlexDaniel Xliff: just subclass it?
23:09 AlexDaniel it is a regular class
23:09 Xliff Ahh..
23:09 Xliff Thanks!
23:10 Xliff Ah... fahrfignugen!
23:10 Xliff Grammer is inside another class.
23:10 Xliff I am looking at DateTime::Parse and it is missing what I get by like... smidgens.
23:11 Xliff And I just want to enhance it to catch the variations in format, not rip out pieces to reimplement.
23:13 seatek gfldex: oh gosh thanks! sure. or should i just wait for a fix? will this cause problems for travis in the meantime?
23:13 gfldex seatek: no, did you use travis before?
23:15 seatek gfldex: nope never have - new to me, github. but not git. assume its some automated build/checking thing that runs periodically for the perl module stuff
23:16 seatek i'm trying to track down some kind of horrific memory eating bug in Crust's middleware wrapper (with Crust::Builder it looks like so far)
23:41 Xliff Oh wow!
23:41 Xliff I use Grammar::Tracer to test my grammar and it works.
23:42 Xliff The moment I comment out "use Grammar::Tracer" the parser fails.
23:42 Xliff o_O
23:42 seatek sooo, i don't suppose anyone knows of a profiler that will display memory usage of each class and variable as a program is running, yes?
23:42 seatek i love Grammar::Tracer. but yeah that's weird
23:43 MasterDuke Xliff: related to RT #130083 perhaps?
23:43 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130083
23:44 Xliff I don't know.
23:45 Xliff I would have to take that and see if the original version works with Grammar::Tracer in play.
23:50 viki seatek: if there's any obvious spot with a regex (especially with one taking a variable), try checking that. I ran across a huge memory leak in buggable, but I don't recall ever narrowing it down or reporting
23:50 viki And there was a ticket for a var-in-a-regex memory leak, I don't remember if it was fixed or not.
23:52 seatek viki: oh thanks viki - i just glanced through and then stopped and had a bowl of cereal. you just gave me a little hope. ;)
23:55 Xliff Wow! You can't do this?
23:55 Xliff [ <weekday> || <wkday> ] ','? <SP> <date=date2> <SP> <time> <SP> 'GMT'
23:55 Xliff For some reason Grammar::Tracer allows it!
23:56 Xliff <weekday> == long name for DOW
23:56 Xliff <wkday> == 3 letter abbr for DOW
23:57 Xliff Ah well. I have solution. Will press on. However this script is a bit of a mess, now.
23:59 sufrostico joined #perl6

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

Perl 6 | Reference Documentation | Rakudo