»ö« 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.
00:04 grondilu left 00:11 infina joined, infina left, infina joined 00:13 BenGoldberg joined 00:15 pierre_ joined 00:18 jack_rabbit joined 00:19 yqt left 00:29 gorgonzola joined 00:40 mr-foobar left 00:42 Actualeyes joined 00:57 AlexDaniel left 01:02 girafe left
timotimo stevieb9: good question. i think i liked its object and type system a lot, and it had a bunch of cool syntaxes for powerful stuff, like the ... operator for example 01:08
and mighty subscripts, and lazy lists
Zoffix Someone's complaining the docs are too complicated. I strongly disagree, but maybe it's just me: www.reddit.com/r/perl/comments/4mb...pr/d3uhb5t 01:10
stevieb9 timotimo: I have only read about subscripts in passing, so eventually I'll run into them head-on. The lazy list aspect is something I came into on a fly-by as well, but I did grasp the idea, and it's fantastic... an example in the docs triggered how useful it was (0..Inf) 01:13
Zoffix: I'm about to bail for the night now, but as a newb, I've bookmarked the link and will review and give some feedback over the weekend. I hope it will help. 01:14
Zoffix m: ^∞ .grep(*.is-prime).grep(* < 1000).map({"Number $_ is prime!"}).say 01:15
camelia rakudo-moar 48fe6a: OUTPUT«(Number 2 is prime! Number 3 is prime! Number 5 is prime! Number 7 is prime! Number 11 is prime! Number 13 is prime! Number 17 is prime! Number 19 is prime! Number 23 is prime! Number 29 is prime! Number 31 is prime! Number 37 is prime! Number 41 is prime!…»
Zoffix stevieb9, ^ lazy stuff is also chainable. Which may look weird coming from Perl 5 :) 01:16
i.e. the first .grep() there doesn't sit and wait to pick out all primes :P 01:17
to infinity
stevieb9 Zoffix: a bit above my head ;) in a week or two, I may ask more questions ;) 01:18
nevermind I said that. I get it. ^ I like! 01:19
01:24 kalkin- joined
stevieb9 I still don't grasp what the '*' is for. Can you explain (or point me to the docs)? 01:25
jdv79 stevieb9: doc.perl6.org/type/Whatever probably 01:26
stevieb9 jdv79: merci beaucoup
01:27 molaf left
Zoffix stevieb9, basically creates a closure, where each * you use gets turned into an argument. .grep(*.is-prime) is same as .grep({$_.is-prime}) 01:27
m: (* × * × * )(2, 3, 4).say 01:28
01:28 gorgonzola left
camelia rakudo-moar 48fe6a: OUTPUT«24␤» 01:28
Zoffix m: ($^a × $^b × $^c )(2, 3, 4).say
camelia rakudo-moar 48fe6a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jYuXftyUqs␤Cannot use placeholder parameter $^a in the mainline␤at /tmp/jYuXftyUqs:1␤------> 3($^a7⏏5 × $^b × $^c )(2, 3, 4).say␤»
Zoffix m: {$^a × $^b × $^c }(2, 3, 4).say
camelia rakudo-moar 48fe6a: OUTPUT«24␤»
Zoffix m: sub ($a, $b, $c) {$a × $b × $c }(2, 3, 4).say
camelia rakudo-moar 48fe6a: OUTPUT«24␤»
Zoffix and so on
01:28 kalkin-_ left
jdv79 what stage parse times are common these days? i just got 45s on a new box 01:29
stevieb9 that's the fast track, and it makes good sense. So it's an expansion. ...don't answer. Let me see if it makes sense after I read the docs. That'll be a good project for me.
Zoffix jdv79, sounds pretty good. 01:30
stevieb9 peace out, #perl6, I'm enjoying my time here
Zoffix I think on my box I get 1m35s or so
\o
jdv79 just for parse or total built?
Zoffix parse
jdv79 i got about 1:30 for entire "make install" 01:31
cool
Zoffix Man, this bash quote bugs me every time I come across it bash.org/?16910 'cause when I was 19, I wrote malware, whose sources I placed on SourceForge, and I'm pretty sure I wrote a TODO comment saying "Learn C".... I wonder if that person was reading my code, but I'll never know! :)
wow... finding it again proved a lot easier than I thought it would be! :o 01:32
Nothing shows up when grepping for TODO sourceforge.net/projects/tetralog/ I guess I removed it :P 01:34
Zoffix can now rest easy 01:35
stevieb9 one last thing before I bail... I just want to say that it's been nice here today, communicating and discussing things without people being all worried about XP and rep and all that shit. Really, really nice. 01:37
jdv79 what's xp and rep? 01:38
my laptop takes 2x as long as the new box for parse and about 1.5x as long for make install 01:39
improvement!
01:39 molaf joined
Zoffix XP = experience; rep = reputation. Typically "points" awarded by other users on sites like StackOverflow 01:40
01:42 Zoffix left 01:44 ilbot3 left, cosarara left, cosarara_ joined 01:47 ilbot3 joined 01:50 finanalyst joined
timotimo zoffix gets 10 points for the explanation, plus one extra point for not having copy-pasted it from somewhere else. 01:52
zoffix reached the next level! their rep increases by 1d6
m: say 1..6 .roll
camelia rakudo-moar 48fe6a: OUTPUT«1..6␤»
timotimo m: say (1..6).roll
camelia rakudo-moar 48fe6a: OUTPUT«5␤»
timotimo wow, almost a critical success
01:53 pierre_ left 01:57 nadim left 02:01 kid51 left 02:13 Xliff joined, Xliff is now known as XliffNoSound
XliffNoSound \o 02:14
So...latest weird thing... I put a new video card in this box and now I can't get any sound out of it. Nothing seems wrong. Windows levels still show. Nothing is muted. Just no sound.
I've spent all day trying to diagnose it, but nothing has helped.
So back to mute coding in perl (or rather... breaking out the old desktop and using that for music) 02:15
finanalyst Good time-of-day. 02:20
I'm trying to see whether an input, taken as text, is an integer. 02:21
02:21 ssotka left
finanalyst camelia: my $s='6'; say $a ~~ Int ?? 'y' !! 'n' 02:22
m: my $s='6'; say $a ~~ Int ?? 'y' !! 'n'
camelia rakudo-moar 48fe6a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Apvo2IsrbF␤Variable '$a' is not declared␤at /tmp/Apvo2IsrbF:1␤------> 3my $s='6'; say 7⏏5$a ~~ Int ?? 'y' !! 'n'␤»
finanalyst m: my $s='6'; say $s ~~ Int ?? 'y' !! 'n' 02:23
camelia rakudo-moar 48fe6a: OUTPUT«n␤»
finanalyst m: my $s='6'; say $s.Int ~~ Int ?? 'y' !! 'n'; $s='6.5'; say $s.Int ~~ Int ?? 'y' !! 'n' 02:24
camelia rakudo-moar 48fe6a: OUTPUT«y␤y␤»
02:26 jack_rabbit left
finanalyst m: my $s='6'; say +$s ~~ Int ?? 'y' !! 'n'; $s='6.5'; say +$s~~ Int ?? 'y' !! 'n' 02:26
camelia rakudo-moar 48fe6a: OUTPUT«y␤n␤»
finanalyst solved by asking :) 02:27
02:31 sufrostico left 02:39 noganex_ joined 02:42 noganex left 02:53 |meta left 03:09 Bucciarati left, literal left 03:10 avar left
jdv79 I heard a rumor that tim bunce isn't going to do the p6 DBI. anyone know about that? 03:17
03:26 tomfu joined, bjz joined 03:30 tomfu left, tomfu joined 03:35 tomfu left 03:49 raiph left 03:53 labster left 03:57 mohae_ joined 04:00 mohae left 04:12 bjz_ joined, bjz left 04:15 Actualeyes left 04:24 Cabanossi left 04:26 labster joined 04:27 Cabanossi joined 04:48 pierre_ joined 04:50 pierre__ joined, pierre_ left 04:54 kaare_ joined 05:04 juantelez left 05:05 pierre__ left 05:06 pierre_ joined 05:10 rurban joined 05:12 ssotka joined
jdv79 wow. ran the spectests in 220s. a handful of failures though:( 05:17
05:20 MadcapJake left, jrusso joined, jrusso is now known as MadcapJake 05:22 wamba joined 05:31 jack_rabbit joined, juantelez joined 05:57 rurban left 06:02 juantelez left 06:04 bjz_ left 06:11 rurban joined 06:13 jack_rabbit left 06:16 sortiz left 06:21 hankache joined 06:31 ribasushi left 06:34 vishnu joined, vishnu is now known as Guest46382 06:37 bjz joined 06:39 jack_rabbit joined 06:42 rurban left 06:48 Guest46382 left 06:56 bartolin joined, bartolin left 06:57 bartolin joined, buharin joined
buharin hello my friends 06:58
07:04 ssotka left
hankache hello 07:04
07:07 labster left 07:08 RabidGravy joined 07:11 rindolf joined, hankache left 07:16 wamba left 07:24 pierre_ left 07:25 jack_rabbit left 07:28 hankache joined, matiaslina left
RabidGravy boom! 07:33
07:37 darutoko joined 07:38 ribasushi joined 07:40 pierre_ joined 07:41 girafe joined, dolmen joined 07:42 BenGoldberg left 07:47 firstdayonthejob joined 07:50 pierre_ left 07:52 dolmen left 08:04 FROGGS joined 08:05 azawawi joined 08:06 lolo78 joined
azawawi RabidGravy: good morning 08:06
RabidGravy: github.com/perl6/gtk-simple/pull/45 # Menubar support & example :)
azawawi goes shopping for a new machine :) & 08:07
08:07 azawawi left
RabidGravy azawawi++ # makes everyone else look slack 08:10
.tell azawawi nice one chief will merge in a second 08:11
yoleaux RabidGravy: I'll pass your message to azawawi.
08:12 pierre_ joined 08:13 pierre_ left 08:18 setty1 joined 08:20 rurban joined 08:22 [particle] left, [particle] joined
FROGGS morning o/ 08:25
08:29 labster joined
RabidGravy goo mornin 08:37
dalek k-simple: 5814b13 | azawawi++ | / (6 files):
Add initial menu bar support
08:39
k-simple: 6410b6e | azawawi++ | / (5 files):
Nearly there
k-simple: 26728c1 | azawawi++ | examples/10-menu-bar.pl6:
Menu bar example is working now
k-simple: dce68ed | azawawi++ | README.md:
More documentation about toolbar and menus
k-simple: f051fa0 | azawawi++ | README.md:
Sort table and properly wrap
k-simple: 98de6dc | azawawi++ | META6.json:
Add missing menu assets to json metadata
k-simple: 4f1bfdd | RabidGravy++ | / (8 files):
Merge pull request #45 from azawawi/master

