Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-19

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:03 brrt .tell timotimo that the extend_i32 etc ops are not homogenous on a machine level; sign-extension to 64 bits require cqo which uses only rax, sign-extension to 32 bits (or 16 bits) uses movsx which can use any register
00:03 yoleaux brrt: I'll pass your message to timotimo.
00:03 brrt .tell timotimo tomorrow just ask me about it i can probably have them finished in $short-time
00:03 yoleaux brrt: I'll pass your message to timotimo.
00:05 adrusi joined #perl6
00:24 timotimo Hotkeys: were you able to figure out anything from a --profile yet?
00:24 yoleaux 00:03Z <brrt> timotimo: that the extend_i32 etc ops are not homogenous on a machine level; sign-extension to 64 bits require cqo which uses only rax, sign-extension to 32 bits (or 16 bits) uses movsx which can use any register
00:24 yoleaux 00:03Z <brrt> timotimo: tomorrow just ask me about it i can probably have them finished in $short-time
00:31 Hotkeys timotimo: no I'm not really experienced with optimizing yet
00:31 Hotkeys haven't even tried --profile
00:31 Hotkeys I was just going off of some stuff suggested in the original paper for the algo
00:38 timotimo yeah, though you may run into some opposite-of-good spots in rakudo performance if you're not aware of those pitfalls
00:46 Hotkeys I'm not really sure how to use the profiler data
00:49 kid51 joined #perl6
00:51 timotimo what i always do first is open the "routines" tab and sort by "exclusive"
00:52 timotimo that'll put the routine where most time is spent at the top and you can see if that makes sense
00:52 timotimo in the allocations tab you can see if some kind of "underlying" object gets allocated way too often
00:53 timotimo in the GC tab, usually you'll have almost completely green bars. if you don't then something may be not-so-good
00:55 Hotkeys alright
00:55 Hotkeys fewer deoptimizations is good right?
00:58 llfourn m: { my module Rat::Exterminator { } }; say Rat::Exterminator; # lexical packages aren't lexical if the name exists outside the lexical scope
00:58 camelia rakudo-moar e93a06: OUTPUT«(Exterminator)␤»
00:58 yoleaux 18 Feb 2016 20:11Z <sortiz> llfourn: That the loader doesn't create unneeded package stubs looks good to me, so appending to those provided by settings can't be a problem, unless we want "reserved" namespaces.
00:58 llfourn the above worries me a bit
01:00 timotimo deoptimizations aren't usually terribly bad
01:01 sortiz llfourn, Yes, but that is an orthogonal problem.
01:02 llfourn sortiz: which problem is it orthogonal to?
01:02 sortiz That the loader don't create unneeded stubs.
01:03 llfourn in the context of require?
01:03 sortiz Yes.
01:05 llfourn what's the unneeded stub in this case?
01:05 sortiz None in this case (Rat::...)
01:05 llfourn you mean require CompUnit::Util doesn't create a CompUnit package that is UNIT scoped
01:05 llfourn like in the UNIT's globalish
01:07 llfourn to me they are no orthogonal problems they are caused by the same thing. Scoped packaged declarations leak into the .WHO of SETTING:: stuff
01:08 llfourn whether it's our scoped in a compunit or lexical scoped in a block they are both ending up in the SETTING packages
01:08 Hotkeys does anyone know if there is any performance difference between doing type constraints with 'where' inline vs making a subset?
01:08 llfourn Hotkeys: pretty sure it's the same
01:08 Hotkeys alright
01:09 sortiz In the IO::Socket::SSL case IO::Socket can't be "created", they already exists. So, after require IO::Socket::SSL, what can I expect to be in the lexical scope?
01:10 llfourn sortiz: you can create lexical versions of packages
01:10 llfourn m: my class IO::Socket { }
01:10 camelia rakudo-moar e93a06: ( no output )
01:11 sortiz When I want to shadow some other package, yes.
01:12 sortiz m: my class IO::Socket { method a { say IO::.keys } } IO::Socket.a
01:12 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DnATs7EIei␤Strange text after block (missing semicolon or comma?)␤at /tmp/DnATs7EIei:1␤------> 3O::Socket { method a { say IO::.keys } }7⏏5 IO::Socket.a␤    expecting any of:␤        infix␤   …»
01:12 sortiz m: my class IO::Socket { method a { say IO::.keys } }; IO::Socket.a.say
01:12 camelia rakudo-moar e93a06: OUTPUT«(Handle Dir File Pathy Notification Path ArgFiles Pipe Socket Special Local Spec)␤True␤»
01:14 sortiz Buy I don't want that setting IO disappears.
01:14 Actualeyes joined #perl6
01:14 llfourn sortiz: right. you could have a special lexical package that delegates to the SETTING:: package when it can't find it in its own
01:15 AlexDaniel how can I smartmatch without writing $_ ~~ ?
01:15 llfourn AlexDaniel: when
01:15 AlexDaniel right
01:15 AlexDaniel thanks
01:16 sortiz llfourn, yes, but seems that that "special lexical package" don't exists yet. :)
01:16 AlexDaniel whan about negated when?
01:17 llfourn AlexDaniel: I have said that I wanted a negated when b4 but didn't get much enthusiasm :P
01:17 AlexDaniel :/
01:17 llfourn sortiz: I think the way forward is for me to RT and we can discuss further :)
01:18 llfourn AlexDaniel: I made some kind on incomprehsible gist here: https://gist.github.com/LL​Fourn/9e08d3a94b08af9d5c38
01:18 sortiz llfourn, Totally agree.
01:19 llfourn AlexDaniel: I suggested ¬, which would create a negated subset of the thing it's in front of
01:30 Hotkeys we could call negated when "nguyen"
01:30 Hotkeys (nwhen)
01:30 Hotkeys llfourn: AlexDaniel:
01:30 AlexDaniel nguyen ???
01:32 skids "never"
01:32 Hotkeys It's a popular vietnamese last name
01:32 Hotkeys sounds more or less like "nwen" out loud
01:32 AlexDaniel oh wow! It takes forever for JSON::Tiny to spurt a json with a simple array of size 6000
01:33 Hotkeys what about with JSON::Fast
01:34 llfourn Hotkeys: I think there should be a general way to negate something in terms of ACCEPTS. I think I'll make a module eventually.
01:35 AlexDaniel Hotkeys: if only there was JSON::Fast::Pretty
01:35 Hotkeys Make it :D
01:35 Hotkeys wait JSON::Fast has a pretty option
01:35 AlexDaniel oooooooooooooooooooohhh reeeaallly?
01:35 Hotkeys according to the readme
01:35 AlexDaniel interesting
01:35 Hotkeys it defaults to true
01:36 AlexDaniel hmmmmmm
01:36 apiw joined #perl6
01:37 AlexDaniel Hotkeys: thanks, that actually works
01:37 AlexDaniel much much faster, like 20 times faster
01:37 Hotkeys :D
01:37 AlexDaniel interesting
01:38 AlexDaniel yeah, it's great. Thanks
01:38 Hotkeys also mfw https://github.com/xfix/Acme-DSON
01:38 Hotkeys this module is ridiculous (and that's okay)
01:39 Hotkeys or rather I guess DSON is ridiculous
01:39 Hotkeys that isn't the module's fault
01:39 zpmorgan joined #perl6
01:47 timotimo AlexDaniel: yeah, some certain person has put to-json from JSON::Faster into JSON::Fast
01:47 AlexDaniel JSON::Faster????
01:49 timotimo yeah, used to be just a faster to-json
01:49 timotimo i petitioned for merging it into JSON::Fast
01:53 AlexDaniel timotimo: thank you very much
01:53 dfcarpenterak joined #perl6
02:05 AlexDaniel m: say <a b c>.map: { Any }
02:05 camelia rakudo-moar e93a06: OUTPUT«((Any) (Any) (Any))␤»
02:06 AlexDaniel is it possible to skip some values in map?
02:07 geekosaur that does not sound like a map to me...
02:07 AlexDaniel m: say <a b c>.map({ if m/b/ { ‘hi’ } else { Any } }).grep: *.defined
02:07 camelia rakudo-moar e93a06: OUTPUT«(hi)␤»
02:07 orbus in p5 I'd usually grep first then map the results of the grep
02:08 orbus I assume that applies here as well
02:08 AlexDaniel mmm, okay
02:08 lucs m: say <a b c>.map: { $_ eq 'b' ?? Empty !! $_ }
02:08 camelia rakudo-moar e93a06: OUTPUT«(a c)␤»
02:09 AlexDaniel oh there we go!
02:09 AlexDaniel what is Empty? :)
02:09 lucs m: say <a b c>.map: { $_ eq 'b' ?? |() !! $_ }
02:09 camelia rakudo-moar e93a06: OUTPUT«(a c)␤»
02:10 AlexDaniel oh, and that's how you slip it! Right!
02:10 AlexDaniel lucs: thank you very much!
02:10 lucs Sure thing
02:13 orbus m: my %x=(1=>"a",2=>"b",3=>"c"); my @y=(1,2,3); put @y.grep({next if $_ == 1; $_}).map({%x{$_}})
02:13 camelia rakudo-moar e93a06: OUTPUT«b c␤»
02:13 orbus oh, I guess that works too
02:15 addison_ joined #perl6
02:19 molaf_ joined #perl6
02:20 Hotkeys when should I use := over =?
02:21 skids When you do not want a container.
02:22 * orbus is still trying to wrap his head around containers
02:22 orbus the current documentation could probably be improved
02:22 skids http://docs.perl6.org/type/Scalar is a good place to start.
02:26 orbus yeah, I more or less understand the simple case
02:27 stmuk_ joined #perl6
02:27 orbus $a = 1; $b := $a; $b=2; now $a is 2 as well
02:27 orbus but not sure I really understand what's actually going on under the hood
02:28 orbus the Scalar docs explain it, but could maybe be a little clearer
02:29 skids m: my $a = 1; my $b := $a; $a.VAR.WHICH.say; $b.VAR.WHICH.say; # Maybe that makes it clearer?
02:29 camelia rakudo-moar e93a06: OUTPUT«Scalar|50521688␤Scalar|50521688␤»
02:33 Hotkeys well
02:33 Hotkeys I wasn't able to optimize my algo
02:33 Hotkeys but I managed to optimize the test by a few seconds
02:33 Hotkeys so that's something
02:37 sortiz m: my $Foo::a = 1; $Foo::b = 1; say GLOBAL::Foo::.WHAT; say GLOBAL::Foo::.keys; say MY::.keys; # Given that, why I can't say Foo::<$b>?
02:37 camelia rakudo-moar e93a06: OUTPUT«(Stash)␤($b $a)␤($=pod !UNIT_MARKER EXPORT $_ $! $Foo::a ::?PACKAGE GLOBALish $¢ $=finish $/ $?PACKAGE)␤»
02:37 Juerd orbus: Think of a container as a place in memory where a value can be stored.
02:38 orbus right, well in that case it seems more accurate to say that := makes a variable point to an already existing container
02:39 Juerd That's right.
02:39 llfourn sortiz: https://rt.perl.org/Public/​Bug/Display.html?id=127569
02:39 skids Well, if the riht hand side is a container.
02:40 orbus true
02:40 Juerd Unlike actual pointers to memory, though, binding gives you a new variable, which can have extra information attached to it, like 'access to the container is read only'.
02:40 orbus yeah
02:40 orbus like I said, I more or less understand the simple case
02:40 Juerd Subroutine parameters use the same thing as :=
02:41 orbus but not sure I fully understand all the implications
02:41 Juerd There aren't a lot of implications, except the lack of a copy being made :)
02:42 orbus well the Scalar docs mention some stuff around lists
02:46 Hotkeys So is it faster to use binding when possible?
02:46 orbus and flattening and whatnot
02:46 Hotkeys performance wise
02:46 Juerd After "my $a := 42", it makes little sense to assign a new value to $a, because you equally wouldn't assign a new value to 42.
02:46 Hotkeys or is the difference negligible
02:46 sortiz llfourn++
02:46 Juerd orbus: There are ways to destructure when binding. So you can unpack named arguments, or unpack arrays and lists to individual variables.
02:46 Juerd Hotkeys: I think it should be faster but I haven't benchmarked it.
02:46 sortiz llfourn, To me, there are a clash between 'my' and named (with ::) symbols.
02:46 Juerd I'm inclined to say that if you like to use :=, you should probably use it whenever you don't need a copy. So that is, prefer := over =
02:46 llfourn containers + autovivification do interesting things
02:46 llfourn m: my %h; my $a := %h<foo><bar>; $a = "win"; say %h.perl
02:46 camelia rakudo-moar e93a06: OUTPUT«{:foo(${:bar("win")})}␤»
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:47 Juerd You have to dig deep to encounter something that is not an object.
02:48 skids natives aren't properly they just box that way.
02:48 sortiz llfourn, See my example above, an Stash was created, but I can't access it, and in MY a funny named was created.
02:48 Juerd skids: I think natives are digging deep.
02:48 orbus m: my $c=Channel.new; my $b=$c; my$x=start $b.send(1); put $c.receive; await $x
02:48 camelia rakudo-moar e93a06: OUTPUT«1␤»
02:48 Juerd skids: I never said you couldn't use an easy-to-use machine to dig. ;)
02:48 orbus like in this example
02:48 orbus $c and $b both point to the same Channel
02:49 * llfourn looks
02:49 skids Actually $c and $b each point to Scalars, and each of those two Scalars point to the same Channel.
02:50 orbus see that's where I'm not sure I fully understand the implications
02:50 orbus I read that
02:50 orbus but I'm not entirely sure I fully understand what it means
02:50 orbus since Scalars are mostly invisible
02:51 Juerd orbus: I don't think it's necessary to understand what it really means. I didn't know this at a level that I could explain it to someone, yet when using Perl 6 all of it just did what I wanted it to do.
02:51 orbus yeah... that's the problem
02:51 Juerd But if you really want to know it all, there's the source... :)
02:51 orbus it usually does what I want it to do, until it bites me in the butt
02:52 Juerd I found Perl 5's model easier to understand, but I find Perl 6's model easier to work with, even though I don't really understand it yet.
02:53 orbus perl5 references had their own failings
02:53 geekosaur p5's model is easier o understand until it suddenly isn't and you find yourself pitchforked into weird, idiosyncratic internals
02:53 Juerd geekosaur: I can't recall a single time that this has happened to me.
02:53 Juerd Whereas I keep getting bitten by subtle bugs in rakudo/moar
02:54 llfourn m: my $a = "foo"; my $b = $a; say $a.WHERE; say $b.WHERE # '=' doesn't copy values
02:54 camelia rakudo-moar e93a06: OUTPUT«140356844017296␤140356844017296␤»
02:54 geekosaur you usually have to be messing with the weird corner cases to start with. like dualvars
02:55 timotimo Hotkeys: i'd be very interested to hear how you went about optimizing; were you able to get anything out of the profile at all?
02:55 geekosaur also, as for bugs, kinda unfair to be comparing a language that was just released to one that's been around for years
02:55 geekosaur decades even
02:55 skids m: my $c = (1,2,3); my $d := (1,2,3); sub a ($l is rw) { $l = (3,4,5) }; a($c); $c.say; a($d); # One implication of a Scalar
02:55 camelia rakudo-moar e93a06: OUTPUT«(3 4 5)␤Parameter '$l' expected a writable container, but got List value␤  in sub a at /tmp/Sih95IepCq line 1␤  in block <unit> at /tmp/Sih95IepCq line 1␤␤»
02:56 Juerd geekosaur: It would be unfair if I didn't compare it to anything else.
02:56 Juerd geekosaur: Really, we need the comparisons to improve Perl 6.
02:56 orbus we're at the stage now where fixing implementation bugs is top priority
02:56 orbus well that and performance
02:57 orbus now that the design is more or less finalized
02:57 Juerd orbus: It might be, but not many people actually do that. It's hard to find people who have the right skill set and enough time.
02:57 orbus that is of course true
02:58 Juerd I don't know if there's a solution to that problem
02:58 orbus but really goes for the whole task of implementing a language, top to bottom
02:58 Juerd Yep.
02:58 * llfourn is amazed how some core devs have jobs but still manage to contribute so much
02:58 orbus I know my rusty C skills are nowhere near sufficient
02:58 orbus I barely remember how pointers work
02:58 Juerd orbus: A lot of Perl 6 is written in Perl 6!
02:59 orbus I know - I've dug into the internals somewhat
02:59 Juerd Usually not very readable Perl 6, because it has to perform well, but at least it's much easier than C.
02:59 orbus at least in a few areas
02:59 orbus I used to be pretty good at C
02:59 orbus but it's all flown out of my head
02:59 orbus need to pull out my K&R book and re-read it sometime
03:00 orbus I still remember that book having the most concise explanation of pointer syntax I've seen anywhere
03:00 Juerd I'm excited that in a minute or so, the robot vacuum cleaner at the office will do its thing.
03:00 Juerd Nobody's there
03:00 Juerd Our first robot :)
03:00 orbus nobody's around - it might decide to murder you
03:00 orbus keep an eye on it
03:01 Juerd It's a vacuum cleaner. I'll hear it coming :)
03:01 orbus and yet you don't fear it, so that might not be enough
03:01 orbus you aren't expecting murder, even if you hear it coming
03:01 Juerd Apart from its lithium batteries I don't think it has any equipment that could actually hurt someone.
03:01 orbus might just be an advance scout for the robot legions
03:02 Juerd It would make a good scout
03:02 geekosaur https://xkcd.com/1558/
03:02 Juerd It maps every part of the floor.
03:02 orbus I thought about getting a roomba before, but my house has way too many obstacles
03:03 Juerd I didn't get a roomba for the office.
03:03 Juerd There are two kinds of roomba: the very expensive one, and the brainless one that just bumps at random.
03:04 orbus this is the former I take it?
03:05 Juerd We got a neato. It's about as cheap as the cheaper roombas, but it actually has a lidar
03:06 Juerd It came in today and I've let it do the entire office twice already. Probably spent at least half an hour just watching it.
03:07 Juerd Could have vacuumed the entire floor myself in that time... :P
03:07 orbus will it get faster after it's completed its reconnaissance?
03:08 Juerd Yes. First it goes around the edges, bumping into things. Then it zigzags through the area quite fast.
03:08 Hotkeys timotimo: eh not really, I just got rid of the hashmap I was using and just used the arrays instead
03:08 orbus oh, but it doesn't remember the map of the area between runs?
03:09 Herby_ joined #perl6
03:09 Herby_ Evening, everyone!
03:09 Hotkeys (I was sticking input -> expected out into a hash)
03:09 Hotkeys hello Herby_
03:09 skids Speed doesn't really matter with those things, as long as it is fast enough to get the job done without getting underfoot.
03:09 Juerd No, but it will charge and continue where it left off if the area is too big for its battery.
03:09 Herby_ \o
03:09 Juerd Hi Herby_
03:09 Herby_ o/
03:10 Herby_ I see your Perl 6 entry is the top solution :)
03:10 Hotkeys timotimo: I did acquire ~20 1.2mb profiles though :p
03:10 * skids wonders whether SLAM algorithms are at all interesting for discovering Perl 6 idioms.
03:10 Juerd The botvac will also divide an area into rectangles, imagining a wall at the edge of it. It's interesting to see it do a long hallway.
03:11 Juerd skids: Ooooooh. Probably!
03:11 timotimo Hotkeys: yeah, they tend to be quite big. they contain the whole call tree :S
03:11 Hotkeys timotimo: that's fine, I have plenty of space
03:12 timotimo if someone would be so fantastic as to make the "finite callgraph depth recording" branch work, we could profile the compilation of the core setting
03:16 Hotkeys if anyone can take a cursory look at my Porter module to see if there's any glaring optimizations I could make I'd appreciate it :)
03:16 * timotimo goes to bed
03:17 timotimo i'm super late already ;)
03:17 Hotkeys sleep well
03:17 Hotkeys https://github.com/johnspurr/Lingua-EN-Stem-Porter if anyone's interested
03:19 Hotkeys it did about 3000 word per second in my wordlist test which seems reasonably quick
03:20 Hotkeys I don't really have a comparison
03:20 Hotkeys I suppose I could test some other implementations that have been done as a benchmark
03:20 Hotkeys maybe I'll do that tomorrow
03:29 skids Hotkeys: It probably won't make a difference, but maybe make e.g. %step2hash a Map instead of a Hash?
03:31 AlexDaniel Herby_: hi
03:31 Hotkeys skids: I'll try that
03:31 AlexDaniel Herby_: see my solution here: https://gist.github.com/Alex​Daniel/b952b73284a083973802
03:31 * sortiz Finally I could answer private messages, shame on previous attempts.
03:32 Herby_ AlexDaniel: I was gonna ask if you figured out the other half of the diagnol
03:32 AlexDaniel Herby_: I haven't really found any easier way to find diagonals, but that's still pretty short
03:32 Herby_ its a working solution?
03:32 AlexDaniel yes
03:32 Herby_ Nice!
03:32 Herby_ You gonna post it?
03:32 AlexDaniel skids got it better with something like: my @ax = |(([\,] ^@map).cache), |((^@map).tail(@map - $_).cache for ^@map); (@ax.reverse »,« @ax);
03:33 AlexDaniel it is a bit shorter but it is not really correct
03:33 AlexDaniel Herby_: I don't have a reddit account and I am not going to make one for that. So maybe you can post it?
03:33 skids Hotkeys: are the things like 'ous||ive||ize' required to be tried in order?
03:34 Herby_ I can post it and give you the credit
03:34 Hotkeys not in that one
03:34 Herby_ one sec
03:34 Hotkeys is it faster to do an alternation with | ?
03:34 skids Maybe try | instead, might be better, might be worse.
03:35 skids (More likely to be better with more alts)
03:35 AlexDaniel Herby_: actually wait 1 second I think that I found a tiny bug :)
03:35 Herby_ k
03:36 AlexDaniel Herby_: fixed, same link
03:36 synopsebot6 joined #perl6
03:36 Herby_ k, bout to post
03:38 Hotkeys hmm the map thing didn't change the times really
03:38 Hotkeys let's try the alternation thing
03:40 Herby_ AlexDaniel: got it posted.  Let me know if you want to change the description :)
03:40 AlexDaniel Herby_: it's great, thanks
03:41 Herby_ this week's [Hard] puzzle will be posted tomorrow, if you get bored
03:41 AlexDaniel Herby_: getting diagonals is really hard, such a pity :(
03:42 AlexDaniel what I don't like about my solution is that these two lines are basically binary blobs, heh
03:42 Herby_ I'm not sharp enough to fully understand the solution, but it looks good compared to the others
03:42 Hotkeys hm yeah neither of those made any noticable difference for better or worse
03:42 Hotkeys thanks anyway skids
03:43 AlexDaniel Herby_: well, the idea is that when you do 「for @map」 you are iterating over rows
03:43 AlexDaniel Herby_: so if you want to change any cell you just write back and that's it
03:43 AlexDaniel Herby_: so it says 「<-> $cell」 and then just 「$cell = ‘*’」
03:44 Herby_ hmm ok
03:44 AlexDaniel Herby_: surprisingly, we can do 「(@map[*;$_] for ^@map)」 and it will give us the columns
03:44 AlexDaniel Herby_: but not just the columns, but a writable slice from the original array
03:44 AlexDaniel Herby_: so if we do $cell = ‘something’ it will actually write it back!
03:45 AlexDaniel so the question was how to get slices diagonally… and I kinda did that. It is just a bit unreadable :(
03:45 AlexDaniel Herby_: but other than that the code does not really care if you are operating on columns, rows, diagonals, or any of those in reverse
03:46 AlexDaniel which is really cool
03:46 Khisanth joined #perl6
03:48 AlexDaniel Herby_: not sure if you are actually following me but what I was trying to say is that this solution is dead simple if you just take my word that these two lines return writable diagonal slices :)
03:48 Herby_ haha I'll take your word
03:56 synopsebot6 joined #perl6
03:58 noganex_ joined #perl6
04:01 addison_ joined #perl6
04:07 cpage_ joined #perl6
04:07 Hotkeys okay all is good in the world
04:07 Hotkeys I made travis install Test::META and now I have a passing build again
04:16 synopsebot6 joined #perl6
04:18 ugexe why does IO::Pipe.close return a Proc, when IO::Handle returns True? seems to be related to https://rt.perl.org/Ticket/Disp​lay.html?id=125757#txn-1386193
04:21 ugexe say $proc.out.close.err.close; # heh
04:22 adu joined #perl6
04:25 AlexDaniel Juerd: by the way, why not use | before first 「<after $player」
04:29 AlexDaniel it just asks for it, doesn't it? :)
04:35 synopsebot6 joined #perl6
04:39 AlexDaniel Juerd: by the way, your solution is broken I think
04:40 AlexDaniel Juerd: try empty board and this on the first line: ------OX
04:40 AlexDaniel or this: ------XO
04:41 AlexDaniel or even -----XO-
04:43 rindolf joined #perl6
04:53 AlexDaniel Juerd: also, since you don't really care about newlines…
04:54 AlexDaniel Juerd: guess what would happen if you do this: X------O
04:54 AlexDaniel :-/
04:54 synopsebot6 joined #perl6
05:14 synopsebot6 joined #perl6
05:14 lnrdo joined #perl6
05:16 roguelazer joined #perl6
05:21 addison joined #perl6
05:34 synopsebot6 joined #perl6
05:37 jack_rabbit joined #perl6
05:40 Cabanossi joined #perl6
05:42 llfourn anyone know how to call a parent grammar -- like callsame for grammars?
05:43 llfourn (inside a token)
05:53 synopsebot6 joined #perl6
06:07 addison_ joined #perl6
06:08 davido_ joined #perl6
06:11 sortiz llfourn, It seems that we like to do complicated questions. :)
06:12 llfourn sortiz: that's what life's for :)
06:12 synopsebot6 joined #perl6
06:12 sortiz llfourn, Indeed.
06:21 mattp__ joined #perl6
06:30 addison joined #perl6
06:30 rindolf joined #perl6
06:31 synopsebot6 joined #perl6
06:42 cpage_ joined #perl6
06:50 synopsebot6 joined #perl6
06:55 CIAvash joined #perl6
06:58 sortiz m: package Foo { }; my package Foo::B { }; say Foo::B === GLOBAL::<Foo>.WHO<B>; # Which was the meaning of 'my' ?
06:58 camelia rakudo-moar e93a06: OUTPUT«True␤»
07:10 synopsebot6 joined #perl6
07:17 MadcapJake joined #perl6
07:22 FROGGS joined #perl6
07:26 addison joined #perl6
07:28 sjoshi joined #perl6
07:30 synopsebot6 joined #perl6
07:35 firstdayonthejob joined #perl6
07:40 nakiro joined #perl6
07:43 sortiz m: package Foo { }; Foo::<$a> = 1; my $Foo::b = 2; our $Foo::c = 3; say $_ for Foo::.pairs; # Which was the meaning of 'my' ?
07:43 camelia rakudo-moar e93a06: OUTPUT«$c => 3␤$b => 2␤$a => 1␤»
07:43 darutoko joined #perl6
07:47 RabidGravy joined #perl6
07:50 synopsebot6 joined #perl6
08:00 RabidGravy HARR
08:00 rurban joined #perl6
08:02 sortiz Hi RabidGravy
08:04 jcallen joined #perl6
08:09 synopsebot6 joined #perl6
08:12 * Hotkeys yawns
08:17 PotatoGim joined #perl6
08:19 ely-se joined #perl6
08:19 arnsholt joined #perl6
08:28 synopsebot6 joined #perl6
08:45 RabidGravy I have this awful and uncontrollablle urge to make something like c#s XmlSerialization
08:46 abraxxa joined #perl6
08:46 rurban1 joined #perl6
08:47 broquaint joined #perl6
08:48 synopsebot6 joined #perl6
09:07 DrForr I'd recommend ANSI X.12 instead, much clearer :)
09:07 synopsebot6 joined #perl6
09:16 jast great recommendation, very much appreciated. I feel a lot saner now.
09:18 DrForr Obviously you haven't read the spec :)
09:20 |Tux| joined #perl6
09:20 ely-se joined #perl6
09:21 FROGGS lol: http://examples.x12.org/005010X279/subscriber-​who-is-also-the-patient/generic-request-by-cli​nic-for-patient-%28subscriber%29-eligibility/
09:24 RabidGravy looked at it once, ended up a gibbering wreck, decided XML was nicer
09:24 RabidGravy those old school EDI formats were such fun
09:25 RabidGravy see also APACS-n or whatever banks use for shovelling data around these days
09:25 DrForr I worked with those for 2 years. Thankfully I was laid off before I could lose 2d SAN.
09:26 synopsebot6 joined #perl6
09:26 RabidGravy I spent a long while doing telco/ISP billing systems, knew too much about banking interchange formats for my sanity
09:29 hippie "shovelling" is a good word for that.
09:31 lizmat joined #perl6
09:32 zakharyas joined #perl6
09:36 wamba joined #perl6
09:37 rurban1 left #perl6
09:45 lizmat good *, #perl6!
09:45 FROGGS o/
09:45 synopsebot6 joined #perl6
09:45 lizmat anything important happen the past 20 hours ?
09:46 lizmat seems the FOSDEM videos are supposed to be up: http://video.fosdem.org/2016/h2214/
09:47 FROGGS ohh nice
09:47 FROGGS I was afk most these 20 hours, so I dunno
09:47 molaf joined #perl6
09:47 lizmat but: none of them play on woolfy's machine, nor on mine
09:48 FROGGS hmmm, same here :/
09:48 * lizmat sees if some quicktime magic could solve the problem
09:49 DrForr They didn't play on mine either.
09:50 lizmat quicktme can't open file  :-(
09:52 RabidGravy chrome thinks it's audio, opens the default audio thingy and doesn't work
09:53 RabidGravy let's try one in something else
09:54 RabidGravy it's lying about how it was encoded
09:55 RabidGravy just playing in mplayer you get "chunky static" and lots of frame decoding errors
09:55 lizmat quicktime 7 can't handle it either
09:55 RabidGravy "[dvvideo @ 0x7f7d8b42af20]AC EOB marker is absent pos=64"
09:56 * RabidGravy wgets one for further examination
09:56 sortiz Nor vlc: "[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f204cc429e0] moov atom not found"
09:57 * lizmat gives up on it for now
09:57 RabidGravy it's probably some obscure format beloved of the open source people
09:57 RabidGravy I'm going with Ogg Theora as a working hypothesis
09:58 RabidGravy ffmpeg will save us
09:59 KotH joined #perl6
09:59 El_Che lizmat: the videos must be correctly cut still
10:00 El_Che tom is looking into that
10:00 lizmat so what does status OK mean then ?
10:00 El_Che probabky that they have video and audio
10:00 lizmat and why do they have an .mp4 extensions if they're not ?
10:00 lizmat El_Che: okidoki  :-)
10:01 RabidGravy I think it *is* mp4 but with something else in it
10:01 El_Che hey, there are rooms with lot of lost talks, so far it looks good
10:03 Skarsnik joined #perl6
10:03 Skarsnik hello
10:04 synopsebot6 joined #perl6
10:05 lizmat Skarsnik o/
10:05 cur8or joined #perl6
10:08 jnthn morning, #perl6
10:09 sortiz morning jnthn
10:10 lizmat jnthn  o/
10:10 jnthn llfourn: (call parent token) did you try <something=&callsame> (where something is the name to capture the match under)?
10:11 grondilu joined #perl6
10:12 llfourn jnthn: I did not :). I did try <Literal::Parent::Class::something> which worked as long as you have the symbol.
10:12 * llfourn goes to test it out
10:12 grondilu m: say "a..e"
10:12 camelia rakudo-moar e93a06: OUTPUT«a..e␤»
10:12 yoleaux 18 Feb 2016 14:13Z <timotimo> grondilu: i just got the Image Noise example to run at 5.7 FPS instead of 1.9 FPS by using SDL_RenderPoints and a CArray of int32 instead of SDL_RenderPoint
10:12 grondilu m: say a..e
10:12 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/G9j3BwlZOZ␤Undeclared routine:␤    a used at line 1␤␤»
10:14 grondilu timotimo: I vaguely remember about this.  5.7FPS seems still pretty slow.
10:17 llfourn jnthn: "Too many positionals passed; expected 0 arguments but got 1" with <.&callsame> and other variations.
10:17 llfourn at gen/moar/m-CORE.setting:685
10:20 llfourn I tried <.&callwith()> as well, and got "Cannot look up attributes in a type object"
10:20 llfourn from gen/moar/stage2/QRegex.nqp:1379
10:24 synopsebot6 joined #perl6
10:25 TEttinger joined #perl6
10:26 jnthn Just <&callwith> ?
10:27 jnthn But yeah, I can kinda see why it may not work out.
10:27 llfourn same as <.&callwith>.
10:28 jnthn Yeah
10:28 jnthn Makes sense
10:28 jnthn Trouble is that you end up passing the cursor in such cases, but callsame/callwith don't expect that
10:29 llfourn but isn't the token expecting the cursor?
10:29 jnthn Yes. But think about how you usually call callsame (as a sub, without args)
10:30 jnthn <&callsame> compiles into callsame(self)
10:30 jnthn Not just callsame()
10:30 jnthn Because that's what you usually want
10:30 llfourn callwith() as well right?
10:30 jnthn Yeah, same problem, you don't callwith(self, ...) in a method, just callwith(...)
10:30 jnthn and callwith resolves the self
10:33 llfourn makes sensish. I also tried doing a doing a more manual call of a token like token delegate { { something.($¢) } }
10:33 llfourn which kinda worked but I could't get the match state returned from something($¢) into the $/ after the block was over
10:34 jnthn No, short of .make you can't really do that :)
10:35 llfourn oh ok
10:35 nine The files seem to be encoded with x264 - core 142 r2431 a5831aa - H.264/MPEG-4 AVC codec
10:37 jnthn In theory we could add callsame and callwith tokens in Grammar.pm, so grammar tokens inherit them, and do what trickery is needed there, if there's a strong enough use case. Then a simple <callsame> would work.
10:37 jnthn I'd like to hear what TimToady thinks about it first, though :)
10:39 llfourn jnthn: this is actually in the context of a slang of Perl6::Grammar. I was looking for ways to call the original token I had overriden.
10:39 llfourn it would be cool if it worked :)
10:40 llfourn the slang is getting kinda big and I actually want to write it in a .nqp file. I'm loooking into how to do that now.
10:41 llfourn (I have figured most of it out, by copying stuff that happens in CompUnit::Loader)
10:43 synopsebot6 joined #perl6
10:47 dalek rakudo/nom: 9a08b31 | lizmat++ | src/core/Str.pm:
10:47 dalek rakudo/nom: Streamline substitution setting in Str.trans
10:47 dalek rakudo/nom:
10:47 dalek rakudo/nom: This makes Juerd's atbash example yet again 5x faster
10:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a08b3179e
10:50 fireartist joined #perl6
10:53 stmuk_ timotimo: I'm desperately preparing a perl6 talk for next week but hope to look at the vim colour syntax issue Real Soon Now
10:56 ocbtec joined #perl6
10:59 RabidGravy jnthn, llfourn, but you *can* call the callwith with a new invocant if you want, it seems to work it out that you've done that
11:02 synopsebot6 joined #perl6
11:07 dalek doc/MARTIMM-patch-4: e03f826 | (Marcel Timmerman)++ | doc/Type/Tap.pod:
11:07 dalek doc/MARTIMM-patch-4: repairing a typo
11:07 dalek doc/MARTIMM-patch-4:
11:07 dalek doc/MARTIMM-patch-4: at line 60 `method closing(Tap:D:)'  changed into 'method close(Tap:D:)'
11:07 dalek doc/MARTIMM-patch-4: review: https://github.com/perl6/doc/commit/e03f826451
11:16 timotimo good marning
11:17 lizmat timotimo  o/
11:17 RabidGravy HARR
11:18 araujo_ joined #perl6
11:20 araujo_ joined #perl6
11:22 |Tux| test            22.228
11:22 |Tux| test-t          11.672
11:22 |Tux| csv-parser      51.415
11:22 synopsebot6 joined #perl6
11:22 araujo_ joined #perl6
11:23 El_Che probably something silly, but .precomp keeps biting me after I push an update of my module: http://fpaste.scsys.co.uk/505852. In short I reinstall the modules with panda --force install, remove .perl6 dirs and still the old version
11:23 lizmat |Tux| : that's better again, right ?
11:23 lizmat El_Che: try running with RAKUDO_MODULE_DEBUG=1
11:23 lizmat it should tell you where it gets stuff from
11:24 travis-ci joined #perl6
11:24 travis-ci Doc build passed. Marcel Timmerman 'repairing a typo
11:24 travis-ci https://travis-ci.org/perl6/doc/builds/110352881 https://github.com/perl6/doc/commit/e03f826451d6
11:24 travis-ci left #perl6
11:24 nine El_Che: I'd guess it's not precompilation that bites you but rakudobrew
11:24 araujo_ joined #perl6
11:25 El_Che let's see
11:28 rudi_s How can I safely write to IO::Handle (or IO::Pipe) from a native call with a function which uses .native-descriptor and from Perl6 itself? I want to write to stdin from a program I spawn with run with a native function.
11:28 nine rudi_s: how do you define "safe"?
11:29 rudi_s It won't cause problems with Perl6 internal buffering and similar. "safe" as in all writes will be complete and not intermix when I write from Perl6 and NativeCall in different order.
11:31 jnthn rudi_s: Best is probably to make sure you call .flush on the Perl 6 handle before using it with NativeCall, and call the native flush also.
11:32 jnthn (Before using it with Perl 6 I/O again)
11:32 rudi_s Good. Thank you.
11:33 El_Che nine: maybe what bites is that the changes in the new version are in the script file and not in the lib/. I see perl6 populating the cache for everything in lib
11:34 jnthn rudi_s: Note that reading is a totally different kettle of fish. You almost certainly shouldn't mix between native and Perl 6 there.
11:34 dalek rakudo/nom: cd62316 | timotimo++ | lib/NativeCall/Types.pm6:
11:34 dalek rakudo/nom: replace unwieldy Proxy with atposref in int/num typed CArray
11:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd62316ccd
11:35 rudi_s jnthn: Yeah, I thought so. Thanks.
11:35 timotimo ^- i haven't measured this - especially since my code directly hits ASSIGN-POS anyway - but it should be a bit snappier than what it used to be
11:35 timotimo and once spesh knows about atposref and the other kinds of refs, it'll be even better when inlined
11:35 jnthn timotimo: Certainly
11:35 jnthn *nod*
11:35 * timotimo can't get wait for jnthn to get paid ;)
11:36 jnthn The comments on the grant app look good so far, so...fingers crossed :)
11:37 timotimo not just as in "jnthn will make it all good!", but also "jnthn will help me build the things we've been planning already"
11:37 jnthn :)
11:41 timotimo jnthn: when i put in that atposref stuff, i wondered why we don't go ahead and also introduce an atposref_o? that'd still be a bit better than a Proxy, even though it's not a "NativeRef" ...
11:41 |Tux| lizmat, yes, better again
11:41 lizmat cool  :-)
11:41 synopsebot6 joined #perl6
11:42 * |Tux| did not expect to loose so much time in updating systems due to CVE-2016-0235
11:42 moritz |Tux|: welcome to the club
11:43 jnthn timotimo: Where would be use it?
11:43 timotimo for CArray of CStruct or Pointer or things like that
11:43 timotimo in AT-POS, i mean
11:44 timotimo HOLY HELL
11:44 jnthn o.O
11:44 timotimo how to make the framerate of the white noise thing double with a one-word change:
11:44 * stmuk_ had to patch the last libc CVE in $major_bank by recompiling libc from source and deploying that due to a number of bizarre reasons
11:44 timotimo set $w and $h to be native int typed
11:44 jnthn Native types. They're super effective! :)
11:44 timotimo only sometimes. but if they are, then yeah
11:44 moritz stmuk_: sounds like a deployment pipeline would be interesting for you :-)
11:45 stmuk_ moritz: we had our own 15 year old one which used a mixture of bash, php and perl :)
11:45 stmuk_ and lots of rsync!
11:46 timotimo what a pain in the rsync :)
11:47 jnthn .oO( Our code was so toxic, we deployed it with rsnyc... )
11:47 timotimo oh lord %)
11:47 timotimo grondilu: how does "jumping between about 13.5 fps and 17.6 fps" sound to you?
11:47 Juerd lizmat: Wow, impressive improvements in .trans
11:48 apiw joined #perl6
11:48 timotimo Juerd: lizmat is simply The Best :)
11:48 moritz stmuk_: at GPW2016 I'm talking about continuous delivery, I hope you'll listen to my talk :-)
11:48 dalek doc: e03f826 | (Marcel Timmerman)++ | doc/Type/Tap.pod:
11:48 dalek doc: repairing a typo
11:48 dalek doc:
11:48 dalek doc: at line 60 `method closing(Tap:D:)'  changed into 'method close(Tap:D:)'
11:48 dalek doc: review: https://github.com/perl6/doc/commit/e03f826451
11:48 dalek doc: 6966c7e | RabidGravy++ | doc/Type/Tap.pod:
11:48 dalek doc: Merge pull request #403 from perl6/MARTIMM-patch-4
11:48 dalek doc:
11:48 dalek doc: repairing a typo
11:48 dalek doc: review: https://github.com/perl6/doc/commit/6966c7ec22
11:49 moritz and btw, GPW2016 is full (reached the 100 people limit imposed by room capacity)
11:49 stmuk_ moritz: we dreamed of continuous delivery .. reality was "change control"
11:49 timotimo jnthn: the next thing that sticks out is 31% exclusive (37.5% inclusive) time spent in postcircumfix:<[ ]>
11:50 moritz stmuk_: one of my main points is that you can introduce it gradually; first automate the build step, then the upload to a repo, then the installation etc. (and you can still have manual approval before deploying to prod)
11:50 moritz stmuk_: and change control and CD are rather complementary, not contradictory
11:51 stmuk_ moritz: ok ok I'll attend your talk :)
11:52 timotimo jnthn: it's hitting the "(\SELF, int $pos, Mu \assignee) is raw" candidate that directly calls SELF.ASSIGN-POS($pos, assignee), so i'm not sure why it'd take so long
11:53 lizmat timotimo: int candidates are slower because spesh doesn't know about them yet ?
11:54 timotimo i'm not sure that's it; that candidate gets 100% jitted and there's not enough IntLexRef being allocated for that to be the particular problem here
11:55 jnthn Odd...is there a bounds check (for < 0) in the postcircumfix:<[ ]> ?
11:55 timotimo the code is a 2-dimensional loop that fills a CArray of "raw pixel data" with black or white pixels; the outer loop gets entered 11280 times in this particular piece of code, and that's also how many IntLexRef are being allocated
11:55 timotimo jnthn: not in this candidate, no
11:55 timotimo postcircumfix:<[ ]> is being invoked 3609600 times, for comparison
11:56 timotimo ASSIGN-POS is invoked 3609835 times, where the difference is probably due to spesh warm-up time
11:56 Amendil joined #perl6
11:57 timotimo and ASSIGN-POS is where the 6.14% inclusive & exclusive time that were the difference between exclusive and inclusive in the postcircumfix come from
11:59 dalek doc: 3cd2034 | (Sylvain Colinet)++ | doc/Language/nativecall.pod:
11:59 dalek doc: Remove the bad constant %*ENV example in NativeCall. Clarify a bit compile time vs runtime
11:59 dalek doc: review: https://github.com/perl6/doc/commit/3cd2034d2e
11:59 dalek doc: 67b3028 | (Sylvain Colinet)++ | doc/Type/Tap.pod:
11:59 dalek doc: Merge branch 'master' of https://github.com/perl6/doc
11:59 dalek doc: review: https://github.com/perl6/doc/commit/67b3028167
12:00 timotimo jnthn: for things that have something comparable to a "main loop" or "frames", i'd really love to have a simple function that just increments a counter that would show up next to the GC runs in the profiler; would you +1 a patch to that effect?
12:01 jnthn timotimo: Hmm...sounds a bit "special case"-y
12:01 timotimo aye :\
12:01 synopsebot6 joined #perl6
12:01 jnthn I think it comes under the more general "write bytecode instrumentations in a high level language" goal for Moar
12:01 arnsholt jnthn: Speaking of deploying with rsync, I recently worked on a project where my boss basically expected the SVN checkout of the repo to be deployable in our production environment =)
12:02 timotimo hm. but GC runs isn't a thing where the bytecode instrumentation could easily hook into
12:02 RabidGravy Oh I've so worked places like that
12:02 timotimo arnsholt: as long as that's clearly communicated and people are allowed to work with branches, what's the problem with that?
12:03 jnthn timotimo: Yeah, I'm thinking of it more generally as a meta-VM API. :)
12:03 arnsholt It made it a bit of a pain to test things locally
12:03 timotimo OK
12:03 jnthn So there'd be callbacks on various interesting events
12:03 timotimo SGTM
12:03 arnsholt And branches in SVN are kind of annoying, although I had git-svn, so I had ninja branches locally
12:04 timotimo i'm not quite certain why the GC runs are all about 15 miliseconds each for this particular benchmark
12:04 jnthn What are they normally for you?
12:04 timotimo i seem to recall them being between 7 and 10 usually, i think?
12:05 jnthn OK. Probably need a C-level profile to understand that better.
12:05 sortiz Skarsnik++ # The fix for nativecall docs
12:05 timotimo ah, sure, can do that!
12:06 jnthn It *may* be that CStruct and friends are more costly to fianlize than typical P6opaques, which don't need anything doing at all
12:06 timotimo hm, 12% self time in _int_malloc reported by perf
12:07 timotimo 7.6% self inside mp_mul_2d, 7.5% self inside _int_free
12:07 timotimo and another 6% inside malloc_consolidate
12:07 timotimo i expect you're right about this
12:07 jnthn In which case pushing finalize off to a background thread so it can run concurrent with the mutator would help.
12:08 jnthn (And yay, that's in The Grant Plans :))
12:08 timotimo er, "mutator"?
12:08 jnthn ah, sorry, GC terminology
12:08 arnsholt Thread doing things =)
12:08 timotimo that wasn't in your "secret life of GCs" talk! or maybe it was and i forgot ;(
12:08 jnthn Not sure it was, but basically "running code that is changing memory" :)
12:09 timotimo ah. so "everything in between GC runs"
12:09 jnthn Or "all the things that touch memory besides GC" :)
12:09 jnthn Yeah, though once you start talking about concurent GC then "between" gets less easy to reason about :)
12:09 timotimo aye
12:09 jnthn Lunch :)
12:10 kaare_ joined #perl6
12:17 apiw joined #perl6
12:20 synopsebot6 joined #perl6
12:28 kid51 joined #perl6
12:33 ely-se joined #perl6
12:34 El_Che https://rakudo.org/downloads/rakudo/ has an invalid certificate. Download on https is a good thing. Has someone here access to that server?
12:35 apiw joined #perl6
12:37 skids joined #perl6
12:40 synopsebot6 joined #perl6
12:40 timotimo ah, self-signed
12:47 mohae joined #perl6
12:51 sufrostico joined #perl6
12:53 timotimo https://asset-3.soupcdn.com​/asset/16025/7174_30b3.gif  -  RESTRICTED.setting
12:55 tadzik :D
12:55 tadzik someone forgot to turn off debugging hitboxes
12:55 timotimo :D
12:56 cfedde joined #perl6
12:57 apiw joined #perl6
12:59 synopsebot6 joined #perl6
12:59 _mg_ joined #perl6
12:59 timotimo tadzik: https://asset-3.soupcdn.co​m/asset/9281/4482_373b.gif - you like space doge?
13:06 tadzik :D \o/
13:06 tadzik love it
13:08 RabidGravy is there any way I can disambiguate "role A { }; class B {}; my $b = B.new; my $c = B.new but A; multi sub (B ) { }; multi sub (A) { }"  ?
13:09 RabidGravy that is I want a candidate for the thing without the role and one with the role
13:10 RabidGravy or is it a specific where * !~~ A ?
13:10 Skarsnik look like it?
13:11 RabidGravy let me try that one
13:12 RabidGravy yeah that works
13:18 synopsebot6 joined #perl6
13:19 jnthn RabidGravy: You can also mark a candidate "is default" to tie-break, as a last resort
13:20 RabidGravy ah okay
13:27 dalek rakudo/nom: 10c86cf | coke++ | docs/release_guide.pod:
13:27 dalek rakudo/nom: claim next release
13:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/10c86cfcb6
13:27 zakharyas joined #perl6
13:27 dalek rakudo/nom: cce7ca3 | lizmat++ | src/core/Str.pm:
13:27 dalek rakudo/nom: Streamline Str.trans some more for str only
13:27 dalek rakudo/nom:
13:27 dalek rakudo/nom: This makes Juerd's atbash example yet again 2x faster
13:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cce7ca3533
13:27 dalek rakudo/nom: edac531 | lizmat++ | src/core/Str.pm:
13:27 dalek rakudo/nom: Fix problem with overlapping needles
13:27 dalek rakudo/nom:
13:27 dalek rakudo/nom: Exposed by optimizations in Str.trans
13:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/edac531c6c
13:28 lizmat away for a few hours&
13:37 synopsebot6 joined #perl6
13:52 Psyche^ joined #perl6
13:57 synopsebot6 joined #perl6
13:59 Perleone joined #perl6
14:01 apiw joined #perl6
14:01 araujo joined #perl6
14:01 araujo joined #perl6
14:02 araujo joined #perl6
14:02 araujo joined #perl6
14:04 petercom1and joined #perl6
14:04 araujo joined #perl6
14:06 Ulti those fosdem videos are super funky
14:06 Ulti you cant seek in them at all and all the audio is out from the video
14:07 araujo joined #perl6
14:09 araujo joined #perl6
14:09 araujo joined #perl6
14:09 skids joined #perl6
14:10 Perleone Ulti: https://github.com/FOSDEM/videobox​/issues/28#issuecomment-186176254
14:11 araujo joined #perl6
14:11 stmuk_ VLC has a key to delay and advance audio
14:13 DrForr Yah, Vim cluster which annoys me because I keep tyoping them.
14:13 araujo joined #perl6
14:13 araujo joined #perl6
14:14 Ulti cool thanks Perleone
14:16 synopsebot6 joined #perl6
14:16 zpmorgan joined #perl6
14:18 araujo joined #perl6
14:18 moritz ok, good news. $work is experimenting with OpenStack, and for about half a year I get free computing resources on that experimental cluster
14:18 moritz so I want to use that to build some CI stuff for Rakudo :-)
14:19 perlpilot moritz++ cool
14:22 jnthn \o/
14:24 donaldh joined #perl6
14:24 perlpilot joined #perl6
14:26 prammer joined #perl6
14:33 apiw joined #perl6
14:35 synopsebot6 joined #perl6
14:39 masak moritz++
14:42 apiw joined #perl6
14:44 timotimo Ulti: "out from the video"? o_O
14:45 geekosaur out of sync, presumably
14:45 timotimo ah
14:45 timotimo "the encodes never stopped" o_O
14:45 moritz started my first instance
14:54 synopsebot6 joined #perl6
15:00 apiw joined #perl6
15:06 skids m: say any("fgh","fhg").index("l"); 42.say without "fhg".index("l"); 43.say without any("fgh","fhg").index("l"); # Should with/without be junction-savvy?
15:06 camelia rakudo-moar edac53: OUTPUT«any(Nil, Nil)␤42␤»
15:14 synopsebot6 joined #perl6
15:19 kurahaupo joined #perl6
15:28 skids m: my %frags := Set.new(<aga agg agga ag>); say %frags.keys.grep: { none((%frags (-) Set($_)).keys).index($_) ~~ Int }; # Step 1 of today's challenge: eliminate entirely subsumed substrings
15:28 camelia rakudo-moar edac53: OUTPUT«(aga agga)␤»
15:29 [Coke] Aooga. The 6.c branch of roast has been replaced with both a 6.c tag (unchanging) and a 6.c-errata branch which should include only a small set of 6.c-related fixes (for example, un-TODOing this test that is now passing)
15:29 masak m: say ?any(Nil, Nil)
15:29 camelia rakudo-moar edac53: OUTPUT«False␤»
15:30 [Coke] see jnthn's document about release management for more deets.
15:30 masak [Coke]++
15:31 stmuk_ are there intended to be both rakudo and roast 6.c-errata branches?
15:31 cdg joined #perl6
15:32 skids todays challenge posted, BTW https://www.reddit.com/r/dailyprogra​mmer/comments/46km7n/20160219_challe​nge_254_hard_dna_shotgun_sequencing/
15:32 skids (Wasn't someone already doing bioinformatics?)
15:33 synopsebot6 joined #perl6
15:33 timotimo yeah
15:34 [Coke] stmuk_: no, rakudo is not maintaining multiple versions.
15:34 timotimo https://github.com/MattOates/BioInfo as well as https://github.com/cjfields/bioperl6
15:34 timotimo yo stmuk_ did you see my issue on vimcolour?
15:36 [Coke] (stmuk_) so rakudo-latest will always be targeting the HEAD of 6.c-errata for its 6.c support.
15:37 [Coke] if we have to change the 6.c tests too much, we'll do so with a 6.c.1 tag (and then errata until the next version)
15:41 adu joined #perl6
15:45 stmuk_ timotimo: I'm desperately preparing a perl6 talk for next week but hope to look at the vim colour syntax issue Real Soon Now
15:46 Perleone left #perl6
15:47 timotimo oh!
15:47 timotimo okay, don't worry about it
15:48 timotimo i made sure the examples htmlify has a little CATCH block that skips highlighting individual pieces if need be
15:49 stmuk_ so really there is no obvious version for a linux distribution to target other than the "latest one"
15:51 skids [Coke]: how about behavior changes that do not break 6.c tests, but are definitely changes, which introriduce new tests that older rakudos would fail?  (PR#685 is why I ask)
15:52 synopsebot6 joined #perl6
15:54 Upasaka joined #perl6
15:59 autarch1 joined #perl6
16:02 jabowery joined #perl6
16:02 virtualsue joined #perl6
16:03 stmuk_ skids: I guess that's still 6.d behaviour
16:05 skids Not 6.c.1?
16:06 [Coke] skids: if it's a new test, it's not 6.c
16:06 skids Are we just pushing those to raost/master then?
16:06 [Coke] depending on the behavior, it could go in 6.c.1 or 6.d, sure
16:07 jabowery I've installed rakudobrew sometime back (there is a fully populated ~/.rakudobrew directory) but for some reason nothing the environment doesn't let me execute anything -- not 'perl6', not 'rakudo', not 'moar' and not even 'rakudobrew'.  Clearly there was some step in the installation process that set up .bashrc or something with environment variables that got trashed.  Any ideas how to recover, or should I just blitz that dir and
16:07 jabowery reinstall?
16:08 jabowery s/nothing//
16:08 timotimo yeah, you have to have ~/.rakudobrew/bin in your PATH variable for it to work
16:08 timotimo if it's quite old, you would probably want to "rakudobrew self-update" or what it's called after you set up the PATH
16:08 timotimo (that gets you the newest version of rakudobrew itself)
16:08 jabowery Thanks!
16:11 Relsak joined #perl6
16:11 synopsebot6 joined #perl6
16:12 gregf_ hi
16:12 gregf_ is there something similar to kwargs in Perl6?
16:13 gregf_ as in , in Ruby i can do def foo(*args, **kwargs){ } ; foo(1,2,3,{a: 1, b:2})
16:13 timotimo of course, it's spelled *%foo in our case
16:13 timotimo just like *@bar is for positional arguments
16:14 gregf_ oh so foo(*@bar, *%baz) would be it?
16:14 RabidGravy yep
16:15 MadcapJake Which one in this SO answer is Rakudo? http://stackoverflow.com/a/749218/1274498
16:15 geekosaur but there's also proper declared keyword arguments
16:16 gregf_ timotimo: RabidGravy : cheers
16:16 geekosaur MadcapJake, 4 but barely as the JI is still young
16:16 geekosaur *JIT
16:16 timotimo right. we don't outperform native compilation often yet
16:17 MadcapJake I was thinking either 3 or 4, but can you explain what JIT really does? Or more, how does Rakudo's JIT work.
16:17 timotimo easy peasy
16:18 timotimo when the VM decides some piece of code is worthy of JIT compilation, it takes the bytecode that was used so far and turns that into native code. after that, instead of letting the interpreter go through that bytecode, it'll instead just jump right into the native code
16:18 timotimo reality is, of course, much more complicated
16:18 geekosaur also, rakudo itself doesn't do JIT. it compiles to moarvm or JVM bytecode, and JIT is implemented at that level (in moarvm or JRE)
16:18 MadcapJake neat, so it searches for particular patterns that would benefit from being completely native and compiles and runs them as such?
16:19 timotimo something like that, yeah
16:19 timotimo in MoarVM, deciding what benefits and what doesn't is simply "how often has this piece of code been run yet?"
16:19 timotimo and the current jit works on a per-frame level
16:20 timotimo so a single pair of curly braces, usually. but we often in-line curly braces into their "parents", and we try to inline small subs and methods that get called into the caller's code as well.
16:20 khw joined #perl6
16:20 MadcapJake neat!
16:21 MadcapJake any idea where the name "Just In Time" came from? I'm not really seeing the connection to what it does in practice.
16:21 timotimo well, regular compilers are often called "Ahead Of Time"
16:21 perlpilot timotimo: and where are the language level hooks so that I can tweak the when and what gets jitted?  ;)
16:22 MadcapJake ahh i see, makes sense when you consider that
16:22 timotimo perlpilot: not yet, but a language-level API for instrumenting bytecode is planned
16:22 pmurias joined #perl6
16:22 geekosaur I think it was borrowed from manufacturing, actually. Just In Time there is an inventory system which aims to ensure that raw materials needed for manufacturing arrive Just In Time for the manufacturing step, because having to store them in inventory is fairly expensive.
16:23 geekosaur when translated to virtual machines, that means generaitng native code Just In Time for it to be run insead of ahead of schedule
16:23 MadcapJake geekosaur, fascinating!
16:25 ugexe m: my @a = 1,2,3; my @b = @a.splice(0).grep(*.defined); say @b.perl
16:25 camelia rakudo-moar edac53: OUTPUT«[1, 2, 3]␤»
16:25 ugexe m: my @a = 1,2,3; my @b = @a.splice(0).grep(*.defined) || 1; say @b.perl
16:25 camelia rakudo-moar edac53: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/G75vcqj7dh line 1␤␤»
16:25 jnthn stmuk_: The answer to "what linux distributions target" is generally "what they decide, but I expect most will go for LTS releases"
16:25 pmurias MadcapJake: the main reason for generating code JIT is that more information is available at runtime
16:25 ugexe what is the sequence consumed in the second example, but not the first?
16:26 ugexe why^
16:26 jnthn ugexe: Once to boolean test it, and then the assignment also wants to consume it
16:26 MadcapJake pmurias, what do you mean by "more information"?
16:26 perlpilot MadcapJake: you know how the code is *actually* being used at runtime.
16:26 jnthn ugexe: You'll need a .cache for that
16:26 geekosaur and in btoh cases if it turns out your JIT was wrong (or manufacturing, wrong or out of spec material; for VMs, you generated code that works for some cases but not the current one) you incur a stall. it's somewhat cheaper to recover in the VM case, though, so that's in some ways considered a feature. in particular you can if necessary fall back to running the bytecode if it's a special case that only comes up once, while leaving the JIT code for
16:26 geekosaur the common cases
16:27 jnthn MadcapJake: Consider trying to compile a sub foo($a) { $a.bar }. Even if we compile that to native code, we can't do a very good job, because we don't know anything about $a, let alone the nature of the receiver of a bar message sent to it.
16:28 jnthn MadcapJake: If we put of the compilation until runtime, we might know $a is nearly always a Pub object, and that its bar method is a cheap accessor, so we can devirtualize the method call and inline the cheap accessor, for example.
16:29 MadcapJake so upon arriving at that bit of code you would check the scope for $a and what it is?
16:29 geekosaur you need to check that anyway
16:30 MadcapJake sure but is that check where the decision to devirtualize would happen?
16:30 jnthn MadcapJake: We record call counts, and then we start logging what actual types show up, yeah
16:30 jnthn Then we generate optimized versions of the code by type
16:30 jnthn And within those sections they can make a bunch of assumptions
16:31 synopsebot6 joined #perl6
16:32 ugexe m: my @a = 1,2,3; @a[0]:delete; say @a.perl; say @a.splice(0).grep(*.defined).perl # shouldn't the .splice(0).grep(*.defined) return non-empty?
16:32 camelia rakudo-moar edac53: OUTPUT«[Any, 2, 3]␤().Seq␤»
16:33 jnthn Doesn't splice return the removed elements?
16:33 dalek nqp: 0d075ed | (Pawel Murias)++ | / (7 files):
16:33 dalek nqp: [js] Add support for using the setting in code that is webpacked and sent to the browser.
16:33 dalek nqp: review: https://github.com/perl6/nqp/commit/0d075ed25e
16:33 ugexe m: my @a = 1,2,3; say @a.splice(0).grep(*.defined)
16:33 camelia rakudo-moar edac53: OUTPUT«(1 2 3)␤»
16:34 MadcapJake Crazy! It's always baffling to know how much is happening beneath the surface. Thanks for the insights timotimo, geekosaur, pmurias, jnthn!
16:34 jnthn m: Ah, but that still doesn't explain things
16:34 camelia rakudo-moar edac53: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZnrvceAw_y␤Undeclared name:␤    Ah used at line 1␤Undeclared routines:␤    but used at line 1. Did you mean 'put'?␤    doesn't used at line 1␤    explain used at line 1␤    still used at line 1. D…»
16:34 jnthn oops!
16:34 ugexe m: my @a = 1,2,3; @a[1]:delete; say @a.perl; say @a.splice(0).grep(*.defined).perl
16:34 camelia rakudo-moar edac53: OUTPUT«[1, Any, 3]␤(1,).Seq␤»
16:34 timotimo MadcapJake: the thing i've learned about all this as i've contributed to moarvm is that all of the intricate inner works are a thousand times simpler than i first assumed ;)
16:35 ugexe grep seems to think the end of the array is the first empty index?
16:35 timotimo it felt great to understand all those cool things for the first time
16:35 MadcapJake I hope someday to be at that level, for sure!
16:35 jnthn ugexe: Yeah, that feels a bit off
16:35 timotimo m: my @a = 1, 2, 3; @a[1]:delete; say @a.list.perl
16:35 camelia rakudo-moar edac53: OUTPUT«[1, Any, 3]␤»
16:36 timotimo m: my @a = 1, 2, 3; @a[1]:delete; @a.map(*.say)
16:36 camelia rakudo-moar edac53: OUTPUT«1␤(Any)␤3␤»
16:36 timotimo m: my @a = 1, 2, 3; @a[1]:delete; @a.grep(*.say)
16:36 camelia rakudo-moar edac53: OUTPUT«1␤(Any)␤3␤»
16:36 timotimo m: my @a = 1, 2, 3; @a[1]:delete; @a.splice(0).grep(*.say)
16:36 camelia rakudo-moar edac53: OUTPUT«1␤»
16:36 timotimo m: my @a = 1, 2, 3; @a[1]:delete; @a.splice(0).map(*.say)
16:36 camelia rakudo-moar edac53: OUTPUT«1␤»
16:36 timotimo what's .splice(0) supposed to do, exactly?
16:36 timotimo it doesn't seem like grep is at fault here
16:36 ugexe remove all elements
16:36 timotimo oh. well, that certainly doesn't delete *all* elements
16:36 El_Che is there an obvious ways to remove perl6 modules. I am building a docker image for a perl6 app, I the standard way is to get rid of everything that the app doesn't need. I used panda at build time. So I'd like to remove it after I get my application and it's dependencies. With .precomp I am kind of lost
16:37 timotimo El_Che: since .precomp is just a cache, you can just delete every .precome folder on your whole system (provided rakudo's the only one who uses .precomp)
16:37 timotimo oh, btw, maybe we should rename .precomp .p6precomp or something?
16:37 ugexe if you use zef you don't even have to install it
16:38 El_Che ugexe: I tried zef today while experimenting but it got stuck in Text::CSV
16:38 ugexe but if you do it can also uninstall (if you are using a rakudo from the last weekish)
16:38 El_Che ugexe: zef supports uninstalls?
16:38 |Tux| El_Che, my fault?
16:38 ugexe if you have a rakudo from the last weekish, yes
16:39 timotimo CompUnitRepo recently got a .uninstall folder. i only saw mention of that scroll through the backlog, but i assume panda could be made to easily support that
16:39 El_Che |Tux|: I don't think so, panda builds the module
16:39 El_Che (using rakudo 2016.01.1 in the docker image)
16:40 El_Che that uninstall bit is wonderful news
16:40 hippie1 joined #perl6
16:43 El_Che I'll keep with the bloated image for now and wait the uninstall feature makes it to a rakudo release
16:44 ugexe El_Che: are you sure it froze and wasn't just running text csvs billion tests?
16:44 rurban joined #perl6
16:44 ugexe cause it installed for me
16:45 El_Che ugexe: I'll will have a it and keep you posted. Maybe it was something related to the problem I posted earlier (panda installed new version of the module, but the binary was stuck to a precomp older version. Was it rakudobrew, was it panda? I don't know. I had the nuke the rakudobrew install to keep my sanaty :) )
16:45 El_Che sanity
16:46 ugexe m: my @a = 1,2,3,4,5; @a[3]:delete; say @a.splice(0)
16:46 camelia rakudo-moar edac53: OUTPUT«[1 2 3]␤»
16:50 perlpilot m: my @a = 1,2,3,4,5; @a[3]:delete; say @a.splice;  # this should be the same as .splice(0)
16:50 camelia rakudo-moar edac53: OUTPUT«[1 2 3 (Any) 5]␤»
16:51 synopsebot6 joined #perl6
16:56 ugexe i wonder why that still works... looking at the multis it seems like it would take the same path, setting $offset=0 in the signatures
17:04 addison joined #perl6
17:07 gregf_ i was looking at the execution time for the above question i'd asked and the Perl6 time was quite high :/
17:08 gregf_ https://gist.github.com/ano​nymous/a5dae683e0c0a27cd4e2
17:08 Woodi hi #perl6 :)
17:08 perlpilot ugexe: I wonder what multi actually executes?
17:08 timotimo gregf_: you're measuring mostly start-up time there
17:08 timotimo potentially
17:09 gregf_ hmm, possibly
17:09 timotimo you could try running foo for ^10_000 and just stringify, but not print the kwargs
17:09 perlpilot gregf_: also ... rakudo still has some optimization to do, so it will (probably) get faster.
17:10 timotimo yes, it will
17:10 Woodi lizmat: optimizations like "replace small amount of code with page or two" are well beyoud my brain capacity :)  lizmat++
17:10 perlpilot Also ... I think rakudo's IO time is slowish too  (just a gut feeling I've had)
17:11 synopsebot6 joined #perl6
17:11 stmuk_ I don't think there is buffering on file handles due to libuv (?)
17:12 timotimo there is a bit of overhead doing synchronous IO through libuv
17:13 ugexe hmm so what is the fastest way to find out which multi something uses?
17:14 perlpilot I only know of slow ways right off.
17:15 timotimo ugexe: hmm, spesh log? :P
17:15 timotimo you could wrap the candidates, i guess?
17:16 ugexe i was hoping a clever way to make it die so i could use the trace
17:17 perlpilot .oO( "we've secretly replaced the .splice multi candidates with ones that die; let's see who notices" )
17:19 ugexe would make a good 4.1.2016 release
17:21 stmuk_ but only in the USA!
17:22 perlpilot someone should do a bizarro-rakudo release with such things
17:24 gregf_ timotimo: perlpilot : well ran a 100,000 times: https://gist.github.com/ano​nymous/0f7b3a92894b86d41c19 *hides*
17:25 gregf_ anyways, it should improve over time
17:26 gregf_ btw, is threading in Perl6 better than in Perl5?
17:26 timotimo a million times better
17:26 gregf_ thats encouraging
17:27 timotimo i'd say "perl5 doesn't have threading"
17:27 pullphinger joined #perl6
17:27 gregf_ well, its there but its not recommended
17:28 geekosaur perl5 threading is a (possibly cancerous) outgrowth of a hack intended to (a) make signal handling safe on unix (b) simulate fork() on Windows
17:29 timotimo gregf_: invocation is currently quite a bit more expensive than it could be. that is an important part in jnthn's upcoming optimization work
17:29 timotimo for which he'll hopefully be sponsored by the perl foundation's perl6 grant money pool
17:30 timotimo gregf_: your code runs in 0.85s on my machine; what version of perl6 are you running?
17:30 timotimo i.e. perl6 --version
17:31 gregf_ 5.9.0
17:31 gregf_ version 0
17:31 gregf_ its prolly a month or so old
17:31 moritz that doesn't look like a rakudo version
17:31 timotimo no, that's not a rakudo version
17:31 synopsebot6 joined #perl6
17:31 timotimo give us perl6 --version instead, please
17:31 moritz a parrot version, manybe?
17:31 timotimo hopefully not!!
17:31 gregf_ parrot it says
17:32 timotimo lol
17:32 timotimo that explains the performance
17:32 timotimo please go get an up-to-date rakudo
17:32 timotimo yours is at least 2 years old
17:32 gregf_ ah - i see
17:32 timotimo or maybe 10. or 20?
17:32 moritz gregf_: please get a rakudo 2016.01 or newer
17:32 gregf_ no wonder
17:32 gregf_ sure
17:33 timotimo thank you :)
17:33 timotimo and thank the lord the actual current performance isn't that bad
17:34 gregf_ ;)
17:34 timotimo the parrot version of rakudo also doesn't come with any perl6-level threading
17:36 gregf_ oh , so panda is like rvm/cpanm/pip
17:36 mst somewhat
17:36 mst it's in the same space
17:37 cognominal_ joined #perl6
17:39 timotimo ohai mst
17:39 timotimo gregf_: can you tell us how you got to that version of rakudo? did you get it from your distro's package manager? if yes, what distro and version is that?
17:39 flussence perl5 threading made complete sense to me when I used it (shows how little I knew about concurrency back then)
17:40 gregf_ timotimo: yeah, just a min. installing rakudo ...
17:42 timotimo https://stackoverflow.com/questions/35​510638/perl6-ncurses-and-mouse-events  -  has anybody used the perl6 ncurses module yet?
17:43 rudi_s With NativeCall, what do I use for void * which is used to pass arbitrary data to the function?
17:44 timotimo usually, Pointer; you can always nativecast afterwards
17:44 timotimo gregf_: also, the perl6 code in your benchmark isn't the same as at least the python code, because the perl6 version gives the %kwargs as the return value of the function you declared
17:44 timotimo AFK for a bit
17:45 rudi_s Basically a char * pointer but not encoded/decoded. On the perl side I have Buf.
17:45 rudi_s How can I pass that as "raw" value to the C function?
17:45 rudi_s (Btw. how can I convert a Str to a Buf?)
17:47 timotimo there's a helper module for things like that in the ecosystem
17:47 timotimo you'd use a CArray for that in NativeCall
17:47 pmurias jnthn: how does nqp::callercode work with inlining?
17:47 timotimo because you cannot create a Buf without knowing the length of the thing
17:47 gregf_ timotimo: https://gist.github.com/ano​nymous/b3cfa48fdbba487aa3a2 *looks better*
17:47 timotimo gregf_: it'd be interesting to see what time perl6 -e 'say "hi"'  gives you
17:48 timotimo on my machine that's 0:00.13elapsed
17:48 gregf_ sure
17:48 timotimo used to be at 0:00.10 not long ago. i wonder what changed
17:48 rudi_s timotimo: CArray of which type?
17:49 timotimo doesn't really matter. probably int8? or uint8?
17:49 timotimo if you want to see the most terrible thing ever created to get a void ** to work, have a look at this: https://github.com/timo/SDL2_raw-p6/bl​ob/master/examples/white_noise.p6#L37
17:49 stmuk_ timotimo: textbox is worth a look as a more modern and simplier ncurses
17:49 gregf_ timotimo: nope. its slower :/. almost 3 seconds
17:49 timotimo https://github.com/timo/SDL2_raw-p​6/blob/master/lib/SDL2/Raw.pm#L190 - this is the declaration of LockTexture to go with that
17:50 timotimo gregf_: how can say "hi" take 3 seconds, but a hundred thousand calls to foo take less than one second?
17:50 rudi_s timotimo: I'm confused about the "doesn't really matter". Won't this be represented as a char * internally - otherwise passing it to the external app won't work.
17:50 gregf_ timotimo: anyways, gtg, thanks. *later*
17:50 timotimo you're welcome!
17:50 prammer joined #perl6
17:50 timotimo rudi_s: i believe for the calling convention it just matters that the argument is a pointer
17:51 timotimo i think i'm misunderstanding what you want
17:51 synopsebot6 joined #perl6
17:51 timotimo perhaps you're supposed to pass a pre-made buffer to a native function via a "void *" argument?
17:52 gregf_ timotimo: https://github.com/tadzik/rakudobrew <-- from here
17:52 rudi_s timotimo: Sorry. I'll explain again. I have either a Str or a Buf and want to pass that "raw" to a C function which takes a void * and a length and then writes this data somewhere.
17:53 timotimo ah
17:53 timotimo gregf_: no, i meant before that. when you got a parrot-based rakudo
17:54 rudi_s (I just learned that I can encode a Str to a Blob, so the question becomes how to handle a Buf or Blob and pass that.)
17:54 timotimo rudi_s: i'm not 100% sure about how to pass a Buf. theoretically, it should work as-is, but i suspect it isn't implemented yet
17:54 timotimo otherwise, have you checked out that nativecall helper module i talked about earlier?
17:55 addison joined #perl6
17:55 gregf_ timotimo: well just did a: apt-get install perl6 afaik
17:55 timotimo OK, and what distro and distro release is that on?
17:56 gregf_ ubuntu
17:56 gregf_ LTS 4.04
17:56 gregf_ s/^4/14/
17:56 timotimo OK, thanks!
17:56 flussence yep, that's 2 years out of date alright
17:56 rudi_s timotimo: I didn't find it. Do you have a name?
17:57 timotimo NativeHelpers::Blob and NativeHelpers::Array
17:57 ugexe ah i see. .splice never reaches the multi that sets a default of 0
17:57 timotimo AFK for a bit, for real this time
17:58 timotimo oh, and what is the content of the "perl" field in the meta.info supposed to be? "6"? "6.c"?
17:59 Juerd joined #perl6
18:02 nine 6.c
18:02 timotimo what speaks against 6.*?
18:03 nine Maybe someday rakudo will drop support for 6.c. That may affect your module.
18:03 timotimo hm, right, fair enough
18:03 timotimo though i hope i won't leave it unmaintained for that long :)
18:03 timotimo maybe something more "complicated" than just a single version would be interesting to have in the "perl" field
18:03 nine Of course newer versions of your module will be well tested with newer versions of Perl6 by then. But the old version won't.
18:03 timotimo if my code runs unchanged with 6.c or 6.d for example
18:04 nine Well right now we interpret it as the minimum version of Perl needed by your module.
18:04 timotimo ah, good good
18:05 sufrostico joined #perl6
18:05 ugexe m: my @a = 1,2,3,4,5; @a[1]:delete; say @a[lazy 0..3]
18:05 camelia rakudo-moar edac53: OUTPUT«(1)␤»
18:05 ugexe m: my @a = 1,2,3,4,5; @a[1]:delete; say @a[0..3]
18:05 camelia rakudo-moar edac53: OUTPUT«(1 (Any) 3 4)␤»
18:05 ugexe this is causing the splice problem
18:06 AlexDaniel oh, 2016.01 still is not in Debian. Eh.
18:07 AlexDaniel the freeze will be this summer
18:11 synopsebot6 joined #perl6
18:11 Skarsnik (my) current debian stable has a parrot perl6 I think
18:12 ugexe m: my @a = 1,2,3,4,5; @a[1]:delete; say @a[0..*]
18:12 camelia rakudo-moar edac53: OUTPUT«(1)␤»
18:15 AlexDaniel Skarsnik: I think that you have to install “rakudo” package directly
18:15 AlexDaniel it was there since wheezy, but in wheezy it is 2012.01… In jessie 2014.07
18:15 AlexDaniel which is, meh…
18:16 Skarsnik this is really confusing lol
18:16 Skarsnik rakudo - Perl 6 implementation on top of Parrot virtual machine
18:16 Skarsnik rakudo-lib - Library for Perl 6 implementation on top of Moar virtual machine
18:16 Skarsnik there is a lib rakudo? x)
18:17 [Coke] Skarsnik: that version is just horribly out of date.
18:17 Skarsnik Oh yeah, it's 2014.07
18:17 AlexDaniel Suggests: valgrind
18:18 cognominal joined #perl6
18:18 b2gills joined #perl6
18:20 Skarsnik hm 2015.11 is the version on unstable?
18:21 GlitchCog joined #perl6
18:22 cdg joined #perl6
18:23 GlitchCog joined #perl6
18:23 [Coke] that's still too old. :)
18:23 Skarsnik btw what is recommanded to package now? 2016.01.1?
18:25 [Coke] yup
18:25 darko joined #perl6
18:25 moritz joined #perl6
18:25 rjbs joined #perl6
18:25 mst joined #perl6
18:25 kd` joined #perl6
18:25 au joined #perl6
18:25 sunnavy joined #perl6
18:25 gabiruh joined #perl6
18:25 mathw joined #perl6
18:25 BooK joined #perl6
18:25 edenc joined #perl6
18:25 Hotkeys joined #perl6
18:25 gregf joined #perl6
18:25 d^_^b joined #perl6
18:25 Grrrr joined #perl6
18:25 cosimo joined #perl6
18:25 gypsydave5 joined #perl6
18:25 d^_^b joined #perl6
18:25 johan joined #perl6
18:25 vytas joined #perl6
18:25 Amnez777 joined #perl6
18:25 LGD joined #perl6
18:25 autogen joined #perl6
18:25 pmqs joined #perl6
18:25 abaugher joined #perl6
18:26 pdcawley joined #perl6
18:26 Grauwolf joined #perl6
18:26 yeltzooo joined #perl6
18:26 [particle] joined #perl6
18:26 luis joined #perl6
18:26 Timbus joined #perl6
18:26 Praise joined #perl6
18:26 Praise joined #perl6
18:27 ranguard joined #perl6
18:27 Woodi joined #perl6
18:27 awwaiid joined #perl6
18:27 masak joined #perl6
18:27 mspo joined #perl6
18:27 dsp- joined #perl6
18:27 jercos joined #perl6
18:27 pochi joined #perl6
18:27 a3r0_ joined #perl6
18:27 apejens joined #perl6
18:27 nowan joined #perl6
18:27 llfourn joined #perl6
18:27 felher joined #perl6
18:27 jsimonet1 joined #perl6
18:27 bitmap joined #perl6
18:27 matta joined #perl6
18:28 timotimo AlexDaniel: is that just because we install a perl6-valgrind-m script?
18:28 Skarsnik Yes
18:28 AlexDaniel yup
18:28 tinita joined #perl6
18:28 rdleon joined #perl6
18:28 ambs joined #perl6
18:28 Skarsnik In the description
18:28 Skarsnik valgrind package installation is suggested to debug issues with
18:28 Skarsnik perl6-valgrind-m program.
18:28 woodruffw joined #perl6
18:28 cpage joined #perl6
18:29 timotimo stmuk_: textbox is not likely a good suggestion for that stackoverflow question, though?
18:29 stmuk_ maybe not but I just like textbox and promote it :)
18:29 Amnez777 joined #perl6
18:29 lestrrat joined #perl6
18:29 timotimo we don't have a binding for that yet, eh?
18:30 stmuk_ I had one somewhere partly done
18:30 stmuk_ stmuk--
18:30 timotimo oh :)
18:30 timotimo don't beat yourself up about it
18:31 synopsebot6 joined #perl6
18:32 pmurias textbox?
18:33 timotimo does ufo work for installing stuff again?
18:34 pmurias https://github.com/Yomguithereal/react-blessed seems like a awesome way of doing ncursy-like things
18:37 woodruffw joined #perl6
18:38 timotimo great. looking at brrt's assembly programming video ... sound is quiet AF, there is only a little piece of brrt visible, but the slides aren't in the video as "big" ...
18:38 timotimo argh.
18:38 woodruffw joined #perl6
18:38 timotimo and audio and video out of sync
18:39 DrForr I should see if my video is up then.
18:39 timotimo i saw it in the list
18:39 timotimo just 1gb big, too
18:39 timotimo that's nothing!
18:39 DrForr It was, last time I checked it was broken.
18:39 DrForr Still is then :/
18:40 timotimo well, i see what i assume is you in front of a blackboard that says "NLPW 2016"
18:40 timotimo what kind of Dr are you, btw?
18:40 stmuk_ errr I actually meant termbox not infobox anyway
18:40 DrForr Dr. House :)
18:40 stmuk_ https://code.google.com/archive/p/termbox/
18:40 prammer joined #perl6
18:41 timotimo did you say infobox? i think you said textbox :)
18:41 timotimo so apparently they're using audio from the camera's built-in microphone?
18:41 stmuk_ oh yeah
18:41 addison_ joined #perl6
18:41 timotimo why? :(
18:42 DrForr Oh, mine's going to be overloaded then, the speakers were off and I was trying to project to the back.
18:42 timotimo overloaded?
18:43 DrForr Volume.
18:43 timotimo ah
18:43 timotimo but if your speakers were off, doesn't that mean you'll be quiet rather than too loud?
18:44 DrForr Louder than I'd be with them on, which is rare for me.
18:44 timotimo oh, you compensated for the lack of speakers by speaking up?
18:44 timotimo i hope that didn't take too big of a toll on your voice
18:44 DrForr Tried, at least.
18:45 DrForr Naah. I was still talking afterward, in smoky bars even )
18:45 DrForr s/.$/:)
18:45 timotimo good good
18:51 synopsebot6 joined #perl6
18:52 * stmuk_ considers the irony that Brussels the source of the "no smoking in bars" rules allows it
18:54 DrForr I was speaking metaphorically, I really wasn't paying attention to the smoke. Or lack thereof.
19:01 anaeem1_ joined #perl6
19:03 cfedde joined #perl6
19:04 anaeem1 joined #perl6
19:04 SCHAAP137 joined #perl6
19:10 stmuk_ http://www.tolkiensociety.org/2016/0​2/extended-version-of-tolkiens-a-sec​ret-vice-to-be-published-in-april/
19:11 synopsebot6 joined #perl6
19:13 * lizmat did some benchmark on Str.trans before and after the last optimizations
19:13 lizmat and came up with a factor of 160x improvement
19:13 * lizmat is happy :)
19:14 perlpilot S99:LTA
19:14 synopsebot6 Link: http://design.perl6.org/S99.html#LTA
19:15 timotimo lizmat: great!
19:15 timotimo synopsebot6: why did you restart? :(
19:16 perlpilot S32/Callable:123
19:16 synopsebot6 Link: http://design.perl6.org/S32/Callable.html#line_123
19:16 timotimo huh, this is strange: Failed to set cpu.cfs_quota_us on /system.slice/synopsebot.service Permission denied
19:17 timotimo https://lists.debian.org/debia​n-kernel/2015/10/msg00313.html - oh?
19:19 timotimo looks like "failure to spawn thread", potentially because NPROX set too low. i wonder why it spawns threads all the time, though.
19:19 timotimo BBIAB
19:21 fireartist joined #perl6
19:26 sjn lizmat++ # optimizing stuffs
19:26 perlpilot timotimo++ for resurecting synopsebot6  :)
19:27 perlpilot (and keeping it fed and watered)
19:28 synopsebot6 joined #perl6
19:28 timotimo it's quite an easy job
19:30 _mg_ joined #perl6
19:31 moritz timotimo: but proc != thread, no?
19:35 cfedde joined #perl6
19:35 sufrosti1o joined #perl6
19:43 moritz btw the setting compiles in 71s on the new openstack instance that I just provisioned
19:44 dalek rakudo/nom: 65a2e89 | lizmat++ | docs/ChangeLog:
19:44 dalek rakudo/nom: Add some ChangeLog
19:44 dalek rakudo/nom:
19:44 dalek rakudo/nom: For the issues I could recognize: please add anything I forgot / fix
19:44 dalek rakudo/nom: what I didn't understand correctly
19:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/65a2e89ab9
19:44 lizmat [Coke]: ^^^
19:47 synopsebot6 joined #perl6
19:49 jnthn ugexe: If you didn't discover already on "how do I find which multis this argument capture matches" - see the .cando method
19:51 jnthn pmurias: iirc, currently we don't inline anything that does nqp::callercode
19:55 [Coke] lizmat: danke
19:57 dalek nqp: 3e46e75 | lizmat++ | tools/build/MOAR_REVISION:
19:57 dalek nqp: Bump MOAR_REVISION
19:57 dalek nqp: review: https://github.com/perl6/nqp/commit/3e46e754c5
19:59 [Coke] lizmat++
20:01 jnthn lizmat: 160x improvement o.O
20:01 jnthn lizmat++
20:01 lizmat yeah, I think a bit more can still be had, but I'll keep that for after the release
20:02 sjn what features are affected by that speedup?
20:02 lizmat tr/abc/def
20:03 moritz lizmat: is there anything special post-christmas that I have to be aware of when splitting test files?
20:03 moritz in particular I want to split up t/spec/S06-operator-overloading/sub.t into several files
20:03 moritz because it's so memory hungry
20:03 Woodi moritz: 71s: it means newer openstack software or just new instance ?
20:03 lizmat I think that's fine, jnthn [Coke] objections ?
20:03 [Coke] moritz: you can do whatever you want on roast/master - it's not 6.c
20:04 lizmat moritz: it's about the test, not where the test lives
20:04 El_Che lizmat: stop making rakudo fast otherwise won't get the grant ;)
20:04 [Coke] if you want to split it for 6.c, that's also possible, on the 6.c errata branch, as long as the tests themselves don't change.
20:04 rudi_s timotimo: Regarding my problem above (passing Buf/Blob to external function with takes void *), just using Blob as parameter works fine.
20:05 moritz Woodi: it means that $work is testing a new openstack cluster, and I got free access, so spun up a new instance
20:06 Woodi bruteforce...
20:07 Skarsnik rudi_s, yes, I think Blob and Buff work as sub argument (but not return, or struct)
20:07 synopsebot6 joined #perl6
20:10 jnthn moritz: I'm fine with the split
20:10 dalek roast: 274e561 | moritz++ | S06-operator-overloading/ (2 files):
20:10 dalek roast: Start to split up S06-operator-overloading/prefix.t into several files
20:10 dalek roast:
20:10 dalek roast: ... because running it on rakudo-moar takes > 1.4GB, and that has
20:10 dalek roast: killed my laptop one time too often :-)
20:10 dalek roast: review: https://github.com/perl6/roast/commit/274e561bb4
20:10 dalek rakudo/nom: f3cca8f | moritz++ | t/spectest.data:
20:10 dalek rakudo/nom: Run new (split-off) test file
20:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3cca8f816
20:11 moritz Woodi: when in doubt, use brute force :-)
20:11 dalek rakudo/nom: 120347b | lizmat++ | tools/build/NQP_REVISION:
20:11 dalek rakudo/nom: Bump NQP_REVISION
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/120347bd50
20:11 lostinfog joined #perl6
20:12 lizmat nom is now on latest/greatest MoarVM/NQP
20:12 rudi_s Skarsnik: Thanks, good to now.
20:12 rudi_s Btw. how can I handle time_t as argument?
20:12 Skarsnik time_t is a struct?
20:14 Skarsnik Now, I need to add another flag to gptrixie to not exclude the std stuff x)
20:17 Skarsnik time_t seem to be long int for me
20:20 AlexDaniel Juerd: have you found any way to fix your solution?
20:22 ugexe `say from-json("projects.json".IO.slurp).elems` went from 5.5s to 7.0s
20:24 lizmat ugexe: when?
20:24 ugexe HEAD~2 to HEAD
20:24 lizmat hmmm... that could only be the bump in nqp/moarvm then
20:24 ugexe 65a2e89 to 120347b
20:25 rudi_s Skarsnik: Depends on the system. I guess I can't get this portable.
20:25 Skarsnik You could write a small C helper
20:26 Skarsnik or add the type in rakudo and co if it's a serious concern
20:26 lizmat ugexe: fwiw, I'm seeing a 1.5x slowdown for Juerd's atbash example  :-(
20:27 ugexe i only checked because i knew it used trans (actually it was to-json but i didnt know that before checking)
20:27 rudi_s Skarsnik: I'll just hope it's just a uint64 on all systems I use.
20:27 synopsebot6 joined #perl6
20:28 lichtkind joined #perl6
20:29 yqt joined #perl6
20:30 AlexDaniel who is nrebeps on reddit?
20:30 Skarsnik hm, interesting, it should be unsigned int? (32bits system but I get Typedef<__time_t>->|long int|
20:34 rudi_s AFAIK it's unsigned long.
20:34 rudi_s Which I guess translates to Perl6's int64
20:34 rudi_s .
20:34 ugexe say to-json(from-json("package​s.json".IO.slurp)).chars; # 2015.12-323-gbb2953c => 1m15s, HEAD~2 => 35s, HEAD => 45s
20:34 lichtkind is pierre-vigier here?
20:34 [Coke] all the nqp changes in that commit are basically JS-only.
20:35 jnthn [Coke]: One of them wasn't (just mentioned it in another channel)
20:36 dalek roast: ac99cf5 | moritz++ | S06-operator-overloading/ (2 files):
20:36 dalek roast: Split out infix tests from S06-operator-overloading/sub.t
20:36 dalek roast: review: https://github.com/perl6/roast/commit/ac99cf5f4b
20:36 jnthn ugexe: Where HEAD~2 is 65a2e89ab9?
20:36 lizmat jnthn [Coke] building a revert with that now
20:36 ugexe jnthn: yes
20:37 * jnthn is happy there's not that many commits to look through
20:37 * [Coke] is glad we noticed BEFORE the release. :)
20:38 dalek rakudo/nom: 9ac5896 | moritz++ | t/spectest.data:
20:38 dalek rakudo/nom: Track test file split
20:38 dalek rakudo/nom:
20:38 dalek rakudo/nom: also restore alphabetical order
20:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ac589685f
20:38 jnthn Indeed
20:38 [Coke] ugexe++
20:39 jnthn stroll &
20:44 dalek roast: 00464e8 | moritz++ | S06-operator-overloading/ (2 files):
20:44 dalek roast: Split out circumfix tests from sub.t
20:44 dalek roast: review: https://github.com/perl6/roast/commit/00464e8c4d
20:46 dalek rakudo/nom: 327c518 | moritz++ | t/spectest.data:
20:46 dalek rakudo/nom: Track test file split
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/327c518b2a
20:47 synopsebot6 joined #perl6
20:48 timotimo jnthn: did you turn off the fixed size allocator in moar, perhaps?
20:49 kid51 joined #perl6
20:49 timotimo the FSA_SIZE_DEBUG is turned on. not sure if that has a speed impact
20:51 dalek roast: 14d35ed | moritz++ | S17-promise/at.t:
20:51 dalek roast: Max S17-promise/at.t 2 seconds faster
20:51 dalek roast:
20:51 dalek roast: replace a sleep with an await
20:51 dalek roast: review: https://github.com/perl6/roast/commit/14d35ed572
20:51 virtualsue joined #perl6
20:52 moritz lizmat: does S17-promise/at.t really need to sleep eleven seconds tocheck that the time difference before and after is at least one?
20:52 timotimo ah, that flag makes the fixedsize allocator use malloc directly
20:52 timotimo that could also explain why my white noise code was so heavy on malloc and free
20:53 timotimo [Coke]: it's potentially enough to revert just the latest commit
20:53 [Coke] timotimo: the latest commit is "all the nqp changes"
20:54 [Coke] or do you mean the latest nqp commit?
20:54 timotimo no, the laste moarvm commit :)
20:54 timotimo sorry for not being specific
20:54 RabidGravy I don't suppose there is some easy way identify things like Version and DateTime where the .Str of an object can be fed to thr new to create the equivalent object?
20:54 timotimo well, only that one line that changes the #define
20:55 jnthn timotimo: Ouch, I comitted that? :/
20:55 jnthn jnthn--
20:56 timotimo :)
20:56 timotimo i'm glad i was around and had the domain knowledge to see that that line could have such an impact
20:57 wbill joined #perl6
20:57 lizmat moritz: if you feel you can make it better, please do: those tests were added by me to have *any* tests there
20:58 lizmat moritz: aka "make it work"
21:01 lizmat jnthn: so that MoarVM commit *is* the culprit?
21:01 jnthn Almost certainly
21:01 jnthn Gee, goes to show show how important the FSA is.
21:01 jnthn We should make more stuff use it :P
21:02 timotimo i'm not quite sure why mp_mul_2d is so darn high up on the c-level profile ...
21:02 jnthn lizmat: Pushed an almost-definitely-fix.
21:03 jnthn Sorry 'bout that.
21:03 timotimo i don't see a multiplication in my code ...
21:03 lizmat jnthn: okidoki, bumping once again
21:03 jnthn It sneaked into one of my memory leak commits; I disabled it to help uncover more leaks to patch.
21:05 _dolmen_ joined #perl6
21:05 dalek nqp: 05c076c | lizmat++ | tools/build/MOAR_REVISION:
21:05 dalek nqp: Bump MOAR_REVISION to get enabled FSA, jnthn++
21:05 dalek nqp: review: https://github.com/perl6/nqp/commit/05c076c7a7
21:06 dalek rakudo/nom: a347de9 | lizmat++ | tools/build/NQP_REVISION:
21:06 dalek rakudo/nom: Bump NQP_REVISION to get enabled FSA on MoarVM
21:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a347de9373
21:07 synopsebot6 joined #perl6
21:10 lizmat ugexe: that appears to fix the speed regression for me
21:10 dalek roast: 27d0da3 | moritz++ | S17-promise/at.t:
21:10 dalek roast: Speed up S17-promise/at.t
21:10 dalek roast:
21:10 dalek roast: it should be safe to sleep much less here
21:10 dalek roast: review: https://github.com/perl6/roast/commit/27d0da3e5d
21:10 jnthn On the concurrency tests that sleep, I'll probably work on a TestScheduler
21:11 jnthn And we can use virtualized time for most of them
21:11 jnthn And just have a handful of tests for in/at on the ThreadPoolScheduler itself that really try and test it does something sensible with time.
21:11 jnthn Everything else builds atop of .cue in ThreadPoolScheduler.
21:12 lizmat tests for .batch may include a time component
21:12 jnthn Yeah, they do
21:12 lizmat as for .throttle ?
21:12 jnthn *nod*
21:12 jnthn I want to try and design a nice enough one that I can put it on modules.perl6.org too, as well as including it in the spectest repo
21:12 jnthn So people can use it for their own time-based code
21:12 lizmat jnthn: that would be cool :-)
21:12 jnthn Much like my Test::IO::Socket::Async :)
21:13 moritz speaking of which
21:13 dalek rakudo/nom: e401eeb | moritz++ | t/spectest.data:
21:13 dalek rakudo/nom: at.t is not too slow anymore
21:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e401eeb810
21:14 moritz the async socket tests sometimes (under stress) abort after test 4
21:14 moritz with "Connection reset by peer"
21:14 moritz any idea why? and if this is a timing issue in the test or an actual bug?
21:16 * jnthn suspects timing issue, but doesn't see it right away...
21:26 prammer joined #perl6
21:27 synopsebot6 joined #perl6
21:29 [Coke] jnthn: you do git stuff for a living, yes? how much would you charge to convert this horribly broken svn repository to git for me? ;)
21:29 cdg joined #perl6
21:30 [Coke] (svn cp ^/ ^/branches/foo; svn cp ^/branches/bar ^/baz)
21:30 musiKk joined #perl6
21:31 lizmat hmmm... I don't think all speed issues are gone yet
21:31 lizmat bare startup has gone from 110 msecs to 125 for me  :-(
21:33 prammer joined #perl6
21:36 ely-se joined #perl6
21:37 jnthn [Coke]: Ouch! ;) I taught Git, but somehow escaped an SVN -> Git migration...the migrations I encountered were more exotic things (ClearCase <shudder>) :)
21:38 Zero_Dogg joined #perl6
21:44 firstdayonthejob joined #perl6
21:47 synopsebot6 joined #perl6
21:48 addison_ joined #perl6
21:50 RabidGravy the one I seem to have done most in my life is cvs -> svn
21:52 * lizmat realises a backup was running
21:55 dalek ecosystem: 9df1db1 | (Gary Ashton-Jones)++ | META.list:
21:55 dalek ecosystem: Update META.list
21:55 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/9df1db1484
21:55 dalek ecosystem: b1b26df | (Zoffix Znet)++ | META.list:
21:55 dalek ecosystem: Merge pull request #156 from garyaj/patch-1
21:55 dalek ecosystem:
21:55 dalek ecosystem: Update META.list.
21:55 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/b1b26df543
21:56 lizmat good night, #perl6!
21:57 [Coke] ~~
21:58 jnthn 'night, lizmat
21:59 skids joined #perl6
22:07 synopsebot6 joined #perl6
22:25 zpmorgan joined #perl6
22:27 synopsebot6 joined #perl6
22:43 _dolmen_ joined #perl6
22:44 ugexe m: my @a = 1,2,3,4; for @a.kv -> $x, $y { @a[$x]:delete; say @a.elems }; # bad yes, but is the behavior still expected?
22:44 camelia rakudo-moar e401ee: OUTPUT«4␤4␤4␤0␤»
22:47 jnthn ugexe: It's certainly very deliberately being done in DELETE-POS
22:47 synopsebot6 joined #perl6
22:48 jnthn So, at the very least it's not an accident.
22:48 ugexe is it to prevent destructive iteration?
22:49 Hotkeys what else needs being done in Lingua::*
22:49 Hotkeys hmm
22:50 jnthn ugexe: 'fraid I don't know the history of this behavior.
22:51 maybekoo5 joined #perl6
22:51 jnthn But it seems at some point it's been deliberately made to make the array shorten if elements are deleted at the end, and to collapse all deleted ones
22:52 jnthn (So it seems orthogonal to iteration)
22:56 TEttinger joined #perl6
22:58 AlexDaniel m: my @a = 1,2,3,4; for @a.kv -> $x, $y { @a[$_]:delete for ^3; say @a.elems }
22:58 camelia rakudo-moar e401ee: OUTPUT«4␤4␤4␤4␤»
22:59 AlexDaniel m: my @a = 1,2,3,4; for @a.kv -> $x, $y { @a[$_]:delete for ^4; say @a.elems }
22:59 camelia rakudo-moar e401ee: OUTPUT«0␤»
22:59 AlexDaniel O_o
22:59 AlexDaniel jnthn: ↑ is there any excuse for that? :)
23:00 jnthn AlexDaniel: I just explained the semantics, and said it's intentional.
23:01 AlexDaniel jnthn: except that it does not happen at the end?
23:01 AlexDaniel perhaps I'm missing something?
23:02 jnthn Covered in roast here: https://github.com/perl6/roast/bl​ob/master/S32-array/delete.t#L18
23:04 AlexDaniel oh, so when you delete something from the end then it actually shortens during the loop
23:04 AlexDaniel but when you delete something from the middle then it doesn't…
23:05 jnthn Right
23:06 zacts joined #perl6
23:06 AlexDaniel ugexe: personally I'd just hope that I'll never see that in real code
23:07 synopsebot6 joined #perl6
23:07 jnthn I struggle to recall a case where I modified soemthing I was iterating over and didn't end up regretting it later...
23:08 AlexDaniel <-> is probably OK though
23:08 dalek rakudo-star-daily: 5dea8a2 | coke++ | log/ (9 files):
23:08 dalek rakudo-star-daily: today (automated commit)
23:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/5dea8a2bdc
23:09 jnthn Oh, I meant the array itself rather than its items
23:10 kurahaupo joined #perl6
23:10 AlexDaniel m: my @a = 1,2,3,4; for @a <-> $x { $x = Any }; say @a
23:10 camelia rakudo-moar e401ee: OUTPUT«[(Any) (Any) (Any) (Any)]␤»
23:10 AlexDaniel m: my @a = 1,2,3,4; for @a <-> $x { $x = Empty }; say @a
23:10 camelia rakudo-moar e401ee: OUTPUT«[() () () ()]␤»
23:10 RabidGravy HotKeys, I'd go some pluralisation, singularisation thing - I got a couple hacks around that in some code
23:12 Hotkeys RabidGravy: sounds reasonable
23:15 kurahaupo_ joined #perl6
23:16 RabidGravy it's useful in inference type things
23:17 RabidGravy avyway dunhackin, toodles
23:17 timotimo hmm
23:21 skids joined #perl6
23:21 timotimo jnthn: on my laptop (so not comparable to the numbers i posted yesterday), turning the FSA back on gets me from between 11.5 FPS and 14.5 FPS up to 15 FPS to 22 FPS
23:22 jnthn :)
23:23 timotimo i'm going to turn this into a SDL-less thing so i can benchmark it a bit and compare CArray with IntTypedArray and Buf, i think
23:26 * jnthn was hacking on a spaced repetition module, but gets tired and decides to rest :)
23:27 jnthn 'night, #perl6
23:27 timotimo neat. supermemo 2 algorithm?
23:27 synopsebot6 joined #perl6
23:28 jnthn timotimo: Hm, should check how close it is to that. Am more aware of it from the Pimsleur language lessons.
23:29 timotimo oh, OK
23:29 pmqs joined #perl6
23:32 jnthn But yeah, want something that as I come across new words, I can toss them into it, then every so often spend some time learning. But also to hack up some support for declension/conjugation awareness too.
23:33 jnthn Suspect it'll end up a mix of useful module(s) I can share and total hacks that serve my own needs. :)
23:35 jnthn Really sleepz &
23:36 dalek ecosystem: 848e46f | (David Brunton)++ | META.list:
23:36 dalek ecosystem: Add Automata::Cellular
23:36 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/848e46f8fd
23:36 dalek ecosystem: 8765749 | jnthn++ | META.list:
23:36 dalek ecosystem: Merge pull request #157 from dbrunton/patch-1
23:36 dalek ecosystem:
23:36 dalek ecosystem: Add Automata::Cellular
23:36 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/87657491be
23:36 kurahaupo joined #perl6
23:47 synopsebot6 joined #perl6
23:53 Redfoxmoon left #perl6

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

Perl 6 | Reference Documentation | Rakudo