Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-18

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:10 kurahaupo_ joined #perl6
00:12 zengargoyle tyil++ syscall is fun
00:13 kurahaupo joined #perl6
00:16 zengargoyle m: use NativeCall; sub syscall(int32) is native {}; syscall(57); say "Hi from $*PID"
00:17 camelia rakudo-moar 932b10: OUTPUT: «Hi from 6949␤Hi from 6949␤»
00:17 cdg joined #perl6
00:18 * zengargoyle resists the urge. :P
00:19 pilne joined #perl6
00:19 BenGoldberg samcv, "If you want have problems with C<xim> then you should try C<ibus>."  I'm not sure if you should remove "want" or change it to "want to" :P
00:19 samcv heh thanks
00:20 BenGoldberg welcome :)
00:20 samcv heh "want to" haha
00:21 Geth ¦ doc: 4b3297906e | (Samantha McVey)++ | doc/Language/unicode_entry.pod6
00:21 Geth ¦ doc: [unicode_entry] fix a typo
00:21 Geth ¦ doc:
00:21 Geth ¦ doc: BenGoldberg++
00:21 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4b3297906e
00:25 * zengargoyle now has to walk over to the desktop and power it back on. :)
00:26 geekosaur BenGoldberg, "yes"
00:28 * BenGoldberg grins.
00:31 * zengargoyle strangely enough, that caused desktop to power-on into the BIOS setup screen.
00:32 stmuk_ joined #perl6
00:34 MasterDuke joined #perl6
00:37 kurahaupo joined #perl6
00:39 kurahaupo joined #perl6
00:41 kurahaupo_ joined #perl6
00:47 kurahaupo joined #perl6
00:49 kurahaupo_ joined #perl6
00:50 kurahaupo joined #perl6
00:51 kurahaupo_ joined #perl6
00:53 araraloren_ joined #perl6
00:57 kurahaupo joined #perl6
01:01 cdg joined #perl6
01:03 cdg_ joined #perl6
01:07 kurahaupo_ joined #perl6
01:08 kurahaupo joined #perl6
01:09 kurahaupo__ joined #perl6
01:11 travis-ci joined #perl6
01:11 travis-ci Doc build errored. Samantha McVey '[unicode_entry] fix a typo
01:11 travis-ci https://travis-ci.org/perl6/doc/builds/244104452 https://github.com/perl6/doc/compare/0d4110870173...4b3297906eac
01:11 travis-ci left #perl6
01:24 sufrostico joined #perl6
01:34 Cabanossi joined #perl6
01:48 ilbot3 joined #perl6
01: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!
01:52 aborazmeh joined #perl6
01:52 aborazmeh joined #perl6
01:52 cdg joined #perl6
02:06 cdg joined #perl6
02:18 Cabanossi joined #perl6
02:29 noganex_ joined #perl6
02:29 committable6 joined #perl6
02:36 mr-foobar joined #perl6
03:10 mr-foobar joined #perl6
03:18 Cabanossi joined #perl6
03:28 NeuralAnomaly joined #perl6
03:28 NeuralAnomaly joined #perl6
03:30 NeuralAnomaly joined #perl6
03:34 aborazmeh joined #perl6
03:34 aborazmeh joined #perl6
03:48 Cabanossi joined #perl6
04:08 mr-foobar joined #perl6
04:15 NeuralAnomaly joined #perl6
04:15 NeuralAnomaly joined #perl6
04:38 mr-foobar joined #perl6
04:40 javan joined #perl6
04:47 Cabanossi joined #perl6
04:51 zakame joined #perl6
04:55 NeuralAnomaly joined #perl6
04:59 javan looking for a hand trying to parse this: {error => [], result => {rfc1123 => Sun, 18 Jun 17 05:00:26 +0000, unixtime => 1497762026}}
05:00 javan to pull out individual values
05:01 eveo javan: you mean parse that text with a grammar or do you have a hash and trying to get at a value?
05:02 javan hash
05:02 eveo m: my $stuff =  {error => [], result => {rfc1123 => "Sun, 18 Jun 17 05:00:26 +0000", unixtime => 1497762026}};   say $stuff<result><rfc1123>
05:02 camelia rakudo-moar c252b3: OUTPUT: «Sun, 18 Jun 17 05:00:26 +0000␤»
05:02 eveo m: my $stuff =  {error => [], result => {rfc1123 => "Sun, 18 Jun 17 05:00:26 +0000", unixtime => 1497762026}};   say $stuff<result><unixtime>
05:02 camelia rakudo-moar c252b3: OUTPUT: «1497762026␤»
05:04 javan thanks, lol im making it harder than it has to be
05:06 mr-foobar joined #perl6
05:07 eveo any time
05:20 BenGoldberg .u ????
05:20 yoleaux U+1F4E6 PACKAGE [So] (????)
05:24 NeuralAnomaly joined #perl6
05:37 eveo .tell El_Che 2017.06 got shipped out
05:37 yoleaux eveo: I'll pass your message to El_Che.
05:37 eveo left #perl6
05:41 mr-foobar joined #perl6
05:47 Cabanossi joined #perl6
06:09 mr-foobar joined #perl6
06:16 Actualeyes joined #perl6
06:18 Guest12857 joined #perl6
06:26 geekosaur joined #perl6
06:30 robertle joined #perl6
06:36 espadrine joined #perl6
06:39 mr-foobar joined #perl6
06:56 domidumont joined #perl6
06:56 wamba joined #perl6
07:10 mr-foobar joined #perl6
07:16 setty1 joined #perl6
07:19 parv joined #perl6
07:23 rindolf joined #perl6
07:40 mr-foobar joined #perl6
07:59 cpage_ joined #perl6
08:02 ggoebel joined #perl6
08:07 shlomif joined #perl6
08:11 stmuk joined #perl6
08:18 mr-foobar joined #perl6
08:40 mr-foobar joined #perl6
09:02 El_Che NeuralAnomaly: status
09:02 yoleaux 05:37Z <eveo> El_Che: 2017.06 got shipped out
09:02 NeuralAnomaly El_Che, [✘] Next release will be in 3 weeks and 6 days. Since last release, there are 1 new still-open tickets (0 unreviewed and 0 blockers) and 7 unreviewed commits. See http://perl6.fail/release/stats for details
09:04 timotimo damn, the next release is so soon
09:07 eliasr joined #perl6
09:12 El_Che timotimo: and it's gonna be huge
09:12 El_Che :)
09:21 ufobat_ joined #perl6
09:33 Cabanossi joined #perl6
09:36 alexk joined #perl6
09:37 alexk m: my $s = 'a,b,c'; for ^100_000 { @ = $s.split(',') }; say now - INIT now;
09:37 camelia rakudo-moar ee4c3d: OUTPUT: «1.122507␤»
09:38 alexk m: my $s = 'a,b,c'; for ^100_000 { @ = split(',', $s) }; say now - INIT now;
09:38 camelia rakudo-moar ee4c3d: OUTPUT: «3.29549189␤»
09:40 mr-foobar joined #perl6
09:55 setty1 joined #perl6
09:56 araraloren_ m: my $s = 'a,b,c'; for ^100_000 { @ = $s.&split(',') }; say now - INIT now;
09:57 camelia rakudo-moar ee4c3d: OUTPUT: «3.4321289␤»
10:20 pmurias_ joined #perl6
10:20 pmurias joined #perl6
10:22 El_Che https://github.com/nxadm/rakudo-pkg/releases/tag/2017.06 <- new rakudo pkgs
10:39 ugjka joined #perl6
10:40 mr-foobar joined #perl6
10:47 stmuk El_Che++
10:50 kernasi joined #perl6
10:50 kernasi hi
10:50 konsolebox joined #perl6
10:57 AlexDaniel joined #perl6
11:10 pmurias what's an idiomatic way of running a command with a timeout?
11:12 jnthn pmurias: I'd assemble it out of Proc::Async and Promise.in(...)
11:12 yoleaux 05:35Z <eveo> jnthn: got two new tickets you may be interested in: "for loop no longer sinks stuff": https://rt.perl.org/Ticket/Display.html?id=131593  and "some data race in Proc::Async write" probably worth waiting until the piping is reworked as you planned to do next week. Ticket: https://rt.perl.org/Ticket/Display.html?id=131592
11:20 mr-foobar joined #perl6
11:33 Cabanossi joined #perl6
11:35 mr-fooba_ joined #perl6
11:38 Arimaafan joined #perl6
11:48 Arimaafan joined #perl6
12:23 domidumont joined #perl6
12:24 AlexDaniel joined #perl6
12:29 BenGoldberg joined #perl6
12:32 Cabanossi joined #perl6
13:04 stmuk joined #perl6
13:07 kyan joined #perl6
13:11 pilne joined #perl6
13:13 grumble joined #perl6
13:27 welton joined #perl6
13:30 ugjka joined #perl6
13:32 Cabanossi joined #perl6
13:59 ufobat_ joined #perl6
14:13 lucs m: print 'ok' if index('abc', 'b') == 1  # Fine.
14:13 camelia rakudo-moar ee4c3d: OUTPUT: «ok»
14:13 lucs m: print 'ok' if index('abc', 'b') == 2  # Still fine.
14:13 camelia rakudo-moar ee4c3d: ( no output )
14:13 lucs m: print 'ok' if index('abc', 'Z') == 2  # Can I avoid the warning without needing to add a test for definedness?
14:13 camelia rakudo-moar ee4c3d: OUTPUT: «Use of Nil in numeric context␤  in block <unit> at <tmp> line 1␤»
14:14 lucs Or if I must test, what would be idiomatic?
14:15 lucs (perl5's return of -1 in case of no match was more practical, eh)
14:17 araraloren_ m: print 'ok' if index('abc', 'Z')
14:17 camelia rakudo-moar ee4c3d: ( no output )
14:17 lucasb joined #perl6
14:18 araraloren_ lucs, index return an undefined value when it was not found
14:18 lucs Hmm... I'm actually trying to see in a given char appears at a given position in a string.
14:19 araraloren_ Here is the document: https://docs.perl6.org/routine/index
14:19 lucs araraloren_: Yep, I get that.
14:20 araraloren_ m: say index('abc', 'Z').perl
14:20 camelia rakudo-moar ee4c3d: OUTPUT: «Nil␤»
14:20 lucs I'd rather not do  if index($s, 'Z') && index($s, 'Z) == 2  # for example
14:20 lucasb would this be work?  (index('abc', 'Z') // -1) == 2
14:20 lucs Hmm...
14:20 lucasb s/be//
14:21 araraloren_ It's work obviously
14:21 lucasb :)
14:21 lucs lucasb: Yep, I should have thought of that :)
14:21 lucs Thanks lucasb and araraloren_
14:22 araraloren_ but not elegant  ~~
14:22 lucs Could be worse...
14:22 BenGoldberg m: print 'ok' if quietly index('abc', 'Z') == 2;
14:22 camelia rakudo-moar ee4c3d: ( no output )
14:22 lucs Hmm...
14:23 lucasb m: print 'ok' if quietly index('abc', 'Z') == 0;
14:23 camelia rakudo-moar ee4c3d: OUTPUT: «ok»
14:23 lucs Whoops
14:23 araraloren_ That's a little better
14:23 BenGoldberg m: print 'ok' if quietly index('abc', 'Z') == "Make sure you know what you're doing";
14:23 camelia rakudo-moar ee4c3d: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Make sure you know what you're doing' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤»
14:39 lucasb m: say 'ok' if index('abc', 'a') andthen $_ == 0
14:39 camelia rakudo-moar ee4c3d: OUTPUT: «ok␤»
14:41 lucasb better: ... andthen * == 0
14:42 lucs lucasb++ Neato
14:44 lucs (all these operators...)
14:47 Cabanossi joined #perl6
14:49 timotimo say ok if $_ == 0 with index('abc', 'a')
14:49 evalable6 timotimo, rakudo-moar ee4c3d322: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/6Sh63zYPfA␤Confused␤at /tmp/6Sh63zYPfA:1␤------> say ok if $_ == 0 with ⏏index('abc', 'a')»
14:49 timotimo aaw
14:51 lucs m: (say 'ok' if $_ == 0) with index('abc', 'a')
14:51 camelia rakudo-moar ee4c3d: OUTPUT: «ok␤»
14:51 lucs m: (say 'ok' if $_ == 0) with index('abc', 'z')
14:51 camelia rakudo-moar ee4c3d: ( no output )
14:56 khw joined #perl6
15:04 zakharyas joined #perl6
15:05 stmuk_ joined #perl6
15:05 Guest12857 joined #perl6
15:07 setty1 joined #perl6
15:09 aborazmeh joined #perl6
15:09 aborazmeh joined #perl6
15:11 sufrostico joined #perl6
15:19 moritz https://leanpub.com/perl6regex
15:20 timotimo did you just put this up?
15:20 moritz the search for a publisher has me suffiently annoyed that I decided to go with leanpub again
15:20 moritz timotimo: yes
15:20 moritz though if I do find a publisher, I might close that again
15:20 moritz and I have about 35 pages written so far
15:23 * moritz hits the publish button
15:25 zakharyas joined #perl6
15:44 araraloren_ Can I access base class attribute in child class method ?
15:44 moritz no
15:45 moritz just methods
15:45 moritz (and private methods, if you established an explicit trust in the parent class)
15:46 timotimo though of course if it's a public attribute you can use the getter/setter it made for you
15:46 * Juerd likes the word 'accessor'
15:47 araraloren_ :) I found a class can access an attribute of role, it is suitable use a role contain some attribute ?
15:48 moritz araraloren_: what problem are you trying to solve?
15:48 moritz if a child class needs access to an attribute, why not make it public?
15:48 moritz I mean, either it's part of a stable API, then everybody should be able to acces sit
15:49 araraloren_ actually I want write it in TWEAK
15:49 moritz or it's not, then child classes shouldn't use it either
15:49 moritz TWEAK should be a submethod, so it's called once for the child class, once for the parent class
15:49 araraloren_ But if I do it in base class, I need to know what the child class is
15:49 moritz why?
15:49 araraloren_ Yeah, I know it is a submethod
15:50 timotimo no problem
15:50 timotimo self will be the type of the subclass
15:51 timotimo and ::?CLASS or what it's called is the class you defined the submethod in
15:51 moritz m: class P { submethod TWEAK { say self.^name } }; class C is P { }; C.name
15:51 camelia rakudo-moar ee4c3d: OUTPUT: «No such method 'name' for invocant of type 'C'. Did you mean any of these?␤    none␤    note␤    take␤␤  in block <unit> at <tmp> line 1␤␤»
15:51 araraloren_ The set value logical of child classes is different from each other.
15:51 Guest12857 joined #perl6
15:52 moritz m: class P { submethod TWEAK { say self.^name } }; class C is P { }; C.new
15:52 camelia rakudo-moar ee4c3d: OUTPUT: «C␤»
15:52 moritz araraloren_: what are the classes you are modeling? what does your code do?
15:53 araraloren_ moritz, wait a moment, I update it to my repo
15:54 * moritz afk for a few minutes
15:55 araraloren_ https://github.com/araraloren/perl6-getopt-advance/blob/master/lib/Getopt/Advance/Option.pm6#L180
15:56 araraloren_ moritz, ↑
15:56 araraloren_ The Option::Base is that parent class
15:58 araraloren_ The TWEAK of Option::Boolean and Option::Integer is different, but I can write $!value
15:59 araraloren_ And actually I want let user can define their own Option, so I do not want do this in base class (Option::Base)
15:59 zakharyas joined #perl6
16:00 araraloren_ Hope you can understand me. :)
16:10 timotimo i find it a missed opportunity to call all perl 6 script files ".pls"
16:22 araraloren_ moritz, I gotta to sleep now. .o/ Night every one
16:25 Guest12857 joined #perl6
16:27 rightfold timotimo: I'm more worried about the lack of .t6
16:32 nadim joined #perl6
16:33 andrzejk_ joined #perl6
16:43 jmerelo joined #perl6
16:44 jmerelo Hi all!
16:44 El_Che jota-jota
16:44 El_Che congrats on the new book
16:44 jmerelo Thanks!
16:44 El_Che brb (cooking)
16:45 jmerelo (but not here to talk about that, unless you _really_ want)
16:45 jmerelo I was trying to add the book to @moritz web
16:46 jmerelo And I realized he was using a Python static server to serve the test pages. I didn't like that. And started to look for a Perl 6 static web server. Didn't find one, so I started to write my own
16:46 jmerelo Not a big deal, since there's this excellent HTTP::Server::Tiny by @tokuhirom
16:47 jmerelo However, what I want is to be able to do something like this:  perl6 -I lib -M HTTP::Server::Static (minus the -I lib) and start a static server by default
16:47 jmerelo It works pretty well if I just put the code in Server.pm6, defining variables, and running code in the main scope.
16:48 jmerelo But I want to have some default values in the command line. And when I put my code in "sub MAIN( $port = 8080, $host = '0.0.0.0', $dir = "." ) {" it gets into the command line, instead of running MAIN by default.
16:52 jmerelo Any idea on how to do that better? Or at all?
16:55 Ven joined #perl6
17:02 timotimo you still have to -e '', don't you?
17:02 ChoHag joined #perl6
17:03 Cabanossi joined #perl6
17:05 jmerelo Yep, I have tried to call MAIN explicitly, but to no avail either
17:05 jmerelo perl6 -I lib -M HTTP::Server::Static -e "HTTP::Server::Static::MAIN();" yields an error. That would be plan B, but it does not work.
17:10 Skarsnik joined #perl6
17:13 Guest12857 joined #perl6
17:22 domidumont joined #perl6
17:32 espadrine joined #perl6
17:32 Cabanossi joined #perl6
17:34 ChoHag joined #perl6
17:40 Ven joined #perl6
17:43 kurahaupo joined #perl6
17:51 ugexe m: class Foo { our sub MAIN($bar) { say $bar } }; Foo::MAIN(42)
17:51 camelia rakudo-moar ee4c3d: OUTPUT: «42␤»
17:52 ugexe jmerelo: ^
17:54 jmerelo jmerelo at penny in ~/Code/perl6/p6-http-static (master●●)
17:54 jmerelo $ perl6 -I lib -M HTTP::Server::Static -e "HTTP::Server::Static::MAIN();"
17:54 jmerelo http server is ready: http://0.0.0.0:8080/ (pid:27214, keepalive: 1)
17:55 jmerelo @ugexe :+1:
17:55 pelev joined #perl6
17:55 jmerelo Thanks!
17:56 jmerelo Let me check if args work correctly
17:57 jmerelo Um, no, they don't. It's simply a sub called MAIN, it's not taking the default arguments
17:58 jmerelo Or any argument, for that matter. I can actually call it explicitly, but baseline is it's not behaving as the MAIN routine in a program
17:58 ugexe well no
17:58 ugexe you're not going to have a lot of luck trying to do that
17:58 jmerelo It's actually not needed, since you have to call it anyway. Would have been nice...
17:59 jmerelo @ugexe probably not. But thanks anyway!
17:59 zengargoyle is there no eqv of main() unless caller();
18:00 uberbaud joined #perl6
18:00 ugexe `perl6 -MZef::CLI -e0` you can do something like this
18:01 ugexe perl6 -MZef::CLI -e '' install Foo
18:03 ugexe but I could never get things to work right when i put the MAIN logic in the main module - Zef::Client
18:04 zengargoyle is it never getting to the -e part in Zef::CLI?  my naive -e'' usually fails, -e'1' gives warning about useless use of constant.
18:05 ugexe m: 1
18:05 camelia rakudo-moar ee4c3d: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤»
18:05 ugexe m:
18:05 evalable6 ugexe, rakudo-moar ee4c3d322: OUTPUT: «»
18:11 zengargoyle perl6 -I. -MStatic -e'' -- tells me "Option -e needs a value"
18:12 timotimo probably has to -e ''
18:12 timotimo because -e'' is indistinguishable from -e alone
18:12 zengargoyle ah, *nod*
18:13 timotimo '' as a sole parameter works, but at the end of a parameter it just concatenates the empty string to whatever's in front
18:15 tbrowder jmerelo: can you list your book on per6.org/resources/books?
18:16 tbrowder *perl6.org
18:16 jmerelo @tbrowder just did, waiting for the pull request to be accepted. That triggered this whole thing, actually :-)
18:17 sufrostico joined #perl6
18:17 Ven_ joined #perl6
18:18 tbrowder great! came in late to dance today
18:21 timotimo baile?
18:23 andrzejk_ joined #perl6
18:23 tbrowder speaking of books, can someone add Andrew Shitov's new book in work? i'm in limited contact now or i would do it; is it too early to add Gabor's book (not yet funded)?
18:25 BenGoldberg joined #perl6
18:32 lizmat joined #perl6
18:34 keylet joined #perl6
18:34 keylet m: say 'foo';
18:34 camelia rakudo-moar ee4c3d: OUTPUT: «foo␤»
18:36 keylet m: 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ /<-[A..Z]>/;
18:36 camelia rakudo-moar ee4c3d: ( no output )
18:36 keylet m: 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ /<-[A..z]>/;
18:36 camelia rakudo-moar ee4c3d: ( no output )
18:36 keylet m: 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ /\w/;
18:36 camelia rakudo-moar ee4c3d: ( no output )
18:36 keylet m: 'a5b^%##*c&9c856697967d765#~~!89g*^*&%tlL^^' ~~ /\w/;
18:36 camelia rakudo-moar ee4c3d: ( no output )
18:36 keylet no sense why it does not work
18:37 mr-foobar joined #perl6
18:38 geekosaur it does not print the answer automatically
18:38 geekosaur m: say 'a5b^%##*c&9c856697967d765#~~!89g*^*&%tlL^^' ~~ /\w/;
18:38 camelia rakudo-moar ee4c3d: OUTPUT: «「a」␤»
18:38 keylet m: say 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ /<-[A..z]>/;
18:38 camelia rakudo-moar ee4c3d: OUTPUT: «「5」␤»
18:38 geekosaur (it's hard to test behavior of sinking when the bot doesn't let you sink stuff)
18:39 keylet m: say 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ g:/<-[A..z]>/;
18:39 camelia rakudo-moar ee4c3d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 9c856697967d765$#~~!89g*^*&%tlL^^' ~~ g:7⏏5/<-[A..z]>/;␤    expecting any of:␤        colon pair␤»
18:39 keylet m: say 'a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ m:g/<-[A..z]>/;
18:39 camelia rakudo-moar ee4c3d: OUTPUT: «(「5」 「%」 「#」 「#」 「*」 「&」 「9」 「8」 「5」 「6」 「6」 「9」 「7」 「9」 「6」 「7」 「7」 「6」 「5」 「$」 「#」 「~」 「~」 「!」 「8」 「9」 「*」 「*」 「&」 「%」)␤»
18:40 keylet m: say ('a5b^%##*c&9c856697967d765$#~~!89g*^*&%tlL^^' ~~ m:g/<-[A..z]>/).WHAT;
18:40 camelia rakudo-moar ee4c3d: OUTPUT: «(List)␤»
18:40 keylet what's the difference between (List) and (Array)?
18:44 stmuk joined #perl6
18:44 geekosaur List is read-only and can therefore be optimized in ways Array can't
18:45 rightfold keylet: Please consult this document, which highlights the differences: https://docs.perl6.org/language/list#Arrays
18:46 AlexDaniel joined #perl6
19:00 domidumont joined #perl6
19:03 AlexDani` joined #perl6
19:13 mscha joined #perl6
19:13 mscha m: my %sum{Int} is default([]); %sum{4}.push("1+3"); %sum{4}.push("2+2"); say (1..10).grep(-> $i { %sum{$i} == 2 }); # huh? 1/3
19:13 camelia rakudo-moar ee4c3d: OUTPUT: «(1 2 3 4 5 6 7 8 9 10)␤»
19:13 mscha m:  my %sum{Int} is default([]); %sum{4}.push("1+3"); %sum{4}.push("2+2"); say %sum # huh? 2/3
19:13 camelia rakudo-moar ee4c3d: OUTPUT: «{}␤»
19:13 mscha m: my %sum{Int} is default([]); %sum{4}.push("1+3"); %sum{4}.push("2+2"); say %sum{4} # huh? 3/3
19:13 camelia rakudo-moar ee4c3d: OUTPUT: «[1+3 2+2]␤»
19:14 keylet_ joined #perl6
19:15 mscha m:  my %sum{Int}; %sum{4}.push("1+3"); %sum{4}.push("2+2"); say (1..10).grep(-> $i { %sum{$i} && %sum{$i} == 2 }); # This works, but is less elegant
19:15 camelia rakudo-moar ee4c3d: OUTPUT: «(4)␤»
19:18 keylet_ how to convert "\u<number>
19:18 keylet_ how to convert \u<number> to the symbol?
19:18 keylet_ i. e. \u0442 etc. is JSON
19:18 keylet_ * in JSON
19:19 moritz keylet_: there's code for that in JSON::Tiny, for example
19:19 moritz basically chr(:16(<number>))
19:20 moritz m: say chr(:16('2713'))
19:20 camelia rakudo-moar ee4c3d: OUTPUT: «✓␤»
19:21 moritz (json encodes surrogate pairs as separate characters, so you have to be a bit mroe careful than that)
19:40 moritz https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Actions.pm#L63
19:48 TEttinger joined #perl6
19:49 nowan joined #perl6
19:54 brrt joined #perl6
20:02 Cabanossi joined #perl6
20:05 Cabanossi joined #perl6
20:08 timotimo yeah, ugh, those
20:08 andrzejk_ joined #perl6
20:18 dha joined #perl6
20:19 dha joined #perl6
20:19 dha joined #perl6
20:20 dha joined #perl6
20:20 dha joined #perl6
20:28 ChoHag joined #perl6
20:33 domidumont joined #perl6
20:37 El_Che moritz: happy to see the grammar book appearing somewhere in the future
20:39 moritz El_Che: the first 40 pages have already appeared (no grammars yet though, just regexes so far)
20:40 El_Che the good parts are at the end :)
20:41 moritz but there's an cheap early bird coupon (valid for one day): https://leanpub.com/perl6regex/c/earlybird :-)
20:42 frobisher joined #perl6
20:42 frobisher joined #perl6
20:43 frobisher joined #perl6
20:47 Cabanossi joined #perl6
21:07 BenGoldberg joined #perl6
21:07 brrt i recently came to the somewhat ugly conclusion that no, events are in fact not very good for highly concurrent large-scale batch workloads
21:07 brrt channels (or work queues) are a much better primitive
21:09 BenGoldberg It's a good thing that perl6 has channels built in, isn't it! :)
21:09 brrt aye
21:09 brrt but this conclusion surprised me quite a bit
21:10 brrt channesl, or bounded queues, have automatic rate-limiting and lockstepping
21:11 brrt with events, you inevitably bind the first step in your chain to the last, or you run the risk of 'overflowing' at some point in the middle
21:13 brrt or you have to reimplement a queue badly anyway
21:14 jnthn Yeah, for batch processing, "push back at the point of input" will suffice
21:15 jnthn (And behave nicely)
21:15 brrt it is in fact probably the only thing, other than pull-from-point-of-output
21:15 jnthn Events better model situations where you can't push back.
21:15 brrt true.
21:15 jnthn Stuff just happens and you have to react.
21:15 brrt such situations are unhappy ones
21:16 jnthn In general, I'd say events are a slightly odd thing to use in batch processing. :)
21:18 jnthn In that they're all about "this thing just happend right now!" and batch processing is more like "OK, we've got all these things to chug through".
21:19 jnthn I'd also argue that concurrency in batch processing is typically a choice to get it done faster (so, it's really a case of parallelism).
21:20 jnthn Whereas event processing under a model like Perl 6 supplies offer is primarily aimed at dealing with true concurrent situations, where concurrency is an inherent part of the problem.
21:21 * TimToady was a bit surprised that Erlang has no mechanism for back pressure on its work queues
21:22 jnthn To be fair, we only have that in module space so far also, though I'm decidedly open to Channel growing an option to bound it. :)
21:22 jnthn (One of those "didn't get to it yet" things)
21:23 TimToady .oO(just ignore the backpressure?)
21:26 * TimToady --> arrival dinner &
21:28 jnthn :)
21:30 timotimo backpressure, that's when you get a massage, right?
21:30 salyavin joined #perl6
21:31 salyavin joined #perl6
21:32 Cabanossi joined #perl6
21:33 salyavin joined #perl6
21:33 salyavin joined #perl6
21:33 salyavin joined #perl6
21:41 lizmat .oO( from the Swedish prime minister )
21:42 brrt yeah, the problem is that the system i'm working in, 'events' are pretty much the only logical way to do concurrency
21:42 brrt actually, eents + queues would work out fine...
22:00 brrt joined #perl6
22:04 samcv it's so hot today :(
22:06 BenGoldberg Not where I am, it's just disgustingly humid.
22:09 * BenGoldberg wants some sort of wearable air conditioner/dehumidifier.
22:10 |oLa| left #perl6
22:15 stmuk_ joined #perl6
22:17 timotimo wear a silica gel package
22:21 El_Che moritz: thx. I'll get it once you get to the grammars
22:21 BenGoldberg A silica gel jacket would be a bit silly, methinks.
22:23 BenGoldberg Not to mention, it would need some way of getting the silica gel beads to release their moisture after they'd reached capacity.
22:27 Guest12857 joined #perl6
22:28 Geth ¦ doc: e556ea3743 | (Samantha McVey)++ | doc/Language/unicode.pod6
22:28 Geth ¦ doc: [unicode-grant] Add documentation on UTF8-C8
22:28 Geth ¦ doc:
22:28 Geth ¦ doc: We previously had no documentation on UTF8-C8. Here is a pretty
22:28 Geth ¦ doc: good start for people looking to better understand what it means
22:28 Geth ¦ doc: and at least *some* of the reasons why it exists.
22:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e556ea3743
22:30 samcv this section can probably be improved a bit. but it's fairly good basis
22:36 samcv any comments on ^ are appreciated
22:37 SHODAN joined #perl6
22:40 grondilu joined #perl6
22:41 [Coke] joined #perl6
22:43 xerx joined #perl6
22:45 BenGoldberg samcv, my comment on that is: samcv++ ;)
23:02 dolmen_ joined #perl6
23:14 samcv BenGoldberg, let me know if you find a wearable air conditioner though
23:16 timotimo adam savage walked a comic con (or similar) floor dressed as an astronaut including a backpack with cooling water and a shirt with pipes through it for the water to flow through
23:18 travis-ci joined #perl6
23:18 travis-ci Doc build errored. Samantha McVey '[unicode-grant] Add documentation on UTF8-C8
23:18 kurahaupo joined #perl6
23:18 travis-ci https://travis-ci.org/perl6/doc/builds/244329918 https://github.com/perl6/doc/compare/4b3297906eac...e556ea37438d
23:18 travis-ci left #perl6
23:19 samcv i need to get a table from html into a libreoffice presentation
23:19 samcv anybody know the best way to do this?
23:23 timotimo select the table, copy it from the browser, paste it into libreoffice :P
23:25 AlexDaniel yea, that's how it should work…
23:25 AlexDaniel sometimes you may want to paste into libreoffice writer first
23:26 AlexDaniel I don't remember the details now… but either that or paste into libreoffice anything, copy it from there again and paste it into a proper table…
23:30 samcv going to try and work this into my talk somewhere https://i.imgflip.com/1nw9qp.jpg
23:30 samcv maybe alter it a bit
23:33 samcv cool. was even able to find a high res version of the source image i made that from. reverse image search is great
23:38 dolmen_ joined #perl6
23:43 timotimo "nature habitat" or should it be "natural habitat,?
23:46 samcv natural habitat
23:46 samcv maybe should reverse the top and bottom text
23:47 Cabanossi joined #perl6
23:48 eveo joined #perl6
23:48 timotimo could work, too
23:49 timotimo but this way seems more common?
23:49 samcv maybe yeah
23:49 samcv or maybe change it to. "What people imagine perl 6 devs doing"
23:49 samcv or something like that
23:49 samcv words to that effect
23:49 eveo BTW, since I see people ask about it. perl6-debug-m got fixed (I believe) now. The fix didn't make it into 2017.06 release, but will be in 2017.07, out of which next R* will be based as well. Fix in https://github.com/rakudo/rakudo/commit/6d4691fbd91d7f54
23:50 eveo ** buys a copy off https://leanpub.com/perl6regex/c/earlybird **
23:50 eveo moritz++
23:50 eveo \o
23:50 eveo left #perl6

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

Perl 6 | Reference Documentation | Rakudo