Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-06-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:11 infina joined #perl6
00:11 infina joined #perl6
00:13 BenGoldberg joined #perl6
00:15 pierre_ joined #perl6
00:18 jack_rabbit joined #perl6
00:29 gorgonzola joined #perl6
00:42 Actualeyes joined #perl6
01:08 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 timotimo and mighty subscripts, and lazy lists
01:10 Zoffix Someone's complaining the docs are too complicated. I strongly disagree, but maybe it's just me: https://www.reddit.com/r/perl/comments/4mb0e​d/revisiting_perl_6_and_my_first_pr/d3uhb5t
01:13 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:14 stevieb9 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:15 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!…»
01:16 Zoffix stevieb9, ^ lazy stuff is also chainable. Which may look weird coming from Perl 5 :)
01:17 Zoffix i.e. the first .grep() there doesn't sit and wait to pick out all primes :P
01:17 Zoffix to infinity
01:18 stevieb9 Zoffix: a bit above my head ;) in a week or two, I may ask more questions ;)
01:19 stevieb9 nevermind I said that. I get it. ^ I like!
01:24 kalkin- joined #perl6
01:25 stevieb9 I still don't grasp what the '*' is for. Can you explain (or point me to the docs)?
01:26 jdv79 stevieb9: http://doc.perl6.org/type/Whatever probably
01:26 stevieb9 jdv79: merci beaucoup
01:27 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:28 Zoffix m: (* × * × * )(2, 3, 4).say
01:28 camelia rakudo-moar 48fe6a: OUTPUT«24␤»
01:28 Zoffix m: ($^a × $^b × $^c )(2, 3, 4).say
01:28 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␤»
01:28 Zoffix m: {$^a × $^b × $^c }(2, 3, 4).say
01:28 camelia rakudo-moar 48fe6a: OUTPUT«24␤»
01:28 Zoffix m: sub ($a, $b, $c) {$a × $b × $c }(2, 3, 4).say
01:28 camelia rakudo-moar 48fe6a: OUTPUT«24␤»
01:28 Zoffix and so on
01:29 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.
01:30 Zoffix jdv79, sounds pretty good.
01:30 stevieb9 peace out, #perl6, I'm enjoying my time here
01:30 Zoffix I think on my box I get 1m35s or so
01:30 Zoffix \o
01:30 jdv79 just for parse or total built?
01:30 Zoffix parse
01:31 jdv79 i got about 1:30 for entire "make install"
01:31 jdv79 cool
01:31 Zoffix Man, this bash quote bugs me every time I come across it http://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! :)
01:32 Zoffix wow... finding it again proved a lot easier than I thought it would be! :o
01:34 Zoffix Nothing shows up when grepping for TODO https://sourceforge.net/projects/tetralog/ I guess I removed it :P
01:34 * Zoffix can now rest easy
01:37 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:38 jdv79 what's xp and rep?
01:39 jdv79 my laptop takes 2x as long as the new box for parse and about 1.5x as long for make install
01:39 jdv79 improvement!
01:39 molaf joined #perl6
01:40 Zoffix XP = experience; rep = reputation. Typically "points" awarded by other users on sites like StackOverflow
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:50 finanalyst joined #perl6
01:52 timotimo zoffix gets 10 points for the explanation, plus one extra point for not having copy-pasted it from somewhere else.
01:52 timotimo zoffix reached the next level! their rep increases by 1d6
01:52 timotimo m: say 1..6 .roll
01:52 camelia rakudo-moar 48fe6a: OUTPUT«1..6␤»
01:52 timotimo m: say (1..6).roll
01:52 camelia rakudo-moar 48fe6a: OUTPUT«5␤»
01:52 timotimo wow, almost a critical success
02:13 Xliff joined #perl6
02:14 XliffNoSound \o
02:14 XliffNoSound 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.
02:14 XliffNoSound I've spent all day trying to diagnose it, but nothing has helped.
02:15 XliffNoSound So back to mute coding in perl (or rather... breaking out the old desktop and using that for music)
02:20 finanalyst Good time-of-day.
02:21 finanalyst I'm trying to see whether an input, taken as text, is an integer.
02:22 finanalyst camelia: my $s='6'; say $a ~~ Int ?? 'y' !! 'n'
02:22 finanalyst m: my $s='6'; say $a ~~ Int ?? 'y' !! 'n'
02:22 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'␤»
02:23 finanalyst m: my $s='6'; say $s ~~ Int ?? 'y' !! 'n'
02:23 camelia rakudo-moar 48fe6a: OUTPUT«n␤»
02:24 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 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␤»
02:27 finanalyst solved by asking :)
02:39 noganex_ joined #perl6
03:17 jdv79 I heard a rumor that tim bunce isn't going to do the p6 DBI.  anyone know about that?
03:26 tomfu joined #perl6
03:26 bjz joined #perl6
03:30 tomfu left #perl6
03:30 tomfu joined #perl6
03:57 mohae_ joined #perl6
04:12 bjz_ joined #perl6
04:26 labster joined #perl6
04:27 Cabanossi joined #perl6
04:48 pierre_ joined #perl6
04:50 pierre__ joined #perl6
04:54 kaare_ joined #perl6
05:06 pierre_ joined #perl6
05:10 rurban joined #perl6
05:12 ssotka joined #perl6
05:17 jdv79 wow.  ran the spectests in 220s.  a handful of failures though:(
05:20 jrusso joined #perl6
05:22 wamba joined #perl6
05:31 jack_rabbit joined #perl6
05:31 juantelez joined #perl6
05:57 rurban left #perl6
06:11 rurban joined #perl6
06:21 hankache joined #perl6
06:34 vishnu joined #perl6
06:37 bjz joined #perl6
06:39 jack_rabbit joined #perl6
06:42 rurban left #perl6
06:56 bartolin joined #perl6
06:57 bartolin joined #perl6
06:57 buharin joined #perl6
06:58 buharin hello my friends
07:04 hankache hello
07:08 RabidGravy joined #perl6
07:11 rindolf joined #perl6
07:28 hankache joined #perl6
07:33 RabidGravy boom!
07:37 darutoko joined #perl6
07:38 ribasushi joined #perl6
07:40 pierre_ joined #perl6
07:41 girafe joined #perl6
07:41 dolmen joined #perl6
07:47 firstdayonthejob joined #perl6
08:04 FROGGS joined #perl6
08:05 azawawi joined #perl6
08:06 lolo78 joined #perl6
08:06 azawawi RabidGravy: good morning
08:06 azawawi RabidGravy: https://github.com/perl6/gtk-simple/pull/45  # Menubar support & example :)
08:07 * azawawi goes shopping for a new machine :) &
08:10 RabidGravy azawawi++ # makes everyone else look slack
08:11 RabidGravy .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 #perl6
08:18 setty1 joined #perl6
08:20 rurban joined #perl6
08:22 [particle] joined #perl6
08:25 FROGGS morning o/
08:28 labster joined #perl6
08:37 RabidGravy goo mornin
08:39 dalek gtk-simple: 5814b13 | azawawi++ | / (6 files):
08:39 dalek gtk-simple: Add initial menu bar support
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/5814b132e8
08:39 dalek gtk-simple: 6410b6e | azawawi++ | / (5 files):
08:39 dalek gtk-simple: Nearly there
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/6410b6eaaa
08:39 dalek gtk-simple: 26728c1 | azawawi++ | examples/10-menu-bar.pl6:
08:39 dalek gtk-simple: Menu bar example is working now
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/26728c118f
08:39 dalek gtk-simple: dce68ed | azawawi++ | README.md:
08:39 dalek gtk-simple: More documentation about toolbar and menus
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/dce68edb75
08:39 dalek gtk-simple: f051fa0 | azawawi++ | README.md:
08:39 dalek gtk-simple: Sort table and properly wrap
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/f051fa04f2
08:39 dalek gtk-simple: 98de6dc | azawawi++ | META6.json:
08:39 dalek gtk-simple: Add missing menu assets to json metadata
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/98de6dcbef
08:39 dalek gtk-simple: 4f1bfdd | RabidGravy++ | / (8 files):
08:39 dalek gtk-simple: Merge pull request #45 from azawawi/master
08:39 dalek gtk-simple:
08:39 dalek gtk-simple: Add Menubar support & example + documentation fixes
08:39 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/4f1bfddf95
08:51 AlexDaniel joined #perl6
08:52 jdv79 wwhy does Inline::Perl5 dep on panda?
08:53 nine cargo culting
08:53 sjn cargo quilting
09:06 pierre_ joined #perl6
09:07 jdv79 anyone know if zef should be able to install Inline::Perl6
09:07 jdv79 5
09:07 jdv79 i think mine hung
09:09 jack_rabbit joined #perl6
09:28 maybekoo2 joined #perl6
09:28 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:38 nowan joined #perl6
09:38 wamba joined #perl6
09:38 _mg_ joined #perl6
09:55 pierre_ joined #perl6
09:58 masak 'noon, #perl6
09:58 masak this may sound outrageous, but I think I've just uncovered a bug in Rakudo
09:58 masak m: my $x = 0; my $y = ($x - 1) % 8; say $y
09:58 camelia rakudo-moar 48fe6a: OUTPUT«7␤»
09:59 masak m: my int $x = 0; my $y = ($x - 1) % 8; say $y
09:59 camelia rakudo-moar 48fe6a: OUTPUT«-1␤»
09:59 * masak waits for someone's reaction to that
10:03 hahainternet i don't really have much to say but i thought you deserved a response
10:03 RabidGravy Oh I see
10:03 masak hahainternet: do you expect -1 in that last one?
10:03 RabidGravy well that's definitely "special"
10:03 * masak submits rakudobug
10:04 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 #perl6
10:05 * masak .oO( I'm not hungry, I'm getting out of bed! )
10:05 azawawi .
10:05 yoleaux 08:11Z <RabidGravy> azawawi: nice one chief will merge in a second
10:05 azawawi RabidGravy: thx
10:05 masak could someone please use the nifty bisectbot on the above thing? I've forgotten exactly how to do it
10:06 * masak trawls the backlog, trying to find out
10:06 hahainternet masak: instructions are at https://github.com/perl6/bisectbot
10:06 masak bisect: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y == -1
10:06 bisectable masak: (2015-12-25) https://github.com/rakudo/rakudo/commit/07fecb5
10:07 hahainternet haha wow
10:07 hahainternet well
10:07 hahainternet that's probably not right ;)
10:07 masak did I use it wrong?
10:07 hahainternet it looks like it uses christmas as the 'good' release
10:07 masak seem to have gotten the 2016.05 endpoint
10:07 hahainternet you need to find a release where it works
10:07 masak bisect: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y != -1
10:07 hahainternet i assume
10:08 bisectable masak: (2016-06-03) https://github.com/rakudo/rakudo/commit/6bb23a5
10:08 masak that's not an endpoint, but not a meaningful result either, AFAICS
10:09 masak ok, I'm not including that in the rakudobug :)
10:09 masak if that turns out to be meaningful, I'd very much like to hear about it...
10:14 * masak tries building an older Rakudo
10:15 colomon joined #perl6
10:23 buharin joined #perl6
10:27 azawawi strange use vs require problems with LWP::Simple when included in a Build.pm (i.e. GTK::Simple)
10:30 labster joined #perl6
10:31 azawawi i think GTK::Simple copy windows DLL in build.pm should be solved in another more portable way
10:31 azawawi Alien::GTK ?
10:31 azawawi maybe
10:39 mr-foobar joined #perl6
10:41 rurban joined #perl6
10:44 rurban left #perl6
10:48 nadim joined #perl6
10:49 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:50 masak which means the first bisect result was correct; it identified the first commit it cares about as "bad"
10:50 rurban1 joined #perl6
10:54 rindolf joined #perl6
10:56 jnthn masak: Which do you consider the correct answer, ooc? :)
10:56 jnthn ah, it says in the ticket
10:56 user9 joined #perl6
10:57 literal joined #perl6
10:58 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.
10:58 masak both with Wikipedia and with an actual C program
10:58 avar joined #perl6
10:59 masak Wikipedia: https://en.wikipedia.org/wiki/Modulo_operation#​Remainder_calculation_for_the_modulo_operation
10:59 jnthn "Implementation-defined" :)
11:00 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.
11:00 jnthn Well, it's a trade-off :)
11:00 masak aye
11:00 colomon Pretty sure this all is tested in roast
11:01 jnthn I'd like to hope so, though on natives I'm not so sure :)
11:01 kid51 joined #perl6
11:01 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
11:01 masak I say "unnecessarily" because I realize results may change with overflows and stuff
11:01 masak but this feels to me like Perl 6 trying not hard enough
11:01 masak anyway, I can see the trade-off argument, too
11:02 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? :)
11:02 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
11:02 masak especially considering that the calculation may be platform-dependent
11:03 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.
11:03 masak (sorry, lag) :)
11:04 masak 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
11:04 masak Ints, yes. but ints?
11:05 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 #perl6
11:06 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
11:06 jnthn (on uint)
11:07 masak confirmed: C `printf("%d\n", -1 % 8);` gives -1 on my machine
11:08 masak m: my uint $x = 0; my $y = ($x - 1) % 8; say $y
11:08 camelia rakudo-moar 48fe6a: OUTPUT«-1␤»
11:08 masak jnthn: guessing you didn't mean it like that ;)
11:11 jnthn Hm :)
11:12 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 masak this is my fourth-or-so implementation of a search, and I chose to speed it up with native ints
11:14 jnthn :)
11:16 Deep_Thought joined #perl6
11:17 * moritz contemplates starting a science blog
11:18 moritz though I guess I should finish some other projects first :-)
11:23 |meta joined #perl6
11:24 nadim joined #perl6
11:26 azawawi This line https://github.com/perl6/gtk-s​imple/blob/master/Build.pm#L5 is causing this weird error https://travis-ci.org/perl6/gt​k-simple/jobs/135217602#L1205
11:26 azawawi in 2016.05
11:26 azawawi use LWP::Simple; use NativeCall;
11:27 azawawi if you use Panda::XYZ or Shell::Command you're okay... otherwise that error occurs
11:31 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 #perl6
11:37 AlexDaniel /query camelia
11:37 AlexDaniel oops
11:38 AlexDaniel masak: I'm working on it :) but at this particular moment you can do this
11:38 AlexDaniel m: m: my int $x = 0; my $y = ($x - 1) % 8; exit 1 if $y == -1
11:38 camelia rakudo-moar 48fe6a: ( no output )
11:38 AlexDaniel m: m: my int $x = 0; my $y = ($x - 1) % 8; say ‘hi’ if $y == -1
11:38 camelia rakudo-moar 48fe6a: OUTPUT«hi␤»
11:38 AlexDaniel star: m: my int $x = 0; my $y = ($x - 1) % 8; say ‘hi’ if $y == -1
11:38 camelia star-m 2016.01: OUTPUT«hi␤»
11:38 AlexDaniel so the output is the same, nothing to bisect here
11:39 AlexDaniel masak: but you're completely right that it should do it automatically, yes
11:39 masak AlexDaniel: should do what automatically?
11:40 AlexDaniel masak: check if the bisection process is meaningless
11:40 masak I think you're being too harsh on yourself :)
11:40 masak sure, it'd be nicer if it signalled that it hit one of the endpoints
11:41 masak preferably with a human-friendly message like "all commits on the whole timeline are bad" or some such
11:41 masak but I can still interpret the hitting-the-endpoint result as it is, and the bisect bot is still *awesome*
11:41 AlexDaniel well ok, but there's one even more awesome feature that I will reveal a bit later ;)
11:42 AlexDaniel moritz: yea! Finish perl 6 first! :D
11:42 dogbert17 m: my &f:(Int) = sub bar (Int) {};  # http://doc.perl6.org/type/Callable
11:42 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) {};  # http://doc.perl6␤»
11:43 moritz AlexDaniel: I was thinking more of http://deploybook.com/
11:43 azawawi logged the weird panda install GTK::Simple error as https://github.com/tadzik/panda/issues/316 :)
11:43 dogbert17 anyone knows what's wrong with the above golf?
11:44 xinming_ joined #perl6
11:47 * dogbert17 suspects it's something NYI ... scurries back to his lair
11:48 llfourn dogbert17: yeah I'm pretty sure that's NYI
11:49 * llfourn doesn't remember seeing that in the design docs
11:51 timotimo wellllll, we have the positional bind failover, which lets you pass Seq to things that expect list, and it converts for you
11:53 rurban joined #perl6
11:54 Emeric joined #perl6
11:54 Deep_Thought joined #perl6
12:05 Zero_Dogg joined #perl6
12:05 Zero_Dogg joined #perl6
12:08 azawawi https://github.com/azawawi/perl6-gtk-sci​ntilla/blob/master/examples/03-demo.pl6  # GTK::Scintilla editor demo with toolbar and menubar :)
12:11 azawawi http://pasteboard.co/1qLQ1cnZ.png # screenshot
12:11 timotimo neat
12:11 timotimo the toolbar is kind of tall
12:11 azawawi VBox is not generic :)
12:12 azawawi need to fix it
12:12 azawawi https://developer.gnome.org/gtk3/st​able/GtkBox.html#gtk-box-pack-start
12:12 azawawi we should expose expand and fill
12:12 timotimo ah, right
12:13 azawawi https://github.com/perl6/gtk-simple/b​lob/master/lib/GTK/Simple/Box.pm6#L17
12:14 azawawi timotimo: By building actual GTK apps in Perl 6, we then could evaluate GTK::Simple implementation problems
12:14 azawawi timotimo: i.e. multiple components together
12:14 _mg_ joined #perl6
12:15 azawawi also it lets us identify the weak performance bugs in 'use XYZ;'
12:16 azawawi so far we need to improve it a lot
12:17 timotimo mhm
12:18 timotimo using the modules should be pretty fast after they have been precompiled, is that not the case?
12:19 azawawi yes and no
12:20 azawawi 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
12:20 azawawi for example GTK::Simple::Widget is used by all
12:20 azawawi tried it
12:20 azawawi it is slow on loading a precomp
12:21 azawawi and i strace-ed it... it is not an I/O problem since i have an SSD
12:21 brrt joined #perl6
12:21 timotimo huh.
12:21 * azawawi notices a GTK::Simple::Grid :)
12:22 pierre_ joined #perl6
12:24 timotimo oh yeah, "testing GTK::Simple" takes ages
12:24 * brrt backlogs
12:24 timotimo oh, a window popped up
12:26 azawawi https://github.com/azawawi/gtk-sim​ple/blob/master/lib/GTK/Simple.pm6
12:27 azawawi when all the classes were in a single file, it was faster
12:28 azawawi when I refactored each one into its own file (like it should be), performance went down a lot
12:29 moritz does it precomp?
12:29 azawawi yup
12:30 timotimo https://gist.github.com/timo/f4​05faeb27cfdd5f848066e43caf9aff
12:31 moritz what's the column in the first number?
12:32 timotimo dunno
12:32 azawawi https://github.com/rakudo/rakudo/blo​b/nom/src/Perl6/ModuleLoader.nqp#L2
12:32 timotimo perhaps it's timing?
12:33 timotimo huh, PID?
12:33 timotimo oh, no, that's the bigger number in the second column
12:38 dolmen joined #perl6
12:44 colomon joined #perl6
12:50 dogbert17 ok, here's another question following from looking throught the docs
12:51 dogbert17 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␤»
12:52 timotimo because that's often the sign you're doing that by accident
12:53 dogbert17 timotimo: aha, so the compiler assumes that the user wanted to do something else then
12:53 colomon joined #perl6
12:53 timotimo the runtime does, not the compiler
12:53 timotimo as in, Sub has a .Str that gives that warning
12:55 timotimo m: sub marine() { }; say &marine
12:55 dogbert17 timotimo: I get that, but what kind of accident are you referring to?
12:55 camelia rakudo-moar 48fe6a: OUTPUT«sub marine () { #`(Sub|66521080) ... }␤»
12:55 timotimo do note that when you say it directly, it'll be .gist'ed for you
12:55 timotimo dunno, maybe something like "this is my result: { &marine }"
12:56 dogbert17 : the reason for asking is this bug report: https://github.com/perl6/doc/issues/169
12:57 timotimo nine: can you spot immediately if there's something wrong going on here? https://gist.github.com/timo/f4​05faeb27cfdd5f848066e43caf9aff - 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 :)
12:58 dogbert17 i.e. if it is even worth mentioning ..
12:58 timotimo not sure
12:59 timotimo BBL
13:00 nine timotimo: looks just fine from here
13:00 ocbtec joined #perl6
13:00 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:01 nine It also loads those dependencies only once and recognizes correctly, that they're already loaded
13:02 Zoffix joined #perl6
13:02 Zoffix left #perl6
13:02 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
13:02 yoleaux brrt: What kind of a name is "jnthn:"?!
13:02 timotimo then something else is slowing it down immensely
13:02 brrt .tell jnthn i like the idea of a weak hash table for mixins, coupled with some eventual update scheme
13:02 yoleaux brrt: I'll pass your message to jnthn.
13:04 AlexDaniel dogbert17: dunno! Let's see… What if you were doing something like this
13:04 AlexDaniel m: sub smth { ‘xxx’ }; my $foo = &smth; say “I love $foo”
13:04 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␤»
13:04 AlexDaniel when in reality you wanted this
13:04 AlexDaniel m: sub smth { ‘xxx’ }; my $foo = &smth; say “I love $foo()”
13:04 camelia rakudo-moar 48fe6a: OUTPUT«I love xxx␤»
13:04 AlexDaniel uh… that's not a very good example……
13:04 spider-mario joined #perl6
13:04 AlexDaniel dogbert17: but the error message points you to a completely different thing…
13:05 AlexDaniel so that's not what this is all about :/
13:05 AlexDaniel so I'm interested as well, why is it bad?
13:06 AlexDaniel dogbert17: as far as I can see there is no test for this error message
13:07 user9 joined #perl6
13:12 dogbert17 AlexDaniel: a mystery indeed
13:16 Bucciarati joined #perl6
13:18 mr-fooba_ joined #perl6
13:18 Emeric1 joined #perl6
13:19 shadowpaste joined #perl6
13:24 Emeric1 joined #perl6
13:29 noganex joined #perl6
13:31 araujo_ joined #perl6
13:35 araujo_ joined #perl6
13:39 araujo_ joined #perl6
13:41 araujo_ joined #perl6
13:43 RabidGravy boom
13:45 araujo_ joined #perl6
13:48 araujo_ joined #perl6
13:48 grondilu joined #perl6
13:49 grondilu /usr/local/src/rakudo$ git pull
13:49 grondilu Already up-to-date.
13:49 grondilu ^always a bit sad when I see that
13:50 rurban joined #perl6
13:51 araujo joined #perl6
13:51 buharin joined #perl6
13:53 araujo_ joined #perl6
13:54 jrusso joined #perl6
13:55 rurban joined #perl6
13:55 araujo_ joined #perl6
14:01 RabidGravy software can wait I have planting to do :)
14:05 araujo__ joined #perl6
14:29 dupek joined #perl6
14:32 Zoffix joined #perl6
14:34 Zoffix Any idea why this code gives me "Could not find symbol '&Actions'": https://github.com/zoffixznet/perl6-IR​C-Client/blob/rewrite/examples/bot.pl6   The ::Actions  is `used` and clearly exists: https://github.com/zoffixznet/perl6-IRC-Client/​blob/rewrite/lib/IRC/Client/Grammar/Actions.pm6
14:35 llfourn Zoffix: it's probably the precomp bug
14:35 Zoffix Crap... I used : instead of :: ~_~
14:35 llfourn oh or that :P
14:36 ocbtec joined #perl6
14:38 _mg_ joined #perl6
14:43 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␤␤»
14:43 Zoffix m: say grammar { token TOP {<foo>}; token foo { .+ } }.parse: 'foo', actions => class { method TOP ($/) { given ~$<foo> {  } };  }
14:43 camelia rakudo-moar 48fe6a: OUTPUT«「foo」␤ foo => 「foo」␤»
14:44 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」␤»
14:44 Zoffix Hm. I wonder if doing that is Bad Idea(tm)
14:46 Zoffix 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 #perl6
14:47 llfourn yeah I've hit that when using $/ as a param b4
14:47 brrt joined #perl6
14:47 llfourn but it's too convienient not to use it
14:47 llfourn inconvienient*
14:49 TimToady try 'is copy' or so mebbe
14:50 llfourn yes it's the best way
14:52 yqt joined #perl6
14:59 khw joined #perl6
15:02 rurban left #perl6
15:02 ugexe if you are using given/when like that, wouldnt you be better off using a proto token foo?
15:05 mr-foobar joined #perl6
15:08 bjz joined #perl6
15:08 rurban1 joined #perl6
15:35 firstdayonthejob joined #perl6
15:39 Fleurety joined #perl6
15:47 aries_liuxueyang joined #perl6
16:00 literal how do I make things exportable-but-not-by-default, and then selectively import those things?
16:01 literal by name, rather than by some arbitrary export tag
16:04 jjido joined #perl6
16:04 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 #perl6
16:05 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 literal makes it easy to skim code to see where symbols come from
16:06 llfourn you don
16:06 llfourn 't have to make up the tags you just put them as the same name.
16:06 llfourn exporting is done via tags and that's it afaik
16:07 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
16:07 stevieb9 LTA?
16:07 llfourn less than awesome
16:08 stevieb9 ahhh, thanks
16:08 llfourn it would be nice if everything was exported under it's own name maybe?
16:08 llfourn or you could pass something short to is export which just exported it under its own name...
16:08 literal it is, with "is export", my only issue is that it's all imported by 'use' if you don't request anything
16:09 literal or have an "is exportable" or "is importable" that makes things available but only on request
16:09 llfourn that sounds nice
16:09 llfourn the way it works is that "is export" just puts it into the DEFAULT tag
16:10 literal I see
16:10 llfourn and 'use Foo;' imports from DEFAULT and MANDATORY
16:10 llfourn I rkn you could put "is exportable" in a module
16:10 llfourn as a start
16:11 llfourn or "importable" maybe better
16:11 Actualeyes joined #perl6
16:13 llfourn multi trait_mod:<is>(Routine:D $r,:importable!) { CALLER::UNIT::EXPORT::{$r.name} = $r } # it should be as easy as this
16:13 llfourn :$importable*
16:13 llfourn but actually it won't work in practice...
16:15 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:16 llfourn well yeah, in p6 it's probably preferable that it's use Foo :bar, :baz;
16:17 llfourn which you can do but you have to repeat yourself sub bar is export(:bar) { ... }
16:26 telex joined #perl6
16:27 tomboy64 joined #perl6
16:29 rurban1 left #perl6
16:29 tomboy64 joined #perl6
16:29 ifim joined #perl6
16:30 brrt joined #perl6
16:30 rindolf joined #perl6
16:32 tomboy64 joined #perl6
16:39 rurban joined #perl6
16:47 BenGoldberg joined #perl6
16:50 dalek doc: 565a303 | (Jan-Olof Hendig)++ | doc/Type/Date.pod:
16:50 dalek doc: Added docs for Date.new-from-daycount
16:50 dalek doc: review: https://github.com/perl6/doc/commit/565a3035da
16:54 dupek joined #perl6
16:57 Emeric1 joined #perl6
17:07 Emeric joined #perl6
17:19 Emeric joined #perl6
17:22 Emeric joined #perl6
17:24 brabo joined #perl6
17:25 Actualeyes left #perl6
17:28 Zoffix__ joined #perl6
17:28 Emeric joined #perl6
17:30 Zoffix__ left #perl6
17:31 jjido joined #perl6
17:34 brabo joined #perl6
17:43 aries_liuxueyang joined #perl6
17:45 s_kilk joined #perl6
17:45 hankache m: say '1 random text 2' ~~ / \d+ /;
17:45 camelia rakudo-moar 48fe6a: OUTPUT«「1」␤»
17:45 hankache how can you capture both numbers?
17:45 hankache 1 and 2?
17:46 ssotka joined #perl6
17:47 jnthn m: say '1 random text 2' ~~ m:g/ \d+ /;
17:47 camelia rakudo-moar 48fe6a: OUTPUT«(「1」 「2」)␤»
17:47 yoleaux 13:02Z <brrt> jnthn: i like the idea of a weak hash table for mixins, coupled with some eventual update scheme
17:47 ugexe m: say "1 random text 2".comb(/\d+/); # this also may be up your alley
17:47 camelia rakudo-moar 48fe6a: OUTPUT«(1 2)␤»
17:48 hankache thanks jnthn ugexe
17:55 zakharyas joined #perl6
18:04 brabo joined #perl6
18:11 Emeric joined #perl6
18:17 AlexDaniel m: say "1 random 25 text".split(/\D+/, :skip-empty)
18:17 camelia rakudo-moar 48fe6a: OUTPUT«(1 25)␤»
18:26 brabo joined #perl6
18:29 grondilu joined #perl6
18:38 Emeric1 joined #perl6
18:43 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:44 stevieb9 whoops, added the original doc-style use twice
18:45 stevieb9 m: say <1 2> >>~<< <a b>
18:45 camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
18:45 stevieb9 m: say <1 2> <<~<< <a b>
18:45 camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
18:49 TimToady joined #perl6
18:50 timotimo the direction of the arrows is only for what side gets extended if the sides aren't the same length
18:51 timotimo if you want it to apply "backwards" you need R
18:51 timotimo m: say <1 2> <<R~>> <a b>
18:51 camelia rakudo-moar 48fe6a: OUTPUT«(a1 b2)␤»
18:51 jnthn m: say <1 2 3> >>~<< 'a'
18:51 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␤␤»
18:51 jnthn m: say <1 2 3> >>~>> 'a'
18:51 camelia rakudo-moar 48fe6a: OUTPUT«(1a 2a 3a)␤»
18:51 |meta joined #perl6
18:51 RabidGravy yeah, it's less typing to just use Z
18:52 RabidGravy m: say  <1 2> Z~ <a b>
18:52 camelia rakudo-moar 48fe6a: OUTPUT«(1a 2b)␤»
18:52 jnthn m: say <1 2 3> Z~ 'a' # not for this one though :)
18:52 camelia rakudo-moar 48fe6a: OUTPUT«(1a)␤»
18:52 stevieb9 nice!
18:52 RabidGravy true
18:52 jnthn Depends what you want, of course :-)
18:53 jnthn 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
18:57 * 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
18:58 masak mst: and its package manager, Sharknado
18:59 * 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"
19:02 masak at least it's not full of eels
19:02 RabidGravy unlike your hovercrafts
19:08 colomon joined #perl6
19:11 timotimo my dip switches explode with delight!
19:15 cdg joined #perl6
19:16 labster joined #perl6
19:16 dalek ecosystem: c457d09 | palapitta++ | META.list:
19:16 dalek ecosystem: Bencode
19:16 dalek ecosystem:
19:16 dalek ecosystem: provides encode and decode functions
19:16 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c457d09d21
19:16 dalek ecosystem: 5a35f74 | (Andy Weidenbaum)++ | META.list:
19:16 dalek ecosystem: Merge pull request #215 from palapitta/patch-4
19:16 dalek ecosystem:
19:16 dalek ecosystem: Bencode
19:16 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/5a35f745d2
19:16 Zoffix joined #perl6
19:20 Zoffix Any idea how to make errors more useful? For example, this line is missing a mandatory positional: https://github.com/zoffixznet/perl6-IRC-C​lient/blob/rewrite/lib/IRC/Client.pm6#L35 However, the error says it's on line 20 and isn't useful (https://gist.github.com/zoffixznet​/442fc89b2baab9319ec12cf931affd3a)
19:20 Zoffix I think in the past, CATCH { warn .backtrace }, was useful enough, but seems it's no longer...
19:20 araujo_ joined #perl6
19:24 protium m: say ('a' .. 'z').roll
19:24 camelia rakudo-moar 48fe6a: OUTPUT«v␤»
19:25 TimToady joined #perl6
19:34 TEttinger joined #perl6
19:54 kaare_ joined #perl6
19:55 yqt joined #perl6
20:08 ssotka joined #perl6
20:12 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]␤»
20:12 pochi m: my @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«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
20:12 pochi what's $foo good for in that statement?
20:14 masak it's not used.
20:14 masak you could skip it
20:14 pochi m: my @a = ( [ [1,2,3], [4] ],  [ [6,7], [8,9] ] ); for @a -> :(@b,@c) { say @b; say @c; say "-" }
20:14 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␤␤»
20:15 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 #perl6
20:18 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 "-" }
20:18 camelia rakudo-moar 48fe6a: OUTPUT«[[1 2 3] [4]]␤[[6 7] [8 9]]␤-␤»
20:19 pochi that does something else
20:19 masak I meant in the rhs of the `my`
20:19 pochi oh
20:19 masak in Perl 5 you have to use those parens
20:19 masak not so in Perl 6
20:19 pochi ok
20:20 masak (though you still need them on the lhs when you do `my ($a, $b, $c)`
20:20 masak )
20:20 pochi got it
20:21 pochi what did you mean by skipping $foo? $:(@b,£c)?
20:21 pochi @c
20:22 masak let me try locally, and then get back to you
20:22 masak m: my @a = [ [1,2,3], [4] ],  [ [6,7], [8,9] ]; for @a -> (@b,@c) { say @b; say @c; say "-" }
20:22 camelia rakudo-moar 48fe6a: OUTPUT«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
20:22 masak there we go.
20:23 masak that's how I would write it.
20:23 masak m: my @a = [ [1,2,3], [4] ],  [ [6,7], [8,9] ]; for @a -> [@b,@c] { say @b; say @c; say "-" }
20:23 camelia rakudo-moar 48fe6a: OUTPUT«[1 2 3]␤[4]␤-␤[6 7]␤[8 9]␤-␤»
20:23 masak or that; I guess that's more precise, since they're arrays.
20:24 pochi thought I had to use the colon
20:25 pochi so without parens, I get each element in @a, and with parens it does pattern matching?
20:27 masak something like that, yes
20:28 masak today I found myself writing `when (*, * < 0) { ... }`, but then realized that Perl 6 isn't clever enough to DTRT with that... :)
20:29 mst ah, yes, 'my @foo = 1, 2, 3;' is my mortal enemy in perl5
20:30 BenGoldberg (my @foo = 1), 2, 3;
20:30 masak mst: sounds like something very structural that a linter-ish thing could catch.
20:30 masak mst: I so would use an mst-approved linter ;)
20:35 geekosaur except that parsing perl5 in a linter is only slightly preferable to removing one's eyes with a spork
20:38 masak thought PPI mostly fix'd that
20:42 mst https://metacpan.org/pod/Perl::Critic::Freenode is a mostly-mst-approved thing
20:43 mst 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:45 Zoffix Curious, is there a way to avoid repetitive stuff in here? https://gist.github.com/zoffixznet​/0315a0330dc3cda0b6d9522f6dbd1290 Specifically the IRC::Client::Message:: prefix in names of all the roles and the does IRC::Client::Message for them....
20:47 stevieb9 joined #perl6
20:49 masak I don't find that so bad
20:50 masak but if you want to shorten names, then `constant` is your friend
20:50 Zoffix huh?
20:50 masak m: class Really::Long::Name {}; constant R = Really::Long::Name; say R
20:50 camelia rakudo-moar 48fe6a: OUTPUT«(Name)␤»
20:50 Zoffix Hm
20:51 Zoffix masak++ not bad
20:51 masak been there, done that ;)
20:51 masak that must've been back in 2011, when I realized that
20:51 masak with the Web.pm project
20:51 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
20:51 mst masak: that's how I do it in perl5
20:52 Zoffix s/shorten/get rid of/;
20:52 mst except with 'use aliased' to save typing
20:54 masak ooh, `use aliased`
20:54 masak Perl 5 is so cute!
20:54 Zoffix heh
20:55 masak I wish we had half the bells and whistles!
20:55 masak m: package A { class B {}; class C is B {} }; say A::C
20:55 camelia rakudo-moar 48fe6a: OUTPUT«(C)␤»
20:56 masak Zoffix: you might be able to do something with the above mechanism, too
20:56 masak that is, inside of a package, you are allowed to use only the last part of the name
20:56 mst masak: don't worry, I'm sure I'll start dragging my usual tooling in over time
20:56 Zoffix m: package A { role B {}; role C is B {} }; say A::C
20:56 camelia rakudo-moar 48fe6a: OUTPUT«(C)␤»
20:56 Zoffix Aha! masak++
20:56 * masak .oO( ultimately, the Perl 6 endeavour succeeded because of mst's stubbornness )
20:59 bjz_ joined #perl6
21:00 Zoffix Ahhh
21:00 Zoffix masak++ This looks very satisfactory: https://gist.github.com/zoffixznet​/f7a75fe8d02b504591dca06cf0745514
21:00 Zoffix :)
21:01 masak I live to serve.
21:01 mst very nice except the closing brace style hurts my eyes
21:02 Zoffix 😜
21:02 mst whatever that was, it didn't render here
21:02 dolmen joined #perl6
21:03 Zoffix m: '😜'.uninames.say
21:03 camelia rakudo-moar 48fe6a: OUTPUT«(FACE WITH STUCK-OUT TONGUE AND WINKING EYE)␤»
21:04 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 mst 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
21:04 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.
21:04 yoleaux slobo: I'll pass your message to sortiz.
21:05 masak I'm with mst on that one
21:05 masak I used to be big on vertical aligning of all kinds of things
21:06 masak about 8..10 years ago or so
21:06 masak I've since stopped
21:06 masak life is simply too short for that kind of stuff
21:06 masak my code is not about things being vertically above each other anyway. it's invariably about other things
21:11 literal m: my @ar = <a b c d>; say @ar[0..^*]
21:11 camelia rakudo-moar 48fe6a: OUTPUT«(a b c d)␤»
21:12 literal :/
21:12 masak literal: you'd have to *-1
21:12 literal yeah, that's what I've been using
21:12 literal wanted ^ to work there
21:12 masak literal: because * here is the length
21:13 literal ah, ok
21:13 masak and so ^* means the last element
21:14 jjido joined #perl6
21:14 AlexDaniel Zoffix: what is $.what?
21:16 rurban joined #perl6
21:16 masak message payload, most likely
21:23 Zoffix AlexDaniel, $.what was said
21:23 Zoffix m: my @ar = <a b c d>; say @ar[^*]
21:23 AlexDaniel Zoffix: what about $.message $.text or anything that is more descriptive and less synonymous to .WHAT?
21:23 camelia rakudo-moar 48fe6a: OUTPUT«(a b c d)␤»
21:24 MasterDuke joined #perl6
21:24 Zoffix AlexDaniel, I'll go with .text
21:24 Zoffix Done :)
21:25 geekosaur .schtuff
21:25 AlexDaniel .шtuff
21:25 Zoffix m: my @ar = <a b c d>; say @ar[0,^2,^1,^3]
21:25 camelia rakudo-moar 48fe6a: OUTPUT«(a (a b) (a) (a b c))␤»
21:25 Zoffix Neat.
21:26 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 #perl6
21:27 geekosaur MasterDuke, git fetch --tags ?
21:27 geekosaur (guessing...)
21:27 MasterDuke geekosaur: no output
21:28 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:29 masak .штуф
21:29 Zoffix That's "shtoof" :)
21:29 Zoffix .u cyrillic a
21:29 yoleaux U+2DF6 COMBINING CYRILLIC LETTER A [Mn] (◌ⷶ)
21:30 Zoffix dafuq
21:30 MasterDuke geekosaur: that was it, just had to do git fetch upstream master --tags
21:30 Zoffix .u cyrillic ah
21:30 yoleaux No characters found
21:30 MasterDuke thanks
21:31 * 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/}
21:31 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␤␤»
21:31 Zoffix m: say ^0xFFFF .grep: {.uniname ~~ /CYRILLIC/}
21:31 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 …»
21:31 * Zoffix gives up
21:33 geekosaur unicode cyrillic uses the latin letters where it can. mostly
21:33 * Zoffix didn't know that
21:33 TEttinger eh?
21:33 TEttinger what about all the domain punicode attack stuff?
21:33 geekosaur oh. no, I found it
21:33 TEttinger where A looks exactly like A
21:34 geekosaur .u cyrillic small letter a
21:34 yoleaux U+0430 CYRILLIC SMALL LETTER A [Ll] (а)
21:34 geekosaur sigh, just make it even harder why don't uyou
21:34 Zoffix m: say (^0xFFFF)».chr.grep: {.uniname ~~ /CYRILLIC/}
21:34 camelia rakudo-moar 48fe6a: OUTPUT«(Ѐ Ё Ђ Ѓ Є Ѕ І Ї Ј Љ Њ Ћ Ќ Ѝ Ў Џ А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ѐ ё ђ ѓ є …»
21:34 geekosaur (that's a reference to punycode)
21:35 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 #perl6
21:36 Zoffix mst, are you asking whether I wrote a blogpost about whenever? No, I didn't.
21:36 mst Zoffix: hm. thought you had.
21:36 Zoffix I might after I attend Damian talks. One of them will be on concurrency.
21:36 Zoffix All Perl 6 stuff I wrote is at http://perl6.party/
21:37 Zoffix Plus this one: https://perl6advent.wordpress.com/author/zoffix/
21:37 masak mst: check out the top few talks at http://jnthn.net/articles.shtml
21:38 jnthn Plus I did a couple of blog posts (one in Perl 6 advent) using whenever
21:38 * jnthn <3 whenever
21:39 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␤»
21:40 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 :)
21:40 lizmat ah, ok, will backlog then
21:42 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*
21:43 lizmat my quick fix would be:
21:43 lizmat -    nqp::mod_i($a, $b)
21:43 lizmat +    nqp::mod_i(nqp::add_i(nqp::mod_i($a,$b),$b),$b)
21:45 masak I'll just note in passing that as a user to which scary stuff randomly happens, I'm happy with this
21:45 rurban1 joined #perl6
21:45 masak lizmat: could you even ditch the innermost mod_i ?
21:46 masak seems to me one could get away with one mod_i
21:46 lizmat also for -17,8 ?
21:49 masak m: say -17 % 8
21:49 camelia rakudo-moar 48fe6a: OUTPUT«7␤»
21:49 masak ah. point taken.
21:49 masak good ues case :) lizmat++
21:50 masak 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"
21:50 masak aye
21:51 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 #perl6
21:52 * masak feels like he's learning new stuff every day
21:52 rurban2 joined #perl6
21:53 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
21:53 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 #perl6
21:53 masak turned out I was sorting on doubles, and there were subtle differences between the doubles, which screwed up the stability
21:54 AlexDaniel MasterDuke: did you write to perlbug-admin@perl.org ?
21:54 masak sometimes my career feels like a big multiplication table of feature-X-vs-feature-Y in every possible combination
21:54 MasterDuke yeah
21:54 AlexDaniel MasterDuke: well… I don't know. Kevin Falcone was the one who fixed my account
21:55 lizmat masak: fix for RT #128318 committed
21:55 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128318
21:55 jnthn lizmat: Not sure whether a predictable branch comes out worse than a duplicate modulo on typical hardware... :)
21:55 AlexDaniel MasterDuke: but he replied from perlbug-admin email, so I dunno
21:55 lizmat fwiw, on 1M iterations, I can't see the difference in performance
21:55 jnthn How're you measuring? :)
21:56 jnthn 1M iterations isn't many for tight native code ;)
21:56 lizmat hmmm....
21:56 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 :)
21:56 masak also, that's on one architecture...
21:56 lizmat true
21:56 jnthn Oh, if you use a for loop it'll be swamped in that overhead :)
21:57 jnthn Invoking the loop body block costs more than the math operation :)
21:57 lizmat I know
21:57 lizmat I guess it just means that in the current state of Rakudo, it doesn't make a difference
21:57 jnthn If you have it to hand, callgrind can give more accurate numbers :)
21:58 jnthn 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
21:59 jnthn Anyway, I'm fine with putting that fix in for now :)
21:59 jnthn We may want to push it down VM-wards later
21:59 lizmat anyways, I see it as a temporrary fix
21:59 lizmat indeed
21:59 jnthn But it's not just "fix interp.c"; we'd have to fix the JIT too
21:59 lizmat faster there to check for < 0
21:59 jnthn Maybe not
21:59 jnthn Branches can be expensive.
21:59 lizmat hence my approach
22:00 lizmat which wouldn't be a branch
22:00 lizmat (I think)
22:02 jnthn Correct...just saying even in MoarVM an approach like yours might win on modern hardware :)
22:02 jnthn Um, even writing it in C, to be precise.
22:07 lizmat :-)
22:07 * lizmat goes to bed
22:07 lizmat so good night, #perl6!
22:08 masak 'night, lizmat
22:08 Zoffix \o
22:08 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
22:08 masak but again, that's just my opinion
22:11 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:12 jnthn My goodness, I think a stream train just went by my apartment...
22:12 mst always nice when that happens
22:15 masak I'm glad I seem to harmonize with @dev on this one
22:17 pmurias joined #perl6
22:26 user9 joined #perl6
22:37 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␤␤»
22:44 masak today's autopun spotting: "There are three things I always forget. Names, faces and... the third I can't remember.
22:44 masak " -- Italo Svevo
22:44 mst :D
22:53 IRCBot1465080803 joined #perl6
22:58 inokenty joined #perl6
23:00 Zoffix New IRC::Client's debug output is so purty :D http://i.imgur.com/kCAzNYF.png
23:01 Hotkeys Hey I haven't been around here a while
23:02 Hotkeys is panda still the preferred thingy
23:02 * Zoffix uses zef
23:04 Zoffix Hotkeys, there's also this you could try out: https://github.com/tadzik/App-redpanda
23:05 raiph joined #perl6
23:12 raiph joined #perl6
23:12 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:14 Zoffix DANtheBEASTman, just build from sauce. sudo apt-get install build-essential git;
23:14 Zoffix And I have this aliased to update-perl6:          rm -fr ~/.zef; rm -fr ~/.perl6; rm -fr ~/.rakudobrew/; git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef;
23:15 Zoffix Oh, and add to path:     ~/.rakudobrew/bin:~/.rakudobrew/moa​r-nom/install/share/perl6/site/bin/
23:20 Zoffix 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": https://github.com/zoffixznet/perl6-IRC-Clien​t/blob/rewrite/lib/IRC/Client/Grammar.pm6#L3
23:21 Zoffix 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?
23:22 Zoffix 2016.05 what?
23:23 Hotkeys oops
23:23 Hotkeys nvm
23:26 Zoffix huggable, download rakudo :is: Rakudo downloads: http://rakudo.org/downloads/rakudo/
23:26 huggable Zoffix, Added download rakudo as Rakudo downloads: http://rakudo.org/downloads/rakudo/
23:26 Zoffix huggable, download rakudo star :is: Rakudo Star downloads: http://rakudo.org/downloads/star/
23:26 huggable Zoffix, Added download rakudo star as Rakudo Star downloads: http://rakudo.org/downloads/star/
23:26 Zoffix huggable, download R* :is: Rakudo Star downloads: http://rakudo.org/downloads/star/
23:26 huggable Zoffix, Added download R* as Rakudo Star downloads: http://rakudo.org/downloads/star/
23:28 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」␤»
23:29 Zoffix works here.. dafuq
23:31 Zoffix Maybe the issue is with my actions https://github.com/zoffixznet/perl6-IRC-Client/​blob/rewrite/lib/IRC/Client/Grammar/Actions.pm6
23:36 Hotkeys Can I force rakudobrew to build with gmake instead of nmake? for some reason nmake refuses to build p6
23:38 Hotkeys I suppose I could just manually build
23:45 pierre_ joined #perl6
23:51 Zoffix FUUUUUU (╯°□°)╯︵ ┻━┻
23:51 Zoffix Wasting time on this shit
23:53 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 #perl6

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

Perl 6 | Reference Documentation | Rakudo