Add Menubar support & example + documentation fixes
08:51 AlexDaniel joined
jdv79 wwhy does Inline::Perl5 dep on panda? 08:52
nine cargo culting 08:53
sjn cargo quilting 08:54
09:06 pierre_ joined
jdv79 anyone know if zef should be able to install Inline::Perl6 09:07
5
i think mine hung
09:08 FROGGS left 09:09 jack_rabbit joined 09:15 molaf left 09:16 pierre_ left 09:17 jack_rabbit left 09:25 rindolf left 09:28 maybekoo2 joined
jdv79 nine: i see this a bunch: (in cleanup) Method 'DESTROY' not found for invocant of class 'X::Method::NotFound' at (eval 1) line 16. 09:28
09:35 nowan left 09:38 nowan joined, wamba joined, TEttinger left, _mg_ joined 09:41 rurban left 09:44 _mg_ left 09:55 pierre_ joined 09:57 hankache left
masak 'noon, #perl6 09:58
this may sound outrageous, but I think I've just uncovered a bug in Rakudo
m: my $x = 0; my $y = ($x - 1) % 8; say $y
camelia rakudo-moar 48fe6a: OUTPUT«7␤»
masak m: my int $x = 0; my $y = ($x - 1) % 8; say $y 09:59
camelia rakudo-moar 48fe6a: OUTPUT«-1␤»
masak waits for someone's reaction to that
hahainternet i don't really have much to say but i thought you deserved a response 10:03
RabidGravy Oh I see
masak hahainternet: do you expect -1 in that last one?
RabidGravy well that's definitely "special"
masak submits rakudobug
hahainternet masak: i don't, i'm building moar now to play 10:04
masak one does not preclude the other :P
10:04 azawawi joined, user9 left
masak .oO( I'm not hungry, I'm getting out of bed! ) 10:05
azawawi .
yoleaux 08:11Z <RabidGravy> azawawi: nice one chief will merge in a second
azawawi RabidGravy: thx
masak could someone please use the nifty bisectbot on the above thing? I've forgotten exactly how to do it
masak trawls the backlog, trying to find out 10:06
hahainternet masak: instructions are at github.com/perl6/bisectbot
masak bisect: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y == -1
bisectable masak: (2015-12-25) github.com/rakudo/rakudo/commit/07fecb5
hahainternet haha wow 10:07
well
that's probably not right ;)
masak did I use it wrong?
hahainternet it looks like it uses christmas as the 'good' release
masak seem to have gotten the 2016.05 endpoint
hahainternet you need to find a release where it works
masak bisect: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y != -1
hahainternet i assume
bisectable masak: (2016-06-03) github.com/rakudo/rakudo/commit/6bb23a5 10:08
masak that's not an endpoint, but not a meaningful result either, AFAICS
ok, I'm not including that in the rakudobug :) 10:09
if that turns out to be meaningful, I'd very much like to hear about it...
10:11 buharin left
masak tries building an older Rakudo 10:14
10:15 colomon joined 10:16 labster left 10:23 buharin joined
azawawi strange use vs require problems with LWP::Simple when included in a Build.pm (i.e. GTK::Simple) 10:27
10:27 firstdayonthejob left 10:30 labster joined
azawawi i think GTK::Simple copy windows DLL in build.pm should be solved in another more portable way 10:31
Alien::GTK ?
maybe
10:32 pierre_ left 10:39 mr-foobar joined 10:41 rurban joined 10:44 rurban left 10:48 nadim joined
masak as far as an informal bisect can tell me, we've had the -1 bug for at least as long as we've had the nom branch. 10:49
which means the first bisect result was correct; it identified the first commit it cares about as "bad" 10:50
10:50 rurban1 joined 10:54 rindolf joined
jnthn masak: Which do you consider the correct answer, ooc? :) 10:56
ah, it says in the ticket
10:56 user9 joined 10:57 literal joined
jnthn masak: Anyway, I suspect if you write a C program that uses % you'll get the -1 also. :) 10:58
masak jnthn: oh, I can verify that.
both with Wikipedia and with an actual C program
10:58 avar joined 10:59 labster left
masak Wikipedia: en.wikipedia.org/wiki/Modulo_opera..._operation 10:59
jnthn "Implementation-defined" :)
masak are we happy with that setting in Perl 6? 11:00
jnthn Which I think tends to really mean "what the hardware does", which give it's a *native* int you might be able to argue in favor of.
Well, it's a trade-off :)
masak aye
colomon Pretty sure this all is tested in roast
jnthn I'd like to hope so, though on natives I'm not so sure :) 11:01
11:01 kid51 joined
masak I can say that even after reading the "implementation-defined", my expectation is still that Perl 6 should take care of me, and math results shouldn't change unnecessarily when going to natives 11:01
colomon jnthn: oh, true, dunno about natives
masak I say "unnecessarily" because I realize results may change with overflows and stuff
but this feels to me like Perl 6 trying not hard enough
anyway, I can see the trade-off argument, too
timotimo we could call them "almost-natives" 11:02
masak in case I'm on the losing side of this argument, how should I have written my code to get a positive result? :)
timotimo i mean, there's already a bit of overhead in the JIT for doing loads and stores, won't really be felt if it'd also do overflow checks or things like that
masak especially considering that the calculation may be platform-dependent
11:03 user9 left, vendethiel left
timotimo i think normally you'd +8 if the result turns up negative 11:03
masak do I manually check for negative and add 8 in my code? guess so.
(sorry, lag) :)
ok then, feel free to reject the ticket. 11:04
colomon tests for negative mod on Ints and Rats are in S03-operators/arith.t
masak Ints, yes. but ints?
jnthn I don't feel strongly either way on it tbh...just pointing out it's a trade-off :) 11:05
masak in my opinion, this deserves to be documented -- to me, it was not obvious. I discovered it because I got a Failure from an index-out-of-bounds.
11:06 vendethiel joined
masak are modulo arrays implemented? maybe if I'd used those, I wouldn't have seen the problem ;) 11:06
jnthn Also...if we did put the check in, we could just say "and use uint if you know you won't have negatives" and it can avoid the check :P
(on uint)
masak confirmed: C `printf("%d\n", -1 % 8);` gives -1 on my machine 11:07
m: my uint $x = 0; my $y = ($x - 1) % 8; say $y 11:08
camelia rakudo-moar 48fe6a: OUTPUT«-1␤»
masak jnthn: guessing you didn't mean it like that ;)
jnthn Hm :) 11:11
masak believe it or not, all of this is part of a *huge* yak shave of what I thought would be a simple, light-minded blog post about a toy problem 11:12
this is my fourth-or-so implementation of a search, and I chose to speed it up with native ints
jnthn :) 11:14
11:16 Deep_Thought joined
moritz contemplates starting a science blog 11:17
though I guess I should finish some other projects first :-) 11:18
11:21 nadim left 11:23 |meta joined 11:24 nadim joined
azawawi This line github.com/perl6/gtk-simple/blob/m...uild.pm#L5 is causing this weird error travis-ci.org/perl6/gtk-simple/job...7602#L1205 11:26
in 2016.05
use LWP::Simple; use NativeCall;
if you use Panda::XYZ or Shell::Command you're okay... otherwise that error occurs 11:27
dogbert17 m: my $n = ("a" => 0, "b" => 1).Bag; say $n.keys.perl # according to docs the answer should be ("b",).list is that an error or are the answers synonymous? 11:31
camelia rakudo-moar 48fe6a: OUTPUT«("b",).Seq␤»
11:32 pierre_ joined
AlexDaniel /query camelia 11:37
oops
masak: I'm working on it :) but at this particular moment you can do this 11:38
m: m: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y == -1
camelia ( no output )
AlexDaniel m: m: my int $x = 0; my $y = ($x - 1) % 8; say ‘hi’ if $y == -1
camelia rakudo-moar 48fe6a: OUTPUT«hi␤»
AlexDaniel star: m: my int $x = 0; my $y = ($x - 1) % 8; say ‘hi’ if $y == -1
camelia star-m 2016.01: OUTPUT«hi␤»
AlexDaniel so the output is the same, nothing to bisect here
11:38 pierre_ left
AlexDaniel masak: but you're completely right that it should do it automatically, yes 11:39
11:39 kaare_ left
masak AlexDaniel: should do what automatically? 11:40
AlexDaniel masak: check if the bisection process is meaningless
masak I think you're being too harsh on yourself :)
sure, it'd be nicer if it signalled that it hit one of the endpoints
preferably with a human-friendly message like "all commits on the whole timeline are bad" or some such 11:41
but I can still interpret the hitting-the-endpoint result as it is, and the bisect bot is still *awesome*
AlexDaniel well ok, but there's one even more awesome feature that I will reveal a bit later ;) 11:42
moritz: yea! Finish perl 6 first! :D
dogbert17 m: my &f:(Int) = sub bar (Int) {}; # doc.perl6.org/type/Callable
camelia rakudo-moar 48fe6a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d65_hAprte␤You can't adverb &f␤at /tmp/d65_hAprte:1␤------> 3my &f:(Int)7⏏5 = sub bar (Int) {}; # doc.perl6␤»
moritz AlexDaniel: I was thinking more of deploybook.com/ 11:43
azawawi logged the weird panda install GTK::Simple error as github.com/tadzik/panda/issues/316 :)
dogbert17 anyone knows what's wrong with the above golf?
11:45 xinming_ joined, rurban1 left
dogbert17 suspects it's something NYI ... scurries back to his lair 11:47
11:48 xinming left
llfourn dogbert17: yeah I'm pretty sure that's NYI 11:48
llfourn doesn't remember seeing that in the design docs 11:49
timotimo wellllll, we have the positional bind failover, which lets you pass Seq to things that expect list, and it converts for you 11:51
11:53 Deep_Thought left, rurban joined 11:54 Emeric joined, Deep_Thought joined 12:05 Zero_Dogg left, Zero_Dogg joined
azawawi github.com/azawawi/perl6-gtk-scint...3-demo.pl6 # GTK::Scintilla editor demo with toolbar and menubar :) 12:08
pasteboard.co/1qLQ1cnZ.png # screenshot 12:11
timotimo neat
the toolbar is kind of tall
azawawi VBox is not generic :) 12:12
need to fix it
developer.gnome.org/gtk3/stable/Gt...pack-start
we should expose expand and fill
timotimo ah, right
azawawi github.com/perl6/gtk-simple/blob/m...ox.pm6#L17 12:13
timotimo: By building actual GTK apps in Perl 6, we then could evaluate GTK::Simple implementation problems 12:14
timotimo: i.e. multiple components together
12:14 _mg_ joined
azawawi also it lets us identify the weak performance bugs in 'use XYZ;' 12:15
so far we need to improve it a lot 12:16
timotimo mhm 12:17
using the modules should be pretty fast after they have been precompiled, is that not the case? 12:18
azawawi yes and no 12:19
somehow i feel that 'use AlreadyUsedModule' is not cached correctly 12:20
timotimo you can use the RAKUDO_MODULE_DEBUG (or whatever it's called) env var to see what's going on
azawawi for example GTK::Simple::Widget is used by all
tried it
it is slow on loading a precomp
and i strace-ed it... it is not an I/O problem since i have an SSD 12:21
12:21 brrt joined
timotimo huh. 12:21
azawawi notices a GTK::Simple::Grid :)
12:22 pierre_ joined
timotimo oh yeah, "testing GTK::Simple" takes ages 12:24
brrt backlogs
timotimo oh, a window popped up
azawawi github.com/azawawi/gtk-simple/blob...Simple.pm6 12:26
when all the classes were in a single file, it was faster 12:27
when I refactored each one into its own file (like it should be), performance went down a lot 12:28
moritz does it precomp? 12:29
azawawi yup
timotimo gist.github.com/timo/f405faeb27cfd...e43caf9aff 12:30
moritz what's the column in the first number? 12:31
timotimo dunno 12:32
azawawi github.com/rakudo/rakudo/blob/nom/...der.nqp#L2
timotimo perhaps it's timing? 12:33
huh, PID?
oh, no, that's the bigger number in the second column
12:37 XliffNoSound left 12:38 dolmen joined 12:42 colomon left 12:44 colomon joined
dogbert17 ok, here's another question following from looking throught the docs 12:50
m: sub marine() { }; say ~&marine # why does this generate a warning, i.e. why is this a bad thing to do ? 12:51
camelia rakudo-moar 48fe6a: OUTPUT«Sub object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/w8CTc2ncbh line 1␤marine␤»
timotimo because that's often the sign you're doing that by accident 12:52
12:52 colomon left
dogbert17 timotimo: aha, so the compiler assumes that the user wanted to do something else then 12:53
12:53 colomon joined
timotimo the runtime does, not the compiler 12:53
as in, Sub has a .Str that gives that warning
12:54 Deep_Thought left
timotimo m: sub marine() { }; say &marine 12:55
dogbert17 timotimo: I get that, but what kind of accident are you referring to?
camelia rakudo-moar 48fe6a: OUTPUT«sub marine () { #`(Sub|66521080) ... }␤»
timotimo do note that when you say it directly, it'll be .gist'ed for you
dunno, maybe something like "this is my result: { &marine }"
dogbert17 : the reason for asking is this bug report: github.com/perl6/doc/issues/169 12:56
timotimo nine: can you spot immediately if there's something wrong going on here? gist.github.com/timo/f405faeb27cfd...e43caf9aff - or what reason there is for it being immensely slow? 12:57
dogbert17 I wanted to find a good punchline that explains the presence of the warning so I can doc it :)
i.e. if it is even worth mentioning .. 12:58
timotimo not sure
BBL 13:00
nine timotimo: looks just fine from here
13:00 ocbtec joined
nine timotimo: it loads precompiled versions of all modules and does not even have to re-check dependencies. That's as fast as we're gonna get 13:00
It also loads those dependencies only once and recognizes correctly, that they're already loaded 13:01
13:02 Zoffix joined, Zoffix left
timotimo hm, OK 13:02
brrt .tell jnthn: i like the idea of a weak hash table for mixin, coupled with some eventual update scheme
yoleaux brrt: What kind of a name is "jnthn:"?!
timotimo then something else is slowing it down immensely
brrt .tell jnthn i like the idea of a weak hash table for mixins, coupled with some eventual update scheme
yoleaux brrt: I'll pass your message to jnthn.
AlexDaniel dogbert17: dunno! Let's see… What if you were doing something like this 13:04
m: sub smth { ‘xxx’ }; my $foo = &smth; say “I love $foo”
camelia rakudo-moar 48fe6a: OUTPUT«Sub object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/9zAOpRaIwa line 1␤I love smth␤»
AlexDaniel when in reality you wanted this
m: sub smth { ‘xxx’ }; my $foo = &smth; say “I love $foo()”
camelia rakudo-moar 48fe6a: OUTPUT«I love xxx␤»
AlexDaniel uh… that's not a very good example……
13:04 spider-mario joined
AlexDaniel dogbert17: but the error message points you to a completely different thing… 13:04
so that's not what this is all about :/ 13:05
so I'm interested as well, why is it bad?
dogbert17: as far as I can see there is no test for this error message 13:06
13:07 maybekoo2 left, user9 joined 13:12 noganex_ left, azawawi left
dogbert17 AlexDaniel: a mystery indeed 13:13
13:13 shadowpaste left 13:16 Bucciarati joined 13:18 mr-fooba_ joined, Emeric1 joined, mr-foobar left 13:19 shadowpaste joined 13:20 Emeric left, Emeric1 is now known as Emeric 13:22 dolmen left 13:24 _mg_ left, Emeric1 joined, Emeric left, Emeric1 is now known as Emeric 13:26 user9 left 13:27 mr-fooba_ left 13:29 noganex joined 13:31 araujo_ joined 13:33 araujo_ left 13:35 araujo left, araujo_ joined 13:36 araujo_ left 13:39 araujo_ joined 13:40 araujo_ left 13:41 araujo_ joined 13:43 araujo_ left
RabidGravy boom 13:43
13:43 ocbtec left 13:45 araujo_ joined 13:47 araujo_ left 13:48 araujo_ joined, grondilu joined
grondilu /usr/local/src/rakudo$ git pull 13:49
Already up-to-date.
13:49 araujo_ left
grondilu ^always a bit sad when I see that 13:49
13:50 rurban left, rurban joined, buharin left 13:51 araujo joined, buharin joined 13:53 araujo_ joined 13:54 MadcapJake left, jrusso joined, araujo_ left, jrusso is now known as MadcapJake, rurban left 13:55 rurban joined, araujo_ joined 13:56 araujo left
RabidGravy software can wait I have planting to do :) 14:01
14:05 araujo__ joined 14:06 lolo78 left 14:08 araujo_ left 14:12 pierre_ left 14:19 brrt left 14:29 dupek joined 14:30 buharin left 14:32 Zoffix joined
Zoffix Any idea why this code gives me "Could not find symbol '&Actions'": github.com/zoffixznet/perl6-IRC-Cl...es/bot.pl6 The ::Actions is `used` and clearly exists: github.com/zoffixznet/perl6-IRC-Cl...ctions.pm6 14:34
llfourn Zoffix: it's probably the precomp bug 14:35
Zoffix Crap... I used : instead of :: ~_~
llfourn oh or that :P
14:36 ocbtec joined 14:39 _mg_ joined
Zoffix m: say grammar { token TOP {<foo>}; token foo { .+ } }.parse: 'foo', actions => class { method TOP ($/) { given ~$<foo> { when /foo/ {} } }; } 14:43
camelia rakudo-moar 48fe6a: OUTPUT«Cannot assign to a readonly variable or a value␤ in method TOP at /tmp/Rw17i3tBc7 line 1␤ in regex TOP at /tmp/Rw17i3tBc7 line 1␤ in block <unit> at /tmp/Rw17i3tBc7 line 1␤␤»
Zoffix m: say grammar { token TOP {<foo>}; token foo { .+ } }.parse: 'foo', actions => class { method TOP ($/) { given ~$<foo> { } }; }
camelia rakudo-moar 48fe6a: OUTPUT«「foo」␤ foo => 「foo」␤»
Zoffix m: say grammar { token TOP {<foo>}; token foo { .+ } }.parse: 'foo', actions => class { method TOP ($/ is copy) { given ~$<foo> { when /foo/ {} } }; } 14:44
camelia rakudo-moar 48fe6a: OUTPUT«「foo」␤ foo => 「foo」␤»
Zoffix Hm. I wonder if doing that is Bad Idea(tm)
m: say grammar { token TOP {<foo>}; token foo { .+ } }.parse: 'foo', actions => class { method TOP ($match) { given ~$match<foo> { when /foo/ {} } }; } 14:46
camelia rakudo-moar 48fe6a: OUTPUT«「foo」␤ foo => 「foo」␤»
14:47 Zoffix left
llfourn yeah I've hit that when using $/ as a param b4 14:47
14:47 brrt joined
llfourn but it's too convienient not to use it 14:47
inconvienient*
TimToady try 'is copy' or so mebbe 14:49
llfourn yes it's the best way 14:50
14:52 yqt joined 14:53 |meta left 14:54 brrt left 14:59 khw joined 15:02 rurban left
ugexe if you are using given/when like that, wouldnt you be better off using a proto token foo? 15:02
15:05 bjz left, mr-foobar joined 15:08 bjz joined, rindolf left, rurban1 joined 15:21 dupek left 15:35 firstdayonthejob joined 15:37 finanalyst left 15:39 Fleurety joined 15:42 aries_liuxueyang left 15:47 aries_liuxueyang joined 15:52 Fleurety left
literal how do I make things exportable-but-not-by-default, and then selectively import those things? 16:00
by name, rather than by some arbitrary export tag 16:01
16:04 jjido joined
literal it seems that everything will be imported if no extra names are passed to 'use', but selective importing is done if names were passed 16:04
llfourn literal: you can make tags for the name -- sub foo is export(:foo) { }
16:05 hankache joined
literal yeah, but I don't want to make up tags for things, I just don't want anything to be exported unless it is requested, which is considered good practice on e.g. CPAN 16:05
makes it easy to skim code to see where symbols come from
llfourn you don 16:06
't have to make up the tags you just put them as the same name.
exporting is done via tags and that's it afaik
literal yes, but then I still need to repeat every symbol name with export(:whatever), right? 16:07
llfourn yeah it's a little LTA
stevieb9 LTA?
llfourn less than awesome
stevieb9 ahhh, thanks 16:08
llfourn it would be nice if everything was exported under it's own name maybe?
or you could pass something short to is export which just exported it under its own name...
literal it is, with "is export", my only issue is that it's all imported by 'use' if you don't request anything
or have an "is exportable" or "is importable" that makes things available but only on request 16:09
llfourn that sounds nice
the way it works is that "is export" just puts it into the DEFAULT tag
literal I see 16:10
llfourn and 'use Foo;' imports from DEFAULT and MANDATORY
I rkn you could put "is exportable" in a module
as a start
or "importable" maybe better 16:11
16:11 Actualeyes joined
llfourn multi trait_mod:<is>(Routine:D $r,:importable!) { CALLER::UNIT::EXPORT::{$r.name} = $r } # it should be as easy as this 16:13
:$importable*
but actually it won't work in practice...
16:14 vendethiel left
stevieb9 so, am I correct in thinking you're trying to do something like perl5's: use Foo qw(bar baz);, even though Foo exports foo(), bar(), baz()? 16:15
llfourn well yeah, in p6 it's probably preferable that it's use Foo :bar, :baz; 16:16
which you can do but you have to repeat yourself sub bar is export(:bar) { ... } 16:17
16:25 telex left 16:26 telex joined, tomboy64 left 16:27 tomboy64 joined 16:29 tomboy64 left, rurban1 left, tomboy64 joined, ifim joined 16:30 brrt joined, rindolf joined 16:31 tomboy64 left 16:32 jjido left, tomboy64 joined 16:40 rurban joined 16:47 BenGoldberg joined
dalek c: 565a303 | (Jan-Olof Hendig)++ | doc/Type/Date.pod:
Added docs for Date.new-from-daycount
16:50
16:54 dupek joined 16:57 Emeric1 joined 16:58 Emeric left, Emeric1 is now known as Emeric 17:01 brrt left 17:07 Emeric left, Emeric joined 17:10 ifim left 17:18 Emeric left 17:19 Emeric joined 17:22 Emeric left, brabo left, Emeric joined 17:24 brabo joined 17:25 Actualeyes left 17:28 brabo left, Zoffix__ joined, Emeric left, Emeric joined 17:30 Zoffix__ left 17:31 jjido joined 17:32 jjido left 17:34 brabo joined 17:42 aries_liuxueyang left 17:43 aries_liuxueyang joined 17:45 s_kilk joined
hankache m: say '1 random text 2' ~~ / \d+ /; 17:45
camelia rakudo-moar 48fe6a: OUTPUT«「1」␤»
hankache how can you capture both numbers?
1 and 2?
17:46 ssotka joined
jnthn m: say '1 random text 2' ~~ m:g/ \d+ /; 17:47
camelia rakudo-moar 48fe6a: OUTPUT«(「1」 「2」)␤»
yoleaux 13:02Z <brrt> jnthn: i like the idea of a weak hash table for mixins, coupled with some eventual update scheme
ugexe m: say "1 random text 2".comb(/\d+/); # this also may be up your alley
camelia rakudo-moar 48fe6a: OUTPUT«(1 2)␤»
hankache thanks jnthn ugexe 17:48
17:55 zakharyas joined 17:56 yqt left 17:57 brabo left 18:03 psch_ is now known as psch 18:04 brabo joined 18:05 Emeric left 18:08 ssotka left 18:11 Emeric joined
AlexDaniel m: say "1 random 25 text".split(/\D+/, :skip-empty) 18:17
camelia rakudo-moar 48fe6a: OUTPUT«(1 25)␤»
18:18 s_kilk left 18:20 brabo left 18:23 rurban left 18:26 brabo joined 18:27 grondilu left 18:29 grondilu joined 18:38 Emeric left 18:39 Emeric1 joined 18:40 inokenty left 18:41 Emeric1 is now known as Emeric
stevieb9 in the docs for the hyper op, it shows: say <1 2> <<~>> <a b>. This does the same thing as: say <1 2> <<~>> <a b>. I then tested like this: say <1 2> <<~<< <a b>, which again displays the same output, but I expected it to produce (a1 b2) instead of (1a 2b). Is the direction of the operator irrelevant? 18:43
18:43 colomon left
stevieb9 whoops, added the original doc-style use twice 18:44
m: say <1 2> >>~<< <a b> 18:45
camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
stevieb9 m: say <1 2> <<~<< <a b>
camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
18:48 TimToady left 18:49 TimToady joined
timotimo the direction of the arrows is only for what side gets extended if the sides aren't the same length 18:50
if you want it to apply "backwards" you need R 18:51
m: say <1 2> <<R~>> <a b>
camelia rakudo-moar 48fe6a: OUTPUT«(a1 b2)␤»
jnthn m: say <1 2 3> >>~<< 'a'
camelia rakudo-moar 48fe6a: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<~> are not of the same length␤left: 3 elements, right: 1 elements␤ in block <unit> at /tmp/hmLPC2Mx9w line 1␤␤»
jnthn m: say <1 2 3> >>~>> 'a'
camelia rakudo-moar 48fe6a: OUTPUT«(1a 2a 3a)␤»
18:51 |meta joined
RabidGravy yeah, it's less typing to just use Z 18:51
m: say <1 2> Z~ <a b> 18:52
camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
jnthn m: say <1 2 3> Z~ 'a' # not for this one though :)
camelia rakudo-moar 48fe6a: OUTPUT«(1a)␤»
stevieb9 nice!
RabidGravy true
jnthn Depends what you want, of course :-)
Also worth knowing is that Z is producing a (potentially lazy) Seq, whereas hyperops are eager and allowed to distribute the work over threads. 18:53
jnthn bbiab
masak .oO( recent cutting-edge Perl 6 research has produced the new lazy-eager form of evaluation, tentatively named "freakin' lazer" ) 18:57
masak .oO( pew pew ) 18:58
mst masak: and the new framework for writing programs with frickin lazers, Shark
masak mst: and its package manager, Sharknado
masak .oO( we've lately decided to rewrite Sharknado from the ground up, into Sharknado II ) 18:59
mst masak: danger: if you attempt to run sharknado on a system with insufficient disk space, it will report "error: plane too full of snakes"
masak at least it's not full of eels 19:02
RabidGravy unlike your hovercrafts
19:09 colomon joined
timotimo my dip switches explode with delight! 19:11
19:15 cdg joined 19:16 labster joined
dalek osystem: c457d09 | palapitta++ | META.list:
Bencode

provides encode and decode functions
19:16
osystem: 5a35f74 | (Andy Weidenbaum)++ | META.list:
Merge pull request #215 from palapitta/patch-4

Bencode
19:16 Zoffix joined
Zoffix Any idea how to make errors more useful? For example, this line is missing a mandatory positional: github.com/zoffixznet/perl6-IRC-Cl...nt.pm6#L35 However, the error says it's on line 20 and isn't useful (gist.github.com/zoffixznet/442fc89...931affd3a) 19:20
I think in the past, CATCH { warn .backtrace }, was useful enough, but seems it's no longer...
19:20 araujo_ joined 19:23 TimToady left 19:24 araujo__ left
protium m: say ('a' .. 'z').roll 19:24
camelia rakudo-moar 48fe6a: OUTPUT«v␤»
19:25 colomon left, TimToady joined 19:34 TEttinger joined 19:36 darutoko left 19:46 rindolf left 19:50 mohae_ left 19:54 kaare_ joined 19:55 yqt joined 19:59 kaare_ left 20:08 ssotka joined, cdg left
pochi m: @a = ( [ [1,2,3], [4] ], [ [6,7], [8,9] ] ); for @a -> $foo:(@b,@c) { say @b; say @c; say "-" } 20:12
camelia rakudo-moar 48fe6a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/86vv0K5dq4␤Variable '@a' is not declared␤at /tmp/86vv0K5dq4:1␤------> 3<BOL>7⏏5@a = ( [ [1,2,3], [4] ], [ [6,7], [8,9]␤»
pochi m: my @a = ( [ [1,2,3], [4] ], [ [6,7], [8,9] ] ); for @a -> $foo:(@b,@c) { say @b; say @c; say "-" }
camelia rakudo-moar 48fe6a: OUTPUT«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
pochi what's $foo good for in that statement?
20:14 zakharyas left
masak it's not used. 20:14
you could skip it
pochi m: my @a = ( [ [1,2,3], [4] ], [ [6,7], [8,9] ] ); for @a -> :(@b,@c) { say @b; say @c; say "-" }
camelia rakudo-moar 48fe6a: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤ in block <unit> at /tmp/GTHf1zqlkj line 1␤␤»
lizmat m: use nqp; say nqp::mod_i(-1,8); say nqp::mod_I(-1,8,Int) # masak 20:15
camelia rakudo-moar 48fe6a: OUTPUT«-1␤7␤»
20:15 kaare_ joined
masak pochi: superstitious parens 20:18
pochi m: my @a = ( [ [1,2,3], [4] ], [ [6,7], [8,9] ] ); for @a -> @b,@c { say @b; say @c; say "-" }
camelia rakudo-moar 48fe6a: OUTPUT«[[1 2 3] [4]]␤[[6 7] [8 9]]␤-␤»
pochi that does something else 20:19
masak I meant in the rhs of the `my`
pochi oh
masak in Perl 5 you have to use those parens
not so in Perl 6
pochi ok
masak (though you still need them on the lhs when you do `my ($a, $b, $c)` 20:20
)
pochi got it
what did you mean by skipping $foo? $:(@b,£c)? 20:21
@c
masak let me try locally, and then get back to you 20:22
m: my @a = [ [1,2,3], [4] ], [ [6,7], [8,9] ]; for @a -> (@b,@c) { say @b; say @c; say "-" }
camelia rakudo-moar 48fe6a: OUTPUT«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
masak there we go.
that's how I would write it. 20:23
m: my @a = [ [1,2,3], [4] ], [ [6,7], [8,9] ]; for @a -> [@b,@c] { say @b; say @c; say "-" }
camelia rakudo-moar 48fe6a: OUTPUT«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
20:23 hankache left
masak or that; I guess that's more precise, since they're arrays. 20:23
pochi thought I had to use the colon 20:24
so without parens, I get each element in @a, and with parens it does pattern matching? 20:25
masak something like that, yes 20:27
today I found myself writing `when (*, * < 0) { ... }`, but then realized that Perl 6 isn't clever enough to DTRT with that... :) 20:28
mst ah, yes, 'my @foo = 1, 2, 3;' is my mortal enemy in perl5 20:29
BenGoldberg (my @foo = 1), 2, 3; 20:30
masak mst: sounds like something very structural that a linter-ish thing could catch.
mst: I so would use an mst-approved linter ;)
geekosaur except that parsing perl5 in a linter is only slightly preferable to removing one's eyes with a spork 20:35
masak thought PPI mostly fix'd that 20:38
mst metacpan.org/pod/Perl::Critic::Freenode is a mostly-mst-approved thing 20:42
I've often considered trying to put together a Perl::Critic::MAP (mst's acceptable practices) to go with the amin one being DBP 20:43
20:44 stevieb9 left
Zoffix Curious, is there a way to avoid repetitive stuff in here? gist.github.com/zoffixznet/0315a03...2f6dbd1290 Specifically the IRC::Client::Message:: prefix in names of all the roles and the does IRC::Client::Message for them.... 20:45
20:46 dupek left 20:47 stevieb9 joined
masak I don't find that so bad 20:49
but if you want to shorten names, then `constant` is your friend 20:50
Zoffix huh?
masak m: class Really::Long::Name {}; constant R = Really::Long::Name; say R
camelia rakudo-moar 48fe6a: OUTPUT«(Name)␤»
Zoffix Hm
masak++ not bad 20:51
masak been there, done that ;)
that must've been back in 2011, when I realized that
with the Web.pm project
Zoffix Wasn't there a way to shorten the IRC::Client::Message prefix too? I think I've seen somewhere people defining just the last part and it worked fine
mst masak: that's how I do it in perl5 20:52
Zoffix s/shorten/get rid of/;
mst except with 'use aliased' to save typing
masak ooh, `use aliased` 20:54
Perl 5 is so cute!
Zoffix heh 20:55
masak I wish we had half the bells and whistles!
m: package A { class B {}; class C is B {} }; say A::C
camelia rakudo-moar 48fe6a: OUTPUT«(C)␤»
masak Zoffix: you might be able to do something with the above mechanism, too 20:56
that is, inside of a package, you are allowed to use only the last part of the name
mst masak: don't worry, I'm sure I'll start dragging my usual tooling in over time
Zoffix m: package A { role B {}; role C is B {} }; say A::C
camelia rakudo-moar 48fe6a: OUTPUT«(C)␤»
Zoffix Aha! masak++
masak .oO( ultimately, the Perl 6 endeavour succeeded because of mst's stubbornness )
21:00 bjz_ joined
Zoffix Ahhh 21:00
masak++ This looks very satisfactory: gist.github.com/zoffixznet/f7a75fe...6cf0745514
:)
21:01 BenGoldberg left, bjz left
masak I live to serve. 21:01
mst very nice except the closing brace style hurts my eyes 21:02
Zoffix 😜
mst whatever that was, it didn't render here
21:02 dolmen joined
Zoffix m: '😜'.uninames.say 21:03
camelia rakudo-moar 48fe6a: OUTPUT«(FACE WITH STUCK-OUT TONGUE AND WINKING EYE)␤»
mst I'm really not a fan of the whole 'introducing extra whitespace to align things mid-line as well as at the start' thing 21:04
the only extent to which I expect anybody else to care about that is that they'll need to remember to check my patches in case I forget to do so in a codebase where that's preferred style
slobo .tell sortiz I'm able to correctly access the elements of a list, but then I get random crashes, eg: moar(23669,0x7fff75b7b000) malloc: *** error for object 0x7fe448b70138: incorrect checksum for freed object - object was probably modified after being freed.
yoleaux slobo: I'll pass your message to sortiz.
masak I'm with mst on that one 21:05
I used to be big on vertical aligning of all kinds of things
about 8..10 years ago or so 21:06
I've since stopped
life is simply too short for that kind of stuff
my code is not about things being vertically above each other anyway. it's invariably about other things
literal m: my @ar = <a b c d>; say @ar[0..^*] 21:11
camelia rakudo-moar 48fe6a: OUTPUT«(a b c d)␤»
literal :/ 21:12
masak literal: you'd have to *-1
literal yeah, that's what I've been using
wanted ^ to work there
masak literal: because * here is the length
literal ah, ok 21:13
masak and so ^* means the last element
21:14 jjido joined
AlexDaniel Zoffix: what is $.what? 21:14
21:14 jjido left 21:16 rurban joined, kaare_ left
masak message payload, most likely 21:16
Zoffix AlexDaniel, $.what was said 21:23
m: my @ar = <a b c d>; say @ar[^*]
AlexDaniel Zoffix: what about $.message $.text or anything that is more descriptive and less synonymous to .WHAT?
camelia rakudo-moar 48fe6a: OUTPUT«(a b c d)␤»
21:24 MasterDuke joined
Zoffix AlexDaniel, I'll go with .text 21:24
Done :)
geekosaur .schtuff 21:25
AlexDaniel .шtuff
Zoffix m: my @ar = <a b c d>; say @ar[0,^2,^1,^3]
camelia rakudo-moar 48fe6a: OUTPUT«(a (a b) (a) (a b c))␤»
Zoffix Neat.
21:25 labster left
MasterDuke any idea why my clone of nqp, up to date with upstream master, has a --version of 2016.04-158-gac38b5f? 21:26
yoleaux 2 Jun 2016 05:32Z <Xliff> MasterDuke: Thanks for the link. I haven't tried that, yet. The module is still under development, and I need to know how %?RESOURCE will work when the file still lives in the module installation directory. I will pursue this further!
21:27 labster joined
geekosaur MasterDuke, git fetch --tags ? 21:27
(guessing...)
MasterDuke geekosaur: no output
geekosaur since that's git describe output and it bases itself on the most recent annotated tag, so if you don't fetch the tags periodically it'll keep growing 21:28
masak .штуф 21:29
Zoffix That's "shtoof" :)
.u cyrillic a
yoleaux U+2DF6 COMBINING CYRILLIC LETTER A [Mn] (◌ⷶ)
Zoffix dafuq 21:30
MasterDuke geekosaur: that was it, just had to do git fetch upstream master --tags
Zoffix .u cyrillic ah
yoleaux No characters found
MasterDuke thanks
geekosaur notes that if he ignores the fact that he can read Cyrillic, that does look a bit like .wtf :p 21:31
Zoffix m: say ^0xFFFF .grep: {.uninames ~~ /CYRILLIC/}
camelia rakudo-moar 48fe6a: OUTPUT«Cannot call uninames(Int); none of these signatures match:␤ (Str:D $str)␤ in block <unit> at /tmp/ssESUJYVGN line 1␤␤»
Zoffix m: say ^0xFFFF .grep: {.uniname ~~ /CYRILLIC/}
camelia rakudo-moar 48fe6a: OUTPUT«(1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 …»
Zoffix gives up
geekosaur unicode cyrillic uses the latin letters where it can. mostly 21:33
Zoffix didn't know that
TEttinger eh?
what about all the domain punicode attack stuff?
geekosaur oh. no, I found it
TEttinger where A looks exactly like A
21:33 _mg_ left
geekosaur .u cyrillic small letter a 21:34
yoleaux U+0430 CYRILLIC SMALL LETTER A [Ll] (а)
geekosaur sigh, just make it even harder why don't uyou
Zoffix m: say (^0xFFFF)».chr.grep: {.uniname ~~ /CYRILLIC/}
camelia rakudo-moar 48fe6a: OUTPUT«(Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є …»
geekosaur (that's a reference to punycode)
21:35 rurban left
mst Zoffix: you did stuff with 'whenever' for a blog post, didn't you? where does the FM live? 21:35
geekosaur it *should* reuse letters, it doesn't for mostly political reasons, welcome to hell
21:35 rurban joined
Zoffix mst, are you asking whether I wrote a blogpost about whenever? No, I didn't. 21:36
mst Zoffix: hm. thought you had.
Zoffix I might after I attend Damian talks. One of them will be on concurrency.
All Perl 6 stuff I wrote is at perl6.party/
Plus this one: perl6advent.wordpress.com/author/zoffix/ 21:37
masak mst: check out the top few talks at jnthn.net/articles.shtml
jnthn Plus I did a couple of blog posts (one in Perl 6 advent) using whenever 21:38
jnthn <3 whenever
lizmat m: use nqp; say nqp::mod_i(-1,8) # jnthn : do you consider this an issue or not ? 21:39
camelia rakudo-moar 48fe6a: OUTPUT«-1␤»
mst jnthn: I'm fully expecting to fall in love with it and then break it by introducing Inline::Perl5 into the equation 21:40
jnthn lizmat: It was discussed at some length here earlier today :)
lizmat ah, ok, will backlog then
21:41 Emeric left
jnthn lizmat: But in summary: I suspect we'll probably bring the int semantics in line with the Int ones, because while "you asked for native, you'll get what the darn machine does" is a kinda valid argument, it's a bit of a rough edge... 21:42
lizmat jnthn: wrt to being tested, it is *not*
my quick fix would be: 21:43
- nqp::mod_i($a, $b)
+ nqp::mod_i(nqp::add_i(nqp::mod_i($a,$b),$b),$b)
masak I'll just note in passing that as a user to which scary stuff randomly happens, I'm happy with this 21:45
21:45 rurban1 joined
masak lizmat: could you even ditch the innermost mod_i ? 21:45
seems to me one could get away with one mod_i 21:46
lizmat also for -17,8 ?
21:47 rurban left
masak m: say -17 % 8 21:49
camelia rakudo-moar 48fe6a: OUTPUT«7␤»
masak ah. point taken.
good ues case :) lizmat++
ok, then I'll amend my suggestion to say that the quick fix looks like a quick fix 21:50
lizmat the way I see it: the inner "normalizes"
masak aye
lizmat this way there's also one path, no conditionals 21:51
masak there's something to be said for that, indeed
21:51 rurban joined
masak feels like he's learning new stuff every day 21:52
21:52 rurban2 joined, dolmen left
masak I was about to submit a rakudobug today about .sort having lost its stability guarantee 21:53
lizmat fwiw, I can't see a difference in benchmarks
MasterDuke AlexDaniel: i still haven't heard anything about my rt.perl.org account, do you know any names in particular i could reach out to?
21:53 rurban3 joined
masak turned out I was sorting on doubles, and there were subtle differences between the doubles, which screwed up the stability 21:53
AlexDaniel MasterDuke: did you write to [email@hidden.address] ? 21:54
masak sometimes my career feels like a big multiplication table of feature-X-vs-feature-Y in every possible combination
MasterDuke yeah
AlexDaniel MasterDuke: well… I don't know. Kevin Falcone was the one who fixed my account
lizmat masak: fix for RT #128318 committed 21:55
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128318
jnthn lizmat: Not sure whether a predictable branch comes out worse than a duplicate modulo on typical hardware... :)
AlexDaniel MasterDuke: but he replied from perlbug-admin email, so I dunno
lizmat fwiw, on 1M iterations, I can't see the difference in performance
21:55 rurban1 left
jnthn How're you measuring? :) 21:55
1M iterations isn't many for tight native code ;) 21:56
lizmat hmmm....
21:56 rurban2 left, rurban left
lizmat $ 6 'use nqp; for ^1000000 { nqp::mod_i(nqp::add_i(nqp::mod_i(-1,8),8),8) }' 21:56
jnthn But yeah, it may just be that ILP saves the day :)
masak also, that's on one architecture...
lizmat true
jnthn Oh, if you use a for loop it'll be swamped in that overhead :)
Invoking the loop body block costs more than the math operation :) 21:57
lizmat I know
I guess it just means that in the current state of Rakudo, it doesn't make a difference
jnthn If you have it to hand, callgrind can give more accurate numbers :)
Sure, but do ten things that "don't make a difference" because they're 0.5% difference each and you suddenly have a 5% improvement. ;-) 21:58
lizmat true
jnthn Anyway, I'm fine with putting that fix in for now :) 21:59
We may want to push it down VM-wards later
lizmat anyways, I see it as a temporrary fix
indeed
jnthn But it's not just "fix interp.c"; we'd have to fix the JIT too
lizmat faster there to check for < 0
21:59 ocbtec left
jnthn Maybe not 21:59
Branches can be expensive.
lizmat hence my approach
which wouldn't be a branch 22:00
(I think)
jnthn Correct...just saying even in MoarVM an approach like yours might win on modern hardware :) 22:02
Um, even writing it in C, to be precise.
lizmat :-) 22:07
lizmat goes to bed
so good night, #perl6!
masak 'night, lizmat 22:08
Zoffix \o
masak it's now the end of the day, and on balance I still feel that "behave like the non-native integers" trumps "behave like whatever native platform you're on" for anything except overflow
but again, that's just my opinion
jnthn masak: Yeah, on reflection I lean that way too. It's just surprising enough to stub your toe on and get annoyed by. 22:11
My goodness, I think a stream train just went by my apartment... 22:12
mst always nice when that happens
22:13 |meta left
masak I'm glad I seem to harmonize with @dev on this one 22:15
22:17 pmurias joined 22:26 user9 joined 22:29 rurban3 left 22:32 pmurias left
pochi m: "(1,2) (3,4)".split(" ").map: /"(" (\d+) "," (\d+) ")"/ 22:37
camelia rakudo-moar 986891: OUTPUT«Method '!cursor_start' not found for invocant of class 'Str'␤ in block <unit> at /tmp/EyAIUz8SzS line 1␤␤»
masak today's autopun spotting: "There are three things I always forget. Names, faces and... the third I can't remember. 22:44
" -- Italo Svevo
mst :D
22:50 RabidGravy left 22:53 IRCBot1465080803 joined, user9 left 22:54 IRCBot1465080803 left 22:58 inokenty joined
Zoffix New IRC::Client's debug output is so purty :D i.imgur.com/kCAzNYF.png 23:00
Hotkeys Hey I haven't been around here a while 23:01
is panda still the preferred thingy 23:02
Zoffix uses zef
Hotkeys, there's also this you could try out: github.com/tadzik/App-redpanda 23:04
23:05 raiph joined 23:06 firstdayonthejob left 23:12 raiph left, raiph joined
DANtheBEASTman any is there perhaps an ubuntu ppa for perl6? moarvm and rakudo seem to be in the repos but i'm sure they're already outdated.. or should i just give in and build from source 23:12
Zoffix DANtheBEASTman, just build from sauce. sudo apt-get install build-essential git; 23:14
And I have this aliased to update-perl6: rm -fr ~/.zef; rm -fr ~/.perl6; rm -fr ~/.rakudobrew/; git clone github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef;
Oh, and add to path: ~/.rakudobrew/bin:~/.rakudobrew/moar-nom/install/share/perl6/site/bin/ 23:15
Any idea what's wrong with my grammar? The `left-overs` is always empty and `token message` always gets the end of text, even though it doesn't end with "\n": github.com/zoffixznet/perl6-IRC-Cl...mar.pm6#L3 23:20
I suspect it's the token ws {} business... I tried with token ws { ' ' } but behaviour didn't change. 23:21
Hotkeys is there going to be a 2016.05?
Zoffix 2016.05 what? 23:22
Hotkeys oops 23:23
nvm
Zoffix huggable, download rakudo :is: Rakudo downloads: rakudo.org/downloads/rakudo/ 23:26
huggable Zoffix, Added download rakudo as Rakudo downloads: rakudo.org/downloads/rakudo/
Zoffix huggable, download rakudo star :is: Rakudo Star downloads: rakudo.org/downloads/star/
huggable Zoffix, Added download rakudo star as Rakudo Star downloads: rakudo.org/downloads/star/
Zoffix huggable, download R* :is: Rakudo Star downloads: rakudo.org/downloads/star/
huggable Zoffix, Added download R* as Rakudo Star downloads: rakudo.org/downloads/star/
Zoffix m: say grammar { token TOP { <m>+ <left>}; token left { \N* }; token m { \w+ \n } }.parse: "foo\nbar" 23:28
camelia rakudo-moar 986891: OUTPUT«「foo␤bar」␤ m => 「foo␤」␤ left => 「bar」␤»
Zoffix works here.. dafuq 23:29
Maybe the issue is with my actions github.com/zoffixznet/perl6-IRC-Cl...ctions.pm6 23:31
23:36 raiph left
Hotkeys Can I force rakudobrew to build with gmake instead of nmake? for some reason nmake refuses to build p6 23:36
I suppose I could just manually build 23:38
23:45 pierre_ joined
Zoffix FUUUUUU (╯°□°)╯︵ ┻━┻ 23:51
Wasting time on this shit
23:52 pierre_ left
Zoffix m: my $str; (my $e, $str) = grammar { token TOP { <m>+ <left>}; token left { \N* }; token m { .+? \n } }.parse(":barjavel.freenode.net 372 IRCBot1465083014 :- running for their sustained support.\r\n:barjavel.freenode.", actions => class { method TOP ($/) { $/.make: ($<m>».made, ~$<left>)}; method m ($/) { $/.make: ~$/ } }).made; say $str 23:53
camelia rakudo-moar 986891: OUTPUT«:barjavel.freenode.␤»
23:54 pierre_ joined 23:59 ssotka left