»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
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
00:02 cpage_ joined
rudi_s (Oh and is there a way to speed-up the nativecalls, they are really slow on my system.) 00:02
00:03 bpmedley left
skids rudi_s: some amount of unsigned support is not yet implemented, is why. 00:03
00:03 jack_rabbit joined
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:04 Laurent_R left
skids Yeah that has irked me a bit, too. 00:05
timotimo skids: you're basing your message on outdated information 00:07
we have much more signed/unsigned support than we used to
and signed/unsigned works properly in nativecall i think
00:07 agent008 left
skids Oh I know it was improved but still there are places. 00:07
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:08 firstdayonthejob left
timotimo in any vase, all the variants that end in numbers exist 00:09
down to a single byte
rudi_s Yeah, they are platform-dependent. That's exactly why they would be nice to have ;-)
00:10 agent008 joined, tweakism left
timotimo you can always have them as constant and defined "properly" with a BEGIN block 00:11
i wonder why "long" isn't the right thing for you
rudi_s timotimo: I know. - Because int != long.
When the C header declares int, then I'd like to use whatever is int on that system. 00:12
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.)
rudi_s timotimo: ;-)
skids: True.
timotimo i wonder what happens when we "is ctype('int')"
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.)
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 vendethiel left
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
like, on every call to a native function, we basically re-handle what number of arguments we have again
and our dynamic optimizer (aka spesh) doesn't even turn on for those calls at all whatsoever
00:17 tweakism joined
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
in any case, this year we'll see either a super good speed-up of how it's done currently, or a rewrite
and when that rewrite comes, we'll be jitting calls to native functions the exact same way a C compiler would 00:18
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?
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:19
timotimo oh 00:20
can you tell if it's pre-compiling at all?
i.e. by looking at what --stagestats spits out? 00:21
rudi_s timotimo: Ah, it gets much faster on the second run (14s vs. 2s). 00:23
00:24 molaf left
rudi_s When does it get recompiled? When the source file with the nativecall is modified or if any file is modified? 00:24
AH, seems to happen only if the nativecall file is modified. That's good. 00:25
timotimo yup
rudi_s Still takes quite a long time.
But much faster than in previous perl6 releases.
\o/
00:27 bpmedley joined, TEttinger joined
timotimo oh yes 00:27
i'm not entirely sure why compiling native-call-containing source files; how many native calls are in that file? 00:28
00:29 johndau joined
rudi_s timotimo: 20 00:30
timotimo hmm
rudi_s First run takes 7s (stage parse), second still 1.5 (stage parse) - not doing anything just parsing the file.
timotimo yeah, stage parse includes time spent in "use" 00:34
and it's "inclusive time" of course 00:36
00:39 keix left 00:41 yeahnoob joined 00:49 NickyPerlPerl joined, idiosyncrat_ joined
NickyPerlPerl NickyP rockin da chat 00:50
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? 00:52
01:02 cpage_ left, Actualeyes joined 01:03 BenGoldberg joined, NickyPerlPerl left 01:10 cajone joined 01:11 sufrostico left, kent\n left 01:17 cpage_ joined 01:19 kent\n joined, kent\n left, kent\n joined 01:20 keix joined
dalek rl6-most-wanted: d3a1158 | (Aleks-Daniel Jakimenko-Aleksejev)++ | most-wanted/bindings.md:
Added spidev

