Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-30

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:01 sortiz_ Nop, but I assume that the alignment of a CStruct is MoarVM business. And I known that a 'void *' isn't 64bits long on 32 bit systems. ;-)
00:07 timotimo so, how do you think going one uint64 after the other will lead you exactly onto the pointer in all cases?
00:07 timotimo that's what i'm worried about
00:08 avenj joined #perl6
00:11 sortiz_ timotimo, don't worry, I'm now working on the details...
00:11 timotimo okei!
00:14 sortiz_ timotimo, If I had been sure would not have that dance in the calculation of the Offset. :-)
00:17 timotimo mhm
00:21 _nadim joined #perl6
00:21 * sortiz_ Fortunately there is still 32-bit fedora.
00:25 nadim joined #perl6
00:55 sortiz_ timotimo, btw, compiling moar in 32bits a see a few "warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]"
01:23 cdg joined #perl6
01:30 Xliff_ Can I install dwarfdump from rakudobrew
01:31 Xliff_ nvm. dwarfdump was installable via apt. What do you guys need....assuming you still need it?
01:35 sortiz_ Xliff_, Now I have a 32bit aware NH::Blob, in a few minutes will be pushed...
01:36 Xliff_ Oh, cool! That was fast.
01:36 Xliff_ What was the problem?
01:37 sortiz_ The size of the CArray I was using to search the Offset.
01:37 timotimo Xliff_: i would have looked at the output of dwarfdump to see how the CPointer-related structs are laid out
01:37 timotimo and then compared to what i have on a 64bit system
01:46 jack_rabbit joined #perl6
01:46 kalkin- joined #perl6
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:47 MadcapJake even pacing, great voice acting, a tiny little bit scary at parts but my 5yo was fine
01:54 sortiz_ Xliff_, NH::Blob should be fixed, can you try install it again?
01:56 timotimo sortiz_: is 10 steps still enough?
01:56 molaf_ joined #perl6
01:58 sortiz_ timotimo, Now yes, but I don't know if MVMObject can grow in the future ;-)
01:58 Xliff_ sortiz_, sure thing. One sec.
01:59 Xliff_ Works now. Thanks!
02:01 sortiz_ Xliff_, Thank you for the report!
02:02 Xliff_ No MySQL support for perl6 yet?
02:02 tardisx joined #perl6
02:02 timotimo of course there is mysql support
02:03 timotimo has been for years
02:03 Xliff_ "panda search mysql" didn't return anything
02:03 sortiz_ Xliff_, it is installed by DBIish.
02:03 cpage_ joined #perl6
02:03 Xliff_ Ah! Thanks.
02:05 Xliff_ Yikes!
02:05 Xliff_ Got this when trying to install DateTime::Math
02:05 Xliff_ Ambiguous call to 'infix:«>»'; these signatures all match:
02:05 Xliff_ :(DateTime:D \a, DateTime:D \b)
02:05 Xliff_ :(DateTime $a, DateTime $b)
02:05 Xliff_ in block <unit> at t/math.t line 27
02:08 Ben_Goldberg joined #perl6
02:10 sortiz_ Xliff_, I can't help you with that, sorry.
02:11 Khisanth joined #perl6
02:12 timotimo m: say DateTime.now() > DateTime.now()
02:12 camelia rakudo-moar 330f81: OUTPUT«False␤»
02:12 timotimo it's probable that this module introduced an operator like that, but in the mean time that has been added to rakudo itself
02:12 teatime joined #perl6
02:15 sortiz_ Installing panda in fedora 32 bits gives me: "Internal error: zeroed target thread ID in work pass" in t/build-hook.t
02:15 timotimo :o
02:18 sortiz_ But pass on a second try, weird.
02:27 tmch joined #perl6
02:27 ugexe Proc::Async
02:34 BenGoldberg_ joined #perl6
02:37 Xliff_ timotimo, So DateTime::Math needs to drop their infix<>>?
02:37 Xliff_ (man that one is hard to read)
02:38 Xliff_ Ooh! Use of different delimiters for that special case!
02:38 Xliff_ multi sub infix:«>»
02:38 Xliff_ perl6++
02:38 teatime heh could it be written infix:< > >
02:38 teatime there we go
02:41 tardisx joined #perl6
02:41 BenGoldberg m: say DateTime.new() <=> DateTime.new();
02:41 yoleaux 26 Mar 2016 13:57 EDT <MadcapJake> BenGoldberg: yeah I noticed that the docs mentioned it had a 32 bit size so I just went with int32 and it worked!
02:41 camelia rakudo-moar 330f81: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/EYVaRC74tv line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/EYVaRC74tv line 1␤␤»
02:41 BenGoldberg m: say DateTime.now() <=> DateTime.now();
02:41 camelia rakudo-moar 330f81: OUTPUT«Less␤»
02:41 BenGoldberg m: say DateTime.now() < DateTime.now();
02:41 camelia rakudo-moar 330f81: OUTPUT«True␤»
02:42 Hotkeys \o/
02:47 noganex_ joined #perl6
03:03 grassass joined #perl6
03:10 * sortiz_ Thinking that NC needs a 'intptr_t'
03:17 teatime aren't all pointers the same size?
03:17 AlexDaniel That's an interesting idea: http://www.workingsoftware.com.au/page/Your_​templating_engine_sucks_and_everything_you_h​ave_ever_written_is_spaghetti_code_yes_you
03:17 teatime oh, intptr_t is something I never knew existed.
03:19 AlexDaniel but it will probably have serious performance issues if implemented in Perl 6
03:20 sortiz_ teatime, Nop, for example in i686, are 32bits long and in AMD64 are 64 bits long.
03:20 konobi teatime: doesn't depend on the arch
03:21 teatime sortiz_: I didn't mean across machines
03:21 jamesalbert joined #perl6
03:21 teatime sortiz_: just that void* int* char* etch are all the same size
03:21 teatime but my comment was based on an a misunderstanding of what intptr_t was supposed to be
03:21 teatime (I assumed it was 'pointer to an int' but it's 'type large enough to hold either an int or a ptr')
03:22 jamesalbert Yo everybody, first time being here. Just wanted to ask really quick: I used to do `%{ "Loaded::Module::" } ?? 1 !! 0;` to see if I already loaded a module. How would I do that in perl 6?
03:22 jamesalbert used to do ... *in perl 5
03:23 Khisanth joined #perl6
03:24 timotimo coul can look into GLOBAL:: or perhaps GLOBALish::
03:24 tardisx joined #perl6
03:25 jamesalbert @timotimo thanks man, works =]
03:25 timotimo cool
03:26 timotimo i shall head towards bed
03:26 jamesalbert stay cool...
03:26 jamesalbert like the other side of the pillow
03:54 MadcapJake Interesting article: https://codewords.recurse.com/issu​es/six/immutability-is-not-enough
03:56 MadcapJake Anyone put some thought into what effect types would be like in Perl 6?
03:57 jamesalbert joined #perl6
03:59 MadcapJake «is pure» is essentially an effect type (but it doesn't actually check for purity, right?
04:00 jamesalbert hey all, anyway to do GLOBAL::Loaded::Module but with a string? I'm trying to do: `GLOBAL::Loaded::Module:: ?? 1 !! 0` can I somehow do `GLOBAL::"Loaded::Module":: ?? 1 !! 0`?
04:00 MadcapJake I think ::("..."):: could work
04:01 MadcapJake Or GLOBAL::("Loaded::Module")::
04:02 jamesalbert thanks madcapjake, that's a lot closer than what I was doing but it says "No such symbol 'GLOBAL::Loaded::Module'"
04:02 jamesalbert and I do `use Loaded::Module` beforehand
04:03 MadcapJake just try ::("Loaded::Module") on it's own, without GLOBAL
04:05 MadcapJake are you sure that module is loaded? works for me on any module, with or without the GLOBAL
04:05 jamesalbert Ah, you're a genius, but instead of ?? 1 !! 0, I had to do: ::("Loaded::Module") ~~ Nil
04:06 jamesalbert thanks bruh
04:06 tony-o jamesalbert: you might want ::("MODULE").so instead of ~~ Nil
04:07 tony-o m: say ::("Some::Module").so;
04:07 camelia rakudo-moar 330f81: OUTPUT«False␤»
04:07 tony-o while ~~ Nil works, it may not always work as expected
04:08 jamesalbert using .so always returns False on my end
04:08 jamesalbert just curious, in what context would ~~ Nil not work as expected?
04:09 MadcapJake yeah was just about to come on and say that .so is the problem xD
04:10 tony-o ahh, i guess that's changed since i last looked, i stand corrected
04:11 jamesalbert thanks to both of you, got it working =]
04:12 tony-o zef uses ~~ Failure now
04:12 tony-o m: say ::("Test") ~~ Failure;
04:12 camelia rakudo-moar 330f81: OUTPUT«True␤»
04:12 tony-o m: use Test; say ::("Test") ~~ Failure;
04:12 camelia rakudo-moar 330f81: OUTPUT«False␤»
04:15 jamesalbert Now what about this: is there a quick and painless perl6ish way of doing what Module::Runtime.use_module does in perl5?
04:16 MadcapJake tony-o is right, testing against Failure is your best bet, as that's what :: will return if it can't find the package
04:17 jamesalbert using Failure now, I'm coming to perl6 from python and all these glorious words are still new to me
04:17 MadcapJake Failures are like errors that haven't been thrown yet
04:19 MadcapJake They let you control flow of successful/unsuccessful code without resorting to a CATCH block
04:19 jamesalbert alright that makes sense, and a Nil doesn't necessarily mean that. And that's good I'm not a fan of try catches
04:19 jamesalbert necessarily mean that in this context
04:21 MadcapJake try/catch is powerful but sometimes you just want to hold on to something and then check later for failures, or perhaps you want to check when it's accessed (at which point the failure will turn into a regular thrown exception)
04:22 MadcapJake But you have to explicitly create them as failures via the fail sub rather than die (which automatically throws the exception)
04:24 jamesalbert good to know! thanks
04:25 jamesalbert and as a new comer, I'm seeing a lot of these p6 modules haven't been updated in months if not years
04:25 jamesalbert I'm wondering if I should just stick with p5
04:26 jamesalbert or keep going on with 6?
04:26 jamesalbert well, year*
04:26 jamesalbert not years
04:31 tony-o what does .use_module do in p5?
04:32 tony-o jamesalbert: a lot of the p6 modules haven't been updated and some of them don't really need to be, others were abandoned because they were replaced or <other> things happened
04:33 khw joined #perl6
04:33 jamesalbert use_module loads the module in runtime and let's you call subs like: use_module("Math::BigInt", 1.31)->new("1_234");
04:34 MadcapJake jamesalbert: the nicest part of Perl 6 is a TON of functionality is already included out-of-the-box.
04:34 MadcapJake jamesalbert: that's require and it's builtin! http://doc.perl6.org/language/modules#require
04:35 tony-o jamesalbert: probably the closest thing is 'require'
04:37 jamesalbert that is glorious to hear! I'm trying to do `require ::("JSON::Fast").to-json` but I'm doing it wrong...
04:37 MadcapJake yes :) you need to do require ::('JSON::Fast') <&to-json>; to-json({ a => 2 });
04:38 JRaspass joined #perl6
04:39 tony-o or a much more verbose way
04:39 tony-o m: require Test; &GLOBAL::Test::EXPORT::DEFAULT::plan.say;
04:39 camelia rakudo-moar 330f81: OUTPUT«sub plan (;; Mu | is raw) { #`(Sub|84420184) ... }␤»
04:40 MadcapJake jamesalbert: looks like we were missing the ampersand there :)
04:41 abaugher joined #perl6
04:44 jamesalbert jesus, you're like a perl expert :O
04:44 jamesalbert okay really close now
04:44 jamesalbert can I do something like:
04:44 jamesalbert require ::("JSON::Fast")
04:44 tony-o i've just been hacking around in this for a long while
04:44 jamesalbert &GLOBAL::JSON::Fast::EXPORT​::DEFAULT::&from-json("{}")
04:45 nemo joined #perl6
04:45 jamesalbert or I guess it'd be `&GLOBAL::JSON::Fast::EXPORT​::DEFAULT::from-json("{}")`
04:46 jamesalbert it's definitely somewhat working because it's giving me: "Use of Nil in string context  in block <unit> at <unknown file> line 1"
04:47 Cabanossi joined #perl6
04:50 tony-o m: my $sub = 'plan'; my $mod = 'Test'; require ::($mod); &::($mod)::EXPORT::DEFAULT::($sub).say;
04:50 camelia rakudo-moar 330f81: OUTPUT«sub plan (;; Mu | is raw) { #`(Sub|92611112) ... }␤»
04:50 tony-o MadcapJake's way might be cleaner if you know the names of things before hand
04:55 jamesalbert jesus christ men
04:55 jamesalbert both you tony-o and madcapjake have been awesome
04:55 jamesalbert thanks guys
04:56 jamesalbert all these solutions worked
04:56 jamesalbert what a glorious language
04:56 jamesalbert now im gonna eat a pop tart and go to bed
04:56 jamesalbert night all!
04:56 MadcapJake lol! good plan! g'night!
04:56 tony-o that sounds good, think i'll do the same + bier and trailer park boys
04:56 MadcapJake tony-o: TPB!
04:56 tony-o MadcapJake: hells yes
04:57 MadcapJake need to catch up on that show, only seen the first 4 seasons
04:57 tony-o netflix just added season 10
04:57 MadcapJake sweet! gotta get to work! :)
05:04 bjz joined #perl6
05:05 MadcapJake it's a quite deflating feeling when you do all this work to get something setup and then realize that there's an API that will cover that case completely...
05:06 MadcapJake wait, I'm safe, wouldn't be able to do this with Net::Curl *phew* ;)
05:08 bjz_ joined #perl6
05:11 niceperl joined #perl6
05:11 tardisx joined #perl6
05:13 MadcapJake can you delete tickets that you create in RT? I want to test some things with my issue submitter but I don't want to leave a bunch of junk tickets in there
05:15 TEttinger joined #perl6
05:20 MadcapJake nope apparently you can't :(
05:31 teatime MadcapJake: oh I was gonna tell, you could have always shell'd out to the curl command, right/
05:32 teatime not like that's a huge dependency vs. libcurl
05:32 MadcapJake yep that is truth, just wanted to avoid using shell stuff for practice-sake :)
05:33 MadcapJake I was close to using ssmtp for sending email (even easier than dealing with curl to send emails) but RabidGravy++ fixed up Net::SMTP and so I went with that!
05:34 teatime ssmtp is nice in that it works for everything on your system that sends mail the unixy way
05:35 MadcapJake yeah, now i'm realizing that I might be able to just create tickets via the RT REST api xD
05:35 MadcapJake but I'm worried about testing it because you can't delete tickets on RT apparently :\
05:37 raiph joined #perl6
05:38 MadcapJake bestpractical has a demo RT though! yessss
05:39 AlexDaniel MadcapJake: hmm do you have something public-ish somewhere?
05:39 AlexDaniel MadcapJake: I can provide some feedback if required
05:46 avenj joined #perl6
05:58 mr-foobar joined #perl6
06:04 MadcapJake AlexDaniel: https://gist.github.com/MadcapJake​/f47f2c0f45ac4473a436b4a4f62bdb9b
06:04 MadcapJake works on demo.bestpractical.com :)
06:05 MadcapJake two nice things about this way: 1) no need to send emails and 2) I get the ticket number right in the response!
06:07 AlexDaniel what's the limit? What is going to happen if you run that in a loop? :)
06:08 AlexDaniel .oO( I should be quiet about things like this… )
06:09 mr-foobar joined #perl6
06:09 MadcapJake what do you mean limit?
06:09 MadcapJake like API rate limit?
06:10 AlexDaniel yea
06:11 MadcapJake i don't want to try :P
06:12 MadcapJake there's a reCaptcha and everyone is going to spend some time writing thoughtful issues (I can dream!) so it shouldn't be an issue and RT has a system for marking issues as spam too
06:14 cpage_ joined #perl6
06:16 bjz joined #perl6
06:26 ambs joined #perl6
06:26 kanishka joined #perl6
06:27 dalek DBIish: e01c873 | (Salvador Ortiz)++ | lib/DBDish/mysql/ (2 files):
06:27 dalek DBIish: mysql: Fix MYSQL_BIND struct
06:27 dalek DBIish:
06:27 dalek DBIish: Add a missing field, uncovered by testing in on 32bits machine.
06:27 dalek DBIish: Xliff_++ for spot the NH::Blob problem.
06:27 dalek DBIish: review: https://github.com/perl6/DBIish/commit/e01c8731e5
06:27 dalek DBIish: 93cc0d3 | (Salvador Ortiz)++ | / (2 files):
06:27 dalek DBIish: For panda's users, now v0.5.3
06:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/93cc0d320d
06:28 CIAvash joined #perl6
06:29 bjz joined #perl6
06:38 mr-fooba_ joined #perl6
06:41 edehont joined #perl6
06:42 xinming_ joined #perl6
06:47 wamba joined #perl6
06:51 fireartist joined #perl6
06:58 gensym joined #perl6
07:03 nadim joined #perl6
07:09 zakharyas joined #perl6
07:16 ely-se joined #perl6
07:20 nadim joined #perl6
07:20 mr-foobar joined #perl6
07:23 RabidGravy joined #perl6
07:28 araujo__ joined #perl6
07:31 nemo joined #perl6
07:31 RabidGravy Rarr!
07:32 moritz blessya RabidGravy
07:32 DrForr o/
07:33 Xliff_ Is there a way for panda to extract the source of a module without creating a subshell (ala "panda look ...")
07:34 moritz .oO( panda don'tlook )
07:36 abraxxa joined #perl6
07:36 DrForr Sounds like a honey badger meme :)
07:37 sortiz_ o/ RabidGravy
07:40 sortiz_ Xliff_, The easy way is use git directly.
07:46 leont joined #perl6
07:54 nadim joined #perl6
07:54 wamba joined #perl6
07:58 RabidGravy I might do some C today
07:59 sortiz_ \o>
08:00 dakkar joined #perl6
08:00 sortiz_ joined #perl6
08:07 darutoko joined #perl6
08:09 nadim joined #perl6
08:23 bjz joined #perl6
08:24 yoleaux MadcapJake: DrForr: open port 5000 on Linode :)
08:26 DrForr Smartarse bot.
08:29 timotimo heyo
08:30 leont joined #perl6
08:38 Begi joined #perl6
08:38 moritz \o timotimo/
08:38 timotimo hehe
08:40 g4 joined #perl6
08:42 mr-foobar joined #perl6
08:45 mr-foobar joined #perl6
08:46 pmurias joined #perl6
08:50 mr-foobar joined #perl6
08:51 zakharyas joined #perl6
08:59 moritz m: say uniname(0x15)
08:59 camelia rakudo-moar 330f81: OUTPUT«NEGATIVE ACKNOWLEDGE␤»
09:07 nadim joined #perl6
09:10 rindolf joined #perl6
09:12 sue joined #perl6
09:34 nine -win 41
09:35 * moritz is always amazed at how many IRC windows folks have
09:35 moritz I work hard to keep that number below 15, because I lose overview very quickly
09:36 timotimo i have like 19 right now
09:36 timotimo five of those are perl6 related :P
09:37 moritz #perl6 #perl6-release #p6dev #moarvm #perl6-toolchain I assume? :-)
09:37 timotimo not toolchain, but gaming
09:38 moritz ah
09:39 timotimo weechat has a feature where multiple buffers can be put into one, but it'll still take all the spaces in the buffer list
09:39 timotimo and #perl6-release and #perl6-gaming are both so low-traffic and rarely have concurrent discussions, so i could do that with it
09:40 sue joined #perl6
09:40 sortiz moritz, have you a little time? would appreciate your comments about my WIP on 'DataSet' for DBIish, for the general idea see https://github.com/perl6/DBIish​/blob/data-sets/t/50-DataSet.t
09:41 TEttinger joined #perl6
09:43 teatime timotimo: I think you can auto-detach idle channels from the buffer list.
09:43 teatime timotimo: I want to hide specific ones all of the time, but I can't figure out how.
09:43 timotimo oh?
09:46 teatime yes, but that's the extent of what I know.  I haven't figured out how to use the feature.
09:46 teatime (mainly because I'm not interested in the auto-detach idle channels part, and that seems to be the core of it.)
09:46 timotimo ah
09:50 Begi1 joined #perl6
09:53 Begi how can I update a module with Panda ?
09:53 sjoshi joined #perl6
09:53 nadim joined #perl6
09:53 tadzik panda --force install Module
09:54 tadzik or just install, if the module maintainer remembered to actually update the version
09:55 nadim I seem to have some wifi problems, appologies begged for If this showed up a few minutes ago
09:55 nadim good morning, I have a: if $s1 eqv $s2 ... where I want infix:<eqv> to come from a higher scope, different people pointer at OUTER and other pseudo package but OUTER::infix:<eqv>($1, $s2) tells me that it can't find method "Nil"
09:55 sjoshi joined #perl6
09:55 Begi thanks tadzik, it works
09:56 timotimo hm, is OUTER::infix:<eqv> right? probably wants to have ('&infix:<eqv>') instead
09:57 espadrine joined #perl6
10:01 nadim Malformed lookup of ::&infix; please use ::('&infix'), ::{'&infix'}, or ::<&infix> ... trying again
10:05 nadim Please use '!!' rather than' :'  then: This type does not support positional operations then: Bogus postfix. At least I am jogging P6 error messages!
10:05 timotimo please show me your source
10:06 domidumont joined #perl6
10:08 nadim (OUTER::<&infix>:<eqv>($1, $s2))
10:08 moritz no, that's wrong
10:08 moritz either &OUTER::infix:<eqv> or OUTER::{'&infix:<eqv>'}
10:08 nadim shall I have it as an infix?
10:09 nadim ah! let's try
10:10 perlawhirl joined #perl6
10:10 nadim that gives: Cannot find method 'Nil'
10:11 perlawhirl hi perlers
10:11 Begi perlawhirl: hi !
10:11 timotimo is it really ::{}?
10:11 timotimo m: say OUTER::('&infix:<eqv>')
10:11 camelia rakudo-moar 330f81: OUTPUT«No such symbol 'OUTER::&infix:<eqv>'␤  in block <unit> at /tmp/zqitkmDGoT line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/zqitkmDGoT line 1␤␤»
10:11 timotimo m: say ::('&infix:<eqv>')
10:11 camelia rakudo-moar 330f81: OUTPUT«sub infix:<eqv> ($?, $?) { #`(Sub+{<anon|75747216>}+{Precedence}|43505840) ... }␤»
10:11 domidumont joined #perl6
10:12 perlawhirl can anyone (looking in nine's direction) tell me if i can pass a hash ref to a perl5 routine (in this case, a new object)
10:12 edehont joined #perl6
10:12 perlawhirl ie. Class.new($foo, { bar => 'baz' })
10:13 perlawhirl p5 errors, it complains "can't use string ("bar") as a hashref"
10:13 nadim perlawhirl: this is  Perl6 channel
10:14 perlawhirl yes it is :D sorry, i should have specified i was talking about Inline::Perl5
10:14 perlawhirl hence why i'm looking in nine's direction
10:14 DrForr nadim: he's using Inline::Perl5, that's fine :)
10:14 nadim I kinda guessed but wasn'tsure :)
10:15 perlawhirl i'll give you a bonus P6 question for free: what is .categorize? it's in Any.pm, but not in the docs. is it a pre-GLR version of .classify
10:15 perlawhirl it seems to do the same thing
10:15 perlawhirl m: say <one two three four five>.categorize(*.comb[0])
10:15 camelia rakudo-moar 330f81: OUTPUT«f => [four five], o => [one], t => [two three]␤»
10:17 perlawhirl also it's much slower than .classify :)
10:18 jnthn perlawhirl: They do different things :)
10:18 nadim timotimo: any reasons why OUTER:infix doesn't work?
10:18 Begi joined #perl6
10:19 timotimo because the outer itself doesn't declare that infix?
10:19 timotimo you can use OUTERS, though
10:19 timotimo that'll probably give you what you want
10:22 nadim it does run but the eqv that I defined for a specific class does not get called
10:23 perlawhirl jnthn: ok thanks... reading S32 now.
10:24 sue joined #perl6
10:27 dvinciguerra__ joined #perl6
10:30 perlawhirl i... think i found a bug
10:30 perlawhirl m: say <one two three four five>.classify( *.contains( any('a'..'e') ))
10:30 camelia rakudo-moar 330f81: OUTPUT«P6opaque: no such attribute '$!reified'␤  in block <unit> at /tmp/rfbjsYzsrY line 1␤␤»
10:30 perlawhirl works if i explicitly Boolify
10:30 perlawhirl m: say <one two three four five>.classify( ?(*.contains( any('a'..'e')) ))
10:30 camelia rakudo-moar 330f81: OUTPUT«False => [two four], True => [one three five]␤»
10:31 timotimo nadim: are you sure OUTER is what you mean? not CALLER or even CLIENT?
10:31 nadim I'll try with CALLERS although I thought that CALLERS would be part of OUTERS
10:32 timotimo no, definitely not
10:32 timotimo the two are extremely distinct
10:32 timotimo the one is lexical, the other dynamic
10:33 nadim CALLERS did not help, let's try CLIENTS
10:33 timotimo i think we only have "CLIENT" without the S
10:33 sjoshi joined #perl6
10:33 timotimo but it's most likely going to behave a lot like CALLERS
10:35 nadim Yes CLIENTS was not accepted but it did not work as CALLERS, I got annot find method 'Nil'.
10:35 timotimo how exactly do you use the result of the lookup?
10:36 nadim I just call it. My theory is that DDT does not call the eqv that I declared, somewhere up the chaine before calling it, because it does not see it.
10:37 nadim so I need DDT to use the eqv defined up th caller chain, otherwise any class with eqv defined will not work properly in DDT
10:37 timotimo it can only see operators that are lexically in scope
10:37 timotimo aye
10:37 timotimo a common difficulty
10:39 nadim not so good! I can think of the case where someone diffs two structures and decideds, at the DDT call point, that two types are equivalent if some attributes match, but that will not work!
10:40 nadim hmm, shouldn't that be in the same scope already? since it is defined in ascope higher than the call to DDT?
10:40 timotimo in our current implementation, i think it might end up being exceedingly expensive to grab all operators from up the call stack
10:40 timotimo lexical scope!
10:40 timotimo lexical scope is exactly what's in the source code
10:41 nadim that was my theory
10:41 timotimo if it isn't between braces upwards of the "hierarchy" inside the code, it won't be found
10:41 jnthn I think the typical pattern is to have an optional parameter that you bind to something like the client or caller eqv
10:41 timotimo a call doesn't factor into this. it can't.
10:41 jnthn And then you just call that
10:42 timotimo ideally that'd happen "for you", without changing how the method itself is invoked
10:42 jnthn \&infix:<eqv> = CLIENT::{'&infix:<eqv>'} or so
10:42 jnthn (No idea if that actually works)
10:42 jnthn (Bit tied up with other things atm)
10:43 nadim jnthn: thanks anyway, I can try and get back to you when you are les busy (if ever ;) )
10:48 nadim timotimo: thanks for balling with me. As much as I am happy that I thought right to start with, I have to find a way to make some subs visible in the lexical scope if Jnth's method doesn't work.  I understand that grabbing operators is /can be expensive but  it seems to me that it is the logical way; otherwise we define operators that are ignored.
10:49 nadim is there a way to search for the operators? I'll add that in DDT to start with
10:50 timotimo m: sub foo() { say CALLERS::{'&infix:<eqv>'} }; foo()
10:50 camelia rakudo-moar 330f81: OUTPUT«sub infix:<eqv> ($?, $?) { #`(Sub+{<anon|75747216>}+{Precedence}|46332304) ... }␤»
10:50 timotimo m: sub foo() { say CALLERS::{'&infix:<eqv>'}("a", "b") }; foo()
10:50 camelia rakudo-moar 330f81: OUTPUT«False␤»
10:50 timotimo if this doesn't work, i dunno what would :\
10:51 bbkr joined #perl6
10:53 sue joined #perl6
10:56 nadim \&infix:<eqv> = CLIENT::{'&infix:<eqv>'} didn't work, complains about modifying an immutable capture. using := to bind said: Cannot use bind operator with this left-hand side; and using ::= said that it was not implemented.
10:56 nadim In any case, we've been displaying a pletoria of error messages, which is nice in a pervert way.
10:56 timotimo yeah, you need "my" there
10:57 nadim ah!
10:57 timotimo otherwise you'll be trying to assign to the infix:<eqv> that comes from the setting
10:58 nadim my \&infix:<eqv> = CLIENT::{'&infix:<eqv>'} ;  says "malformed my.
10:59 moritz either \ or &
10:59 moritz I think & is the right onw
10:59 timotimo yes
10:59 * timotimo is distracted by hacking on the optimizer
11:00 nadim and by /me spewing error message ;)
11:00 timotimo that's fine
11:00 timotimo i was like you in the beginning
11:01 kaare_ joined #perl6
11:03 nadim you wish! ;)
11:03 timotimo hum. we're only visiting the first branch of QAST::Want nodes if it's a value/'v'/value one :|
11:04 timotimo maybe we should visit only the third branch if that node is in sink context
11:04 jnthn timotimo: Yes, and we saved 20% or so on the optimize phase doing so, since the subtrees are mostly shared...plesae be careful :)
11:04 jnthn lunch time :) &
11:05 sortiz bed time for me :) &
11:05 timotimo i will be
11:06 timotimo i don't really know why we don't throw out the Want node itself when we find it in void context at the optimizer level
11:13 awwaiid ab5tract: for multi-repl stuff, I'd like to keep playing with a client-server repl like clojure's nREPL. Then you can have more than one client, different types of clients, etc.
11:14 ely-se joined #perl6
11:14 kid51 joined #perl6
11:17 awwaiid ab5tract: So I spin up this one project in clojure/clojurescript. It starts a REPL in a console and a websocket to a browser. When I enter one namespace (like setting a current package) in the REPL it actually executes the commands on the browser in clojurescript, in another namespace locally. I also have an editor connected to the same session so I can dynamically redefine functions, tab-complete based on loaded data, etc
11:18 araujo joined #perl6
11:20 araujo joined #perl6
11:22 sue joined #perl6
11:23 azawawi joined #perl6
11:24 azawawi interesting output... 16GB eaten by zombie moar.exe(s). re https://github.com/azawawi/perl6-file-wh​ich/blob/master/lib/File/Which/Win32.pm6 :)
11:25 timotimo hungry hungry heapo
11:25 azawawi https://gist.github.com/azawawi/​517da9d9a6cbd5724e4d26b0ee6af846   # P6M Merging GLOBAL symbols failed: duplicate definition of symbol Win32
11:26 timotimo well, yeah, it uses File::Which, which uses File::Which::Win32
11:26 timotimo looks like the most obvious endlessly recursive use ever
11:27 azawawi yup
11:27 azawawi copy & paste :)
11:27 azawawi so copy&paste broke perl6 -c... cool :)
11:28 azawawi the funny thing you cannot find that problem when your machine is swapping...
11:28 azawawi win32 and linux... same behavior ofcourse
11:28 timotimo hehe.
11:28 timotimo well, it'd probably be nice if we had detection for endless recursion in there
11:29 timotimo but you should always ulimit moar anyway :P
11:30 azawawi what's your ulimit command btw?
11:30 azawawi to prevent such a behavior because it happened while i was editing using atom :)
11:31 azawawi i was thinking it maybe a linter (js) bug... linting all project
11:32 timotimo don't actually have one :)
11:33 timotimo BBL
11:34 azawawi hehe thought so
11:34 azawawi because you cant u limit moar :)
11:34 timotimo of course i can
11:34 timotimo i could put that into the shell script perl6-m or perl6 or whatever :)
11:35 azawawi i know ... you cant u limit moar (Perl 6 has no limits :) )
11:36 azawawi ofcourse saying that you can ulimit is the right thing to do under linux/macosx but under win32 you do not have such an option as far as i know
11:40 azawawi timotimo: https://github.com/azawawi/ato​m-perl6-editor-tools/issues/22 # added an issue to fix :)
11:40 * lizmat clickbaits https://p6weekly.wordpress.com/2016/03​/29/2016-13-a-language-for-heapsters/
11:41 sue joined #perl6
11:41 vendethiel joined #perl6
11:42 * sjn saw an URL in an IRC channel, and would never had expected what happened next!
11:44 DrForr https://www.youtube.com/watch?v=dKpzCCuHDVY # Let's see what happens!
11:44 azawawi lizmat: 2016-13?
11:44 ambs joined #perl6
11:45 lizmat 13th week of the year ?
11:45 DrForr ISO week?
11:46 azawawi im so used to using yyyy.mm.dd... nvm.
11:47 nine 2016-W13 would be ISO 8601 conformant. But we are talking about a blog post here :)
11:48 azawawi nine: yup :)
11:49 azawawi the thing is 2016.13 and 2016.03 looked like a typo
11:51 azawawi lizmat++
12:03 * RabidGravy gives up on making a gdbm binding *again*
12:05 perlawhirl nine: do you know how to... http://irclog.perlgeek.de/p​erl6/2016-03-30#i_12258756
12:18 pmurias RabidGravy: why?
12:19 RabidGravy because I don't want it enough to overcome the problems I am having with it
12:24 nadim there must be a better way to write this, right?  title => (%options<lhs_title title>:v)[0] // '',
12:25 nadim first defined of lhs_title and title or ''
12:26 jnthn [//] flat %options<lhs_title title>, '' # maybe
12:27 [Coke] awwaiid: ping.
12:32 nadim jnthn: nice but maybe not the easiest to read, I guess it's the flat that messes it up. Maybe someting with .first: defined
12:35 jnthn It's easier than the :v and then index, imo :)
12:35 azawawi File::Which now handles on win32 on %PATH and registry-only executables https://github.com/azawawi/perl6-f​ile-which/blob/master/t/02-win32.t :)
12:35 RabidGravy wahay!
12:35 jnthn (%options<lhs_title title>, '').flat.first(*.defined) would work also
12:38 * azawawi zef uninstall File::Which && zef install File::Which # way too cool :)
12:39 RabidGravy I've just astonished myself by finding a USB audio interface in the boxes o' stuff at the first attempt
12:39 arnsholt Ah yes, the infamous boxes o' stuff =D
12:41 RabidGravy I probably wouldn't be so lucky at a second attempt, there are seven boxes with various audio and musical stuffs
12:42 nadim all, I'd like some feedback on a Text::Template module I wrote. It's a very thin layer and I am not sure I should add it to the ecosystem. https://github.com/nkh/P6-Text-Templ​ate/blob/master/lib/Text/Template.pm
12:42 azawawi RabidGravy: finally `perl6 -MFile::Which -e "say which('firefox')"` => C:\Program Files (x86)\Mozilla Firefox\firefox.exe :)
12:43 dvinciguerra__ joined #perl6
12:43 RabidGravy kewl
12:49 MadcapJake I keep getting this strange "Too few positionals" error (non-breaking, iiuc) that shows up with this code: https://gist.github.com/MadcapJake​/cbfd2e083211eb9971528b1e5fab1bed
12:50 MadcapJake If I comment out lines 20-24 it disappears but I can't seem to replicate it outside of this context for some reason either
12:51 MadcapJake with the for block's argument as «@ ($i, $s)» it also says "in 1 sub-signature" but if I change it to just «$i, $s» it just doesn't say that part o_O
12:54 MadcapJake now for some unknown reasons it has decided to actually break...
12:55 MadcapJake oh if I wrap the for's list, it breaks with the same error actually
12:55 lizmat_ joined #perl6
12:56 MadcapJake actually I feel like I may have worked it out, I *want* the for's list to be a list of tuples, but it isn't actually coming out as intended
12:57 perlpilot m: my @a = 'a'..'z'; for @a[1..*] -> @ ($i, $s) { }
12:57 camelia rakudo-moar 330f81: OUTPUT«Type check failed in binding <anon>; expected Positional but got Str ("b")␤  in block <unit> at /tmp/eRE0raRamo line 1␤␤»
12:57 sue joined #perl6
12:59 sufrostico joined #perl6
12:59 MadcapJake m: my @a = (1, 2) xx 5; for @a[1..*] -> @ ($i, $s) { say $i }
12:59 camelia rakudo-moar 330f81: OUTPUT«1␤1␤1␤1␤»
12:59 perlpilot MadcapJake: the "too few positionals" is because you are pulling off items 2 at a time, but you've got an odd number of them
13:00 perlpilot change it to make $s optional and it'll go away
13:00 perlpilot m: my @a = 'a'..'z'; for @a[1..*] -> $i, $s {  }
13:00 camelia rakudo-moar 330f81: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/HAPZ2hBJH0 line 1␤␤»
13:00 perlpilot m: my @a = 'a'..'z'; for @a[1..*] -> $i, $s? {  }
13:00 camelia rakudo-moar 330f81: ( no output )
13:01 MadcapJake perlpilot: ahhh! thanks!
13:03 perlpilot That first error I got makes total sense, but since I'm not fully awake, it feels really LTA.
13:08 skids joined #perl6
13:13 sue joined #perl6
13:19 d4l3k_ joined #perl6
13:19 cognominal joined #perl6
13:19 [particle] joined #perl6
13:22 perlawhirl joined #perl6
13:22 abraxxa1 joined #perl6
13:27 nine perlawhirl: aehm...what exactly do you mean by hashref? There are no references in Perl 6.
13:28 dalek ecosystem: 0a0ce4f | RabidGravy++ | META.list:
13:28 dalek ecosystem: Rename META for URI::Template
13:28 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/0a0ce4fa76
13:33 ZoffixWin m: role One { method foo (){} }; role Two { method foo(){} }; class Three does One does Two {};
13:33 camelia rakudo-moar 268e9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6MFr6OIDRh␤Method 'foo' must be resolved by class Three because it exists in multiple roles (Two, One)␤at /tmp/6MFr6OIDRh:1␤»
13:33 ZoffixWin The error message says "resolved by class"... how would that look like? How do you resolve it?
13:33 perlawhirl nine: exactly. so i guess if a perl5 class expects a hashref (for options) there's no way to pass those options from Inline::Perl5 ?
13:34 lizmat m: role One { method foo (){} }; role Two { method foo(){} }; class Three does One does Two { method foo() { } };
13:34 camelia rakudo-moar 268e9c: ( no output )
13:34 moritz ZoffixWin: you implement the method in class Three
13:34 ZoffixWin Thanks.
13:34 * jnthn wonders if the message could hint at that more clearly :)
13:34 moritz and there you can call self.One>>foo()
13:34 moritz erm
13:34 moritz and there you can call self.One::foo()
13:34 nine perlawhirl: oh, it's quite the opposite. When you pass an itemized hash to a Perl 5 function, it will arrive as hash ref. If you want it flattened, you have to do so on the Perl 6 side.
13:34 moritz (which is curious, considering that the methods from roles are flattened into the class)
13:36 jnthn moritz: Yeah, even more fun is that what you actually end up calling is the reified method that *would have been* composed into the class if only there wasn't a conflict
13:36 jnthn Because if we just passed the call on to the generic one it'd be missing all the type environment and so on :)
13:36 jnthn That was a little tricky to implement...
13:37 cdg joined #perl6
13:39 perlawhirl nine: that makes sense... i'll play around some more. thanks
13:42 gflohr joined #perl6
13:43 gflohr Why doesn't that match the content of a single or double quoted string? /^(<[ " ' ]>)
13:43 gflohr (
13:43 gflohr <-[$0]>*
13:43 gflohr )
13:43 gflohr $0
13:43 gflohr /
13:44 gflohr If I use <-["]> it works (for double quoted strings only).
13:44 nine gflohr: you want to use a proper grammar
13:44 moritz I guess you can't use $0 in a char class
13:44 teatime gflohr: you could use a parameterized multi instead of that.  if $0 is valid inside a regex I doubt it is inside a char class.
13:45 gflohr but how would you write then a pattern that matches single and double quoted strings at once?
13:45 gflohr nine: what do you mean by proper grammar?
13:45 moritz m: say '"abc"' ~~ /^(<[ " ' ]>) ( [<!before $0> .]* ) $0 /
13:45 camelia rakudo-moar 268e9c: OUTPUT«「"abc"」␤ 0 => 「"」␤ 1 => 「abc」␤»
13:45 moritz m: say ''abc"' ~~ /^(<[ " ' ]>) ( [<!before $0> .]* ) $0 /
13:45 camelia rakudo-moar 268e9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HzLV4Igu0z␤Two terms in a row␤at /tmp/HzLV4Igu0z:1␤------> 3say ''7⏏5abc"' ~~ /^(<[ " ' ]>) ( [<!before $0> .␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤    …»
13:45 nine gflohr: http://doc.perl6.org/language/grammars
13:46 moritz m: say q['abc"] ~~ /^(<[ " ' ]>) ( [<!before $0> .]* ) $0 /
13:46 camelia rakudo-moar 268e9c: OUTPUT«Nil␤»
13:46 moritz m: say q['abc'] ~~ /^(<[ " ' ]>) ( [<!before $0> .]* ) $0 /
13:46 camelia rakudo-moar 268e9c: OUTPUT«「'abc'」␤ 0 => 「'」␤ 1 => 「abc」␤»
13:46 moritz that seems to work
13:46 gflohr thanks, that helps me
13:47 teatime gflohr: warning:  it's a lot of addictive fun.
13:47 perlpilot m: say q['abc'] ~~ /^(<[ " ' ]>) ( <-[$0]>* ) $0 /;
13:47 camelia rakudo-moar 268e9c: OUTPUT«「'abc'」␤ 0 => 「'」␤ 1 => 「abc」␤»
13:48 DrForr gflohr: Also http://theperlfisher.blogspot.ro/2016/02/fr​om-regular-expressions-to-grammars-pt.html
13:49 gflohr thanks, I will do my homework. ;)
13:50 perlpilot gflohr: but note above that your original regex does indeed work.
13:50 gflohr perlpilot: I don't think so.  I'll search an example.
13:51 moritz m: say m/^(<[ " ' ]>) ( <-[$0]>* ) $0 $/ for <'abc' "abc" 'abc" abc>
13:51 camelia rakudo-moar 268e9c: OUTPUT«「'abc'」␤ 0 => 「'」␤ 1 => 「abc」␤「"abc"」␤ 0 => 「"」␤ 1 => 「abc」␤Nil␤Nil␤»
13:51 moritz looks fine, from a quick test
13:52 gflohr perlpilot: say q["Hello, \\"world!"] ~~ /^(<[ " ' ]>) ( <-[$0]>* ) $0 /
13:53 moritz gflohr: you didn't include any logic for handling escapes
13:53 gflohr perlpilot: It should match only until the first double quote but matches until the examation mark.
13:53 perlpilot that's changing the spec
13:53 gflohr moritz: I'm not yet escaping.
13:53 moritz m: say q["Hello, \\"world!"] ~~ /^(<[ " ' ]>) ( <-[$0]>*  ) $0 /
13:53 camelia rakudo-moar 268e9c: OUTPUT«「"Hello, \"world!"」␤ 0 => 「"」␤ 1 => 「Hello, \"world!」␤»
13:53 moritz indeed
13:53 perlpilot gflohr: greedy regex are still greedy.
13:54 moritz well, but that does mean the <[-$0]> matches anything
13:54 moritz m: say q['ab'c'] ~~ /^(<[ " ' ]>) ( [<!before $0> .]* ) $0 /
13:54 camelia rakudo-moar 268e9c: OUTPUT«「'ab'c'」␤ 0 => 「'」␤ 1 => 「ab'c」␤»
13:54 gflohr perlpilot: I don't get that.  The <-[$0]> should not match a quote but it does.  This is what I don't understand.
13:55 moritz gflohr: it just seems that char classes aren't as dynamic as you expect them to be
13:55 perlpilot m: say q['ab0c'] ~~ /^(<[ " ' ]>) ( <-[$0]>* ) $0 /;
13:55 camelia rakudo-moar 268e9c: OUTPUT«Nil␤»
13:56 perlpilot I wish there was a Regex::Explain that would tell us exactly what Rakudo thinks the regex should do.
13:56 gflohr so did I hit a bug?
13:56 perlpilot m: say q['ab0'] ~~ /^(<[ " ' ]>) ( <-[$0]>* ) $0 /;
13:56 camelia rakudo-moar 268e9c: OUTPUT«Nil␤»
13:56 teatime gflohr: no.
13:56 jnthn <-[$0]> is the char class of everything except $ or 0
13:57 moritz gflohr: I don't think either the test suite or the design documents demands that this work
13:57 jnthn By design.
14:00 gflohr But it's somewhat confusing.
14:01 perlpilot especially if you're not quite fully awake  :)
14:01 jnthn Maybe, but you'd not expect '$0' to interpolate either
14:01 DrForr gflohr: It's pretty straightforward. $0 isn't a variable inside <[]>.
14:02 perlpilot gflohr: I think the right way to look at it is that inside of a character class, you're not in Perl anymore, you're in the "character class language" which has its own rules.
14:02 jnthn Just a place you need to learn isn't an interpolating context
14:02 teatime gflohr: here's a string-matching grammar example https://gist.github.com/pprince/​f0b0f75ead814691a86854444a6bf184
14:03 teatime it's not as concise or elegant as I'd like but I was just playing with it and I'm still very new to perl6 syntax/features.
14:03 teatime as an added bonus, perhaps folks will point out anything wrong or easily-simplified to me.
14:04 masak jnthn: how would you say "negative character class with all the characters from $0" ?
14:04 masak (or any string in a variable)
14:06 perlpilot masak: EVAL  :)
14:07 zakharyas joined #perl6
14:10 gflohr My final goal is to extract a quoted string with backslash escaping.  That was a relatively simple in Perl 5.  And it would be a pity if it is a lot more complicated in P6.
14:11 jnthn m: say '"abc"' ~~ /(<["']>) ([<!before $0>.]*)/
14:11 camelia rakudo-moar 268e9c: OUTPUT«「"abc"」␤ 0 => 「"」␤ 1 => 「abc"」␤»
14:12 jnthn There's one way
14:12 moritz m: say '"a"bc"' ~~ /(<["']>) ([<!before $0>.]*)/
14:12 camelia rakudo-moar 268e9c: OUTPUT«「"a"bc"」␤ 0 => 「"」␤ 1 => 「a"bc"」␤»
14:12 moritz jnthn: ^^ doesn't work
14:16 DrForr m: say '"ab\\"cd"' ~~ /(\" [ \\" | <-["]> ] ")/
14:16 camelia rakudo-moar 268e9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2vabHfnqyM␤Unable to parse expression in metachar:sym<( )>; couldn't find final ')' ␤at /tmp/2vabHfnqyM:1␤------> 3say '"ab\\"cd"' ~~ /(\" [ \\" | <-["]7⏏5> ] ")/␤    expecting any of:␤        d…»
14:17 _4d47 joined #perl6
14:17 DrForr m: say '"ab\\"cd"' ~~ /(\" [ \\" | <-["]> ] \")/
14:17 camelia rakudo-moar 268e9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6Jc4WrJrJl␤Unable to parse expression in metachar:sym<( )>; couldn't find final ')' ␤at /tmp/6Jc4WrJrJl:1␤------> 3say '"ab\\"cd"' ~~ /(\" [ \\" | <-["]7⏏5> ] \")/␤    expecting any of:␤        …»
14:17 DrForr m: say '"ab\\"cd"' ~~ /(\" [ \\" | <-[ " ]> ] \")/
14:17 camelia rakudo-moar 268e9c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5A1yr1DwZ9␤Unable to parse expression in metachar:sym<( )>; couldn't find final ')' ␤at /tmp/5A1yr1DwZ9:1␤------> 3say '"ab\\"cd"' ~~ /(\" [ \\" | <-[ " ]7⏏5> ] \")/␤    expecting any of:␤      …»
14:17 DrForr Grumble.
14:17 azawawi joined #perl6
14:18 DrForr m: say '"ab\\"cd"' ~~ /(\" [ \\\" | <-[ " ]> ]* \")/
14:18 camelia rakudo-moar 268e9c: OUTPUT«「"ab\"cd"」␤ 0 => 「"ab\"cd"」␤»
14:18 azawawi question... shouldnt %*ENV<Path> and %*ENV<PATH> be case insensitive on windows?
14:18 DrForr gflohr: ^
14:18 nine gflohr: what exactly does your Perl 5 solution look like? Because it doesn't sound all that simple to me.
14:19 azawawi m: %*ENV<Path> eq %*ENV<PATH>
14:19 camelia rakudo-moar 268e9c: OUTPUT«WARNINGS for /tmp/QVW8kRVFQG:␤Useless use of "eq" in expression "<Path> eq %*ENV<PATH>" in sink context (line 1)␤Use of uninitialized value %ENV of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if nee…»
14:20 jnthn moritz: oh, duh, yeah, $0 will mean something else inside the before :)
14:21 azawawi on windows it is case insensitive for environment variables as far as i know
14:21 gflohr nine: for a double-quoted string it looks like this: "([^\\"]*(?:(?:\\"|\\)[^\\"]*)*)"
14:21 nemo joined #perl6
14:22 jnthn Oh, if you want ot hardcode the terminator it's easier
14:22 gflohr nine: I don't find an example that works for both single and double quotes but I'm relatively sure it's just using backreferences with \1
14:22 nine gflohr: I wouldn't be so sure. Perl 5 doesn't allow interpolating in character classes either.
14:23 jnthn m: say '"abc"' ~~ /'"' ~ '"' ([ \\ . | <-["]> ]+)/
14:23 camelia rakudo-moar 268e9c: OUTPUT«「"abc"」␤ 0 => 「abc」␤»
14:23 gflohr nine: for a single character I don't need a character class.  I just use \1
14:23 nine gflohr: you do have a character class with [^\\"]*
14:23 nine That's the place where it becomes hard
14:23 jnthn m: say '"a\"bc"' ~~ /'"' ~ '"' ([ \\ . | <-["]> ]+)/
14:23 camelia rakudo-moar 268e9c: OUTPUT«「"a\"bc"」␤ 0 => 「a\"bc」␤»
14:23 gflohr nine: you're right
14:25 awwaiid [Coke]: pong
14:29 gflohr nine: (?:\"(?:\\\"|(?!\").)*\"|\'(?:\\\'|(?!\').)*\'), that is it for Perl 5, see http://perldoc.perl.org/Text/B​alanced.html#gen_delimited_pat
14:30 sue joined #perl6
14:31 MadcapJake is there a fast way to chop off any array elems that don't have a specific number of items?
14:32 teatime gflohr: my example can be simplified to at least something like https://gist.github.com/pprince/​f0b0f75ead814691a86854444a6bf184 if not further, given your requirements vs. mine
14:33 teatime gflohr: and has the advantage of being far more readable/editable than your one-liner.
14:34 gflohr teatime: Thanks, I will try that.  Have to get my son from kindergarten now.
14:34 gflohr left #perl6
14:35 nine teatime++ # using the right tool for this job
14:35 MadcapJake m: for [[1, 2] xx 5].push([1]).push([1, 2, 3]).append([1, 2] xx 5) -> @ ($a, $b) { say $b }
14:35 camelia rakudo-moar 268e9c: OUTPUT«2␤2␤2␤2␤2␤Too few positionals passed; expected 2 arguments but got 1 in sub-signature␤  in block <unit> at /tmp/KsdiXZBrv3 line 1␤␤»
14:36 MadcapJake I have a list like that and I need to remove anything other than tuples
14:37 teatime gflohr: if that untested code doesn't work ootb I'm willing to fix it.
14:38 MadcapJake m: for [[1, 2] xx 5].push([1]).push([1, 2, 3]).append([1, 2] xx 5) -> @l ($a, $b) where @l.elems == 2 { say $b }
14:38 camelia rakudo-moar 268e9c: OUTPUT«2␤2␤2␤2␤2␤Constraint type check failed for parameter '@l'␤  in block <unit> at /tmp/58d2__zblw line 1␤␤»
14:39 domidumont joined #perl6
14:40 gregf_ grep prolly?
14:40 jnthn m: my @a = [[1, 2] xx 5].push([1]).push([1, 2, 3]).append([1, 2] xx 5); say @a.grep(*.elems != 2)
14:40 camelia rakudo-moar 268e9c: OUTPUT«([1] [1 2 3])␤»
14:40 jnthn m: my @a = [[1, 2] xx 5].push([1]).push([1, 2, 3]).append([1, 2] xx 5); say @a.grep(*.elems == 2)
14:40 camelia rakudo-moar 268e9c: OUTPUT«([1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2])␤»
14:40 jnthn m: my @a = [[1, 2] xx 5].push([1]).push([1, 2, 3]).append([1, 2] xx 5); say @a.grep(2) # ;-)
14:40 camelia rakudo-moar 268e9c: OUTPUT«([1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2])␤»
14:40 gregf_ >> ([1,2,3], [1,2], [1,4,5,6], [6,7,8]).grep: -> $a { $a.elems == 3 }
14:40 gregf_ ah - nevrmind :/
14:41 MadcapJake jnthn, gregf_: thanks :)
14:41 MadcapJake I really need to get more familiar with grep, I don't use it enough.
14:42 gregf_ MadcapJake: then ..... you probably havent used Perl5 much .... *ducks*
14:42 MadcapJake I was gonna say that but wasn't sure of the implications ;)
14:42 gregf_ heh
14:43 MadcapJake I've *never* used Perl 5! *runs out of the room*
14:43 MadcapJake But I've used TONS of PCRE xD
14:43 teatime I used Perl5 for years, and I think I would be as lost in Perl5-land as I am w/ Perl6.
14:43 gregf_ you've not shed too many tears then :))
14:43 teatime I have no memory of smart matching, I don't think it existed.
14:44 _nadim joined #perl6
14:44 dalek doc: a256055 | (Wenzel P. P. Peppmeyer)++ | doc/Language/ (2 files):
14:44 dalek doc: the renderer doesn't like C<I<foo>>, trying I<C<foo>> what is righter
14:44 dalek doc: anyways
14:44 dalek doc: review: https://github.com/perl6/doc/commit/a256055401
14:44 MadcapJake in fact I've recently been acquainted with how awesome it is to try and make a language grammar match two regex engines (oniguruma and PCRE) x_x
14:45 RabidGravy for reference I've used Perl 4, Perl 5 *and* Perl 6
14:45 * sjn has suppressed his memories of smartmatch in Perl 5
14:46 teatime I might have used Perl 4 a little, not sure.
14:46 masak sjn: oh, psychoticmatch?
14:46 * masak .oO( this feature is axe-perimental )
14:46 MadcapJake teatime: There's been a few things that many talk about on here that have been jarring for an outsider like myself: grep, moose/mop stuff, sigils/context
14:46 gregf_ i've started off with OO Perl with Moose.....
14:48 MadcapJake but for the most part, I think being an outsider helps a bit because as I've said earlier, familiarity can be a double-edged sword, coming from Perl 5 you may have certain expectations for how things work (though I know there's a series of errors just for this particular problem space)
14:50 gregf_ MadcapJake: well its called 'filter' or 'select' or 'reject' or array_filter or whatever in python/ruby/scala/php/whatever ;). in java <=7 i guess a for loop with a break *hides*
14:50 sjn masak: traumatch :)
14:51 sjn it was a traumaching experience
14:51 sjn traumatching*
14:51 masak :P
14:51 * masak .oO( "What did you do at work today?" -- "I got traumatchized." )
14:52 sjn let's not be stigmatchizing here, now. :)
14:53 MadcapJake oh another jarring thing for an outsider: elems/chars :)
14:54 sjn also, it's time to teach everyone that a char isn't a byte any more :)
14:54 MadcapJake gregf_: yes I guess it's partly just the name that makes it tough for me to remember to use it, I look at the problem and say "I want to filter this" not "I want to grep this" but again that's something to do with where you've come from / what you're used to
14:55 MadcapJake sjn: i was wondering this when working with some native calls, how would I get the byte size of a string?
14:55 masak MadcapJake: what would you like elems/chars to be? ..."length"? o.O
14:55 MadcapJake masak: I'm just saying, it's what I'm used to! I actually like the justification for the split, but it's still "jarring" so-to-speak
14:55 masak MadcapJake: fwiw, in 007, I started out calling it `grep`. then I did a double-take on the word, and went with Python's `filter` :)
14:56 masak 007 ends up grinding tiny axes now and then
14:56 MadcapJake masak: nice!
14:56 * masak .oO( "see this? it's the world's tiniest axe, being ground" )
14:56 MadcapJake lol
14:57 * jnthn is glad we got something a bit shorter than filter, without having to abbreviate :)
14:58 masak "grep" is the perfect word for this, since it's actually an abbreviation of "global", uh, "regex", er, "print" :(
14:58 moritz m: say 'filter'.chars - 'grep'.chars
14:58 camelia rakudo-moar 268e9c: OUTPUT«2␤»
14:59 frew joined #perl6
14:59 khw joined #perl6
15:00 MadcapJake this is one thing that programming languages share with natural languages: the lexicon of words used is often the greatest impedance to learning.  Each natural language has various folklore/history that ends up getting mapped into words and you find this same thing in programming languages.
15:01 * masak .oO( that ends up getting grepped into words ) :P
15:01 MadcapJake so coming from another language, our brains have to remap the connect from filter to grep, from length to elems, etc.
15:02 masak I actually don't mind translating like that. it's a matter of habit.
15:02 masak and I feel like doing that now again between languages makes me "resilient", somehow
15:03 jnthn masak: I've never actually thought about where the name "grep" came from... :)
15:03 masak I don't get stuck in the habits and the language of one culture
15:03 masak jnthn: it's an old *ed* command, I think
15:03 * jnthn wonders if it's in muggle dictionaries... :)
15:03 masak not vim. not vi. ed.
15:03 MadcapJake masak: just as a polyglot has an easier time learning languages (their mapping machinery gets exercised more often) so to do polyglot programmers have an easier time learning new languages
15:03 masak MadcapJake: aye.
15:04 sjn m: say "𝔽".succ; # maybe 𝔾 ?
15:04 camelia rakudo-moar 268e9c: OUTPUT«𝔽␤»
15:04 teatime jnthn: g/re/p
15:04 masak MadcapJake: the sacrifice you make forever though, is a certain type of speed/certainty that you can only have if you only know one language.
15:04 masak teatime: that's the one.
15:04 masak so the "re" part is actually metasyntactic.
15:05 MadcapJake masak: well science into natural polyglots would say that their brains are actually more powerful, whether that translates is perhaps up to debate
15:05 masak meh
15:05 [Coke] awwaiid: am I on the schedule-ish?
15:05 teatime .grep in perl is kindof a misnomer; natural for unix folks, but if you want to get technical it does something a bit different :)
15:05 masak but I wouldn't give up my polyglottery for anything
15:05 teatime .filter would have probably been my choice, and I *am* a unix nerd.
15:05 sjn "natural plotglots"?
15:06 MadcapJake as in natural language polyglots
15:06 molaf joined #perl6
15:06 sjn ah
15:06 masak sjn: "plotglots" as in "I speak fluent graph!" :P
15:06 sjn :)
15:06 * masak .oO( just look at my graphemes! )
15:07 MadcapJake maybe a programming polyglot should be called a "polygrok" :P
15:07 [Coke] poly grotty
15:07 skids The first time I saw "grep" ISTR I just thought "looks like grope" and then figured out its general meaning from context.  Never threw me for a loop.  Adding some SEO to docs for "filter" might be helpful in the other direction.
15:07 zakharyas joined #perl6
15:07 * sjn agrees
15:08 MadcapJake skids: I'm not speaking of reading though, because context will always assist there. but when it comes to writing code, that's where knowing the proper words/terms becomes important
15:09 skids Like I said, SEO the docs.  Or Xto6 pages.
15:09 teatime I would just have chosen .filter as a favor to people w/ experience in functional programming but not in unix.  map() has a standard meaning, grep() not as much.
15:10 MadcapJake skids: agreed, I've been thinking of writing up something of a NotPerl5 to Perl 6 because I think that most of the non-perl5 stuff could be bundled together
15:10 teatime not that I care much.  grep fits in fine w/ the perl community/philosophy, which I also enjoy.
15:10 teatime ehh.. also apply magic regex that translates that bit about 'standard meaning' into what I actually meant.
15:11 skids .o(personally don't like "filter" as it can get too overloaded.  e.g. in a module dealing with packet filters.  Never like "map" for the same reason.)
15:12 geekosaur the problem I have with filter is that different languages flip the meaning
15:13 geekosaur I always have to look up whether it means throwing matched things out or only keeping matched things
15:13 teatime I suppose grep does at least make that clear.
15:14 MadcapJake see instead of grep, I find myself most often using gather/take but that can seem overkill when it's just a simple thing
15:15 MadcapJake m: say +^5
15:15 camelia rakudo-moar 268e9c: OUTPUT«-6␤»
15:15 jnthn MadcapJake: grep likely performs a good bit better
15:15 tmch joined #perl6
15:16 kmwallio on Mac OS X, some of the libs don't have a .dynlib extension (or an extension at all), is it possible to get NativeCall not to add it?
15:16 MadcapJake jnthn: oh that's good to know! I just think gather and take is very clear what's going on, but I'll definitely exercise my grepping muscles :P
15:16 sue joined #perl6
15:17 skids MadCapJake: learn to love "grep"  It only made it into the Oxford English Dictionary like 13 years ago :-)
15:17 teatime skids: lol, I did not know that.  does it have "grok" too and other stuff from the jargon file?
15:17 jnthn skids: Oh, I was wondering but guessing "no" :)
15:17 jnthn Cool
15:18 teatime Perl has always made some brilliant design decisions, though.
15:18 MadcapJake skids: lol I'm sorry!
15:18 teatime like, chars/codes/elems, such a simple thing, and I love it so so much.
15:19 skids Though, I don't know what a "draft definition" means.  Yes "grok" is in there and I'm sure we'd use it in computing if computers could :-)
15:19 * MadcapJake goes to write a grok sub ;)
15:19 teatime LOL.
15:19 teatime you'd be a rich man, MadcapJake.
15:20 teatime although, there are more relevant libraries for that project in Python.
15:20 * teatime runs.
15:20 MadcapJake hehe, you just supply anything and when you execute the sub, close your eyes and think about how you want the result to look, and BOOM! there it is
15:20 pmurias MadcapJake: seems risky
15:20 MadcapJake it requires a webcam though, for reading your mind
15:21 MadcapJake if you don't have a webcam, you can just jam a USB (type B only) into the back of your neck, that should do it ;)
15:21 teatime I was thinking it would be like, grok("geopolitics")
15:21 teatime and BOOM you have a Sec. of State bot
15:21 MadcapJake lol
15:22 MadcapJake grok("mob-mentality") == DonaldTrump
15:22 teatime lol.
15:22 MadcapJake or is that a triple-equal? ;)
15:23 * MadcapJake is off to a friends for some CODBLOPS! :P
15:24 huf triple = is some kind of identity thing, isnt it?
15:25 huf trump aint the only one who groks the mob mentality...
15:27 ugexe yes, and you can write your own method `WHICH` for controlling what === compares against
15:27 ugexe democracy
15:28 huf compadres against democracy?
15:29 tokomer joined #perl6
15:33 dalek ecosystem: 136547a | titsuki++ | META.list:
15:33 dalek ecosystem: Add Algorithm::Manacher to ecosystem
15:33 dalek ecosystem:
15:33 dalek ecosystem: See https://github.com/titsuki/p6-Algorithm-Manacher
15:33 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/136547a462
15:33 dalek ecosystem: 44e7b07 | jnthn++ | META.list:
15:33 dalek ecosystem: Merge pull request #181 from titsuki/add-manacher
15:33 dalek ecosystem:
15:33 dalek ecosystem: Add Algorithm::Manacher to ecosystem
15:33 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/44e7b078ee
15:36 frithnanth joined #perl6
15:38 kurahaupo joined #perl6
15:40 Xliff_ joined #perl6
15:42 sue_ joined #perl6
15:44 nemo joined #perl6
15:44 autarch joined #perl6
15:59 _4d47 left #perl6
16:07 awwaiid [Coke]: I just made a timeline on the site, http://dcbpw.org/dcbpw2016/#talks
16:13 [Coke] yay, I get the coveted post lunch slot!
16:14 [Coke] j/k I have no idea if that's good. :)
16:14 awwaiid hahah
16:15 jnthn Worst csae, lunch causes carb crash ;)
16:15 [Coke] jnthn: that'll make the crowd pliable!
16:20 sufrostico joined #perl6
16:24 rudi_s joined #perl6
16:24 dfcarpenterak joined #perl6
16:26 dalek ecosystem: cc7942d | (Nadim Khemir)++ | META.list:
16:26 dalek ecosystem: ADDED: Text-Template
16:26 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/cc7942d903
16:26 dalek ecosystem: 68d97d0 | RabidGravy++ | META.list:
16:26 dalek ecosystem: Merge pull request #182 from nkh/master
16:26 dalek ecosystem:
16:26 dalek ecosystem: ADDED: Text-Template
16:26 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/68d97d0cf8
16:32 zakharyas joined #perl6
16:38 Ven joined #perl6
16:39 nemo joined #perl6
16:40 andreoss joined #perl6
16:40 btyler [Coke]: the post-lunch slot at YAPC::EU last year was brought some smiles: tired conference people + 1-2-3 drinks with lunch (tapas) --> naptime in the lecture hall :D
16:41 btyler s/was//
16:43 M-matthew joined #perl6
16:57 Ven joined #perl6
17:06 ab6tract joined #perl6
17:07 buharin joined #perl6
17:08 dupa joined #perl6
17:09 ab6tract jnthn: since TimToady seems to be AFK (writing a butterfly book?? a dev can dream...), I'll point you towards a useless use in sink warning
17:09 Ven joined #perl6
17:10 nadim joined #perl6
17:10 ab6tract m: my $f = '25 25 25'; $f ~~ s:nth(*-1)[\d+] = 42; say $f
17:10 camelia rakudo-moar 268e9c: OUTPUT«WARNINGS for /tmp/2ImctGm_oI:␤Useless use of "-" in expression "*-1" in sink context (line 1)␤25 42 25␤»
17:10 ab6tract funny that it warns, since it still dwims. looks like that warning gets thrown before we compile the whatevercode ?
17:14 ab6tract .tell awwaiid this nREPL sounds very interesting indeed. i'm really thinking of a simply example for the Terminal::Print distribution that involves the repl somehow, rather than anything complex. but you are describing something quite inspirational. thanks again to hoelzro++ for making it extensible in p6!
17:14 yoleaux ab6tract: I'll pass your message to awwaiid.
17:16 Ven joined #perl6
17:17 spider-mario joined #perl6
17:20 Vlavv_ joined #perl6
17:21 awwaiid ab6tract: I have an earlier experiment, https://github.com/awwaiid/p6-lrep, which uses the nREPL middleware-model for plugins. I will be refreshing it based on some of hoelzro work (and I keep staring at their branch to see if I can contribute directly)
17:21 yoleaux 17:14Z <ab6tract> awwaiid: this nREPL sounds very interesting indeed. i'm really thinking of a simply example for the Terminal::Print distribution that involves the repl somehow, rather than anything complex. but you are describing something quite inspirational. thanks again to hoelzro++ for making it extensible in p6!
17:23 Ven joined #perl6
17:26 ab6tract awesome :D
17:29 edehont joined #perl6
17:29 leont joined #perl6
17:33 Ven joined #perl6
17:46 Ven joined #perl6
17:48 [Coke] damn. every C library I think of writing a wrapper for seems like it's already got a nativecall wrapper somewhere. :)
17:51 mst [Coke]: easy to fix. first, write a C library :)
17:57 FROGGS joined #perl6
17:57 dupa joined #perl6
17:57 buharin joined #perl6
18:02 [Coke] ah, found one that I thought was a wrapper but was pure perl. whee, I'll take that one.
18:06 ZoffixWin m: say sin 0/0;
18:06 camelia rakudo-moar 268e9c: OUTPUT«NaN␤»
18:06 RabidGravy :)
18:06 ZoffixWin :)
18:07 andreoss m: say sqrt 0/0
18:07 camelia rakudo-moar 268e9c: OUTPUT«Inf␤»
18:08 andreoss m: say 0**-1
18:08 camelia rakudo-moar 268e9c: OUTPUT«Attempt to divide 1 by zero using div␤  in block <unit> at /tmp/ZyEhY8GRFK line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ZyEhY8GRFK line 1␤␤»
18:09 andreoss in which cases it does not fail?
18:11 itaipu joined #perl6
18:11 ZoffixWin When it can check whether the argument is a NaN, I guess.
18:11 ZoffixWin m: say (0/0).isNaN
18:11 camelia rakudo-moar 268e9c: OUTPUT«False␤»
18:12 labster joined #perl6
18:14 masak m: say (0e0/0e0).isNaN
18:14 camelia rakudo-moar 268e9c: OUTPUT«Attempt to divide by zero using /␤  in block <unit> at /tmp/lUDFio8eA2 line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3050␤  in block <unit> at /tmp/lUDFio8eA2 line 1␤␤»
18:14 masak oh, for...
18:14 masak m: say NaN.isNaN
18:14 camelia rakudo-moar 268e9c: OUTPUT«True␤»
18:15 andreoss joined #perl6
18:15 ZoffixWin m: say sin NaN
18:15 camelia rakudo-moar 268e9c: OUTPUT«NaN␤»
18:16 ZoffixWin m: my $x = 0/0;␤␤␤␤; say $x
18:16 camelia rakudo-moar 268e9c: OUTPUT«Attempt to divide by zero using div␤  in block <unit> at /tmp/wpMzzyfEIQ line 5␤␤Actually thrown at:␤  in block <unit> at /tmp/wpMzzyfEIQ line 5␤␤»
18:16 ZoffixWin Kinda sucks that the "actually thrown at" line number is still the one where I attempted to use $x, not where the division is in the code.
18:17 andreoss m: my $x := 0/0 ; say $x;
18:17 camelia rakudo-moar 268e9c: OUTPUT«Attempt to divide by zero using div␤  in block <unit> at /tmp/SRCANMel39 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/SRCANMel39 line 1␤␤»
18:17 andreoss m: my $x := 0/0 ; say sin $x;
18:17 camelia rakudo-moar 268e9c: OUTPUT«NaN␤»
18:17 masak ZoffixWin: agreed. that feels wrong.
18:17 masak *sigh*
18:18 masak I like Java's compromise: division of 0/0 (integers) is an error. division of 0.0/0.0 (doubles) is NaN.
18:18 andreoss m: my $x := fail ; say 'hi'
18:18 camelia rakudo-moar 268e9c: OUTPUT«Failed␤  in block <unit> at /tmp/_6uKsaK3nc line 1␤␤»
18:20 andreoss does 0/0 fail with sin(0/0), and this failure somehow wrapped?
18:20 andreoss or it's just totally secial cased
18:20 andreoss *special
18:20 ZoffixWin andreoss, it tests for NaN
18:21 ZoffixWin andreoss, you may have missed part of this conversation: http://irclog.perlgeek.de/p​erl6/2016-03-30#i_12260943
18:21 ZoffixWin I don't know what sqrt does, but I imagine something similar.
18:22 perlpilot joined #perl6
18:23 Ven joined #perl6
18:25 andreoss m: multi foo($a where $a ~~ NaN) { "hi" } ; say foo(0/0)
18:25 andreoss
18:25 camelia rakudo-moar 268e9c: OUTPUT«Cannot call foo(<0/0>); none of these signatures match:␤    ($a where { ... })␤  in block <unit> at /tmp/tVqfJRlBDw line 1␤␤»
18:25 andreoss m: multi foo($a where $a ~~ NaN) { "hi" } ; say foo(0.0/0.0)
18:25 andreoss
18:25 camelia rakudo-moar 268e9c: OUTPUT«Cannot call foo(<0/0>); none of these signatures match:␤    ($a where { ... })␤  in block <unit> at /tmp/fGXLldfulA line 1␤␤»
18:26 andreoss m: multi foo(NaN) { "hi" } ; say foo(NaN)
18:26 andreoss
18:26 camelia rakudo-moar 268e9c: OUTPUT«hi␤»
18:26 andreoss m: multi foo(NaN) { "hi" } ; say foo(0/0)
18:26 camelia rakudo-moar 268e9c: OUTPUT«Cannot call foo(<0/0>); none of these signatures match:␤    (Num $ where { ... })␤  in block <unit> at /tmp/yGR3s1AAfo line 1␤␤»
18:26 arnsholt m: say (0.0).WHAT
18:26 camelia rakudo-moar 268e9c: OUTPUT«(Rat)␤»
18:26 arnsholt m: say (0/0).WHAT
18:26 camelia rakudo-moar 268e9c: OUTPUT«(Rat)␤»
18:27 arnsholt Huh. I thought that'd be a Failure
18:27 ZoffixWin Was say changed? I recall it was printing at most 200 or 400 elements, now it prints 100000+
18:27 andreoss m: multi foo(Rat $a) { $a == (0/0) ?? "hi" !! "bye" } ; say foo(0/0)
18:27 camelia rakudo-moar 268e9c: OUTPUT«hi␤»
18:28 andreoss m: multi foo(Rat $a) { $a ~~ NaN ?? "hi" !! "bye" } ; say foo(0/0)
18:28 camelia rakudo-moar 268e9c: OUTPUT«bye␤»
18:29 andreoss it all seems very vague
18:29 arnsholt Oh, it might be that the Rat where both numerator and denominator is 0 is fine, but it crashes when you try to stringify/gistify it
18:30 ZoffixWin m: say NaN == NaN
18:30 camelia rakudo-moar 268e9c: OUTPUT«False␤»
18:30 andreoss m: say NaN ~~ NaN
18:30 camelia rakudo-moar 268e9c: OUTPUT«True␤»
18:30 nadim what's the minimum run time requirements for rakudo? is it possible to define what subset one wants to run? and finally can one also define a small P6 subset?
18:33 ZoffixWin nm, nothing was changed, I was just `say`ing the wrong thing
18:38 Ven joined #perl6
18:38 nemo joined #perl6
18:38 masak m: say NaN === NaN
18:38 camelia rakudo-moar 268e9c: OUTPUT«True␤»
18:43 [Coke] do we have a nativecall example for varargs functions?
18:46 grondilu m: role Vector does Positional[Real] {}; my @v does Vector = "foo";  # not sure if this should fail or not
18:46 camelia rakudo-moar 268e9c: ( no output )
18:46 [Coke] yay, segv while nativecalling. :)
18:50 leont joined #perl6
18:52 lizmat masak: are you implying that NaN === NaN  should be False ?
18:52 lizmat m: say NaN == NaN   # seems correct, and === as well
18:52 camelia rakudo-moar 268e9c: OUTPUT«False␤»
18:54 [Coke] the nan stuff was settled some time ago, the current way seems right, yes
18:55 ZoffixWin I think it was just a response as another alternative to testing for NaN with a === rather than ~~
18:55 lizmat m: say NaN ~~ NaN   # just curious
18:55 camelia rakudo-moar 268e9c: OUTPUT«True␤»
18:56 [Coke] nadim: no, you can't pick and choose which parts you run, unless you use the restricted setting that camelia uses.
18:56 [Coke] figuring out what depends on what and what you can selectively load is painful.
18:56 stmuk_ https://petitions.whitehouse.gov//petition/ou​tlaw-programming-languages-threaten-safety-am​erican-people-and-work-counter-our-way-life
18:56 nightfrog joined #perl6
18:57 [Coke] jnthn et al. are working on reducing the memory & cpu usage of perl 6. if you find a particularly egregious usage problem, open a rakudobug with details.
18:58 ZoffixWin stmuk_, that's one silly way to [ab]use a government website :P
18:58 stmuk_ I'll do a UK version if you do .ca ;)
18:59 [Coke] m: say 799.is-prime
18:59 camelia rakudo-moar 268e9c: OUTPUT«False␤»
19:02 ZoffixWin m: say 31337.is-prime
19:02 camelia rakudo-moar 268e9c: OUTPUT«True␤»
19:02 ZoffixWin :)
19:04 Ven joined #perl6
19:07 dalek DBIish: 666635d | (Alexander Hartmaier)++ | t/36-pg-array.t:
19:07 dalek DBIish: fix mode of t/36-pg-array.t
19:07 dalek DBIish: review: https://github.com/perl6/DBIish/commit/666635dc93
19:21 labster joined #perl6
19:26 nadim [Coke]: That is a pity, the possibility to create a very small P6 that looks like P6 and that has limited functionality would have allowed for usage in more embedded systems.
19:27 nadim P6 is not Lua, I know, but it would have been nice to have some Micro-P6
19:28 masak you mean like nqp?
19:29 leont I don't think nqp would be an attractive subset
19:29 nadim I guess, although I know very little about NQP so I don't know if it is layered so you can use as much as you want/can
19:30 nadim Where is the restricted set, camilia uses, defined?
19:32 MadcapJake I don't understand what I'm supposed to do with this error: "This Seq has already been iterated, and its values consumed"
19:32 timotimo the restricted setting will not reduce memory footprint
19:32 lizmat nadim: src/RESTRICTED.setting
19:34 MadcapJake I tried both the suggestions (assigning to array and .cache method), still the same error
19:35 timotimo you might be looking at the wrong place
19:36 teatime MadcapJake: probably need to assign to an array *earlier*
19:37 MadcapJake Here's the snippet: « my @raw-tickets = ($body.lines[1..*]».split(': ', 2)).grep(*.elems == 2) »
19:37 MadcapJake so I tried a .cache before the .grep
19:38 MadcapJake and placing an @ before the first parenthesis
19:38 timotimo try after the subscript
19:38 nadim lizmat: thanks
19:39 lizmat MadcapJake: could you try * == 2 or { +$_ == 2 }  ?
19:40 teatime or cut off the end and make the 2nd line @raw-tickets.=grep(*.elems == 2)  ?
19:40 MadcapJake lizmat: that former worked, why is that though? xP
19:40 labster joined #perl6
19:41 lizmat m: say (42,666,1024) == 3   # MadcapJake
19:41 camelia rakudo-moar 5bd1e9: OUTPUT«True␤»
19:41 teatime ah, I think it's not actually the raw-tickets list that got consumed, but the .elems of each element of it
19:41 lizmat and .elems has an optimization that will not cache the list
19:41 MadcapJake lizmat: wow never knew that :) cool!
19:42 MadcapJake interesting
19:42 teatime it will only come up when it's a generator/lazy-list
19:42 teatime or, well, generator anyway.  I dunno the technical definition of lazy-list in perl6, so that may or may not be accurate.
19:43 timotimo just call it "Seq" or "iterator" :)
19:43 gtodd element.elems
19:44 MadcapJake Now I can't seem to get my list of tuples to work in a for loop :(
19:48 timotimo do you "-> ($a, $b) { ... }"?
19:49 ab6tract joined #perl6
19:51 * hoelzro .oO( bro, do you even unpack? )
19:52 MadcapJake timotimo: I did « -> @ ($a, $b) { ... } » and it worked, thanks!
19:56 ab6tract o/ lizmat :)
19:56 lizmat ab6tract o/
19:56 ab6tract so, braindead as I expected :)
19:56 lizmat I'm not sure iterating over the nodes wouldn't make this terribly expensive
19:56 Xliff_ Who do I need to talk to about the error in DateTime::Math?
19:56 Xliff_ ==> Testing DateTime::Math
19:56 Xliff_ Ambiguous call to 'infix:«>»'; these signatures all match:
19:56 Xliff_ :(DateTime:D \a, DateTime:D \b)
19:56 Xliff_ :(DateTime $a, DateTime $b)
19:56 Xliff_ in block <unit> at t/math.t line 27
19:56 ab6tract yeah that's what i was thinking :S
19:57 Xliff_ Since it seems that rakudo has an internal infix:«>»
19:57 ab6tract the other means of distinguishing is if the '*' is at the 0th or the last index
19:57 timotimo Xliff_: supernovus doesn't hang out here much any more, but i'd think he'd respond to issues submitten via github
19:57 ab6tract is computing the length of the $expr string a reasonably cheap operation?
19:58 Xliff_ .seen supernovus
19:58 yoleaux I saw supernovus 28 Dec 2015 18:21Z in #perl6: <supernovus> At some point I should look at rakudobrew to replace my moon script that I've been using for the last 4 years.
19:58 lizmat or perhaps checking for "*" is a good middle ground between accuracy and efficieny
19:58 lizmat ab6tract
19:58 Xliff_ I could have sworn I've seen him here and I haven't been around longer than 2 weeks.
19:58 Xliff_ OK. Github it is.
19:58 lizmat ab6tract: yes, nqp::chars is cheap
19:58 Xliff_ Thanks, timo x 2
19:58 ab6tract ok
19:59 Xliff_ Ah. Looks like the bug was already reported by ZoffixWin
19:59 Xliff_ Lessee if I have levelled up enough to suggest a fix.
20:00 timotimo yeah, long ago
20:00 lizmat Xliff_ do you have a ticket number?
20:01 Xliff_ Yah
20:01 Xliff_ timo added a comment recently.
20:01 Xliff_ https://github.com/supernovus​/perl6-datetime-math/issues/4
20:02 timotimo "recently" :)
20:02 Xliff_ For various values of "recently" yes
20:02 Xliff_ timo commented 2 minutes ago
20:03 Xliff_ It says that on the page.
20:04 timotimo yeah
20:04 perigrin joined #perl6
20:05 Xliff_ *snarl*
20:05 Xliff_ Github Desktop is not seeing my recent fork of p6-datetime-math
20:05 Xliff_ And these funky Metro-based apps are a BITCH to figure out.
20:06 Xliff_ Where is mah "refresh" control?!?! >_<
20:06 zostay joined #perl6
20:08 perlawhirl joined #perl6
20:10 ab6tract actually, it appears that the multiplication doesn't hit that rule anyway
20:10 ab6tract m: my $f = <25 25 25>; $f ~~ s:nth(1 * 3)[\d+] = 42; say $f
20:10 camelia rakudo-moar 5bd1e9: OUTPUT«25 25 42␤»
20:10 cdg joined #perl6
20:10 abraxxa joined #perl6
20:10 ab6tract whereas with my patch this still warns:
20:10 Xliff_ m: say DateTime.now() - 1
20:10 camelia rakudo-moar 5bd1e9: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/QZ0lWGoU5T line 1␤␤»
20:10 ab6tract m: my $f = <25 25 25>; $f ~~ s:nth(1 * 3)[\d+] = 42; say $f
20:10 camelia rakudo-moar 5bd1e9: OUTPUT«25 25 42␤»
20:10 ab6tract m: my $f = <25 25 25>; $f ~~ s:nth(1 * *)[\d+] = 42; say $f
20:10 camelia rakudo-moar 5bd1e9: OUTPUT«WARNINGS for /tmp/1bL2r76S8J:␤Useless use of "*" in expression "1 * *" in sink context (line 1)␤25 25 42␤»
20:11 Xliff_ m: say DateTime.now() - DateTime.now().later(:1day)
20:11 camelia rakudo-moar 5bd1e9: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/yNb_WmWJ1_ line 1␤␤»
20:11 Xliff_ m: say DateTime.now() < DateTime.now().later(:1day)
20:11 camelia rakudo-moar 5bd1e9: OUTPUT«True␤»
20:11 Xliff_ m: say DateTime.now() > DateTime.now().later(:1day)
20:11 camelia rakudo-moar 5bd1e9: OUTPUT«False␤»
20:12 Xliff_ m: say DateTime.now() = DateTime.now().later(:1day)
20:12 camelia rakudo-moar 5bd1e9: OUTPUT«Cannot modify an immutable DateTime␤  in block <unit> at /tmp/w1LW4w7rUR line 1␤␤»
20:12 Xliff_ m: say DateTime.now() == DateTime.now().later(:1day)
20:12 camelia rakudo-moar 5bd1e9: OUTPUT«False␤»
20:12 Xliff_ m: say DateTime.now() + DateTime.now().later(:1day)
20:12 camelia rakudo-moar 5bd1e9: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/C03J07E4tB line 1␤␤»
20:12 Xliff_ OK, so the comparison operators exist, but not the arithmetic ones
20:13 Xliff_ m: say DateTime.now() cmp DateTime.now().later(:1day)
20:13 camelia rakudo-moar 5bd1e9: OUTPUT«Less␤»
20:16 masak m: say Less cmp More
20:16 camelia rakudo-moar 5bd1e9: OUTPUT«Less␤»
20:16 masak figures.
20:16 masak m: say More cmp More
20:16 camelia rakudo-moar 5bd1e9: OUTPUT«Same␤»
20:16 masak well, yeah.
20:16 masak m: say Same cmp More
20:16 camelia rakudo-moar 5bd1e9: OUTPUT«Less␤»
20:16 masak I, uh.
20:17 geekosaur ?
20:18 edehont joined #perl6
20:19 masak ¿
20:19 Xliff_ Strikethrough is ___x___ for .md files, right?
20:19 masak Xliff_: I don't think strikethrough has dedicated syntax
20:20 masak Xliff_: but <s>...</s> works: https://gist.github.com/masak/c​f081910908c758e9fa3b57ab4aa598e
20:20 masak (usual caveats about inline HTML in Markdown apply)
20:21 Xliff_ masak: Markdown says ~~xxx~~
20:21 Xliff_ https://github.com/adam-p/markdo​wn-here/wiki/Markdown-Cheatsheet
20:21 ab6tract lizmat: left another note on the github. tl;dr -- the case of multiple '*' in an expression make the check probably more expensive than its worth
20:22 nadim joined #perl6
20:22 lizmat ab6tract: so maybe the simple does it have "*" is the right tradeoff after all
20:22 lizmat I mean, it's just a warning that may be too persistent
20:23 masak Xliff_: yeah, seems to work in gists too.
20:25 abraxxa joined #perl6
20:27 Xliff_ OK. Next annoying question. How do I run .t files?
20:27 tony-o perl6 -Ilib t/*
20:27 abraxxa joined #perl6
20:27 Xliff_ Thanks.
20:27 Skarsnik joined #perl6
20:28 tony-o if you want to run it as a test suite, you can use p5's prove: prove -e 'perl6 -Ilib' t/
20:28 tony-o or, you can use 'flow' which is pp6 and i'm shamelessly plugging rn
20:28 abraxxa sortiz: ping
20:29 dfcarpenterak joined #perl6
20:29 masak the `perl6 -Ilib t/*` line doesn't do what you think it does
20:29 sue joined #perl6
20:29 timotimo that's right
20:29 Xliff_ Sweet! DateTime::Math tests pass if I remove the comparator operators, since rakudo has them internally.
20:29 ab6tract m:  my $f = <25 25 25>; $f ~~ s:nth(1 ** 1)[\d+] = 42; say $f
20:29 camelia rakudo-moar 5bd1e9: OUTPUT«42 25 25␤»
20:29 masak it takes the n .t files in your t/ directory, and passes the last n-1 to the first
20:29 masak as command-line arguments
20:29 ab6tract lizmat: if you can think of another corner case, I think we are good :)
20:30 tony-o masak: thanks for the correction, i made the assumption he'd substitute * with an actual file name
20:30 tony-o which is a stretch -
20:30 masak again, blame shell interpolation, which couldn't care less about whether something is a script to run or an argument to that script
20:30 ab6tract it seems that the optimizer has already chewed through the infix ops by this point
20:30 Xliff_ tony-o, don't assume I'm as smart as you, dude. ^_^
20:31 Xliff_ Although the output is the same with "*" and with filename.
20:31 ab6tract masak: I will take that as a call for a p6sh
20:31 ab6tract :D
20:31 Xliff_ ab6tract, I would love a p6sh
20:32 tony-o p6vim
20:32 tony-o :w
20:32 ab6tract Xliff_: its an idea that has been calling from the depths for a long time
20:33 pierrot joined #perl6
20:35 ab6tract not something to run as a login shell, though. I've learned via fish that the trade off just isn't worth it. You can configure tmux to launch with the shell of your choosing anyway
20:36 dalek DBIish: 8133448 | (Alexander Hartmaier)++ | lib/DBDish/Connection.pm6:
20:36 dalek DBIish: fix wording
20:36 dalek DBIish: review: https://github.com/perl6/DBIish/commit/81334489e9
20:36 ab6tract also I'm lazy and making it a proper login shell sounds boring as all get out
20:36 Xliff_ .LOL
20:37 Xliff_ Maybe I will do it as a PR.
20:37 Xliff_ I am a ways from that level, tho.
20:37 timotimo ipython is a good thing to look at with regards to making a language shell-usable
20:37 espadrine joined #perl6
20:38 ab6tract Xliff_: so is p6sh ;)
20:38 sufrostico joined #perl6
20:42 ZoffixWin Hm, just done a trial run for my 1-hour long talk and it took me 1h40m to do it, without taking any questions :o http://tpm2016.zoffix.com/
20:43 Xliff_ https://github.com/supernovu​s/perl6-datetime-math/pull/5
20:43 yqt joined #perl6
20:44 ZoffixWin Xliff_, unless someone here has perms to merge that, I suggest you try to contact supernovus, as in the past they said they don't check GitHub notifications too often.
20:44 Xliff_ Now. Next annoying question: How do I get perl6 to use my DateTime::Math instead of the on in git?
20:45 ZoffixWin Xliff_, if it's implemented, you could try the :auth<blah> adverb
20:45 Xliff_ ZoffixWin, if I find his email, I will do so. Thanks.
20:45 ZoffixWin I guess you can just run     panda --force install .    in the local copy directory
20:46 [Coke] Who were the folks here that were working on music-related p6 projects (other than colomon?)
20:47 ZoffixWin RabidGravy with the radio stuff?
20:49 timotimo ohmygosh, we know your realname now
20:49 ZoffixWin :P
20:49 ingy seen moritz
20:50 [Coke] .seen moritz
20:50 yoleaux I saw moritz 14:58Z in #perl6: <moritz> m: say 'filter'.chars - 'grep'.chars
20:50 [Coke] hio, ingy
20:50 ingy hi
20:50 tony-o ih
20:51 Xliff_ ZoffixWin, aaaand all of the DateTime::* modules I was planning to use are in. Thank you, sir.
20:51 Xliff_ timotimo, whose real name?
20:52 timotimo doesn't matter :)
20:52 Xliff_ Seriously... you couldn't guess mine from the nick?
20:52 Xliff_ :P
20:52 timotimo your name is clearly Axel Ifoley
20:52 Xliff_ LOL
20:52 Xliff_ timotimo++
20:53 ZoffixWin Xliff_, awhile back I was screaming in here to use 'Zoffix Znet' for my name in some of blogs... But timotimo spotted that on the talk I linked to, I actually use something else and indicate Zoffix Znet is just a pseudonym :)
20:53 RabidGravy Actually, all but one of the Audio::* modules on the ecosystem I wrote
20:53 Xliff_ ZoffixWin, oooo I c
20:53 timotimo ZoffixWin: in your big prime/small prime/$num, the parameter name $num is a bit of a lie, because it isn't necessarily a num :)
20:54 timotimo but i suppose that's fine
20:54 ZoffixWin timotimo, is it a Str?
20:55 ZoffixWin Ah, IntStr
20:56 timotimo well, if you pass "blah", it won't be an IntStr
20:56 timotimo it could also be a RatStr or a ComplexStr maybe?
20:56 ZoffixWin Yeah.
20:56 nadim Match don't have a real identity, is tat by design?
20:56 ZoffixWin And NumStr
20:57 Xliff_ Hrm.
20:57 timotimo you're showing .hyper and .race even though those are currently extremely buggy?
20:58 Xliff_ I still need to submit my Match infix:<eqv> suggestion as a PR.
20:58 jnthn ZoffixWin: `Trangle Reduce` => Triangle
20:58 jnthn timotimo: Hey, if they work for his example ;)
20:58 timotimo well ... :)
20:58 jnthn Talks hang around online for quite a while, though, and those are really high on my list of things to fix. :)
20:58 timotimo also, are we figthing the interpretation that junction "autothreading" means "automatically execute on multiple threads"?
21:00 ZoffixWin timotimo, I advertise them as "**a hint** to use multi threads"
21:00 ZoffixWin timotimo, and yeah, I'm gonna show them and just mention that they're buggy
21:00 timotimo ok
21:00 ZoffixWin Or that the hints to use multi threads currently won't ever get taken
21:01 timotimo ugh, one of those code thingies has a scrollbar even though there's lots of space above and below where it could expand :(
21:01 timotimo the Channels slide
21:03 jnthn ZoffixWin: I glanced through it quickly; nice work!
21:03 timotimo "Model6"?
21:04 ZoffixWin Great. Thanks :) And thanks for spotting the typo
21:04 timotimo it's called 6model :P
21:04 ZoffixWin Ah lol
21:04 jnthn Yeah, and I'd just talk about it as the Perl 6 Object Model
21:04 jnthn 6model is kinda an implementation detail
21:04 ZoffixWin Alright.
21:04 tony-o leont: i'm in here too re:github issue on TAP::Harness
21:05 timotimo jnthn can probably tell us why the A.^compose can be left out without running into trouble immediately
21:06 leont tony-o: more information is welcome :-)
21:06 tony-o leont: i'm running into that issue mentioned only when I attempt to run prove6 to test a module
21:06 leont With all modules?
21:06 tony-o yes sir
21:08 sufrostico joined #perl6
21:08 leont You're up-to-date I assume?
21:08 tony-o yes
21:08 timotimo ZoffixWin: i do believe you can also subclass perl6 classes from perl5, but that might be wrong
21:09 JRaspass joined #perl6
21:11 * leont tries to reproduce from an installed prove6 (couldn't reproduce from an uninstalled one)
21:11 JRaspass hey all, quick q, can you do non destructive substitution in p6?
21:11 MadcapJake how would i split a string into 80 char lines?
21:11 timotimo ZoffixWin: good slides!
21:11 leont That is, if panda ever finishes installing…
21:11 MadcapJake $s.split(/. ** ^80/) doesn't seem to work
21:11 leont (installing TAP::Harness)
21:12 timotimo JRaspass: yeah, there's the S/../../ and s/.../.../ variants, one of them destroys, the other doesn't :)
21:12 JRaspass ah
21:12 JRaspass i just tried r, then quickly scanned the docs
21:12 JRaspass thanks
21:12 leont I think it hangs, WTF
21:13 ZoffixWin thanks
21:14 sortiz \o #perl6
21:14 masak JRaspass: also, .subst(/.../, "...") is non-destructive by default
21:14 leont Been using a full CPU for several minutes now, killed it in the end, WTF
21:14 JRaspass ta
21:15 JRaspass so should this not work? i dont really grok the error
21:15 JRaspass p6: say "foo" ~~ S:g/foo/bar/
21:15 camelia rakudo-moar 5bd1e9: OUTPUT«Potential difficulties:␤    Smartmatch with S/// can never succeed because the string it returns will fail to match. You can use given instead of ~~.␤    at /tmp/tmpfile:1␤    ------> 3say "foo" ~~ 7⏏5S:g/foo/bar/␤False␤»
21:15 JRaspass obv global isnt needed
21:16 geekosaur JRaspass, the point is that S: does the substitution and then ~~ matches against the *result*
21:16 geekosaur it's not like perl 5 where ~~ just specifies an alternative to $_
21:16 geekosaur er S///
21:17 JRaspass i think i see, ill do more playing, but thanks. im too used to p5
21:17 geekosaur that behavior is what "given" does, which is why the warning message suggests it
21:18 JRaspass i shall read those docs then
21:18 leont tony-o: can't reproduce…
21:18 geekosaur (The error message is admittedly a bit confusing, but I don't think it's possible to make it much better without making it longer than your program probably is :)
21:20 leont Do you have a specific dist that fails (preferably without deps) for me to try?
21:25 znpy joined #perl6
21:27 tony-o leont: Bailador fails consistently for me
21:27 MadcapJake why does this: « my @text = gather { loop (my $i = 0; $i < $body.elems; $i += 80) { take $body[$i..$i+79].join('') } } » give me a ton of "Use of Nil in string context"
21:28 ZoffixWin MadcapJake, you're looping past what's available in body
21:28 MadcapJake ohh
21:28 ZoffixWin $i -= 80
21:29 MadcapJake -=? why
21:29 perlawhirl joined #perl6
21:29 ZoffixWin .oO( maybe .rotor: -79 would do the trick? )
21:29 masak 'night, #perl6
21:29 perlpilot MadcapJake: that looks like you really want to use rotor()
21:29 tony-o or *-1
21:29 geekosaur I don't think -= is the answer there. the problem is that the last chunk can have up to 79 nonexistent elements?
21:30 ZoffixWin MadcapJake, oh, wait, nevermind. I misread that loop. But the point still stands :) it should be $body.elems - 79
21:30 perlpilot MadcapJake: also, you could change your loop to be ... what ZoffixWin said
21:30 leont tony-o: does it install prove6 correctly? For me it seems it doesn't :-s
21:30 ZoffixWin (or .rotor)
21:30 * perlpilot either needs to read faster, type faster, or think faster
21:30 perlpilot maybe all three
21:31 leont No wait, I was looking in the wrong place (forgot site), it really should be in .rakudobrew/bin though
21:31 ZoffixWin m: ^10 .rotor( 4 => -3).>>.join.say
21:31 camelia rakudo-moar 5bd1e9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PN44eVpKyR␤Malformed postfix call␤at /tmp/PN44eVpKyR:1␤------> 3^10 .rotor( 4 => -3).7⏏5>>.join.say␤»
21:31 ZoffixWin wat
21:31 perlpilot MadcapJake: any kind of sliding window thing will make me reach for rotor in P6
21:31 timotimo rotor is one of the best things ever
21:31 ZoffixWin m: ^10 .rotor( 4 => -3).map(*.join).say
21:31 camelia rakudo-moar 5bd1e9: OUTPUT«(0123 1234 2345 3456 4567 5678 6789)␤»
21:32 ZoffixWin MadcapJake, ^ somethign like that maybe. Not sure why the hypered version isn't working.
21:32 spintronic joined #perl6
21:32 * ZoffixWin &
21:32 MadcapJake I actually went and used grep :D
21:33 perlawhirl MadcapJake: i saw your discussion about grep earlier
21:33 MadcapJake hehe
21:33 perlawhirl even as someone who is familiar with grep, i have been thinking about the same thin
21:33 perlawhirl MadcapJake: see https://gist.github.com/0r​acle/ea0523759e2da15758d4
21:33 perlawhirl it's a language design proposal/pipe dream :D
21:34 leont This thing is getting weirder and weirder :-s
21:35 * perlpilot would add filter as an alias for grep.
21:35 MadcapJake perlawhirl++ I think that's a great proposal!
21:35 perlpilot (filter is what many other languages use for the same concept)
21:35 teatime mreah... it'd be the very first thing I've seen in p6 w/ an alias identical to another feature/method.
21:35 teatime not sure it's worth it.
21:35 geekosaur my problem with filter remains the same: some languages mean filter-and-select, others mean filter-out
21:36 AlexDaniel joined #perl6
21:36 geekosaur so I always have to look up which one it is in the language I'm working with
21:36 teatime heh, grep could have been called .where :)
21:36 perlpilot geekosaur: that's a very good point.
21:36 MadcapJake perlawhirl: I agree with geekosaur on this, filter has some baggage :P
21:36 ugexe they are there. .abspath/.absolute
21:36 TEttinger joined #perl6
21:36 perlawhirl MadcapJake: thanks, you're the first one to tell me it's a good idea. i really like it, but people are resistant to change :D
21:36 MadcapJake teatime: but as perlawhirl points out, it's quite similar in use
21:37 awwaiid I love that the proposal comes with a module to use it
21:37 teatime hmm?
21:37 perlpilot perlawhirl: people *here* are resistant to change?  Surely you jest!  ;)
21:37 perlawhirl i literally wrote the module only a couple days ago. i learned how to augment classes along the way... yay!
21:37 awwaiid nice!
21:38 geekosaur I am not sure how confusing the multiple uses of "where" would be, but I think we already have a few things like that?
21:38 * lizmat wonders whether "proto method where(|c) { self.grep(|c) }" wouldn't be enough ?
21:38 tony-o leont: yea prove6 gets installed correctly but i have experienced it hanging
21:38 perlawhirl lizmat: I am new to this augmenting thing, so any improvements/suggesstions are welcome
21:38 awwaiid One of the things I've always loved about Perl5 has been this sort of mallability, so that even if it isn't accepted into the core it can be used.
21:38 tony-o leont: i'm also using zef to install
21:39 awwaiid (and other dynamic langs)
21:40 MadcapJake where would a submission like perlawhirl's go to be considered for core?
21:40 awwaiid perlawhirl: the |c is the magic lizmat is highlighting, it slurps all the arguments. maybe you wouldn't have to special-case the different types of args
21:40 MadcapJake I really think that's great and as outlined, it's not as if there isn't a precedent of multiple names (heck even the unicode/texas-style is a similar principle)
21:40 perlpilot perlawhirl++ btw.  Short of getting concensus among the Perl 6 devs that it just be added to the language, having a module make it easier for it to be used and proofed in the wild.
21:41 perlawhirl lizmat: awwaiid: the additional multi is mainly so failures report it came from '.where' instead of '.grep'
21:43 lizmat fwiw, I like the idea of "where" instead of "grep"
21:43 perlawhirl lizmat++ thanks =)
21:44 perlawhirl as far as i'm aware, 'where' is not used anywhere else other than defining subsets, so i don't think there should be any clash
21:45 geekosaur in terms of the language there isn't. in terms of cognitive load I'm a little worried
21:45 hoelzro perlawhirl: signatures, but that could be considered a...umm, subset...of subsets
21:45 lizmat I hope TimToady will also shine his light on this
21:45 geekosaur but the more I think about it, the more I think "grep" is a downright lousy name and should go away
21:46 tony-o leont: getting dinner and going back to the hotel, bbiab
21:47 RabidGravy please all feel free to build a time machine and alter the software that uses .grep
21:48 Xliff_ grep() is here to stay. It has too much history and there is too much baggage to get rid of it entirely.
21:48 Xliff_ I love perlawhirl's where.
21:48 geekosaur well. not really saying it should be removed. flagged as deprecated for new code
21:48 Xliff_ perlawhirl++
21:48 Xliff_ perlawhirl, you should probably put this into the ecosystem.
21:48 hoelzro I am used to grep from Perl 5, and I really like the idea of .wehre
21:48 hoelzro *where
21:48 geekosaur I know just removing it outright is not viable, but it should not be recommended practice
21:49 Xliff_ geekosaur, you would get significant feedback for even suggesting deprecation.
21:49 RabidGravy it's used 36 times in 14 of my modules fwiw
21:49 Xliff_ s/feedback/negative feedback/
21:49 lizmat fwiw, I think .grep should be a synonnym for .where, not the other way around  :-)
21:49 geekosaur ^ yes
21:49 lizmat but for now, I'll sleep on it a bit more...
21:49 Xliff_ lizmat: split hairs much?! ^_^
21:49 ugexe i needs to be 3 letters long so it aligns better with map when you chain them on multiple lines >:(
21:50 lizmat so good night, #perl6!
21:50 Xliff_ ugexe++ LOL
21:50 lizmat ugexe:  .whr   :-)
21:50 Xliff_ I am so for pretty code.
21:50 lizmat &
21:50 timotimo grp
21:50 timotimo well, that could also be for "group"
21:51 Xliff_ lizmat, so does that mean that "perlawhirl" becomes "prl a wrl"?
21:51 Xliff_ timotimo, no... everyone knoes that "group" would become "gro"
21:51 Xliff_ We are no longer bound by our unix roots.
21:56 perlawhirl joined #perl6
21:56 perlawhirl lost signal for a bit there (i'm on a train)
21:56 MadcapJake hmm this line splitter doesn't work very well...cuts words and seems to gobble up any existing newlines
21:56 perlawhirl Xliff: i will start looking into adding it to the ecosystem today
21:57 teatime MadcapJake: there is zero reason to use a regex to split on 80-char boundaries.
21:57 * Xliff_ forks nom
21:57 MadcapJake teatime: I'm not, I'm turning to array and splitting with an ugly old loop :P
21:57 Xliff_ lizmat, so does that mean that "perlawhirl" becomes "prl a wrl"?
21:57 geekosaur we don't use KSR33s any more, no need to stick to short names
21:57 Xliff_ s/lizmat/perlawhirl/
21:58 perlawhirl tbh, it's really one of those ideas i WISHED i'd thought of before xmas :(
21:58 * teatime proposes renaming unshift to ushift
21:58 * Xliff_ doesn't see what losing the "n" gains.
21:58 Xliff_ teatime, did "n" beat you as a child? ^_^
21:58 teatime Xliff_: conceptual consistency w/ things people are already familiar with (umount)
21:59 * teatime goes off to write a proposal.
21:59 perlawhirl teatime is probably a unix guy, eg umount
21:59 perlawhirl ahh, he just said it
21:59 teatime perlawhirl++
21:59 Xliff_ I'm a unix guy and I still grok "unshift"
21:59 teatime Xliff_: it's a joke, son.
21:59 Xliff_ teatime, I know. And I am joking right back in the same vein.
21:59 teatime about how ridiculous umount is  (and yes, I know how the name originated)
22:00 Xliff_ teatime, O! Then we are in agreement.
22:00 MadcapJake so wrapping text is hard, I think I'm just gonna require users to do is by hand if they want :P
22:00 Peter_R joined #perl6
22:00 teatime MadcapJake: lol.  launch $EDITOR :)
22:00 Xliff_ teatime, Seriously! In my mind I am always saying "unmount" but the fingers have adjusted to removing the "n".
22:00 Xliff_ It only happens at the command prompt, thougn.
22:01 saaki perlawhirl++
22:01 Xliff_ My mind has trained itself to do a magical "import unixisms" if it sees "#"
22:01 teatime I say "you mount" but I never enjoy having to tell someone the command out-loud.
22:01 MadcapJake teatime: it's not CLI it's a webapp :)
22:01 Xliff_ teatime, LOL
22:01 teatime MadcapJake: ahh, that could be hard tehn, I suppose :)
22:01 frew joined #perl6
22:02 Xliff_ So, does anyone want to comment on https://gist.github.com/Xliff/2907106c84e9eb14d4c0 before I start the PR process?
22:03 plk joined #perl6
22:03 sufrostico joined #perl6
22:04 hoelzro Xliff_: you could do ?all($a.to eqv $b.to, $a.from eqv $b.from, ... etc) instead of the ands, but seems legit
22:10 Sgeo joined #perl6
22:11 autarch joined #perl6
22:12 kid51 joined #perl6
22:16 jamesalbert joined #perl6
22:16 Xliff_ hoelzro, is there a performance improvement using that method?
22:17 hoelzro Xliff_: it's just a personal preference of mine for readability
22:17 Xliff_ I think it's already fairly readable.
22:17 Xliff_ The ?all() syntax is a little new to me.
22:18 hoelzro I'm not saying it's not readable, I just prefer all() =)
22:18 itaipu joined #perl6
22:19 jamesalbert yo I'm writing tests for a module I wrote. In each test, I want to import from a common Util.pm6 file. In Util.pm6 I want to import from my module. However, I can't do that because I `use lib '.'` to import t::Util, but I can't `use lib 'lib'` inside my Util package (it gives an error saying so). Can I do what I'm trying to do or is there a perl6ish way of doing this?
22:21 timotimo hoelzro: using ?all is probably super slow. i'd suggest [&&] instead
22:21 hoelzro ah, good idea
22:21 skids joined #perl6
22:22 Skarsnik jamesalbert, just pass -I lib to perl6 when running a test
22:22 Xliff_ timotimo, Isn't that what I'm doing?
22:23 jamesalbert thanks Skarsnik!
22:23 hoelzro Xliff_: timotimo means [&&] ($a, $b, $c, $d) instead of $a && $b && $c && $d
22:24 Xliff_ Yikes!
22:24 Xliff_ I didn't know that.
22:24 * Xliff_ tests
22:27 Xliff_ Nice! Thanks.
22:28 znpy joined #perl6
22:28 Xliff_ OK. Implementation now uses [&&]. Thanks for the suggestion
22:32 Xliff_ OK. gist updated.
22:32 Xliff_ I will probably create the PR sometime tonight.
22:57 tardisx joined #perl6
22:58 perlawhirl joined #perl6
23:02 BenGoldberg joined #perl6
23:04 DarthGandalf joined #perl6
23:25 Xliff_ \o/
23:25 Xliff_ http://www.theverge.com/2016/3/30/11331014/m​icrosoft-windows-linux-ubuntu-bash#comments
23:25 Xliff_ Microsoft is adding Ubuntu to Windows
23:25 Xliff_ WTF?
23:27 BenGoldberg joined #perl6
23:27 sufrostico joined #perl6
23:34 Hotkeys Xliff_: whaaaat
23:34 Hotkeys I might actually have to upgrade to W10
23:41 jack_rabbit joined #perl6
23:45 cdg joined #perl6
23:46 kmwallio I think it's shipping in the next Windows Insider builds
23:46 kmwallio https://insider.windows.com/
23:52 sortiz .tell abraxxa Changes that only touch DBDish/Oracle* can be pushed directly to master
23:52 yoleaux sortiz: I'll pass your message to abraxxa.
23:54 emdashcomma joined #perl6

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

Perl 6 | Reference Documentation | Rakudo