Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-31

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:08 tardisx joined #perl6
00:27 sufrostico joined #perl6
00:36 sufrostico joined #perl6
00:37 vytas joined #perl6
00:44 Sgeo_ joined #perl6
00:48 Sgeo__ joined #perl6
00:49 dfcarpenterak joined #perl6
01:09 itaipu joined #perl6
01:15 telex joined #perl6
01:18 perlawhirl who's awake
01:21 tardisx joined #perl6
01:24 Actualeyes joined #perl6
01:25 sortiz perlawhirl, I'm o/
01:26 geekosaur fsvo "awake"
01:26 perlawhirl sortiz: this is not explicitly a perl question, but git. specifically making pull request to the ecosystem
01:26 perlawhirl do i need to fork the ecosystem repo to make a PR
01:27 perlawhirl I'm relatively green to this git stuff
01:27 geekosaur yes. you fork it, make your change(s), and make the pull request from that
01:28 perlawhirl righto
01:29 sortiz Not necessarily an explicit fork. If you change only a file, you can edit it on github, that make the dance.
01:30 sortiz Util for example when you are changing META.list
01:32 perlawhirl actually, it looks like the last commit is wrong, there's a leading "i" on the last added module in META.list
01:32 perlawhirl or is that some hackery for newly added module?
01:32 sortiz Let me see...
01:33 sortiz Indeed, seems a bug, changing that...
01:35 Xliff_ Hotkeys, if I didn't hate the fscking Metro look so much, I would be right there with you.
01:35 dalek ecosystem: 9334cbe | (Salvador Ortiz)++ | META.list:
01:35 dalek ecosystem: Update META.list
01:35 dalek ecosystem:
01:35 dalek ecosystem: Remove trailing 'i' in P6-Text-Template entry.
01:35 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/9334cbe221
01:35 Xliff_ Read somewhere that some dude thought that Templates were just another form of spaghetti code.
01:36 Xliff_ While yes, some Templates can look god awful (depending on the complexity of the intended output), I find MVC a better design pattern than anything else.
01:36 Xliff_ I don't care if it "compiles" to something unreadable. I just don't want to maintain it.
01:37 sortiz perlawhirl++ # For the report.
01:37 Xliff_ http://www.workingsoftware.com.au/page/Your_​templating_engine_sucks_and_everything_you_h​ave_ever_written_is_spaghetti_code_yes_you
01:39 sortiz Xliff_, To me the main issue with *some* template engines is that pretend to do too much, and the template ceases to be declarative, to become procedural. :)
01:39 Xliff_ sortiz, perl5 Template Toolkit, maybe?
01:40 Xliff_ In the case where the template engine offers too much. Remember: Just because you can doesn't mean you have to.
01:41 perlawhirl sortiz: leading, not trailing... but who cares :D
01:41 Xliff_ perlawhirl, o/
01:41 Xliff_ prl a wrl
01:41 perlawhirl haha... about to add a pr to the ecosystem
01:42 perlawhirl it lives: https://github.com/0racle/p6-wig
01:42 Xliff_ W00 h00~!
01:46 Xliff_ perlawhirl++
01:46 sortiz Yes, but the if an abstraction barrier can be trivially bypassed is bad design.
01:46 sortiz leading, yep :D
01:46 sortiz imo a good template engine should offer you a good *macro* system, not a new programming language.
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:51 dalek ecosystem: 3795dba | 0racle++ | META.list:
01:51 dalek ecosystem: Add wig to ecosystem
01:51 dalek ecosystem:
01:51 dalek ecosystem: See https://github.com/0racle/p6-wig
01:51 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/3795dba45e
01:51 dalek ecosystem: 99aea7f | (Salvador Ortiz)++ | META.list:
01:51 dalek ecosystem: Merge pull request #183 from 0racle/patch-1
01:51 dalek ecosystem:
01:51 dalek ecosystem: Add wig to ecosystem
01:51 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/99aea7f124
02:01 perlawhirl sortiz: there was an error in the url of my PR :(
02:03 sortiz perlawhirl, what is the correct one?
02:04 perlawhirl https://raw.githubusercontent.com​/0racle/p6-wig/master/META6.json
02:04 labster joined #perl6
02:04 perlawhirl there was a '.git' after the module name before
02:04 perlawhirl so the url was invalid
02:05 dalek ecosystem: fbb91a5 | 0racle++ | META.list:
02:05 dalek ecosystem: Add wig to ecosystem
02:05 dalek ecosystem:
02:05 dalek ecosystem: See https://github.com/0racle/p6-wig
02:05 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/fbb91a59fc
02:05 dalek ecosystem: 9db9800 | (Salvador Ortiz)++ | META.list:
02:05 dalek ecosystem: Merge pull request #184 from 0racle/patch-2
02:05 dalek ecosystem:
02:05 dalek ecosystem: Fix wig URL
02:05 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/9db98005b6
02:06 perlawhirl sortiz++
02:06 sortiz Now you can remove your branches.
02:10 BenGoldberg joined #perl6
02:14 tardisx joined #perl6
02:16 perlawhirl oh, hrm...
02:16 perlawhirl oh, you mean the forked repos i now have?
02:21 sortiz Yep.
02:25 perlawhirl ok done
02:26 sortiz All ready :)
02:45 ZoffixWin m: subset Foo of Int where { $_ > 10_000 or warn "You need a number more than 10,000" };␤␤␤␤my Foo $x = 42;
02:45 camelia rakudo-moar ae3a79: OUTPUT«You need a number more than 10,000  in block  at /tmp/7G_HLCRktW line 1␤Type check failed in assignment to $x; expected Foo but got Int (42)␤  in block <unit> at /tmp/7G_HLCRktW line 5␤␤»
02:45 noganex joined #perl6
02:46 ZoffixWin Is there a way to make this a better error message? I could live with at least the "more than 10,000" line number being line 5; but if that Type check failed message could also be removed (and changed into the "more than 10,000") that would be great.
02:52 ZoffixWin m: subset Foo of Int where { $_ > 10_000 or fail "You need a number more than 10,000 on line {(callframe 4).line}" };␤␤␤␤my Foo $x = 42;
02:52 camelia rakudo-moar ae3a79: OUTPUT«You need a number more than 10,000 on line 5␤  in block <unit> at /tmp/NdbPQyk3Bi line 1␤␤»
02:52 ZoffixWin ¯\_(ツ)_/¯
02:54 AlexDaniel m: subset Foo of Int where { $_ > 10_000 or fail "You need a number more than 10,000 but you passed $_ on line {(callframe 4).line}" }; my Foo $x = 42;
02:54 camelia rakudo-moar ae3a79: OUTPUT«You need a number more than 10,000 but you passed 42 on line 1␤  in block <unit> at /tmp/uPvYWlvgr3 line 1␤␤»
02:54 AlexDaniel ZoffixWin: that's a very important bit :)
02:55 ZoffixWin AlexDaniel++
03:01 ZoffixWin m: subset Foo of Int where * > 10_000;  try { my Foo $x = 10; CATCH { fail "That value does not match the subset" } }; say "That value did match the subset"
03:01 camelia rakudo-moar ae3a79: OUTPUT«That value does not match the subset␤  in block  at /tmp/DcnZUWk_xA line 1␤  in block <unit> at /tmp/DcnZUWk_xA line 1␤␤»
03:01 ZoffixWin This feels a bit like a hack... is there a better way to check whether the value can be used for a type (a subset in particular)?
03:02 RandalSchwartz joined #perl6
03:02 RandalSchwartz tommy is giving a perl6 talk
03:03 RandalSchwartz a question he couldn't answer:
03:03 RandalSchwartz are instance methods and class methods sharing the same namespace?
03:03 RandalSchwartz or is there a way to say "this foo method is for instances" vs "this foo method is for class"?
03:04 RandalSchwartz or if they share, what can I test inside the method to go either way?
03:04 ZoffixWin m: class Foo { method bar { self.DEFINITE ?? 'instance' !! 'class' } }; say Foo.bar; say Foo.new.bar
03:04 camelia rakudo-moar ae3a79: OUTPUT«class␤instance␤»
03:04 ZoffixWin This is possible. Unsure about whether it's shared.
03:05 RandalSchwartz ahh ok
03:07 RandalSchwartz passed that along to tommy
03:07 RandalSchwartz thanks
03:08 Xliff_ Wonder how difficult it would be to add perl 6 support to HexChat.... Hmmm....
03:08 ZoffixWin There's Inline::Perl6 in P5 :)
03:09 Xliff_ ZoffixWin, well, I'd have to be sure that the P5 module in HexChat could handle that.
03:10 Ben_Goldberg joined #perl6
03:12 Xliff_ ZoffixWin, so does Inline::Perl6 convert P6 code to P5, then?
03:12 Juerd RandalSchwartz: The same method is used as a class method an as an instance method. The signature can specify that the invocant must be undefined (type object => class method) or defined (not a type object => instance method)
03:13 ZoffixWin Xliff_, I've never used it, but from the docs, I see "This module embeds a MoarVM based Rakudo Perl 6 and allows you to run Perl 6 code, load Perl 6 modules, use methods of Perl 6 objects and much more.": https://metacpan.org/pod/Inline::Perl6
03:13 Xliff_ Ah. OK... so it includes XS code.
03:14 Xliff_ That might be tricky on a Windows system.
03:14 Xliff_ Although I -could- run it in a VM and export to the desktop via X-Ming.... hmmmmm....,
03:15 Juerd RandalSchwartz: class Example { method cm (Example:U: $arg1, $arg2) { ... }; method im (Example:D: $arg1, $arg2) { ... } }
03:16 Xliff_ ZoffixWin, thanks for the input.
03:16 Juerd RandalSchwartz: If you want a class method and instance method to have the same name, 'multi' can be used as such:
03:17 Juerd m: class Example { multi method m (Example:U:) { say "class method" }; multi method m (Example:D:) { say "instance method" } }; Example.m; Example.new.m;
03:17 camelia rakudo-moar ae3a79: OUTPUT«class method␤instance method␤»
03:18 Juerd RandalSchwartz: If you're not using a multi method, you can determine whether it was called as a class or instance method, simply using 'defined', like:
03:19 Juerd m: class Example { method m { say .defined ?? "instance method" !! "class method" } }
03:19 camelia rakudo-moar ae3a79: ( no output )
03:19 Juerd m: class Example { method m { say .defined ?? "instance method" !! "class method" } }; Example.m; Example.new.m
03:19 camelia rakudo-moar ae3a79: OUTPUT«class method␤class method␤»
03:19 Juerd Hm.
03:20 Juerd Ouch, bitten by $_
03:20 Juerd m: class Example { method m { say self.defined ?? "instance method" !! "class method" } }; Example.m; Example.new.m
03:20 camelia rakudo-moar ae3a79: OUTPUT«class method␤instance method␤»
03:20 Juerd There :)
03:23 _notbenh joined #perl6
03:25 ZoffixWin Someone mentioned during my talks there are these for 100s of languages and we should have one for Perl 6 too: http://rubykoans.com/
03:25 clkao_ joined #perl6
03:26 diakopter ZoffixWin: TimToady and others spent many hundreds of hours on the rosettacode examples
03:26 cosarara_ joined #perl6
03:26 ZoffixWin diakopter, the guy said they were hard to navigate
03:26 sortiz .tell abraxxa I finally have a working oracle test environment!
03:26 yoleaux sortiz: I'll pass your message to abraxxa.
03:27 MadcapJake_ joined #perl6
03:27 orbus_ joined #perl6
03:27 ZoffixWin (not the same guy, but someone brought up they were not ideal_
03:27 perlawhirl ZoffixWin: did you just volunteer yourself :D
03:27 Vitrifurr joined #perl6
03:27 AiHasBeenSolved joined #perl6
03:27 ZoffixWin nope :)
03:27 nadim joined #perl6
03:28 diakopter ZoffixWin: there are per-language lists
03:28 AiHasBeenSolved http://wiki.opencog.org/wikihome/index.php/Ghost
03:28 * AiHasBeenSolved Ghost AI coder doing his bit to promote Perl6 and Perl AI. Bye
03:28 AiHasBeenSolved q
03:28 AiHasBeenSolved quit
03:28 diakopter http://rosettacode.org/wiki/Category:Perl_6
03:28 retupmoc_ joined #perl6
03:28 M-tadzik joined #perl6
03:28 vytas` joined #perl6
03:29 diakopter -_- lol
03:29 ZoffixWin *shrug* I'm unsure what the exact issue was. I suggested opening an Issue on the User experience repo so it could be addressed.
03:29 andrewalker_ joined #perl6
03:29 sQuEE` joined #perl6
03:29 roguelazer_ joined #perl6
03:30 daxim_ joined #perl6
03:30 sunnavy__ joined #perl6
03:30 jnap_ joined #perl6
03:30 kipd_ joined #perl6
03:31 saaki rubykoans is really geared for learning the language in an active fashion. rosettacode is about examples of common patterns. kind of different.
03:32 Spot___ joined #perl6
03:35 jack_rabbit joined #perl6
03:35 * skids wonders if oeis.org would welcome Perl6 worked code or not.
03:35 diakopter oops
03:35 Fleurety_ joined #perl6
03:36 musca joined #perl6
03:37 Xliff_ **SPLIT** !!!
03:43 ecojud joined #perl6
03:51 Xliff_ W00 h00! supernovus merged my PR
03:52 ecojud well done, I'm jealous
03:52 tardisx joined #perl6
03:58 pierrot joined #perl6
04:04 labster joined #perl6
04:06 tardisx joined #perl6
04:09 tardisx joined #perl6
04:12 ecojud_ joined #perl6
04:13 tardisx joined #perl6
04:20 tardisx joined #perl6
04:25 jamesalbert joined #perl6
04:29 jamesalbert Hey, how would I extend a module's class from a different directory. Doing Preexisting::Module::NewClass doesn't allow Preexisting::Module to load NewClass dynamically with `require ::Preexisting::Module::("NewClass")`
04:30 jamesalbert and by "Doing Preexisting::Module::NewClass" I mean creating a class by that name, in another directory
04:33 RandalSchwartz left #perl6
04:38 quester joined #perl6
04:46 Cabanossi joined #perl6
04:51 molaf joined #perl6
05:14 tardisx joined #perl6
05:39 jack_rabbit joined #perl6
05:39 Xliff_ jamesalbert: Read up on "augment".
05:40 perlawhirl he's gone...
05:40 perlawhirl i was gonna reply, then some work stuff came up, then when i tured back he had quit
05:40 Xliff_ Oh. LOL. I didn't even see the quit message.
05:41 perlawhirl Xliff: my modules is now on the modules directory.
05:42 perlawhirl pretty happy about it, am inspured to do start working on some other unfinished modules i have lying around
05:43 Xliff_ Yeah. I saw.
05:44 perlawhirl yes, but did you see my cool mascot for wig   {[: )
05:44 perlawhirl it's wearing a wig!
05:44 Xliff *snerk*
05:45 Xliff You should make it so that appears next to the project name in the modules list.
05:45 Xliff https://modules.perl6.org/#q=wig
05:45 perlawhirl i will
05:45 * Xliff whips up a quick SVG version
05:46 tardisx joined #perl6
05:47 znpy joined #perl6
06:01 Xliff {[: )http://wiki.shadowplayinternat​ional.org/tests/wig%20logo.svg
06:01 Xliff Er.
06:01 Xliff http://wiki.shadowplayinternat​ional.org/tests/wig%20logo.svg
06:01 Xliff It's an SVG so you can download and do whatever.
06:02 Xliff The second one has character.
06:03 Xliff perlawhirl: Logo goes in logotype/logo_32x32.png and the site should automatically pick it up.
06:04 Xliff (I am assuming logo then needs to be sized 32 x 32....)
06:06 Xliff perlawhirl, note error when trying to install from panda:
06:06 Xliff fetch stage failed for wig: Failed cloning git repository 'git://github.com/0rac1e/wig.git'
06:06 Xliff This is after "panda update"
06:13 perlawhirl dagnabbit!
06:13 perlawhirl the source-url is wrong :(
06:15 perlawhirl fixed, but it will be another hour before modules directory updates
06:15 perlawhirl in the meantime, you could just panda install https://github.com/0racle/p6-wig.git
06:17 rindolf joined #perl6
06:18 RabidGravy joined #perl6
06:21 perlawhirl Xliff, i remember now. when i first created the repo it was just called wig. i renamed it to p6-wig... becuase i dunno. forgot to update the meta
06:21 perlawhirl this is my first github repo, first perl module... training wheel are getting a workout
06:27 araujo joined #perl6
06:35 Xliff perlawhirl, LOL!
06:36 domidumont joined #perl6
06:36 Xliff Hrm.
06:37 Xliff Using the URL doesn't work, either.
06:37 Xliff perlawhirl, tried https://github.com/0racle/p6-wig.git
06:37 Xliff and https://github.com/0racle/wig.git
06:37 domidumont joined #perl6
06:37 Xliff Now why did I read that name as nomadonut?
06:38 * Xliff just got his eyes checked.
06:38 wamba joined #perl6
06:39 darutoko joined #perl6
06:40 * Xliff wants an infix:<∞> operator.
06:41 Xliff It should do something NIFTY!
06:41 perlawhirl hmm, panda must look at the repo's META if you give it a url
06:42 perlawhirl i guess the only option until the moduless dir rebuilds is to git clone, cd pg-wig, panda install .
06:42 perlawhirl but just wait under ~30 mins :D
06:47 teatime joined #perl6
06:48 sue_ joined #perl6
06:52 domidumont joined #perl6
06:55 CIAvash joined #perl6
06:56 domidumont joined #perl6
06:58 moritz http://ecosystem-api.p6c.org/projects.json now has wig
06:59 nadim joined #perl6
06:59 perlawhirl thanks moritz... though i made a booboo and messed up the source url. i've fixed it... now sitting idly waiting for the build to run again :D
06:59 perlawhirl not long now
07:01 moritz 8,28,48 * * * * bash update.sh > update.log 2>&1
07:01 moritz that's the update cron job for ecosystem-api.p6c.org
07:01 * moritz kicks it off manually
07:03 moritz ... done
07:03 RabidGravy boom
07:06 perlawhirl joined #perl6
07:09 perlawhirl moritz++
07:13 zakharyas joined #perl6
07:14 perlawhirl joined #perl6
07:15 perlawhirl Xliff: it works now {[: )
07:17 yeahnoob joined #perl6
07:18 perlawhirl joined #perl6
07:29 Actualeyes joined #perl6
07:29 fireartist joined #perl6
07:33 anaeem1 joined #perl6
07:44 abraxxa joined #perl6
07:46 sortiz abraxxa, ping
07:46 abraxxa good morning!
07:46 yoleaux 30 Mar 2016 23:52Z <sortiz> abraxxa: Changes that only touch DBDish/Oracle* can be pushed directly to master
07:46 yoleaux 03:26Z <sortiz> abraxxa: I finally have a working oracle test environment!
07:46 abraxxa great!
07:46 sortiz abraxxa, I have only 5 tests failing now.
07:46 abraxxa wow, great!
07:47 abraxxa that means I've wasted lots of time yesterday
07:47 sortiz :( Why?
07:48 sortiz The 'is rw' is now working for handlers, the problem was the base datatype.
07:49 dakkar joined #perl6
07:51 perlawhirl joined #perl6
07:59 leont joined #perl6
08:02 abraxxa i'll update my checkout
08:03 abraxxa sortiz: have you not pushed it yet?
08:03 sortiz I haven't pushed yet.
08:03 abraxxa so what was required to get the Oracle docker container working on your Fedora?
08:04 telex joined #perl6
08:04 sortiz As commented yesterday, my problem was with the client library vs selinux, but googling found a solution.
08:05 sortiz Pushing my WIP...
08:07 dalek DBIish: b9ea19b | (Salvador Ortiz)++ | lib/DBDish/Oracle (4 files):
08:07 dalek DBIish: Oracle: WIP, Updated some bindings
08:07 dalek DBIish: review: https://github.com/perl6/DBIish/commit/b9ea19beb6
08:12 sortiz abraxxa, My remaining problem is that somehow the returned strings don't match the reference ones, but seems identical. :-(
08:12 sue joined #perl6
08:13 sortiz Aha!
08:14 sortiz The returned ones are marked, for example: Str+{NativeCall::ExplicitlyManagedString} <element> = "BEOM"
08:14 sjoshi joined #perl6
08:15 abraxxa sortiz: yes
08:15 abraxxa sortiz: don't know where this comes from
08:16 abraxxa sortiz: you wrote the OO code a bit different than I did yesterday, for example I moved OCIEnvNlsCreate into OCIEnv.new
08:17 sortiz Yes, I don't want to change the overall approach, yet :)
08:20 azawawi joined #perl6
08:20 sortiz And there are lots of calls not converted yet to avoid the CArray wrapper.
08:20 azawawi hi
08:20 azawawi RabidGravy: ping
08:20 azawawi .seen RabidGravy
08:20 yoleaux I saw RabidGravy 07:03Z in #perl6: <RabidGravy> boom
08:21 sortiz azawawi, o/
08:21 azawawi sortiz: hi
08:21 azawawi .tell RabidGravy https://github.com/azawawi​/perl6-file-which/issues/4 # whence is now done as per your earlier request :)
08:21 yoleaux azawawi: I'll pass your message to RabidGravy.
08:22 |Tux| joined #perl6
08:29 perlawhirl joined #perl6
08:34 abraxxa sortiz: FYI the OCI naming convention is: postfixed with p => pointer, pp => pointer to pointer
08:34 abraxxa so you might want to rename $envhpp to $envhp now that you're using is rw
08:35 abraxxa sortiz++ # that refactor lead to really nice code!
08:35 abraxxa I wonder why the is rw didn't work for me yesterday, did the same thing you did
08:36 abraxxa sortiz: you seem to have tab/space problems in your editor
08:36 nadim joined #perl6
08:37 sortiz For the 'is rw' see Native.pm6#L19
08:40 g4 joined #perl6
08:40 abraxxa that does the double pointer trick?
08:41 sortiz That plus 'is rw'
08:43 Xliff perlawhirl, panda is still failing on the git clone.
08:43 Xliff ==> Fetching wig
08:43 Xliff fatal: remote error:
08:43 Xliff Repository not found.
08:43 Xliff fetch stage failed for wig: Failed cloning git repository 'git://github.com/0rac1e/wig.git'
08:43 sortiz And now we can convert all subs that take an OCIEnv as first parameter to methods in that class, for example.
08:43 abraxxa I defined it as class OCIEnv is repr('CPointer') is export {}; and is rw on OCIEnvNlsCreate and it didn't work
08:43 perlawhirl try umm --force or --reinstall or something
08:44 perlawhirl maybe sortiz knows, but theres a dist folder, in ~/.perl6/dist on linux
08:44 perlawhirl that has a file in it
08:44 perlawhirl that still says 'wig.git' in it, it hasn't updated
08:44 Xliff "git clone https://github.com/0racle/wig.git; panda install ." <-- worked
08:45 perlawhirl that's weird, because the repo is now called p6-git...
08:45 perlawhirl maybe github remembers i renamed it and still lets you clone it via the old name ??
08:45 sortiz abraxxa, then I don't know what happened, but now is working.
08:45 Xliff perlawhirl, did you see the SVG?
08:46 abraxxa sortiz: please check your tab/space editor settings
08:46 sortiz Xliff, try 'panda update'
08:46 Xliff Oh! I see a logo. Was it one of mine or did you refont from the SVG?
08:46 perlawhirl i did, but i didn't have an editer to crop it to 32x32
08:46 perlawhirl nah i just knocked seomthing up in one of those icon maker sites
08:47 sortiz abraxxa, sure, don't worry about that, we have some more serious problems ;-)
08:47 perlawhirl2 joined #perl6
08:48 abraxxa sortiz: it makes reviewing commits harder when lines only have whitespace changes
08:49 Xliff *gasp*
08:49 Xliff perlawhirl has a client that ignores CTCP VERSION!!!
08:49 Xliff Philistine!
08:49 sortiz abraxxa, Yes, i know, promise fix that.
08:49 abraxxa sortiz: thanks!
08:49 Xliff Now how can I know what OS you have so that I can taunt you mercilessly? ^_^
08:50 perlawhirl2 Xliff: i just got off the train. Switched from irssi on my laptop to some app on my phone
08:50 Xliff perlawhirl, on a serious note. https://www.google.com/url?sa=t&amp;rct=j&amp​;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ca​d=rja&amp;uact=8&amp;ved=0ahUKEwip7LXQxerLAhV​EqB4KHfZyBh0QFggdMAA&amp;url=https%3A%2F%2Fin​kscape.org%2F&amp;usg=AFQjCNFMvobmZ6ikZ23ctBN​V4CuYoreZ-Q&amp;sig2=GUZMRl5nBsozHKKMi7uwDQ
08:50 arnsholt I used to have a client that replied to CTCP VERSION with a claim that it was running on an ENIAC =D
08:50 Xliff arnsholt++
08:50 perlawhirl2 Any recommendation for irc client on Android
08:51 Xliff perlawhirl2, Inkscape is multiplatform SVG editor that can export to PNG.
08:51 perlawhirl2 Something lite, i don't need a million protocols
08:51 arnsholt I think I had something weird for CTCP TIME as well. Can't remember what, though
08:51 Xliff perlawhirl2, I used to have one but that was WAY back in the day.,
08:51 Xliff https://play.google.com/store/apps​/details?id=net.andchat&amp;hl=en
08:52 Xliff That's the default option.
08:52 Xliff Works better with a tablet. IRC demands width-based real estate.
08:53 Xliff perlawhirl2, heading to work or heading home?!
08:54 perlawhirl2 Heading home, albeit a bit late. 19:53 here
08:57 nadim Morning!
09:02 RabidGravy erp
09:02 yoleaux 08:21Z <azawawi> RabidGravy: https://github.com/azawawi​/perl6-file-which/issues/4 # whence is now done as per your earlier request :)
09:02 RabidGravy azawawi :)
09:03 RabidGravy .tell azawawi  RARRRR!
09:03 yoleaux RabidGravy: I'll pass your message to azawawi.
09:03 ab6tract joined #perl6
09:05 nine perlawhirl2: I just use vxconnectbot to ssh to my server where irssi is running
09:07 Xliff Rebuilding rakudo to check my Match infix:<eqv> implementation.
09:08 Xliff To my knowledge there are no formal test cases for Match... or are there?
09:10 donaldh joined #perl6
09:23 Xliff *sigh*
09:23 Xliff Now I've found a failed test case.... just when I was getting ready to push the PR.
09:23 Xliff ARGH!
09:23 Xliff I need sleep. I'll figure this out tomorrow.
09:23 Xliff 'night (or 'morn for some o ya) #perl6
09:25 perlawhirl joined #perl6
09:27 quester left #perl6
09:32 espadrine joined #perl6
09:42 ab6tract lizmat: updated the PR again :)
09:55 dalek DBIish: ce20a74 | (Salvador Ortiz)++ | lib/DB (3 files):
09:55 dalek DBIish: Oracle: Passing the standard test suite
09:55 dalek DBIish:
09:55 dalek DBIish: Not yet "in an ideal world", TODO #50
09:55 dalek DBIish: review: https://github.com/perl6/DBIish/commit/ce20a74b69
10:00 kid51 joined #perl6
10:04 perlawhirl joined #perl6
10:04 cibs_ joined #perl6
10:09 nadim can someone make a review on Text::Template that is in the ecosystem? it's pretty short.
10:11 cibs joined #perl6
10:17 dalek DBIish: 91594d7 | (Alexander Hartmaier)++ | lib/DBIish/CommonTesting.pm6:
10:17 dalek DBIish: fix typo
10:17 dalek DBIish: review: https://github.com/perl6/DBIish/commit/91594d76aa
10:38 ab6tract jnthn: not sure if you have any objections to the PR?
10:52 lizmat ab6tract: right in the middle of something else, will try in a mo
10:52 jnthn ab6tract: Didn't have time to look yet, sorry :(
10:53 ab6tract lizmat, jnthn: no problem! sorry, just a little excited about my first NQP patch (however trivial :) )
11:03 Ulti how much of a big deal would it to be to get some helper methods added to Duration to convert to minutes/hours/days
11:04 dvinciguerra__ joined #perl6
11:12 ab6tract Ulti: sounds useful to me... a bit surprised that functionality is not already there
11:13 woodruffw joined #perl6
11:14 woodruffw joined #perl6
11:20 lizmat Ulti: isn't that what polymod is ?
11:21 nemo joined #perl6
11:21 moritz well, days is dependent on which day you're talking about
11:21 Some-body_ joined #perl6
11:21 moritz even minutes (there are minutes, hours, days with leap seconds)
11:21 timotimo polymod isn't enough when you have to deal with leap seconds/days/...
11:22 Upasaka_ joined #perl6
11:22 cosarara joined #perl6
11:23 ZoffixWin joined #perl6
11:23 ZoffixWin joined #perl6
11:23 wtw joined #perl6
11:23 jervo joined #perl6
11:23 Timbus joined #perl6
11:23 skarn joined #perl6
11:23 lizmat myabe I'm understanding Duration wrong then ?
11:28 ab6tract m: sub f() { True }; say f ?? 'yay!' !! 'nay!';
11:28 camelia rakudo-moar ae3a79: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Nvl4jDwA5l␤Expected a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use a space like ? ?)␤at /tmp/Nvl4jDwA5l:1␤------> 3sub f() { True }; say f ??7⏏5 'ya…»
11:29 moritz or f()
11:29 ab6tract I would have hoped that specifying no args would provide the same behavior as an empty prototype in p5
11:29 ab6tract moritz: aye, that works. but it feels weird that p6 is less capable than p5 here
11:29 moritz your hopes have been squashed
11:30 tony-o joined #perl6
11:30 ab6tract ok. well usually i like my tears to flow with an explanation
11:30 moritz m: sub term:f { True }; say f ?? 'yay' !! 'nay'
11:30 camelia rakudo-moar ae3a79: OUTPUT«5===SORRY!5=== Error while compiling /tmp/u9x4khtkwZ␤Expected a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use a space like ? ?)␤at /tmp/u9x4khtkwZ:1␤------> 3sub term:f { True }; say f ??7⏏5 …»
11:30 moritz m: sub term:<f> { True }; say f ?? 'yay' !! 'nay'
11:30 camelia rakudo-moar ae3a79: OUTPUT«yay␤»
11:31 moritz ab6tract: we allow post-declaration of subroutines
11:31 moritz ab6tract: so we can't have the declaration influence the parsing
11:31 moritz also, things get tricky once you're in multi territory
11:32 ab6tract gotcha. i had forgotten about the term category for ops
11:32 ab6tract thanks for clarifying
11:32 moritz you're welcome
11:36 ZoffixWin If anyone's interested, the recording of my last night's "Wow, Perl 6!" talk has been posted and I've written up answers to some of the questions I didn't answer during the talk: http://blogs.perl.org/users/zoffix_zn​et/2016/03/wow-perl-6-talk-slides-rec​ording-and-answers-to-questions.html
11:47 jnthn ZoffixWin: "Can you check whether or not a value fits the subset?" - just smartmatch against the subset type
11:47 ZoffixWin :o
11:48 timotimo you, too, can be smart
11:48 jnthn m: subset Even where * %% 2; say 3 ~~ Even; say 42 ~~ Even
11:48 camelia rakudo-moar ae3a79: OUTPUT«False␤True␤»
11:48 ZoffixWin jnthn++
11:49 Ulti moritz as a unit though a duration in days would be 86400 seconds right?
11:50 Ulti like after a day you can't really talk about a unit month or year
11:50 Ulti but a lot of epoch times are numbers of days since X as a real value with a decimal day
11:50 Ulti specifically MS Excel dates are :) which is what I'm playing with
11:53 kaare_ joined #perl6
11:55 timotimo ZoffixWin: sadly the noise cancellation or something else has done bad things with the audience questions in your recording :(
11:55 moritz Ulti: not all days are 86400 seconds
11:56 moritz Ulti: which is why day isn't really a unit that can be carelessly converted from/to seconds
11:56 ZoffixWin I hear next time there'll be a better setup.
11:57 * moritz has a dream that one, all our days are created equal
11:57 * moritz has a dream
12:01 Ulti moritz which days arent? leap second is a specific date not a day and if you really care you can average the leap second over the calculation from knowing the full Duration
12:01 moritz Ulti: days with leap seconds, days on which DST is switched on or off
12:01 Ulti sure those are specific dates not a day
12:01 moritz days on which a country changes what timezone it considers itself to be in
12:02 Ulti you dont change the duration of a second in phyiscs because there is a leap nanosecond
12:03 Ulti moritz: those are all specific dates not the length of any day
12:03 moritz Ulti: well, if you make the distiction between a date and a day, you can't add durations based on days to datetimes anymore
12:03 Ulti even a year you can define fairly well
12:04 moritz well, a year is rougly made of 365.25 days; but if you use that definition in a datetime library, you make everybody unhappy
12:04 Ulti they arent based on days at the moment it only holds seconds, I'm suggesting if you want to know how many days those seconds add up to for no particular date you can avoid magic numbers
12:04 Ulti delta_days in Perl 5 DateTime for example
12:04 Ulti though I think that does do the full calculation
12:05 Ulti but DateTime::Duration in Perl 5 also has delta_days which is more like what I'm talking about
12:05 timotimo ZoffixWin: your "custom terms and operators" slide has an image, so i can't copy-paste all those values in order to try writing that program :|
12:05 Ulti DateTime delta_days tells you the actual number of days between dates but the Duration just treats a day as a unit
12:05 ZoffixWin timotimo, go nuts :) http://unicodeemoticons.com/
12:06 timotimo oh, fantastic
12:06 timotimo but what the hell should these actually do?
12:06 timotimo you can just turn each of them into a term and an infix alternatingly
12:06 ZoffixWin Cure cancer? That'd look good in history books :)
12:07 timotimo i was hoping i could get a way with short one-liners for the implementations
12:09 timotimo .u ❨
12:09 yoleaux U+2768 MEDIUM LEFT PARENTHESIS ORNAMENT [Ps] (❨)
12:09 timotimo fantastic
12:10 andreoss joined #perl6
12:13 andreoss perl6-j dies with Unhandled exception: java.lang.StackOverflowError
12:13 andreoss in repl
12:14 xinming_ joined #perl6
12:16 ab6tract andreoss: not sure if the jvm backend has ever gotten on its legs after the GLR..
12:17 timotimo only partially
12:17 timotimo could very well be that the REPL is just "too much" for it right now
12:22 xinming joined #perl6
12:23 andreoss will be rakudo-jvm released? or it's not a priority
12:24 timotimo if i understand correctly, it's currently a single of our devs who's investing time into that
12:28 ab6tract andreoss: indeed, the moar backend gets the vast majority of work at the moment. i believe that the reasoning is more or less "one full featured and fast backends is better than multiple slow, ever so slightly broken ones"
12:30 timotimo well, a lot of the work really is cross-backend, or backend-agnostic
12:43 timotimo ZoffixWin: about aborting/killing promises; nope, not possible. if you need that kind of thing, you'll have to use processes, or you'll have to build the code so that it exposes some kind of flag "should i continue working?"
12:44 nemo joined #perl6
12:47 M-matthew joined #perl6
12:49 sufrostico joined #perl6
12:54 timotimo oh, i just now remember, ZoffixWin, yo ucould have also shown off the ANTLR4 thingie for turning ANTLR grammars into a perl6 grammar
12:54 ZoffixWin k
12:54 timotimo in general, "kill a thread" is something you're not really getting anywhere
12:55 donaldh ab6tract: the JVM backend did just fine after the GLR
12:55 rindolf joined #perl6
12:55 donaldh ab6tract: there were some issues on the JVM backend with the precompilation changes. One those manifested as a stack overflow error.
12:56 donaldh andreoss: ^
13:13 xinming joined #perl6
13:17 sufrostico joined #perl6
13:21 cdg joined #perl6
13:21 timotimo ZoffixWin: your security tip thingie about RESTRICTED.setting is moot since you're allowed to "use nqp" and use anything moar offers
13:31 donaldh The jvm repl blows up here: https://github.com/rakudo/rakudo/blob/7e8c9cbf87dd​a848efdaba4a854b58543834bfbf/src/core/REPL.pm#L243
13:32 hoelzro hmm...maybe we should disable REPL.pm on the JVM for now
13:33 donaldh hoelzro: Why is it:  has $.compiler
13:33 donaldh hoelzro: then $!compiler = ...
13:34 timotimo because $.compiler isn't "rw"
13:34 hoelzro donaldh: well, I did it that way because the Completions role needs to access the compiler...
13:34 timotimo so you can only assign to the $! one
13:34 hoelzro ...but now that I think about it, you could still use $!compiler
13:34 timotimo with roles, yeah, you get access to the $!vars, too
13:34 hoelzro but if we went ahead and did that, it means that the Completions role would be more tightly bound to the REPL, but since it's the only usage of that role, it should probably be fine
13:35 hoelzro does changing it to has $!compiler fix the issue?
13:37 Roamer` joined #perl6
13:37 pierrot joined #perl6
13:37 donaldh I'll try that
13:46 AlexDaniel joined #perl6
13:47 donaldh It's currently getting into an infinite stack recursion trying to create X::TypeCheck::Assignment
13:47 xinming joined #perl6
13:47 donaldh Trying to store to $!compiler
13:47 skids joined #perl6
13:55 robertle joined #perl6
13:55 RabidGravy can anyone think of a way to re-construct a Backtrace from a bunch of Backtrace::Frame objects?
13:56 RabidGravy I know that may seem a little strange but I want to deserialise a Backtrace
13:57 [Tux] joined #perl6
13:58 hoelzro interesting...
13:59 robertle tadzik: I have a environment created by rakudobrew, which I just wanted to upgrade. so I do 'rakudobrew self-upgrade', which does something, followed by 'rakudobrew build moar', which fails to compile something (http://pastebin.com/M5i2qzxF). deleting the directory and re-doing it from scratch works though. is this expected? odd? anything you want to have before I nuke the broken setup?
14:00 RabidGravy robertle, how old was the previous rakudo?
14:00 robertle RabidGravy: 2015.11-541-g03cbe70 built on MoarVM version 2015.11-44-ge7edb06
14:00 RabidGravy yeah, that would probably require nuking
14:01 RabidGravy the way the modules are stored and loaded changed slightly after that
14:01 robertle ok, no problem! but to understand it a bit better: why? does upgrading use the already present stuff for bootstrapping, while the re-install (obviously) does not?
14:03 RabidGravy the design of CompUnit::Repository changed, it was a one off thing just prior to Christmas
14:04 robertle k, thanks!
14:06 buharin joined #perl6
14:07 xinming joined #perl6
14:15 dupa joined #perl6
14:20 xinming joined #perl6
14:26 RabidGravy Actually I think I'm going ditch the intermediate Backtrace and just keep the frames, much simpler
14:26 Vlavv_ joined #perl6
14:30 perlawhirl pretty quiet in here
14:31 timotimo sorry about that, what can we do for you?
14:31 perlawhirl lol, i'm just thowing together a quick network audit and perl6 keeps amazing me with how little i have to work to get results
14:31 timotimo <3
14:32 perlawhirl like, i had a list of interfaces and their bandwidth in an array, in a lazy stringy way, and wanted to quickly check there bandwidths matched
14:32 perlawhirl m: my @ints = 'Gi0/1: 10000','Tu110: 10000','Tu120: 10000'; say [==] @ints».words»[1]
14:32 camelia rakudo-moar 7d4b3a: OUTPUT«True␤»
14:32 xinming joined #perl6
14:33 perlawhirl rather than make a data structure that makes comparison easy, i was able to compare the data structures as i wanted without too much messing around
14:33 perlawhirl so enjoyable
14:33 sufrostico joined #perl6
14:33 timotimo :)
14:33 [Coke] ZoffixWin++
14:33 [Coke] (presentation)
14:34 perlawhirl yes! Zoffix++ gw
14:40 yqt joined #perl6
14:44 buharin joined #perl6
14:44 dupa joined #perl6
14:45 TreyHarris Anyone used JSON::Infer? It worked very nicely to produce a class schema matching my JSON... but I am stupidly at a loss to get any actual data out of the thing by doing My::TopLevel::Generated::C​lass.from-json($contents). I get structure, but structure only. An example of use beyond the tests (which are so abstract that I'm not seeing where my code is different) would be very helpful.
14:46 RabidGravy Well I actually wrote it and have used it quite a bit
14:46 psch RabidGravy: if you've got a moment, can you take a look at this gist? https://gist.github.com/peschwa/​a8fabd272c6c747fde08f714bdb0195b
14:46 psch RabidGravy: i'm mostly unsure if i'm mistreating either Audio::PortMIDI or the MIDI standard itself... :)
14:49 RabidGravy psch, I so totally haven't tested with system exclusive stuff
14:50 RabidGravy but I think you want to create the event with timestanp and message rather than event
14:50 psch and event-type too, probably
14:51 psch right, then the MfID, data and endSysEx goes into :message
14:51 RabidGravy yes
14:51 psch alright, i'll give that a try
14:52 RabidGravy well, maybe event-type "SysEx"  and data-one, data-two with the actual data
14:53 RabidGravy It's entirely possible that SysEx doesn't work very well
14:53 psch yeah, i've only skimmed a few explanations of the packet format, didn't dig into the actual specification
14:53 psch but i had the hunch that the hard 64 bit for .Int could easily be wrong, especially for SysEx
14:54 RabidGravy TreyHarris, it it's not too big data can you stick it in a gist
14:54 TreyHarris RabidGravy: Yep, but I get Any, Any, Any and more Any instead of any actual scalar contents
14:55 psch ohh, and obviously i'm not sending the binary string as binary data...
14:55 psch i should've seen that :/
14:55 TreyHarris The structure's right. But the content's just Anys or uninitialized objects
14:55 psch m: say "010".Int
14:55 camelia rakudo-moar 7d4b3a: OUTPUT«10␤»
14:55 psch m: say "0b010".Int
14:55 camelia rakudo-moar 7d4b3a: OUTPUT«2␤»
14:55 ilmari m: say "0o010".Int
14:55 camelia rakudo-moar 7d4b3a: OUTPUT«8␤»
14:56 dvinciguerra__ joined #perl6
14:57 psch RabidGravy: i think i'll have to PR after writing a wrapper for Pm_WriteSysEx, probably :)
14:57 hoelzro ZoffixWin++ # talking
14:57 RabidGravy TreyHarris, then it's likely that the data doesn't match the generated class
14:57 RabidGravy which is odd but not impossible
14:57 xinming joined #perl6
14:58 psch hm, or use write(@)
14:58 TreyHarris RabidGravy: interesting. If you have a Mac, it's just the output of "brew info --json=v1 --installed". I don't see anything odd there, it's just strings.
14:59 Timbus joined #perl6
14:59 psch nope, that also doesn't work 'cause Event always pads to 64bit and that gives 32 0 bits and that is invalid MIDI...
15:00 RabidGravy TreyHarris, I don't have a Mac, can you just stick the data in a gist so I can take a look
15:06 RabidGravy psch, https://www.midi.org/specifications/​item/table-1-summary-of-midi-message - explains how the SysEx is packed,
15:07 khw joined #perl6
15:07 psch RabidGravy: right, that's why it's linked in clock.pl6 :)
15:07 xinming joined #perl6
15:08 RabidGravy basically you sent status => 0b11110000, data-one => MfID,   then a bunch of 7-bit data then status => 0b11110111
15:08 perlawhirl can I determine which index of an array matches a particular regex?
15:08 psch alright, i'll try that
15:09 jnthn perlawhirl: .first or .grep, and pass :k to get indexes
15:09 perlawhirl jnthn++
15:09 perlawhirl i'm ashamed that i knew that already
15:11 psch RabidGravy++ thanks, that does what i want it to
15:11 psch well, having to send the endSysEx seperately is a bit annoying, but i think i can deal
15:11 TreyHarris RabidGravy: sorry, took a minute because gist doesn't support directories. See bottom for output: https://gist.github.com/treyharris​/7b57dd3855d3afb9461d86c13938362f
15:12 RabidGravy yay!  I'd go an example
15:12 tony-o perlawhirl: example?
15:13 tony-o oh, missed jnthn's comment
15:13 perlawhirl m: my @a = 'foo', 'bar', 'baz'; @a.grep(/baz/, :k)
15:13 camelia rakudo-moar 7d4b3a: ( no output )
15:13 perlawhirl m: my @a = 'foo', 'bar', 'baz'; say @a.grep(/baz/, :k)
15:13 camelia rakudo-moar 7d4b3a: OUTPUT«(2)␤»
15:14 perlawhirl oh, i missed your 2nd comment :D
15:14 jnthn .oO( Reading on IRC is overrated, just write stuff... )
15:15 arnsholt Perl is a write-only language, so why shouldn't our IRC channel also be so? =)
15:16 RabidGravy TreyHarris, ah,  the JSON::Class doesn't deal with data which is an array at the top level
15:17 perlawhirl arnsholt: ouch... my heart
15:18 TreyHarris RabidGravy: ah, so all I need to do is a split on the file contents and use a loop?
15:18 arnsholt =)
15:19 TreyHarris erm... "all". this isn't so easy, there are not only nesting but also escaped square brackets in the file :-/
15:20 TreyHarris RabidGravy: any suggestion for an easy way to separate the text into a list of texts? or is this a JSON::Class bug?
15:20 xinming joined #perl6
15:22 RabidGravy 'ang on, let me have a fiddle - I think there may be a simpler, albeit less efficient way
15:23 azwieg103 left #perl6
15:24 RabidGravy It's fake up a top level object
15:25 * TreyHarris nods
15:25 TreyHarris RabidGravy: I see where you're going. I don't like it.
15:25 nemo joined #perl6
15:25 * TreyHarris is kidding
15:27 TEttinger joined #perl6
15:28 buharin joined #perl6
15:28 dupa joined #perl6
15:33 TreyHarris RabidGravy: Though my stupid attempt, just wrapping the entire file in qq[\{ "contents": $contents \}], didn't change anything
15:36 garu tadzik: annoying ping of the day :) any chance you can take a quick look at https://github.com/tadzik/Bailador/pull/50?
15:36 tadzik oh, oh!
15:36 tadzik I missed it
15:36 garu \o/
15:36 tadzik looking at it right now
15:37 robertle really stupid question, but I can't work it out: which dot-method tells me what type a scalar is? so e.g. (1/3).WHICH says 'Rat|1/3', is there something that just says the type? WHICH feels wrong
15:37 garu thanks! if it sucks, just let me know and I'll do my best to fix it
15:37 tadzik All changes and new features have tests included in the commit
15:37 garu yup
15:37 tadzik somebody buy this man a beer or ten
15:37 garu \o/
15:38 garu this is actually my very first public pull request in perl 6
15:38 garu so I'm kind of excited :)
15:38 garu (and scared)
15:38 garu but mostly excited
15:38 tadzik m: my $a = "foo"; my $b = $a.subst(/foo/, "bar"); say $b
15:38 camelia rakudo-moar 7d4b3a: OUTPUT«bar␤»
15:38 tadzik garu: you may like that ^ )
15:38 garu O_O
15:38 garu *YES*
15:39 moritz robertle: .^name
15:39 moritz m: say (1/3).^name
15:39 camelia rakudo-moar 7d4b3a: OUTPUT«Rat␤»
15:39 tadzik that's a ton of good stuff, I love it!
15:39 tadzik garu++
15:39 RabidGravy TreyHarris, there I've updated the gist, basically if you change the top level class to Honebrew::Formula and then add the new Homebrew::Formulas at the bottom
15:39 moritz robertle: and .WHAT gives you the type object (.^name gives you the name of the type)
15:40 RabidGravy then use "from-brew" it's all good
15:40 psch m: given 3 { when *.&[+&]: 1 { say "got 0 bit"; proceed }; when *.&[+&]: 2 { say "got 1 bit"; proceed }  } # linenoise you say
15:40 camelia rakudo-moar 7d4b3a: OUTPUT«got 0 bit␤got 1 bit␤»
15:40 tadzik I'll go do a quick shopping and will merge your stuff when I'm back, I think :)
15:40 psch yes, *.&[+&]: looks pretty good indeed :)
15:40 garu tadzik: I think I need it to be case insensitive though
15:40 garu just in case
15:41 garu tadzik: which is why I did the $field ~~ s:i/^HTTPS?_//;
15:41 garu wish there was a way to do s///r like there is in p5
15:41 robertle moritz: great, thanks!
15:41 psch garu: there's S///
15:41 timotimo you mean like S///?
15:42 garu psch, timotimo: yeah, vendethiel mentioned it but it didn't work :(
15:42 garu I can't find it in http://docs.perl6.org/lang​uage/regexes#Substitution
15:42 timotimo yeah, you have to set $_ instead of using ~~
15:43 garu m: my $key = q<HTTP_USER_AGENT>; my $field = $key ~~ S/HTTP//; say $field
15:43 camelia rakudo-moar 7d4b3a: 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/OZ4eXxsIhr:1␤    ------> 3q<HTTP_USER_AGENT>; my $field = $key ~~ 7⏏5S/HTTP//; say …»
15:43 psch m: my $key = q<HTTP_USER_AGENT>; my $field = S/HTTP// given $key; say $field
15:43 camelia rakudo-moar 7d4b3a: OUTPUT«_USER_AGENT␤»
15:43 psch garu: just like the message says... :)
15:43 TreyHarris RabidGravy: perfect! thanks!
15:43 timotimo i told him, the message told him, he still went for it :P
15:44 psch hm, maybe it should expand to something like "$rhs given $lhs"
15:44 garu psch: ha! sorry, but that message was less than awesome for me (someone who just got started in perl6 and doesn't really know much about 'given')
15:44 timotimo maybe we should highlight "instead" in bold or color
15:45 psch garu: yeah, that's why i was thinking it should tell the user to swap the args
15:45 garu m: my $key = q<HTTP_USER_AGENT>; my $field = $key given S/HTTP//; say $field
15:45 camelia rakudo-moar 7d4b3a: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/kMDlgBWveb line 1␤␤»
15:45 RabidGravy TreyHarris, it's a bit slow for large data, but hey.  I'll have a think of doing something more sensible out of the box
15:45 garu that's what I tried when I saw "use given instead of ~~" :P
15:46 timotimo do we parse Rgiven properly? :D
15:47 garu psch, timotimo: how can I volunteer to update the docs for S///? I mean, where do I send my PRs to? :)
15:48 moritz garu: perl6/doc
15:49 domidumont joined #perl6
15:49 garu moritz: thanks!
15:51 pmurias joined #perl6
15:52 pmurias nqp-js-on-js now passes all the t/nqp tests :)
15:53 RabidGravy yay!
15:53 hoelzro pmurias++
15:54 moritz \o/
15:54 moritz pmurias++
15:55 donaldh pmurias++ # this is when you discover nqp doesn't have enough tests
15:55 moritz donaldh: pmurias discovered this long ago. And wrote more tests!
15:55 moritz still too few, probably, but much better than before
15:56 donaldh Yep. It will be interesting to flush out remaining gaps.
15:56 pmurias_ joined #perl6
15:58 jnthn pmurias_: \o/
15:58 jnthn Nice work! :)
16:05 pmurias thanks ;)
16:09 nowan_ joined #perl6
16:10 psch RabidGravy: https://gist.github.com/peschwa/​960ffaa7a7f7323ec1b9c6faa92e84b2 basically abusing SysEx to for pattern programming here
16:11 psch it works, it's probably never been intended like that, and the standard probably also specifies something else you should use for that, but eh :)
16:13 RabidGravy :)
16:23 tadzik garu: .subst can do that too
16:24 donaldh hoelzro: This patch seems to let jvm get to the repl prompt. https://gist.github.com/donaldh/​90687a8ecd757ecb68f9b46c0fbf357d
16:24 tadzik subst(a, b, :i) or so
16:24 donaldh hoelzro: unfortunately I can't install panda to install linenoise, so I can't test it.
16:24 hoelzro weird, but thanks for digging in!
16:24 hoelzro donaldh++
16:25 donaldh I'll keep investigating
16:25 hoelzro donaldh: wanna commit and push that?  I can't do anything until after I get home from work
16:25 g4 joined #perl6
16:25 g4 joined #perl6
16:25 donaldh Not just now. I haven't tested it on moar.
16:26 hoelzro ok
16:32 leont joined #perl6
16:42 donaldh Ugh, rakudobrew build panda blows up on JVM backend.
16:45 timotimo pmurias++ # fantastic work on nqp-js in general and nqp-js-on-js in particular
16:46 awwaiid pmurias++ # definitely
16:47 garu tadzik: do you prefer we use .subst there? Or is S/// fine?
16:47 awwaiid I keep taking a look at the progress there, but it seems like you have to load a whole lot of context into your brain to make useful contributions
16:48 tadzik garu: S/// is fine, I learned about it today :P
16:49 timotimo psch: why can't you just write * +& 2?
16:49 garu tadzik: then it's pushed! travis is just finishing up testing it, but it should be fine :)
16:49 tadzik garu: marvelous!
16:49 psch timotimo: i clearly can :)
16:49 tadzik btw, do I remember correctly that you'll be on the QAH?
16:49 maybekoo2 joined #perl6
16:50 timotimo psch: is that code reacting to a metronome or something?
16:50 psch timotimo: sort of, yeah.  --server starts the server which sends each of the array fields in turn
16:51 psch timotimo: and each of those fields encodes which note duration fits onto that moment in the measure
16:51 psch well, with the caveat that note durations only fit completely into a measure, which isn't how music really works... :)
16:52 timotimo i don't even a little bit of music :\
16:52 garu tadzik: yup! I'll meet you there :)
16:52 psch as in, a 4/4 measure can have a half on the 1 and the 3, but not on the 2 'cause then you can't fill the measure with only halfs anymore
16:52 tadzik sweet!
16:52 psch and --client reacts and play the corresponding instruments when the right moment in the measure is reached
16:53 psch +s
16:53 psch s/reacts/reacts to that encoding/ # probably
16:53 timotimo mhm
16:54 RabidGravy at some point I'm going to hook it up to some real synthesizers
16:54 timotimo CRSB are cymbal, ride, snare and base?
16:54 RabidGravy I found all my three port usb - midi adapters yesterday
16:55 psch timotimo: i read C as "closed hihat", but yeah
16:55 psch ah
16:55 psch but that was a mistake when i did that
16:55 psch afair :P
16:55 tadzik garu: merged :) Thanks!
16:55 RabidGravy (stupid modern day manufacturers seem to omit the midi-through port)
16:55 tadzik now, I still have yours for rakudobrew
16:56 psch i think C is crash and R sounds more like a closed hihat to me vOv
16:56 tadzik which looked good but I still didn't testit :|
16:56 psch i won't bother to look up the GM mapping though :)
16:57 timotimo General MIDI?
16:57 RabidGravy psch, http://computermusicresource.​com/GM.Percussion.KeyMap.html
16:57 RabidGravy that's quite useful
16:57 edehont joined #perl6
17:00 garu tadzik++ # thanks!
17:01 garu tadzik: yeah, https://github.com/tadzik/rakudobrew/pull/84
17:02 garu tadzik: should be easy to check, just install a few tags of rakudo (both available and not available in panda as well) and see what happens :P
17:03 tadzik yep :)
17:04 garu tadzik: what I like about this patch is that it get's even better if panda's maintainers keep track of rakudo's tags
17:04 garu s/get's/gets/
17:04 tadzik yeah, we should :}
17:04 garu :)
17:04 garu but before you did so because it was nice
17:04 garu now it's not just nice, but useful :P
17:05 tadzik it was documentation, y;eah
17:05 garu (and if no tag is found, it'll fallback to the current behaviour of fetching HEAD)
17:05 tadzik yep
17:06 garu tadzik: again, if there's anything I can do to help get this merged, just say the word :)
17:06 domidumont joined #perl6
17:06 tadzik feel free to pester me if it's unmerged tomorrow morning :P
17:07 garu gotcha :)
17:11 TeamBlast joined #perl6
17:11 dalek doc: eb93d54 | timotimo++ | doc/Language/performance.pod:
17:11 dalek doc: fix remaining references to BEGIN where it should be INIT
17:11 dalek doc: review: https://github.com/perl6/doc/commit/eb93d54e70
17:11 dalek doc: 15d362b | timotimo++ | doc/Language/performance.pod:
17:11 dalek doc: remove a stray "e"
17:11 dalek doc: review: https://github.com/perl6/doc/commit/15d362bee8
17:11 dalek doc: 7658f8a | timotimo++ | doc/Language/performance.pod:
17:11 dalek doc: remove section "Process lazily" that looks a bit bit-rotted
17:11 dalek doc:
17:11 dalek doc: anyone can feel free to write up a new version of this
17:11 dalek doc: with a more up-to-date and correct example, though.
17:11 dalek doc: review: https://github.com/perl6/doc/commit/7658f8a003
17:11 rindolf joined #perl6
17:14 andreoss m: my ($x, $y) = flat gather "1234 abcd" ~~ /(\d+) \s (\S+) { take ~$0,~$1  } /; say "0-$x 1-$y"
17:14 camelia rakudo-moar 7d4b3a: OUTPUT«0-1234 1-abcd␤»
17:15 timotimo the part at the very end might want revisiting, too. for example, i think in general our gather/take can be quite fast nowadays. but perhaps only in certain situations?
17:15 andreoss can i have that but without gather/take?
17:15 timotimo of course you can :)
17:15 andreoss my ($a, $b, @c) = $var ~~ /.../; # matches go to $a, $b, @c
17:16 timotimo m: my ($x, $y) = "1234 abcd".match(/(\d+) \s (\S+)/).list; say "0-$x 1-$y"
17:16 camelia rakudo-moar 7d4b3a: OUTPUT«0-1234 1-abcd␤»
17:16 timotimo m: my ($x, $y) = "1234 abcd".match(/(\d+) \s (\S+)/); say "0-$x 1-$y"
17:16 camelia rakudo-moar 7d4b3a: OUTPUT«Use of uninitialized value $y of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/lidVfSLkUD line 1␤0-1234 abcd 1-␤»
17:16 timotimo m: my ($x, $y) := "1234 abcd".match(/(\d+) \s (\S+)/); say "0-$x 1-$y"
17:16 camelia rakudo-moar 7d4b3a: OUTPUT«Unexpected named argument '' passed␤  in block <unit> at /tmp/IfY_gdcoBX line 1␤␤»
17:16 timotimo OK, so you need the .list
17:17 andreoss not with ~~?
17:18 dupa joined #perl6
17:18 buharin joined #perl6
17:19 timotimo m: my ($x, $y) = ("1234 abcd" ~~ (/(\d+) \s (\S+)/)).list; say "0-$x 1-$y"
17:19 camelia rakudo-moar 7d4b3a: OUTPUT«0-1234 1-abcd␤»
17:19 timotimo also works with ~~
17:21 sufrostico joined #perl6
17:21 andreoss m: my ($x, $y) = list ("123 abc" ~~ /(\d+) \s (\S+)/); say $x.perl;
17:21 camelia rakudo-moar 7d4b3a: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "123 abc", to => 3, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "123 abc", to => 7, from => 4)), hash => Map.new(("" => [])), orig …»
17:21 andreoss m: my ($x, $y) = list ("123 abc" ~~ /(\d+) \s (\S+)/); say "0-$x 1-$y";
17:21 camelia rakudo-moar 7d4b3a: OUTPUT«Use of uninitialized value $y of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/btQ1pverw_ line 1␤0-123 abc 1-␤»
17:22 ocbtec joined #perl6
17:23 andreoss m: my (Int() $x, Str() $y) = ("123 abc" ~~ /(\d+) \s (\S+)/).list; say $x.perl;
17:23 camelia rakudo-moar 7d4b3a: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "123 abc", to => 3, from => 0)␤»
17:24 andreoss can i coerce the matches to Str or Int on the way?
17:24 doctor-professor joined #perl6
17:24 sufrosti1o joined #perl6
17:24 andreoss without .map
17:26 doctor-professor Hi, I'm translating a p5 module to p6. I'm done but I'd like to know how to create a README.md file from the markdown at the end of my main script (the html tag stuff after =finish), and how to generate the META.json and minil.toml files. Anyone know how?
17:27 andreoss panda gen-meta
17:29 [Coke] pmurias++
17:30 doctor-professor I always did like you andreoss
17:32 JRaspass joined #perl6
17:32 wamba joined #perl6
17:35 [Coke] (nqp-js-on-js) - any pointers on how to run this? README is still tooled to nqp-js via moarvm.
17:35 ugexe gen-meta does not account for name spaces that dont match the file system layout (or multiple declared namespaces in a single file), and bin/ wrappers strip --name from @*ARGS (which gen-meta takes as a named argument)
17:41 masak evening, #perl6
17:41 xinming_ joined #perl6
17:42 xinming_ joined #perl6
17:46 [Coke] morning.
17:47 buharin joined #perl6
17:47 dupa joined #perl6
17:48 [Coke] pmurias: npm ERR! git fetch -a origin (git://github.com/pmurias/nqp-js-io.git) fatal: Unable to look up github.com (port 9418) (nodename nor servname prov
17:48 [Coke] (I don't expect you to have a fix for this, but just another case of "everyone's corporate network sucks in a different way"
17:49 andreoss m: perl6 -e 'multi MAIN(Numeric $x) { say $x }; multi MAIN(Str $s) { say "str $s" }' 1.4
17:49 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hxsB41ibTh␤Two terms in a row␤at /tmp/hxsB41ibTh:1␤------> 3perl6 -e7⏏5 'multi MAIN(Numeric $x) { say $x }; mul␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
17:49 andreoss m: perl6 -e 'multi MAIN(Numeric $x) { say $x }; multi MAIN(Str $s) { say "str $s" }' ; say foo 1.4
17:49 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WiHRgQnsbB␤Two terms in a row␤at /tmp/WiHRgQnsbB:1␤------> 3perl6 -e7⏏5 'multi MAIN(Numeric $x) { say $x }; mul␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
17:49 andreoss damn
17:49 andreoss m: multi foo(Numeric) { "Numeric" }; multi foo(Str) { "Str" } ; say foo(1.2)
17:49 camelia rakudo-moar 7d4b3a: OUTPUT«Numeric␤»
17:50 andreoss why this doesn't work with MAIN?
17:50 andreoss # perl6 -e 'multi MAIN(Numeric) { "Numeric" }; multi MAIN(Str) { "Str" } ;' 1.2
17:50 [Coke] main is taking IntStrs.
17:50 [Coke] or other *Strs.
17:51 [Coke] that'd be my guess.
17:51 geekosaur command line parameters are strings
17:51 geekosaur inferring them as something else is problematic at best
17:52 andreoss geekosaur: so MAIN(Int $s) means nothing?
17:52 masak m: perl6 -e 'multi MAIN(Numeric $x) { say $x }; multi MAIN(Str $s) { say "str $s" }; 1.4
17:52 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VxNI2v8g99␤Two terms in a row␤at /tmp/VxNI2v8g99:1␤------> 3perl6 -e7⏏5 'multi MAIN(Numeric $x) { say $x }; mul␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤  …»
17:52 masak m: multi MAIN(Numeric $x) { say $x }; multi MAIN(Str $s) { say "str $s" }
17:52 camelia rakudo-moar 7d4b3a: OUTPUT«Usage:␤  /tmp/s4ieHhCYCV <x> ␤  /tmp/s4ieHhCYCV <s> ␤»
17:53 [Coke] multi MAIN (Numeric $x) { say "got Numeric"; }; multi MAIN ($x)  { say "Got something"; }
17:53 psch m: multi MAIN(Numeric $x) { say $x }; multi MAIN(Str $s) { say "str $s" }; MAIN <1.4>
17:53 camelia rakudo-moar 7d4b3a: OUTPUT«Ambiguous call to 'MAIN'; these signatures all match:␤:(Numeric $x)␤:(Str $s)␤  in block <unit> at /tmp/dExw5grWUp line 1␤␤»
17:53 [Coke] ^^ that works, though. not sure what your issue is.
17:53 geekosaur I would guess that, in absence of a Str multi, it would convert. but if a multi accepts Str then it probably gets it directly
17:53 psch m: say <1.4>.WHAT
17:53 camelia rakudo-moar 7d4b3a: OUTPUT«(RatStr)␤»
17:53 [Coke] yes, a RatStr is a Str.
17:53 geekosaur because there is no way to specify whether the 1.4 you passed there was intended to be a number or a string
17:53 psch [Coke]: so MAIN as entry point does something extra to resolve that dispatch..?
17:54 [Coke] note that my second one isn't a string.
17:54 [Coke] if you change ($x) to (Str $x) you get "ambiguous call"
17:54 psch [Coke]: right.  i suppose what i'm really wondering is what exactly in andreoss' "why doesn't it work with MAIN" that doesn't work :)
17:54 [Coke] nothing extra, it's just a multi
17:54 [Coke] andreoss: perhaps gist the exact problem.
17:54 psch s/exactly/exactly it is/
17:55 [Coke] m: multi MAIN (Numeric $x) { say "got Numeric"; }; multi MAIN ($x)  { say "Got something"; }; MAIN(<1.2>); MAIN("x")
17:55 camelia rakudo-moar 7d4b3a: OUTPUT«got Numeric␤Got something␤Usage:␤  /tmp/dtO1ocuZUI <x> ␤  /tmp/dtO1ocuZUI <x> ␤»
17:56 andreoss http://paste.debian.net/423049/
17:57 andreoss Numeric case can't get match
17:57 andreoss *matched
17:58 [Coke] what are you invoking it with on the command line?
17:59 [Coke] I get "Ambiguous call to 'MAIN'; these signatures all match"
17:59 [Coke] which is exactly correct.
17:59 [Coke] (if annoying)
18:00 [Coke] remove the "Str" from the second sub's signature.
18:00 andreoss it works. but what the type is now?
18:01 geekosaur probably Str. the difference is that, it having not specified the type, it no longer ties with the Numeric one
18:02 [Coke] andreoss: you can easily check the type, but it's Str.
18:02 [Coke] Do you get why it's a tie for MAIN args?
18:03 andreoss works with MAIN(Any) too
18:03 andreoss m: say Numeric.^mro, Str.^mro
18:03 camelia rakudo-moar 7d4b3a: OUTPUT«Method 'mro' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/nWOFwJytY4 line 1␤␤»
18:04 [Coke] m: my $main-arg=<1.2>; say $main-arg ~~ Numeric; say $main-arg ~~ Str
18:04 camelia rakudo-moar 7d4b3a: OUTPUT«True␤True␤»
18:04 [Coke] m: my $main-arg=1.2; say $main-arg ~~ Numeric; say $main-arg ~~ Str
18:04 camelia rakudo-moar 7d4b3a: OUTPUT«True␤False␤»
18:04 andreoss i get it
18:04 [Coke] ok.
18:05 andreoss why just don't consider the first multi as a match?
18:06 psch m: multi f(Mu \x) { "Mu" }; multi f(Str $x) { "Str" }; f "foo"
18:06 camelia rakudo-moar 7d4b3a: ( no output )
18:06 [Coke] because they both match.
18:07 psch "the first" would always match Mu there
18:07 [Coke] How can we know you didn't mean *any* string on the second one?
18:07 [Coke] If you want "any str that isn't also a Numeric" you can make a subset for that.
18:08 andreoss order of multies doesn't matter at all?
18:08 geekosaur right. Haskell does provide a way to do that, btw (OVERLAP pragma); both the class and any overlapping instances must opt in, to avoid unexpected behavior
18:08 [Coke] andreoss: not if they're both an exact match, no
18:08 geekosaur I personally think order of declaration mattering is a really *bad* idea
18:09 leont joined #perl6
18:09 TimToady order only matters if there are extra constraints
18:09 yoleaux 29 Mar 2016 21:17Z <ab5tract> TimToady: I might have found another mistaken 'useless use in sink context' warning: 'm: my $f = '25 25 25'; $f ~~ s:nth(*-1)[\d+] = 42; say $f'
18:09 [Coke] (as I understand it, could be wrong)
18:09 timotimo order of multies is important mostly for methods with named arguments
18:09 TimToady nominal matching is unordered
18:10 geekosaur sorry, no, thinko. OVERLAP allows Perl 6's more-specific behavior. This is IncoherentInstances and that is considered a really bad idea for really good reasons
18:11 dvinciguerra joined #perl6
18:12 [Coke] andreoss: subset StrOnly where {$_ ~~ Str && $_ !~~ Numeric}; multi MAIN(StrOnly $interval) ...
18:12 [Coke] You could go further and make sure that the String matches your format required for strings also, and emit the usage if not.
18:16 leont joined #perl6
18:17 cdg joined #perl6
18:22 TreyHarris I was interested to see ordering of multis matters for named arguments even when arity is different. "multi sub dwim(:$foo) {...} multi sub dwim(:$foo, :$bar)" doesn't work, the first is always called even in the presence of :bar
18:25 nadim joined #perl6
18:25 TreyHarris (you also need to specify :D on :bar or even with the correct ordering it doesn't work, everything goes to the first one)
18:27 psch m: multi sub dwim(:$foo) { "foo" }; multi sub dwim(:$foo, :$bar) { "foobar" }; say dwim :foo, :bar
18:27 camelia rakudo-moar 7d4b3a: OUTPUT«foobar␤»
18:27 psch m: class C { multi method dwim(:$foo) { "foo" }; multi method dwim(:$foo, :$bar) { "foobar" }; }; say C.dwim: :foo, :bar
18:27 camelia rakudo-moar 7d4b3a: OUTPUT«foo␤»
18:28 psch m: class C { multi method dwim(:$foo) { "foo" }; multi method dwim(:$foo, :$bar!) { "foobar" }; }; say C.dwim( :foo, :bar )
18:28 camelia rakudo-moar 7d4b3a: OUTPUT«foo␤»
18:28 masak TreyHarris: I think that's when ordering matters. if you re-oreder those, you get the other one being called all the time.
18:28 TreyHarris yes, it was a multi method now that I look at the code in question
18:29 masak TreyHarris: also, in Perl 6, if you write several sub/method declarations on the same line, you need a semicolon to separate them
18:29 TreyHarris masak: oh, using ! instead of :D is clearer, obviously. didn't think of that
18:30 masak that wasn't me, that was psch :)
18:30 TreyHarris masak: sorry, I wasn't meaning to quote literal code, just separate it from the English surrounding it.
18:30 masak oh, ok
18:30 TreyHarris psch: indeed, that's better :)
18:32 vendethiel .tell hoelzro http://hoelz.ro/blog/bindi​ng-to-cpp-with-nativecall you probably want noexcept instead of throw() :)
18:32 yoleaux vendethiel: I'll pass your message to hoelzro.
18:33 hoelzro vendethiel: thanks! what's the difference? just C++11 version of throw (), or is there more to noexcept?
18:33 yoleaux 18:32Z <vendethiel> hoelzro: http://hoelz.ro/blog/bindi​ng-to-cpp-with-nativecall you probably want noexcept instead of throw() :)
18:33 vendethiel throw() is deprecated and will probably be removed in C++17 (well, actually, I think the paper was declined, but a lot of people are pushing to get a different kind of system instead)
18:35 dupa joined #perl6
18:35 buharin joined #perl6
18:35 vendethiel (so it's more of a general "warning" against throw(...), "throw()" is the only "good" case and that's why noexcept was added. noexcept also can be used to query the value
18:35 vendethiel i.e. noexcept(sizeof(T) < 4 && noexcept(fn()))
18:43 Ven joined #perl6
18:43 masak this is a lovely little project: https://github.com/thejamesk​yle/the-super-tiny-compiler
18:43 masak HN: https://news.ycombinator.com/item?id=11395656
18:44 masak recommended reading for anyone who's ever wanted to jump into compilers but wasn't sure where to start
18:47 masak the comments in the code are very friendly -- in fact, they're exemplary
18:49 Guest73352 m: say (1, 22/7, 42, 300).first: * > 5, :kv, :end; # doesn't work for some reason
18:49 camelia rakudo-moar 7d4b3a: OUTPUT«Unexpected adverb 'kv' passed to first :end on List␤  in block <unit> at /tmp/H_nj45b8zZ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/H_nj45b8zZ line 1␤␤»
18:49 Guest73352 anyone know why
18:50 moritz m: say (1, 22/7, 42, 300).first: * > 5, :kv
18:50 camelia rakudo-moar 7d4b3a: OUTPUT«Unexpected adverb 'kv' passed to first on List␤  in block <unit> at /tmp/bJq3SgpmDu line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/bJq3SgpmDu line 1␤␤»
18:50 moritz m: say (1, 22/7, 42, 300).first: * > 5
18:50 camelia rakudo-moar 7d4b3a: OUTPUT«42␤»
18:50 moritz m: say (1, 22/7, 42, 300).first: * > 5, :end
18:50 camelia rakudo-moar 7d4b3a: OUTPUT«300␤»
18:50 moritz m: say (1, 22/7, 42, 300).first: * > 5, :kv
18:50 camelia rakudo-moar 7d4b3a: OUTPUT«Unexpected adverb 'kv' passed to first on List␤  in block <unit> at /tmp/we9Riz2lcS line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/we9Riz2lcS line 1␤␤»
18:50 masak Guest73352: .first doesn't seem to have a :kv
18:50 moritz right
18:50 masak Guest73352: arguably it should
18:50 masak I looked at the source. it doesn't.
18:51 masak IMO, .first ought to have everything .grep hs
18:51 masak has*
18:51 Guest73352 according to the docs :kv should be there
18:51 labster joined #perl6
18:51 masak a rare case of the docs being ahead :P
18:51 Guest73352 :-)
18:52 * masak .oO( quick, down-date the docs! ) :P
18:53 Guest73352 will it magically appear in the future you think?
18:55 moritz Guest73352: depends on whether lizmat backlogs and reads this conversation :-)
18:57 Guest73352 let's hope she does or I might have to report it somewhere :-)
18:59 masak http://knowyourmeme.com/memes/wh​y-not-both-why-dont-we-have-both
19:00 * masak .oO( ¿Por qué no las dos? )
19:05 ufobat joined #perl6
19:10 Ven joined #perl6
19:16 Xliff_z_OUT in "perl6 -V" what variable would be the equivalent of perl5's default @INC?
19:16 masak @*INC
19:17 vendethiel there are dongers in that compiler
19:17 moritz masak: @*INC is gone
19:17 masak oh!
19:17 masak <!-- Static navbar -->
19:17 masak <nav class="navbar navbar-default">
19:17 masak <div class="container-fluid">
19:17 masak <div class="navbar-header">
19:17 masak <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
19:17 moritz m: say $*REPO.repo-chain
19:17 masak <span class="sr-only">Toggle navigation</span>
19:17 camelia rakudo-moar 7d4b3a: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-​m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m​-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQ…»
19:17 masak <span class="icon-bar"></span>
19:17 masak <span class="icon-bar"></span>
19:17 masak <span class="icon-bar"></span>
19:17 masak </button>
19:17 vendethiel oops :)
19:17 masak <a class="navbar-brand" href="#">Kenya Believe It!</a>
19:17 vendethiel masak pulling a dalek
19:17 masak </div>
19:17 masak <div id="navbar" class="navbar-collapse collapse">
19:17 diakopter lolz
19:17 masak <ul class="nav navbar-nav">
19:17 masak <li class="active"><a href="#">Tours</a></li>
19:17 vendethiel masak: sometimes it's just better to close the IRC client :P
19:17 masak <li><a href="#">My Bookings</a></li>
19:17 Xliff_z_OUT aaiee!
19:17 masak </ul>
19:17 huf will the send queue never end?
19:17 masak <ul class="nav navbar-nav navbar-right">
19:17 Xliff_z_OUT masak flood!
19:17 masak <li><a href="#"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span> Cart</a></li>
19:17 masak </ul>
19:17 masak </div>
19:18 masak </div>
19:18 masak was kicked by moritz: masak
19:18 diakopter even if he closes irc, there's likely still lots of stuff queued somewhere
19:18 masak joined #perl6
19:18 masak sorry about that
19:18 vendethiel look, it's all good now :P
19:18 mst diakopter: nah, a /kick will clear that queue
19:18 moritz diakopter: that's why a kick seemed to be best solution :-)
19:18 mst that's why you /kick rather than +b
19:18 mst #ircopslyfe #themoreyouknow
19:18 vendethiel poor mohae :P
19:18 masak yes, I'm currently writing Bootstrap :P
19:19 mst masak: remember to replace the grid with something else (pocketgrid is ok)
19:19 mst bootstrap with its own grid is an Error
19:19 masak I... see.
19:19 masak irssi is great, by the way
19:19 yqt joined #perl6
19:20 masak -!- Irssi: Pasting 25 lines to #perl6. Press Ctrl-K if you wish to do this or Ctrl-C to cancel.
19:20 masak it's just me who is an idiot
19:20 huf it tries
19:20 masak I pressed Ctrl-K :(
19:20 huf :)
19:20 masak it means Kancel, right?
19:20 moritz lol
19:20 huf kanker
19:20 [Coke] Kick me
19:20 diakopter Kancowl
19:21 moritz kool bean
19:21 geekosaur release the Kraken <.<
19:21 mst that's not bad rum, actually
19:21 huf i dont remember who has the ability to control kaa in the jungle book
19:31 spider-mario joined #perl6
19:32 Actualeyes joined #perl6
19:32 Xliff What is the format to check if a class has a method defined?
19:32 Xliff ClassInst.?meth
19:32 Xliff ?
19:33 Vlavv_ joined #perl6
19:33 Xliff m: say Match.?eqv
19:33 camelia rakudo-moar 7d4b3a: OUTPUT«Nil␤»
19:33 Xliff m: say Match.?perl
19:33 camelia rakudo-moar 7d4b3a: OUTPUT«Match␤»
19:33 Xliff m: say Match.?gist
19:33 camelia rakudo-moar 7d4b3a: OUTPUT«(Match)␤»
19:33 Xliff m: say Match.?bob
19:33 camelia rakudo-moar 7d4b3a: OUTPUT«Nil␤»
19:34 geekosaur that isn't check if defined, it's call-if-defined-else-nil
19:35 moritz m: say so  Match.can('gist')
19:35 camelia rakudo-moar 7d4b3a: OUTPUT«True␤»
19:35 moritz m: say so Match.can('bob')
19:35 camelia rakudo-moar 7d4b3a: OUTPUT«False␤»
19:35 psch m: say Match.^can('gist') eqv Match.can('gist')
19:35 camelia rakudo-moar 7d4b3a: OUTPUT«True␤»
19:35 psch why do those do the same, ooc?
19:36 moritz psch: probably hysterical raisins
19:37 moritz I'd be fine with only having the MOP variant
19:37 tony-o m: class A { }; class B { method a { } }; say A.^can("a"); say B.^can("a");
19:37 camelia rakudo-moar 7d4b3a: OUTPUT«()␤(a)␤»
19:38 tony-o Xliff^
19:38 Xliff tony-o, Thanks.
19:39 Ven joined #perl6
19:42 ZoffixWin joined #perl6
19:42 ZoffixWin joined #perl6
19:43 ufobat after writing p5 code for the whole day i started to use -> for method invokation again ;.(
19:43 moritz ufobat: it takes some time to get used to the language switching :/
19:44 leont Try C/C++, where they both exist ;-)
19:44 Xliff What is "so"
19:44 masak I find language switching gets easier the more one does it
19:44 masak Xliff: it's like prefix:<?>
19:44 masak but much looser
19:44 Xliff m: sat Match.can('gist')
19:44 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BLBQPi5ili␤Undeclared routine:␤    sat used at line 1. Did you mean 'set', 'say'?␤␤»
19:44 moritz switching between Perl 6 and python, I tend to forget to add 'self' in the parameter list
19:44 Xliff m: say Match.can('gist')
19:44 camelia rakudo-moar 7d4b3a: OUTPUT«(gist gist gist)␤»
19:45 Xliff m: say so Match.can('gist')
19:45 camelia rakudo-moar 7d4b3a: OUTPUT«True␤»
19:45 moritz also, http://doc.perl6.org/language/faq#What_is_so%3F
19:45 Xliff OK. That's what I was missing.
19:45 Xliff moritz, Thank you.
19:46 Xliff So put changed Match.pm in wrong place and .... as expected... getting odd test results.
19:46 Xliff Placing it in right place solved the problem *sigh*
19:47 Xliff There are too many places where rakudo src exists in .rakudobrew
19:48 raoulvdberge joined #perl6
19:49 dalek ecosystem: e744dd3 | (Martin Barth)++ | META.list:
19:49 dalek ecosystem: Update META.list
19:49 dalek ecosystem:
19:49 dalek ecosystem: Add Time::Crontab to ecosystem
19:49 dalek ecosystem: See https://github.com/ufobat/p6-time-crontab
19:49 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e744dd33a2
19:49 dalek ecosystem: 7afc976 | (Zoffix Znet)++ | META.list:
19:49 dalek ecosystem: Merge pull request #185 from ufobat/master
19:49 dalek ecosystem:
19:49 dalek ecosystem: Update META.list
19:49 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/7afc976956
19:54 ufobat whee!
19:55 masak ufobat: that's you?
19:55 ufobat i am afraid, yes :(
19:55 masak oh, clearly yes
19:55 masak given the github URL :)
19:55 masak looks like nice code
19:56 ufobat the module is my approach to learn perl6
19:56 masak I don't cuddle my elses, but people vary in that regard
19:56 masak it's mostly because I read "Perl Best Practices" long ago :)
19:56 masak (and I bought the argument in there)
19:56 ufobat thank you, but i guess there is still much to do better. i am currently working on the method next-datetime to figure out which is the next date after $something
19:56 dvinciguerra joined #perl6
20:00 moritz m: say Datetime.now.delta(days => 1)
20:00 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AxwH9vsY0d␤Undeclared name:␤    Datetime used at line 1. Did you mean 'DateTime'?␤␤»
20:00 moritz m: say DateTime.now.delta(days => 1)
20:00 camelia rakudo-moar 7d4b3a: OUTPUT«Method 'delta' not found for invocant of class 'DateTime'␤  in block <unit> at /tmp/9rjJPnkQmZ line 1␤␤»
20:00 moritz m: say DateTime.now.later(days => 1)
20:00 camelia rakudo-moar 7d4b3a: OUTPUT«2016-04-01T22:00:36.511876+02:00␤»
20:00 moritz m: say Date.today.later(days => 1)
20:00 camelia rakudo-moar 7d4b3a: OUTPUT«2016-04-01␤»
20:01 moritz m: say Date.today + 1
20:01 camelia rakudo-moar 7d4b3a: OUTPUT«2016-04-01␤»
20:01 moritz ufobat: does any of those answer your question? :-)
20:01 ufobat ah no
20:01 ufobat i was thinking of my time::crontab
20:04 ufobat given a "10 10 * */2 *" what next after DateTime.now, thats what i meant
20:08 ZoffixWin m: say v6 before v6.c
20:08 camelia rakudo-moar 7d4b3a: OUTPUT«False␤»
20:08 ZoffixWin ufobat, ^ that's how Perl sees your "perl" version in META for that module. Plain 6 is after 6.c.
20:08 ZoffixWin You may wanna change yours to 6.* or 6.c
20:09 psch m: say DateTime.now.later(months => 2)
20:09 camelia rakudo-moar 7d4b3a: OUTPUT«2016-05-31T22:09:14.555494+02:00␤»
20:10 masak m: say DateTime.now.later(:2months)
20:10 camelia rakudo-moar 7d4b3a: OUTPUT«2016-05-31T22:10:46.768683+02:00␤»
20:11 ZoffixWin m: say DateTime.now.later: :2months
20:11 camelia rakudo-moar 7d4b3a: OUTPUT«2016-05-31T22:11:09.346483+02:00␤»
20:11 ZoffixWin :O
20:11 ZoffixWin *:D
20:12 masak m: my &later = DateTime.now.can("later")[0]; say later DateTime.now, :2months
20:12 camelia rakudo-moar 7d4b3a: OUTPUT«2016-05-31T22:12:22.039022+02:00␤»
20:14 masak m: my &later = -> $_ = DateTime.now, *%_ { .later: |%_ }; say later :2months
20:14 camelia rakudo-moar 7d4b3a: OUTPUT«2016-05-31T22:14:36.916353+02:00␤»
20:17 tony-o p cool
20:20 tony-o m: say DateTime.later: :13months
20:20 camelia rakudo-moar 7d4b3a: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/548UvfnK_9 line 1␤␤»
20:20 tony-o sweet
20:20 cdg joined #perl6
20:20 tony-o m: say DateTime.now.later: :13months
20:20 camelia rakudo-moar 7d4b3a: OUTPUT«2017-04-30T22:20:35.996770+02:00␤»
20:20 * tony-o goes to look at DateTime source
20:22 ufobat ZoffixWin, you mean the "perl" : "6" should be "perl" : "6.c"?
20:22 cdg joined #perl6
20:22 ZoffixWin ufobat, yes
20:23 RabidGravy tadzik, I just popped a tiny PR to JSON::Unmarshal when you have a minute
20:23 ufobat i am wondering, most other META files dont even have a "perl" in it, should i better remove it as well?
20:24 ZoffixWin ufobat, it's a mandatory key.
20:24 ZoffixWin I'm unsure what the behaviour would be for when it is omitted, but the spec declares it mandatory.
20:26 labster joined #perl6
20:26 ufobat huh! where am i mistaken, but look at e.g. https://raw.githubusercontent.​com/masak/007/master/META.info or.. anything else, there is no "perl" : something
20:26 spintronic joined #perl6
20:27 espadrine joined #perl6
20:29 spintronic joined #perl6
20:30 RabidGravy right, most of the tools ignore the fact that it's missing silently, but it should be there
20:30 ZoffixWin ufobat, here's the spec that declares it mandatory: http://design.perl6.org/S22.html#perl   Sure, there are modules in the Ecosystem that don't include it. Sure, our current tools likely ignore the value of the 'perl' key entirely. But, the spec is the spec, and the tools might get molded to follow it with some unknown consequences for distros that omit the 'perl' key or have value '6' instead of '6.c' for it. I'm not saying your distro is
20:30 ZoffixWin uninstallable right now. I'm saying it does not confirm to the spec, thus what happens due to this non-conformance in the future is simply unknown.
20:31 * ZoffixWin would personally have the key optional, with the missing key taken to mean "any perl version"
20:32 ufobat of course i will fix it, i was just confused that all METAS I picked where wrong concerning the spec
20:32 ufobat thanks for pointing it out :)
20:34 spintronic -/exit
20:34 RabidGravy https://github.com/jonathanstowe/M​ETA6/blob/master/lib/META6.pm#L184 - If you used Test::META it would fail without it
20:36 masak I think http://design.perl6.org/S22.html#perl was added after 007's META.info, and the latter simply hasn't been updated
20:36 masak PRs welcome :)
20:36 ufobat i do use Test::META, i guess i just added the "6" without reading anything at first, after it failed
20:37 RabidGravy I'm not sure whether anything *other* then Test::META actually cares TBH
20:39 masak hm. `perl` was added back in March 2014, so I'm wrong, it seems.
20:39 pmurias joined #perl6
20:39 pmurias [Coke]: hi
20:39 masak though it has been updated lately with the 6.c and 6.d details
20:40 Ven ahoy
20:40 masak frankly I'm not sure what I ought to have done to be better informed about this `perl` thing, as a module author
20:40 masak except read S22 more carefully, I guess
20:40 pmurias [Coke]: I'll try to clean up nqp-js-io and put it up on npm or make it optional somehow
20:40 ZoffixWin masak, here you go: https://github.com/masak/007/pull/135
20:41 masak ZoffixWin: merged; thank you.
20:41 ZoffixWin \o/
20:41 jsimonet joined #perl6
20:42 pmurias [Coke]: can you clone stuff from github?
20:52 Xliff 007
20:52 Xliff Yet Another Macro Language?
20:52 Xliff Or is it a Macro Language with a Silencer?
20:53 Xliff s/Silencer/Suppresor/
20:53 agentzh joined #perl6
20:53 agentzh joined #perl6
20:55 nadim jnthn:  this is very surprizing.  this line multi sub rhs_header_filter(\r, Match $s, ($depth, i$path, $glyph, @renderings), $) compiles and runs. I don't knowif you can spot it but there is an 'i' before $path (yes I hate vi)
20:55 masak Xliff: it's kind of a sandbox for macro ideas, yes.
20:55 nadim jnthn: the surprising part is that it suns in 6 seconds while the same thing without the 'i' runs in 1.5s
20:56 masak m: sub foo(i$path) {}
20:56 camelia rakudo-moar 7d4b3a: ( no output )
20:56 perlpilot look at the sig
20:56 perlpilot I bet it's taking the leading i to be a Complex type constraint
20:56 masak m: sub foo(i$path) { say $path }; foo("hi")
20:56 camelia rakudo-moar 7d4b3a: OUTPUT«Type check failed in binding $path; expected Complex but got Str ("hi")␤  in sub foo at /tmp/ERbgTNOTH5 line 1␤  in block <unit> at /tmp/ERbgTNOTH5 line 1␤␤»
20:56 masak perlpilot: bingo.
20:57 psch m: say :(i$).perl
20:57 camelia rakudo-moar 7d4b3a: OUTPUT«:(Complex $ where { ... })␤»
20:57 psch i wonder what the where contains
20:57 masak where { $_ == i }
20:57 nadim hehe!
20:57 Xliff So here's a question. If I am making an eqv method that compares to objects.
20:57 nadim it contains something that runs very slowly I can tell you
20:57 psch m: say 1i ~~ :(i$)
20:57 camelia rakudo-moar 7d4b3a: OUTPUT«False␤»
20:57 pmurias [Coke]: make js-bootstrap; node nqp-bootstraped.js -e 'say("Hello World")', I'll updated the README tomorrow
20:57 psch m: say 0i ~~ :(i$)
20:57 camelia rakudo-moar 7d4b3a: OUTPUT«False␤»
20:57 Xliff Doesn't it make sense to start it with $self === $b where $b is the method argument?
20:58 perlpilot nadim: it's the same thing that allows this to work ...'
20:58 perlpilot m: sub foo( 42 $x) { }
20:58 camelia rakudo-moar 7d4b3a: ( no output )
20:58 nadim perlpilot: and what does "work" mean in this case+
20:58 perlpilot which, I admit, is surprising.
20:59 Xliff Er. self doesn't need a sigil, does it?
20:59 nadim Xliff: no
20:59 Xliff nadim, thx
20:59 perlpilot m: sub foo( 42 $x) { say "yay" };  foo(42); foo(35)
20:59 camelia rakudo-moar 7d4b3a: OUTPUT«yay␤Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/ZWhgRP8HMa line 1␤  in block <unit> at /tmp/ZWhgRP8HMa line 1␤␤»
20:59 psch m: multi f (Int $) { "some Int" }; multi f (42) { "Life, the universe, and everything" }; say f 12; say f 42
20:59 camelia rakudo-moar 7d4b3a: OUTPUT«some Int␤Life, the universe, and everything␤»
21:00 psch thing is
21:00 psch constants are valid type constraints
21:00 masak unless they start with a minus sign
21:00 skids joined #perl6
21:00 psch and types are constants, kind of
21:01 nadim how is 42 or i a constraint?
21:01 psch nadim: kinda the same way Str is
21:01 psch i mean, maybe constraint isn't quite the right word there
21:02 masak it's kind of a pretend-that-this-value-is-a-type thing
21:02 psch m: sub f(-42) { }; f 12
21:02 camelia rakudo-moar 7d4b3a: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in sub f at /tmp/1tixu0JZPH line 1␤  in block <unit> at /tmp/1tixu0JZPH line 1␤␤»
21:02 psch m: sub f(-42) { }; f -42
21:02 camelia rakudo-moar 7d4b3a: ( no output )
21:02 masak oh, that works now? nice.
21:02 masak someone++
21:02 [Coke] .tell pmurias I can do it when not at work, but I can also do it at work if I use certain URLs.
21:02 yoleaux [Coke]: I'll pass your message to pmurias.
21:03 psch masak: i'm kinda thinking the other way around, fwiw.  like, to install an anon class into the lexpad you assign it to a constant, so constants are the same as types (on some level)
21:03 * nadim is checking all the spurious 'i' to speedup his code
21:03 [Coke] pmurias++ more JS goodness.
21:03 psch m: constant Foo = class { method foo { "bar" } }; sub f(Foo $) { }; f Foo.new
21:03 camelia rakudo-moar 7d4b3a: ( no output )
21:03 Actualeyes joined #perl6
21:03 Xliff https://gist.github.com/Xliff/29071​06c84e9eb14d4c0#gistcomment-1739145
21:03 agentzh joined #perl6
21:03 psch and clearly literals are constants in the same sense
21:04 nadim I can conceptualize 42 $something but 'i' is kinda barewordy
21:05 psch m: say i
21:05 camelia rakudo-moar 7d4b3a: OUTPUT«0+1i␤»
21:05 psch m: say i.perl
21:05 camelia rakudo-moar 7d4b3a: OUTPUT«<0+1i>␤»
21:05 psch m: say i.WHAT
21:05 camelia rakudo-moar 7d4b3a: OUTPUT«(Complex)␤»
21:05 nadim mehhh!
21:05 psch stupid maths!
21:06 nadim left #perl6
21:08 _nadim joined #perl6
21:10 petercommand joined #perl6
21:11 perlpilot m: sub foo(pi) { }  # there are other wordy things that can constrain, so i isn't the only one to watch out for  :-)
21:11 camelia rakudo-moar 7d4b3a: ( no output )
21:15 masak m: sub foo(NaN) { }
21:15 camelia rakudo-moar 7d4b3a: ( no output )
21:16 geekosaur nancy typing perl 6 style
21:35 ufobat good night!
21:38 sufrostico joined #perl6
21:38 sufrosti1o joined #perl6
21:39 tphilipp joined #perl6
21:40 cdg joined #perl6
21:45 Cabanossi joined #perl6
21:47 dalek doc: f711a3a | (Wenzel P. P. Peppmeyer)++ | doc/Language/ (2 files):
21:47 dalek doc: X<C<foo>|foo> requires the alternate name
21:47 dalek doc: review: https://github.com/perl6/doc/commit/f711a3a936
21:56 Actualeyes joined #perl6
21:59 tphilipp left #perl6
22:01 lizmat joined #perl6
22:01 AlexDaniel joined #perl6
22:02 tony-o does passing a set to a function run that function in parallel for items in the set?
22:02 lizmat tony-o: why would it ?
22:02 psch tony-o: a set is a normal object
22:02 lizmat a set is not a junction
22:02 psch tony-o: you might be thinking of junctions
22:02 psch lizmat++
22:02 psch :)(
22:02 tony-o mm, i am thinking of junctions
22:04 MadcapJake how experimental is the cached trait?
22:04 psch m: sub f is cached { rand }
22:04 camelia rakudo-moar 7d4b3a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YUa0UHaGoM␤Use of the 'is cached' trait is experimental; please 'use experimental :cached'␤at /tmp/YUa0UHaGoM:1␤»
22:05 psch MadcapJake: i think all the experimental things are "we want to have this but aren't completely sure how the semantics and implementation have to look"
22:05 psch MadcapJake: iirc there was discussion for something in modulespace recently
22:06 MadcapJake hmm
22:06 psch MadcapJake: https://github.com/azawawi/perl6-memoize
22:06 psch not sure where i saw the discussion or how long ago "recently" actually was... :)
22:07 psch there's probably a lot to find in the clog, anyway
22:08 MadcapJake yeah found something from the memoize repo
22:08 MadcapJake lizmat: does cached work a little or is it really not good to try?
22:09 lizmat is cached works, for what it is supposed to do
22:09 ecojud joined #perl6
22:10 MadcapJake cool, I have a list of objects and I just want to make sure it only runs the operation if the list changes
22:10 MadcapJake (only in size)
22:10 psch m: use experimental :cached; sub f($) { say "calculating..."; sleep 2; "done" }; say f("foo"); say f("foo")
22:10 camelia rakudo-moar 7d4b3a: OUTPUT«calculating...␤done␤calculating...␤done␤»
22:10 psch oh duh
22:10 psch actually use the trait, me...
22:10 psch m: use experimental :cached; sub f($) is cached { say "calculating..."; sleep 2; "done" }; say f("foo"); say f("foo")
22:11 camelia rakudo-moar 7d4b3a: OUTPUT«calculating...␤done␤done␤»
22:11 psch i also have to admit i forgot a lot of what the discussion was about
22:12 psch i think what Memoize eventually wants to solve is the process boundary, but i might be misremembering
22:12 _nadim do we have an equivalent of Xpath for data in P6?
22:14 masak not yet
22:14 masak 'night, #perl6
22:14 timotimo cat says: ecwoooooooooooooooooooooooooo​oooooooooooooooooooooooooooo
22:14 mst timotimo: say *meow* back from me
22:15 Xliff _nadim, you mean like LINQ for C#?
22:15 MadcapJake can you create a subset inside a class context? i.e., have access to self?
22:16 MadcapJake has?
22:16 Xliff _nadim, Actually would love to have XPath for P6 period. Or better yet... Xquery
22:16 Xliff Is there a good primer for learning how to wrap C++ libraries for P6?
22:17 timotimo i did, mst
22:17 Xliff Because there is the XQuilla project which looks like a good target.,
22:18 psch m: class A { my $subset; method set-subset { $subset := subset :: of Int where * > 0 }; method subset { $subset } }; A.set-subset; say 2 ~~ A.subset
22:18 camelia rakudo-moar 7d4b3a: OUTPUT«True␤»
22:18 Xliff Man, the web is slow, today
22:18 * leont still doesn't believe good C++ will be wrappable
22:18 leont Though C-with-classes might
22:19 psch MadcapJake: not sure what exactly you'd need self for.  if you want to build a subset relying on attributes it can't be a class variable like it is in my example
22:19 psch s/'d//
22:20 pdcawley joined #perl6
22:20 Xliff leont, why do you believe that?
22:20 leont What would you do with say rvalue references?
22:20 leont Or templates
22:21 MadcapJake yeah that's what I want, I was able to due an anon subset inside a method signature, that seems to allow access to self
22:21 Xliff Good questions. Depends on what they are used for.
22:21 Xliff I won't want to wrap the entire library. Just the important bits that would be useful.
22:21 psch m: class A { has $.foo; my $subset; method subset { $subset }; method set-subset { $subset = subset :: of A where *.foo < 5 } }; A.set-subset; my $x = A.new(:foo(5)); say $x ~~ A.subset;
22:21 camelia rakudo-moar 7d4b3a: OUTPUT«False␤»
22:21 psch MadcapJake: ^^^ that?
22:21 leont I'm sure you can wrap a useful subset, but you wouldn't be able to wrap the sort of thing I'd typically use C++ for
22:21 psch MadcapJake: oh, just putting the subset into the sig, yeah
22:21 Xliff Though c++ libs are more likely to be better served by perl6 than perl5.
22:22 timotimo clearly we want Inline::Cpp::GCC or Inline::Cpp::CLang or something
22:22 timotimo so that we can use templates and such
22:22 Xliff leont, most c++ projects are probably better done as c-with-classes.
22:22 leont I strongly disagree on that!
22:23 Xliff *shrug*
22:23 leont If I want that, I'd use plain old C without classes
22:23 leont Classes are pretty much the least interesting feature in C++ IMO
22:24 leont It's not coincidence C++ has been slowly moving towards more functional styles
22:24 leont *a
22:25 timotimo what kinds of things do you enjoy in C? all i can think of would be the STL or Qt, and those are quite very classes-stuff
22:25 timotimo class-related?
22:26 leont STL uses classes as types, but doesn't really use typical OO features like inheritance much, prefering techniques like templates
22:26 timotimo mhm
22:27 leont non-virtual methods are really just functions with a funny namespace
22:27 Xliff For a first draft XQuilla module, I'd only want something that could take an XQuery expression, and use it to parse a document and give me the resultset.
22:27 Xliff I think something like that would be great for perl6.
22:28 Xliff API example: http://xqilla.sourceforge.net/docs/simple-​api/simple-context-item_8cpp-example.html
22:33 _nadim Xliff: then you know what your next module should be :9
22:33 kid51 joined #perl6
22:34 Xliff _nadim, do you have a link to something that gives the general gist of how to wrap C++ code for Perl6?
22:34 Xliff I've never done it before, but wouold be willing to try.
22:36 autarch joined #perl6
22:40 psch Xliff: https://github.com/rakudo/rakudo/blob/​nom/t/04-nativecall/13-cpp-mangling.t is probably the barest of starts
22:40 psch well, except if "wrap" means more than "bind it with NativeCall" :)
22:43 dalek joined #perl6
22:45 dvinciguerra_ joined #perl6
22:45 jamesalbert joined #perl6
22:47 jamesalbert Hey, I ported a perl 5's JSON::WebToken to perl 6 and all the tests are done and passing using prove, but travis-ci is failing saying "Parse errors: No plan found in TAP output". Could I get some help with this and also putting it out in the ecosystem?
22:48 timotimo sure, can you give us a link to travis' output?
22:48 jamesalbert Awesome, thanks! Yes https://travis-ci.org/jamesalbert/JSON-WebToken
22:50 timotimo oh, does -Ilib,t actually work?
22:50 timotimo oh, it does!
22:51 tardisx joined #perl6
22:51 jamesalbert At least on my end it does =] first time using travis-ci btw
22:52 timotimo "no plan found in tap output" usually means you're getting some kind of error output and an exit, and prove doesn't like that
22:52 timotimo it should be possible to tell prove with some flag to give you all the output, so we can see what that error message is
22:52 timotimo that'll get us much further, i expect
22:52 pdcawley joined #perl6
22:54 jamesalbert Here let me set it to verbose and get rid of --rc option (it seems to pick up .proverc by default)
22:54 timotimo i didn't know about proverc yet
22:54 Actualeyes joined #perl6
22:54 dvinciguerra__ joined #perl6
22:57 jamesalbert you what else else is that I was using some options in the .proverc from the previous repo so that might be it, running it now
22:59 sortiz joined #perl6
23:00 timotimo you what else mate? :P
23:00 sortiz \o #perl6
23:00 timotimo hello sortiz!
23:01 timotimo aha!
23:01 timotimo you're just missing JSON::Fast
23:01 timotimo and probably all the other things, too
23:01 timotimo so i suppose you'll want to "panda install-deps ." before running prove
23:01 jamesalbert derp a lerp
23:01 timotimo sorry, "installdeps" is the name
23:01 jamesalbert wow thank you I'll add that
23:01 perlawhirl joined #perl6
23:02 timotimo um, wait, perhaps you'll also need "rakudobrew build panda"
23:02 jamesalbert add that as the last item in scripts in travis.yml?
23:02 jamesalbert oh no not last
23:02 jamesalbert so it would be:
23:02 jamesalbert - rakudobrew build panda
23:03 jamesalbert - panda installdeps .
23:03 jamesalbert - prove
23:03 timotimo sounds about right
23:03 jamesalbert awesome, I'll try that
23:03 timotimo perhaps we have some other flags travis understands, though. haven't used travis much myself, tbh
23:05 tphilipp joined #perl6
23:05 TimToady .tell ab5tract The optimizer was not quite the best place to fix the Useless use, so I cleaned it up for you.  Thanks.
23:05 yoleaux TimToady: I'll pass your message to ab5tract.
23:06 jamesalbert yeah me neither, we'll see what happens though in a couple minutes...
23:06 sortiz timotimo, do you know if rakudo uses some kind of shared table for store strings literals?
23:07 timotimo yeah, every precompiled .moarvm file has a "string heap" at its start
23:07 timotimo so literals in the code are deduplicated
23:07 timotimo everything after that is fair game for generating lots and lots of redundant copies of strings
23:09 sortiz Aha!, that explain the bug I found yesterday, Tnks.
23:09 timotimo oh?!
23:10 diakopter there's an argument for string de-duping in a background thread (as well as during SC loading), which (assisted by the GC) could save both memory and GC time
23:11 sortiz The problem isn't the deduplication, that seems perfect.
23:12 diakopter obviously it wouldn't dedupe Str objects, it would dedupe VMString objects
23:12 diakopter sortiz: okay. I was just opining for some future work
23:12 sortiz The problem is that 'explicitly-manage' is evil :-)
23:13 sortiz If you pass to them one Str var originated in a literal, all other instances are affected!
23:13 timotimo oh, that's ... funnny
23:14 perlawhirl hi perlers
23:14 sortiz Yep, The weird "action at distance" bug I ever found!
23:15 diakopter sortiz: can you make a good bug reproduction test caes?
23:16 sortiz I'm not using explicitly-manage any more, I didn't found any valid use case for them, but was used a lot in DBDish.
23:16 sortiz diakopter, sure, I'll try.
23:16 perlawhirl can someone glance at this gist and tell me... am i missing something, or is this a bug: https://gist.github.com/0racle/0​bebed6d7f573c28d357289d04584a88
23:17 perlawhirl see first comment for output
23:17 perlawhirl the first line in the heredoc is always the missing one... whichever you put first in the heredoc
23:19 TimToady perlawhirl: 0 is false
23:19 tphilipp joined #perl6
23:19 perlawhirl of course it is!
23:19 TimToady try 'with' instead of 'if'
23:19 perlawhirl TimToady++
23:21 perlawhirl thanks... i wrote it that way initially and it wasn't working, but then i thought "oh i can just use a set intersection" but just wanted to make sure it wasn't a bug
23:21 vendethiel- joined #perl6
23:21 sortiz m: https://gist.github.com/salortiz/​202c0c871ddca049856e10a2f01664d1
23:21 camelia rakudo-moar 103781: OUTPUT«Str $var2 = "Hola a todos"␤Str+{NativeCall::ExplicitlyManagedString} $var2 = "Hola a todos"␤»
23:21 sortiz diakopter, timotimo ^^^
23:22 timotimo jamesalbert: looks much better now!
23:22 jamesalbert yo timo, thanks a lot man. Got my tests working! Now how would I go about putting this thing out into the perlosphere?
23:22 jamesalbert yes thanks to you! =]
23:22 timotimo easy, just fork perl6/ecosystem, put the URL to your meta6.json into the META.list or what it's called (follow the other lines for inspiration)
23:23 timotimo and commit it with a link to your repo (because then when the weekly report is made we can just click directly through from the commits list of ecosystem to all the new modules)
23:23 timotimo optionally, write a blog post about it, mention it here and it'll also appear in the weekly on monday/tuesday :)
23:24 jamesalbert sweetness sounds straightforward enough. Thanks a lot!
23:25 timotimo you're welcome!
23:30 sortiz otoh, Why someone needs to "explicitly-manage" a literal that can't go anywhere? :-)
23:31 sortiz And obviously a function can't know where a var was originated.
23:32 timotimo it can at least grab the .VAR itself
23:32 timotimo that doesn't have too much info, though
23:32 * timotimo gets ready for bedtime
23:34 dustinm` joined #perl6
23:34 jamesalbert updated META.list, timo you're the shit bruh. Now it's time for wienerschnitzel jalapeno tater tots drenched in tapitio
23:38 _nadim what's  a Seq.new-consumed, which has given me plenty grey hair already, for construct?
23:39 _nadim it's particularely boring as it appears when I .flat an Array
23:43 AlexDaniel joined #perl6
23:43 tphilipp joined #perl6
23:45 sortiz IMO the documentation of explicitly-manage is confused and misleading.
23:45 bbkr https://gist.github.com/bbkr/19​ba6903358445410812bc09b0c0ec9c - compile time hangs forever when using such module. I think it has something to do with warning grouping mechanism. Reproducible on OS X (.precomp cleaned before test). can anyone test this and confirm?
23:48 AlexDaniel hmm lots of new modules lately :)
23:48 sortiz _nadim, Seq.new-consumed was added by moritz++ to get a better error messages, see RT#127492
23:52 sortiz bbrk, I can 'use Foo.pm' that without problems, only lots of expected warnings.
23:53 sortiz s/that//
23:54 Sgeo__ joined #perl6
23:55 bbkr sortiz: what OS do you have?
23:56 sortiz bbrk, Linux (F23)
23:56 AlexDaniel m: say pick 42, 69 for ^100
23:56 camelia rakudo-moar 103781: OUTPUT«(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(6​9)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(​69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤​(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)␤(69)…»
23:57 bbkr sortiz: does it also work if you extend this ladder by few lines with even more ints?
23:57 _nadim sortiz: thanks. I certainly will read it as it has been bugging me all evening.
23:57 AlexDaniel m: say pick 1,42, 69 for ^10
23:57 camelia rakudo-moar 103781: OUTPUT«(42)␤(42)␤(42)␤(42)␤(4​2)␤(69)␤(42)␤(69)␤(42)␤(69)␤»

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

Perl 6 | Reference Documentation | Rakudo