spidev is required if you want to use SPI on RPi or any other linux board
01:29
01:30 cdg left 01:33 cdg joined 01:41 zpmorgan joined 01:42 khw left
rudi_s my $r = /(.)(.)/; 01:44
for <ab bc cd> { if $_ ~~ $r { say "$0 $1" } }
Yields Use of Nil in string context in block at <unknown file> line 1
Use of Nil in string context in block at <unknown file> line 1
What am I doing wrong? 01:45
(It works when I put my $r = and the for in the same line in an interactive perl6.)
skids That is kinda weird. 01:50
looks like $/ is not set at all. The ~~ is true, but $/ is Nil. 01:51
$r.ACCEPTS("aa").say is a correct Match object. 01:52
In fact, $r.ACCEPTS("aa") sets $/. Which... I don't know if that should happen or not. 01:54
rudi_s: I don't think you're doing anything wrong, I think this is a bug. 01:55
rudi_s skids: Should I report it? 01:57
01:58 cdg left
skids Seems like there is a similar one already: #126969 01:59
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126969
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
from a repl or what have you 02:01
rudi_s skids: Thanks.
skids Hotkeys: without using it? 02:08
02:09 dj_goku left 02:11 FROGGS_ joined 02:15 kalkin-- joined 02:16 FROGGS left
Hotkeys skids: with using it is fine 02:16
is there a how method that tells you
exported subs etc
skids m: use Test; Test::EXPORT::DEFAULT.WHO.keys.say
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…»
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.
Hotkeys I've got a sub is export
but when I try to use it 02:18
it says could not find symbol
02:18 kalkin- left
skids Sure it is defined in the namespace you think it is? 02:19
skids still doesn't quit grok "WHO", will have to remember to read up on it sometime. 02:20
Hotkeys I figured it out 02:22
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…»
skids
.oO(camelia is running on a pretty fast machine)
Or, wait I'm just way behind in patches probably. 02:29
02:33 vendethiel joined, john51 joined 02:34 kid51 left 02:36 [particle]1 left 02:37 [particle] joined 02:41 yqt left 02:47 ilbot3 left 02:48 ilbot3 joined 02:55 vendethiel left 03:19 FROGGS_ left 03:23 sortiz joined 03:24 sevvie joined
sortiz \o #perl6 03:25
Hotkeys o7 03:26
03:26 kent\n left 03:32 Actualeyes left 03:36 adu joined 03:43 BenGoldberg left 03:44 BenGoldberg joined, noganex joined 03:46 noganex_ left
sevvie (o,o)^ 03:57
adu hi
04:02 idiosyncrat_ left 04:05 labster left 04:06 cpage_ left
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:09
sortiz BenGoldberg, It's an interesting idea, I recommend creating a new RFC issue to be discussed. 04:23
04:28 jack_rabbit left 04:29 wamba joined, jack_rabbit joined 04:38 adu left 04:39 telex left 04:40 telex joined, cpage_ joined 04:43 yeahnoob left 04:45 BenGoldberg left 04:47 [Sno] joined, yeahnoob joined 04:48 tmch joined 04:49 Actualeyes joined 04:50 dwarring left, chris2 left, xiaomiao left, hacst left 04:51 sno left 04:52 Gothmog_ left, xiaomiao joined, Gothmog_ joined 04:53 hacst joined, chris2 joined
tweakism is AlexDaniel a regular here? 04:59
found him discussing the thing I'm trying to figure out in a log of here, via google. 05:00
sortiz .seen AlexDaniel
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?
tweakism yay, there is hope. 05:01
if you're curious, I'm trying to figure out how to properly assign <dead_greek> to e.g. AltGr+g 05:03
sortiz tweakism, You can leave him a message with .tell AlexDaniel ... 05:04
tweakism thanks.
05:12 skids left
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
TEttinger tweakism: <dead_greek> ? is that like dead sea scrolls? 05:29
tweakism heh. it's a key you press, and it makes the next key you press be a greek letter 05:30
so like, AltGr+g a → α AltGr+D → Δ 05:32
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:33
05:34 Cabanossi left 05:38 Cabanossi joined
TEttinger ah ok 05:39
I have an alt_gr key but I haven't done anything to set it up
err, AltGr
tweakism it does some stuff by default 05:40
Compose is a lot cooler and easier and more useful
TEttinger I think I have a US keyboard layout
windows 7 05:41
tweakism oh, ouch
well there's WinCompose
TEttinger I think I can change the layout
tweakism I use that on Windows. couldn't survive w/o it.
TEttinger thanks, installing 05:43
Hotkeys WinCompose is pretty dope 05:46
tweakism TEttinger: the real fun comes from adding custom symbols. the defaults are pretty dusty if you ask me. 05:52
there are lots of good resources for that shared on github.
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 / = → ≠
Hotkeys yeah 05:56
and you can use the same XCompose on both linux and windows
TEttinger ok, it recognizes left ctrl, but I actually use that as ctrl... 05:57
tweakism I have used caps lock and menu and maybe r_win before 05:58
it should work with any of the keys it lets you set
05:58 Gabriel_Hu left
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
sometimes it passes through
and I have to fiddle to get caps off again
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) 05:59
Hotkeys that doesn't actually do proper caps iirc 06:00
it's like sticky keys
it simulates you holding shift 06:01
TEttinger gah 06:04
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
oh, all diacritics
jdv79 i just tried to squeeze into my only suit pants i bought a decade ago and it aint happenin. 06:06
that's what beer does.
most of that beer was amazing btw. 06:07
06:09 TEttinger left, kent\n joined, TEttinger joined 06:27 k-man left 06:33 k-man joined
Hotkeys oh btw TEttinger with compose 06:35
you don't hold the key
I didn't realize that at first
06:45 CIAvash joined
tweakism TEttinger: yup, they're dead keys :) 06:47
which, Compose is also a dead key
a dead key is a key that you press and release, and it doesn't do anything immediately; it modifies whatever you press later
Hotkeys: I think WinCompose does let you toggle real capslock that way. you can probably choose whether you want capslock or shiftlock though. 06:48
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
I can pretty consistently toggle caps by hitting shift caps at the same time 06:50
TEttinger ah, thanks Hotkeys 06:52
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 gist.github.com/salortiz/6e2cb6607ae1387e3e13 07:03
yoleaux sortiz: I'll pass your message to timotimo.
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
sortiz boys and girls, see you later. 07:15
07:15 Humbedooh joined 07:17 FROGGS joined
FROGGS moritz: ping 07:18
07:18 [ptc]_ joined, [ptc]_ left 07:23 sortiz left 07:24 sjoshi joined
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
07:25 domidumont joined, Actualeyes left
FROGGS moritz / masak: it is damn foggy here and I dunno what happens next 07:25
07:26 gorgor joined 07:27 xinming_ joined 07:29 domidumont left 07:30 domidumont joined 07:31 xinming left, pierrot left 07:32 sevvie left 07:35 FROGGS left 07:36 labster left 07:37 nakiro joined 07:45 firstdayonthejob joined
[Tux] OOPS! 07:48
test 22.454
test-t 13.366
csv-parser 52.316
07:49 labster joined 07:50 jack_rabbit left 07:51 jack_rabbit joined 07:52 tmch left 07:55 fireartist joined 07:56 darutoko joined 08:02 rindolf joined
masak hi #perl6 from GPW 08:15
tweakism Good $greetingtime, $username! 08:16
masak how generic :) 08:18
though I guess I should be thankful the "Good" wasn't abstracted :P
or the cheerful exclamation mark at the end
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
except it would wait a random amount of time first, and it had a large repetoire of ways to say it
so it seemed realistic
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
masak tweakism: I understood everything except that last inferential step 08:20
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
08:21 rindolf left
masak a-ha :) 08:21
oh, that's what I was missing -- that from the outside, you and the bot looked like the same user
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.
unlike an IRC bot 08:23
_nadim good morning all 08:24
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:25
08:25 [Sno] left
_nadim I could cach the calls but I wonder if that would make any change 08:26
08:29 rindolf joined 08:36 zakharyas joined 08:37 dakkar joined, firstdayonthejob left 08:39 rindolf left, fireartist left
Hotkeys tweakism: that could easily be done with an irc bot though 08:39
just use a bouncer
tweakism sure 08:41
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:42
08:45 [Sno] joined 08:50 Laurent_R joined 08:52 kurahaupo joined, kurahaupo left, jack_rabbit left 09:02 zakharyas left 09:13 wamba left 09:24 ocbtec joined 09:25 pmurias joined
dalek p: cc3b913 | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Fix typo.
09:25
09:32 kjs_ joined
_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:36
09:41 sjoshi left
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 gist.github.com/salortiz/6e2cb6607ae1387e3e13
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)
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.
timotimo ohai jnthn :) 09:44
09:44 RabidGravy joined
_nadim complicatd signature but empty bosy 09:45
jnthn _nadim: Then depends on what kind of complicated. :)
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))
jnthn timotimo: I think Buf is unsigned anyway?
_nadim: Yeah, the sub-signature will blow it up
timotimo we don't lower sub-signatures at all yet, right? 09:47
_nadim then I'll stick with an extra if :)
jnthn timotimo: Correct
timotimo it would potentially be not terribly hard to do
jnthn Even when we do, I suspect the code size produced by those unpacks will push things over the inline limit
timotimo that's the static inline limit, yeah? 09:48
jnthn Yeah
timotimo OK
jnthn Well, depends what you mean
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.
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:50
jnthn timotimo: But that never applies to methods 09:51
timotimo ah
OK, that shouldn't surprise me at all :)
jnthn timotimo: Plus I think I'm going to make it only do it for subs with native args
_nadim and in the method above, that would mean, I hoped, not handling any of the arguments.
jnthn _nadim: Yeah, but you're basically using signatures there to describe a set of checks on the shape of the passed data structure
_nadim: Which will die if the shape doesn't match 09:52
So we can't just go eliding it
In Perl 5 terms you'd probably have a few lines of code replacing that signature
Maybe 5-6
09:54 zpmorgan left
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.
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
_nadim jnthn: yeah right ! :) 09:58
timotimo (if it's not dirt cheap, we can look into this particular case and make it better)
_nadim Nah! I like complex signatures, makemy life easier
os there some kind of Time::HiRes to time pieces of code? 09:59
is there
timotimo well, "now" is already rather hi-res
_nadim ok 10:00
timotimo m: sub timethis { (1 xx 1000).list; say now - ENTER now }; timethis; timethis;
camelia rakudo-moar 4a0ba7: OUTPUT«0.00204415␤0.0002870␤»
timotimo i suppose .list is rather a no-op yet
in this case
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␤»
_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.
timotimo no, it's just somewhat fast
sorry :S
_nadim I'll find something you write too slow and toture you with it!
timotimo what exactly is faster than what "fast version"? this is still about Data::Dump::Tree? 10:02
_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
that's good to know
i'm really glad to hear you were able to make it faster :)
_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"?
i *think* you wouldn't even ever match "Mu"; maybe "(Mu)", though
_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
Yes I Mus when I dump callframes
writing a dumper is fun, you always get stuff you don't want 10:06
timotimo yeah, i suppose :)
_nadim Anyway, .gist doesn't cut it for me, anything a bit big and complex and it is unreadable. 10:07
timotimo aye
DDT is helpful
_nadim I need something that can show me a quarter million lines dump without making me crazy
10:07 fireartist joined
_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:08
a DHTML version with collapsing is also helpful. 10:09
10:09 sjoshi left
timotimo i want something like that for QAST dumps 10:09
_nadim QAST? where do you get one as a perl data structure? 10:10
10:10 johndau left
timotimo in nqp-land :P 10:11
_nadim well, can it be parsed to P5 or P6?
timotimo the output is disgusting, you don't want to parse that 10:12
_nadim can it be output in XLM, JSON, or whatnot?
timotimo my plan was to turn the output into a json format
or rather, offer that in addition 10:13
you can see an example by giving your perl6 a --target=ast or --target=optimize
_nadim then DDT can help, get onto it ;)
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
dalek p: 8f82c9a | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::{sinh,cosh,tanh,atan2,sec,asec,sech}_n ops.
p: 75192d6 | (Pawel Murias)++ | t/nqp/83-math.t:
Test a bunch of trygonometric ops.
timotimo one thing i desire most is to be able to turn on/off the :BY and :context and stuff output 10:15
it really distracts me, and i don't even know what the individual parts mean :P
_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:15 Sgeo__ left
_nadim well, output typed JSON and you can use DDT filters to get only what you want 10:16
timotimo that does sound nice 10:18
maybe i'd also want to test DDT against the json output our profiler can spit out
for performance reasons, maybe it'd have to be the perl5 version if it's for a multi-hundred-megabyte file, though
10:21 labster left
_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
_nadim DDT knows P6 only. my $parsed = JSON::Tiny::Grammar.parse($JSON) ; dump($parsed) 10:23
timotimo why would you go via the Grammar?
_nadim so, very easy
RabidGravy I've just done a quick survey, I appear to have 12 modules in various degrees of "in progress"
10:24 sjoshi joined
_nadim RabidGravy: that's more a symptom IMO ;) 10:24
timotimo: hmm, why did I use the grammar, hmmm, don't know :)
timotimo: well, I wanted the Match objects to display, not a P6 structure 10:25
timotimo the annoying thing about the match objects is that it has the "orig" thing everywhere 10:26
_nadim that a 5 lines handler to write for DDT and orig is gone 10:27
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
but for the root node, that's still the whole source text :) 10:30
_nadim IE:
└string => "'\"markup\"' [524..532| "·ᴹᵃᵗᶜʰ ᶝ⁹⁷
└str => "'markup' [525..531| "·ᴹᵃᵗᶜʰ ᶝ⁹⁸
timotimo: that can be fixed with a filter or you can write the 5 line handler and just display the first x characters 10:32
10:34 TEttinger left
_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:35
imgur.com/hgQsps6 10:38
timotimo that's cute
_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:43
10:49 labster joined 10:50 gorgor left
tadzik nine: I'm considering to always "force" module installation in panda 10:51
10:51 [particle] left
tadzik I don't think there is a single case where someone is happy to see "module already installed" 10:51
10:51 [particle] joined
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:51
tweakism haha 10:52
10:53 kurahaupo joined
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
timotimo users will complain to them, hopefully, and make them remember? maybe?
10:55 kjs_ left
tweakism who cares cares what users think? pff. 10:55
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 11:04 zakharyas joined, rindolf joined 11:10 labster left 11:14 musiKk_ joined, edehont joined 11:17 kurahaupo left 11:20 virtualsue joined
jnthn m: Uni.new(0xfacf).Str 11:23
camelia ( no output )
jnthn m: say "\xfacf"
camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
jnthn hmm 11:24
m: Uni.new(0xfacf).NFC
camelia ( no output )
jnthn m: Uni.new(0xfacf).NFC.Str
camelia ( no output )
jnthn m: "\xfacf"
camelia rakudo-moar 4a0ba7: OUTPUT«WARNINGS for /tmp/J3EGjTKa3k:␤Useless use of constant string "𢡊" in sink context (line 1)␤»
jnthn m: my $a = "\xfacf"
camelia ( no output )
timotimo that's the one where we go through some replacement mechanism into an uninitialized (or something) plane? 11:25
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
sort of amusing it's only the say
of well
jnthn (Fix was just correcting a dumb thinko)
timotimo that's good :)
jnthn m: my $a = "\xfacf"; say $a 11:27
camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
timotimo dumb thinkos are only easy to find if you know what the code's supposed to be in the first place :D
jnthn m: "\xfacf".encode('utf-8')
camelia ( no output )
11:27 virtualsue left
timotimo since you're already in the unicode and encoding area of things, is utf8-c8 next? 11:28
jnthn aha!
m: "\xfacf" ~ "\n" 11:29
camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
jnthn That's it.
timotimo oh, flushing the encoder?
jnthn That'll teach me to read stack traces proper..
11:30 shlomif joined
jnthn I've got 3 other RTs fixed this morning too; about to do a spectest run for all 4 before pushing :) 11:30
timotimo neat 11:31
jnthn Mighta got their yesterday, but developed a nasty headache
Got a bad feeling it may return at any moment today too :/
timotimo ugh, i'm wishing you the best of luck!
jnthn So decided to schedule Perl 6 things first today.
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:34
pmurias why does installing a module take 5 minutes? 11:42
jnthn has surprising trouble finding where the spectests for concatenation are 11:44
jnthn sticks the new ones in the NFG concat tests 11:45
m: use Test; is "\xfacf" ~ "\n", "\xfacf\n", '\xfacf ~ \n is ok'; 11:47
camelia rakudo-moar 4a0ba7: OUTPUT«(signal SEGV)»
dalek kudo/nom: d2e31e8 | jnthn++ | src/Perl6/World.nqp:
Mark `is rw` generated methods with rw flag.
11:48
kudo/nom: fac3d74 | jnthn++ | src/Perl6/Metamodel/ (2 files):
Factor submethod Bool into boolification mode.
kudo/nom: 6184e15 | jnthn++ | src/core/Channel.pm:
Don't lose exceptions in Channel.Supply.
kudo/nom: eb02dc9 | jnthn++ | src/core/Supply.pm:
Fix passing on of exceptions in Supply.Channel.
ast: a20b3a4 | jnthn++ | S12-attributes/instance.t:
Test for RT #127665.
ast: cf3374d | jnthn++ | S1 (2 files):
Tests for RT #127660.
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127665
ast: 23c1c1b | jnthn++ | S17-supply/Channel.t:
Test for RT #127629.
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127660
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127629
RabidGravy jnthn++ # cheers, I can back out the hack from Staticish to work round that 11:51
dalek p: b457c03 | jnthn++ | tools/build/MOAR_REVISION:
Get MoarVM with Unicode fix, lower memory use.
11:52
kudo/nom: e1071b0 | jnthn++ | tools/build/NQP_REVISION:
Bump to get MoarVM with fixes/improvements.
11:53
llfourn jthn++ bugs-- 11:54
dalek ast: a868517 | jnthn++ | S15-nfg/concatenation.t:
Tests for RT #127530.
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127530
11:56 FROGGS left 12:04 pierrot joined 12:11 Grauwolf left 12:12 kid51 joined 12:17 edehont left
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 ( no output )
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
camelia rakudo-moar e1071b: OUTPUT«(<anon>)␤»
awwaiid hmm
haha -- doc.perl6.org/language/typesystem summary: "TODO" 12:22
12:23 Skarsnik joined 12:25 LGD_ joined 12:26 hanekomu_ joined, sergot_ joined 12:27 synopsebot6 left, LGD left, pnu left, hanekomu left, dalek left, drforr1 left, sergot left, timotimo left, ponbiki left, rindolf left, Cabanossi left, _notbenh left, mkz left, solarbunny left, richi235 left, kid51 left, _notbenh joined, lsm-desktop left, k-man left, pnu joined 12:28 dalek joined, ChanServ sets mode: +v dalek, mkz joined, ponbiki joined, richi235 joined, rindolf joined, ponbiki is now known as Guest13410 12:29 wamba joined
RabidGravy awwaiid, if you do a subset you get the name 12:29
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
RabidGravy must stop doing the "oooooh kittens" thing 12:34
so far this morning I've thought about making modules for Elastic Search and RethinkDB
12:37 AlexDaniel joined
AlexDaniel tweakism: hi 12:37
yoleaux 8 Mar 2016 03:31Z <hoelzro> AlexDaniel: ах, спасибо! Я всегда забаваю мягкий знак =/
Skarsnik Hey, look a kitten behind you
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
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 shlomif left
jnthn RabidGravy: Heh, I was pondering RethinkDB too, but I should really finish Docker::File first...not to mention Stomp 12:38
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
12:39 timotimo joined
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)␤»
AlexDaniel .tell hoelzro publish the rest! I want to see how well my phonetic-kinda-dvorak layout works with those stats :)
yoleaux AlexDaniel: I'll pass your message to hoelzro.
RabidGravy yeah the JS api for rethinkdb would seem to transport quite nicely to P6
12:39 drforr1 joined
jnthn RabidGravy: Maybe, but we *really* should expose the live queries as supplies :) 12:40
RabidGravy fersure
12:41 lsm-desktop joined
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:41
AlexDaniel tweakism: I'll be here in, like, 15 minutes :) 12:42
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
Apparently, lunch time :) bbl
12:44 tmch joined 12:45 rindolf left
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 :)
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:46
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:47
12:48 kaare_ joined
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
12:48 rindolf joined
pmurias awwaiid: promoting (and polishing) :from<stuff> would be great, one longer term problem is that using multiple VMs at once is costly 12:48
Woodi hi #perl6 :) 12:49
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)
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
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
pmurias awwaiid: that wouldn't address the runtime cost
12:51 kalkin-- is now known as kalkin-
Woodi kalkin-: yes, you need some "runtime" 12:52
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
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.
awwaiid sudo /bin/systemctl enable elasticsearch.service
Woodi hmm, CPAN is down... google sometimes is, but CPAN ?? ;)
awwaiid oops bad paste
kalkin- RabidGravy: so much todo so little time :) 12:54
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 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
Woodi _nadim++ # DDT
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
awwaiid pmurias: yeah true. could be that is the way to go. Also many JS-hosted languages are starting to get cross-language
psch kalkin-: github.com/perl6/nqp/blob/standalo...-script.sh is a half-baked, non-integrated way for deploying .jars that contain a complete rakudo interpreter
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
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
camelia rakudo-moar e1071b: OUTPUT«0.54030230586814␤»
psch kalkin-: i'll probably get back to it soonish and try to make it easy, but as you said, todo lists... :)
AlexDaniel m: say cos 2 12:59
camelia rakudo-moar e1071b: OUTPUT«-0.416146836547142␤»
ilmari m: my %h = <a b>; say +%h
camelia rakudo-moar e1071b: OUTPUT«1␤»
AlexDaniel m: my %h = <a b>; say +%h
camelia rakudo-moar e1071b: OUTPUT«1␤»
AlexDaniel hm
ilmari a hash numifies to the number of keys
AlexDaniel right
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 ?? :)
awwaiid pmurias: yeah, I was looking at the RubyTruffle stuff, pretty cool
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
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
tweakism: now, this is not a very good idea but it will get what you want in like 30 seconds :)
Skarsnik kalkin-, for each run?
ilmari m: my %h = <a b>; say ~%h
camelia rakudo-moar e1071b: OUTPUT«a b␤»
kalkin- Skarsnik: yes 13:03
Skarsnik Pretty weird that the parse stage is so slow,
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
kalkin- This is the slow script gist.github.com/kalkin/b8eb3ad267da097914e0 13:04
Woodi kalkin-: how long it takes without 'say' ? 13:05
kalkin- Woodi: same time
13:06 virtualsue joined
Woodi kalkin-: in general 2016 is the year when Perl6 is about to be a lot faster in any direction. 2015 a 13:07
..was 'make it OK' year...
kalkin-: using language A from language B is magical enought :) 13:08
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, Sgeo joined, Humbedooh left
kalkin- Or just use Perl5 for this little scriptD 13:11
:D
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.
Woodi kalkin-: C would be faster then Perl5 :) maybe not always...
RabidGravy looking at the code it seems that a lot of it would be handled by builtin functionality
AlexDaniel tweakism: so let me know if this answered your question 13:15
13:17 molaf joined, virtualsue left
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:20
13:25 virtualsue joined 13:26 Guest13410 is now known as ponbiki
dalek kudo-star-daily: 653ae9a | coke++ | log/ (9 files):
today (automated commit)
13:27
13:27 Actualeyes joined
[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: www.calvin.edu/academic/philosophy...ionals.pdf 13:29
13:31 sergot_ is now known as sergot 13:39 FROGGS joined
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:46 pmurias left 13:47 pmurias joined 13:48 CIAvash left
dalek p: 8646ab1 | (Pawel Murias)++ | src/vm/js/QAST.nqp:
Revert "[js] remove useless file"

It turns out it was used by nqp-js-on-js.
This reverts commit f77aa4c887987171b690708d0304a7fd88f80261.
13:48
p: deb4ce6 | (Pawel Murias)++ | src/vm/js/Compiler.nqp:
[js] Fixing using module names that contain :: like QAST::Compiler.
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
On installation we also create precomps, but they are managed a bit differently
13:50 ptolemarch joined
dalek line-Perl5: e5ebc06 | (Stefan Seifert)++ | README.md:
Fix examples in the README

Test::More::plan wants a named argument, not just a positional.
13:51
13:51 Psyche^_ joined
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:51
pmurias why is 'use Text::Haml::from<Perl5>' slow? is it a precompilation problem? 13:52
moritz hilights nine++ for the question above
*questions
nine Is it slow?
13:52 musiKk_ left
awwaiid nine: yeah, report was it is slow during parse-stage, gist.github.com/kalkin/b8eb3ad267da097914e0 is script 13:52
(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 13:54 virtualsue left
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?
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 Psyche^ left
nine The solution is implementing support for "no precompilation 'users';" 13:55
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
pmurias moritz: something like RAKUDO_PRECOMPILE_ALWAYS 13:57
moritz: not a debugging help for developers, something that users can enable to make sure everything is always precompiled
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?
llfourn I made this suggestion: github.com/perl6/toolchain-bikeshed/issues/5 # die if not able to precompile rather than fallback
seems to be similar to what pmurias is suggesting 13:59
pmurias llfourn: it's the same thing
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?
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
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.
jnthn (That you could run on your module prior to cutting a release of it.)
nine awwaiid: I did :) Was just kind a busy preparing my talks
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 :)
(if it passes)
nine tadzik: I updated the README to reflect that fact a couple of minutes ago after seeing the Test::More example on your screen ;)
jnthn m: say 6591.65 R/ 5626.89 14:04
camelia rakudo-moar e1071b: OUTPUT«0.8536391␤»
jnthn Wowser
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: github.com/LLFourn/p6-CompUnit-Uti...-multi.pm6
nine pmurias: as a user... if you think about fixing it, you already are a developer again :)
pmurias nine: I can just refuse to use modules that don't precompile unless I'm forced to
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
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
I think the fallback is the right default though. It works slowly is infinitely better than it doesn't work at all.
llfourn jnthn: cool then we are on the samge page :) 14:09
pmurias jnthn: I would just be happy if I could disable the fallback for myself 14:11
things silently going sluggish sucks 14:12
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?
pmurias yes 14:14
lucs Is "sink context" just a better name for "void context"?
)or how are they different?) 14:15
(
llfourn lucs: yes, but when things are used in sink context .sink is called on them not .void # my understanding 14:16
dalek c: f608482 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/variables.pod:
Correct link to compile-time variables. This fixes #417
pmurias S99 claims it's a different way
different name sorry
_nadim Woodi: thank you, aother version in the pipeline, just a tad faster.
14:17 virtualsue joined
lucs Aha, thanks. Also, cognominal just pointed me to github.com/perl6/specs/commit/ddcd...32c0bc6bc1 14:17
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:20
AlexDaniel I don't like this auto close feature on github… 14:22
14:22 skids joined
llfourn cognominal: you have a french version of perl6intro? 14:22
cognominal Naoum hankache is doing it and is acking me to review it. 14:23
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...
cognominal Apparently there is a deutch version as well.
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
Did I get it right?
RabidGravy that about sums it up
llfourn looks up for the example code
kalkin- RabidGravy: ok thanks
AlexDaniel we need a perl6 version of perl6intro 14:27
dalek p: 78db547 | jnthn++ | src/QAST/Block.nqp:
Avoid a load of hash allocation/copies.

Normally we just set symbol properties once ever, so just use the
  slurpy hash we already have rather than creating a new one and copying
to it. Saves a ton of hash and hash iterator allocations.
This makes `for ^500 { EVAL 'regex { abcdef }' }` in Perl 6 run in about 85% of the time it used to (and will similarly help other EVAL heavy things, and shave a bit off compile times generally).
kalkin- Why not to write it in Lojban and than auto translate it to other languages
AlexDaniel jnthn++ 14:28
such a pleasure to see commits like this 14:29
14:30 virtualsue left
jnthn AlexDaniel: Was a discovery from the profiler, while using it to help me understand EVAL's memory leaky behavior... :) 14:31
_nadim jnthn++ 14:32
tadzik \o/
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
it's what everyone else does :)
tadzik hahh
RabidGravy I'm sure we can already find a bunch of languages that are slower 14:36
llfourn English for one
mspo come up with one contrived use case where you do tricky super-efficient p6 and horrible c
14:37 yeahnoob left
mspo just add a sleep in the c code; no one read it :) 14:37
cognominal AlexDaniel, that's an intro. It is difficult to show the Perl 6 specific stuff like concurrency and roles from the start. 14:38
14:40 edehont joined
mspo you could also show that writing perl6 programs is faster because you're not getting warnings about whitespace from new gcc 14:40
lucs AlexDaniel: You don't like the Perl 6 Intro approach? 14:42
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! :-)
Woodi one scripted something in 10 minutes of Perl5 code then rewrited it into 2 months C code...
cognominal lucs, your remark could have been read as a trashing of perl6intro :) 14:45
_nadim Woodi: you need to learn to call Perl from C ;) 14:47
dalek p: 3872607 | (Pawel Murias)++ | src/vm/js/nqp-runtime/io.js:
[js] Fix nqp::spawn.
AlexDaniel _nadim: or the other way round
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".
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
14:48 virtualsue joined
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
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
cognominal lucs, I understood the same. I was wrong, such snide remark would be off colour in #perl6 :) 14:49
_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
ie I'm trying to edit the stash of a package inside an already precompiled compunit
at the compilation time of another compuinit
cognominal _nadim, you can't trust a living dead language. It may eat your brain. :)
llfourn which makes no sense now that I understand SC and precomp a bit better :P
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... ;)
s/si/so/
[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
_nadim eh, I like C! I just don't like idiots.
dalek p: 3949819 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
[js] Add a noop compose to the VMException REPR.
14:55
nine llfourn: ooh, I see. Yep, that's evil indeed :)
_nadim Woodi: to be fair the other project was not written in C
mspo cognominal: guess so
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
moritz same here 14:57
14:58 zakharyas left
RabidGravy struggling for motivation here today 14:58
_nadim RabidGravy: you're not the only one :) 14:59
15:02 virtualsue left 15:03 sufrostico left 15:05 cdg joined
cognominal pmurias, what is the state of rakudo-js ? 15:06
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++ www.aristeia.com/Papers/DDJ_Jul_Aug_200 but it was "before" atomics "revolution" in PC computers... 15:09
masak Woodi: I don't say this often about questions, but... are you sure a Singleton is what you want? 15:10
Woodi hmm, www.aristeia.com/Papers/DDJ_Jul_Aug...evised.pdf
RabidGravy there's one right in the either OO or classes doc
15:10 virtualsue joined
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…»
Woodi masak: I want one when I need one :)
RabidGravy doc.perl6.org/language/classtut#Static_fields%3F
Woodi masak: Singleton is nice eg. for storing app configuration
pmurias cognominal: currently compiling NQP to js works (with minor things not working) 15:12
15:12 CIAvash joined
pmurias cognominal: started working yesterday on a TPF grant to make rakudo-js work 15:12
cognominal yea, I have seen that. Good.
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?"
cognominal pmurias, so you can write grammars in nqp-js ?
masak m: class Singleton { our $.INSTANCE = Singleton.new; submethod BUILD { if $++ { die "DERE CAN ONLY BE WUN" } } }; say Singleton.INSTANCE; Singleton.new
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␤␤»
masak Woodi: the above ^^ ought to work
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:14 edehont left 15:15 smls joined, virtualsue left
RabidGravy hah 15:15
Woodi that examples work with many threads ? that was problematic in 2004...
15:17 sjoshi left
Woodi saved into library anyway, thanx :) 15:18
15:19 pmurias_ joined
dalek p: 1a9e0a7 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
[js] Make nqp::objprimspec work on a null (return 0).
15:22
p: 8e41e49 | (Pawel Murias)++ | t/nqp/93-oo-ops.t:
Test calling nqp::objprimspec on a null.
masak tadzik++ just implemented man-or-boy in 007 (and it gives the expected output)
15:22 smls left
masak this may very well end up in tomorrow's slides ;) 15:22
15:22 pmurias left
tadzik :) 15:23
moritz \o/
tadzik kewl, I'll be famous! :P
pmurias_ cognominal: yes, the NQP grammar works in nqp-js
15:23 pmurias_ is now known as pmurias
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
tadzik moritz: I think there'll be one
masak tadzik: me too! 15:24
pmurias RabidGravy: seems like something that's hard to serialize ;)
15:25 idiosyncrat_ joined
cognominal pmurias++ 15:25
15:30 Actualeyes left
dalek p: ae15d62 | jnthn++ | src/NQP/ (3 files):
Use str constraint on various paths.

