»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Herby_ man, technology is cool. currently cruising at 30k feet and sitting in a chat room 01:23
timotimo don't you get seasick if you're looking at a slow-moving chatroom while you're going hundreds of mph? :P 01:25
geekosaur only if you're projecting it onto the window with wisps of cloud about :p 01:27
Herby_ :) 01:33
its going to be really cool when VR goes mainstream 01:34
fly at 30k ft while in your virtual office
Herby_ The FlyFi isnt the most reliable 01:41
FlyFi. If someone hasnt trademarked that yet they should
geekosaur probably more reliable than the local wifi (I irc over a cellmodem) 01:42
someone probably has
and its users get to pay an extra $10/minute :)
Herby_ hah probably
AlexDaniel you can't register a trademark just for fun
Herby_ JetBlue has Fly-Fi >:( 01:43
timotimo and all the birdies say i'm pretty wi (for a fly-fi) 02:18
AlexDaniel XD 02:27
xiaoyafeng hello! I found windows echo command can't work with run. 02:55
geekosaur yes, it's not an executable, it's a cmd.exe builtin. you must use shell, not run 02:56
likewise you can't use a shell builtin like "cd" with run 02:57
(on unix)
TimToady m: dd [+«"1,2,5,42".split(",")] 02:57
camelia [1, 2, 5, 42]
xiaoyafeng OK, thanks. 03:09
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:13
wander Let's say we have an Int $a and an Array[Int] @arr 05:16
is the performance different between 'so $a (elem) @a' and 'so $a == any(@a)' 05:17
hello What could be the reason of this behavior? stackoverflow.com/a/45885415/2774153 05:33
While Perl 5 supports that Perl 6 won't !!
geekosaur which behavior? the quotes? 05:59
are you sure perl 5 supports it?
because this comes from cmd.exe and from the C runtime, and is not visible to either perl 5 or perl 6
hello geekosaur Yes Perl 5 supports while Perl 6 not in Windows
geekosaur any more than any program on unix can see or change how the shell splits areguments
then presumably your perl 5 used a different C runtime 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 True
0.0540284
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
MasterDuke_ m: my Int @a = ^100_000; my Int $a = 3333; say so $a == any(@a); say now - INIT now
camelia True
2.08662301
geekosaur perl 5 is happy to do stupid OS dependent things 06:01
on Windows, supporting '' as the outer quotes is OS version and C runtime dependent and $DEITY help you otherwise
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.
andrzejku who can tell me how the perl6 scanner works 11:21
is it direct-coded scanner
with dfa?
or what
sjn andrzejku: which scanner (do you have an URL?) 11:26
andrzejku no
perl6 compiler scanner
sjn isn't sure what andrzejku means with "scanner" (sorry) - did you mean "parser"? 11:28
andrzejku yeah 11:29
lexer
lizmat andrzejku: the perl 6 "parser" is a grammar written in NQP
andrzejku and what parse NQP?
lizmat github.com/rakudo/rakudo/blob/mast...rammar.nqp
NQP is self hosting, so NQP 11:30
pmurias andrzejku: also a grammar written in NQP 11:32
andrzejku wtf :D
pmurias andrzejku: the concept is called self hosting 11:46
andrzejku: the C compiler is usually written in C not machine code for some reason too
teatime andrzejku: you may be entertained by: vxer.org/lib/pdf/Reflections%20on%2...0Trust.pdf 11:48
Geth doc: 72d3b67fc7 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/pod.pod6
update info per actual (or planned) implementation
11:57
synopsebot Link: doc.perl6.org/language/pod
buggable New CPAN upload: Verge-RPC-Client-0.0.1.tar.gz by BRAKMIC cpan.metacpan.org/authors/id/B/BR/...0.1.tar.gz 13:08
ico hello 14:05
please can someone comment on current speed of rakudo? 14:06
i am trying to find an excuse to start to use perl6
now I probably didn't find the best excuse, but maybe....
i am working on traffic accounting sw 14:07
currently it is completely in C
and now I am deciding whether to start to implement multithreading (with locks etc) 14:08
or whether it would be the time to start to use perl6
and its supplies etc 14:09
so the question is: would it work with ~150k messages /sec?
i know it is quite naive to get here and want instant answers 14:10
but maybe someone could point me to some performance tuning docs before trying to implement something 14:11
heh or maybe trying to implement something would be the best start and THEN ask questions how to do this and that 14:12
pmurias ico: how is your program reading in the messages? 14:17
ico pmurias: it runs on linux and uses NFLOG target from iptables 14:21
pmurias: it captures first few bytes of each packet, extracts src/dst IP, proto, ports etc 14:22
pmurias: it then increments some counters in some simple hash table
pmurias: and what I assume could be possible is: capture packets from multiple NFLOGs, each from separate thread 14:23
pmurias: all that "capturing threads" would be started somehow from NativeCall 14:24
pmurias: and then I would somehow get each packet info into some Supply... and increment counters in perl6's hashes 14:25
lizmat ico: incrementing counters in hashes is expensive 14:27
you probably could use a hash to keep an index into a native array
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
lizmat and update the native array in C
reading the hash would then just be one level of extra indirection that you could possibly hide in a custom AT-KEY 14:28
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
I just wanted to try the least possible work to get the data from C to perl
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
lizmat afk& 14:30
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
ico well, I didn't think of this possibility :) I am probably too close to get some good ideas 14:34
Herby_ o/ 14:46
buggable New CPAN upload: Bitcoin-Client-0.0.2.tar.gz by BRAKMIC cpan.metacpan.org/authors/id/B/BR/...0.2.tar.gz 17:18
chakli Hello 17:44
do we have any modules to parse html?
wander MasterDuke_: Thank you for 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
TimToady but either of those indicates You're Doing It Wrong™ 18:06
reconstructing sets or junctions every time through usually means you should have a permanent hash or sethash somewhere in the solution
lizmat TimToady: scalar (elem) @a is optimized to basically do a first() using the .WHICH values 18:07
wander does (elem) build a set? 18:08
lizmat no, it returns a Bool
it does *not* build a Set
(used to in the past, but doesn't do that anymore)
wander . 18:09
jnthn It'll still be O(n) though 18:16
wander so..outside the filter let $checker = Hash.new(@a X True); and inside check defined $checker{$a}? 18:20
if intersect @a and @b, maybe SetHash.new(@a) (&) SetHash.new(@b). How about keep the (index) order 18:22
let's say there is no duplicate elem 18:23
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:27
lizmat depending on the size of @checker, you might gain from turning @checker into s Set first 18:28
wander :-) 18:31
Zoffix chakli: yes, DOM::Tiny 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: twitter.com/zoffix
Zoffix lizmat: thanks. Unpinned
Zoffix m: sub (+@l) { my @z := @l; dd [@l, @z] }((1,2 , 3).Seq) 19:55
camelia [(1, 2, 3), (1, 2, 3)]
Zoffix m: sub (+@l) { dd @l }((1,2 , 3).Seq)
camelia (1, 2, 3)
Zoffix what the.. 19:56
nm; misread my debbugging output and thought I had a Seq in a @ var
Zoffix
.oO( why is Any.cache a thing :/
20:17
)
TimToady: you around? A 6.c test you altered looks wrong to me: github.com/perl6/roast/commit/5463...d1a8c5128b 20:19
list Seq:D should return a List
m: dd ().Seq.list # and method form does
camelia ()
lizmat Zoffix: technically, .list should return something listy 20:20
only .List should return a List
Zoffix lizmat: what's "listy"?
lizmat at least, that's my understanding
Zoffix I'd think that'd be List and Array, from core types
lizmat something Iterable
well...
Zoffix m: dd %(:42a).list
camelia (:a(42),).Seq
Zoffix So why does this return a Seq and not a Hash?
lizmat sorry, something Positional 20:21
Zoffix Ok, yeah, agreed, Positional
m: my @foo := ().Seq
camelia Type check failed in binding; expected Positional but got Seq ($(().Seq))
in block <unit> at <tmp> line 1
lizmat and .hash should return something Associative
Zoffix Now that I think of it, should ^ that do the PositionalBindFailover thing?
lizmat so, maybe it returning a .Seq *is* wrong 20:22
Zoffix: possibly, really would like to see jnthn or TimToady to chime in on that
Zoffix Ok, I'll open an Issue.
Zoffix R#1344 20:28
synopsebot R#1344 [open]: github.com/rakudo/rakudo/issues/1344 [@LARRY] What is a "list"?
Zoffix R#1337
synopsebot R#1337 [closed]: github.com/rakudo/rakudo/issues/1337 [build] Add some `make blah` command to install Inline::Perl5
Zoffix gah. the 1337 issue ain't that leet :) 20:28
.ask jnthn would you be able to clarify what is a ".list"? github.com/rakudo/rakudo/issues/1344 20:29
yoleaux Zoffix: I'll pass your message to jnthn.
Zoffix .ask TimToady would you be able to clarify what is a ".list"? github.com/rakudo/rakudo/issues/1344
yoleaux Zoffix: I'll pass your message to TimToady.