Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-12-28

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 ambs joined #perl6
00:04 ChoHag joined #perl6
00:20 astj joined #perl6
00:20 ChoHag joined #perl6
00:30 astj joined #perl6
00:32 astj joined #perl6
00:34 astj_ joined #perl6
00:35 Rawriful joined #perl6
00:49 astj joined #perl6
00:57 yht joined #perl6
01:03 vichib joined #perl6
01:19 Herby_ joined #perl6
01:20 vichib joined #perl6
01:21 vichib joined #perl6
01:23 Herby_ man, technology is cool. currently cruising at 30k feet and sitting in a chat room
01:25 timotimo don't you get seasick if you're looking at a slow-moving chatroom while you're going hundreds of mph? :P
01:27 geekosaur only if you're projecting it onto the window with wisps of cloud about :p
01:33 Herby_ :)
01:34 Herby_ its going to be really cool when VR goes mainstream
01:34 Herby_ fly at 30k ft while in your virtual office
01:38 Herby_ joined #perl6
01:41 Herby_ The FlyFi isnt the most reliable
01:41 Herby_ FlyFi.  If someone hasnt trademarked that yet they should
01:42 geekosaur probably more reliable than the local wifi (I irc over a cellmodem)
01:42 geekosaur someone probably has
01:42 geekosaur and its users get to pay an extra $10/minute :)
01:42 Herby_ hah probably
01:42 AlexDaniel you can't register a trademark just for fun
01:43 Herby_ JetBlue has Fly-Fi  >:(
01:54 cdg joined #perl6
01:59 konsolebox joined #perl6
02:01 _Kaiepi joined #perl6
02:18 timotimo and all the birdies say i'm pretty wi (for a fly-fi)
02:18 aindilis joined #perl6
02:27 AlexDaniel XD
02:31 Sgeo joined #perl6
02:57 ilbot3 joined #perl6
02:57 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:57 TimToady m: dd [+«"1,2,5,42".split(",")]
02:57 camelia rakudo-moar c10b8fe95: OUTPUT: «[1, 2, 5, 42]␤»
03:06 protium joined #perl6
03:08 Rawriful joined #perl6
03:08 mantovani joined #perl6
03:09 xiaoyafeng OK, thanks.
03:13 geekosaur (unix is in general better about providing executables corresponding to shell builtins, btw. but something like "cd" can't be done as an executable; likewise windows "echo" can control cmd.exe behavior ("echo off" which you can often find in Makefiles for Windows) so it also must be a builtin without a corresponding executable)
03:17 unicodable6 joined #perl6
03:17 benchable6 joined #perl6
03:20 mantovani joined #perl6
03:30 ribasushi joined #perl6
04:16 konsolebox joined #perl6
04:48 mahafyi joined #perl6
04:58 Cabanossi joined #perl6
05:12 natrys joined #perl6
05:15 wander joined #perl6
05:16 wander Let's say we have an Int $a and an Array[Int] @arr
05:17 wander is the performance different between 'so $a (elem) @a' and 'so $a == any(@a)'
05:33 hello joined #perl6
05:33 hello What could be the reason of this behavior? https://stackoverflow.com/a/45885415/2774153
05:33 hello While Perl 5 supports that Perl 6 won't !!
05:59 geekosaur which behavior? the quotes?
05:59 geekosaur are you sure perl 5 supports it?
05:59 geekosaur because this comes from cmd.exe and from the C runtime, and is not visible to either perl 5 or perl 6
05:59 hello geekosaur Yes Perl 5 supports while Perl 6 not in Windows
05:59 geekosaur any more than any program on unix can see or change how the shell splits areguments
06:00 geekosaur then presumably your perl 5 used a different C runtime
06:00 MasterDuke_ joined #perl6
06:00 MasterDuke_ m: my Int @a = ^100_000; my Int $a = 3333; say so $a (elem) @a; say now - INIT now
06:00 camelia rakudo-moar c10b8fe95: OUTPUT: «True␤0.0540284␤»
06:00 geekosaur or your perl 5 is doing something to get the original comamnd line and ignore the one the C runtime gave it, which is possible but poses portability issues with different Windows versions
06:00 MasterDuke_ m: my Int @a = ^100_000; my Int $a = 3333; say so $a == any(@a); say now - INIT now
06:00 camelia rakudo-moar c10b8fe95: OUTPUT: «True␤2.08662301␤»
06:01 Actualeyes joined #perl6
06:01 geekosaur perl 5 is happy to do stupid OS dependent things
06:01 geekosaur on Windows, supporting '' as the outer quotes is OS version and C runtime dependent and $DEITY help you otherwise
06:02 MasterDuke_ .tell wander `so $a (elem) @a` is 40x faster than `so $a == any(@a)` for a 100k array
06:02 yoleaux MasterDuke_: I'll pass your message to wander.
06:20 darutoko joined #perl6
06:27 konsolebox joined #perl6
06:57 ChoHag joined #perl6
07:07 Actualey` joined #perl6
07:22 mahafyi joined #perl6
07:29 Cabanossi joined #perl6
07:36 lizmat joined #perl6
07:41 wamba joined #perl6
08:04 xcm joined #perl6
08:16 geospeck joined #perl6
08:31 pmurias joined #perl6
08:36 dct joined #perl6
08:47 Bucciarati joined #perl6
09:06 xcm joined #perl6
09:36 setty1 joined #perl6
09:52 geospeck joined #perl6
09:52 domidumont joined #perl6
09:58 domidumont joined #perl6
09:58 rindolf joined #perl6
10:06 scimon joined #perl6
10:06 wamba joined #perl6
10:18 Actualeyes joined #perl6
10:21 aborazmeh joined #perl6
10:21 aborazmeh joined #perl6
10:21 rgrau joined #perl6
10:24 mahafyi joined #perl6
10:57 andrzejku joined #perl6
11:18 rgrau joined #perl6
11:21 andrzejku who can tell me how the perl6 scanner works
11:21 andrzejku is it direct-coded scanner
11:21 andrzejku with dfa?
11:21 andrzejku or what
11:26 sjn andrzejku: which scanner (do you have an URL?)
11:26 andrzejku no
11:26 andrzejku perl6 compiler scanner
11:28 * sjn isn't sure what andrzejku means with "scanner" (sorry) - did you mean "parser"?
11:29 andrzejku yeah
11:29 andrzejku lexer
11:29 lizmat andrzejku: the perl 6 "parser" is a grammar written in NQP
11:29 andrzejku and what parse NQP?
11:29 lizmat https://github.com/rakudo/rakudo/blob/master/src/Perl6/Grammar.nqp
11:30 lizmat NQP is self hosting, so NQP
11:32 pmurias andrzejku: also a grammar written in NQP
11:32 andrzejku wtf :D
11:46 pmurias andrzejku: the concept is called self hosting
11:46 pmurias andrzejku: the C compiler is usually written in C not machine code for some reason too
11:48 teatime andrzejku: you may be entertained by:  http://vxer.org/lib/pdf/Reflections%20on%20Trusting%20Trust.pdf
11:57 Geth ¦ doc: 72d3b67fc7 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
11:57 Geth ¦ doc: update info per actual (or planned) implementation
11:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/72d3b67fc7
11:57 synopsebot Link: https://doc.perl6.org/language/pod
12:02 epony joined #perl6
12:11 geospeck joined #perl6
12:14 geospeck joined #perl6
13:08 buggable New CPAN upload: Verge-RPC-Client-0.0.1.tar.gz by BRAKMIC https://cpan.metacpan.org/authors/id/B/BR/BRAKMIC/Perl6/Verge-RPC-Client-0.0.1.tar.gz
13:11 piojo_ joined #perl6
13:14 wamba joined #perl6
13:16 rgrau joined #perl6
13:25 brakmic joined #perl6
14:00 ico joined #perl6
14:05 ico hello
14:06 ico please can someone comment on current speed of rakudo?
14:06 ico i am trying to find an excuse to start to use perl6
14:06 ico now I probably didn't find the best excuse, but maybe....
14:07 ico i am working on traffic accounting sw
14:07 ico currently it is completely in C
14:08 ico and now I am deciding whether to start to implement multithreading (with locks etc)
14:08 ico or whether it would be the time to start to use perl6
14:09 ico and its supplies etc
14:09 ico so the question is: would it work with ~150k messages /sec?
14:10 ico i know it is quite naive to get here and want instant answers
14:11 ico but maybe someone could point me to some performance tuning docs before trying to implement something
14:12 ico heh or maybe trying to implement something would be the best start and THEN ask questions how to do this and that
14:17 pmurias ico: how is your program reading in the messages?
14:21 ico pmurias: it runs on linux and uses NFLOG target from iptables
14:22 ico pmurias: it captures first few bytes of each packet, extracts src/dst IP, proto, ports etc
14:22 ico pmurias: it then increments some counters in some simple hash table
14:23 ico pmurias: and what I assume could be possible is: capture packets from multiple NFLOGs, each from separate thread
14:24 ico pmurias: all that "capturing threads" would be started somehow from NativeCall
14:25 ico pmurias: and then I would somehow get each packet info into some Supply... and increment counters in perl6's hashes
14:27 lizmat ico: incrementing counters in hashes is expensive
14:27 lizmat you probably could use a hash to keep an index into a native array
14:27 ico pmurias: or other possibility: each thread would have its own counters and only on some signal (for lack of proper name) would flush its counter table
14:27 lizmat and update the native array in C
14:28 lizmat reading the hash would then just be one level of extra indirection that you could possibly hide in a custom AT-KEY
14:29 timotimo might be a good idea to investigate how much overhead atomic increments would cause
14:29 ico lizmat: yes I assume you are correct
14:29 ico I just wanted to try the least possible work to get the data from C to perl
14:29 timotimo it's probably more costly to do a supply or channel setup to cause increments than it is to just directly access the counters with atomic operations
14:30 lizmat afk&
14:32 ico OK so I assume it would be better to modify my current approach - each thread would use its own hash table and then there would be a separate thread which would on some interval fetch each therad's data
14:32 * timotimo also AFK for a few hours
14:34 ico well, I didn't think of this possibility :) I am probably too close to get some good ideas
14:37 pmurias joined #perl6
14:37 andrzejku joined #perl6
14:46 Herby_ joined #perl6
14:46 Herby_ o/
14:57 dct joined #perl6
15:13 silug joined #perl6
15:36 geospeck_ joined #perl6
15:37 cdg joined #perl6
15:39 domidumont joined #perl6
16:05 nativecallable6 joined #perl6
16:05 statisfiable6 joined #perl6
16:05 quotable6 joined #perl6
16:05 releasable6 joined #perl6
16:05 committable6 joined #perl6
16:22 xcm joined #perl6
16:48 khw joined #perl6
17:06 cdg joined #perl6
17:17 leah2 joined #perl6
17:17 cdg joined #perl6
17:18 buggable New CPAN upload: Bitcoin-Client-0.0.2.tar.gz by BRAKMIC https://cpan.metacpan.org/authors/id/B/BR/BRAKMIC/Perl6/Bitcoin-Client-0.0.2.tar.gz
17:20 chakli joined #perl6
17:26 cdg joined #perl6
17:30 cdg joined #perl6
17:30 domidumont joined #perl6
17:30 cdg_ joined #perl6
17:41 wamba joined #perl6
17:44 chakli Hello
17:44 chakli do we have any modules to parse html?
17:51 markong joined #perl6
17:53 Kaiepi joined #perl6
17:58 wamba joined #perl6
17:59 wander joined #perl6
17:59 wander MasterDuke_: Thank you for https://irclog.perlgeek.de/perl6/2017-12-28#i_15628302
17:59 yoleaux 06:02Z <MasterDuke_> wander: `so $a (elem) @a` is 40x faster than `so $a == any(@a)` for a 100k array
18:06 TimToady but either of those indicates You're Doing It Wrong™
18:06 TimToady reconstructing sets or junctions every time through usually means you should have a permanent hash or sethash somewhere in the solution
18:07 lizmat TimToady: scalar (elem) @a is optimized to basically do a first() using the .WHICH values
18:08 wander does (elem) build a set?
18:08 lizmat no, it returns a Bool
18:08 lizmat it does *not* build a Set
18:08 lizmat (used to in the past, but doesn't do that anymore)
18:09 wander .
18:16 jnthn It'll still be O(n) though
18:20 wander so..outside the filter let $checker = Hash.new(@a X True); and inside check defined $checker{$a}?
18:22 wander if intersect @a and @b, maybe SetHash.new(@a) (&) SetHash.new(@b). How about keep the (index) order
18:23 wander let's say there is no duplicate elem
18:26 geospeck joined #perl6
18:27 wander or be more real world, assume we have a list of records, and now want to filter like @recodes.grep(*<item> (elem) @checker)
18:28 lizmat depending on the size of @checker, you might gain from turning @checker into s Set first
18:29 pecastro joined #perl6
18:31 wander :-)
18:47 Zoffix joined #perl6
18:47 Zoffix chakli: yes, DOM::Tiny https://modules.perl6.org/repo/DOM::Tiny
18:47 yoleaux 27 Dec 2017 12:12Z <lizmat> Zoffix: I guess the advent tweet can be unpinned now: https://twitter.com/zoffix
18:47 Zoffix lizmat: thanks. Unpinned
18:56 geospeck joined #perl6
18:59 geospeck_ joined #perl6
19:04 chakli joined #perl6
19:24 rgrau joined #perl6
19:29 pavel joined #perl6
19:33 troys joined #perl6
19:38 bisectable6 joined #perl6
19:38 bloatable6 joined #perl6
19:38 squashable6 joined #perl6
19:38 coverable6 joined #perl6
19:38 greppable6 joined #perl6
19:39 reportable6 joined #perl6
19:55 Zoffix m: sub (+@l) { my @z := @l; dd [@l, @z] }((1,2 , 3).Seq)
19:55 camelia rakudo-moar c10b8fe95: OUTPUT: «[(1, 2, 3), (1, 2, 3)]␤»
19:55 Zoffix m: sub (+@l) { dd @l }((1,2 , 3).Seq)
19:55 camelia rakudo-moar c10b8fe95: OUTPUT: «(1, 2, 3)␤»
19:56 Zoffix what the..
19:56 Zoffix nm; misread my debbugging output and thought I had a Seq in a @ var
19:57 cdg joined #perl6
19:58 Herby_ joined #perl6
19:59 rindolf joined #perl6
20:05 xcm joined #perl6
20:14 Ven`` joined #perl6
20:17 Zoffix .oO( why is Any.cache a thing :/
20:17 Zoffix )
20:19 Zoffix TimToady: you around? A 6.c test you altered looks wrong to me: https://github.com/perl6/roast/commit/5463a12cbe6dacaaef898d28d37db9d1a8c5128b
20:19 Zoffix list Seq:D should return a List
20:19 Zoffix m: dd ().Seq.list # and method form does
20:19 camelia rakudo-moar c10b8fe95: OUTPUT: «()␤»
20:20 lizmat Zoffix: technically, .list should return something listy
20:20 lizmat only .List should return a List
20:20 Zoffix lizmat: what's "listy"?
20:20 lizmat at least, that's my understanding
20:20 Zoffix I'd think that'd be List and Array, from core types
20:20 lizmat something Iterable
20:20 lizmat well...
20:20 Zoffix m: dd %(:42a).list
20:20 camelia rakudo-moar c10b8fe95: OUTPUT: «(:a(42),).Seq␤»
20:20 Zoffix So why does this return a Seq and not a Hash?
20:21 lizmat sorry, something Positional
20:21 Zoffix Ok, yeah, agreed, Positional
20:21 Zoffix m: my @foo := ().Seq
20:21 camelia rakudo-moar c10b8fe95: OUTPUT: «Type check failed in binding; expected Positional but got Seq ($(().Seq))␤  in block <unit> at <tmp> line 1␤␤»
20:21 lizmat and .hash should return something Associative
20:21 Zoffix Now that I think of it, should ^ that do the PositionalBindFailover thing?
20:22 lizmat so, maybe it returning a .Seq *is* wrong
20:22 lizmat Zoffix: possibly, really would like to see jnthn  or TimToady to chime in on that
20:22 Zoffix Ok, I'll open an Issue.
20:28 Zoffix R#1344
20:28 synopsebot R#1344 [open]: https://github.com/rakudo/rakudo/issues/1344 [@LARRY] What is a "list"?
20:28 Zoffix R#1337
20:28 synopsebot R#1337 [closed]: https://github.com/rakudo/rakudo/issues/1337 [build] Add some `make blah` command to install Inline::Perl5
20:28 cognominal joined #perl6
20:28 Zoffix gah. the 1337 issue ain't that leet :)
20:29 Zoffix .ask jnthn would you be able to clarify what is a ".list"? https://github.com/rakudo/rakudo/issues/1344
20:29 yoleaux Zoffix: I'll pass your message to jnthn.
20:29 Zoffix .ask TimToady would you be able to clarify what is a ".list"? https://github.com/rakudo/rakudo/issues/1344
20:29 yoleaux Zoffix: I'll pass your message to TimToady.
20:35 pilne joined #perl6
20:50 Zoffix left #perl6
20:58 evalable6 joined #perl6
21:17 Ven`` joined #perl6
21:22 rindolf joined #perl6
21:34 espadrine joined #perl6
21:38 freeze joined #perl6
21:40 rjbs joined #perl6
21:41 R0b0t1 joined #perl6
21:43 Praise joined #perl6
21:43 Praise joined #perl6
21:44 protium joined #perl6
21:46 raydiak__ joined #perl6
21:47 giraffe joined #perl6
22:04 devmikey joined #perl6
22:11 rgrau` joined #perl6
22:27 eliasr joined #perl6
22:32 rindolf joined #perl6
23:18 setty1 joined #perl6
23:42 rgrau joined #perl6
23:50 rgrau joined #perl6
23:54 rgrau joined #perl6

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

Perl 6 | Reference Documentation | Rakudo