The goal being that we can stick a native `str` on the $name of the QAST::Block.symbol method, which accounts for an overwhelming amount of boxing in EVAL-heavy situations.
15:30
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
15:35 musiKk_ joined
RabidGravy pmurias, it seems that it's something in an enum 15:38
15:39 khw joined
RabidGravy just quoted the enum "keys" and it fixes it 15:41
15:42 Actualeyes joined
dalek kudo/nom: 3ac34a4 | jnthn++ | src/Perl6/ (2 files):
Some str constraint/coercion on paths to .symbol.

For an upcoming NQP patch to add a `str` type constraint to it.
15:45
timotimo Skarsnik: we can't return a struct without a pointer in nativecall at the moment
dalek p: c8db98b | jnthn++ | src/QAST/Block.nqp:
Mark $name parameter in symbol a str.

Eliminates the most common source of box allocations in compilation. For example, in the `for ^500 { EVAL 'regex { abcdef }' }` example we knock several hundred thousand allocations, and 3 whole GC runs, off.
nine jnthn: compilation will become faster? :) 15:46
Skarsnik timotimo, so my example does not work?
jnthn nine: Aye, a bit 15:47
nine \o/
15:49 zpmorgan joined
timotimo Skarsnik: no, "returns mystruct" is correct 15:49
Skarsnik Ok, make my life a bit easier in gptrixie 15:50
I don't need to add the context to the generator when solving a pointer on structure
15:51 rindolf left
Skarsnik since it will translate to the structure directly in a class/function argument/function return 15:51
15:53 rindolf joined 15:54 donaldh joined
[Coke] jnthn++ 15:54
dalek p: 5cbce49 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Avoid another common source of boxing.

