Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-09

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:02 rudi_s Hi. Is there a reason why there's no int/uint type for nativecall but a long/ulong type? - What type should I use when a function uses a (unsigned) int value?
00:02 cpage_ joined #perl6
00:02 rudi_s (Oh and is there a way to speed-up the nativecalls, they are really slow on my system.)
00:03 skids rudi_s: some amount of unsigned support is not yet implemented, is why.
00:03 jack_rabbit joined #perl6
00:04 skids It's apparently quite a bit of work to do it right.
00:04 rudi_s skids: Ok, thanks. I was just confused to see int32 to be recommended for int in the docs.
00:05 skids Yeah that has irked me a bit, too.
00:07 timotimo skids: you're basing your message on outdated information
00:07 timotimo we have much more signed/unsigned support than we used to
00:07 timotimo and signed/unsigned works properly in nativecall i think
00:07 skids Oh I know it was improved but still there are places.
00:08 rudi_s timotimo: Is there support for int? Or unsigned int?
00:08 timotimo i think "int" and "unsigned int" are too platform-dependent?
00:09 timotimo in any vase, all the variants that end in numbers exist
00:09 timotimo down to a single byte
00:09 rudi_s Yeah, they are platform-dependent. That's exactly why they would be nice to have ;-)
00:10 agent008 joined #perl6
00:11 timotimo you can always have them as constant and defined "properly" with a BEGIN block
00:11 timotimo i wonder why "long" isn't the right thing for you
00:11 rudi_s timotimo: I know. - Because int != long.
00:12 rudi_s When the C header declares int, then I'd like to use whatever is int on that system.
00:13 timotimo just bail out at BEGIN time when you detecd a 32bit system :P
00:13 skids rudi_s: they are not just platform dependent they may be compiler-dependent on the same platform (not a situation seen often though.)
00:13 rudi_s timotimo: ;-)
00:13 rudi_s skids: True.
00:13 timotimo i wonder what happens when we "is ctype('int')"
00:15 skids I recall reading that modern CPUs don't really have much of a "most efficient" int size, but I don't remember where.
00:15 rudi_s (Oh and is there a way to speed-up the nativecalls, they are really slow on my system.)
00:15 timotimo sadly, no. they have a significant overhead due to the way we (don't) code-gen them (at all) at the moment
00:16 timotimo we just very recently got a piece of infrastructure that may allow us to code-gen per-function code rather than having one piece of code handle all possible cases
00:16 timotimo like, on every call to a native function, we basically re-handle what number of arguments we have again
00:16 timotimo and our dynamic optimizer (aka spesh) doesn't even turn on for those calls at all whatsoever
00:17 tweakism joined #perl6
00:17 timotimo and it uses slurpy arguments, which is not very good, as the number of arguments is fixed as soon as we "configure" the native callsite anyway
00:17 timotimo in any case, this year we'll see either a super good speed-up of how it's done currently, or a rewrite
00:18 timotimo and when that rewrite comes, we'll be jitting calls to native functions the exact same way a C compiler would
00:18 timotimo can't get much faster than that, except by grabbing the extra code gcc and friends put into the .so file for inlining; though i think those don't end up in .so files, only in .o files?
00:19 rudi_s timotimo: Thanks for the explanation. At the moment I'm mostly concerned with the long startup time if a nativecall is used. It takes a few extra seconds but when it starts running the performance is ok (for my needs).
00:20 timotimo oh
00:20 timotimo can you tell if it's pre-compiling at all?
00:21 timotimo i.e. by looking at what --stagestats spits out?
00:23 rudi_s timotimo: Ah, it gets much faster on the second run (14s vs. 2s).
00:24 rudi_s When does it get recompiled? When the source file with the nativecall is modified or if any file is modified?
00:25 rudi_s AH, seems to happen only if the nativecall file is modified. That's good.
00:25 timotimo yup
00:25 rudi_s Still takes quite a long time.
00:25 rudi_s But much faster than in previous perl6 releases.
00:25 rudi_s \o/
00:26 bpmedley joined #perl6
00:27 TEttinger joined #perl6
00:27 timotimo oh yes
00:28 timotimo i'm not entirely sure why compiling native-call-containing source files; how many native calls are in that file?
00:29 johndau joined #perl6
00:30 rudi_s timotimo: 20
00:30 timotimo hmm
00:30 rudi_s First run takes 7s (stage parse), second still 1.5 (stage parse) - not doing anything just parsing the file.
00:34 timotimo yeah, stage parse includes time spent in "use"
00:36 timotimo and it's "inclusive time" of course
00:41 yeahnoob joined #perl6
00:49 NickyPerlPerl joined #perl6
00:49 idiosyncrat_ joined #perl6
00:50 NickyPerlPerl NickyP rockin da chat
00:52 rudi_s I'd like to extend the Test module to skip functions which are declared with is-hidden-from-backtrace so that if a test fails the location is the call site of the function and not inside the function itself. This would be useful when moving tests to a helper function and you'd like to know which call to that function failed. What do you think?
01:02 Actualeyes joined #perl6
01:03 BenGoldberg joined #perl6
01:10 cajone joined #perl6
01:17 cpage_ joined #perl6
01:19 kent\n joined #perl6
01:19 kent\n joined #perl6
01:20 keix joined #perl6
01:29 dalek perl6-most-wanted: d3a1158 | (Aleks-Daniel Jakimenko-Aleksejev)++ | most-wanted/bindings.md:
01:29 dalek perl6-most-wanted: Added spidev
01:29 dalek perl6-most-wanted:
01:29 dalek perl6-most-wanted: spidev is required if you want to use SPI on RPi or any other linux board
01:29 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/d3a1158cce
01:33 cdg joined #perl6
01:41 zpmorgan joined #perl6
01:44 rudi_s my $r = /(.)(.)/;
01:44 rudi_s for <ab bc cd> { if $_ ~~ $r { say "$0 $1" } }
01:44 rudi_s Yields Use of Nil in string context  in block  at <unknown file> line 1
01:44 rudi_s Use of Nil in string context  in block  at <unknown file> line 1
01:45 rudi_s What am I doing wrong?
01:45 rudi_s (It works when I put my $r = and the for in the same line in an interactive perl6.)
01:50 skids That is kinda weird.
01:51 skids looks like $/ is not set at all.  The ~~ is true, but $/ is Nil.
01:52 skids $r.ACCEPTS("aa").say is a correct Match object.
01:54 skids In fact, $r.ACCEPTS("aa") sets $/.  Which... I don't know if that should happen or not.
01:55 skids rudi_s: I don't think you're doing anything wrong, I think this is a bug.
01:57 rudi_s skids: Should I report it?
01:59 skids Seems like there is a similar one already: #126969
01:59 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126969
02:00 skids I'll add a link to this IRC to that. rudi_s++
02:00 Hotkeys is there a way to check what a module exports
02:01 Hotkeys from a repl or what have  you
02:01 rudi_s skids: Thanks.
02:08 skids Hotkeys: without using it?
02:11 FROGGS_ joined #perl6
02:15 kalkin-- joined #perl6
02:16 Hotkeys skids: with using it is fine
02:16 Hotkeys is there a how method that tells you
02:16 Hotkeys exported subs etc
02:16 skids m: use Test; Test::EXPORT::DEFAULT.WHO.keys.say
02:16 camelia rakudo-moar 4a0ba7: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
02:17 Hotkeys Ah
02:17 skids I think that's a complete list of default imports.  But not sure, if there's a custom EXPORT runtime method what happens.
02:17 Hotkeys I've got a sub is export
02:18 Hotkeys but when I try to use it
02:18 Hotkeys it says could not find symbol
02:19 skids Sure it is defined in the namespace you think it is?
02:20 * skids still doesn't quit grok "WHO", will have to remember to read up on it sometime.
02:22 Hotkeys I figured it out
02:28 skids m: use MONKEY-SEE-NO-EVAL; for 1..10 { EVAL "say " ~ ("now - now" xx $_).join(" + ") }
02:28 camelia rakudo-moar 4a0ba7: OUTPUT«-0.0016216␤-0.0006095106642␤-0.001458048730488646␤-0.001965␤-0.0018248782␤Type check failed in assignment to $!tai; expected Rat but got Num (1457490532.69017e0)␤  in block <unit> at EVAL_5 line 1␤  in block <unit> at /tmp/afIh5kYqbz line 1…»
02:28 skids .oO(camelia is running on a pretty fast machine)
02:29 skids Or, wait I'm just way behind in patches probably.
02:33 vendethiel joined #perl6
02:33 john51 joined #perl6
02:36 [particle] joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
03:23 sortiz joined #perl6
03:24 sevvie joined #perl6
03:25 sortiz \o #perl6
03:26 Hotkeys o7
03:32 Actualeyes left #perl6
03:36 adu joined #perl6
03:44 BenGoldberg joined #perl6
03:44 noganex joined #perl6
03:57 sevvie (o,o)^
03:57 adu hi
04:09 BenGoldberg So I've been thinking... with the DBIish, how valueable (crazy?) would it be, to create a DBDish backend which makes use of Inline::Perl5, and loads an arbitrary perl5 DBD:: module... and then, have that as fallback for when a user tries to use a database type which we don't yet have a backend for?
04:23 sortiz BenGoldberg, It's an interesting idea, I recommend creating a new RFC issue to be discussed.
04:29 wamba joined #perl6
04:29 jack_rabbit joined #perl6
04:40 telex joined #perl6
04:40 cpage_ joined #perl6
04:47 [Sno] joined #perl6
04:47 yeahnoob joined #perl6
04:48 tmch joined #perl6
04:49 Actualeyes joined #perl6
04:52 xiaomiao joined #perl6
04:52 Gothmog_ joined #perl6
04:53 hacst joined #perl6
04:53 chris2 joined #perl6
04:59 tweakism is AlexDaniel a regular here?
05:00 tweakism found him discussing the thing I'm trying to figure out in a log of here, via google.
05:00 sortiz .seen AlexDaniel
05:00 yoleaux I saw AlexDaniel 8 Mar 2016 00:54Z in #perl6: <AlexDaniel> hoelzro: it seems like you didn't provide any links to produced stats. Was it intended?
05:01 tweakism yay, there is hope.
05:03 tweakism if you're curious, I'm trying to figure out how to properly assign <dead_greek> to e.g. AltGr+g
05:04 sortiz tweakism, You can leave him a message with .tell AlexDaniel ...
05:04 tweakism thanks.
05:23 sortiz m: use Bench;
05:23 camelia rakudo-moar 4a0ba7: OUTPUT«===SORRY!===␤Could not find Bench in:␤    /home/camelia/.perl6/2016.02-100-g4a0ba74␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUn…»
05:29 Gabriel_Hu joined #perl6
05:29 TEttinger tweakism: <dead_greek> ? is that like dead sea scrolls?
05:30 tweakism heh.  it's a key you press, and it makes the next key you press be a greek letter
05:32 tweakism so like, AltGr+g a → α   AltGr+D → Δ
05:33 tweakism a lot of non-US keyboards use deadkeys for diacritics... like, pressing ' follows by a does á, and if you want a normal ' you have to type '' or something.
05:38 Cabanossi joined #perl6
05:39 TEttinger ah ok
05:39 TEttinger I have an alt_gr key but I haven't done anything to set it up
05:39 TEttinger err, AltGr
05:40 tweakism it does some stuff by default
05:40 tweakism Compose is a lot cooler and easier and more useful
05:40 TEttinger I think I have a US keyboard layout
05:41 TEttinger windows 7
05:41 tweakism oh, ouch
05:41 tweakism well there's WinCompose
05:41 TEttinger I think I can change the layout
05:41 tweakism I use that on Windows. couldn't survive w/o it.
05:43 TEttinger thanks, installing
05:46 Hotkeys WinCompose is pretty dope
05:52 tweakism TEttinger: the real fun comes from adding custom symbols.  the defaults are pretty dusty if you ask me.
05:52 tweakism there are lots of good resources for that shared on github.
05:53 TEttinger hm, it doesn't seem to recognize any modifier keys
05:53 tweakism the awesome-factor is that you can generally just guess the correct sequence for whatever char... Compose < 3 → ♥    Compose ' a → á    Compose : ) → ☺    Compose / = → ≠
05:56 Hotkeys yeah
05:56 Hotkeys and you can use the same XCompose on both linux and windows
05:57 TEttinger ok, it recognizes left ctrl, but I actually use that as ctrl...
05:58 tweakism I have used caps lock and menu and maybe r_win before
05:58 tweakism it should work with any of the keys it lets you set
05:58 tweakism you may need to run-as-admin though; it's built on top of autohotkey lib
05:58 Hotkeys I currently use caps lock but
05:58 Hotkeys sometimes it passes through
05:58 Hotkeys and I have to fiddle to get caps off again
05:59 tweakism hrm, I have no had that problem.  but it is smart to enable the both-shift-keys-toggles-capslock just so you can turn it off if it does it stuck on (sometimes games make that happen to me)
06:00 Hotkeys that doesn't actually do proper caps iirc
06:00 Hotkeys it's like sticky keys
06:01 Hotkeys it simulates you holding shift
06:04 TEttinger gah
06:05 TEttinger I have no idea how non-US keyboards work. this US-international setting seems to treat the caret, shift-6, as something special
06:05 TEttinger oh, all diacritics
06:06 jdv79 i just tried to squeeze into my only suit pants i bought a decade ago and it aint happenin.
06:06 jdv79 that's what beer does.
06:07 jdv79 most of that beer was amazing btw.
06:09 kent\n joined #perl6
06:09 TEttinger joined #perl6
06:33 k-man joined #perl6
06:35 Hotkeys oh btw TEttinger with compose
06:35 Hotkeys you don't hold the key
06:35 Hotkeys I didn't realize that at first
06:45 CIAvash joined #perl6
06:47 tweakism TEttinger: yup, they're dead keys :)
06:47 tweakism which, Compose is also a dead key
06:47 tweakism a dead key is a key that you press and release, and it doesn't do anything immediately; it modifies whatever you press later
06:48 tweakism Hotkeys: I think WinCompose does let you toggle real capslock that way.  you can probably choose whether you want capslock or shiftlock though.
06:49 tweakism but, no one really ever uses capslock.  it's just about having a way to turn it off in case it ever does happen to get turned on.
06:49 Hotkeys yeah
06:50 Hotkeys I can pretty consistently toggle caps by hitting shift caps at the same time
06:52 TEttinger ah, thanks Hotkeys
07:03 sortiz .tell timotimo Worries me that 'CArray[uint8].new($buf)' for a $buf of size 1000, passed from 354.0723/s (n=1000) on 2015-12 to 11.2342/s (n=1000) on nom, seems MoarVM related, details in https://gist.github.com/salortiz/6e2cb6607ae1387e3e13
07:03 yoleaux sortiz: I'll pass your message to timotimo.
07:06 tweakism .tell AlexDaniel Google told me you may figured this out: I'm trying to add <dead_greek> to AltGr+g; maybe we can chat about it later.
07:06 yoleaux tweakism: I'll pass your message to AlexDaniel.
07:14 labster joined #perl6
07:15 sortiz boys and girls, see you later.
07:15 Humbedooh joined #perl6
07:17 FROGGS joined #perl6
07:18 FROGGS moritz: ping
07:18 [ptc]_ joined #perl6
07:24 sjoshi joined #perl6
07:25 FROGGS moritz / masak: my flight is delayed... I should still be 1 hour ahead of time at the venue, but if I dont, dont hesitate to switch our talks
07:25 domidumont joined #perl6
07:25 Actualeyes left #perl6
07:25 FROGGS moritz / masak: it is damn foggy here and I dunno what happens next
07:26 gorgor joined #perl6
07:27 xinming_ joined #perl6
07:30 domidumont joined #perl6
07:37 nakiro joined #perl6
07:45 firstdayonthejob joined #perl6
07:48 [Tux] OOPS!
07:48 [Tux] test            22.454
07:48 [Tux] test-t          13.366
07:48 [Tux] csv-parser      52.316
07:49 labster joined #perl6
07:51 jack_rabbit joined #perl6
07:55 fireartist joined #perl6
07:56 darutoko joined #perl6
08:02 rindolf joined #perl6
08:15 masak hi #perl6 from GPW
08:16 tweakism Good $greetingtime, $username!
08:18 masak how generic :)
08:18 masak though I guess I should be thankful the "Good" wasn't abstracted :P
08:18 masak or the cheerful exclamation mark at the end
08:19 tweakism heh, I used to play an MMO, and one day I added a bot that would say 'hi' to every guildie that came online in guild chat
08:19 tweakism except it would wait a random amount of time first, and it had a large repetoire of ways to say it
08:19 tweakism so it seemed realistic
08:20 tweakism people really started to worry about me and thought I'd taken up a cocaine habit or something
08:20 arnsholt =D
08:20 abraxxa joined #perl6
08:20 masak tweakism: I understood everything except that last inferential step
08:21 tweakism masak: 'cause from their point of view, I'd been obsessively staring at my PC for 24+ hours, enthusiastically greeting each and every person that came by.
08:21 masak a-ha :)
08:21 masak oh, that's what I was missing -- that from the outside, you and the bot looked like the same user
08:22 masak FROGGS: I'm 100% OK with switching. if by the time your slot rolls around you haven't shown, I will do my talk.
08:22 tweakism oh, yes, sorry.
08:23 tweakism unlike an IRC bot
08:24 _nadim good morning all
08:25 _nadim timotimo: I may know why we spend time in the code that does the sig lookup. I call "has_method" on every entry and even "can" sometimes
08:26 _nadim I could cach the calls but I wonder if that would make any change
08:29 rindolf joined #perl6
08:36 zakharyas joined #perl6
08:37 dakkar joined #perl6
08:39 Hotkeys tweakism: that could easily be done with an irc bot though
08:39 Hotkeys just use a bouncer
08:41 tweakism sure
08:42 tweakism just usually isn't, I wasn't thinking you wouldn't realize that's how such a bot would necessarily work in that env
08:45 [Sno] joined #perl6
08:50 Laurent_R joined #perl6
08:52 kurahaupo joined #perl6
09:24 ocbtec joined #perl6
09:25 pmurias joined #perl6
09:25 dalek nqp: cc3b913 | (Pawel Murias)++ | src/vm/js/Operations.nqp:
09:25 dalek nqp: [js] Fix typo.
09:25 dalek nqp: review: https://github.com/perl6/nqp/commit/cc3b91362a
09:32 kjs_ joined #perl6
09:36 _nadim a question about the optimization of code. if a method has an empty body, is there any cost associated with calling it or is it a nop?
09:42 timotimo that still depends on multiple factors
09:42 yoleaux 07:03Z <sortiz> timotimo: Worries me that 'CArray[uint8].new($buf)' for a $buf of size 1000, passed from 354.0723/s (n=1000) on 2015-12 to 11.2342/s (n=1000) on nom, seems MoarVM related, details in https://gist.github.com/salortiz/6e2cb6607ae1387e3e13
09:42 timotimo _nadim: like, is the signature complicated? is it a multi method? can we figure out that this method is the one that will be called most of the time? (like, via spesh)
09:43 timotimo if the method gets inlined, it'll be pretty cheap, but i don't think an empty method will currently ever become a total no-op in cost
09:43 jnthn Yeah, we're not yet smart enough to make it cost zero, but it's still likely to be cheaper than a .can(...) check post-inline.
09:44 timotimo ohai jnthn :)
09:44 RabidGravy joined #perl6
09:45 _nadim complicatd signature but empty bosy
09:45 jnthn _nadim: Then depends on what kind of complicated. :)
09:46 timotimo sortiz found out we've regressed between 20x and 30x when creating a CArray from a Buf; from 2015.12 to now. in this code case it's a Buf.new (so int8) to a CArray[uint8]; i wonder if it's about signed vs unsigned at all? though i think since we are (or should be) using nqp::splice, that shouldn't matter?
09:46 _nadim method filter_header(\s_replacement, $s, ($glyph, @renderings), (\k, \b, \v, \f, \final, \want_address))
09:46 jnthn timotimo: I think Buf is unsigned anyway?
09:46 jnthn _nadim: Yeah, the sub-signature will blow it up
09:47 timotimo we don't lower sub-signatures at all yet, right?
09:47 _nadim then I'll stick with an extra if :)
09:47 jnthn timotimo: Correct
09:47 timotimo it would potentially be not terribly hard to do
09:47 jnthn Even when we do, I suspect the code size produced by those unpacks will push things over the inline limit
09:48 timotimo that's the static inline limit, yeah?
09:48 jnthn Yeah
09:48 timotimo OK
09:48 jnthn Well, depends what you mean
09:49 jnthn The number that spesh inline looks at to say "is the bytecode too big"
09:49 _nadim the use case I had in mind was when te subs get mixed in via roles. the "default" role would do nothing, and thus I'd like that optimized away.
09:50 timotimo well, we also have one for Perl6::Optimizer.nqp, or rather, the one in Actions for "make_inline_data" or what it's called
09:51 jnthn timotimo: But that never applies to methods
09:51 timotimo ah
09:51 timotimo OK, that shouldn't surprise me at all :)
09:51 jnthn timotimo: Plus I think I'm going to make it only do it for subs with native args
09:51 _nadim and in the method above, that would mean, I hoped, not handling any of the arguments.
09:51 jnthn _nadim: Yeah, but you're basically using signatures there to describe a set of checks on the shape of the passed data structure
09:52 jnthn _nadim: Which will die if the shape doesn't match
09:52 jnthn So we can't just go eliding it
09:52 jnthn In Perl 5 terms you'd probably have a few lines of code replacing that signature
09:52 jnthn Maybe 5-6
09:55 * DrForr pricks up his ears at the mention of signatures. Though the signature nadim is talking about is more complex than what I'm fiddling with.
09:55 _nadim jnthn: well, I didn't even dream bout not making the signature match, simply that a metod without any content, but with the same signature, would render the call a nop. Or rather not be called and returning nothing, as the return values may be used.
09:56 jnthn _nadim: Well, if you don't care about that then just rewrite the signature to ($, $, $, $) or so? :)
09:56 timotimo that'll be dirt cheap
09:57 sjoshi joined #perl6
09:58 _nadim jnthn: yeah right ! :)
09:58 timotimo (if it's not dirt cheap, we can look into this particular case and make it better)
09:58 _nadim Nah! I like complex signatures, makemy life easier
09:59 _nadim os there some kind of Time::HiRes to time pieces of code?
09:59 _nadim is there
09:59 timotimo well, "now" is already rather hi-res
10:00 _nadim ok
10:00 timotimo m: sub timethis { (1 xx 1000).list; say now - ENTER now }; timethis; timethis;
10:00 camelia rakudo-moar 4a0ba7: OUTPUT«0.00204415␤0.0002870␤»
10:00 timotimo i suppose .list is rather a no-op yet
10:00 timotimo in this case
10:01 timotimo m: sub timethis { my @a = (1 xx 1000); @a.pop; say now - ENTER now }; timethis; timethis;
10:01 camelia rakudo-moar 4a0ba7: OUTPUT«0.0030418␤0.0006683␤»
10:01 _nadim timotimo: damn you, I've spending timeoptimizing when I should have been working on something else. My guess, thus why I asked about time::Hires, is that it is now 20% faster than the fast version.
10:01 timotimo no, it's just somewhat fast
10:01 timotimo sorry :S
10:01 _nadim I'll find something you write too slow and toture you with it!
10:02 timotimo what exactly is faster than what "fast version"? this is still about Data::Dump::Tree?
10:03 _nadim Yes it is. the fast version was the one without the speed "bug", IE 2 secs rather than 42 secs. the faster faster is the new one, on my machine.
10:03 timotimo oh, wow
10:03 timotimo that's good to know
10:03 timotimo i'm really glad to hear you were able to make it faster :)
10:04 _nadim well, it was faster I just botched it like an idiot ;)
10:04 timotimo was the speed bug when you were eq-ing to "Mu"?
10:04 timotimo i *think* you wouldn't even ever match "Mu"; maybe "(Mu)", though
10:05 _nadim yes, it's so stupid that I have no excuse, I used .perl to find out if it was Mu, that's why all hall got lose.
10:05 _nadim Yes I Mus when I dump callframes
10:06 _nadim writing a dumper is fun, you always get stuff you don't want
10:06 timotimo yeah, i suppose :)
10:07 _nadim Anyway, .gist doesn't cut it for me, anything a bit big and complex and it is unreadable.
10:07 timotimo aye
10:07 timotimo DDT is helpful
10:07 _nadim I need something that can show me a quarter million lines dump without making me crazy
10:07 fireartist joined #perl6
10:08 _nadim timotimo: IMVHO, it is good enough to replace "displaying" data for the end user, I use it (well the P5 version), a lot for that.
10:09 _nadim a DHTML version with collapsing is also helpful.
10:09 timotimo i want something like that for QAST dumps
10:10 _nadim QAST? where do you get one as a perl data structure?
10:11 timotimo in nqp-land :P
10:11 _nadim well, can it be parsed to P5 or P6?
10:12 timotimo the output is disgusting, you don't want to parse that
10:12 _nadim can it be output in XLM, JSON, or whatnot?
10:12 timotimo my plan was to turn the output into a json format
10:13 timotimo or rather, offer that in addition
10:13 timotimo you can see an example by giving your perl6 a --target=ast or --target=optimize
10:13 _nadim then DDT can help, get onto it ;)
10:14 _nadim P5 Data::TreeDumper does DHTML, DDT has the hooks, I just am too lazy right now, need someone with the need, andas long as I don't start on my build system, I need someone else with a need.
10:14 timotimo mhm
10:14 dalek nqp: 8f82c9a | (Pawel Murias)++ | src/vm/js/ (2 files):
10:14 dalek nqp: [js] Implement nqp::{sinh,cosh,tanh,atan2,sec,asec,sech}_n ops.
10:14 dalek nqp: review: https://github.com/perl6/nqp/commit/8f82c9a793
10:14 dalek nqp: 75192d6 | (Pawel Murias)++ | t/nqp/83-math.t:
10:14 dalek nqp: Test a bunch of trygonometric ops.
10:14 dalek nqp: review: https://github.com/perl6/nqp/commit/75192d652f
10:15 timotimo one thing i desire most is to be able to turn on/off the :BY and :context and stuff output
10:15 timotimo it really distracts me, and i don't even know what the individual parts mean :P
10:15 _nadim timotimo: Sub object coerced to string (please use .gist or .perl to do that)  in any dump_node_list at gen/moar/stage2/QASTNode.nqp line 81
10:16 _nadim well, output typed JSON and you can use DDT filters to get only what you want
10:18 timotimo that does sound nice
10:18 timotimo maybe i'd also want to test DDT against the json output our profiler can spit out
10:18 timotimo for performance reasons, maybe it'd have to be the perl5 version if it's for a multi-hundred-megabyte file, though
10:21 _nadim I'd say so yes :) but I'd take oone of those files for test. you can also cut the Json parse time if you output P5 or P6.
10:21 timotimo how hard is it to tell DDT to use JSON::Fast instead of JSON::Tiny?
10:22 FROGGS joined #perl6
10:23 _nadim DDT knows P6 only. my $parsed = JSON::Tiny::Grammar.parse($JSON) ; dump($parsed)
10:23 timotimo why would you go via the Grammar?
10:23 _nadim so, very easy
10:23 RabidGravy I've just done a quick survey, I appear to have 12 modules in various degrees of "in progress"
10:24 sjoshi joined #perl6
10:24 _nadim RabidGravy: that's more a symptom IMO ;)
10:24 _nadim timotimo: hmm, why did I use the grammar, hmmm, don't know :)
10:25 _nadim timotimo: well, I wanted the Match objects to display, not a P6 structure
10:26 timotimo the annoying thing about the match objects is that it has the "orig" thing everywhere
10:27 _nadim that a 5 lines handler to write for DDT and orig is gone
10:29 _nadim well, I am telling a lie. orig is not displayed by DDT just the matching part
10:29 timotimo well, that's a bit better, i suppose
10:30 timotimo but for the root node, that's still the whole source text :)
10:30 _nadim IE:
10:30 _nadim └string => "'\"markup\"' [524..532| "·ᴹᵃᵗᶜʰ ᶝ⁹⁷
10:30 _nadim └str => "'markup' [525..531| "·ᴹᵃᵗᶜʰ ᶝ⁹⁸
10:32 _nadim timotimo: that can be fixed with a filter or you can write the 5 line handler and just display the first x characters
10:35 _nadim timotimo: in both versions, P5 and P6, you can morph whatever you want to dump to something else. in example/all.pl there is an example where a table, via Text::Table::Simple, is injected into the dump instead for showing an object
10:38 _nadim http://imgur.com/hgQsps6
10:38 timotimo that's cute
10:43 _nadim I'm cute! Not. but sometimes a muti column table makes miracles displaying data. hmm, I need to find a good graphing lib that outputs text.
10:49 labster joined #perl6
10:51 tadzik nine: I'm considering to always "force" module installation in panda
10:51 tadzik I don't think there is a single case where someone is happy to see "module already installed"
10:51 [particle] joined #perl6
10:51 tadzik they waited 5 minutes, and at that point even if it is already installed they either outright mean for it to be updated, or don't care if it does
10:52 tweakism haha
10:53 kurahaupo joined #perl6
10:54 timotimo tadzik: if we don't apply a little bit of pain we won't get people to turn up the module versions on their projects when they change stuff
10:54 tadzik we don't anyway. They're not the ones who get hurt by this
10:54 timotimo users will complain to them, hopefully, and make them remember? maybe?
10:55 tweakism who cares cares what users think?  pff.
10:56 tadzik I feel like a much more elegant solution would be to bail out before even downloading anything and say "module XXX is already in the newest version"
10:56 timotimo mhm
11:01 espadrine_ joined #perl6
11:04 zakharyas joined #perl6
11:04 rindolf joined #perl6
11:14 musiKk_ joined #perl6
11:14 edehont joined #perl6
11:20 virtualsue joined #perl6
11:23 jnthn m: Uni.new(0xfacf).Str
11:23 camelia rakudo-moar 4a0ba7: ( no output )
11:23 jnthn m: say "\xfacf"
11:23 camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
11:24 jnthn hmm
11:24 jnthn m: Uni.new(0xfacf).NFC
11:24 camelia rakudo-moar 4a0ba7: ( no output )
11:24 jnthn m: Uni.new(0xfacf).NFC.Str
11:24 camelia rakudo-moar 4a0ba7: ( no output )
11:24 jnthn m: "\xfacf"
11:24 camelia rakudo-moar 4a0ba7: OUTPUT«WARNINGS for /tmp/J3EGjTKa3k:␤Useless use of constant string "𢡊" in sink context (line 1)␤»
11:24 jnthn m: my $a = "\xfacf"
11:24 camelia rakudo-moar 4a0ba7: ( no output )
11:25 timotimo that's the one where we go through some replacement mechanism into an uninitialized (or something) plane?
11:26 jnthn Yeah, which I fixed locally, then realized that a "say" makes for a crappy test, and expected all of the above might explode also
11:26 timotimo ah
11:26 timotimo sort of amusing it's only the say
11:26 timotimo of well
11:26 jnthn (Fix was just correcting a dumb thinko)
11:26 timotimo that's good :)
11:27 jnthn m: my $a = "\xfacf"; say $a
11:27 camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
11:27 timotimo dumb thinkos are only easy to find if you know what the code's supposed to be in the first place :D
11:27 jnthn m: "\xfacf".encode('utf-8')
11:27 camelia rakudo-moar 4a0ba7: ( no output )
11:28 timotimo since you're already in the unicode and encoding area of things, is utf8-c8 next?
11:28 jnthn aha!
11:29 jnthn m: "\xfacf" ~ "\n"
11:29 camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
11:29 jnthn That's it.
11:29 timotimo oh, flushing the encoder?
11:29 jnthn That'll teach me to read stack traces proper..
11:30 shlomif joined #perl6
11:30 jnthn I've got 3 other RTs fixed this morning too; about to do a spectest run for all 4 before pushing :)
11:31 timotimo neat
11:31 jnthn Mighta got their yesterday, but developed a nasty headache
11:31 jnthn Got a bad feeling it may return at any moment today too :/
11:31 timotimo ugh, i'm wishing you the best of luck!
11:31 jnthn So decided to schedule Perl 6 things first today.
11:34 nine tadzik: I'd much rather work on properly detecting that the dist is already installed before making the user wait for 5 minutes. Then having to add --force is no longer as bad.
11:42 pmurias why does installing a module take 5 minutes?
11:44 * jnthn has surprising trouble finding where the spectests for concatenation are
11:45 * jnthn sticks the new ones in the NFG concat tests
11:47 jnthn m: use Test; is "\xfacf" ~ "\n", "\xfacf\n", '\xfacf ~ \n is ok';
11:47 camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
11:48 dalek rakudo/nom: d2e31e8 | jnthn++ | src/Perl6/World.nqp:
11:48 dalek rakudo/nom: Mark `is rw` generated methods with rw flag.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2e31e8150
11:48 dalek rakudo/nom: fac3d74 | jnthn++ | src/Perl6/Metamodel/ (2 files):
11:48 dalek rakudo/nom: Factor submethod Bool into boolification mode.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fac3d7481a
11:48 dalek rakudo/nom: 6184e15 | jnthn++ | src/core/Channel.pm:
11:48 dalek rakudo/nom: Don't lose exceptions in Channel.Supply.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6184e157e1
11:48 dalek rakudo/nom: eb02dc9 | jnthn++ | src/core/Supply.pm:
11:48 dalek rakudo/nom: Fix passing on of exceptions in Supply.Channel.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eb02dc9f77
11:48 dalek roast: a20b3a4 | jnthn++ | S12-attributes/instance.t:
11:48 dalek roast: Test for RT #127665.
11:48 dalek roast: review: https://github.com/perl6/roast/commit/a20b3a4583
11:48 dalek roast: cf3374d | jnthn++ | S1 (2 files):
11:48 dalek roast: Tests for RT #127660.
11:48 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127665
11:48 dalek roast: review: https://github.com/perl6/roast/commit/cf3374d406
11:48 dalek roast: 23c1c1b | jnthn++ | S17-supply/Channel.t:
11:48 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127660
11:48 dalek roast: Test for RT #127629.
11:48 dalek roast: review: https://github.com/perl6/roast/commit/23c1c1b8ad
11:48 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127629
11:51 RabidGravy jnthn++ # cheers, I can back out the hack from Staticish to work round that
11:52 dalek nqp: b457c03 | jnthn++ | tools/build/MOAR_REVISION:
11:52 dalek nqp: Get MoarVM with Unicode fix, lower memory use.
11:52 dalek nqp: review: https://github.com/perl6/nqp/commit/b457c0359e
11:53 dalek rakudo/nom: e1071b0 | jnthn++ | tools/build/NQP_REVISION:
11:53 dalek rakudo/nom: Bump to get MoarVM with fixes/improvements.
11:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e1071b0552
11:54 llfourn jthn++ bugs--
11:54 dalek roast: a868517 | jnthn++ | S15-nfg/concatenation.t:
11:54 dalek roast: Tests for RT #127530.
11:54 dalek roast: review: https://github.com/perl6/roast/commit/a868517eaf
11:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127530
12:04 pierrot joined #perl6
12:12 kid51 joined #perl6
12:19 awwaiid m: my Int $x where * > 5 # Can I do something to see this full type of $x? $x.WHAT just says Int
12:19 camelia rakudo-moar e1071b: ( no output )
12:19 awwaiid m: my Int $x where * > 5; $x.WHAT.say # Can I do something to see this full type of $x? $x.WHAT just says Int
12:19 camelia rakudo-moar e1071b: OUTPUT«(<anon>)␤»
12:19 awwaiid hmm
12:22 awwaiid haha -- https://doc.perl6.org/language/typesystem summary: "TODO"
12:23 Skarsnik joined #perl6
12:25 LGD_ joined #perl6
12:26 hanekomu_ joined #perl6
12:26 sergot_ joined #perl6
12:27 _notbenh joined #perl6
12:27 pnu joined #perl6
12:27 dalek joined #perl6
12:28 mkz joined #perl6
12:28 ponbiki joined #perl6
12:28 richi235 joined #perl6
12:28 rindolf joined #perl6
12:29 wamba joined #perl6
12:29 RabidGravy awwaiid, if you do a subset you get the name
12:30 RabidGravy m: subset Foo of Int where * > 5; my Foo $a; say $a.WHAT
12:30 camelia rakudo-moar e1071b: OUTPUT«(Foo)␤»
12:30 Cabanossi joined #perl6
12:33 * RabidGravy must stop doing the "oooooh kittens" thing
12:34 RabidGravy so far this morning I've thought about making modules for Elastic Search and RethinkDB
12:37 AlexDaniel joined #perl6
12:37 AlexDaniel tweakism: hi
12:37 yoleaux 8 Mar 2016 03:31Z <hoelzro> AlexDaniel: ах, спасибо! Я всегда забаваю мягкий знак =/
12:37 Skarsnik Hey, look a kitten behind you
12:37 yoleaux 8 Mar 2016 03:33Z <hoelzro> AlexDaniel: I only included stats for single letters to show that my data was consistent with known frequencies; maybe I should've published the rest
12:37 yoleaux 07:06Z <tweakism> AlexDaniel: Google told me you may figured this out: I'm trying to add <dead_greek> to AltGr+g; maybe we can chat about it later.
12:38 jnthn RabidGravy: Heh, I was pondering RethinkDB too, but I should really finish Docker::File first...not to mention Stomp
12:39 jnthn Right now I'm working out why EVAL has the appearance of leaking while not actually leaking in the "we lose track of the memory and don't clean it up at shutdown" sense
12:39 timotimo joined #perl6
12:39 awwaiid m: subset Bar of Int where * > 5; my Bar $a; $a.WHAT.say; $a = 9; $a.WHAT.say
12:39 camelia rakudo-moar e1071b: OUTPUT«(Bar)␤(Int)␤»
12:39 AlexDaniel .tell hoelzro publish the rest! I want to see how well my phonetic-kinda-dvorak layout works with those stats :)
12:39 yoleaux AlexDaniel: I'll pass your message to hoelzro.
12:39 RabidGravy yeah the JS api for rethinkdb would seem to transport quite nicely to P6
12:39 drforr1 joined #perl6
12:40 jnthn RabidGravy: Maybe, but we *really* should expose the live queries as supplies :)
12:40 RabidGravy fersure
12:41 lsm-desktop joined #perl6
12:41 awwaiid jnthn / RabidGravy: I know it's fun to re-implement things, but I'd still love to promote our use Blah:from<stuff> so we can have ALL the ecosystems. I think these service bindings work well for that, especially like ES where it is all just JSON in/out anyway
12:42 AlexDaniel tweakism: I'll be here in, like, 15 minutes :)
12:43 jnthn awwaiid: Well, it's Perl, so we're liable to do both of those. ;-) But yeah, for certain things (especially UI frameworks) then that approach will probably be the best way for a bit.
12:43 jnthn Apparently, lunch time :) bbl
12:44 tmch joined #perl6
12:45 awwaiid jnthn++ # ya!
12:45 RabidGravy all <stuffs> don't exist and even if they do they won't support half the things that Perl 6 can do natively :)
12:46 awwaiid Yeah I know. I just see, not just in Perl 6 but in all languages, many of the same things getting implemented over and over and over.
12:47 RabidGravy well I'll stop making modules then and when I need something I'll just ask you to make a language binder for somewhere it is implemented ? ;-p
12:48 kaare_ joined #perl6
12:48 kalkin-- How do I deploy a Perl6 application? I assume that the target machine has no rakudo/perl6 deps pre installed or the wrong one. I honestly would prefer something go like, which will just drop one executable
12:48 rindolf joined #perl6
12:48 pmurias awwaiid: promoting (and polishing) :from<stuff> would be great, one longer term problem is that using multiple VMs at once is costly
12:49 Woodi hi #perl6 :)
12:50 Woodi kalkin--: it's not typical scripting language usage...
12:50 awwaiid pmurias: for sure. Makes me want a meta-manager (nvm, rvm, ...) or something like Alien:: to bundle/build a self-contained lib(ruby|python|perl5)
12:51 Woodi kalkin--: but such "compilation" is on TODO list (I think...)
12:51 RabidGravy I suggested an Alien:: thing ages ago, ended up in a load of ranting and I forgot about it
12:51 kalkin-- Woodi: well look at ruby and rvm, it's not one executable but at least with enough scripting (aka capistrano) you can have deploys which use your specified ruby & libraries version installed in a subdir of your deployment
12:51 pmurias awwaiid: that wouldn't address the runtime cost
12:52 Woodi kalkin-: yes, you need some "runtime"
12:53 RabidGravy kalkin-, right so you need some tool to do that for you, I don't believe something like that exists at the moment, perfect opportunity for you to make a name for yourself by making one ;-)
12:53 awwaiid pmurias: I'm slowly starting to gather up some things about these concepts at sudo /bin/systemctl daemon-reload
12:53 kalkin- Why I'm asking because both python & ruby are unsuitable for creating a desktop application. You just can't deploy something without a package manager or telling the user to execute random command line stuff.
12:53 awwaiid sudo /bin/systemctl enable elasticsearch.service
12:53 Woodi hmm, CPAN is down... google sometimes is, but CPAN ??  ;)
12:53 awwaiid oops bad paste
12:54 kalkin- RabidGravy: so much todo so little time :)
12:55 kalkin- At the moment the only suitable thing which also supports cross platform (beside C/C++ with QT) is Java + JavaFx, which can create deb/rpm/exe packages by using maven
12:55 awwaiid pmurias: I'm slowly starting to gather up some things about these concepts at https://thelackthereof.org/Module_Level_Polyglot , right now a high-level survey but I hope to document the embedded-language cross module sharing drawbacks like startup time and runtime overhead / invokation cost. So far when doing stuff with Inline::Ruby and Inline::Perl5 many things seem reasonable for performance
12:55 Woodi _nadim++ # DDT
12:56 pmurias awwaiid: the JVM has work on progress on just supporting a whole bunch of dynamic language on it
12:56 RabidGravy it would probably be something like rakudobrew but with some higher level metadata for installing an application and all the depencies
12:56 awwaiid pmurias: yeah true. could be that is the way to go. Also many JS-hosted languages are starting to get cross-language
12:56 psch kalkin-: https://github.com/perl6/nqp/blob/standalone-jar/tools/jvm/one-jar-script.sh is a half-baked, non-integrated way for deploying .jars that contain a complete rakudo interpreter
12:57 psch kalkin-: basically, if you really need it now you can probably get it working with that script (and the comments in there, and other files in that directory) in an afternoons work
12:57 pmurias awwaiid: the GraalVM stuff they are doing is actually implementing the original parrot vision
12:58 kalkin- psch: do not need now, but it's great to know that it's possible.
12:58 Woodi m: my %h = <a b>; say %h.cos(); # WAT
12:58 camelia rakudo-moar e1071b: OUTPUT«0.54030230586814␤»
12:58 psch kalkin-: i'll probably get back to it soonish and try to make it easy, but as you said, todo lists... :)
12:59 AlexDaniel m: say cos 2
12:59 camelia rakudo-moar e1071b: OUTPUT«-0.416146836547142␤»
12:59 ilmari m: my %h = <a b>; say +%h
12:59 camelia rakudo-moar e1071b: OUTPUT«1␤»
12:59 AlexDaniel m: my %h = <a b>; say +%h
12:59 camelia rakudo-moar e1071b: OUTPUT«1␤»
12:59 AlexDaniel hm
12:59 ilmari a hash numifies to the number of keys
12:59 AlexDaniel right
13:00 kalkin- psch: It's just good to know that this is something you guys are working on and don't just dismiss it with: "This is not the way scripting languages should work:" :D
13:00 Woodi ilmari: but why Hash class have trigonometric functions ?? :)
13:00 awwaiid pmurias: yeah, I was looking at the RubyTruffle stuff, pretty cool
13:01 kalkin- Btw about reusing libraries. I use Text::Haml:from<Perl5> and my script takes 6.4 seconds in the parse stage. This is too slow for a cli app
13:01 AlexDaniel tweakism: So, there are several ways to do that. I use custom keyboard layouts so I usually just change the layout, but even then there are different approaches. Let's try the fastest one first: if you're using e.g. “us” layout, then open /usr/share/X11/xkb/symbols/us, find the right key and change it to something like key <AC05> { [ g, G, dead_greek, dead_greek ] }; and that's it
13:02 kalkin- Can i optimize this somehow without patching rakudo?
13:02 AlexDaniel tweakism: all you have to do after that is reload your layout like: setxkbmap us
13:02 AlexDaniel tweakism: now, this is not a very good idea but it will get what you want in like 30 seconds :)
13:02 Skarsnik kalkin-, for each run?
13:02 ilmari m: my %h = <a b>; say ~%h
13:02 camelia rakudo-moar e1071b: OUTPUT«a    b␤»
13:03 kalkin- Skarsnik: yes
13:03 Skarsnik Pretty weird that the parse stage is so slow,
13:03 AlexDaniel tweakism: the reason why this is not that good is because your operating system can change “us” file during the updates (e.g. if some new flavour of us keyboard is added). This does not happen very often but it does happen
13:04 kalkin- This is the slow script https://gist.github.com/kalkin/b8eb3ad267da097914e0
13:05 Woodi kalkin-: how long it takes without 'say' ?
13:05 kalkin- Woodi: same time
13:06 virtualsue joined #perl6
13:07 Woodi kalkin-: in general 2016 is the year when Perl6 is about to be a lot faster in any direction. 2015 a
13:07 Woodi ..was 'make it OK' year...
13:08 Woodi kalkin-: using language A from language B is magical enought :)
13:09 kalkin- Woodi: I know that there are people working on performance and I'm not complaining, just nor sure if I should open a bug, or if it's a known limitation.
13:09 Woodi kalkin-: you can always do Java  trick: have script run long enought that startup time does not matter :)
13:11 sufrostico joined #perl6
13:11 Sgeo joined #perl6
13:11 Humbedooh left #perl6
13:11 kalkin- Or just use Perl5 for this little scriptD
13:11 kalkin- :D
13:12 RabidGravy or implement Text::Haml in perl 6
13:12 AlexDaniel tweakism: but it will get you started for sure :) Then, a more durable solution is to create your own layout (e.g. copy “us” file to “my” and then edit that). I don't think that anything will ever touch this file.
13:12 Woodi kalkin-: C would be faster then Perl5 :) maybe not always...
13:12 RabidGravy looking at the code it seems that a lot of it would be handled by builtin functionality
13:15 AlexDaniel tweakism: so let me know if this answered your question
13:17 molaf joined #perl6
13:20 Woodi about precompilation: Rakudo creates .precomp directory then reuses it. it speeds thing up but I thinked precompilation is _install time_ thing... interpreter during runtime shouldn't create things in installed modules directory... having eg. something like ~/.cache/rakudo/201602/.... would be ok.
13:25 virtualsue joined #perl6
13:27 dalek rakudo-star-daily: 653ae9a | coke++ | log/ (9 files):
13:27 dalek rakudo-star-daily: today (automated commit)
13:27 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/653ae9adeb
13:27 Actualeyes joined #perl6
13:29 [Coke] huh. on another chat server, someone said it was the first time they'd heard of "biscuit conditionals". me too, which led me to this: https://www.calvin.edu/academic/philosophy/virtual_library/articles/derose_keith/conditional_assertions_and_biscuit_conditionals.pdf
13:39 FROGGS joined #perl6
13:45 * perlpilot now reads about "biscuit conditionals"
13:45 Skarsnik hm, the blog format on blogs.perl.org does not have stuff like title formating?
13:47 pmurias joined #perl6
13:48 dalek nqp: 8646ab1 | (Pawel Murias)++ | src/vm/js/QAST.nqp:
13:48 dalek nqp: Revert "[js] remove useless file"
13:48 dalek nqp:
13:48 dalek nqp: It turns out it was used by nqp-js-on-js.
13:48 dalek nqp:
13:48 dalek nqp: This reverts commit f77aa4c887987171b690708d0304a7fd88f80261.
13:48 dalek nqp: review: https://github.com/perl6/nqp/commit/8646ab1191
13:48 dalek nqp: deb4ce6 | (Pawel Murias)++ | src/vm/js/Compiler.nqp:
13:48 dalek nqp: [js] Fixing using module names that contain :: like QAST::Compiler.
13:48 dalek nqp: review: https://github.com/perl6/nqp/commit/deb4ce6716
13:49 jnthn Woodi: No, precomp and installation aren't the same. If you -Ilib then you'll get a lib/.precomp that serves as a cache.
13:49 jnthn On installation we also create precomps, but they are managed a bit differently
13:50 ptolemarch joined #perl6
13:51 dalek Inline-Perl5: e5ebc06 | (Stefan Seifert)++ | README.md:
13:51 dalek Inline-Perl5: Fix examples in the README
13:51 dalek Inline-Perl5:
13:51 dalek Inline-Perl5: Test::More::plan wants a named argument, not just a positional.
13:51 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/e5ebc06d9e
13:51 Psyche^_ joined #perl6
13:51 awwaiid using Text::Haml:from<Perl5> should, once things are working smoothly all around, be pretty close to as-fast-as calling the same lib from Perl5
13:52 pmurias why is 'use Text::Haml::from<Perl5>' slow? is it a precompilation problem?
13:52 * moritz hilights nine++ for the question above
13:52 moritz *questions
13:52 nine Is it slow?
13:52 awwaiid nine: yeah, report was it is slow during parse-stage, https://gist.github.com/kalkin/b8eb3ad267da097914e0 is script
13:53 awwaiid (I don't know what index.haml contains)
13:53 nine Ah, what's slow is not loading the Perl 5 module. It's loading Inline::Perl5 itself, because we currently cannot precompile it.
13:53 k-man joined #perl6
13:54 pmurias it would be great to have a way to enable a warning when something is not precompiled
13:54 moritz something for RAKUDO_MODULE_DEBUG?
13:54 nine To be precise: we could precompile Inline::Perl5 just fine. However we cannot precompile modules that use :from<Perl5> and we lack a method for Inline::Perl5 to say so. So instead, we prohibit precomp of Inline::Perl5 which also prohbits precomping users of Inline::Perl5 as side effect.
13:55 nine The solution is implementing support for "no precompilation 'users';"
13:56 pmurias not being able to precompile modules that use :from<Perl5> is still a problem
13:56 nine Yet one that's fricking hard to fix
13:57 pmurias moritz: something like RAKUDO_PRECOMPILE_ALWAYS
13:57 pmurias moritz: not a debugging help for developers, something that users can enable to make sure everything is always precompiled
13:58 awwaiid hm, interesting. so something about the dynamicness you get when you use :from<Perl5> stops the precomp? I should learn what all precomp does :)
13:58 tadzik nine: would it be possible to have stuff exported from perl5 imported into perl6 when using Inline::Perl5?
13:58 llfourn I made this suggestion: https://github.com/perl6/toolchain-bikeshed/issues/5 # die if not able to precompile rather than fallback
13:58 llfourn seems to be similar to what pmurias is suggesting
13:59 pmurias llfourn: it's the same thing
14:00 nine tadzik: what kind of stuff?
14:00 awwaiid nine: did you see my note about setting up travis for nine/Inline-Perl5 and editing README?
14:01 jnthn llfourn: I've been thinking we might want some kind of Module::FlightCheck that does things like making sure precomp works or you explicitly marked "no precompilation", as well as grabbing a Perl 6 compiler release soon after a particular language release and making sure that you're not accidentally depending on stuff from a newer Perl 6 language version than you've declared to support.
14:01 tadzik nine: like Dancer's DSL :) all the "global" functions like 'get', 'post', 'dance' etc
14:01 nine awwaiid: the issue is that Perl 5 has state external to what the Perl 6 compiler sees, so Perl 6 cannot serialize this external state and store it in the precomp file. We'd have to recreate the Perl 5 interpreter's state when loading the precomp file.
14:01 jnthn (That you could run on your module prior to cutting a release of it.)
14:01 nine awwaiid: I did :) Was just kind a busy preparing my talks
14:02 nine tadzik: that already works
14:02 awwaiid nine: ah no worries. I just merged into master awwaiid/Inline-Perl5 which will accidentally fix the link on the README to say it is passing :)
14:02 awwaiid (if it passes)
14:02 nine tadzik: I updated the README to reflect that fact a couple of minutes ago after seeing the Test::More example on your screen ;)
14:04 jnthn m: say 6591.65 R/ 5626.89
14:04 camelia rakudo-moar e1071b: OUTPUT«0.8536391␤»
14:04 jnthn Wowser
14:05 pmurias jnthn: making sure everything is precompiled is also something I want as an user
14:05 nine pmurias: but usually not something you can do anything about
14:06 llfourn jnthn: sounds good to me. But en environment variable may still be needed for my obscure case: My module precompiles fine, but when you use a call a sub from it at BEGIN time, that *call* breaks the precompilation of the compunit that called it. It happened to me in this "test" module I use with my .t files: https://github.com/LLFourn/p6-CompUnit-Util/blob/master/t/lib/push-multi.pm6
14:06 nine pmurias: as a user... if you think about fixing it, you already are a developer again :)
14:06 pmurias nine: I can just refuse to use modules that don't precompile unless I'm forced to
14:07 llfourn nine: it may not be someone elses module, it may be while you are developing your own module you want to turn off precompilation fallback
14:07 pmurias nine: I also had a situation where things where not precompiled due to some combination of "use lib" and -I
14:08 jnthn pmurias, llfourn: I was thinking that Module::FlightCheck would use whatever environment variable or other mechanism we end up picking to complain about inability to precomp, rather than falling back
14:08 jnthn I think the fallback is the right default though. It works slowly is infinitely better than it doesn't work at all.
14:09 llfourn jnthn: cool then we are on the samge page :)
14:11 pmurias jnthn: I would just be happy if I could disable the fallback for myself
14:12 pmurias things silently going sluggish sucks
14:13 llfourn I also had a problem when I was devloping OO::Schema, I did a lost of the implementation in a way that was totally evil with regards to precomp. I realised later and then had to refactor stuff to be precomp-friendly.
14:13 jnthn pmurias: Yeah, then an env var or some such you can set would do it, no?
14:14 pmurias yes
14:14 lucs Is "sink context" just a better name for "void context"?
14:15 lucs )or how are they different?)
14:15 lucs (
14:16 llfourn lucs: yes, but when things are used in sink context .sink is called on them not .void # my understanding
14:16 dalek doc: f608482 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/variables.pod:
14:16 dalek doc: Correct link to compile-time variables. This fixes #417
14:16 dalek doc: review: https://github.com/perl6/doc/commit/f608482aa4
14:16 pmurias S99 claims it's a different way
14:16 pmurias different name sorry
14:16 _nadim Woodi: thank you, aother version in the pipeline, just a tad faster.
14:17 virtualsue joined #perl6
14:17 lucs Aha, thanks. Also, cognominal just pointed me to https://github.com/perl6/specs/commit/ddcd70922044519c9d8ecb5f9d3db932c0bc6bc1
14:20 cognominal my concern was to translate sink context in French for perl6intro. The better I came with is "contexte poubelle" (poubelle is an antonomasia btw)
14:22 AlexDaniel I don't like this auto close feature on github…
14:22 skids joined #perl6
14:22 llfourn cognominal: you have a french version of perl6intro?
14:23 cognominal Naoum hankache is doing it and is acking me to review it.
14:24 cognominal https://github.com/hankache/perl6intro  he has not reviewed my pull request.
14:24 llfourn cognominal: there was a new guy on irc a few days ago who wanted to help with a french translation...
14:24 cognominal Apparently there is a deutch version as well.
14:26 kalkin- re. So just sum up the precompilation discussion. My example code is slow because it can not be precompiled and there is nothing I can do, besides patching rakudo
14:26 kalkin- Did I get it right?
14:26 RabidGravy that about sums it up
14:26 * llfourn looks up for the example code
14:26 kalkin- RabidGravy: ok thanks
14:27 AlexDaniel we need a perl6 version of perl6intro
14:27 dalek nqp: 78db547 | jnthn++ | src/QAST/Block.nqp:
14:27 dalek nqp: Avoid a load of hash allocation/copies.
14:27 dalek nqp:
14:27 dalek nqp: Normally we just set symbol properties once ever, so just use the
14:27 dalek nqp: slurpy hash we already have rather than creating a new one and copying
14:27 kalkin- Why not to write it in Lojban and than auto translate it to other languages
14:27 dalek nqp: to it. Saves a ton of hash and hash iterator allocations.
14:27 dalek nqp:
14:27 dalek nqp: This makes `for ^500 { EVAL 'regex { abcdef }' }` in Perl 6 run in
14:27 dalek nqp: about 85% of the time it used to (and will similarly help other EVAL
14:27 dalek nqp: heavy things, and shave a bit off compile times generally).
14:27 dalek nqp: review: https://github.com/perl6/nqp/commit/78db547acd
14:28 AlexDaniel jnthn++
14:29 AlexDaniel such a pleasure to see commits like this
14:31 jnthn AlexDaniel: Was a discovery from the profiler, while using it to help me understand EVAL's memory leaky behavior... :)
14:32 _nadim jnthn++
14:32 tadzik \o/
14:34 RabidGravy one day we'll wake up and all these marginal gains will have made Perl 6 faaster than C without noticing
14:35 mspo just claim it
14:35 mspo it's what everyone else does :)
14:35 tadzik hahh
14:36 RabidGravy I'm sure we can already find a bunch of languages that are slower
14:36 llfourn English for one
14:36 mspo come up with one contrived use case where you do tricky super-efficient p6 and horrible c
14:37 mspo just add a sleep in the c code; no one read it :)
14:38 cognominal AlexDaniel, that's an intro. It is difficult to show the Perl 6 specific stuff like concurrency and roles from the start.
14:40 edehont joined #perl6
14:40 mspo you could also show that writing perl6 programs is faster because you're not getting warnings about whitespace from new gcc
14:42 lucs AlexDaniel: You don't like the Perl 6 Intro approach?
14:44 AlexDaniel lucs: no-no, it's great. People were discussing different translations, so I thought that it would be fun to have perl6intro written in perl6 instead of English :)
14:44 lucs Oh! :-)
14:44 * Woodi one scripted something in 10 minutes of Perl5 code then rewrited it into 2 months C code...
14:45 cognominal lucs, your remark could have been read as a trashing of perl6intro :)
14:46 _nadim Woodi: you need to learn to call Perl from C ;)
14:47 dalek nqp: 3872607 | (Pawel Murias)++ | src/vm/js/nqp-runtime/io.js:
14:47 dalek nqp: [js] Fix nqp::spawn.
14:47 dalek nqp: review: https://github.com/perl6/nqp/commit/3872607df0
14:47 AlexDaniel _nadim: or the other way round
14:47 lucs cognominal: I'm sorry to have interpreted AlexDaniel's remark as meaning something like "that intro would be better if it actually covered Perl 6 correctly".
14:48 cognominal Also I am fighting in the french community to interest people in roles. I thought that the dynamic part of Perl 6 would sell in the mongueurs. I was badly wrong. :(    Some guy wrote an article like was written about C++ at the end of the 80s :(
14:48 virtualsue joined #perl6
14:48 nine llfourn: I wonder what you did to be precomp-unfriendly?
14:48 _nadim AlexDaniel: but then you can't tell the baffoons that it is C
14:49 mspo I thought french people all used ocaml
14:49 llfourn nine: use MyModule; MyModule::<something> = "some value I want to save in MyModule!" # something like this
14:49 prammer joined #perl6
14:49 cognominal lucs, I understood the same. I was wrong, such snide remark would be off colour in #perl6  :)
14:51 _nadim We once ran a project, 6 months, 3 people, delivered in time, something better than another team of 10 that were not ready in time. We presented it, and the first thing I heard was "but what the hell are you doing making it in Perl?" to wich I answere "why don't you shut the fuck up since your project is crap?" Boss when "Nadim, there's no neeed to be agressive", you can guess my answer to that.
14:51 llfourn nine: err that should be BEGIN MyModule::<something> = ...
14:52 llfourn ie I'm trying to edit the stash of a package inside an already precompiled compunit
14:52 llfourn at the compilation time of another compuinit
14:52 cognominal _nadim, you can't trust a living dead language. It may eat your brain. :)
14:52 llfourn which makes no sense now that I understand SC and precomp a bit better :P
14:53 llfourn but sinse I had some other bug breaking precomp it just worked for a while
14:53 Woodi _nadim, AlexDaniel: "programming in C" / "starting from scratch" is si seductive... ;)
14:53 Woodi s/si/so/
14:54 [Coke] I had a project that the customer ended up refusing to use becase we implemented in tcl (despite the fact that they still had to pay for it, and that they knew it was being written in tcl from day one). Great memories. :)
14:54 cognominal mspo, ocaml is unknown outside of academia
14:54 _nadim eh, I like C! I just don't like idiots.
14:55 dalek nqp: 3949819 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
14:55 dalek nqp: [js] Add a noop compose to the VMException REPR.
14:55 dalek nqp: review: https://github.com/perl6/nqp/commit/3949819bba
14:55 nine llfourn: ooh, I see. Yep, that's evil indeed :)
14:55 _nadim Woodi: to be fair the other project was not written in C
14:55 mspo cognominal: guess so
14:56 RabidGravy cognominal, nah, liquidsoap is written in ocaml (mind I think that's the only software I know that *is* written in it)
14:56 mspo I use unison
14:57 moritz same here
14:58 RabidGravy struggling for motivation here today
14:59 _nadim RabidGravy: you're not the only one :)
15:04 cdg joined #perl6
15:06 cognominal pmurias, what is the state of rakudo-js ?
15:09 Woodi any example of Singleton pattern in Perl6 ?  here is article from 2004 stating that there is no way to make reliable Singleton in C++  http://www.aristeia.com/Papers/DDJ_Jul_Aug_200   but it was "before" atomics "revolution" in PC computers...
15:10 masak Woodi: I don't say this often about questions, but... are you sure a Singleton is what you want?
15:10 Woodi hmm, http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf
15:10 RabidGravy there's one right in the either OO or classes doc
15:10 virtualsue joined #perl6
15:11 moritz m: class A { my $instance; method new() { return $instance //= self!actual_constructor }; method !actual_constructor { say 'creating an instance; self.bless } }; A.new for ^5
15:11 camelia rakudo-moar e1071b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/frOVx4x3im␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/frOVx4x3im:1␤------> 3n instance; self.bless } }; A.new for ^57⏏5<EOL>␤    expecting any of:␤        argu…»
15:11 Woodi masak: I want one when I need one :)
15:11 RabidGravy http://doc.perl6.org/language/classtut#Static_fields%3F
15:11 Woodi masak: Singleton is nice eg. for storing app configuration
15:12 pmurias cognominal: currently compiling NQP to js works (with minor things not working)
15:12 CIAvash joined #perl6
15:12 pmurias cognominal: started working yesterday on a TPF grant to make rakudo-js work
15:12 cognominal yea, I have seen that. Good.
15:13 RabidGravy Woodi, see also my Staticish module which creates a singleton and then invokes all the methods on that instance as if they were Class methods
15:13 masak Woodi: most of the time when I see the Singleton pattern, I go (inwardly) "are your developers really so undisciplined that they go around creating app configuration instances all over the place?"
15:13 cognominal pmurias, so you can write grammars in nqp-js ?
15:13 masak m: class Singleton { our $.INSTANCE = Singleton.new; submethod BUILD { if $++ { die "DERE CAN ONLY BE WUN" } } }; say Singleton.INSTANCE; Singleton.new
15:13 camelia rakudo-moar e1071b: OUTPUT«Singleton.new␤DERE CAN ONLY BE WUN␤  in submethod BUILD at /tmp/XClk1NKr3V line 1␤  in block <unit> at /tmp/XClk1NKr3V line 1␤␤»
15:13 masak Woodi: the above ^^ ought to work
15:14 masak Woodi: but I think I would recommend some kind of static analysis in the test suite that checks that people aren't creating multiple app configurations ;)
15:14 jnthn class Singleton { method new(|c) { once self.bless(|c) } } # another way to always have and return the same instance
15:15 smls joined #perl6
15:15 RabidGravy hah
15:15 Woodi that examples work with many threads ? that was problematic in 2004...
15:18 Woodi saved into library anyway, thanx :)
15:19 pmurias_ joined #perl6
15:22 dalek nqp: 1a9e0a7 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
15:22 dalek nqp: [js] Make nqp::objprimspec work on a null (return 0).
15:22 dalek nqp: review: https://github.com/perl6/nqp/commit/1a9e0a75fc
15:22 dalek nqp: 8e41e49 | (Pawel Murias)++ | t/nqp/93-oo-ops.t:
15:22 dalek nqp: Test calling nqp::objprimspec on a null.
15:22 dalek nqp: review: https://github.com/perl6/nqp/commit/8e41e4973a
15:22 masak tadzik++ just implemented man-or-boy in 007 (and it gives the expected output)
15:22 smls left #perl6
15:22 masak this may very well end up in tomorrow's slides ;)
15:23 tadzik :)
15:23 moritz \o/
15:23 tadzik kewl, I'll be famous! :P
15:23 pmurias_ cognominal: yes, the NQP grammar works in nqp-js
15:23 RabidGravy woah that's a new one on me "Missing serialize REPR function for REPR NativeRef"
15:23 moritz tadzik: I expect at least a lightning talk from you
15:23 tadzik moritz: I think there'll be one
15:23 masak tadzik: me too!
15:24 pmurias RabidGravy: seems like something that's hard to serialize ;)
15:25 idiosyncrat_ joined #perl6
15:25 cognominal pmurias++
15:30 dalek nqp: ae15d62 | jnthn++ | src/NQP/ (3 files):
15:30 dalek nqp: Use str constraint on various paths.
15:30 dalek nqp:
15:30 dalek nqp: The goal being that we can stick a native `str` on the $name of the
15:30 dalek nqp: QAST::Block.symbol method, which accounts for an overwhelming amount
15:30 dalek nqp: of boxing in EVAL-heavy situations.
15:30 dalek nqp: review: https://github.com/perl6/nqp/commit/ae15d6277d
15:35 Skarsnik hm, does NativeCall handle struct mystruct *foo(); as sub foo() return mystruct; or it's important to keep the Pointer in this case?
15:35 musiKk_ joined #perl6
15:38 RabidGravy pmurias, it seems that it's something in an enum
15:39 khw joined #perl6
15:41 RabidGravy just quoted the enum "keys" and it fixes it
15:42 Actualeyes joined #perl6
15:45 dalek rakudo/nom: 3ac34a4 | jnthn++ | src/Perl6/ (2 files):
15:45 dalek rakudo/nom: Some str constraint/coercion on paths to .symbol.
15:45 dalek rakudo/nom:
15:45 dalek rakudo/nom: For an upcoming NQP patch to add a `str` type constraint to it.
15:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ac34a4386
15:45 timotimo Skarsnik: we can't return a struct without a pointer in nativecall at the moment
15:45 dalek nqp: c8db98b | jnthn++ | src/QAST/Block.nqp:
15:45 dalek nqp: Mark $name parameter in symbol a str.
15:45 dalek nqp:
15:45 dalek nqp: Eliminates the most common source of box allocations in compilation.
15:45 dalek nqp: For example, in the `for ^500 { EVAL 'regex { abcdef }' }` example we
15:45 dalek nqp: knock several hundred thousand allocations, and 3 whole GC runs, off.
15:45 dalek nqp: review: https://github.com/perl6/nqp/commit/c8db98ba41
15:46 nine jnthn: compilation will become faster? :)
15:46 Skarsnik timotimo, so my example does not work?
15:47 jnthn nine: Aye, a bit
15:47 nine \o/
15:49 zpmorgan joined #perl6
15:49 timotimo Skarsnik: no, "returns mystruct" is correct
15:50 Skarsnik Ok, make my life a bit easier in gptrixie
15:50 Skarsnik I don't need to add the context to the generator when solving a pointer on structure
15:51 Skarsnik since it will translate to the structure directly in a class/function argument/function return
15:53 rindolf joined #perl6
15:54 donaldh joined #perl6
15:54 [Coke] jnthn++
15:55 dalek nqp: 5cbce49 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
15:55 dalek nqp: Avoid another common source of boxing.
15:55 dalek nqp:
15:55 dalek nqp: In code-gen this time.
15:55 dalek nqp: review: https://github.com/perl6/nqp/commit/5cbce49ca5
15:57 timotimo ^- i approve of boxing removage
15:59 timotimo that also means when we compile & run scripts, we'll go longer without the first GC run
16:00 jnthn That too :)
16:00 pyrimidine joined #perl6
16:01 RabidGravy fewer brk()s in the strace is nice too ;-)
16:03 idiosyncrat_ left #perl6
16:04 itaipu joined #perl6
16:06 timotimo hm, brk() would be triggered by malloc, which won't really happen when we box stuff (except ints above the 32bit range)
16:06 timotimo (or newly created strings)
16:08 jnthn Yeah, boxes are entirely within the GC-managed space
16:09 hoelzro good * #perl6
16:09 yoleaux 12:39Z <AlexDaniel> hoelzro: publish the rest! I want to see how well my phonetic-kinda-dvorak layout works with those stats :)
16:09 timotimo 106360maxresidentk for an nqp build, that's not even bad
16:09 timotimo that's less than a simple script when running full perl6
16:12 timotimo i can't do a sensible measurement for "stage parse" right now, because something's eating CPU
16:13 timotimo 1114024maxresidentk is a *bit* more %)
16:15 perl6newbee joined #perl6
16:15 perl6newbee hi guys
16:16 perl6newbee What is the best way in perl6 to get the difference from two DateTime objects in days?
16:16 chansen_ perl6newbee: Difference in what unit?
16:16 chansen_ Ahh, sorry
16:16 perl6newbee I used DateTIme.get-daycount. But thats no longer exists
16:16 Skarsnik ($d1 - $d2).days?
16:16 perl6newbee days :-)
16:17 perl6newbee my $d = DateTime.new(blablabal) - DateTime.now does not work
16:17 perl6newbee mom
16:17 chansen_ You need to call .days method on the duration object
16:18 perl6newbee annot call Numeric(DateTime: ); none of these signatures match:
16:18 perl6newbee (Mu:U \v: *%_)
16:18 perl6newbee in block <unit> at <unknown file> line 1
16:18 Skarsnik m: my $d1 = DateTime.new(now); my $d2 = DateTime.new(now - 50000); say ($d1 - $d2).days;
16:18 camelia rakudo-moar 3ac34a: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/0yOwV7RPhe line 1␤␤»
16:19 perl6newbee Ok so I encountered a bug. I though operator '-' is not implemented
16:19 psch m: say now.WHAT
16:19 camelia rakudo-moar 3ac34a: OUTPUT«(Instant)␤»
16:19 * skids wonders other than definedness what a singleton really has over an instanceless class.
16:20 psch m: say :(DateTime $, DateTime $) ~~ &infix:<->
16:20 camelia rakudo-moar 3ac34a: OUTPUT«Cannot call Numeric(Signature: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/Ks4YpIj6xU line 1␤␤»
16:20 dalek nqp: d257c27 | jnthn++ | src/ (3 files):
16:20 dalek nqp: Use MoarVM's optimized mutli-dispatch path.
16:20 dalek nqp:
16:20 dalek nqp: This avoids the creation of many CallCapture objects during QAST to
16:20 dalek nqp: MAST compilation, again knocking some more allocations (one per QAST
16:20 dalek nqp: node) off.
16:20 dalek nqp: review: https://github.com/perl6/nqp/commit/d257c274c1
16:21 Skarsnik I think only Instant has a - operator
16:21 Skarsnik m: my $d1 = DateTime.new(now); my $d2 = DateTime.new(now - 50000); say ($d1.Instant - $d2.Instant).days;
16:21 camelia rakudo-moar 3ac34a: OUTPUT«Method 'days' not found for invocant of class 'Duration'␤  in block <unit> at /tmp/sLsPng2YZB line 1␤␤»
16:21 psch there's a (Date $, Date $) candidate for infix:<->
16:22 psch m: say (DateTime.now.Date - DateTime.new(now - 500000).Date)
16:22 camelia rakudo-moar 3ac34a: OUTPUT«6␤»
16:23 Skarsnik probably want a - on DateTime that give a Duration
16:24 Skarsnik why it's not there?
16:25 psch Skarsnik: how does $utc-date - $cest-date work?
16:25 psch err, datetime, not date :)
16:26 maybekoo2 joined #perl6
16:28 AlexDaniel m: say (5*37*227*557).base(33).lc ~ ‘++’
16:28 camelia rakudo-moar 3ac34a: OUTPUT«jnthn++␤»
16:29 virtualsue joined #perl6
16:29 maybekoo2 joined #perl6
16:30 perl6newbee DateTime.Date - DateTime.Date works. THX. But I hope the intuitive '-' way will also work some day
16:33 prammer joined #perl6
16:33 jnthn AlexDaniel: hah! :P
16:38 Actualeyes joined #perl6
16:40 tweakism AlexDaniel: I eventually figured it out
16:41 tweakism AlexDaniel: I didn't want to xmodmap and it was difficult to figue out how to structure XKB stuff under my $HOME
16:41 tweakism but I eventually did
16:41 tweakism but yes, thanks, that's helpful.
16:44 pmurias jnthn: is EVAL a bottleneck for performance of something?
16:45 pmurias or just an easy way to profile compilation?
16:49 hoelzro zostay: btw, I don't know if you saw, but I added you as a committer to IO::String
16:49 hoelzro thanks for your help!
16:49 hoelzro I think the next step will be to document the new stuff, preferably as declarative POD, and then render that to README.md
16:50 hoelzro I can take care of a lot of that
16:50 Skarsnik psch, well a DateTime as the timezone information
17:00 jnthn pmurias: Well, looking into why regex interpolation leaks was where this started
17:01 jnthn pmurias: While investigating that I ended up taking a profile that pointed at a number of compilation improvements that might be worth picking off
17:13 pmurias_ joined #perl6
17:14 [Coke] jnthn: for ^500 { EVAL 'regex { abcdef }' } went from 5.5s to 4.2 on my box after your commits today.
17:14 jnthn m: say 5.5 R/ 4.2
17:14 camelia rakudo-moar 3ac34a: OUTPUT«0.763636␤»
17:14 jnthn Nice :)
17:14 jnthn The changes added up :)
17:15 timotimo it may not stop the leaks, but it's good none-the-less!
17:15 jnthn Yeah...the leak is non-obvious
17:15 jnthn I'll hack up a simple heap snapshot dumping thing to help me find it
17:15 jnthn Which we can later evolve towards a user-space heap analysis tool
17:15 jnthn I just figured out a basic design for it
17:16 Skarsnik Oooh nice
17:16 jnthn But I fear if I continue hacking, I'll bring on epic headache again. :S So should probably stop for now...
17:16 jnthn So, bbl :) &
17:17 baest_ joined #perl6
17:21 _nadim Bleah! when elements of < 1, 2, 3, > and < 1, 2, 3 >  don't get the same type!
17:22 SCHAAP137 joined #perl6
17:22 _nadim What's the idea behind IntStr vs Cool?
17:24 ugexe you know you can treat it as an Int or Str, instead of as the much broader Cool
17:25 AlexDaniel m: say ~IntStr.new(42, ‘69’) # my favorite
17:25 camelia rakudo-moar 3ac34a: OUTPUT«69␤»
17:25 AlexDaniel m: say +IntStr.new(42, ‘69’) # my favorite
17:25 camelia rakudo-moar 3ac34a: OUTPUT«42␤»
17:25 _nadim AlexDaniel: hahah!
17:26 _nadim time to add a handler that catches your example!
17:28 AlexDaniel someone should create Acme::BoolIntStr that will also provide a special value for boolean context
17:28 geekosaur sounds like we're all ready for a p5-ish $!
17:28 _nadim IntStr is not even documented on doc.perl6.org
17:29 _nadim Does anyone know where it is defined, I can as well display both values.
17:30 RabidGravy src/core/allomorphs.pm
17:31 AlexDaniel _nadim: looks like there is a bug report for that https://github.com/perl6/doc/issues/418
17:31 kjs_ joined #perl6
17:31 vendethiel joined #perl6
17:31 RabidGravy at some point I'm going to make an enumeration type thingy with IntStrs
17:32 RabidGravy I keep wanting it then deciding it's a pain to implement and find some other way of expressing it
17:33 _nadim Good, then I don't have to report it. I haven't forgotten that I promised to help with the doc, just haven't had a working computer worth the name for a month.
17:35 prammer joined #perl6
17:43 _nadim dump(IntStr.new(42, "69")) ; => 42 / "69".IntStr ;  And I hope to never see it again :)
17:45 jack_rabbit joined #perl6
17:48 sufrostico joined #perl6
17:50 TEttinger joined #perl6
17:54 timotimo i think it'd be pretty fantastic if we could get regex slangs for at least python and javascript
17:54 AlexDaniel yeaaaaaah
17:55 timotimo at one point i LOLd at that tool that's "like ack, but with js regexes instead of pcre", but it turns out it'd be damn helpful to just be able to paste regexes from different languages into your code and have them work
18:00 Hotkeys I don't use js so just curious
18:00 Hotkeys what are js regexes like
18:04 prammer joined #perl6
18:05 Hotkeys Is there a good way to modify the syntax via some sort of custom slang yet
18:05 Hotkeys I looked at Slang::SQL with the EXPORT sub
18:05 Hotkeys but I can't seem to get that to work
18:05 timotimo "the syntax", you mean for regexes?
18:06 Hotkeys er
18:06 Hotkeys https://github.com/tony-o/perl6-slang-sql/blob/master/lib/Slang/SQL.pm6
18:06 timotimo if Slang::SQL doesn't work, it's a bug in Slang::SQL
18:06 Hotkeys like is done here
18:06 Hotkeys it hasn't been updated since october so I was wondering if something had changed
18:06 timotimo perhaps
18:07 timotimo have you tried the other Slang:: modules?
18:07 Hotkeys not yet
18:07 Hotkeys I was just having a fiddle with it last night
18:08 timotimo mhm
18:08 Hotkeys I wanted to attempt to do STM in p6
18:09 Hotkeys via an 'atomic { ... }' block
18:09 Hotkeys (Software Transactional Memory for the record)
18:10 psch Skarsnik: way i see it, if DateTime - DateTime can mean DateTime.Date - DateTime.Date *or* DateTime.Instant - DateTime.Instant
18:10 psch Skarsnik: and if the user has to decide already anyway it's not useful to provide one of the options as default - cause half the people will say it's unintuitive
18:15 Skarsnik Yes probably x)
18:17 prammer joined #perl6
18:21 Actualeyes joined #perl6
18:23 Actualeyes left #perl6
18:24 zakharyas joined #perl6
18:30 AlexDaniel Hotkeys: atomic block? :O
18:31 prammer joined #perl6
18:40 virtualsue joined #perl6
18:41 Juerd joined #perl6
18:41 pmurias joined #perl6
18:50 Woodi skids: singletons vs instanceless class: even if you generate class at runtime it's still kind of "static" thing, traditionally and aestetically. objects usually are modifable so they are small "databases" which is how you use Singleton, eg.: $singleton.register( "shape", new ShapeFactory( "circles" ) ); $singleton.find( ... );  # :)
18:51 RabidGravy psch, I'm having a little hack on Audio::PortAudio at the moment, it seemed a shame to be just sitting there :)
18:53 LanceW joined #perl6
18:53 skids m: class A { my $a = 1; method set_a (::?CLASS:U:) { $a = 2 }; method get_a { $a }  }; A.get_a.say; A.set_a; A.get_a.say # Woodi, so in Perl6 the difference is really just definedness...
18:53 camelia rakudo-moar 3ac34a: OUTPUT«1␤2␤»
18:55 LanceW Evening all, this is a frivolous question, how do I get an emoji on my module on modules.perl6.org?
18:55 Woodi skids: you can't use Perl as an argument...
18:57 millican joined #perl6
18:57 RabidGravy LanceW, an icon? I think it's a logotype.png in the dist/GH dir
18:57 RabidGravy easiest way is to check one that has one
18:58 psch RabidGravy: fwiw, you can totally adopt it
18:58 RabidGravy ah, no it's a logotype directory with a .png in it
18:58 psch RabidGravy: as in, if it ends up in the ecosystem might as well be from your gh user
18:58 psch i don't really have the time or mind to do anything with it at the moment either
18:58 firstdayonthejob joined #perl6
18:58 RabidGravy just "simplifying" the interface somewhat at the moment
18:59 psch yeah, FROGGS did mention that the enum-devices.pl => pick the right one => hack the test file is bad vOv
19:00 psch i was more concerned with having it work back then, but afair that wasn't in reach due to mem handling over the NC barrier
19:00 LanceW ahhhhhhh..... logotype/logo_32x32.png excellent thanks
19:00 psch well, at least not with jackd, and via alsa i didn't get anything but buffer underruns
19:01 skids Woodi: Well, since I'm only really interested in knowing "why would you want a Singleton pattern in Perl 6" I can :-)
19:04 tmch joined #perl6
19:06 bbkr joined #perl6
19:14 Woodi skids: one thing is: surprise - classes usually are frozen at compile time. so using class as "starage" is strange. why hack OO that way ?
19:14 virtualsue left #perl6
19:15 Woodi skids: but you can't change one thing with changing implementation: patter of usage :) you just do Singleton pattern with a class.
19:16 psch most of our built-in classes instantiate as immutable objects (barring internals hackery), while every class exposes means to change it at runtime
19:16 psch ...i'm not sure that's a useful comment, to be honest :)
19:17 psch (i'm also not really confident in the "most" there.  "at least some" is something i'd be more confident in)
19:19 TreyHarris can I refactor out common optional args for multiple routines using a Signature? It seems like it should be doable but I can't figure out the syntax. I can get the signature into a variable, of course:
19:19 TreyHarris m: my $s = :(Int $a, Str $b); say $s.WHAT
19:19 Woodi psch: there is difference in theory and practical possibilities (of Perl): to learn or discover something you need some common names for things. but later you do what is best
19:19 camelia rakudo-moar 3ac34a: OUTPUT«(Signature)␤»
19:21 Woodi "Singleton" is just name that helps to communicate. even "developers communication" was one of rationales in creating GoF book
19:21 skids TreyHarris: not entirely clear on what you are trying to acheive.
19:24 TreyHarris skids: say I have a bunch of routines that take the following pair of options:
19:24 TreyHarris m: my $s = :(Int :l($limit) = 0, Str :d($delimiter) = ':')
19:24 skids .oO(If I was feeling particulary cynical today I'd define "Singleton" as "We banned global variables.  Then decided we actually needed them" :-)
19:24 camelia rakudo-moar 3ac34a: ( no output )
19:25 skids TreyHarris: Ok, and you want to do what with those routines?
19:25 skids Just DRY their definitions?
19:25 TreyHarris skids: i want them all to take those two options, but otherwise their signatures are different
19:25 TreyHarris skids: right
19:25 skids Ah.
19:26 TreyHarris if i'm not mistaken, this is the only way to have "global flags" on multi MAIN's
19:26 abaugher joined #perl6
19:27 TreyHarris (not talking about things like --help or --version that serve as subcommands as their own, but, for example, --verbose=<level>, that can be used with any subcommand)
19:28 skids Hrm I can't think of a way off the top of my head.  You could use "|c where $signature" to smartmatch it but that would get messy not being at the top level of the dispatch.
19:28 TreyHarris I can repeat myself, but since in actuality each of those options also has a POD, a default, etc., repeating is brittle.
19:28 skids And the declarations likely don't carry in.
19:29 TreyHarris skids: yup, that's what I found when I tried it like that
19:31 TreyHarris I could make a mondo MAIN that might not even be a multi and put all the options for all the commands there, then switch to the right subcommand inside MAIN, but that makes the autogenerated USAGE unusable, since it can't, for example, know that the 'configure' subcommand can't take the --force Bool
19:32 skids Sounds like a job for macros.
19:32 TreyHarris skids: mmmm, thanks, didn't think of them.
19:35 skids Well, I'm not sure where the implementation is at there.
19:35 skids (masak would know)
19:35 perlpilot I would have thought you could put the common options in a proto
19:35 psch proto only restricts what's allowed for the multis
19:35 psch m: proto f (*@a, :$a, :$b) {*}; multi f(*@a, *%h) { say "ok"; }; f 1, 2, :a; f 1, 2, :c
19:35 camelia rakudo-moar 3ac34a: OUTPUT«ok␤Unexpected named parameter 'c' passed␤  in sub f at /tmp/2FiKICR1Ww line 1␤  in block <unit> at /tmp/2FiKICR1Ww line 1␤␤»
19:36 psch that's the closest work around for common nameds i can make up
19:36 psch well, replace the slurpy array in the multi
19:36 psch but that replaces USAGE output with a normal dispatch failure
19:36 psch m: say &MAIN.candidates
19:36 camelia rakudo-moar 3ac34a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CLujpiDR0c␤Undeclared name:␤    MAIN used at line 1␤␤»
19:36 perlpilot S06:77 would suggest that you should be able to do it.
19:38 vendethiel joined #perl6
19:38 psch perlpilot: well, it does in so far as that no multi under a proto :($, $) can have anything but two arguments, but it doesn't say that every multi under a proto :(:$a, :$b) has those two named arguments
19:38 Cabanossi joined #perl6
19:38 psch cause those are both optional
19:39 psch (which also clearly implies that :$a and :$b in the camelia'd code above should be required...)
19:39 psch well, if they're supposed to be, anyway vOv
19:40 psch s/can/can't/
19:41 psch still, a proto doesn't absolve the need for defining a signature again to have access to the parameters in the specific multis scope
19:42 ugexe ive settled for parsing global options out of @*ARGS
19:42 virtualsue joined #perl6
19:43 psch m: proto f($, $) {*}; multi f($) { }; f 1 # that's also LTA i guess
19:43 camelia rakudo-moar 3ac34a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/17vixQi0BX␤Calling f(Int) will never work with proto signature ($,)␤at /tmp/17vixQi0BX:1␤------> 3proto f($, $) {*}; multi f($) { }; 7⏏5f 1 # that's also LTA i guess␤»
19:43 psch the proto signature seems incomplete
19:44 psch m: proto f($, $,$,$,$) {*}; multi f($) { }; f 1 # heh
19:44 camelia rakudo-moar 3ac34a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/szX1vMmcfI␤Calling f(Int) will never work with proto signature ($,,,,)␤at /tmp/szX1vMmcfI:1␤------> 3roto f($, $,$,$,$) {*}; multi f($) { }; 7⏏5f 1 # heh␤»
19:44 psch m: say :($,$,$).perl
19:44 camelia rakudo-moar 3ac34a: OUTPUT«:($, $, $)␤»
19:44 psch m: say :($,$,$).gist
19:44 camelia rakudo-moar 3ac34a: OUTPUT«($,,)␤»
19:44 lizmat good *, #perl6!
19:45 perlpilot If you can factor out common parts of multi's signatures with proto, then there should be a way to not have to repeat the common bits in the multis
19:45 perlpilot Either proto needs more magic or just a little bit less.  :)
19:46 perlpilot (I'll settle for less since macros can indeed be an answer at some point)
19:46 TreyHarris hmm
19:46 skids Well you're supposed to be able to proto { stuff; {*}; stuff }
19:46 ugexe you can afaik
19:47 psch yeah, that works
19:47 skids Oh yeah it was proto regex that was iffy now that I remember.
19:47 ugexe yeah, ive hit that before too
19:47 pmurias lizmat: hi
19:48 lizmat pmurias o/  and congrats!
19:48 psch perlpilot: well, as i understand it the proto signature means "these are the allowed things, nothing else, pick as you like", not "this is what you all have to accept"
19:49 JRaspass joined #perl6
19:49 psch m: proto f ($, $?, $?, $?, :$a, :$b, $:c, :$d) {*}; multi f($, :$d) { }
19:49 camelia rakudo-moar 3ac34a: OUTPUT«5===SORRY!5===␤In signature parameter, placeholder variables like $:c are illegal␤you probably meant a named parameter: ':$c'␤at /tmp/h8mgJOcCKG:1␤------> 3proto f ($, $?, $?, $?, :$a, :$b, $:c7⏏5, :$d) {*}; multi f($, :$d) { }␤Cannot p…»
19:49 skids Hrm you can tell from a multi what proto it is under somehow, right?  Maybe MAIN/USAGE could be taught to go pick up POD that way.
19:49 psch m: proto f ($, $?, $?, $?, :$a, :$b, :$c, :$d) {*}; multi f($, :$d) { }
19:49 camelia rakudo-moar 3ac34a: ( no output )
19:49 * [Coke] registeres for the dc-baltimore perl workshop
19:50 hoelzro skids: you mean if people document various MAIN multis with declarative POD?
19:50 skids No if people document the MAIN proto, then the main multi could say "no pod on this, look in the proto for it"
19:51 hoelzro ahh
19:51 hoelzro &MAIN points to the proto, I believe
19:51 hoelzro so &MAIN.WHY should work
19:52 JRaspass hey all, should writing to read only hash attrs throw, just like scalars do?
19:52 JRaspass p6: class Foo { has $.bar }; Foo.new.bar = 1
19:52 camelia rakudo-moar 3ac34a: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/tmpfile line 1␤␤»
19:53 JRaspass p6: class Foo { has %.bar }; Foo.new.bar = ()
19:53 camelia rakudo-moar 3ac34a: ( no output )
19:53 skids p6: class Foo { has %.bar }; Foo.new.bar = (:a)
19:53 camelia rakudo-moar 3ac34a: ( no output )
19:53 jjido joined #perl6
19:54 skids p6: class Foo { has %.bar = Map.new() }; Foo.new.bar = ()
19:54 camelia rakudo-moar 3ac34a: ( no output )
19:57 labster joined #perl6
19:59 skids m: say (Map.new = (a => 1))
19:59 camelia rakudo-moar 3ac34a: OUTPUT«Map.new((:a(1)))␤»
19:59 dalek rakudo/nom: 693be1d | lizmat++ | src/core/Parameter.pm:
19:59 dalek rakudo/nom: More likely to get a mismatch on named/unnamed
19:59 dalek rakudo/nom:
19:59 dalek rakudo/nom: Than it is to get one on sub signature/no sub signature.  So let's
19:59 dalek rakudo/nom: test the named part first.
19:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/693be1ddbb
19:59 psch JRaspass: i don't think so.  you're changing the keys and values, not the Hash
19:59 JRaspass hmm, okay
20:00 JRaspass i guess private attr, and reader is the way to do it then
20:00 psch JRaspass: what exactly is your use case?
20:01 JRaspass running a method will set this hash, for later reading by the caller
20:02 skids m: my %f := Map.new; %f = (a => 1); %f.say; %f{"a"} = 2;
20:02 camelia rakudo-moar 3ac34a: OUTPUT«Map.new((:a(1)))␤Cannot modify an immutable Int␤  in block <unit> at /tmp/SYrPCXS56d line 1␤␤»
20:02 psch m: my %f := Map.new; %f = (a => 1); %f.say; %f{"b"} = 2;
20:02 camelia rakudo-moar 3ac34a: OUTPUT«Map.new((:a(1)))␤Cannot modify an immutable Nil␤  in block <unit> at /tmp/Opk2TNScZY line 1␤␤»
20:03 psch JRaspass: i don't quite understand your use case from that description.  as in, the description to me sounds like you want just one method that returns a Map
20:03 avenj joined #perl6
20:04 JRaspass so the idea is you call $foo.run, that returns the result, but %foo.observations would contain stuff about the last run, and it just felt cleaner to make that readonly
20:04 JRaspass not a big dead
20:04 JRaspass *deal
20:04 psch oh
20:04 JRaspass it's for P6 scientist :-P
20:06 psch m: sub f { my %h = a => 1, b => 2; "foo" but role { has $.map = %h; method AT-KEY($key) { $.map{$key}} } }; my $result = f; say $result; say $result{'a'}
20:06 camelia rakudo-moar 3ac34a: OUTPUT«foo␤1␤»
20:06 psch JRaspass: just stuff it all into the return value :P
20:06 psch *of .reun
20:06 psch *run
20:06 JRaspass run() is meant to return the same thing the candidate code would have returned, the obvservations have to be side channel :-(
20:07 JRaspass https://github.com/lancew/ScientistP6 which is a port of https://github.com/github/scientist
20:08 psch JRaspass: ah.  well, then return a Map that wraps the private Hash that has the observations, probably...
20:08 psch in .observations that is
20:08 JRaspass goes off to learn Map vs hash, still very much a perl5er
20:09 mst this is both batshit and rather cool: https://github.com/pannous/english-script/blob/master/DOSSIER.md
20:09 skids m: my %f := Map.new; %f.WHICH.say; %f = (a => 1); %f.say; %f.WHICH.say; %f{"b"} := 2; %f.say; %f.WHICH.say; # -^O^-
20:09 camelia rakudo-moar 3ac34a: OUTPUT«Map|66761944␤Map.new((:a(1)))␤Map|66761944␤Map.new((:a(1)))␤Map|66761944␤»
20:10 * [Coke] ponders submitting a talk for dc-baltimore and wonders what perl 6 topic would compress into 25minutes.
20:10 JRaspass yeah Map looks good, thanks psch
20:11 psch JRaspass: skids++ brought it up first (and demonstrated how to break the interface just now as well...) :)
20:14 JRaspass p6: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar.keys.say; Foo.new.bar = ()
20:14 camelia rakudo-moar 693be1: OUTPUT«(a)␤»
20:14 skids psch: likely it's my fault in the first place for complaining you couldn't Map.new() when people were busy on other stuff.
20:15 skids *Map.new(stuff)
20:15 JRaspass p6: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar = ()
20:15 camelia rakudo-moar 693be1: ( no output )
20:15 JRaspass hmm, ^ that throws for me
20:16 skids star: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar = ()
20:16 camelia star-m 2015.09: OUTPUT«5===SORRY!5===␤Type 'Map' is not declared. Did you mean 'Tap'?␤at /tmp/WBQOTZriZL:1␤------> 3class Foo { has Map7⏏5 $.bar = Map.new((:a(1))) }; Foo.new.bar␤Malformed has␤at /tmp/WBQOTZriZL:1␤------> 3class Foo { has7⏏5 Map $.bar = Ma…»
20:16 skids star: class Foo { has Map $.bar = HashMap.new((:a(1))) }; Foo.new.bar = ()
20:16 camelia star-m 2015.09: OUTPUT«5===SORRY!5===␤Type 'Map' is not declared. Did you mean 'Tap'?␤at /tmp/m5hnDvuGEi:1␤------> 3class Foo { has Map7⏏5 $.bar = HashMap.new((:a(1))) }; Foo.new␤Malformed has␤at /tmp/m5hnDvuGEi:1␤------> 3class Foo { has7⏏5 Map $.bar = Ha…»
20:16 skids star: class Foo { has HashMap $.bar = HashMap.new((:a(1))) }; Foo.new.bar = ()
20:16 camelia star-m 2015.09: OUTPUT«5===SORRY!5===␤Type 'HashMap' is not declared␤at /tmp/tcnq0aQCGV:1␤------> 3class Foo { has HashMap7⏏5 $.bar = HashMap.new((:a(1))) }; Foo.new␤Malformed has␤at /tmp/tcnq0aQCGV:1␤------> 3class Foo { has7⏏5 HashMap $.bar = HashMap.new…»
20:16 skids grr.  is star really older than the Map rename?
20:16 psch m: say MapHash
20:16 camelia rakudo-moar 693be1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QI057w71lL␤Undeclared name:␤    MapHash used at line 1. Did you mean 'BagHash', 'MixHash'?␤␤»
20:16 psch star-m: MapHash
20:16 skids Oh, EnumMap
20:16 camelia star-m 2015.09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JgasrpFCl7␤Undeclared name:␤    MapHash used at line 1. Did you mean 'BagHash', 'MixHash'?␤␤»
20:17 psch oh right
20:17 psch m: class C { has %!h; method run { %!h<a> = 1; "success" }; method obs { Map.new(%!h) } }; my $c = C.new; my $r = $c.run; my $m = $c.obs; $m<c> := "foo"; say $c.obs
20:17 camelia rakudo-moar 693be1: OUTPUT«Map.new((:a(1)))␤»
20:17 mst skids: it's running 2015.09, why not use the 'm:' one?
20:17 psch JRaspass: ^^^ that's how i'd do it
20:17 skids Wondering why it throws for JRaspass:
20:17 skids ^^mst
20:18 psch JRaspass: 'cause that way %!h stays immutable and the caller gets a fresh Map whenever .obs gets called, which they can do whatever they want to with
20:18 yqt joined #perl6
20:18 JRaspass makes sense
20:18 JRaspass yeah, i like that
20:18 psch JRaspass: you might want to get rakudobrew and 2016.01 though :)
20:19 JRaspass This is Rakudo version 2016.01.1 built on MoarVM version 2016.01
20:19 JRaspass is what i have atm
20:19 psch oh
20:19 psch *that* is interesting
20:19 psch when was the Map rename then..?
20:19 skids star: class Foo { has EnumMap $.bar = EnumMap.new((:a(1))) }; Foo.new.bar = () # yeah, regression at some point.
20:19 camelia star-m 2015.09: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/dHYQV9DrKc:1␤␤»
20:20 psch m: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar = () # yeah, regression at some point.
20:20 camelia rakudo-moar 693be1: ( no output )
20:20 psch skids++
20:20 skids Now, who knows how to bisect...
20:21 vendethiel joined #perl6
20:21 psch skids: from a47d297339de8cafbfa69d59550dfefb4d0407a7 i guess?
20:21 psch that's the rename commit
20:21 psch well, maybe the 2015.09 tag is a better choice
20:22 skids That would be the lower end to start with.
20:23 * skids just knows this will end up blaming himself for the GLR slicing stuff.
20:26 kurahaupo joined #perl6
20:28 sandeep joined #perl6
20:28 sandeep left #perl6
20:29 timotimo RabidGravy: remember how i said i didn't have any hardware for music?
20:29 RabidGravy yaw
20:30 RabidGravy you just bought a drumkit?
20:30 Hotkeys AlexDaniel: I was considering it
20:30 Hotkeys but i need to figure out how to slang first
20:32 psch Bisecting: 1122 revisions left to test after this (roughly 10 steps)
20:33 psch skids: bisecting really isn't hard... :P
20:33 psch scnr
20:34 skids Do people just run git bisect and build by hand, or do you set up a test case and build commands to automate it?
20:34 psch i do it manually
20:34 timotimo RabidGravy: nope, i got a keyboard
20:34 timotimo a super expensive, shiny one
20:34 RabidGravy cool
20:34 timotimo at has all the keys and all the voices
20:34 timotimo and so many buttons
20:34 psch as in, git bisect; perl Configure.pl $args; git bisect {good,bad} # etc
20:35 psch well, with switching to the install/bin screen to run the test case
20:35 timotimo it's a yamaha psr-200
20:35 RabidGravy akai? m-audio?
20:35 skids psch: oh, so I wasn't missing some clue then.
20:35 timotimo does that ring a bell?
20:35 timotimo of course it does
20:35 timotimo because it has a bell sampled!
20:35 psch skids: nah, bisect is actually quite easy if done manually.  there's probably a bunch of tricks to do it nearly fully automagically, but well
20:35 RabidGravy ah okay, yamaha make nice keyboards
20:35 Hotkeys before I knew what bisect was
20:36 Hotkeys I manually downloaded and chose commits
20:36 Hotkeys and tried them
20:36 Hotkeys : )
20:36 timotimo well, it's apparently only 61 keys?
20:36 psch :o
20:37 psch my roommate has a rhodes 1 stage piano which she can't get rid of because no one wants a 73 key piano
20:37 psch well, e-piano
20:37 Hotkeys that's a strange number of keys
20:38 timotimo RabidGravy: i was lying. this keyboard is older than me, and i didn't pay a single dime for it
20:38 tweakism Hotkeys: you should know :)
20:38 skids 3d print a housing to cover extra keys :-)
20:38 timotimo RabidGravy: it doesn't seem to have velocity support
20:38 Hotkeys I would say 73 isn't very hot
20:38 Hotkeys i only deal in hot keys
20:38 psch skids: the trouble is more that people would rather like 88 keys :S
20:39 psch Hotkeys: https://www.youtube.com/watch?v=ozJtjm3TbAI same model, different device
20:39 timotimo http://usa.yamaha.com/products/musical-instruments/keyboards/digitalkeyboards/portable_keyboards/psr200/ - this is the beast in question
20:39 psch although i'm not exactly sure on the year of assembly for the one of my roommate
20:39 RabidGravy timotimo, I have a very old yamaha electronic pia in the corner propped up by an even older vox bass amp
20:39 RabidGravy piano
20:40 RabidGravy psch, I'd go a rhodes if I had room
20:41 psch hm, actually iirc it's missing either one or two hammer heads, so it's probably actually a 71 or 72... vOv
20:41 psch not sure whether that makes it more or less hot :P
20:42 tweakism it would be hotter if it were 69 keys
20:42 tweakism so break a couple more
20:42 skids .oO(typical IRC channel, buncha people all bragging about the size of their pianos)
20:43 [Coke] Is Brock Wilcox on this channel?
20:43 RabidGravy I actually only have four instruments with an attached keyboard, the aforementioned yamaha, an alesis ion, novation bass station and a korg micro sampler
20:43 [Coke] or Brian Duggan?
20:43 RabidGravy all the other synths I use a controller
20:43 [Coke] awwaiid: ping.
20:44 psch i'm lots cheap, every synth i use is free or freeware :S
20:45 psch and then there's the obligatory guitars, but eh :9
20:46 psch RabidGravy: well, it's not like the stage piano is particularly large, although i can definitely see how one can be missing the room for it
20:46 [Coke] stage piano, prod piano, dev piano.
20:46 psch RabidGravy: although i neither have the authority nor desire to attempt to try and sell my roommates keys for her... :)
20:48 geekosaur except the stage is prod >.>
20:49 tmch joined #perl6
20:50 musiKk_ joined #perl6
20:50 patrickz joined #perl6
20:53 labster joined #perl6
20:55 patrickz Hey!
20:56 nchambers joined #perl6
21:00 zpmorgan joined #perl6
21:00 kjs_ joined #perl6
21:06 timotimo RabidGravy: sadly, i don't have any idea about music, piano, notes, whatever
21:09 SCHAAP137 joined #perl6
21:15 RabidGravy music is all maths :)
21:15 RabidGravy well maths with wiggle room
21:15 tweakism people say that, but I don't really buy it
21:16 psch it's true though
21:16 psch the wiggle room is usually called "swing" in the temporal domain and "jazz" in the frequency domain
21:16 tweakism yeah that's one part of it, there's a lot of stuff in music that's not done the mathematical/logical way because it doesn't sound as good
21:16 psch nah, that's wrong
21:17 psch the wiggle room can be explained mathematically as well
21:17 tweakism like how you tune a piano sharp on the high side and flat on the low side
21:17 tweakism psch: everythign can be explained mathematically
21:17 psch *that* i don't think is true
21:18 tweakism nonetheless, I love me a good fugue.
21:18 RabidGravy I re-read  http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf yesterday
21:21 psch hrm, i think that was impulsively contrarian.  the previous line, that is
21:21 psch i don't have an informed opinion on whether everything can be explained mathematically
21:22 psch i think what tripped me up was the conjunction of 'mathematical' and 'logical', but well, never mind
21:23 tweakism yeah, every way I have thought of so far to advance this conversation leads to philosophical questions we could argue for hours.
21:23 tweakism or years.
21:24 geekosaur there are certainly mathematical aspects to it, but it's rather more complex than just a series of equations. (example, the distortions introduced by mathematically derived Western chromatic scales.. which use a different mathematical technique than natural scales that is more conducive to switching keys)
21:24 cdg joined #perl6
21:24 patrickz Are there any design docs about the regex engine? I'm more or less completely unknowing of the core and 'd like to get some overview (I do know about jnthns internals course).
21:25 psch patrickz: i don't think we have any design-to-the-metal docs on that, no.  src diving is probably your best bet, as scary as that may be
21:25 * perlpilot waits for someone to mention a *good* mathematical treatment of turbulence   ;)
21:25 skids It's made entirely of dragons and turtles :-)
21:26 * patrickz had his hands in NFA.pm and didn't find what he searched for at first go
21:27 patrickz @skids: At least *that* hasn't changed from p5...
21:27 perlpilot patrickz: what are you looking for?
21:27 skids nqp/src/QRegex/ is probably where to read.
21:27 sortiz joined #perl6
21:27 prammer joined #perl6
21:28 sortiz \o #perl6
21:29 skids Also the environment variable NQP_NFA_DEB is fun.
21:33 colomon joined #perl6
21:35 patrickz that output is huge...
21:36 kjs_ joined #perl6
21:36 timotimo yeah
21:37 patrickz Still managed to find the part I was looking for I think. :-)
21:41 [Sno] joined #perl6
21:43 Psyche^_ left #perl6
21:44 RabidGravy psch, just playing a Concrete DJz mix through Audio::PortAudio right now and it's all good
21:45 vendethiel :P
21:46 psch RabidGravy: nice!  which drive?
21:46 psch oh, and what kind of interface
21:46 RabidGravy of course it's eastern european techno, it could be at a random speed and totally messed up and I wouldn't be any the wiser
21:46 psch ...
21:46 RabidGravy just the default output so far
21:46 psch so pulseaudio through alsa probably?
21:46 RabidGravy yeah
21:47 RabidGravy will test with jack tomorrow probably
21:47 psch that only pushes me stronger to wonder about your hw interface :)
21:47 psch i have some AC'97 compat onboard thingy here, which didn't do anything but underrun through pulseaudio/alsa at 44.1k
21:48 psch oh, nvm
21:48 psch you're not feeding live-generated data into it
21:48 psch that's probably the bottleneck anyway
21:48 dalek rakudo/nom: 4f5831f | lizmat++ | src/core/Parameter.pm:
21:48 dalek rakudo/nom: Make Parameter.ACCEPTS a bit smarter
21:48 dalek rakudo/nom:
21:48 dalek rakudo/nom: - non-optional is tighter than optional
21:48 dalek rakudo/nom: - non-slurpy is tighter than slurpy
21:48 dalek rakudo/nom:
21:48 dalek rakudo/nom: All part of a cunning plan to make Signature.ACCEPTS a lot simpler.
21:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4f5831f563
21:48 psch lizmat++
21:49 RabidGravy "Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller"
21:50 psch RabidGravy: in any case, getting somewhere usable with native live data would be amazing, but i suppose that's not quite in the "what to hack on" area of either of us... :)
21:50 psch as in, it's probably a lot of moar internals hackery... vOv
21:51 prammer joined #perl6
21:52 RabidGravy I reckon, you probably could do live generated data, just have the generator run as fast as possible and feed a channel which can do stuff at the right speed
21:52 RabidGravy I'll play with that tomorrow too :)
21:53 psch well, test.pl in that same repo does feed live generated data into the interface
21:53 psch (i am aware a file named "test.pl" doesn't really belong into a module... :P )
21:54 psch i have no idea what might have changed since i last ran that, though, so maybe it already works
21:54 psch i guess CArray might have become noticeably faster
21:55 RabidGravy well stuff is faster and num carrays work properly, I did notice that I can push the bit rate up higher on streaming now a while back
21:56 psch nice
21:56 psch well, let me know what your playing around tomorrow brings about :)
21:57 RabidGravy and I'm actually surprised that I can actually make a streaming server with multiple clients at 320k
21:59 bbkr hi. short article for those who need to deal with mixed Perl 5 and Perl 6 tests: http://blogs.perl.org/users/pawel_bbkr_pabian/2016/03/perl-6-hack-attack-mixed-perl-5-tests.html
22:05 tadzik 
22:05 tadzik hmm, what did I jus tpaste
22:06 tadzik .u 
22:06 yoleaux U+FFFC OBJECT REPLACEMENT CHARACTER [So] ()
22:12 hahainternet is there an easy way to get a list of codepoints that match a unicode property? like being a 'letter' for example?
22:12 hahainternet i guess i should go read the regex docs page, brb!
22:15 patrickz state 1 is start, state 0 is success and state -1 is failure, correct?
22:19 dalek rakudo/nom: 59adbef | lizmat++ | src/core/Parameter.pm:
22:19 dalek rakudo/nom: Don't bother testing if all flags are the same
22:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/59adbefdef
22:20 hoelzro hahainternet: (^1048576).map(*.chr).grep(/<:Letter>/)
22:21 hahainternet hoelzro: i guess that works, is 2^20 the highest unicode codepoint?
22:21 hoelzro currently, yes
22:21 hoelzro (unless they added some behind my back)
22:21 hahainternet ok then, here's another question, how would i nicely make that into a list of ranges? i was reading the wikipedia article when you wrote that to find out what i could iterate lol
22:22 lizmat good night, #perl6!
22:22 hoelzro night lizmat!
22:22 hoelzro hahainternet: why do you need ranges? what exactly are you trying to do?
22:23 hahainternet hoelzro: it's just playing around mostly, generating random text
22:23 hahainternet it'd be nice if it was text, rather than random punctuation or diacritics etc
22:23 hoelzro ahhh
22:23 hahainternet mostly this is an excuse to play with perl6, so there's no need to actually help me :)
22:23 hoelzro play is the highest form of research =)
22:24 tweakism 0x10FFFF is the highest possible codepoint, unless they increase it.  which is unlikely.
22:25 hahainternet it looks like that's the supplementary private use area thoughs
22:25 hahainternet so the first few planes would be fine regardless
22:25 tweakism 0x100000 is the beginning of the same plane.
22:26 tweakism (2^20.)
22:29 hoelzro m: my $fibs = 1, 1, * + * ... *;
22:29 camelia rakudo-moar 4f5831: OUTPUT«Memory allocation failed; could not allocate 1056 bytes␤»
22:29 hoelzro ^ on a side note, I thought that wouldn't expand the whole list?
22:29 Hotkeys lol
22:29 hoelzro m: my $fibs := 1, 1, * + * ... *;
22:29 camelia rakudo-moar 4f5831: ( no output )
22:29 psch m: my @f = 1, 1, * + * ... *;
22:29 camelia rakudo-moar 4f5831: ( no output )
22:30 hoelzro that does the trick; but I thought it was just assigning to an @ variable that would flatten it
22:30 hoelzro wait, what
22:30 timotimo since the GLR you no longer have to := that kind of thing
22:30 hoelzro timotimo: why doesn't assigning to a scalar variable work, though?
22:31 * psch doesn't try to pretend to understand laziness vOv
22:31 psch which is curious, as i do spend a notable amount of time doing non-productive things
22:31 psch *rimshot*
22:34 Hotkeys m: $_.say
22:34 camelia rakudo-moar 59adbe: OUTPUT«(Any)␤»
22:34 Hotkeys m: get
22:34 camelia rakudo-moar 59adbe: ( no output )
22:34 Hotkeys m: get.say
22:34 camelia rakudo-moar 59adbe: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
22:34 Hotkeys :DF
22:35 timotimo dunno?
22:35 psch i'd guess that a scalar has be assigned a known quantity
22:35 nine m: my $fibs = (1, 1, * + * ... *);
22:35 camelia rakudo-moar 59adbe: ( no output )
22:35 psch ...that's just weird
22:36 nine m: my $a = 1, 2, 3;say $a;
22:36 camelia rakudo-moar 59adbe: OUTPUT«WARNINGS for /tmp/UZcNijoWbt:␤Useless use of constant integer 2 in sink context (lines 1, 1)␤Useless use of constant integer 3 in sink context (lines 1, 1)␤1␤»
22:36 nine Does this make it clear? :)
22:36 psch nine++
22:36 ugexe `get` is a routine for IO::Handle
22:37 psch infix:<=> associativity depending on the sigil on the LHS might become a FAQ
22:37 Hotkeys I think it also works on $*IN by default
22:37 Hotkeys on its own rather
22:39 telex joined #perl6
22:39 psch i mean, i do recall there's list assignment and item assignment, but it does obviously trip me up occassionally
22:39 hoelzro ah ha
22:39 hoelzro thanks nine
22:50 colomon joined #perl6
22:52 sortiz timotimo, The problem isn't even CArray related, seems Capture related: given $buf = Buf.new(0 xx 1000) and sub foo(*@vals) { }; 'foo($buf.list)' is 20x slower than 'my @li = $buf.list; foo(@li)', any ideas?
22:53 timotimo sortiz: hm, maybe it's hitting the slurpy candidate?
22:53 psch doesn't $buf.list mean "rebox this as a List instead of a native array"?
22:54 psch 'cause afair Bufs are native uint8 (i think 8?) arrays under the hood
22:54 themonkeybob11 joined #perl6
22:54 psch m: my $x = Buf.new(0 xx 1000); $x[0].WHAT.say; $x.list[0].WHAT.say
22:54 camelia rakudo-moar 59adbe: OUTPUT«(Int)␤(Int)␤»
22:54 psch ... but .WHAT is unreliable there ._.
22:55 psch m: use nqp; my $x = Buf.new(0 xx 1000); say nqp::istype($x[0], Int); say nqp::istype($x.list[0], Int) # ok, i'm probably wrong
22:55 camelia rakudo-moar 59adbe: OUTPUT«1␤1␤»
22:56 psch well, except there's some kind of autoboxing there as well...
22:56 sortiz $buf.list returns a Seq https://github.com/rakudo/rakudo/blob/nom/src/core/Buf.pm#L93
22:57 spider-mario joined #perl6
22:58 sortiz And 'my @arr = $buf.list' don't have any regression.
22:59 psch yeah, that does strongly point at something around the Binder
22:59 psch Capture seems like a good guess from here, but i should probably head to bed instead of trying to optimize... :)
22:59 aindilis` joined #perl6
23:01 cdg joined #perl6
23:01 stmuk joined #perl6
23:02 pdcawley joined #perl6
23:03 Some-body_ joined #perl6
23:03 bbkr_ joined #perl6
23:04 m0ltar joined #perl6
23:04 cpage joined #perl6
23:05 japhb joined #perl6
23:05 TreyHarris So I just stepped through the permutations skids and psch talked about above and put each into a separate file: https://gist.github.com/treyharris/7eb7494563ee5b759b30
23:05 TreyHarris It pretty much acts exactly like you surmised it would
23:06 psch TreyHarris: does the second snippet work with the named before the positional?  as in "-d add 2 3"?
23:07 TreyHarris So I think if you want to do the equivalent of what, say, MooseX::App lets you do, you'd have to do the argument processing yourself; I think you could use multis, they just wouldn't be multi MAIN
23:07 psch TreyHarris: never midn
23:07 psch i notice that's the lines before... :)
23:07 tinita joined #perl6
23:07 * psch adds a notch to the "go to sleep, the bisect will be here tomorrow" tally
23:08 psch that's a limitation i'm tentatively expecting to change eventually, fwiw
23:08 sortiz timotimo, psch, Benchmark details in https://gist.github.com/salortiz/4ef300b4d7f2e9738024
23:09 shmibs joined #perl6
23:09 psch TreyHarris: :d(:$double) in the proto not translating properly should be RT'd i think
23:09 TreyHarris but I think if you wanted to do MooseX::App-like subcommands, you'd be better off dispatching to different things for each subcommand (probably methods of various classes)
23:09 psch m: proto f(:d(:$do)) {*}; multi f(*%) { say "ok" }; f :d
23:09 camelia rakudo-moar 59adbe: OUTPUT«ok␤»
23:09 psch m: proto f(:d(:$do)) {*}; multi f(*%) { say "ok" }; f :do
23:09 camelia rakudo-moar 59adbe: OUTPUT«ok␤»
23:10 psch hmm, maybe that's only MAIN..?
23:10 psch weird
23:11 TreyHarris psch: yeah, that one's confusing
23:11 psch 04 is completely as expected to me, fwiw
23:11 psch and 05 is the logical progression from that
23:12 psch TreyHarris++ # good science there
23:12 psch TreyHarris: can you RT the confusing one?
23:13 TreyHarris yep. why adding code to the MAIN proto makes the short option work is a little bewildering.
23:13 TreyHarris psch: i couldn't get into RT earlier, I got an internal website error. let me try again
23:14 psch TreyHarris: if nothing else works just email it there, iirc rakudobug@perl.org
23:14 psch i'll hit the hay now, probably about half an hour overdue, actually :)
23:14 TreyHarris yeah, still, I get "Possible cross-site request forgery"
23:14 TreyHarris I'll email.
23:15 |Sno| joined #perl6
23:16 kid51 joined #perl6
23:16 adu joined #perl6
23:17 TEttinger1 joined #perl6
23:18 vendethiel joined #perl6
23:26 japhb joined #perl6
23:27 kid511 joined #perl6
23:31 dalek rakudo-star-daily: eeb91d0 | coke++ | log/ (9 files):
23:31 dalek rakudo-star-daily: today (automated commit)
23:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/eeb91d012b
23:33 skids joined #perl6
23:39 Vlavv_ joined #perl6
23:43 [Coke] ugh, talk submissions closed on yapc::na.
23:49 perigrin as of March 1st
23:49 perigrin you can pester genehack to see if he _might_ entertain taking a late submission
23:52 ridthyself joined #perl6
23:54 pnu joined #perl6
23:54 ridthyself hello everyone! How do I include a .p6 file from within the REPL?
23:55 Juerd "Including" files isn't really done in this part of the programming world
23:55 ridthyself oh
23:55 Juerd We tend to write modular code, and load modules. That's comparable to including but not really the same thing.
23:56 ridthyself I messed around with EVAL slurp, is that what you mean?
23:56 Juerd I think you're looking for EVALFILE
23:56 Juerd But note that eval'ing code isn't the same as including it as it would be in some other languages.
23:57 Juerd For example, the eval'ed code has its own lexical scope. "my" variables declared there won't stay around.
23:57 ridthyself i see...
23:58 ridthyself I would like to test my code from the REPL, how would I do that?
23:58 Juerd Also, if the eval'ed code throws an exception that isn't caught, it doesn't halt the entire program
23:58 Juerd You can use EVALFILE but I personally don't understand why you'd use the repl for that.
23:59 Juerd What's wrong with bash? :)
23:59 Juerd Or another fine shell

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

Perl 6 | Reference Documentation | Rakudo