Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-28

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:00 BenGoldberg Or that ;)
00:00 gfldex m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say Twostraws ~~ Enumeration;
00:00 camelia rakudo-moar f7613f: OUTPUT«False␤»
00:00 gfldex m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say Twostraws ~~ StringyEnumeration;
00:00 camelia rakudo-moar f7613f: OUTPUT«False␤»
00:00 BenGoldberg m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say Twostraws.WHAT
00:00 camelia rakudo-moar f7613f: OUTPUT«(Twostraws)␤»
00:01 grondilu maybe use "need"?  (it does not import anything)
00:01 zwu yes, something is not convenient, the name should not be conflicted internally if the compunit is used too.
00:01 BenGoldberg m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say Twostraws.^parents
00:01 camelia rakudo-moar f7613f: OUTPUT«((Str))␤»
00:01 BenGoldberg m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say Twostraws ~~ Str
00:01 camelia rakudo-moar f7613f: OUTPUT«True␤»
00:02 gfldex m: enum Twostraws (name => "twostraws", password => "fr0st1es"); say dd Twostraws;
00:02 camelia rakudo-moar f7613f: OUTPUT«Twostraws␤Nil␤»
00:02 gfldex m: enum Twostraws (name => "twostraws", password => "fr0st1es"); dd Twostraws;
00:02 camelia rakudo-moar f7613f: OUTPUT«Twostraws␤»
00:02 gfldex m: enum Twostraws (name => "twostraws", password => "fr0st1es"); dd name;
00:02 camelia rakudo-moar f7613f: OUTPUT«Twostraws::name␤»
00:04 gfldex I was under the impression that any enum implements the role Enumeration. That current behaviour makes introspection on enums tricky.
00:06 gfldex But then, S12 doesn't say anything about introspection on enums so Enumeration might just be an implementation details.
00:07 gfldex m: enum Nothing «To(1) See Here Move Along»;
00:07 camelia rakudo-moar f7613f: ( no output )
00:09 sortiz zwu, All package scoped symbols are visible without the need off 'is export'
00:12 gfldex m: class Foo {}; enum Twostraws (name => Foo.new, password => "fr0st1es"); dd name;
00:12 camelia rakudo-moar f7613f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/adei9MgTP0␤Cannot auto-generate a proto method for 'Int' in the setting␤at /tmp/adei9MgTP0:1␤»
00:12 gfldex m: class Foo {}; enum Twostraws (name => Foo.new, password => "fr0st1es");
00:12 camelia rakudo-moar f7613f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3PXB4QLwKC␤Cannot auto-generate a proto method for 'Int' in the setting␤at /tmp/3PXB4QLwKC:1␤»
00:12 gfldex that's a wee bit LTA
00:19 grondilu why do you even make enums like that?  Aren't the values supposed to be integers?
00:19 grondilu I mean seems to me it shouldn't even be allowed.
00:20 gfldex Str and Int are specced, what doesn't change the fact that this error message is LTA.
00:26 gfldex m: enum Same ( name1 => 1, name2 => 2 ); dd Same.enums;
00:26 camelia rakudo-moar f7613f: OUTPUT«{:name1(1), :name2(2)}␤»
00:26 ZoffixLappy You know what the docs need? The FULL type map.
00:27 ZoffixLappy Like, say, I want to look up all types that inherit Cool... boom, I'd look at the full map.
00:28 gfldex The docs need enums, that's for sure. I shall doc tomorrow.
00:29 gfldex The lack of docing for enum leads to much confusion. see http://stackoverflow.com/questions/3​6890756/does-perl-6-has-named-tuple
00:29 gfldex sleep&
00:30 ZoffixLappy I'm pretty impressed there are Perl 6 SO questions....
00:30 ZoffixLappy night
00:33 hotel that's gotta be a rule of the internet right? "if it exists, there is an SE question about it"
00:34 pierre_ joined #perl6
00:39 grondilu gfldex: I've never quite understood enums and last time I tried to read the synopses about it I did not find it very clear.  So yeah, more and hopefully better doc would be welcome.
00:41 hotel the word 'enum' comes from the phrase 'enumerated type'
00:42 hotel which essentially boils to the idea that there is a type that has numbered entries in it
00:45 hotel oh, I'm getting the bad file descriptor thing again :\
00:49 grondilu can you have infinite enums?  (I was wondering this few days ago)
00:49 hotel infinite?
00:50 grondilu m: enum basis ( 'e' X~ 1 .. 5 )
00:50 camelia rakudo-moar f7613f: ( no output )
00:50 grondilu m: enum basis ( 'e' X~ 1 .. 5 ); say e5
00:50 camelia rakudo-moar f7613f: OUTPUT«e5␤»
00:50 grondilu m: enum basis ( 'e' X~ 1 .. * ); say e5
00:51 hotel you broke it
00:51 camelia rakudo-moar f7613f: OUTPUT«(timeout)»
00:51 grondilu it would make some sense though
00:51 hotel not sure why you'd want an infinite enum though? they're generally used to provide a static list of constants that are associated with numerical values
00:52 hotel s/numerical/integer
00:52 ZoffixLappy New blog post: "Extra-Typical Perl 6": http://blogs.perl.org/users/zoffix_zn​et/2016/04/extra-typical-perl-6.html
00:53 grondilu I wanted something like that for my Clifford module where e0, e1, e2... are supposed to form an infinite orthonormal basis for an euclidean space.
00:54 grondilu instead I had to settle to 'constant @e = map {...}, ^Inf;'
00:54 grondilu so that instead of say 'e5' I have to type @e[5] which is quite more verbose.
00:55 grondilu ideally I guess I would have to use a parsed macro or something.
00:59 grondilu m: sub term:<> is parsed /e(\d)/ { $0 };
00:59 camelia rakudo-moar f7613f: OUTPUT«5===SORRY!5===␤Null operator is not allowed␤at /tmp/6DqkJ85YHX:1␤------> 3sub term:<>7⏏5 is parsed /e(\d)/ { $0 };␤Other potential difficulties:␤    Pair with <> really means an empty list, not null string; use :('') to represent the nu…»
01:03 BenGoldberg joined #perl6
01:03 ZoffixLappy What's 'is parsed'?
01:03 geekosaur intended for use with macros, iirc
01:04 grondilu NYI
01:04 ZoffixLappy Ah
01:04 grondilu according to S06 it can also be used for a sub.
01:04 grondilu but again, NYI
01:05 grondilu (apparently anyway, I'm no expert whatsoever)
01:05 zwu joined #perl6
01:05 grondilu if it ever is implemented, it'd be quite a powerful tool.
01:06 ZoffixLappy synopsebot6, S06:00
01:06 synopsebot6 Link: http://design.perl6.org/S06.html#line_00
01:06 grondilu and it'll make syntax highlighters cry
01:11 hotel lol
01:11 hotel so what's going on with tools/build/install-core-dist.pl:13?
01:12 hotel it's breaking my rakudo install
01:15 sortiz hotel, know problem. Try setting the env var PERL to you perl5 binary.
01:16 astj joined #perl6
01:19 hotel the path including the binary?
01:19 hotel or just where it is?
01:19 grondilu try PERL=$(which perl)
01:19 grondilu (that's what I'm trying right now)
01:20 sortiz And don't forget the 'export'.
01:20 grondilu or $ PERL=$(which perl) nice make
01:21 hotel running echo "export PERL=$(perl)" >> ~/.bashrc makes my terminal hang lol
01:22 grondilu normal you're executing a perl process
01:22 grondilu you forgot which
01:22 hotel I tried it with perl5 and ubuntu complained it didn't know what that was
01:22 geekosaur hit control-c
01:23 hotel I did
01:23 hotel I'm putting it in the bashrc manually now
01:23 geekosaur then note that it's $(which perl) not $(perl)
01:23 hotel oh
01:23 hotel oh
01:23 geekosaur so it ran perl and perl was waiting for input
01:23 hotel I was thinking "which perl" was a placeholder
01:24 grondilu lol
01:24 hotel that's why I'm running ubuntu on windows
01:24 geekosaur no, it's a way to get the full pathname for the command
01:24 grondilu hotel: are you?  that's cool.  Is it easy to setup?
01:24 hotel yeah, until you try to install perl6
01:25 geekosaur (not an ideal one but works well enough for here. "$(type -p perl)" is better usually for this usage)
01:26 sortiz The problem is a bad interaction between commits c066434 that removes 'PERL' from Makefile-common-macros.in and today 66883a4 that use it.
01:27 molaf joined #perl6
01:28 hotel oh interesting
01:28 hotel thanks
01:29 grondilu not sure about enabling developer mode on my PC.  I guess I'll stick to cygwin for now.
01:30 hotel hasn't made anything of mine explode yet, but that's understandable :)
01:30 geekosaur oh, so trying to fix one problem caused another?
01:30 geekosaur siiigh
01:31 hotel lol
01:31 hotel hm, I'm getting the same error as before with PERL in my environment variable
01:32 hotel and this time a bunch more tests were dubious
01:32 ZoffixWin joined #perl6
01:33 grondilu did you just edit .bashrc without executing it?
01:33 hotel no
01:34 hotel also closing nano closed the entire terminal so it's for sure been sourced
01:34 hotel PERL also shows up when I run export too
01:34 grondilu just check $ echo $PERL
01:34 hotel ^^
01:34 hotel although that works as well
01:40 hotel 'm'
01:41 grondilu failed for me as well
01:42 hotel bad file descriptor and everything?
01:45 hotel on the bright side, I've determined that all it takes to get Moar built on WSL is to add some LDFLAGS to the makefile
01:46 grondilu sh: 1: tools/build/create-moar-runner.pl: Permission denied
01:46 grondilu Makefile:545: recipe for target 'm-install' failed
01:46 grondilu make: *** [m-install] Error 126
01:46 hotel oh I'm getting something different
01:47 hotel https://gist.github.com/HotelCalifor​nia/5ae76dbae555397a8e0886d21bf24420
01:49 geekosaur that will be the same commit
01:50 grondilu oh it works.  Turns out I ran PERL=$(which perl) make && make install
01:50 grondilu which means $PERL was only defined for make not for make install
01:50 hotel :<
01:51 geekosaur whoops :)
01:53 hotel so what's wrong with my thing then?
01:55 geekosaur "bad file descriptor" shouldn't happen. could be you've hit a bug in the emulation environment (stuff unexpectedly closing on you also suggests this, actually)
01:57 hotel bleep bloop
01:57 hotel that's irritating
01:59 hoelzro is that PERL vs PERL5 thing in the Makefile a bug from the revert?
01:59 sortiz yep
02:00 hoelzro I'll push a fix
02:00 sortiz I made a PR.
02:00 hoelzro oh, I'll just merge that then
02:01 geekosaur I am wondering if you ran the emulator out of file table entries or something, but don't know how you'd check it :/
02:01 hoelzro sortiz++
02:01 sortiz Just finished the travis testing. :-)
02:02 hotel wondering if I did what now?
02:02 geekosaur I strongly suspect the usual way won't work, but: cat /proc/sys/fs/file-nr
02:02 hotel cat: /proc/sys/fs/file-nr: No such file or directory
02:02 geekosaur well, not so much "you" as "there's a bug in the emulation that leaks entries in the kernel file table, andyou start getting weoird file errors when the tbale fills
02:03 geekosaur was afraid of that :/
02:03 hotel hm
02:03 geekosaur no idea how you check this in the windows subsystem
02:03 hotel lshw tells me I have 1006MiB of memory when it should be around 16x that; possibly a clue as to how much memory is allocated
02:04 geekosaur right, this is different though. the kernel file table is normally fixed size (you can adjust it by hand on a real linux by changing /proc/sys/fs/file-max)
02:05 geekosaur so actual memory available is not relevant because it's allocated once and stays put
02:05 pierre_ joined #perl6
02:05 hotel I see
02:05 hotel the only thing is /proc/sys/ is a kernel/
02:06 geekosaur but, this is an emulation and I have no idea what it's really up to. windows kerrnel is quite possibly providing a limited pool to the emulation, and something might be leaking so that limited pool eventually runs out. or something
02:06 pierrot joined #perl6
02:06 geekosaur that is, it's not a real linux kernel, it's a thing that acts like one to programs but is actually just translating requests into windows kernel requests
02:06 hotel right
02:07 hotel reverse-WINE
02:07 geekosaur worse. wine is userspace
02:07 geekosaur you need windows microkernel debugging tools to diagnose this, I suspect. likely they only exist inside microsoft
02:07 hotel oh, that's how I've seen people describe it anyway
02:07 hotel guess I'll open an issue then
02:07 geekosaur well, it's a way to think about it. but windows is fundamentally very different in its organization
02:08 geekosaur the only other OS that comes close to it is OS X, which runs a Unix kernel under control of a microkernel. and it's not very close because as much as possible is done inside the guested kernel, instead of having multiple system services running independently under the microkkernel like windows does
02:08 hotel eek
02:09 sortiz hoelzro, thank you!
02:09 hoelzro thank *you* for the fix, sortiz!
02:10 hotel for clarification, how do we know the error isn't being caused by core-install-dist?
02:11 geekosaur well, we don;'t for certain, but if it;s working (with correct PERL / PERL5) for others then either yours is set to something extremely weird or you are running up against an emulator issue
02:12 geekosaur because "bad file descriptor" is not generally a user error
02:12 hotel got it
02:12 hotel I'm also seeing people on the internet with this problem when using sockets
02:12 geekosaur (you *can* trigger it, though: something like "cat <&17" in the shell, since it almost certainly isn;t using fd 17)
02:13 geekosaur it's just npot in the usual class of things you'd do with typoes or etc.
02:13 geekosaur the most common cause is something opened a file and didn;t check if it succeeded. beyond that, it's likely to be a ketrnel error --- especially in a brand new emulation subsystem with known bugs
02:13 hotel thanks
02:14 geekosaur especially whenc ombined with things like you reported that you closed namno and your terminal went away
02:14 geekosaur which makes me think its stdin fd went missing --- which would in fact be a "bad file descriptor" situation
02:14 geekosaur and absolutely *not* a "normal" one
02:15 geekosaur (you could trigger that failure mode in a different way by setting stdin non-blocking, though. that would be a bug in nano, though, and a rather unlikely one given how widely it's used)
02:16 geekosaur (and I think sufficiently recent bash checks for it and fixes it itself...)
02:16 hotel yeah sometimes (maybe once out of ten uses) nano will close the entire bash when I exit it
02:17 geekosaur hm. yes. i think you've found a bug in the emulator, then
02:17 geekosaur and the bad file descriptor is a symptom
02:18 geekosaur live on the bleeding edge, expect to bleed :)
02:18 hotel :^)
02:21 hotel alright, guess it's time to wait https://github.com/Microsof​t/BashOnWindows/issues/283
02:22 * geekosaur considers trawling that tracker to see if someone already reported it in a different guise...
02:22 geekosaur or even if that's the right place to put it, since strictly speaking not a bash bug
02:24 geekosaur mm, just scanning subject lines there's a couple of things that might be related
02:24 BenGoldberg joined #perl6
02:24 noganex_ joined #perl6
02:25 Herby_ joined #perl6
02:25 hotel biggest issue so far is that java doesn't work
02:25 Herby_ o/
02:26 geekosaur also just the list of bugs as a gestalt suggests you are indeed testing new technology and finding the bugs the hard way
02:26 Xliff Here's a weird one for you guys.
02:26 Xliff https://gist.github.com/Xliff/b​4c6675c7f3b89a21e640adb05e8269c
02:26 Xliff It's been nagging at me, all night.
02:27 Xliff Is this some FP weirdness or am I not doing something corretly?
02:27 hotel well that's why it's been publicised as a developer tool only
02:27 Xliff s/corretly/correctly/
02:27 geekosaur isn't 32768.f (float)?
02:28 geekosaur because Num will be (double)
02:28 Xliff geekosaur, yes.
02:28 Xliff Well ain't that just ducky. How do I get num32?
02:28 geekosaur so you could indeed be seeing problems... because you are only filling 4 byutes of an 8 byte value, the rest are likely tras
02:28 geekosaur h
02:30 hotel p6: $homework.do
02:30 camelia rakudo-moar 1c1e06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Variable '$homework' is not declared␤at /tmp/tmpfile:1␤------> 3<BOL>7⏏5$homework.do␤»
02:30 Xliff @buffer0 and @buffer1 are CArray[num32] though.
02:30 geekosaur hm. that's getting deeper into internals than I know, then. could well be that smnething is mishandling num32 somewhere (e.g. assuming it's the same as num or num64)
02:31 geekosaur file a bug, Iguess, at worst it gets rejected and you get told what magic is needed to do the right thing
02:32 Xliff I'll let it percolate, tonight. I've set a reminder to do it tomorrow.
02:33 Xliff I don't want to file a bug if PEBCAK. T'would be embarassingb.
02:33 hotel lol
02:37 rurban joined #perl6
02:38 Xliff Even if I limit calculation to Int and num32, I am still getting the same numbers.
02:38 Xliff So somewhere it's getting converted to Num by the time it gets back to num32, the damage has been done.
02:44 geekosaur right, I'd say you are in the file a bug zone
02:45 Xliff kk
02:45 Xliff Like I said. I will let it percolate tonight and bug it fresh, tomorrow.
02:45 BenGoldberg joined #perl6
02:45 hotel one day I'll start learning perl6 for real
02:53 Xliff Only thing I can think of is that in the c code, the input buffer is signed char. P6 input defaults to Blobs which is unsigned, right?
02:55 sortiz Xliff, you can use signed Blob/Buf: try with Buf[int8]
02:56 Xliff sortiz: How do I get IO::Handle::read() to return that?
02:56 Xliff Or should I just ==? "my Blob[int8] $readdata = $fh.read($bytes)"
02:56 * Xliff tries.
02:58 dwarring joined #perl6
02:58 Xliff HOLY SHIZZLE!
02:58 Xliff my Blob[int8] $readbuff = Blob[int8].new($fh.read(READ * 4));
02:59 Xliff Still getting numeric artifacts, but the C-lib doesn't care now.
02:59 Xliff It's happy with the bloody values and my conversion worked.
02:59 Xliff sortiz++!
02:59 sortiz Xliff, Certainly there are some known bugs with native types. :-)
02:59 Xliff YAY! Now bed.
03:00 Xliff Yes. I will still come at this fresh, tomorrow. I may bug it as a warning, JIC.
03:00 Xliff This translit code looks WAY too much like its original.
03:00 Xliff Will need to optimize now that it's operation has been verified.
03:04 Xliff committed and pushed.
03:04 * Xliff dies.
03:05 geekosaur that's a common issue with code that crosses language boundaries... even Haskell FFI code manages to look a lot like C >.>
03:07 Khisanth joined #perl6
03:09 sortiz perl6/doc build is now clean.
03:12 hotel what's the nick++ thing?
03:14 Herby_ nick + 1
03:14 Herby_ :)
03:14 hotel well yeah
03:14 hotel significance?
03:15 geekosaur "karma"
03:15 geekosaur hm. which is the karma bot currently?
03:16 geekosaur .karma sortiz
03:16 hotel I've been away from IRC for too long
03:16 geekosaur not yoleaux I guess
03:16 hotel|netteiru night
03:16 Herby_ \o
03:17 pecastro_ joined #perl6
03:19 winger__ joined #perl6
03:22 MadcapJake geekosaur: no karma bot anymore, i've been told
03:22 TEttinger karma--
03:22 pierre_ joined #perl6
03:24 winger__ joined #perl6
03:30 Xliff_ZZzzzz Yeah. These gists are getting to be fun... especially when I can solve them! =)
03:30 Xliff_ZZzzzz https://gist.github.com/Xliff/b​4c6675c7f3b89a21e640adb05e8269c
03:31 Xliff_ZZzzzz There was a karma bot, but now it's gone. But the idiom still remains.
03:31 Xliff_ZZzzzz Basically (nick++) translates to "Good job (nick)"
03:33 winger__ joined #perl6
03:37 ugexe MadcapJake: zef does have `nuke`, on its own config directories and on CUR short names. so to delete all modules would typically be `zef nuke site home`
03:39 MadcapJake oh nice! someone was having troubles with merge_globals and mismatched versions of JSON::Fast
03:39 winger_ joined #perl6
03:40 MadcapJake ugexe: I've started chipping away at full custom CUR support in Rakudo, did you read through my discussion with nine_ the other day?
03:40 adu joined #perl6
03:41 ugexe yeah, but ive been driving across the country so i havent got to dig in to it yet
03:41 ugexe i may be working in wisconsin soon though
03:42 * ugexe thought he recalls you are located in wisconsin
03:42 MadcapJake haha! yes I am!
03:43 MadcapJake where will you be in Wisconsin?
03:44 ugexe the milwaukee area
03:45 MadcapJake nice! milwaukee is cool, I live 5 hours from milwaukee though :\
03:46 MadcapJake but my family lives an hour west of the area and my sister lives there
03:48 ugexe i didnt know there was anything even on the west side of the state heh
03:50 ugexe oh duh, ive heard of eau claire
03:51 MadcapJake yep that's where I live :)
03:52 MadcapJake it's really close to Minneapolis/St. Paul and is a nice mix of decent-sized city and small-town feel that I think is good for my son to grow up in.
03:54 ugexe i prefer those too
03:55 ugexe but for parking purposes
03:55 hotel|netteiru joined #perl6
03:59 BenGoldberg joined #perl6
04:01 MadcapJake xD parking is rarely a concern here that's for sure!
04:21 tardisx joined #perl6
04:23 snarkyboojum joined #perl6
04:30 Cabanossi joined #perl6
04:41 Xliff_ZZzzzz joined #perl6
04:51 tardisx joined #perl6
04:56 BenGoldberg joined #perl6
05:00 Ben_Goldberg joined #perl6
05:13 BenGoldberg joined #perl6
05:27 _mg_ joined #perl6
05:45 domidumont joined #perl6
05:48 tardisx joined #perl6
05:50 domidumont joined #perl6
05:51 grassass joined #perl6
06:06 CIAvash joined #perl6
06:09 dolmen joined #perl6
06:11 pierre_ joined #perl6
06:15 jjido joined #perl6
06:16 domidumont joined #perl6
06:17 sno joined #perl6
06:19 hotel joined #perl6
06:30 Actualeyes joined #perl6
06:35 rindolf joined #perl6
06:36 firstdayonthejob joined #perl6
06:38 tomboy64 joined #perl6
06:43 rurban joined #perl6
06:49 TimToady joined #perl6
06:57 ufobat joined #perl6
06:58 ufobat good morning!
07:00 TimToady joined #perl6
07:01 sortiz \o ufobat
07:03 atroxaper joined #perl6
07:09 masak morning, #perl6!
07:09 masak Perl 6 day! \o/
07:09 moritz \o masak, ufobat, sortiz, ugexe, MadcapJake, *
07:09 rurban left #perl6
07:09 moritz masak: I guess you'll like this one: http://www.smbc-comics.com/index.php?id=4092
07:13 masak moritz: awww :/
07:16 zakharyas joined #perl6
07:16 RabidGravy joined #perl6
07:27 ufobat I am wondering why the HTTP::Server::Tiny has this name, it's not that tiny
07:28 ufobat well okay, 500 lines of code, but cool!
07:28 moritz I guess it started out tiny
07:29 moritz fwiw I've recently discovered the Talk Nerdy podcast: http://carasantamaria.com/podcast/
07:29 moritz many of the guests are science communicators and scientists, some atheists and sceptics interspersed
07:30 leont joined #perl6
07:31 * moritz likes it
07:32 masak :)
07:32 RabidGravy joined #perl6
07:35 RabidGravy moo
07:35 sortiz Today I made a bitter discovery: Inside a method body, a sub declaration is recompiled every time the method is called even if it doesn't attempt to "capture" anything, is that expected or a bug?
07:36 masak sortiz: not recompiled, surely.
07:36 masak sortiz: rebound, yes.
07:36 ufobat masak, any news about your SSE in nex? :) i am curious about your experiences with HTTP::Server::Tiny?
07:36 masak sortiz: and while I don't know the answer to your question (now how to find out), I can easily imagine that's so.
07:37 RabidGravy I have quite a few places where I put subs inside methods just to make the code neater
07:37 masak sortiz: maybe that's an optimization the good folks who optimize haven't gotten to.
07:37 ufobat yesterday night i realized that HTTP::Server::easy is not handling binary data in http requests :(
07:37 masak sortiz: maybe it's hard for some reason ;)
07:37 masak ufobat: so far very positive experiences.
07:37 masak ufobat: I've gotten a few segfaults on the way, but hey, I can haz SSE now :D
07:38 ufobat i am happy to hear that :)
07:38 ufobat segfaults?! what happend?
07:38 RabidGravy fwiw I'm certain HTTP::Server::Tiny does support binary content
07:38 tardisx joined #perl6
07:39 sortiz masak, I DBIish have many native subs declared inside methods, to be neater, but a profile shows me that every time the method is called the 'is native' trait of the sub is reinvoked, so all the setup dance is re-executed.
07:40 sortiz In*
07:40 RabidGravy I actually implemented a streaming server using it, but found another problem so made my own spectial server software
07:40 masak sortiz: huh.
07:40 masak sortiz: that does sound odd.
07:40 darutoko joined #perl6
07:40 tardisx joined #perl6
07:40 ufobat RabidGravy, yeah i think so too. I read the code and i think it should work
07:41 sortiz Yep, I have the profiler results to prove it.
07:41 ufobat my next step on bailador is to return a $app so it can easily run on different servers or with Crust
07:42 RabidGravy cool
07:42 ufobat and theeeeeen, i can upload pictures ;D woho
07:43 masak m: multi sub trait_mod:<is>(Routine $r, Str :$yeshello!) { say "triggered" }; sub foo() is yeshello<OHHAI> {}
07:43 camelia rakudo-moar 1c1e06: OUTPUT«triggered␤»
07:43 RabidGravy I'm very much in favour of a mix and match approach to this space rather than there being a single monolithic framework that everyone has to use or risk being uncool
07:43 masak m: multi sub trait_mod:<is>(Routine $r, Str :$yeshello!) { say "triggered" }; class C { method meh { sub foo() is yeshello<OHHAI> {} } }; C.new.meh
07:43 camelia rakudo-moar 1c1e06: OUTPUT«triggered␤»
07:43 masak m: multi sub trait_mod:<is>(Routine $r, Str :$yeshello!) { say "triggered" }; class C { method meh { sub foo() is yeshello<OHHAI> {} } }; C.new.meh; C.new.meh
07:43 camelia rakudo-moar 1c1e06: OUTPUT«triggered␤»
07:44 masak sortiz: look at the above. discuss :)
07:46 ufobat RabidGravy, the only thing i am not liking right now is how the PSGI for perl6 has evolved and not being implemented throughout the http servers or
07:46 ufobat for example %env variables names had changed twice
07:46 sortiz Hum... will golf my problem...
07:47 masak ufobat: I can sort of sense that when I'm working with Bailador and HTTP::Server::Tiny :)
07:48 RabidGravy yeah, really someone needs to pick something that is the "reference" module and everything else follows that
07:49 ufobat psgi draft 0.7 is stable or not being touched since 7 months i think...
07:49 domm joined #perl6
07:50 ufobat some modules follow 0.4 some try to implement all/some versions.. and that results in quite a lot code that's useless
07:52 ufobat well, how would life be when nothing is left to do :)
07:53 masak relaxing? :P
07:54 ufobat mhm, we are both parents...
07:57 jack_rabbit joined #perl6
08:02 sortiz m: role Foo[Routine $r] { has int $!setup; method CALL-ME { say "applied to ",$r.^name unless $!setup; $!setup = 1 }}; multi sub trait_mod:<is>(Routine $r, :$foo!) { $r does Foo[$r] }; class Bar { method baz { sub meh is foo {}; meh(); }}; my $b = Bar.new; $b.baz; $b.baz; # See $!setup
08:02 camelia rakudo-moar 1c1e06: OUTPUT«applied to Sub+{Foo[Sub]}␤applied to Sub+{Foo[Sub]}␤»
08:05 sortiz That mimic the 'is native' path. So, or the role is applied more than one time or $!setup miss its value.
08:05 dakkar joined #perl6
08:09 sortiz The bright side is that now DBDish::Pg is 35x faster. :-)
08:09 tomboy65 joined #perl6
08:17 wamba joined #perl6
08:18 masak sortiz: "of course" that one has to run twice -- you're concretizing the role twice at runtime
08:19 RabidGravy sortiz, that's right though - the CALL-ME *is* the sub
08:19 RabidGravy oh wait I see now
08:19 masak it's the Foo[$r] that gets "instantiated" twice
08:19 masak to essentially two distinct concrete roles
08:20 * masak should perhaps say "concretized" instead of the overused "instantiated"
08:21 DrForr laminated :)
08:24 RabidGravy ufobat, maybe the thing to do is to add a set of tests to the psgi module (or some module that implements tests) that check compliance with the latest version and then add that as dependency to all the offending containers
08:25 sortiz I was expecting that as soon as the Routine meh was composed with Foo, its $!setup attr was unique, so after the first CALL-ME, that set $!setup = 1, all the following calls see $!setup True and bypass the setup, Well that what 'is native' expects now.
08:26 RabidGravy ye olde lexical scope
08:28 tomboy65 joined #perl6
08:29 dalek DBIish: 8b6ebd7 | (Salvador Ortiz)++ | lib/DBDish/ (4 files):
08:29 dalek DBIish: Pg: Move native subs outside it methods
08:29 dalek DBIish:
08:29 dalek DBIish: That avoids needless !setup passes inside Native role
08:29 dalek DBIish: bazzaar++ for the report that trigger that hunt.
08:29 dalek DBIish: review: https://github.com/perl6/DBIish/commit/8b6ebd7a31
08:30 masak sortiz:
08:30 masak m: role R[Routine $r] { has $!setup; method CALL-ME { say "applied" unless $!setup++ } }; { sub foo { say "foo" }; &foo does R[&foo]; foo() }
08:30 camelia rakudo-moar 1c1e06: OUTPUT«applied␤»
08:30 masak m: role R[Routine $r] { has $!setup; method CALL-ME { say "applied" unless $!setup++ } }; for ^2 { sub foo { say "foo" }; &foo does R[&foo]; foo() }
08:30 camelia rakudo-moar 1c1e06: OUTPUT«applied␤applied␤»
08:30 masak sortiz: nothing to do with methods.
08:31 sortiz Yes. Seems scope related.
08:32 masak m: role R[Routine $r] { say "role" }; for ^2 { sub foo { say "foo" }; &foo does R[&foo]; foo() }
08:32 camelia rakudo-moar 1c1e06: OUTPUT«role␤foo␤role␤foo␤»
08:32 masak an even simpler example.
08:33 masak does the above behavior make sense to you?
08:33 domidumont joined #perl6
08:33 sortiz If foo was a closure yes. For that foo nop, sorry.
08:35 masak nothing much to do with routines, either
08:35 masak m: role R[$z] { has $!setup = "newly concretized role"; method x { say $!setup; $!setup = "seen this old role before" } }; for ^2 { my $z = 1; $z does R[$z]; $z.x }
08:35 camelia rakudo-moar 1c1e06: OUTPUT«newly concretized role␤newly concretized role␤»
08:35 masak it's just the fact that `does` runs every time. it's a runtime thing
08:35 masak don't even need that role parameter, apparently
08:35 masak m: role R { has $!setup = "newly concretized role"; method x { say $!setup; $!setup = "seen this old role before" } }; for ^2 { my $z = 1; $z does R; $z.x }
08:35 camelia rakudo-moar 1c1e06: OUTPUT«newly concretized role␤newly concretized role␤»
08:36 sortiz But a does inside a trait, that is applied at compile time, don't make much sense.
08:37 masak it's one of those "runtime inside of compile time" things
08:37 RabidGravy but it's bound into the lexical scope at runtime
08:37 masak sortiz: maybe you just don't want $!setup to be scoped the way it is?
08:37 masak sortiz: would it work for you if you made it a global outside of the role?
08:39 sortiz Well, that the logic inside the 'is native' machinery that seems affected, that code made me expect otherwise. Now I be fully aware. :-)
08:40 masak basically, *each* time `does R` happens, the role gets concretized. and you get fresh attributes, etc
08:42 sortiz Yep, now i know, but see: https://github.com/rakudo/rakudo/bl​ob/nom/lib/NativeCall.pm6#L266-L290
08:43 cdg joined #perl6
08:43 sortiz That !setup is heavy weight.
08:43 [TuxCM] joined #perl6
08:44 masak sortiz: maybe you can keep a global hash with seen Routines?
08:46 sortiz I'm working in a Native libs/calls revamp. DBIish has taught me a lot :-)
08:47 masak :)
08:48 tomboy65 joined #perl6
08:48 RabidGravy make all the things faster
08:48 * masak .oO( and soon! )
08:53 atroxaper joined #perl6
08:56 RabidGravy for reference with NC  doing portaudio -> mp3 encode -> libshout is "only fast enough under controlled circumstances"
08:57 RabidGravy that is there aren't enough free cycles to deal with e.g. garbage collection and recover from that
08:57 RabidGravy and it only works with very high latency settings in the audio sub-system
08:58 tomboy65 joined #perl6
09:00 RabidGravy though to be fair it has improved over the last say nine months that doing similar but reading from a WAV file using sndfile can now do 320kbps rather than 128k when I first made the modules
09:01 ufobat RabidGravy, i think its to hard to build something generic. middlewars vs servers vs webframeworks. they are all working so differently
09:02 Actualeyes joined #perl6
09:02 RabidGravy right but the psgi specification only defines servers and middleware so it's just make tests for those
09:03 RabidGravy a web framework abstracts away those underlying things
09:06 RabidGravy so the test for the server would be an "app" callable (or more probably more than one) and a thingy that makes requests with the app on the server and check it gets what is expected
09:08 RabidGravy I'd make an example but I don't have a pony in this race so I'll leave it to others
09:08 RabidGravy :)
09:08 RabidGravy (dog in the fight/skin in the game)
09:08 sortiz Has been a long day, I'm going to bed  o/
09:09 RabidGravy gosh after only two hours, harsh ;-)
09:11 TeamBlast joined #perl6
09:16 [particle] joined #perl6
09:16 domidumont1 joined #perl6
09:20 ufobat RabidGravy, ack! and the same applies to middlewars!
09:21 masak "middleware", surely?
09:21 * masak .oO( unless the Man in the Middle has turned belligerent of late )
09:21 ufobat ;) who knows!
09:22 RabidGravy very possibly
09:22 ufobat .oO( omg my english is so bad )
09:22 RabidGravy so is mine and I took a degree in the subject ;-)
09:24 RabidGravy right let's hack together this modules snapshot thingy
09:24 Amnez777 joined #perl6
09:25 pierre_ joined #perl6
09:29 RabidGravy BTW sortiz++ rakudo build works again :)
09:31 domidumont joined #perl6
09:34 jdv79 RabidGravy: you majored in eng?
09:34 RabidGravy english literature yep
09:35 jdv79 nice
09:35 sortiz RabidGravy++ # Spot the problem in first place.
09:37 pierre_ joined #perl6
09:39 RabidGravy Oooh when did JSON::Fast do "pretty" ?
09:42 RabidGravy Hmm, how come CORE gets a Distribution?  and is there any way of distinguish it (and possible other similar things) from "normal" modules?
09:44 pierre_ joined #perl6
09:46 dalek DBIish: c08c08d | (Salvador Ortiz)++ | / (2 files):
09:46 dalek DBIish: Pg: Fix Arrays handling vs optimized NULL
09:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/c08c08d75e
09:48 domidumont1 joined #perl6
10:09 [particle] joined #perl6
10:17 RabidGravy Ah. got it
10:17 RabidGravy CORE contains Test and the NativeCall stuff
10:18 psch m: use NativeCall; say CORE::NativeCall
10:18 camelia rakudo-moar 1c1e06: OUTPUT«Nil␤»
10:18 psch RabidGravy: i think we're calling Test and NativeCall standard modules, not core modules
10:19 psch but then i don't know if that applies to the CUR stuff in a technical sense
10:19 psch m: say CORE::Test
10:19 camelia rakudo-moar 1c1e06: OUTPUT«Nil␤»
10:19 psch in any case, they're not actually in CORE it seems
10:20 RabidGravy Well that's as may be but that's what the Distribution that contains them is called ;-p
10:20 RabidGravy Distribution.new(name => "CORE", auth => "perl", author => Any, authority => Any, api => Any, ver => "6.c", version => Any, description => Any, depends => [[],], provides => {:NativeCall(${:pm(${:cver("2016.04-36-gce5dc00")
10:20 psch hrm
10:20 psch that's a bit unfortunate
10:21 psch i assume renaming that now makes upgrading somewhat painful
10:22 RabidGravy presumably it's in a "special"  repo
10:22 * RabidGravy looks
10:24 kid51 joined #perl6
10:24 psch this doc PR had the discussion https://github.com/perl6/doc/pull/452
10:25 RabidGravy yeah I remember it
10:28 RabidGravy but for the time being I'm going to sweep that one under the carpet as I have enough to ignore it for the time being (assuming the auth doesn't get changed)
10:29 RabidGravy the name is only seeable if you actually explicitly traverse the distributions (which is what I am doing)
10:29 psch yeah, i don't think it's a pressing issue
10:29 psch it could be misleading is all
10:30 RabidGravy yeah, though as a distribution name it's probably better than most alternatives for the reason that someone is less likely to actually create a module called that
10:31 RabidGravy (though the name doesn't matter as far as I can see, only the names in the "provides")
10:34 psch that's what i'd assume, i mostly don't want people exploring, finding a CORE distribution and talking about it with that name only to be corrected that that's not really what it should be called...
10:34 psch but i have no idea how the name plays into upgrading or not, so i'm not gonna touch it either... :)
10:35 psch especially 'cause i don't really *do* upgrading, i mostly just have $rakudo-repo/install anyway
10:37 RabidGravy well, I guess the worst that would happen is that it wouldn't go away when upgrading
10:37 psch hm, that could potentially break on Test or NC imports with a version..?
10:38 RabidGravy well the ver is just '6.c' anyway
10:39 RabidGravy so it's would always get the one with the matching compiler version
10:39 psch m: use Test:ver(v6.c)
10:39 camelia rakudo-moar 1c1e06: ( no output )
10:40 psch but that would keep working on a v6.d+ compiler that replaced the CORE name with Standard, no?
10:40 psch and in the case of NC i could see that introducing hard-to-understand bugs
10:40 psch well, assuming CORE sticks around during upgrade that introduces Standard instead
10:41 RabidGravy I think the safest thing would be to twat that repo prior to installation (assuming nothing else uses it)
10:42 * ZoffixWin muffles at laugh at that verb choice
10:42 RabidGravy like a hard "rm -rf $PREFIX/share/perl
10:43 RabidGravy ZoffixWin, it's overloaded in en_GB ;-)
10:44 RabidGravy anyway supermarket, then snapshot thing
10:44 RabidGravy toodles
10:44 ZoffixWin \o
10:47 pmurias joined #perl6
12:02 ilbot3 joined #perl6
12:02 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!
12:02 pierre_ joined #perl6
12:13 hankache joined #perl6
12:13 hankache m: say IO.^methods;
12:13 camelia rakudo-moar e81342: OUTPUT«(umask)␤»
12:14 hankache is it normal that I can't use .^methods on a role?
12:14 psch m: role R { method foo { } }; say R.^methods
12:14 camelia rakudo-moar e81342: OUTPUT«(foo)␤»
12:14 psch hankache: well, you can, but it gets punned
12:16 hankache psch how do you pun a builtin role?
12:16 psch hankache: punning is just treating a role as a class
12:16 psch hankache: what are you trying to do?
12:17 hankache say IO.^methods
12:17 hankache m: say IO.^methods;
12:17 camelia rakudo-moar e81342: OUTPUT«(umask)␤»
12:17 psch https://github.com/rakudo/ra​kudo/blob/nom/src/core/IO.pm
12:17 psch IO has exactly that one method
12:20 hankache where are these coming from:
12:20 hankache https://doc.perl6.org/type/IO
12:21 timotimo i suppose those subs are subs that are defined to take arguments that do IO
12:21 timotimo no, actually
12:21 timotimo https://raw.githubusercontent.com​/perl6/doc/master/doc/Type/IO.pod
12:22 psch hm, that doc page does seem somewhat confusing
12:22 timotimo ugh, the pirate treasure example has mixed spaces and tabs
12:22 timotimo that causes the renderer to turn every line into its own code block
12:23 hankache psch this is what got me confused
12:23 timotimo i've got to run errands, someone fix that page pls? :D
12:23 psch would probably fit better as a language/IO instead of type/IO document...
12:24 psch ah, we have that too
12:25 dalek doc: 824d9e4 | moritz++ | doc/Type/IO.pod:
12:25 dalek doc: Tabs are evil, let's go space!
12:25 dalek doc: review: https://github.com/perl6/doc/commit/824d9e4e09
12:25 hankache timotimo :)
12:25 psch moritz++
12:25 moritz easy karma :-)
12:26 hankache moritz++
12:34 dalek joined #perl6
12:41 crime joined #perl6
12:49 pierre_ joined #perl6
12:50 * grondilu is now typing from a tmux session attached from a ssh session to his raspberry Pi from a debian VM running on his Windows 10 PC.  What a mindf*ck.
12:52 dolmen joined #perl6
12:52 sufrostico joined #perl6
12:53 moritz grondilu: you should add a level of Docker in there, just for the sake of completeness
12:57 sjn grondilu: mosh ftw
12:57 sjn and ssh ProxyCommand tunnels
13:00 ufobat joined #perl6
13:07 grondilu jeez go figure.  Compiling rakudo is almost ten times faster on the VM than on the Pi!
13:08 moritz I'm not surprised
13:08 moritz the Pi doesn't have a fast CPU
13:08 grondilu but not a ten times slower CPU!
13:10 moritz well, memory caches, memory size, memory bus speed etc all play a role
13:11 maybekoo2 joined #perl6
13:14 sufrostico joined #perl6
13:15 RabidGravy yeah, the memory constraint on the RPi is a big factor
13:16 timotimo .o( what a minfduck )
13:16 Amnez777 joined #perl6
13:20 skids joined #perl6
13:22 ugexe try compiling rj on rpi
13:22 ugexe pack a lunch first
13:22 jnthn Also, no JIT yet on ARM
13:23 jnthn But yeah, lower memory bandwidth and smaller cache will be a killer
13:23 timotimo yeah, we've tuned moar's nursery to be a cache size big
13:24 timotimo if your cache is only half that, or even smaller ... nursery collections will be much more expensive
13:25 ugexe grondilu: if by chance you have windows 10 pro then you already have Hyper-V
13:26 gfldex m: enum Bits ( ('Bit-' xx * Z~ 1..8) Z=> (1, 2, 4 ... 256) ); dd Bits.enums;
13:26 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6, "Bit-8\t128" => 7}␤»
13:26 gfldex where does '\t1' come from?
13:26 timotimo instead of xx * Z, why not try X
13:26 |Tux| joined #perl6
13:26 timotimo it's stringifying the Pair object
13:26 gfldex m: enum Bits ( ('Bit-' X 1..8) Z=> (1, 2, 4 ... 256) ); dd Bits.enums;
13:26 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit- 1\t1" => 0, "Bit- 2\t2" => 1, "Bit- 3\t4" => 2, "Bit- 4\t8" => 3, "Bit- 5\t16" => 4, "Bit- 6\t32" => 5, "Bit- 7\t64" => 6, "Bit- 8\t128" => 7}␤»
13:27 gfldex X makes it worse :)
13:27 timotimo well, of course
13:27 timotimo you forgot to add the ~ back after the X
13:27 gfldex m: enum Bits ( ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256) ); dd Bits.enums;
13:27 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6, "Bit-8\t128" => 7}␤»
13:27 timotimo m: enum Bits ( ('Bit-' X~ 1..8) Z (1, 2, 4 ... 256) ); dd Bits.enums
13:27 camelia rakudo-moar 3cab7c: OUTPUT«WARNINGS for /tmp/kBQqasF29y:␤Useless use of "Z" in expression "('Bit-' X~ 1..8) Z (1, 2, 4 ... 256)" in sink context (line 1)␤{"Bit-1 1" => 0, "Bit-2 2" => 1, "Bit-3 4" => 2, "Bit-4 8" => 3, "Bit-5 16" => 4, "Bit-6 32" => 5, "Bit-7 64" => 6, "Bit-8 12…»
13:28 timotimo m: enum Bits ( ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256) ); dd Bits.enums
13:28 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit-1\t1" => 0, "Bit-2\t2" => 1, "Bit-3\t4" => 2, "Bit-4\t8" => 3, "Bit-5\t16" => 4, "Bit-6\t32" => 5, "Bit-7\t64" => 6, "Bit-8\t128" => 7}␤»
13:28 timotimo that's interesting
13:28 timotimo m: enum Bits %( ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256) ); dd Bits.enums
13:28 camelia rakudo-moar 3cab7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kOeZ4_ULIR␤Undeclared name:␤    Bits used at line 1␤Undeclared routine:␤    enum used at line 1␤␤»
13:28 gfldex m: enum Bits ( %(('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256)) ); dd Bits.enums;
13:28 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit-1\t1" => 4, "Bit-2\t2" => 0, "Bit-3\t4" => 6, "Bit-4\t8" => 7, "Bit-5\t16" => 2, "Bit-6\t32" => 1, "Bit-7\t64" => 5, "Bit-8\t128" => 3}␤»
13:28 timotimo it's clearly not taking the numbers into the enum at all
13:29 dalek ecosystem: 90ab26b | yowcow++ | META.list:
13:29 dalek ecosystem: Add Algorithm::BloomFilter to ecosystem
13:29 dalek ecosystem:
13:29 dalek ecosystem: See https://github.com/yowcow/p6-Algorithm-BloomFilter
13:29 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/90ab26bdae
13:29 dalek ecosystem: ff8c68d | RabidGravy++ | META.list:
13:29 dalek ecosystem: Merge pull request #199 from yowcow/add-algorithm-bloomfilter
13:29 dalek ecosystem:
13:29 dalek ecosystem: Add Algorithm::BloomFilter to ecosystem
13:29 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ff8c68d146
13:30 gfldex should the declarator enum take complex expressions as a parameter? (read: is this a bug?)
13:30 gfldex m: my $thing = ( ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256) ); dd $thing;
13:30 camelia rakudo-moar 3cab7c: OUTPUT«Seq $thing = ("Bit-1" => 1, "Bit-2" => 2, "Bit-3" => 4, "Bit-4" => 8, "Bit-5" => 16, "Bit-6" => 32, "Bit-7" => 64, "Bit-8" => 128).Seq␤»
13:31 timotimo i think it'd be very nice if it did
13:31 timotimo maybe you can get it via a constant?
13:32 timotimo https://github.com/timo/SDL2_raw-p​6/blob/master/lib/SDL2/Raw.pm#L505  -  i don't think i was able to turn this into an enum, so i kept it a hash
13:32 cdg joined #perl6
13:32 gfldex m: constant thing = ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256); my enum Bits ( thing ); dd Bits.enums;
13:32 camelia rakudo-moar 3cab7c: OUTPUT«{"Bit-1\t1 Bit-2\t2 Bit-3\t4 Bit-4\t8 Bit-5\t16 Bit-6\t32 Bit-7\t64 Bit-8\t128" => 0}␤»
13:33 gfldex if that's what you ment
13:33 timotimo that's what i meant, yeah
13:33 timotimo hmm.
13:33 timotimo that's super bad
13:34 gfldex enums as syntaxy things. It may be a usecase of macros.
13:34 timotimo don't think so, to be honest
13:35 timotimo i think it should work as-is
13:35 timotimo and just behave like evaluating a constant does
13:35 gfldex S12 doesn't say anything about expressions to form the enum. It only asked for list of pairs to work.
13:35 gfldex http://design.perl6.org/S12.​html#Composition_from_Pairs
13:36 timotimo OK. i think TimToady will agree that it ought to be powerful :)
13:36 ugexe you can also change the path from cmd.exe with `setx C:\path\xxx;%PATH%`
13:36 timotimo and if and when he does, we'll find someone to implement that
13:38 gfldex Maybe tricky to decide as the whole expression has to be evaluated at compile time. We don't really have a way to state that intend besides `constant`.
13:39 takadonet morning all
13:46 timotimo morning takadonet
13:46 timotimo gfldex: i'm pretty sure the rhs of enum is already evaluated at compile time
13:46 takadonet timotimo: how are you good sir?
13:48 crime joined #perl6
13:49 timotimo i'm okay
13:49 timotimo how about you?
13:51 literal so, after an "apt-get install perl6-panda" on Debian, Panda complains about Shell::Command being missing. What's the solution there?
13:51 RabidGravy moan at the person who made the package?
13:51 timotimo it should be packaging its own copy of Shell::Command, actually
13:52 ilmari https://bugs.debian.org/cgi-​bin/bugreport.cgi?bug=818926
13:52 gfldex m: my %thing = ('Bit-' X~ 1..8) Z=> (1, 2, 4 ... 256); my enum Bits ( %thing ); dd Bits.enums;
13:52 camelia rakudo-moar 3cab7c: OUTPUT«WARNINGS for /tmp/UcIChTdjhG:␤Useless use of %thing in sink context (line 1)␤{}␤»
13:52 timotimo so if it claims it's missing, it's somehow not finding its own Shell::Command properly
13:52 hotel_california joined #perl6
13:52 literal timotimo: yeah, I see it did actually install it, not sure why it doesn't find it
13:53 ZoffixW joined #perl6
13:53 RabidGravy to get a working panda however you could download the source from github and run the the bootstrap thingy
13:53 timotimo does it say it's looking in the right folders?
13:53 ugexe does `perl6 -MShell::Command -e ''` error?
13:53 ilmari the package ships a /usr/share/perl6/lib/Shell/Command.pm
13:54 literal ugexe: yes
13:54 ZoffixW http://perl6.party
13:55 timotimo oh lord, that is fantastic
13:55 ilmari but $*REPO.repo-chain only includes inst#/usr/share/perl6, not lib/
13:55 literal timotimo: it mentions /usr/share/perl6{,site,vendor}, but the modules are in /lib
13:55 ZoffixW :)
13:55 timotimo a-ha!
13:56 timotimo .u 🙇
13:56 yoleaux U+1F647 PERSON BOWING DEEPLY [So] (🙇)
13:56 wamba joined #perl6
13:57 ugexe sounds like a cur::panda problem
13:57 RabidGravy ZoffixW, it needs music too :)
13:57 ZoffixW lol
13:58 literal ugexe: more like a lacking PERL6LIB (or whatever it's called), since "use Shell::Command;" happens at the top of /usr/bin/panda
13:58 literal @INC I mean
13:59 timotimo @INC doesn't exist any more
13:59 timotimo and it used to be @*INC, iirc. or maybe @?INC.
13:59 ugexe cur::panda puts installed modules into a /lib folder
14:00 RabidGravy would anyone else find this snapshot thingy useful enough for me to stick it in the ecosystem?
14:00 ugexe its meant so when you upgrade rakudo that your modules are still installed. however im not sure the way it does it is exactly koscher
14:01 ugexe (re: distro packages)
14:02 literal is panda not able to install modules into a user-specific directory? https://gist.github.com/hinrik/a​97d34db7bb9040cb86c9e7736aabc2c
14:02 timotimo is that with an up-to-date rakudo?
14:03 timotimo we really ought to have that error not be fatal
14:03 literal 2016.04 from Debian unstable
14:03 timotimo and i thought we had code to deal with not-writable precomp stores
14:03 RabidGravy I thought if you set PERL6LIB to something panda would try there first
14:03 RabidGravy or did that change?
14:03 ugexe the first lib will be where it precomps at
14:04 literal RabidGravy: it does, otherwise it would be complaining about a missing Shell::Command
14:04 ugexe so give some writable path for the first lib path, and the real one for the 2nd
14:04 literal RabidGravy: oh sorry, misunderstood you
14:04 crime joined #perl6
14:04 literal but from checking the source I see it has a --prefix option
14:05 rurban joined #perl6
14:05 rurban left #perl6
14:06 literal so it works if I do: PERL6LIB="/home/hinrik/p6lib,/usr/share/perl6/lib" panda --prefix=/home/hinrik/p6lib install Linenoise
14:06 * ugexe if only there was a package manager without 5+ dependencies...
14:07 literal but of course Linenoise has a test failure so it doesn't get installed :)
14:07 literal well, File::Which had the failure
14:08 timotimo ugexe: hah, i wonder why zef isn't being marketed more agressively
14:08 timotimo BBL
14:09 ufobat joined #perl6
14:14 grondilu joined #perl6
14:14 RabidGravy ugexe, does zef support versioned depencies BTW
14:15 RabidGravy every once in a while I get real grief with changing dependencies which require a specific version
14:16 tharkun joined #perl6
14:18 ugexe yeah, in the form of `My::Module:ver<xxx>`. all depends get turned into that form, so a typical depends has an implied :ver<*>
14:19 RabidGravy cool
14:20 domidumont1 joined #perl6
14:21 RabidGravy does DependencySpecification have a constructor that takes that kind of string or do you pull the parts apart yourself?
14:24 ugexe you have to feed it each part. zef has its own Zef::Distribution::DependencySpecification which can break down a single string (My--Module:github:ugexe:1.0 or My::Module:auth<github:ugexe>:ver<1.0>) into those parts
14:27 RabidGravy groovy
14:30 ugexe the only problem is that versions are kinda useless right now. the p6 ecosystem only gives access to the latest version in its meta data, and metacpan doesnt have up-to-date versions
14:31 mst bargle
14:31 ugexe i have https://github.com/ugexe/Per​l6-ecosystems/commits/master which could conceivable match version changes to their commit id though
14:31 mst I owe the world a blog post, followed by several emails, followed by waiting 48hr, followed by letting the spice flow again
14:32 moritz mst: then stop procrastinating here and get to work! :-)
14:32 rjbs joined #perl6
14:33 mst moritz: http://www.trout.me.uk/poem.jpg
14:35 ptolemarch joined #perl6
14:37 RabidGravy ugexe, well the version is useful if a module requires a newer version than one that may be installed
14:37 RabidGravy which is part of the problem I've been having
14:37 grondilu joined #perl6
14:39 RabidGravy ugexe, I've been doing some experiment with doing similar to that storing the META stuff in CouchDB
14:40 RabidGravy other JSONish document databases are available
14:43 RabidGravy but that was more of a test/example for Sofa than anything for real use
14:45 yqt joined #perl6
14:46 lostinfog joined #perl6
14:48 nd3i joined #perl6
14:51 ugexe yeah that would work better. the purpose of that repo is really just to be a more stable mirror of the normal api.p6c.org/packages.json or whatever (since sometimes the json posted there is not complete for some reason)
14:51 cyberviking joined #perl6
14:51 ugexe and to allow fetching the package list via `git`, so a proxy wont get in the way of the initial run
14:52 kerframil joined #perl6
14:52 nd3i I'm looking for a better/idiomatic way to do str ~~ s/x/y/ and get str' as the result. (ok, i'm golfing)
14:53 nd3i So far I have a sub that copies the input, s///, and returns the copy
14:53 nd3i Something like: sub d-only ($in) { my $out = ~$in; $out ~~ s:g/\D+//; $out }
14:53 ugexe substr-mutate?
14:53 moritz nd3i: sub d-only($_) { S:g/\D+// }
14:54 ugexe oh a copy
14:54 grondilu jeez perl6 is so much faster even on a VM it's crazy
14:55 nd3i Right. I don't want to change the input
14:55 perlpilot grondilu: I don't think Rakudo is "crazy fast" just yet  ;-)
14:56 moritz S/// returns a modified copy
14:56 moritz s/// mdoifies in-place
14:56 nd3i Cool! That's what I missed. I'll play with S///.
14:57 Xliff \o #perl6
14:57 Xliff RabidGravy, you mentioned a snapshot thingy. Sounds interesting. What is it taking snapshots of?
14:58 RabidGravy it just does what "cpan autobundle" does, but writes out a META file with all the installed modules as dependencies
14:59 RabidGravy so that if you, say, want to twat your rakudo install completely you can recreate the same modules
14:59 RabidGravy or if you wanted to deploy something to a different machine or something
14:59 nd3i Also, I want to use the REPL to test subs loaded from a file (the debugger seems to crash a lot)
14:59 Xliff RabidGravy, Ooh! Yes, please!
14:59 Xliff Considering I will have to do just that soon, it would be most helpful.
15:00 nd3i Someone suggested require /path/to/source.p6 but that doesn't seem to define the subs in the REPL
15:00 RabidGravy give me an hour or so :)
15:00 Xliff RabidGravy++
15:01 Xliff Also, I will probably be releasing the draft version of Audio::OggVorbis. Are there any writeups on how to get it into the ecosystem?
15:01 perlpilot nd3i: subs are lexical
15:02 RabidGravy in short clone perl6/ecosystem add the location of your repo and make a PR
15:02 RabidGravy add your repo to META.list that is
15:03 RabidGravy but looking forward to seeing that
15:04 nd3i perlpilot: right. I get that.
15:04 nd3i I know require pulls definitions into the current file; I guess it doesn't with the REPL
15:05 nd3i Even cut/paste isn't working; it seems to be limited to one-liners.
15:05 nd3i I guess I'll have to stick with the debugger.
15:08 nd3i Ack! NM. Cut/paste is working for me now. Not sure what I was doing before.
15:09 nd3i ttfn tyvm
15:09 masak blogged! http://strangelyconsistent.org/blog/trinity
15:09 RabidGravy oh, I was just about to explain that the subs would be lexical to the compilation unit anyway
15:11 RabidGravy masak++ cool
15:13 zhmylove joined #perl6
15:17 dalek doc: 36f4e8d | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
15:17 dalek doc: doc enum
15:17 dalek doc: review: https://github.com/perl6/doc/commit/36f4e8d79e
15:34 prammer joined #perl6
15:35 pierre_ joined #perl6
15:42 domidumont joined #perl6
15:52 domidumont1 joined #perl6
15:54 jnthn masak: Shiny diagrams in that post :)
16:00 * RabidGravy catches up on a month's worth of new music
16:01 RabidGravy you lot are cool but the musicians and DJs I know are quite awesome
16:04 dalek doc: 7db3744 | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod:
16:04 dalek doc: Remove documentation for method ins since it no longer exists
16:04 dalek doc: review: https://github.com/perl6/doc/commit/7db3744027
16:05 stmuk_ https://www.openhub.net/p/rakudo
16:06 dogbert2 good afternoon #perl6
16:07 dogbert2 what is the perl6 replacement for $. now that the IO::Handle ins method no longer exists?
16:10 cognominal joined #perl6
16:10 khw joined #perl6
16:12 masak jnthn: they came out nice :)
16:14 perlpilot dogbert2: .ins
16:14 perlpilot oh, me can't read
16:16 leont joined #perl6
16:16 perlpilot Why does IO::Handle no longer have .ins?
16:16 sufrostico joined #perl6
16:18 dogbert2 perlpilot: it seems to have been removed in 77fc44d9c0f
16:18 dogbert2 by none other than lizamt
16:18 dogbert2 *lizmat
16:21 wamba1 joined #perl6
16:21 * felher likes reading masak's posts :)
16:21 felher they are always fun :)
16:22 Xliff m: my @b = [None xx 2] xx 2; say @b
16:22 camelia rakudo-moar 3cab7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HYbZWpYk6p␤Undeclared name:␤    None used at line 1␤Undeclared routine:␤    xx used at line 1␤␤»
16:22 ZoffixW joined #perl6
16:22 Xliff m: my @b = [Nil xx 2] xx 2; say @b
16:22 camelia rakudo-moar 3cab7c: OUTPUT«[[(Any) (Any)] [(Any) (Any)]]␤»
16:23 ZoffixW What is S///? An operator? Sub? Special syntax?
16:23 ZoffixW I wanna look up it's definition of ACCEPTS
16:23 ilmari m: None.WHAT.say
16:23 camelia rakudo-moar 3cab7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9pKo9hFiOK␤Undeclared name:␤    None used at line 1␤␤»
16:24 dalek ecosystem: 4cc08f3 | Altai-man++ | META.list:
16:24 dalek ecosystem: Add Devel::Trace to ecosystem
16:24 dalek ecosystem: See https://github.com/Altai-man/perl6-Devel-Trace
16:24 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/4cc08f371d
16:24 dalek ecosystem: eff33e9 | (Zoffix Znet)++ | META.list:
16:24 dalek ecosystem: Merge pull request #200 from Altai-man/master
16:24 dalek ecosystem:
16:24 dalek ecosystem: Add Devel::Trace to ecosystem
16:24 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/eff33e98ad
16:24 dogbert2 ah, looking at the code it seems we should now use .lines.kv instead
16:25 dalek perl6-most-wanted: 14c577d | Altai-man++ | most-wanted/modules.md:
16:25 dalek perl6-most-wanted: Remove Devel::Trace since we already have one.
16:25 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/14c577d01f
16:25 dalek perl6-most-wanted: 45e382e | (Zoffix Znet)++ | most-wanted/modules.md:
16:25 dalek perl6-most-wanted: Merge pull request #28 from Altai-man/master
16:25 dalek perl6-most-wanted:
16:25 dalek perl6-most-wanted: Remove Devel::Trace since we already have one
16:25 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/45e382e156
16:31 Xliff Ahhh masak. I've been waiting for this blog post since you mentioned it.....
16:35 ZoffixW I think I found it: https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Actions.nqp#L7659
16:35 ZoffixW No idea what it's calling though :P
16:38 zhmylove joined #perl6
16:40 masak Xliff: cool. hope it makes sense. I'm sure there's tens of bits of relevant prior art that I've failed to mention or am not aware of.
16:40 masak but that's part of the charm of blogging ;)
16:41 masak Universal/Isomorphic JS comes to mind, for example
16:43 ZoffixW m: say 'foo' ~~ S/^//
16:43 camelia rakudo-moar 3cab7c: 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/wYKB77ZbKI:1␤    ------> 3say 'foo' ~~ 7⏏5S/^//␤True␤»
16:43 ZoffixW ehehe :) It lies!
16:44 timotimo masak: the link to the msdn developer center is b0rked, as it forgot to have the .aspx in its url
16:45 Xliff masak: What trips me out is that with webapps, the controller is emitting code to the browser to implement the UI.
16:46 Xliff Even more trippy - output templates containing UI code might be stored in the database.
16:46 ZoffixW All that suggests to me is the MVC pattern is a poor choice for web apps :)
16:47 Xliff ZoffixW, your replacement suggestion, then?
16:47 Xliff I mean MVC isn't perfect, but its the most sensible one I've seen, so far.
16:49 * [Coke] apologizes for breaking the build trying to unbreak the build.
16:49 * [Coke] waves from the highway
16:49 ZoffixW Xliff, well, I use MVC with fat models, but they just don't feel right. I saw a few months ago a post by someone proposing a new pattern, but the post was very long, dense, and I was hungover.
16:49 * ZoffixW tries to find it
16:52 ZoffixW No idea... It was featured on HackerNews is all I know :P
16:53 ugexe MVVM :P
16:55 prammer joined #perl6
17:02 prammer joined #perl6
17:05 prammer joined #perl6
17:09 prammer joined #perl6
17:10 pmurias Xliff: re controller emitting code, isn't that sort of "solved" by single page webapps
17:15 tharkun joined #perl6
17:17 baest joined #perl6
17:18 dalek doc: ac18efb | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
17:18 dalek doc: Added documentation for method week-year
17:18 dalek doc: review: https://github.com/perl6/doc/commit/ac18efb2eb
17:18 masak timotimo: thank you. fixed now.
17:18 Xliff pmurias, controller still has to emit that single page.
17:18 Xliff and SPAs, by definition, include JS.
17:21 Actualeyes left #perl6
17:23 RabidGravy stmuk_, I blame you for this entirely, I just lost an hour dicking round with Open Hub
17:26 Xliff Open Hub?
17:27 [Coke] mst++ # my wife and I approve of your poem.
17:28 Xliff s/Coffee/Spiced Chai Latte/ -- and it would be perfect!
17:30 RabidGravy Xliff, https://www.openhub.net/
17:33 Xliff \o/
17:34 ugexe you are pretty much asking for a ViewModel
17:34 Xliff perl6-Sudoku!
17:34 ugexe so MVVM, or even MVCVM
17:34 Xliff MV->c<-VM
17:36 mst MVC gets confusing with the web
17:36 mst ZoffixWin: I guess you should avoid Catalyst and Mojolicious then if you think that
17:36 mst ZoffixWin: maybe try Web::Simple and Dancer instead :P
17:38 zhmylove joined #perl6
17:41 leont joined #perl6
17:43 _nadim There's no page for MAIN on the docs site. but if you happen to type MAN instead (when your fingers are all messed up) you get to the performance page that no one says nothing about :)
17:47 uruwi joined #perl6
17:55 timotimo will someone try to explain the central message of The Big Lebowsky to me? and why "the dude abides" is (seems to be) such a catchphrase
17:57 perlpilot timotimo: https://www.quora.com/The-Big-Lebowski-1​998-movie-What-does-the-Dude-abides-mean
17:57 ugexe i believe its that smoking weed is cool and white russians are not a girl drink
17:57 perlpilot (I'm lazy)
18:00 timotimo thanks :P
18:00 timotimo i personally don't have a problem drinking "girl drinks"; maybe one of my role models is J.D. from Scrubs, who likes "Appletinis"
18:01 _nadim Am I conpletely mistake to think that MAIN does not need Getopt::Type to handle switches? I though I saw an example of that but I am not sure anymore.
18:02 timotimo interestingly, before i looked it up, "abide" meant something like "comply" or "obey" to me
18:03 perlpilot _nadim: http://design.perl6.org/S06.ht​ml#Declaring_a_MAIN_subroutine
18:09 _nadim I was just reading that, it looks like it and I didn't understand why I got an error!
18:09 _nadim hmm, dumb ass me! maybe the name of the script on the command line would do some good
18:15 sno joined #perl6
18:19 firstdayonthejob joined #perl6
18:21 Xliff A test in Audio::OggVorbis requires the creation of a file. Does the automatic testing on modules.perl6.org allow that?
18:21 Xliff And also, how do I configure my module to work with that system?
18:21 tony-o the big lebowsky is about fighting the system, man
18:23 timotimo system be damned
18:23 tony-o most of the stuff he says is also repeated
18:23 Xliff So is Fight Club
18:24 tony-o when he's writing a check at the beginning he first hears 'this aggression will not stand'
18:24 Xliff Oops! I mentioned Fight Club. Hope Tyler didn't hear that.
18:24 timotimo ZoffixWin: you claim in your "extra typical perl6" that you can't have method chains across multiple lines
18:24 tony-o then he says that throughout the movie
18:24 timotimo ZoffixWin: i don't think that's correct
18:24 gtodd do many folks here use perl6 on the jvm?
18:25 timotimo at the moment perl6 on jvm isn't very usable, but it's being worked on, and people have used it in the past
18:25 avenj joined #perl6
18:25 gtodd I haven't done so for a long time because .... slow and not up to date ...
18:27 gtodd when all that's available is a jvm I sometimes fiddle around with scala and/or groovy just wondered if perl6 was available
18:30 timotimo right
18:34 bartolin speaking of that, there is PR 748 for rakudo which should make about 5500 tests pass on the JVM (again).
18:34 gtodd whoa
18:34 bartolin I know that psch++ worked on implementing something like VMNull for JVM -- which would be a better alternative to that PR
18:36 bartolin but maybe the relevant part of that PR should be included until that work is finished?
18:36 timotimo reverts are cheap. if it helps others move more quickly, maybe it's a good idea? i'd ask psch how hard it'd be to work on vmnull when that PR is applied on master in the mean time
18:37 _nadim can one die without a stack trace?
18:37 timotimo you can note + exit
18:37 _nadim oki
18:37 gtodd things with versions that "also run on the jvm" periodically get out of sync
18:38 _nadim I tried to exit a string that didn't go well :)
18:38 timotimo hah
18:38 timotimo yeah, exit is only for the process' return code
18:39 _nadim exit is horrible anyway
18:39 timotimo well, at least you can catch exit nowadays :)
18:39 _nadim Ha! Can I?
18:40 timotimo yup
18:40 _nadim is exit an exception
18:40 timotimo not quite
18:40 timotimo that stuff is new and i hadn't looked at it yet
18:40 timotimo it involves a dynamic variable if i'm not mistaken
18:40 _nadim a link maybe?
18:41 timotimo a ... link?
18:41 _nadim Bleah, a dynamic variable. what is wrong with throwing an exception that the run time catches?
18:41 _nadim a link to where that is explained.
18:41 gtodd of course some things that start out on the jvm and hope to branch out end up staying :) ... e.g. scala
18:41 timotimo exceptions are too easily caught too broadly without thinking about it.
18:42 _nadim lol! isn't it exactly what it should be?
18:43 timotimo &*EXIT is what gets called when sme code runs "exit"
18:43 _nadim ah! and that can be redefined I guess.
18:44 timotimo yeah, like any dynamic variable
18:45 _nadim weird, I find Getopt::Type in the ecosystem but panda fails the installation with "resolve stage failed for Getopt::Type: Project Getopt::Type not found in the ecosystem"
18:46 moritz _nadim: did you run "panda update"?
18:46 sufrostico joined #perl6
18:47 _nadim no, never have before, let's try
18:47 dalek doc: b1e8212 | (Jan-Olof Hendig)++ | doc/Type/Complex.pod:
18:47 dalek doc: Added documentation for the reals method plus some examples for re and im
18:47 dalek doc: review: https://github.com/perl6/doc/commit/b1e8212a4d
18:48 _nadim moritz: that's what it needed, thanks
18:49 timotimo maybe when we give the "not found in the ecosystem" error we should also point out when the last update was
18:51 _nadim I think that sould be a nice hint
18:52 _nadim I am still not wrapping my head around https://design.perl6.org/S06.ht​ml#Declaring_a_MAIN_subroutine. I understand that I can use --options on the command line but if i I do i get a usage message!
18:53 rindolf joined #perl6
18:53 timotimo the --options have to go before the positional arguments
18:53 timotimo that easily confuses people
18:54 _nadim Ah! like the panda command line
18:54 timotimo yes, it uses MAIN, too
18:55 masak m: my &*EXIT = { say "OH HAI"; exit }; exit
18:56 masak DIHWIDT, I guess.
18:56 camelia rakudo-moar 3cab7c: OUTPUT«(timeout)OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH HAI␤OH H…»
18:56 gtodd hehe
18:56 ZoffixW joined #perl6
18:56 ZoffixW m: say quietly 'foo' ~~ S/f/m/;
18:56 camelia rakudo-moar 3cab7c: 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/R7Bw8kNp0f:1␤    ------> 3say quietly 'foo' ~~ 7⏏5S/f/m/;␤False␤»
18:57 ZoffixW Is it a bug that quietly doesn't quiet that warning or am I using it wrong?
18:57 _nadim timotimo: then I guess I have to go look at the example because it won't take switched at the begining of the command line or otherwise.
18:58 timotimo yeah, time for examples i suppose
18:58 timotimo ZoffixW: that's a compile-time warning; you'd suppress those with "no warnings"
18:58 geekosaur ZoffixW, I think that;s a compile warning... that
18:58 ZoffixW timotimo, RE article: that wasn't my claim. The claim was you can't have method chains with .&sub calls in them on multiple lines.
18:59 ZoffixW I tried it on the weekend. Was I doing something wrong?
18:59 ZoffixW Same applies to chains started on WhateverStar
18:59 timotimo oh, really? you can't?
19:00 ZoffixW m: sub even { $^a %% 2 }; say 42␤.&even␤.uc;
19:00 camelia rakudo-moar 3cab7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1NYXbpXv67␤Malformed postfix call (only alphabetic methods may be detached)␤at /tmp/1NYXbpXv67:2␤------> 3.7⏏5&even␤»
19:00 timotimo oh!
19:00 timotimo interesting
19:00 ZoffixW Hm. Seems like the trully correct answer is: you can't break the chain *before* the &sub calls, but you can afterwards
19:00 ZoffixW m: sub even { $^a %% 2 }; say 42.&even␤␤␤␤.uc;
19:00 camelia rakudo-moar 3cab7c: OUTPUT«TRUE␤»
19:01 dalek doc: c4e1d89 | (John Gabriele)++ | doc/Language/5to6-perlfunc.pod:
19:01 dalek doc: fix Pod typo, and minor reword
19:01 dalek doc: review: https://github.com/perl6/doc/commit/c4e1d89551
19:03 ZoffixW timotimo++ # Article updated
19:04 timotimo thx :)
19:04 ZoffixW m: no warnings; say  'foo' ~~ S/f/m/;
19:04 camelia rakudo-moar 3cab7c: OUTPUT«===SORRY!===␤Don't know how to 'no warnings' just yet␤»
19:04 ZoffixW heh
19:04 timotimo m: no worries; say 'foo' ~~ S/f/m;
19:04 camelia rakudo-moar 3cab7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UiJJNjUaPG␤Malformed replacement part; couldn't find final /␤at /tmp/UiJJNjUaPG:1␤------> 3no worries; say 'foo' ~~ S/f/m;7⏏5<EOL>␤    expecting any of:␤        infix stopper␤»
19:04 timotimo m: no worries; say 'foo' ~~ S/f/m/;
19:04 camelia rakudo-moar 3cab7c: 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/yxJEtrN5BB:1␤    ------> 3no worries; say 'foo' ~~ 7⏏5S/f/m/;␤False␤»
19:04 timotimo hm.
19:04 geekosaur isn;t worries just perl5 stuff?
19:05 sufrostico joined #perl6
19:05 timotimo no clue :P
19:05 ZoffixW That warning lies and I can think of some cases where the smartmatch S/// is kinda useful.
19:06 ZoffixW Well... not to imply there isn't a better way to do those useful things :)
19:15 jjido joined #perl6
19:16 geekosaur the precise situation in which "it lies" is when the result of the S/// is identical to its input.
19:16 yqt joined #perl6
19:17 geekosaur I can't think of a case where *an operation whose purpose is to produce a changed string on success* makes any real sense. it looks more like a thinko
19:18 geekosaur (that is, as part of a smartmatch)
19:18 geekosaur but yes, if you are sufficiently "it doesn;t have to make any sense at all, just do *something*", it "lies"
19:18 geekosaur if I wanted that, I'd use Intercal\
19:19 ZoffixW My critique of the S/// error and proposed change: https://rt.perl.org/Ticket/Display.html?id=128019
19:19 geekosaur sigh
19:20 ZoffixW What?
19:20 geekosaur you win, the very few not even sensible but they work! outweigh that it;s almost always an error, please remove the warning
19:20 ZoffixW Have you even read the ticket?
19:21 grondilu I have a class that works fine but inefficiently.  I'm considering making it a base and create a "Optimized" role that would improve on stuff.  I annoyed by the choice on names, because is "is Optimized" sounds good but "does Optimized" sounds silly.
19:23 grondilu (it's crazy how much time I can waste thinking about names during programming)
19:23 ZoffixW There are only two hard problems in programming: cache invalidation, naming stuff, and off-by-one errors.
19:23 lucs grondilu++ It's not wasted time
19:24 skids "does Optimizing"?
19:24 ZoffixW does Optimizations? :)
19:25 grondilu but then "is Optimizing" is not quite right.
19:25 ZoffixW heh
19:25 lucs is Better, does Better  ;)
19:25 grondilu lol
19:25 ZoffixW lucs++ # read my mind lol :)
19:26 grondilu or maybe "role Optimized {...}; role Optimization is Optimized {}"
19:26 grondilu making two roles, one being an alias of the other.
19:27 skids .oO(what does role A is B do?)
19:27 skids I always used does.
19:27 grondilu inheritance
19:27 lucs One thing I've come to realize and have started to accept is that those names we try to make just right (as we should) are above all symbols, and not necessarily real words.
19:28 grondilu m: role A {}; role B is A {}
19:28 camelia rakudo-moar 3cab7c: ( no output )
19:29 skids Yeah it "works".  Also, "my role X::Temporal is Exception" is in an example in S32.  Just... never saw that before.
19:31 lucs For example, I've got a project for handling code snippets, where I've got names like Snip (snippet), Snal (snipper alias), Snalex (snippet exception), Snalob (snippet object)
19:32 ZoffixW geekosaur, my main concern is the suggested fix in the warning. The "lies" part, while less relevant, obscures what's actually happening with the code and is too wordy. I didn't mean to sound confrontational to your response, but I feel my suggestion is reasonable enough.
19:32 lucs (er, snalex et al are "snippet alias foo")
19:33 tomboy64 joined #perl6
19:36 colomon joined #perl6
19:37 Xliff Does someone have docs as to how you add something to the ecosystem. I have the basic gist of what to do, but there are questions...
19:37 Xliff For example, once added, can I force panda/zef to only extract a certain version?
19:38 Xliff How do you set up automated testing? Can your tests access the filesystem?
19:39 Relsak joined #perl6
19:40 sufrostico joined #perl6
19:40 ZoffixW Xliff, there's this http://docs.perl6.org/language/modules and the README: https://github.com/perl6/ecosystem/
19:40 moritz panda defaults to the master branch, so you can develop in a different branch and only merge releases into master
19:40 moritz (or it defaults to whatever the default branch on github is, rather)
19:40 Xliff Hrm.
19:41 Xliff OK. Was hoping I could specify a branch and develop on master.
19:41 ugexe zef can fetch a specific version, but the ecosystem only provides 1 version. if you use cpan with it you can get a specific version, but its contents are outdated
19:41 Xliff The opposite way makes just as much sense.
19:42 ZoffixW Doesn't panda fetch from whatever branch the META6.json is located at?
19:42 ZoffixW I recall RabidGravy saying they use a specific URL for releases or something
19:43 RabidGravy yeah, you can point at a tag
19:43 RabidGravy but that means you'd have to have some release branch or whatever
19:44 skids Yeah looks like there is explicit code for calling add_parent when a role has a parent class.  Yet specs say "A role may not inherit from a class" and seems to go out of the way to use the "role A { also is Class; }" syntax rather than "role A is Class" when talking about forcing inheritance by the composing class.  Mysterious.
19:44 moritz ugexe: in the end we won't get around creating releases
19:44 moritz and uploading them
19:44 moritz skids: the two are exactly the same
19:45 moritz skids: and role A is Parent { } doesn't make A inherit from Parent; rather it makes a class that A is composed into inherit from Parent
19:45 skids moritz: right, that I already knew.
19:46 moritz skids: basically, roles copy their whole body into a class they are composed into. If you think of it that way, using the "also is ..." syntax inside the body is kinda more intuitive
19:47 jnthn Since composition is flattening, then you can also view the "does" as "giving roles" to the target class too.
19:49 tomboy64 joined #perl6
19:52 Ven joined #perl6
20:03 tomboy64 joined #perl6
20:08 zakharyas joined #perl6
20:10 cdg joined #perl6
20:11 wilcov joined #perl6
20:12 tony-o MadcapJake: search should work a little bit better now
20:13 firstdayonthejob joined #perl6
20:15 vendethiel joined #perl6
20:19 dolmen joined #perl6
20:31 sortiz joined #perl6
20:35 dalek doc: 7fa4c56 | skids++ | doc/Language/objects.pod:
20:35 dalek doc: Document role-assisted inheritence and method definition pecking order
20:35 dalek doc: review: https://github.com/perl6/doc/commit/7fa4c563c9
20:45 sortiz \o #perl6
20:45 RabidGravy harr!
20:49 dwarring joined #perl6
20:51 ZoffixLappy joined #perl6
20:57 spider-mario joined #perl6
21:00 masak d'arr!
21:10 RabidGravy :)
21:11 timotimo r'arr
21:12 dalek DBIish: 27d7de3 | (Salvador Ortiz)++ | lib/DBDish/Oracle (2 files):
21:12 dalek DBIish: Oracle: Reorder native subs
21:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/27d7de3121
21:12 dalek DBIish: f745116 | (Salvador Ortiz)++ | lib/DBDish/mysql (2 files):
21:12 dalek DBIish: mysql: Reorder native subs
21:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/f7451168bc
21:12 dalek DBIish: 9b1131c | (Salvador Ortiz)++ | / (2 files):
21:12 dalek DBIish: For panda's users, now v0.5.7
21:12 dalek DBIish:
21:12 dalek DBIish: Native call scope issues fixed, 40x ~ 60x faster
21:12 dalek DBIish: review: https://github.com/perl6/DBIish/commit/9b1131c1d9
21:12 TEttinger joined #perl6
21:12 telex joined #perl6
21:13 cognominal joined #perl6
21:14 timotimo wow! 40x ~ 60x? !?!
21:14 timotimo is that the "reorder native subs" commits?
21:15 sortiz yep: From 167s to 2.5s
21:15 timotimo that diff is hard to read
21:15 sortiz Fetching 8000 records.
21:15 timotimo you moved native subs outside of the methods that call them??
21:15 captain-adequate joined #perl6
21:16 ZoffixLappy sortiz++
21:16 sortiz timotimo, Yes, only that.
21:16 jjido joined #perl6
21:16 timotimo interesting. so that prevents a closure from being taken i suppose? but what else?
21:18 sortiz If the sub is declared inside the method, the Native Role attached by 'is native' trait is recomposed at every call, causing all the !setup dance to repeat.
21:18 sortiz Including the library searching, loading, symbol search, etc.
21:20 jnthn m: multi trait_mod:<is>(Routine $r, :$foo!) { $r does role { has $.x is rw } }; sub bar() is foo { }; &bar.x = 42; say &bar.x; say &bar.clone.x
21:20 camelia rakudo-moar 3cab7c: OUTPUT«42␤42␤»
21:20 jnthn Hmmm
21:20 _28_ria joined #perl6
21:20 sortiz As all are native calls, no closures involved.
21:20 atweiden joined #perl6
21:21 jnthn sortiz: A nested sub is a closure
21:21 jnthn sortiz: And so will be cloned on entry to the surrounding
21:21 jnthn And that'll happen prior to the setup, which will then happen in a throw-away copy
21:22 jnthn So yeah, not surprised this improves things :)
21:22 sortiz Yes and No, I was expecting that without "captures", no closure was formed.
21:22 jnthn No, it always will be at present.
21:23 jnthn That'll probably be otpimized at some point
21:23 sortiz Yep, yesterday I discuss the details with masak.
21:24 sortiz Originally the MoarVM profiler shows me the problem.
21:25 sortiz And yes, I found that is cloned, so the role attributes reset.
21:26 jnthn :)
21:26 jnthn profiler++
21:28 sortiz The callsite setup is very expensive, so the gains :-)
21:28 cognominal joined #perl6
21:30 jnthn Yeah
21:31 jnthn NativeCall's internals are decidedly in the queue for a good performance-oriented overhaul
21:31 jnthn The current factoring is opaque to the JIT, unfortunately.
21:32 wamba joined #perl6
21:35 sortiz I'm working, on an external module, in a Native Libs/calls revamp. One important thing is that, in Windows, LoadLibrary search all over the place at every call, no matter if the DLL is already loaded.
21:35 colomon joined #perl6
21:36 sortiz jnthn, BTW, MoarVM repo accepts PRs for dyncall? ;-)
21:38 jnthn sortiz: In theory, though it's nice to send the upstream too, and MoarVM targets both dyncall and libffi to get sufficient platform coverage.
21:38 jnthn sortiz: Also the trouble with our own derived versions of things is it can make life awkward for packagers on distributions that hate you bundling stuff. :)
21:39 sortiz Yes, I understand that. I'll try upstream first.
21:41 cognominal joined #perl6
21:42 sortiz Was asking 'cus https://github.com/MoarVM/MoarVM​/blob/master/3rdparty/README.md ;-)
21:43 ZoffixLappy What is :mm($samemark) arg in .subst/.subst-mutate? It doesn't seem to be documented
21:44 masak 'night, #perl6
21:44 ZoffixLappy night
21:44 sortiz night masak
21:44 jnthn o/ masak
21:46 jnthn m: say 'püt'.subst(/p\w/, 'po', :mm)
21:46 camelia rakudo-moar 3cab7c: OUTPUT«pöt␤»
21:46 ZoffixLappy Ah, thanks. jnthn++
21:46 geekosaur pretty sure that's documented in the synopses
21:47 ZoffixLappy Right, S05 I forgot to check there
21:48 timotimo these days it's hard to figure out when looking at the synopses is a good idea and when it's not :)
21:48 jnthn sleep &
21:49 sortiz o/ jnthn
21:49 geekosaur I'm just in the habit of checking both these days, because from my POV stuff is scattered all over the place and far too often I have to already know the answer to my question to figure out where the answer is :
21:49 geekosaur :/
21:49 ZoffixLappy I'm going to document S/// in language/operators under.. um... "Miscellaneous Operators" unless someone can suggest a better place
21:50 sortiz timotimo, indeed, that is the hardest part for learning Perl6 :-)
21:58 ZoffixLappy m: sub foo ($x) { '42' }; my $m = 'foo' ~~ /f(o)(o)/; say foo($m)
21:58 camelia rakudo-moar 3cab7c: OUTPUT«42␤»
21:59 ZoffixLappy m: say 'meowmix'.subst: /me (.) (.+)/, -> ($x) {};
21:59 camelia rakudo-moar 3cab7c: OUTPUT«Too many positionals passed; expected 1 argument but got 2 in sub-signature␤  in block <unit> at /tmp/fjxOybStJY line 1␤␤»
21:59 ZoffixLappy m: say 'meowmix'.subst: /me (.) (.+)/, -> ($x, $y) {};
21:59 camelia rakudo-moar 3cab7c: OUTPUT«Unexpected named argument '' passed in sub-signature␤  in block <unit> at /tmp/iJFsMQMud1 line 1␤␤»
22:00 ZoffixLappy Weird, no? In the sauce, the Callable is called as $replacement($m), where $m is an element from the result of self.match in Str class
22:02 ZoffixLappy m: sub foo ($x) { '42' }; say 'meowmix'.subst: /me (.) (.+)/, &foo;
22:02 camelia rakudo-moar 3cab7c: OUTPUT«42␤»
22:02 ZoffixLappy Doesn't happen with subs... Am I declaring point block's sig wrong?
22:02 rurban joined #perl6
22:06 ZoffixLappy m: my $callable = -> ($x) { 42 }; my $m = 'foo' ~~ /f(o)(o)/; say $callable($m)
22:06 camelia rakudo-moar 3cab7c: OUTPUT«Too many positionals passed; expected 1 argument but got 2 in sub-signature␤  in block <unit> at /tmp/xrZO2dcoGJ line 1␤␤»
22:06 * ZoffixLappy reports
22:06 wtw_ joined #perl6
22:07 geekosaur m: say 'meowmix'.subst: /me (.) (.+)/, (-> $x, $y {});
22:07 camelia rakudo-moar 3cab7c: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/vbj3H6VyoX line 1␤␤»
22:07 geekosaur huh
22:07 geekosaur gonna guess at some kind of parsing confusion then
22:07 ZoffixLappy Oh, no example works fine
22:07 ZoffixLappy It's *supposed to* get just 1 arg
22:08 ilogger2 joined #perl6
22:08 ZoffixLappy m: my $callable = -> $x { 42 }; my $m = 'foo' ~~ /f(o)(o)/; say $callable($m)
22:08 camelia rakudo-moar 3cab7c: OUTPUT«42␤»
22:09 ZoffixLappy m: my $callable = -> ($x, $y) { say "$x $y" }; say $callable([1, 2])
22:09 camelia rakudo-moar 3cab7c: OUTPUT«1 2␤True␤»
22:09 ZoffixLappy K, I see what my mistake was. geekosaur++
22:11 [ptc] joined #perl6
22:13 vendethiel joined #perl6
22:13 MadcapJake tony-o: search works great now!
22:14 avar joined #perl6
22:14 avar joined #perl6
22:16 dalek doc: 0712be4 | (Dabrien 'Dabe' Murphy)++ | doc/ (2 files):
22:16 dalek doc: Document "Hash vs. Block" Gotcha
22:16 dalek doc:
22:16 dalek doc:     my %fruits = apple => 'McIntosh', pear => 'Bartlett';
22:16 dalek doc:     given (%fruits) {
22:16 dalek doc:       my $fails = { red => $_<apple>, green => $_<pear> };
22:16 dalek doc:       say $fails.WHAT;          # Block
22:16 dalek doc:       say $fails<red>;          # ERROR: Type Block does not support associative indexing
22:16 dalek doc:     }
22:16 dalek doc: review: https://github.com/perl6/doc/commit/0712be40fc
22:16 dalek doc: 496ec07 | (Dabrien 'Dabe' Murphy)++ | doc/ (2 files):
22:16 dalek doc: Incorporate feedback re: idiomaticity
22:16 dalek doc:
22:16 dalek doc: zoffixznet++
22:16 dalek doc: ab5tract++
22:16 dalek doc: review: https://github.com/perl6/doc/commit/496ec0768d
22:16 dalek doc: 1cd7ebe | (Zoffix Znet)++ | doc/ (2 files):
22:16 dalek doc: Merge pull request #463 from perl6/hash-block
22:16 dalek doc:
22:16 dalek doc: Document "Hash vs. Block" Gotcha
22:16 dalek doc: review: https://github.com/perl6/doc/commit/1cd7ebea91
22:18 RabidGravy boom
22:20 dalek doc: 942fada | (Zoffix Znet)++ | doc/Type/Str.pod:
22:20 dalek doc: Update Str.pod
22:20 dalek doc: review: https://github.com/perl6/doc/commit/942fadade3
22:26 wamba joined #perl6
22:28 kid51 joined #perl6
22:30 Sgeo joined #perl6
22:39 sortiz m: say "meowmix".subst: /me (.) (.+)/, -> { $1 ~ $0 }; # ZoffixLappy, I dunno how to destructure a Match, but this works.
22:39 camelia rakudo-moar 3cab7c: OUTPUT«wmixo␤»
22:39 colomon joined #perl6
22:40 grondilu joined #perl6
22:41 ZoffixLappy :)
22:43 RabidGravy right that's enough, I'll finish the documentation for this thing in the morning
22:45 RabidGravy toodles
22:45 ZoffixLappy \o
22:46 infina joined #perl6
22:46 infina joined #perl6
22:50 colomon joined #perl6
22:54 sortiz In general I found more idiomatic to initialize a Hash with a list of pairs.
23:04 atweiden i'm trying to make a parser that recursively parses `include` directives, as per here https://gist.github.com/atweiden/​3a904d4556706e00113572bd1f7e0c33
23:05 atweiden however i keep getting this error message `Cannot assign to a readonly variable or a value`, which is being triggered at `make Inclusive.parsefile($filename, :$actions).made;`
23:05 atweiden am i going about this incorrectly, or is this a compiler bug?
23:16 BenGoldberg joined #perl6
23:17 ZoffixLappy New blog post: "Perl 6: The S/// Operator": http://blogs.perl.org/users/zoffix_zn​et/2016/04/perl-6-the-s-operator.html
23:18 captain-adequate Nice one ZoffixLappy
23:25 jameslenz joined #perl6
23:25 BenGoldberg joined #perl6
23:27 geekosaur joined #perl6
23:29 uruwi joined #perl6
23:32 * BenGoldberg wonders how much difference there is between a pointy block and an anonymous sub.
23:33 cognominal joined #perl6
23:37 TimToady they smell different
23:37 sortiz BenGoldberg, imo the most important are its return semantics.
23:38 TimToady secondarily the parameters default differently, and block don't declare implicit $/ or $!
23:38 dalek doc: 43e79a2 | (Zoffix Znet)++ | doc/Language/operators.pod:
23:38 dalek doc: Document s/// and S///
23:38 dalek doc:
23:38 dalek doc: Closes #437
23:38 dalek doc: review: https://github.com/perl6/doc/commit/43e79a2b9d
23:38 TimToady pointies don't get their own $_ by default either unless you -> $_
23:45 ZoffixLappy heh... I notice someone deliberately downvotes all Perl 6 posts posted on /r/perl/ reddit :P
23:49 gtodd ZoffixLappy: So glad you documented overcoming the difficulty of S/// ++
23:50 ZoffixLappy \o/
23:51 ZoffixLappy It makes perfect sense once you know what it's actually doing :)
23:51 tardisx joined #perl6

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

Perl 6 | Reference Documentation | Rakudo