In code-gen this time.
15:55
15:55 FROGGS left
timotimo ^- i approve of boxing removage 15:57
15:58 pyrimidine left
timotimo that also means when we compile & run scripts, we'll go longer without the first GC run 15:59
jnthn That too :) 16:00
16:00 pyrimidine joined
RabidGravy fewer brk()s in the strace is nice too ;-) 16:01
16:03 idiosyncrat_ left 16:04 itaipu joined
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
(or newly created strings)
jnthn Yeah, boxes are entirely within the GC-managed space 16:08
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 :)
timotimo 106360maxresidentk for an nqp build, that's not even bad
that's less than a simple script when running full perl6
16:11 fireartist left
timotimo i can't do a sensible measurement for "stage parse" right now, because something's eating CPU 16:12
1114024maxresidentk is a *bit* more %) 16:13
16:15 perl6newbee joined
perl6newbee hi guys 16:15
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?
Ahh, sorry
perl6newbee I used DateTIme.get-daycount. But thats no longer exists
Skarsnik ($d1 - $d2).days?
perl6newbee days :-)
my $d = DateTime.new(blablabal) - DateTime.now does not work 16:17
mom
chansen_ You need to call .days method on the duration object
perl6newbee annot call Numeric(DateTime: ); none of these signatures match: 16:18
(Mu:U \v: *%_)
in block <unit> at <unknown file> line 1
Skarsnik m: my $d1 = DateTime.new(now); my $d2 = DateTime.new(now - 50000); say ($d1 - $d2).days;
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␤␤»
perl6newbee Ok so I encountered a bug. I though operator '-' is not implemented 16:19
psch m: say now.WHAT
camelia rakudo-moar 3ac34a: OUTPUT«(Instant)␤»
skids wonders other than definedness what a singleton really has over an instanceless class.
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␤␤»
dalek p: d257c27 | jnthn++ | src/ (3 files):
Use MoarVM's optimized mutli-dispatch path.

This avoids the creation of many CallCapture objects during QAST to MAST compilation, again knocking some more allocations (one per QAST node) off.
Skarsnik I think only Instant has a - operator 16:21
m: my $d1 = DateTime.new(now); my $d2 = DateTime.new(now - 50000); say ($d1.Instant - $d2.Instant).days;
camelia rakudo-moar 3ac34a: OUTPUT«Method 'days' not found for invocant of class 'Duration'␤ in block <unit> at /tmp/sLsPng2YZB line 1␤␤»
psch there's a (Date $, Date $) candidate for infix:<->
m: say (DateTime.now.Date - DateTime.new(now - 500000).Date) 16:22
camelia rakudo-moar 3ac34a: OUTPUT«6␤»
Skarsnik probably want a - on DateTime that give a Duration 16:23
16:23 Actualeyes left
Skarsnik why it's not there? 16:24
psch Skarsnik: how does $utc-date - $cest-date work? 16:25
err, datetime, not date :)
16:26 maybekoo2 joined
AlexDaniel m: say (5*37*227*557).base(33).lc ~ ‘++’ 16:28
camelia rakudo-moar 3ac34a: OUTPUT«jnthn++␤»
16:28 maybekoo2 left 16:29 virtualsue joined, maybekoo2 joined
perl6newbee DateTime.Date - DateTime.Date works. THX. But I hope the intuitive '-' way will also work some day 16:30
16:31 prammer left 16:33 prammer joined
jnthn AlexDaniel: hah! :P 16:33
16:38 Actualeyes joined 16:39 nakiro left
tweakism AlexDaniel: I eventually figured it out 16:40
AlexDaniel: I didn't want to xmodmap and it was difficult to figue out how to structure XKB stuff under my $HOME 16:41
but I eventually did
but yes, thanks, that's helpful.
pmurias jnthn: is EVAL a bottleneck for performance of something? 16:44
or just an easy way to profile compilation? 16:45
hoelzro zostay: btw, I don't know if you saw, but I added you as a committer to IO::String 16:49
thanks for your help!
I think the next step will be to document the new stuff, preferably as declarative POD, and then render that to README.md
I can take care of a lot of that 16:50
Skarsnik psch, well a DateTime as the timezone information
16:58 abraxxa left
jnthn pmurias: Well, looking into why regex interpolation leaks was where this started 17:00
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:01
17:13 pmurias_ joined
[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
camelia rakudo-moar 3ac34a: OUTPUT«0.763636␤»
jnthn Nice :)
The changes added up :)
timotimo it may not stop the leaks, but it's good none-the-less! 17:15
jnthn Yeah...the leak is non-obvious
I'll hack up a simple heap snapshot dumping thing to help me find it
Which we can later evolve towards a user-space heap analysis tool
I just figured out a basic design for it
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 pmurias left
jnthn So, bbl :) & 17:16
17:17 baest_ joined 17:19 baest left
_nadim Bleah! when elements of < 1, 2, 3, > and < 1, 2, 3 > don't get the same type! 17:21
17:22 SCHAAP137 joined, donaldh left
_nadim What's the idea behind IntStr vs Cool? 17:22
ugexe you know you can treat it as an Int or Str, instead of as the much broader Cool 17:24
AlexDaniel m: say ~IntStr.new(42, ‘69’) # my favorite 17:25
camelia rakudo-moar 3ac34a: OUTPUT«69␤»
AlexDaniel m: say +IntStr.new(42, ‘69’) # my favorite
camelia rakudo-moar 3ac34a: OUTPUT«42␤»
_nadim AlexDaniel: hahah!
time to add a handler that catches your example! 17:26
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 $!
_nadim IntStr is not even documented on doc.perl6.org
Does anyone know where it is defined, I can as well display both values. 17:29
17:30 prammer left
RabidGravy src/core/allomorphs.pm 17:30
AlexDaniel _nadim: looks like there is a bug report for that github.com/perl6/doc/issues/418 17:31
17:31 kjs_ joined, vendethiel joined
RabidGravy at some point I'm going to make an enumeration type thingy with IntStrs 17:31
I keep wanting it then deciding it's a pain to implement and find some other way of expressing it 17:32
_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:33
17:35 pmurias_ left, prammer joined 17:43 virtualsue left
_nadim dump(IntStr.new(42, "69")) ; => 42 / "69".IntStr ; And I hope to never see it again :) 17:43
17:45 jack_rabbit joined 17:46 musiKk_ left 17:48 sufrostico joined 17:49 tmch left 17:50 TEttinger joined
timotimo i think it'd be pretty fantastic if we could get regex slangs for at least python and javascript 17:54
AlexDaniel yeaaaaaah
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 17:55
17:57 dakkar left 18:00 baest_ is now known as baest
Hotkeys I don't use js so just curious 18:00
what are js regexes like
18:03 prammer left 18:04 prammer joined
Hotkeys Is there a good way to modify the syntax via some sort of custom slang yet 18:05
I looked at Slang::SQL with the EXPORT sub
but I can't seem to get that to work
timotimo "the syntax", you mean for regexes?
Hotkeys er 18:06
github.com/tony-o/perl6-slang-sql/...ng/SQL.pm6
timotimo if Slang::SQL doesn't work, it's a bug in Slang::SQL
Hotkeys like is done here
it hasn't been updated since october so I was wondering if something had changed
timotimo perhaps 18:07
have you tried the other Slang:: modules?
Hotkeys not yet
I was just having a fiddle with it last night
timotimo mhm 18:08
Hotkeys I wanted to attempt to do STM in p6
via an 'atomic { ... }' block 18:09
18:09 prammer left
Hotkeys (Software Transactional Memory for the record) 18:09
psch Skarsnik: way i see it, if DateTime - DateTime can mean DateTime.Date - DateTime.Date *or* DateTime.Instant - DateTime.Instant 18:10
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:13 Actualeyes left
Skarsnik Yes probably x) 18:15
18:17 prammer joined 18:21 Actualeyes joined 18:23 Actualeyes left 18:24 zakharyas joined 18:30 prammer left
AlexDaniel Hotkeys: atomic block? :O 18:30
18:31 prammer joined 18:40 virtualsue joined 18:41 Juerd joined, pmurias joined 18:46 zakharyas left 18:47 perl6newbee left
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:50
RabidGravy psch, I'm having a little hack on Audio::PortAudio at the moment, it seemed a shame to be just sitting there :) 18:51
18:53 LanceW joined
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␤»
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
RabidGravy LanceW, an icon? I think it's a logotype.png in the dist/GH dir 18:57
easiest way is to check one that has one
psch RabidGravy: fwiw, you can totally adopt it 18:58
RabidGravy ah, no it's a logotype directory with a .png in it
psch RabidGravy: as in, if it ends up in the ecosystem might as well be from your gh user
i don't really have the time or mind to do anything with it at the moment either
18:58 firstdayonthejob joined
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
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
psch well, at least not with jackd, and via alsa i didn't get anything but buffer underruns
skids Woodi: Well, since I'm only really interested in knowing "why would you want a Singleton pattern in Perl 6" I can :-) 19:01
19:04 tmch joined 19:06 bbkr joined 19:08 avenj left 19:11 LanceW left
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
19:14 virtualsue left
Woodi skids: but you can't change one thing with changing implementation: patter of usage :) you just do Singleton pattern with a class. 19:15
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
...i'm not sure that's a useful comment, to be honest :)
(i'm also not really confident in the "most" there. "at least some" is something i'd be more confident in) 19:17
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
m: my $s = :(Int $a, Str $b); say $s.WHAT
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
camelia rakudo-moar 3ac34a: OUTPUT«(Signature)␤»
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.
TreyHarris skids: say I have a bunch of routines that take the following pair of options: 19:24
m: my $s = :(Int :l($limit) = 0, Str :d($delimiter) = ':')
skids
.oO(If I was feeling particulary cynical today I'd define "Singleton" as "We banned global variables. Then decided we actually needed them" :-)
camelia ( no output )
skids TreyHarris: Ok, and you want to do what with those routines? 19:25
Just DRY their definitions?
TreyHarris skids: i want them all to take those two options, but otherwise their signatures are different
skids: right
skids Ah.
19:25 abaugher left
TreyHarris if i'm not mistaken, this is the only way to have "global flags" on multi MAIN's 19:26
19:26 abaugher joined
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:27
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.
skids And the declarations likely don't carry in.
TreyHarris skids: yup, that's what I found when I tried it like that 19:29
19:31 vendethiel left
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:31
skids Sounds like a job for macros. 19:32
TreyHarris skids: mmmm, thanks, didn't think of them.
19:33 CIAvash left
skids Well, I'm not sure where the implementation is at there. 19:35
(masak would know)
perlpilot I would have thought you could put the common options in a proto
psch proto only restricts what's allowed for the multis
m: proto f (*@a, :$a, :$b) {*}; multi f(*@a, *%h) { say "ok"; }; f 1, 2, :a; f 1, 2, :c
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␤␤»
psch that's the closest work around for common nameds i can make up 19:36
well, replace the slurpy array in the multi
but that replaces USAGE output with a normal dispatch failure
m: say &MAIN.candidates
camelia rakudo-moar 3ac34a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CLujpiDR0c␤Undeclared name:␤ MAIN used at line 1␤␤»
perlpilot S06:77 would suggest that you should be able to do it. 19:37
19:37 kent\n left, Cabanossi left 19:38 vendethiel joined
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
19:38 Cabanossi joined
psch cause those are both optional 19:38
(which also clearly implies that :$a and :$b in the camelia'd code above should be required...) 19:39
well, if they're supposed to be, anyway vOv
s/can/can't/ 19:40
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:41
ugexe ive settled for parsing global options out of @*ARGS 19:42
19:42 virtualsue joined
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␤»
psch the proto signature seems incomplete
19:43 tmch left
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␤»
psch m: say :($,$,$).perl
camelia rakudo-moar 3ac34a: OUTPUT«:($, $, $)␤»
psch m: say :($,$,$).gist
camelia rakudo-moar 3ac34a: OUTPUT«($,,)␤»
lizmat good *, #perl6!
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
Either proto needs more magic or just a little bit less. :)
(I'll settle for less since macros can indeed be an answer at some point) 19:46
TreyHarris hmm
skids Well you're supposed to be able to proto { stuff; {*}; stuff }
ugexe you can afaik
psch yeah, that works 19:47
skids Oh yeah it was proto regex that was iffy now that I remember.
ugexe yeah, ive hit that before too
pmurias lizmat: hi
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
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…»
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.
psch m: proto f ($, $?, $?, $?, :$a, :$b, :$c, :$d) {*}; multi f($, :$d) { }
camelia ( no output )
[Coke] registeres for the dc-baltimore perl workshop
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"
hoelzro ahh 19:51
&MAIN points to the proto, I believe
so &MAIN.WHY should work
JRaspass hey all, should writing to read only hash attrs throw, just like scalars do? 19:52
p6: class Foo { has $.bar }; Foo.new.bar = 1
camelia rakudo-moar 3ac34a: OUTPUT«Cannot modify an immutable Any␤ in block <unit> at /tmp/tmpfile line 1␤␤»
JRaspass p6: class Foo { has %.bar }; Foo.new.bar = () 19:53
camelia ( no output )
skids p6: class Foo { has %.bar }; Foo.new.bar = (:a)
camelia ( no output )
19:53 jjido joined
skids p6: class Foo { has %.bar = Map.new() }; Foo.new.bar = () 19:54
camelia ( no output )
19:57 labster joined
skids m: say (Map.new = (a => 1)) 19:59
camelia rakudo-moar 3ac34a: OUTPUT«Map.new((:a(1)))␤»
dalek kudo/nom: 693be1d | lizmat++ | src/core/Parameter.pm:
More likely to get a mismatch on named/unnamed

Than it is to get one on sub signature/no sub signature. So let's test the named part first.
psch JRaspass: i don't think so. you're changing the keys and values, not the Hash
JRaspass hmm, okay
i guess private attr, and reader is the way to do it then 20:00
psch JRaspass: what exactly is your use case?
20:00 vendethiel left
JRaspass running a method will set this hash, for later reading by the caller 20:01
20:01 SCHAAP137 left
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␤␤»
psch m: my %f := Map.new; %f = (a => 1); %f.say; %f{"b"} = 2;
camelia rakudo-moar 3ac34a: OUTPUT«Map.new((:a(1)))␤Cannot modify an immutable Nil␤ in block <unit> at /tmp/Opk2TNScZY line 1␤␤»
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
20:03 avenj joined
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
not a big dead
*deal
psch oh
JRaspass it's for P6 scientist :-P
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␤»
psch JRaspass: just stuff it all into the return value :P
*of .reun
*run
20:06 LGD_ is now known as LGD, jjido left
JRaspass run() is meant to return the same thing the candidate code would have returned, the obvservations have to be side channel :-( 20:06
github.com/lancew/ScientistP6 which is a port of github.com/github/scientist 20:07
psch JRaspass: ah. well, then return a Map that wraps the private Hash that has the observations, probably... 20:08
in .observations that is
JRaspass goes off to learn Map vs hash, still very much a perl5er
mst this is both batshit and rather cool: github.com/pannous/english-script/...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^-
camelia rakudo-moar 3ac34a: OUTPUT«Map|66761944␤Map.new((:a(1)))␤Map|66761944␤Map.new((:a(1)))␤Map|66761944␤»
[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
psch JRaspass: skids++ brought it up first (and demonstrated how to break the interface just now as well...) :) 20:11
20:14 molaf left
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)␤»
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.
*Map.new(stuff) 20:15
JRaspass p6: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar = ()
camelia ( no output )
20:15 cdg left
JRaspass hmm, ^ that throws for me 20:15
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 kjs_ left
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…»
skids star: class Foo { has HashMap $.bar = HashMap.new((:a(1))) }; Foo.new.bar = ()
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…»
skids grr. is star really older than the Map rename?
psch m: say MapHash
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'?␤␤»
psch star-m: MapHash
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'?␤␤»
skids Oh, EnumMap
psch oh right 20:17
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
camelia rakudo-moar 693be1: OUTPUT«Map.new((:a(1)))␤»
mst skids: it's running 2015.09, why not use the 'm:' one?
psch JRaspass: ^^^ that's how i'd do it
20:17 darutoko left
skids Wondering why it throws for JRaspass: 20:17
^^mst
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
20:18 yqt joined, labster left
JRaspass makes sense 20:18
yeah, i like that
psch JRaspass: you might want to get rakudobrew and 2016.01 though :)
JRaspass This is Rakudo version 2016.01.1 built on MoarVM version 2016.01 20:19
is what i have atm
psch oh
*that* is interesting
when was the Map rename then..?
skids star: class Foo { has EnumMap $.bar = EnumMap.new((:a(1))) }; Foo.new.bar = () # yeah, regression at some point.
camelia star-m 2015.09: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/dHYQV9DrKc:1␤␤»
psch m: class Foo { has Map $.bar = Map.new((:a(1))) }; Foo.new.bar = () # yeah, regression at some point. 20:20
camelia ( no output )
psch skids++
skids Now, who knows how to bisect...
20:21 vendethiel joined
psch skids: from a47d297339de8cafbfa69d59550dfefb4d0407a7 i guess? 20:21
that's the rename commit
well, maybe the 2015.09 tag is a better choice
skids That would be the lower end to start with. 20:22
skids just knows this will end up blaming himself for the GLR slicing stuff. 20:23
20:26 kurahaupo joined 20:28 domidumont left, sandeep joined, sandeep left
timotimo RabidGravy: remember how i said i didn't have any hardware for music? 20:29
RabidGravy yaw
you just bought a drumkit? 20:30
Hotkeys AlexDaniel: I was considering it
but i need to figure out how to slang first
psch Bisecting: 1122 revisions left to test after this (roughly 10 steps) 20:32
skids: bisecting really isn't hard... :P 20:33
scnr
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
timotimo RabidGravy: nope, i got a keyboard
a super expensive, shiny one
RabidGravy cool
timotimo at has all the keys and all the voices
and so many buttons
psch as in, git bisect; perl Configure.pl $args; git bisect {good,bad} # etc
well, with switching to the install/bin screen to run the test case 20:35
timotimo it's a yamaha psr-200
RabidGravy akai? m-audio?
skids psch: oh, so I wasn't missing some clue then.
timotimo does that ring a bell?
of course it does
because it has a bell sampled!
20:35 espadrine_ left
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
Hotkeys before I knew what bisect was
I manually downloaded and chose commits 20:36
and tried them
: )
timotimo well, it's apparently only 61 keys?
psch :o
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
well, e-piano
Hotkeys that's a strange number of keys
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 :)
skids 3d print a housing to cover extra keys :-)
timotimo RabidGravy: it doesn't seem to have velocity support
Hotkeys I would say 73 isn't very hot
i only deal in hot keys
psch skids: the trouble is more that people would rather like 88 keys :S
Hotkeys: www.youtube.com/watch?v=ozJtjm3TbAI same model, different device 20:39
timotimo usa.yamaha.com/products/musical-ins...ds/psr200/ - this is the beast in question
psch although i'm not exactly sure on the year of assembly for the one of my roommate
RabidGravy timotimo, I have a very old yamaha electronic pia in the corner propped up by an even older vox bass amp
piano
psch, I'd go a rhodes if I had room 20:40
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
not sure whether that makes it more or less hot :P
tweakism it would be hotter if it were 69 keys 20:42
so break a couple more
skids
.oO(typical IRC channel, buncha people all bragging about the size of their pianos)
[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
[Coke] or Brian Duggan?
RabidGravy all the other synths I use a controller
[Coke] awwaiid: ping.
psch i'm lots cheap, every synth i use is free or freeware :S 20:44
and then there's the obligatory guitars, but eh :9 20:45
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.
psch RabidGravy: although i neither have the authority nor desire to attempt to try and sell my roommates keys for her... :)
20:46 zpmorgan left
geekosaur except the stage is prod >.> 20:48
20:49 tmch joined 20:50 musiKk_ joined, patrickz joined 20:53 labster joined 20:55 tmch left
patrickz Hey! 20:56
20:56 nchambers left, nchambers joined 21:00 zpmorgan joined, kjs_ joined
timotimo RabidGravy: sadly, i don't have any idea about music, piano, notes, whatever 21:06
21:07 [Sno] left 21:09 SCHAAP137 joined 21:10 kurahaupo left, kjs_ left
RabidGravy music is all maths :) 21:15
21:15 colomon left
RabidGravy well maths with wiggle room 21:15
tweakism people say that, but I don't really buy it
psch it's true though 21:16
the wiggle room is usually called "swing" in the temporal domain and "jazz" in the frequency domain
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
psch nah, that's wrong
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
psch: everythign can be explained mathematically
psch *that* i don't think is true
tweakism nonetheless, I love me a good fugue. 21:18
RabidGravy I re-read cgm.cs.mcgill.ca/~godfried/publicat.../banff.pdf yesterday
psch hrm, i think that was impulsively contrarian. the previous line, that is 21:21
i don't have an informed opinion on whether everything can be explained mathematically
i think what tripped me up was the conjunction of 'mathematical' and 'logical', but well, never mind 21:22
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
or years.
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
21:24 cdg joined
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:24
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 ;)
skids It's made entirely of dragons and turtles :-)
21:26 itaipu left
patrickz had his hands in NFA.pm and didn't find what he searched for at first go 21:26
21:26 prammer left
patrickz @skids: At least *that* hasn't changed from p5... 21:27
perlpilot patrickz: what are you looking for?
skids nqp/src/QRegex/ is probably where to read.
21:27 sortiz joined, prammer joined
sortiz \o #perl6 21:28
21:28 kaare_ left
skids Also the environment variable NQP_NFA_DEB is fun. 21:29
21:33 colomon joined 21:34 ocbtec left 21:35 rindolf left
patrickz that output is huge... 21:35
21:36 kjs_ joined
timotimo yeah 21:36
patrickz Still managed to find the part I was looking for I think. :-) 21:37
21:41 [Sno] joined 21:42 Laurent_R left 21:43 Psyche^_ left
RabidGravy psch, just playing a Concrete DJz mix through Audio::PortAudio right now and it's all good 21:44
21:45 prammer left
vendethiel :P 21:45
psch RabidGravy: nice! which drive? 21:46
oh, and what kind of interface
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
psch ...
RabidGravy just the default output so far
psch so pulseaudio through alsa probably?
RabidGravy yeah
will test with jack tomorrow probably 21:47
psch that only pushes me stronger to wonder about your hw interface :)
i have some AC'97 compat onboard thingy here, which didn't do anything but underrun through pulseaudio/alsa at 44.1k
oh, nvm 21:48
you're not feeding live-generated data into it
that's probably the bottleneck anyway
dalek kudo/nom: 4f5831f | lizmat++ | src/core/Parameter.pm:
Make Parameter.ACCEPTS a bit smarter

  - non-optional is tighter than optional
  - non-slurpy is tighter than slurpy
All part of a cunning plan to make Signature.ACCEPTS a lot simpler.
psch lizmat++
RabidGravy "Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller" 21:49
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
as in, it's probably a lot of moar internals hackery... vOv
21:51 prammer joined
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
I'll play with that tomorrow too :)
psch well, test.pl in that same repo does feed live generated data into the interface 21:53
(i am aware a file named "test.pl" doesn't really belong into a module... :P )
i have no idea what might have changed since i last ran that, though, so maybe it already works 21:54
i guess CArray might have become noticeably faster
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:55
21:56 skids left
psch nice 21:56
well, let me know what your playing around tomorrow brings about :)
21:56 ptolemarch left
RabidGravy and I'm actually surprised that I can actually make a streaming server with multiple clients at 320k 21:57
bbkr hi. short article for those who need to deal with mixed Perl 5 and Perl 6 tests: blogs.perl.org/users/pawel_bbkr_pab...tests.html 21:59
22:01 musiKk_ left
tadzik  22:05
hmm, what did I jus tpaste
.u  22:06
yoleaux U+FFFC OBJECT REPLACEMENT CHARACTER [So] ()
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
i guess i should go read the regex docs page, brb!
22:13 colomon left 22:15 pmurias left
patrickz state 1 is start, state 0 is success and state -1 is failure, correct? 22:15
22:17 prammer left
dalek kudo/nom: 59adbef | lizmat++ | src/core/Parameter.pm:
Don't bother testing if all flags are the same
22:19
hoelzro hahainternet: (^1048576).map(*.chr).grep(/<:Letter>/) 22:20
hahainternet hoelzro: i guess that works, is 2^20 the highest unicode codepoint? 22:21
22:21 wamba left
hoelzro currently, yes 22:21
(unless they added some behind my back)
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
lizmat good night, #perl6! 22:22
hoelzro night lizmat!
hahainternet: why do you need ranges? what exactly are you trying to do?
hahainternet hoelzro: it's just playing around mostly, generating random text 22:23
it'd be nice if it was text, rather than random punctuation or diacritics etc
hoelzro ahhh
hahainternet mostly this is an excuse to play with perl6, so there's no need to actually help me :)
hoelzro play is the highest form of research =)
tweakism 0x10FFFF is the highest possible codepoint, unless they increase it. which is unlikely. 22:24
hahainternet it looks like that's the supplementary private use area thoughs 22:25
so the first few planes would be fine regardless
tweakism 0x100000 is the beginning of the same plane.
(2^20.) 22:26
hoelzro m: my $fibs = 1, 1, * + * ... *; 22:29
camelia rakudo-moar 4f5831: OUTPUT«Memory allocation failed; could not allocate 1056 bytes␤»
hoelzro ^ on a side note, I thought that wouldn't expand the whole list?
Hotkeys lol
hoelzro m: my $fibs := 1, 1, * + * ... *;
camelia ( no output )
psch m: my @f = 1, 1, * + * ... *;
camelia ( no output )
hoelzro that does the trick; but I thought it was just assigning to an @ variable that would flatten it 22:30
wait, what
timotimo since the GLR you no longer have to := that kind of thing
hoelzro timotimo: why doesn't assigning to a scalar variable work, though?
psch doesn't try to pretend to understand laziness vOv 22:31
which is curious, as i do spend a notable amount of time doing non-productive things
*rimshot*
Hotkeys m: $_.say 22:34
camelia rakudo-moar 59adbe: OUTPUT«(Any)␤»
Hotkeys m: get
camelia ( no output )
Hotkeys m: get.say
camelia rakudo-moar 59adbe: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
Hotkeys :DF
22:34 telex left
timotimo dunno? 22:35
psch i'd guess that a scalar has be assigned a known quantity
nine m: my $fibs = (1, 1, * + * ... *);
camelia ( no output )
psch ...that's just weird
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␤»
nine Does this make it clear? :)
psch nine++
ugexe `get` is a routine for IO::Handle
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
on its own rather
22:39 telex joined
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
thanks nine
22:47 virtualsue left 22:50 colomon joined, Skarsnik left
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:52
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"?
'cause afair Bufs are native uint8 (i think 8?) arrays under the hood 22:54
22:54 themonkeybob11 joined, themonkeybob11 left
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)␤»
psch ... but .WHAT is unreliable there ._.
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␤»
psch well, except there's some kind of autoboxing there as well... 22:56
sortiz $buf.list returns a Seq github.com/rakudo/rakudo/blob/nom/...Buf.pm#L93
22:57 spider-mario joined
sortiz And 'my @arr = $buf.list' don't have any regression. 22:58
22:58 pnu left 22:59 pdcawley left
psch yeah, that does strongly point at something around the Binder 22:59
Capture seems like a good guess from here, but i should probably head to bed instead of trying to optimize... :)
22:59 vendethiel left, stmuk_ left, aindilis` joined 23:01 aindilis left, cdg left, cdg joined, stmuk joined, m0ltar left 23:02 tinita left, cpage left, pdcawley joined, TEttinger left 23:03 Some-body_ joined, bbkr_ joined, cpage_ left 23:04 DarthGandalf left, m0ltar joined, Some-body_ is now known as DarthGandalf, cpage joined 23:05 japhb joined, bbkr left
TreyHarris So I just stepped through the permutations skids and psch talked about above and put each into a separate file: gist.github.com/treyharris/7eb7494563ee5b759b30 23:05
It pretty much acts exactly like you surmised it would
23:06 shmibs left
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
psch TreyHarris: never midn
i notice that's the lines before... :)
23:07 tinita joined
psch adds a notch to the "go to sleep, the bisect will be here tomorrow" tally 23:07
that's a limitation i'm tentatively expecting to change eventually, fwiw 23:08
sortiz timotimo, psch, Benchmark details in gist.github.com/salortiz/4ef300b4d7f2e9738024
23:09 shmibs joined
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)
psch m: proto f(:d(:$do)) {*}; multi f(*%) { say "ok" }; f :d
camelia rakudo-moar 59adbe: OUTPUT«ok␤»
psch m: proto f(:d(:$do)) {*}; multi f(*%) { say "ok" }; f :do
camelia rakudo-moar 59adbe: OUTPUT«ok␤»
23:09 kjs_ left
psch hmm, maybe that's only MAIN..? 23:10
weird
TreyHarris psch: yeah, that one's confusing 23:11
psch 04 is completely as expected to me, fwiw
and 05 is the logical progression from that
TreyHarris++ # good science there 23:12
TreyHarris: can you RT the confusing one?
TreyHarris yep. why adding code to the MAIN proto makes the short option work is a little bewildering. 23:13
psch: i couldn't get into RT earlier, I got an internal website error. let me try again
psch TreyHarris: if nothing else works just email it there, iirc [email@hidden.address] 23:14
i'll hit the hay now, probably about half an hour overdue, actually :)
TreyHarris yeah, still, I get "Possible cross-site request forgery"
I'll email.
23:15 |Sno| joined 23:16 kid51 joined, adu joined 23:17 TEttinger1 joined, [Sno] left, adu left 23:18 vendethiel joined 23:26 japhb left, japhb joined 23:27 kid511 joined 23:28 kid51 left
dalek kudo-star-daily: eeb91d0 | coke++ | log/ (9 files):
today (automated commit)
23:31
23:33 skids joined 23:36 millican left 23:39 Vlavv_ joined, vendethiel left 23:42 decent_ left
[Coke] ugh, talk submissions closed on yapc::na. 23:43
perigrin as of March 1st 23:49
you can pester genehack to see if he _might_ entertain taking a late submission
23:52 ridthyself joined 23:54 pnu joined
ridthyself hello everyone! How do I include a .p6 file from within the REPL? 23:54
Juerd "Including" files isn't really done in this part of the programming world 23:55
ridthyself oh
Juerd We tend to write modular code, and load modules. That's comparable to including but not really the same thing.
ridthyself I messed around with EVAL slurp, is that what you mean? 23:56
Juerd I think you're looking for EVALFILE
But note that eval'ing code isn't the same as including it as it would be in some other languages.
23:57 RabidGravy left
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...
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 maybekoo2 left, pnu left
Juerd You can use EVALFILE but I personally don't understand why you'd use the repl for that. 23:58
What's wrong with bash? :) 23:59
Or another fine shell