Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 khw joined #perl6
00:08 AlexDaniel m: for ^5 { LAST { LAST { say ‘foo’ }; say ‘bra’ }; .say }
00:08 camelia rakudo-moar 1dca2d: OUTPUT«0␤1␤2␤3␤4␤bra␤»
00:10 AlexDaniel m: LAST {}(5)
00:10 camelia rakudo-moar 1dca2d: OUTPUT«Cannot find method 'Nil' on object of type Int␤  in block <unit> at /tmp/YfEr3VkYN6 line 1␤␤»
00:10 AlexDaniel m: Nil(5)
00:10 camelia rakudo-moar 1dca2d: OUTPUT«Cannot find method 'Nil' on object of type Int␤  in block <unit> at /tmp/Jf8g6cPo7p line 1␤␤»
00:10 AlexDaniel why method?
00:12 dalek doc: 64b6a26 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod:
00:12 dalek doc: add infix:<∘> to the index
00:12 dalek doc: review: https://github.com/perl6/doc/commit/64b6a263f5
00:13 AlexDaniel gfldex++
00:14 AlexDaniel gfldex: wait, but it's not going to make 「o」 searchable
00:14 AlexDaniel gfldex: I know that search results for 「o」 are not that great, but at least it should be listed
00:15 AlexDaniel perhaps once we start prioritizing exact matches it will be better
00:16 pierre_ joined #perl6
00:35 sortiz AlexDaniel, 'cus any coercion attempts to use the corresponding method on the coerced. I.e. for example, Str(5) desugar to 5.Str()
00:35 jnthn joined #perl6
00:35 Actualeyes joined #perl6
00:36 AlexDaniel m: sub Mu { say 42 }; Mu(5)
00:36 camelia rakudo-moar 1dca2d: OUTPUT«Cannot find method 'Mu' on object of type Int␤  in block <unit> at /tmp/Ha9JeWGiCV line 1␤␤»
00:36 AlexDaniel m: sub Mu { say 42 }; Mu()
00:36 camelia rakudo-moar 1dca2d: OUTPUT«WARNINGS for /tmp/iniEIuFqLz:␤Useless use of constant value Mu() in sink context (line 1)␤»
00:37 AlexDaniel m: sub Mu { .say }; Mu(42)
00:37 camelia rakudo-moar 1dca2d: OUTPUT«Cannot find method 'Mu' on object of type Int␤  in block <unit> at /tmp/ADoJZQ_Yey line 1␤␤»
00:37 ZoffixWin I'm not proud to admit, but I converted http://perl6.party/ to Perl 5 :(
00:37 AlexDaniel ZoffixWin: what was the reason?
00:38 ZoffixWin AlexDaniel, huge memory leaks: http://irclog.perlgeek.de/perl6/2016-05-08#i_12449184
00:38 AlexDaniel ah
00:38 mst ZoffixWin: what, you didn't just switch it over to CGI?
00:38 ZoffixWin pfft, fuck CGI
00:39 mst hipster
00:39 ZoffixWin :)
00:39 mst it's a perfectly reasonable protocol
00:40 mst the one non-static part of the shadowcat site is a Web::Simple JSON API deployed as .cgi that angular talks to ;)
00:40 ShimmerFairy I'd at least use the variant of CGI that doesn't re-run the script every time (IIRC the big sticking point with plain CGI)
00:40 AlexDaniel mst: I'm not sure if perl 6 is going to work well enough with cgi given its startup time
00:41 mst honestly, it being a blog, I'd have it static generating
00:42 * sortiz is planing to embed Rakudo in apache: mod_perl6
00:42 AlexDaniel sortiz: yeeaaah! That'd be great
00:42 mst AUGH
00:43 mst what could possibly go *foom*
00:44 * ZoffixWin hopes that was a joke....
00:44 ShimmerFairy there's no need for that; just implement a Perl 6 script executor in PHP  :P
00:44 ZoffixWin >_<
00:44 mst ShimmerFairy: pretty sure you can already embed perl5 in PHP as an extension
00:45 mst so all you need to do then is writen an Inline::Perl6 shim
00:45 mst sorted!
00:45 sortiz No ZoffixWin, I'm serious, at $work I use mod_perl every day.
00:45 ZoffixWin 0.o0
00:45 AlexDaniel ZoffixWin: ok, so… There's a problem with contrast on navbar
00:45 ShimmerFairy mst: but if it's PHP, how can we make it inconsistent and illogical? :P
00:46 AlexDaniel ZoffixWin: http://leaverou.github.io/contrast-ratio/#%23cdddeb-on-%23428bca
00:46 mst sortiz: ok, but could you make sure this time people only use it for writing actual web server extensions rather than deploying web apps?
00:46 AlexDaniel ZoffixWin: same goes for timestamps http://leaverou.github.io/contrast-ratio/#%23999-on-%23f6f6f6
00:46 mst because mod_perl is great for the former and a lot of billabnle hours I wish I hadn't billed for the latter
00:47 AlexDaniel ZoffixWin: also, I'd increase the font size in the navbar
00:48 AlexDaniel ZoffixWin: and if you're wondering if I am the only one who is pissed of by things like that, see this http://contrastrebellion.com/
00:48 cdg joined #perl6
00:49 mst ShimmerFairy: write a slang that calls back into perl5 for ~~ behaviour
00:49 ZoffixWin AlexDaniel, so you're pissed off because a tiny portion of text doesn't score a high-enough number on some website? :)
00:49 ShimmerFairy mst: I'll have to code up a ~~~ that matches values unless they're objects, then :P
00:49 AlexDaniel ZoffixWin: I'm pissed off because it is hard to read, for no reason
00:49 ZoffixWin Configure your monitor properly :)
00:50 AlexDaniel ZoffixWin: my monitor is alright, thank you. Fix your website ;)
00:50 ZoffixWin heh
00:50 mst ZoffixWin: navbar font is tiny
00:50 mst ZoffixWin: contrast is terrible
00:51 mst ZoffixWin: I take it you hate accessibility
00:51 ZoffixWin I don't know what you're talking about! On my $1,100 monitor it looks fantastic!
00:51 ZoffixWin :P
00:51 mst I mean, I can just about read this, but I know people who're various forms of dys-something-ic who'd be screwed
00:52 mst there's something seriously wrong when I end up thinking "I'd rather be reading blogs.perl.org" :P
00:52 Ben_Goldberg joined #perl6
00:52 ZoffixWin 0.0
00:52 ShimmerFairy "Works Best on IE 5.0"
00:53 khagan joined #perl6
00:53 mst "Works Best On An Expensive Machine While Neurotypical And Under Thirty"
00:54 ShimmerFairy "Valid HTML 3.2"
00:54 mst that's almost true of trout.me.uk
00:54 * ZoffixWin is not neutortypical nor under thirty :)
00:54 mst neutertypical sounds like a genderoftheday post
00:55 ZoffixWin :D
00:55 AlexDaniel alright, you took it down!
00:55 AlexDaniel “Service Unavailable”
00:55 Ben_Goldberg joined #perl6
00:55 mst also, if you're using apache, you could use FastCgiServer with say five children
00:56 mst and then have a small cron script that shoots one in the head every so often
00:56 mst and that'd give you mostly-lkea-proof-ness
00:56 ZoffixWin Yeah, I'm trying to fix the in-browser-code-sample-runners
00:56 mst that or you could just ulimit it and watch it go pop by itself
00:56 TeamBlast joined #perl6
00:58 ShimmerFairy mst: it always strikes me as funny when I remember that a phrase like "kill child" is wildly different in computer terms vs. the rest of life :)
01:00 hotel apparently there's a lot of contentious computing terms
01:00 hotel e.g. master/slave
01:00 mst let's not go there
01:00 * hotel backs away
01:01 ShimmerFairy that's another good one, though fortunately it's pretty much limited to tiny little switches on your HDDs (and probably just old ones at that) nowadays :P
01:02 mst speaking as somebody who deals with the care and feeding of databases sometimes
01:02 hotel and anything in a network
01:02 AlexDaniel https://github.com/django/django/pull/2692
01:02 mst it's an argument I could do without having to deal with
01:02 ZoffixWin AlexDaniel, fixed! http://perl6.party/
01:02 mst and the conversation on that PR nicely encapsulates why I said "let's not go there" :)
01:02 ZoffixWin AlexDaniel, the constrast/size stuff
01:03 hotel ZoffixWin, I like the about page
01:03 ZoffixWin :P
01:03 hotel oh is this one of those jekyll blogs?
01:03 ZoffixWin .oO( jekyll blogs??? )
01:04 hotel oh, guess not
01:04 AlexDaniel ZoffixWin: nice, thanks! It's not perfect but at least it is much better now
01:05 hotel https://github.com/HotelCalifornia/hotelc.me jekyll
01:06 hotel oh actually not it's not
01:06 hotel ignore me
01:28 huggable joined #perl6
01:36 pierre_ joined #perl6
01:38 kurahaupo joined #perl6
01:39 dalek doc: 299a655 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod:
01:39 dalek doc: add `is copy` example to lines
01:39 dalek doc: review: https://github.com/perl6/doc/commit/299a655b3f
01:41 kurahaupo joined #perl6
01:47 dalek doc: 0764762 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Mu.pod:
01:47 dalek doc: State that Mu.gist will truncate at 100 elements.
01:47 dalek doc: review: https://github.com/perl6/doc/commit/0764762e57
01:50 zakharyas joined #perl6
02:05 pierre_ joined #perl6
02:08 sortiz ZoffixWin, reading your last blog, I found an important detail: 'is native' without parameter doesn't "look for the Standard C library", In dlopen based systems, it looks in *any* already loaded dynamic library, obviously libc among them. So, as soon as you load any other, subsequent symbols don't need the parameter.
02:08 noganex joined #perl6
02:09 ZoffixWin But how do you "load any other"?
02:10 ZoffixWin You mean in my libcdio example, I could omit that parameters for the second is native() call and it'll work? Interesting....
02:11 mst is there not a collision issue there (albeit one you shouldn't expect to have to deal with normally)
02:11 sortiz That the tricky part: Yep as soon as you call the first sub, the library is loaded, so other subs called later, don't need it, and is faster.
02:11 * ZoffixWin wonders what would happen with two libs having same-named functions
02:12 geekosaur you need to specify to get the right one
02:12 ZoffixWin Ah
02:13 geekosaur iirc the most recently loaded one will win
02:16 eam joined #perl6
02:16 sortiz And there are other tricks available, for example see: https://github.com/perl6/DBIish/blob/master/lib/NativeLibs.pm6#L8
02:18 mst geekosaur: which is why I was wondering is always specifying the name was worth it anyway
02:19 geekosaur it's a problem if a different module has loaded a shared object with a conflicting name but has not yet called one conflicting name
02:19 geekosaur then  ti calls it later, after your module has loaded that name from the other shared object
02:20 geekosaur probably doesn't happen often because you couldnt use both those objects in a C/C++ program
02:21 geekosaur so peopel avoid such collisions just to avoid being incompatible with some other library
02:21 sortiz And lots of libraries use a naming scheme that avoids collisions.
02:22 sortiz Yep, 'cus the same problem happens at standard link time.
02:22 mst right, hence 'wondering if', I'm mostly wondering if there's a real use case that anybody would care about that's sufficient to make it worth doing that
02:22 DrForr joined #perl6
02:22 mst probably the answer is 'if a user of your module finds one, go add the annotations then, because they probably never will'
02:25 sortiz Imo, NC needs to separate the library loading of the symbol resolving step, to allow finer control. And otoh, in Windows there are other problems.
02:33 araujo_ joined #perl6
02:39 skids joined #perl6
02:49 mr-foobar joined #perl6
02:54 mr-foobar joined #perl6
02:57 hotel ah-ha, I've always wondered how nativecalls from lanuages worked without method bodies
02:57 hotel iirc there's a similar syntax in java's jni
03:13 mr-foobar joined #perl6
03:20 diakopter joined #perl6
03:29 ssotka joined #perl6
03:31 mr-foobar joined #perl6
03:42 mr-foobar joined #perl6
04:03 pierre_ joined #perl6
04:14 itcharlie left #perl6
04:27 wamba joined #perl6
04:30 mr-foobar joined #perl6
04:50 hotel is it possible to get input from stdio?
04:51 hotel s/is it possible to/how does one/
04:51 timotimo m: say lines()[0]
04:51 camelia rakudo-moar 1dca2d: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
04:51 timotimo m: say $*IN.read(32).perl
04:51 camelia rakudo-moar 1dca2d: OUTPUT«Buf[uint8].new(67,195,169,97,100,32,115,108,195,161,110,32,97,103,32,115,108,195,169,105,98,104,116,101,32,109,97,111,114,103,97,32)␤»
04:52 hotel timotimo++
04:52 hotel I was expecting something like input() lol
04:53 timotimo m: say get
04:53 camelia rakudo-moar 1dca2d: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
04:53 Cabanossi joined #perl6
04:53 timotimo m: my &input = &get; say input()
04:53 camelia rakudo-moar 1dca2d: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
04:53 timotimo there you go
04:53 timotimo AFK
04:54 hotel ah, thanks
04:54 telex joined #perl6
04:59 ugexe my $input = prompt("Enter input:");
05:05 pierre_ joined #perl6
05:07 diakopter joined #perl6
05:11 hotel yeah, realised I needed prompt after about 20 seconds of actually thinking about what I needed >.<
05:19 TimToady joined #perl6
05:22 pierre_ joined #perl6
05:28 huggable joined #perl6
05:36 mr-foobar joined #perl6
05:55 domidumont joined #perl6
05:59 CIAvash joined #perl6
06:00 sno joined #perl6
06:00 domidumont joined #perl6
06:11 _nadim Good morning
06:17 hotel|sleepy it's the middle of the night *yawns*
06:17 hotel|sleepy but good morning anyway :)
06:26 firstdayonthejob joined #perl6
06:32 pierre_ joined #perl6
06:44 _dolmen_ joined #perl6
06:52 ufobat joined #perl6
06:56 rodarmor joined #perl6
07:02 sammers joined #perl6
07:04 Sgeo_ joined #perl6
07:06 lue joined #perl6
07:10 ufobat morning
07:16 sammers hi all, I am using multi MAIN and I would like to have the output of my script look something like this: ./garage newcar <make> (e.g. 'chevy', 'ford', 'toyota') <model> where some parameter in the signature requires one of the three make types. I just want to be able to display the valid parameters as output if the user runs the script without passing any parameters.
07:17 sammers is it possible to do that with the default multi MAIN signature definition?
07:18 sammers right now I can get the validation on `make` using where (or operator), but I would like to print out valid options at the same time.
07:18 timotimo i know you can verify against a subset, but i don't think it'll output that with the default usage, yeah
07:18 sammers hmm
07:18 sammers yeah
07:19 timotimo m: multi sub MAIN("newcar", $make where /chevy | ford | toyota/) { }
07:19 camelia rakudo-moar a5540e: OUTPUT«Usage:␤  /tmp/FZ0Dk9KeLj newcar <make> ␤»
07:19 timotimo right :(
07:19 sammers hmm
07:19 timotimo m: subset make of Str where /chevy | ford | toyota/; multi sub MAIN("newcar", make $make) { }
07:19 camelia rakudo-moar a5540e: OUTPUT«Usage:␤  /tmp/1qTUmLBZJx newcar <make> ␤»
07:19 timotimo nope
07:19 sammers hmm
07:19 timotimo well, you can still generate your own usage, or take the generated usage and modify it before printing it
07:20 sammers ok, that should work then...
07:20 sammers can you point me to an example?
07:20 CIAvash sub USAGE {}
07:20 sammers ok, thanks
07:21 darutoko joined #perl6
07:21 hotel|sleepy so where is it morning right now?
07:21 CIAvash timotimo: how do you modify the generated usage?
07:22 darutoko- joined #perl6
07:23 timotimo hotel|sleepy: 9am here in germany
07:23 hotel|sleepy ah
07:23 timotimo CIAvash: i was expecting you could probably "callsame" the usage you'd have generated, but maybe that doesn't actually work
07:23 hotel|sleepy well then guten morgen
07:23 timotimo guten morgen to you, too
07:24 hotel|sleepy >2am, but thanks
07:24 timotimo hehe.
07:24 moritz yes, sounds like morning :-)
07:24 timotimo i hope you can get better sleep than me
07:24 hotel|sleepy one day
07:25 sammers thanks, I will just use USAGE in place of the default MAIN output.
07:31 mr-foobar joined #perl6
07:33 rindolf joined #perl6
07:34 darutoko joined #perl6
07:43 raydiak m: sub MAIN (#|{chevy, ford, or toyota} $make, $model) { }
07:43 camelia rakudo-moar a5540e: OUTPUT«Usage:␤  /tmp/caQSB8wFR_ <make> <model> ␤  ␤    <make>    chevy, ford, or toyota␤»
07:43 raydiak sammers: ^ you can document a parameter in the USAGE output like that
07:44 timotimo ooooh, of course!
07:45 raydiak you can document each multi MAIN the same way by putting the #|{} before the whole sub too
07:46 raydiak m: #|{Add a new car to the database} multi MAIN ('newcar', #|{chevy, ford, or toyota} $make, $model) { }
07:46 camelia rakudo-moar a5540e: OUTPUT«Usage:␤  /tmp/QI3rvGWdah newcar <make> <model> -- Add a new car to the database␤  ␤    <make>    chevy, ford, or toyota␤»
07:47 mst oh, that's really neat
07:48 timotimo thank you for pointing that out. it totally slipped my mind that that's totally a thing you can have
07:48 hotel|sleepy documentation capture?
07:48 raydiak happy to help :)
07:49 hotel|sleepy très cool
07:50 CIAvash nice!
07:51 timotimo time for zoffix to write a blog post about commenting on parameters and such
07:53 hotel|sleepy lol yeah
07:53 raydiak m: multi MAIN (#|{A} $a, #|{B} $b) {}; multi MAIN (#|{C} $c, #|{X} $x) {}; multi MAIN (#|{Y} $y, #|{Z} $z) {}
07:53 camelia rakudo-moar a5540e: OUTPUT«Usage:␤  /tmp/RJQcIvy6Bu <a> <b> ␤  /tmp/RJQcIvy6Bu <c> <x> ␤  /tmp/RJQcIvy6Bu <y> <z> ␤  ␤    <a>    A␤    <b>    B␤    <c>    C␤    <x>    X␤    <y>    Y␤    <z>    Z␤»
07:54 timotimo that's not confusing at all to read! what with the nl-symbols and it all being in a single line :P
07:54 timotimo raydiak: have you tried glot.io yet?
07:54 raydiak my old local rakudo has those spat out in some crazy random but repeatable order
07:54 raydiak timotimo: nope, what is it?
07:55 raydiak oh neat
07:56 timotimo very
07:56 timotimo maybe we should teach camelia to take glot.io for code
07:57 raydiak that could be fun
07:58 RabidGravy joined #perl6
08:00 hotel|sleepy oh, looks nice in my window
08:01 raydiak timotimo: looks pretty straightforward https://github.com/prasmussen/glot-snippets/blob/master/api_docs/get_snippet.md
08:01 hotel|sleepy I once knew a bot that had some pastebin integration
08:02 raydiak I wonder if camelia's still works...it breaks every time github changes their urls...
08:03 mst hotel|sleepy: does http://fpaste.scsys.co.uk/perl6 count? :)
08:03 hotel|sleepy lol idk
08:03 hotel|sleepy it was a while ago, I forget what it even did with pastebin
08:04 shadowpaste "hotel|sleepy" at 217.168.150.38 pasted "test paste please ignore" (1 line) at http://fpaste.scsys.co.uk/513661
08:04 hotel|sleepy I see
08:08 timotimo that's the one, yeah
08:08 DrForr Hrm, 'hotel|sleepy' - I sense a nick collision in my near future :)
08:08 timotimo what a surprise mst knows about that one!
08:08 hotel|sleepy nick collision?
08:09 DrForr I'll be at a hotel myself in the near future.
08:09 hotel|sleepy ah
08:09 timotimo well, you may be at a hotel, but hotel|sleepy *is* a hotel
08:09 hotel|sleepy timotimo++
08:10 timotimo who knows, maybe you'll end up a guest in hotel|sleepy
08:10 hotel|sleepy that made me shiver a little
08:10 RabidGravy morning
08:10 hotel|sleepy o/
08:10 timotimo didn't mean to creep you out :S
08:10 hotel|sleepy lol
08:11 mst hotel|sleepy is secretly a hypervisor?
08:12 hotel|sleepy nah, I just run windows
08:14 hotel_california joined #perl6
08:14 jast it's getting a little crowded
08:15 hotel_california good job internet
08:15 timotimo well, at least you have ipv6
08:15 jast never liked that internet guy
08:15 hotel_california ipv6 support: the one thing att does kinda right
08:15 hotel of course, all the local addresses are ipv4 :I
08:17 motel joined #perl6
08:31 pmurias joined #perl6
08:32 RabidGravy Oooh *two* new kernels, that has got to be a first
08:35 RabidGravy and in the years I have been using fedora + planetccrma it is the first time the planetccrma RT kernel is the same version as the stock one
08:35 timotimo oh, you have a realtime kernel? for your audio needs?
08:37 RabidGravy yeah, can get the latency with a FW audio interface down into <100ms with it
08:38 timotimo their website speaks of fedora 22, what about fedora 23?
08:39 RabidGravy they just don't update the website very often
08:39 timotimo huh, ok
08:39 RabidGravy just replace the 22 in any url with 23 then it should work
08:40 CIAvash joined #perl6
08:40 espadrine joined #perl6
08:41 timotimo wow, rezound is *rotten*
08:41 timotimo or rotted?
08:41 timotimo they celebrated their move from cvs to svn in january of 2008 %)
08:42 RabidGravy lots of still used audio software out there that either could use some love or is completely abandoned
08:43 pierre_ joined #perl6
08:46 timotimo wow. rezound surely does look like it's from 2008 at most
08:47 timotimo huh, sweep also stopped getting news entries in 2008
08:47 timotimo i wonder what terrible thing happened that eyar
08:48 timotimo A roadmap for Planet CCRMA
08:48 timotimo Last updated on Aug 14 2003.
08:48 timotimo ... %)
08:49 timotimo okay, enough sound tack in #perl6 from me ... for now :P
08:54 vytas joined #perl6
08:54 araujo joined #perl6
08:56 araujo joined #perl6
08:56 araujo joined #perl6
08:59 jluis joined #perl6
09:01 araujo joined #perl6
09:08 abraxxa joined #perl6
09:09 grassass joined #perl6
09:13 mls joined #perl6
09:19 mls joined #perl6
09:20 masak good antenoon, #perl6
09:20 masak Perl 6 day today! \o/
09:20 xinming joined #perl6
09:21 timotimo hey masak
09:21 timotimo that sounds nice :)
09:21 masak it kinda does, doesn't it? :)
09:24 pierre_ joined #perl6
09:25 RabidGravy well, it's "rebuild perl 6 on at least one machine" day
09:28 huggable joined #perl6
09:28 timotimo .tell skarsnik at some point gptrixie could totally extract doxygen stuff like \param and the general description and then put the corresponding pod comments into the generated code :3
09:28 yoleaux timotimo: I'll pass your message to skarsnik.
09:34 kurahaupo joined #perl6
09:40 iH2O joined #perl6
09:48 pierre_ joined #perl6
09:50 ZoffixWin timotimo, "commenting on parameters"? what's that?
09:52 dalek joined #perl6
09:58 iH2O left #perl6
09:59 ZoffixWin That's RE <timotimo> time for zoffix to write a blog post about commenting on parameters and such
09:59 ufobat_ joined #perl6
10:00 mst ZoffixWin: the #|{} thing
10:00 * ZoffixWin isn't a fan of the #|{} thing
10:00 ZoffixWin 'cause it eats CPU cycles
10:01 xinming joined #perl6
10:03 ZoffixWin DOOM! DOOM released!
10:03 nowan joined #perl6
10:06 pmurias ZoffixWin: while parsing?
10:09 ZoffixWin I don't know. I didn't measure anything. I'm just not a fan of the idea that writing documentation affects my program in any way.
10:09 Sqirrel joined #perl6
10:09 psch ZoffixWin: well, it's runtime introspectable documentation
10:10 psch is there prior art for our .WHY?  it never occured to me to ask
10:11 ZoffixWin psch, what was the reason for making it so?
10:11 ZoffixWin Well, other than "because we can"
10:12 pierre_ joined #perl6
10:13 kid51 joined #perl6
10:14 psch ZoffixWin: i have no idea.  it was speculated way before i got involved
10:14 psch ZoffixWin: it's really easy not to use, in any case :)
10:14 ZoffixWin Sure :)
10:15 psch conceptually i really like, but yeah, the performance impact is a bit of a turn-off
10:16 psch i mean, it'd be pretty great to have WHYs for all the buildins, so that a REPL session can teach you almost everything
10:16 pierre_ joined #perl6
10:16 psch but that would currently probably put compilation near half an hour or more again, and no one wants that for some reason... :)
10:16 psch *built-ins
10:17 mst ...
10:18 mst you could use the old dump/restore trick
10:18 mst ala 'perldoc -f dump'
10:18 ZoffixWin Wouldn't it pre-compile and not affect after the initial compilation?
10:18 ZoffixWin Maybe timotimo is right... I *should* write a blog post :P
10:19 mst I've found pod2usage type things kinda useful
10:19 * mst sets a cacodemon on ZoffixWin
10:20 ZoffixWin *the demon glitches because ZoffixWin apparently doesn't have the latest nVidia drivers*
10:21 psch yeah, i think someone had a plan to pull in all the WHYs from module-space
10:21 * mst turns rendering off and sends four very low-res cacodemons after ZoffixWin instead
10:21 ZoffixWin :)
10:22 psch that's a yellow two :o
10:22 psch http://crawl.chaosforge.org/index.php?title=Cacodemon :P
10:23 mst psch: http://crawl.chaosforge.org/index.php?title=Cacodemon
10:23 mst gah
10:23 mst psch: http://media.moddb.com/images/mods/1/24/23926/111jani111-2.png
10:23 mst THAT is a cacodemon
10:24 mst ZoffixWin: also how the fsck did you manage to get 3rd drivers enabled on original zoom? WHAT DID YOU DO DO THAT POOR INNOCENT DOSBOX
10:24 ZoffixWin mst, you're just living under a rock :) https://en.wikipedia.org/wiki/Doom_(2016_video_game)
10:25 mst that's Doom 4
10:25 mst IRRELEVANT
10:25 mst I DON'T CARE IF THEY RENAMED IT
10:25 mst THEY ALSO CLAIMED THERE WAS MORE THAN ONE HIGHLANDER MOVIE
10:25 tadzik oh, Doom discussion
10:25 tadzik sign me up
10:25 ZoffixWin tadzik, new doom released today!
10:26 ZoffixWin It has fancy pants engine. If the cost of your computer is more than $3000 you get to see pretty things!
10:26 ZoffixWin :)
10:26 tadzik ZoffixWin: well, I'm still sad that the XCOM 2 DLC is not a day1 on linux :(
10:27 tadzik the new doom apparently runs on Vulkan, so it should run pretty well on wine :)
10:27 ZoffixWin really? wow :o
10:27 tadzik ye
10:27 ufobat_ joined #perl6
10:27 tadzik https://www.youtube.com/watch?v=anrvBD4aTGY
10:28 tadzik (this video also makes it not look like a shitty doom that the multiplayer beta showed it to be)
10:28 RabidGravy I got Doom out of my system in the early nineties
10:28 ZoffixWin I've seen that, but I've no idea what "Vulkan API" is, much less that 3D Windows games actually work on Linux
10:28 DrForr That is a bigger FG than I recall...
10:29 psch it's something with warp drives i wanna say..?
10:29 psch :P
10:30 tadzik ZoffixWin: Vulkan is basically the OpenGL working group's response to DX12, a very much low-level api, verbose, explicit and performance focused
10:30 ZoffixWin neat
10:36 ilmari doom 3 is the only game I've expressly bought a new GPU to play
10:36 ilmari and I waited until the Linux version was out
10:36 tadzik I still haven't played that one, actually
10:37 pierre_ joined #perl6
10:39 ZoffixWin joined #perl6
10:40 cpage__ joined #perl6
10:52 _4d47 joined #perl6
10:55 dvinciguerra joined #perl6
11:06 araujo joined #perl6
11:07 araujo joined #perl6
11:07 araujo joined #perl6
11:10 ChoHag joined #perl6
11:19 kaare_ joined #perl6
11:22 pierre_ joined #perl6
11:28 cpage_ joined #perl6
11:38 masak I call BS on all claims that #|{} significantly affects performance that are not accompanied by numbers showing this.
11:47 nine #|{}?
11:48 tadzik multiline Pod, I guess
11:48 masak or just Pod attaching to stuff like parameters -- see backlog
11:51 pmurias joined #perl6
11:56 araujo_ joined #perl6
11:56 sjoshi joined #perl6
12:01 psch m: #|{ some docs here␤at least i hope }␤ my $x; say $x.WHY
12:01 camelia rakudo-moar 110087: OUTPUT«(Any)␤»
12:01 psch well, that way i probably doesn't impact performance... vOv
12:01 masak m: #|{Add a new car to the database} multi MAIN ('newcar', #|{chevy, ford, or toyota} $make, $model) { }
12:01 camelia rakudo-moar 110087: OUTPUT«Usage:␤  /tmp/_ZvZUTjfSw newcar <make> <model> -- Add a new car to the database␤  ␤    <make>    chevy, ford, or toyota␤»
12:02 nine Just too cool not to post: https://www.youtube.com/watch?v=QQ9gs-5lRKc
12:02 psch m: { #|{Add a new car to the database} multi MAIN ('newcar', #|{chevy, ford, or toyota} $make, $model) { } } xx 10000; say now - BEGIN now
12:02 camelia rakudo-moar 110087: OUTPUT«0.03902052␤»
12:03 psch m: { multi MAIN ('newcar', $make, $model) { } } xx 10000; say now - BEGIN now
12:03 camelia rakudo-moar 110087: OUTPUT«0.04039844␤»
12:03 psch clearly adding docs make code faster
12:03 psch +s
12:04 masak not sure a MAIN in a block like that will be visible when the program is run
12:05 masak indeed not
12:05 psch it shoudn't - i just wanted to xx it for a bad benchmark :)
12:05 masak even disregarding that, your benchmark is crazy
12:05 masak it doesn't call MAIN. an optimizer could eliminate the whole block as having no side effects.
12:05 psch a different "crazy" than "meaningless"?
12:06 psch oh, yeah i suppose
12:12 inokenty joined #perl6
12:14 Actualeyes joined #perl6
12:20 mephinet joined #perl6
12:22 Hotkeys joined #perl6
12:22 robinsmidsrod joined #perl6
12:36 |2701 joined #perl6
12:43 llfourn nine: magnets and marbles is awesome. Made my day. Thanks.
12:44 tadzik :) it is quite cool
12:45 cognominal joined #perl6
12:50 tomboy65 joined #perl6
12:56 AlexDaniel joined #perl6
12:57 AlexDaniel m: say prompt(∞) x 2
12:57 camelia rakudo-moar 110087: OUTPUT«InfCéad slán ag sléibhte maorga Chontae Dhún na nGallCéad slán ag sléibhte maorga Chontae Dhún na nGall␤»
12:57 AlexDaniel works nicely on camelia
13:06 teatime g'morning p6ers
13:12 pierre_ joined #perl6
13:12 masak good afternoon teatime
13:13 teatime eh, whichever.
13:13 teatime it's 5 o'clock somewhere.
13:13 teatime alternately:  "Good $GREETING_TIME, $USER_NAME!"
13:13 lizmat .oO( good *, * )
13:13 [Coke] S99:UGT if such things bug you
13:13 synopsebot6 Link: http://design.perl6.org/S99.html#UGT_if_such_things_bug_you
13:13 [Coke] S99:UGT
13:13 synopsebot6 Link: http://design.perl6.org/S99.html#UGT
13:16 teatime I am llol, [Coke]… you guys have thought of *everything*.
13:16 masak Perl 6 is not a young community anymore
13:16 masak more than half as old as the Perl community, for example :)
13:17 teatime heh, I suppose that's true enough.
13:22 mr-foobar joined #perl6
13:28 huggable joined #perl6
13:29 mr-foobar joined #perl6
13:32 pmurias joined #perl6
13:35 kurahaupo joined #perl6
13:36 pierre_ joined #perl6
13:40 prammer joined #perl6
13:42 kurahaupo joined #perl6
13:46 cognominal joined #perl6
13:57 Coleoid_n joined #perl6
13:58 itaipu joined #perl6
13:58 tbrowder joined #perl6
14:01 cdg joined #perl6
14:09 mr-foobar joined #perl6
14:10 brrt joined #perl6
14:19 sufrostico joined #perl6
14:25 timotimo well, zoffix doesn't have to advertise the #|{ ... } variant if they don't like and just demonstrate the #| foo bar \n variant instead
14:25 desolator joined #perl6
14:25 desolator hiho
14:30 moritz hello desolator
14:31 desolator what's up my friend?
14:32 * moritz never knows what to answer to that question
14:34 desolator :)
14:35 nine Everything that's not down obviously
14:36 desolator I invent a Perl motto: "Learn Perl change the world", how is it?
14:38 khw joined #perl6
14:39 DrForr Pretty generic, if you want an honest opinion :)
14:39 stmuk_ s/the/your
14:40 profan s/your/our/
14:40 sjn desolator: "Yes, what IS up your friend?" :)
14:40 * sjn can imagine that question being rhetorical
14:41 sjn oh, and hi, #perl6 :)
14:46 desolator I need to speak with IT Guru :P
14:47 tadzik oh noes, where on earth do we find one :o
14:48 teatime Perl6: Your future is mutable.
14:48 teatime (mine, is lazy.)
14:48 timotimo i'd lean more towards something containing "composable"
14:49 teatime timotimo: luckily, my slogan is mutable.
14:49 desolator I think moritz is guru :P
14:51 ugexe what you need is a full stack 10x rockstar
14:52 teatime heh, that filename is nearly half the typical max file name length.
14:52 teatime the whole path is still pretty safely under the limit, though.  so unless someone decides to make it even worse, I don't see how I can object to those filenames on those grounds :/
14:53 moritz DOS 8.3!
14:56 leedo joined #perl6
14:56 hankache joined #perl6
14:57 araujo joined #perl6
14:58 _4d47 left #perl6
14:58 araujo joined #perl6
14:58 araujo joined #perl6
14:58 hankache afternoon #perl6
15:07 nicqbot joined #perl6
15:10 AlexDaniel huggable: what time is it? :is: It's morning
15:10 huggable AlexDaniel, Added what time is it? as It's morning
15:12 llua joined #perl6
15:13 * moritz would prefer "It's *always* morning in UTC!"
15:14 llua left #perl6
15:15 hankache huggable: what time is it?
15:15 huggable hankache, It's morning
15:15 hankache neat!
15:15 geekosaur ugt?
15:16 psch huggable: hi, what time is it? :is: UGT
15:16 huggable psch, Added hi, what time is it? as UGT
15:16 psch needs a greeting, others no ;)
15:17 hankache huggable: what time is it?
15:17 huggable hankache, It's morning
15:17 hankache huggable: hi, what time is it?
15:17 huggable hankache, UGT
15:18 nicqbot I'm assuming huggable is written in Perl6?
15:19 AlexDaniel yes
15:19 psch huggable: huggable
15:19 huggable psch, nothing found
15:20 AlexDaniel huggable: huggable :is: https://github.com/zoffixznet/huggable
15:20 huggable AlexDaniel, Added huggable as https://github.com/zoffixznet/huggable
15:29 AlexDaniel huggable: source
15:29 huggable AlexDaniel, See https://github.com/zoffixznet/huggable
15:29 AlexDaniel ah there it is
15:29 cosimo joined #perl6
15:29 cosimo joined #perl6
15:31 ssotka joined #perl6
15:37 brrt .tell lizmat we'll need os x debug permissions to be enabled
15:37 yoleaux brrt: I'll pass your message to lizmat.
15:38 [Coke] Anyone know if Wenzel P. P. Peppmeyer is on IRC?
15:38 AlexDaniel [Coke]: gfldex
15:38 [Coke] AlexDaniel: Danke.
15:38 [Coke] .seen gfldex
15:38 yoleaux I saw gfldex 12 May 2016 15:40Z in #perl6: <gfldex> sortiz: because of a lack of rakudobug it seams
15:39 AlexDaniel huggable: I am your father :is: NOOOOOOoooooo! Zoffix is my father.
15:39 huggable AlexDaniel, Added I am your father as NOOOOOOoooooo! Zoffix is my father.
15:43 gregf_ huggable: sup
15:43 huggable gregf_, nothing found
15:49 Coleoid_n Hi, #perl6!
15:50 Coleoid_n I'm wanting to pitch in on p6doc, but I'm having trouble getting it to run at all.  I put in a pull request to get it to compile, yet after that fix it still errors out at runtime.
15:51 Coleoid_n I could make the content fixes without running them locally, but I'd rather not.
15:51 timotimo haha, how did that ever work :D
15:51 Coleoid_n Is docs\bin\p6doc the script I should be working with?
15:52 timotimo the doc repo is also frequently htmlify.p6'd and put online
15:53 Coleoid_n Yeah, I hit another problem there.  I could 'make html' no problem, but when I tried to run the local web server it went into a redirect loop.
15:53 Coleoid_n Though I could simply load the pages into a browser after I generate them...
15:54 timotimo it'd be pretty swell if we could automatically build pull-requests or branches and serve them on a virtual host subdomain thingie
15:54 timotimo but who's gonna configure that ... *shrug*
15:55 MadcapJake so why is it again that Perl 6 can't happen on Android?
15:56 psch MadcapJake: invokedynamic
15:56 psch MadcapJake: well, that's if you're talking rakudo-jvm
15:56 MadcapJake But this https://www.youtube.com/watch?v=STDBY5kT4_M seems to say otherwise
15:56 psch MadcapJake: rakudo-moar can compile to android on a *nix chroot
15:57 psch ...to qualifies that further, running rakudo-jvm on dalvik is not supported, because the vm opcode invokedynamic is not supported by dalvik
15:57 MadcapJake did you check out that video linked? It specifically is about invokedynamic-based languages on Android
15:58 psch "We will then explain, how Dalvik was modified [...]" from the descriptioin
15:58 psch -i
15:58 MadcapJake ahh, it has to be a custom Dalvik :(
15:58 MadcapJake what a lame talk then ;) really got my hopes up.
15:58 timotimo didn't java-on-android recently get java8 features?
15:59 MadcapJake "watch how we make this work on that!" *whispers* using our custom version of that designed to work with this ...
16:00 teatime heh… my music player's shuffle queued up "It Never Rains in Southern California" and "Only Happy When it Rains" back-to-back.
16:00 timotimo it knows.
16:01 MadcapJake Since I first got interested in programming, I've wanted to make an AI-backed music player (something like Pandora but less about homogeneity)
16:02 geekosaur dalvik being replaced by ART, which may already have a way to do that
16:02 MadcapJake Try and make "fun" playlists, mix in other kinds of musics, do things like teatime mentioned where song themes meld together, basically a "cool playlist generator"
16:03 psch ART also doesn't do invokedynamic
16:03 psch i think it does java8 macros, but with runtime bytecode generation
16:03 nicqbot Huh, sounds like a pretty cool idea!
16:03 teatime MadcapJake: I bet you could get some pretty interesting / appealing playlists w/ a simple markov chain algo, and observing the choices of some people who can choose to whatever songs they want in whatever order.
16:04 teatime I'm sure spotify and whoever else makes money on that sort of thing does a ton more.  but, their suggestions kindof suck.  for me anyway.
16:04 Relsak joined #perl6
16:05 araujo_ joined #perl6
16:05 nicqbot It's why I no longer use Pandora; start a station for one band, and never hear from them again.
16:05 MadcapJake teatime: I agree, I think suggestions are largely based on "what sounds similar" and "what other stuff does this user like" but I think that's the wrong way to look at playlists.  A playlist should be about interesting variety!
16:06 skids joined #perl6
16:07 teatime Pandora def. has a strong "what sounds similar" aspect due to having the whole different approach of the music genome project as a data source.  but I figure that is probably a small part of their total data / analysis by now.
16:07 MadcapJake So my music player would have an ebb & flow between genres, sometimes jumping genres and other times smoothly transitioning between them.  All the while looking for interesting follow ups.  I would allow users to favorite songs but also favorite chains so the program could get smarter about what sounds good after what
16:08 teatime hrm.. I don't really know anything about AI or signal processing or anything vaguely relevant, but it seems like programatically determining if song A "sounds like" song B should be a solved, or at least straightforwardly approachable problem by now.
16:08 teatime I mean, I can tell my phone "Text my mom's work number and tell her that I'm running 10 minutes late, thanks.", and it seems like NLP should be harder :)
16:09 MadcapJake Well right, back in the day, Pandora (when it wasn't a product and was more of an experiment) would tell you all the things that it found about the song/artist you gave them) it was really neat to see what they were looking at
16:10 teatime MadcapJake: agreed.
16:11 MadcapJake As an aside, I think they don't have as strong a database of music as they used to have.
16:12 teatime MadcapJake: right, but I figure they've supplemented what they lack in manual analysis of newer tracks, with various automated stuff.
16:13 teatime that's why I said I figure the MGP-type data probably isn't important to pandora like when it started.
16:13 RabidGravy yeah I used to like pandora when you could still get it in Europe
16:13 maybekoo2 joined #perl6
16:15 ptolemarch joined #perl6
16:15 MadcapJake teatime: yeah I suppose, but I just think the playlists they generate are too similar-sounding when in a saturated genre (popular styles) and too dissimilar in more esoteric playlists (largely the fault of a terrible music industry/economy)
16:15 MadcapJake Point being, I like eclectic mixes and Pandora just does not deliver on this front :)
16:16 nicqbot same
16:16 teatime spotify is... I dunno, different.  and you can listen to whatever songs you want.  but yeah, overall I'm pretty meh on it too.  I should def. dig out my terabytes of FLAC etc. albums.
16:18 teatime my rather large box of HDDs marked 'TO-DO' makes me want to avert my gaze, if I happen to glance toward it.
16:19 teatime there's def. a couple or three raid5/6 arrays mixed in there among the individually-useful ones.. unmarked / unlabeled and all mixed together, naturally.
16:21 MadcapJake teatime: I have an old 128G HDD that failed on me so, my young naive self, decided to put it in a plastic bag and freeze it :P I then found out that this is largely a recipe for a completely b0rked HDD but I still am holding on to it in case I ever get money to spend on someone to try and save it xD
16:22 MadcapJake (and it's full to the brim with music from my {middle,high}-school years
16:22 RabidGravy all of the reasons above are why I typically listen to DJ mixes these days
16:23 teatime heh, have never done it myself, but from what I understood that was a good technique.
16:23 teatime as in, has a decent probability of making your unreadable drive at least partially readable.
16:23 MadcapJake I found out that you'd have to open it in a completely moistureless room or the minute you open it moisture will instantly cling to all surfaces (something like that, at least)
16:24 geekosaur ^
16:24 teatime if you care about the data a medium-lot, there are some other long-shots you could attempt.  (if you care about it a whole-lot, you'd probably pay someone qualified enough to charge for it to recover the data for you.)
16:24 geekosaur it was a last resort mechanism to try to get data off a dying drive; if it worked then great, if not then it was dying anywya
16:24 teatime yeah.
16:25 teatime "Grandpa, did computers *really* have moving parts when you were a kid?"
16:25 MadcapJake teatime: right, I'm waiting for some money to charge someone to save it.  It's not really valuable in any way but it's a huge chunk of what I did as a kid (listen to music)
16:25 RabidGravy I actually smashed up a bunch of old HDDs with a club hammer last year
16:26 teatime MadcapJake: I suppose finding a new-condition identical drive is basically impossible, heh.
16:26 teatime RabidGravy: I enjoy busting up HDDs, they have lots of fun parts inside.
16:26 teatime shiny mirror frisbees, strong magnets, neato keychain rings.
16:26 RabidGravy concluded that I wasn't motivated to attempt recovery, but wasn't sure what was on them
16:27 MadcapJake yep! Now my current 1TB is still chugging along and has even survived a couple of tumbles (the case is all bashed up) so I really should back it up someday soonish
16:27 acrussell joined #perl6
16:28 teatime heh, if I sat down to process my HDD box (it should be labelled something like, "Combine these onto a NAS, someday."), and I found out every single one was unreadable.. that would be a pretty positive outcome.  It'd mean I could chuck the whole lot out on the spot, and never think about them again, *and* I wouldn't have to do any of the work of figuring out what's on them, copying it off, and then looking
16:28 teatime through it / collating it
16:28 RabidGravy I have a small stack of 2.5" externals I rotate for backups and a 1TB for scratch storage
16:29 teatime maybe I should give it a few good kicks and then take a stab at xferring them all
16:29 teatime I have a 16TB raid6 I put together 2+ years ago and have never gotten around to placing a single file on, heh
16:30 MadcapJake teatime: wow! What does raid6 do?
16:30 kaare_ joined #perl6
16:30 domidumont joined #perl6
16:31 teatime it's like raid5, except there's two drive's-worth of parity data, so you lose 2 rather than 1 drive's-worth of usable space, and then you gain the ability to have any two drives (rather than any one) fail and still be able to read all of the data.
16:31 teatime raid5 is pretty much obsolete now, at least for spinning disks.  I actually dunno much about raid on SSDs.
16:31 teatime probably kinda similar to HDDs, though.. their specs seemed to be converging when I was last interested.
16:32 dalek doc: 85581a9 | (Jason Cole)++ | bin/p6doc:
16:32 dalek doc: @opts compilation error fix third time charm
16:32 dalek doc: review: https://github.com/perl6/doc/commit/85581a9bb7
16:32 dalek doc: edf96f5 | RabidGravy++ | bin/p6doc:
16:32 dalek doc: Merge pull request #513 from Coleoid/master
16:32 dalek doc:
16:32 dalek doc: @opts compilation error fix
16:32 MadcapJake I would imagine raid would greatly reduce the life expectancy of SSDs, right?
16:32 dalek doc: review: https://github.com/perl6/doc/commit/edf96f53dd
16:32 teatime why?
16:33 acrussell joined #perl6
16:34 MadcapJake SSD wear
16:35 teatime yeah but what about the way raids use the disks would be worse than typical usage patterns?  there's a bunch of different kinds of arrays w/ different properties and purposes, but I'm having trouble thinking of a setup that would be SSD-harmful.  I'm sure there is one or two..
16:35 teatime MadcapJake: also, SSDs aren't really fragile flowers anymore, either.. they've really caught up to HDDs for specs like MTBF and write cycles and stuff, I think.
16:36 MadcapJake I dunno enough about raid to say, but I guess it seems using a set of SSDs in parallel would mean that all of them wear at the same rate, at the very least.
16:37 teatime you'd def. want to get discard/trim working through all of the layers (filesystem, LVM-like abstraction layer, if any, and RAID layer), or at least work around not having it by maybe wasting some space and choosing your SSDs carefully
16:37 MadcapJake You could reduce that by just backing up at intervals instead of writing to all at the same time
16:37 teatime MadcapJake: ah, the same is true of HDDs too, though.. it's a really good idea to try to source disks from different batches/lots etc. if at all possible, because they do tend to fail in groups.
16:38 teatime which works against your risk/probability calculations when you're thinking about what kind of redundancy you ned.
16:38 MadcapJake Ahh that's nifty!
16:38 teatime but, raid isn't backup anyway; it's real role is to allow quicker recovery from failure events (compared to restoring from backups stored on slow, bulk media)
16:38 domidumont1 joined #perl6
16:40 MadcapJake right, so I suppose it's a tradeoff between spending time restoring/backing up and dealing with wear (which probably would often lean towards dealing with wear especially as they get better/cheaper)
16:40 teatime heh, I think this is the longest I've ever managed to keep #p6 off-topic w/o some interesting p6 thing coming along to ruin it.  :)
16:40 araujo joined #perl6
16:40 MadcapJake this is true, from pandora/music to raid/storage we've been off-topic for quite some time!
16:40 Sqirrel joined #perl6
16:41 teatime ok, for flash, its only writes that are destructive, right?  read operations are safe/free, I think.
16:41 geekosaur yes
16:42 geekosaur and unlike some other forms of memory, a read does not necessitate a rewrite
16:42 teatime so let's take one of the simplest cases, a two-drive RAID1, which is just a simple mirror.  when you write data, it's written to both drives.  any one drive can fail w/o losing data.  reading can be sped up a bit, because you have two drives you can read from in parallel w/ the same data.  but there's no more writing ever happening than there would be in the case of a single drive.
16:43 teatime MadcapJake: ^
16:44 TimToady those of us who still feebly backlog appreciate it when OT stuff comes in large monolithic chunks that we can tl;dr conveniently
16:45 RabidGravy :)
16:46 teatime heh.  /me blushes.
16:46 teatime and this, strangely, is actually on-topic:  is there a #p6 (or #perl) -offtopic channel?
16:46 MadcapJake TimToady: you're welcome! ;)
16:47 teatime MadcapJake: I was gonna continue on and give a similar analysis for other array types... but my heart's not in it.
16:47 MadcapJake teatime: haha well most of that stuff is over my head anyways :)
16:48 TimToady teatime: in theory, we'd like to think that nothing is unrelated to Perl 6 in the long run :)
16:48 MadcapJake lol
16:49 MadcapJake use Storage::Raid; Raid.new(6).write('Wow!') # :D
16:49 mst TimToady: it's a key component of my plan to build a self replication hegemonising swarm
16:49 TimToady the Plurality is near!
16:50 AlexDaniel teatime: you can use Slack for offtopic stuff (because basically nobody is there…)
16:51 MadcapJake AlexDaniel: :) I may as well just take the whole thing down. Failed to gain adoption and I think IRCCloud solves everything I wanted that Slack had (personally)
16:51 AlexDaniel teatime: another point to note is that actual development now happens on #p6dev
16:53 MadcapJake I had slack fever for a bit but it has mostly subsided :P. Diet and exercise is key.
16:54 teatime MadcapJake: the wikipedia articles are a solid intro and have nice infographics.
16:55 teatime MadcapJake: e.g.,  https://en.wikipedia.org/wiki/Standard_RAID_levels  and  https://en.wikipedia.org/wiki/Nested_RAID_levels
16:55 MadcapJake Perhaps someday I'll dive in to learn more but I need some extra {HD,SD}Ds to whet my appetite. Right now it just makes me pine for them/job/money :P
16:57 MadcapJake The kinds of articles I'm reading now are "How can you turn your old barely working hardware into semi-acceptable modern computers!"
16:59 firstdayonthejob joined #perl6
17:00 MadcapJake Or "How to successfully rummage through your local college's surplus sales!"
17:01 molaf joined #perl6
17:06 geekosaur or the free table in the cs department >.>
17:11 diakopter MadcapJake: you can buy a 200GB microSD card for $80
17:18 RabidGravy not quite reached the "break point" though, when they are the same price as 16Gb are now I'll be using them for everything
17:19 diakopter If only there was a microSD array thingy with lots of slots
17:19 RabidGravy mind I have at least one device that can't hack sdhd cards at all
17:20 RabidGravy and another that can't deal with larger than 8gb CF cards reliably
17:21 geekosaur diakopter, search "microsd raid"
17:21 RabidGravy I have even another device (a ymaha qy-100 sequencer) that uses those old mmc cards
17:21 geekosaur I'm seeing 4- and 10-sd units
17:24 diakopter hm, I actually don't want raid; I just want tons of readers
17:28 huggable joined #perl6
17:34 domidumont joined #perl6
17:35 mohae joined #perl6
17:37 brrt joined #perl6
17:40 lue joined #perl6
17:41 dvinciguerra joined #perl6
17:42 ZoffixWin joined #perl6
17:42 ZoffixWin joined #perl6
17:42 |2701 joined #perl6
17:43 dvinciguerra joined #perl6
17:44 hotel joined #perl6
17:48 itaipu joined #perl6
17:55 sno joined #perl6
18:05 caasih left #perl6
18:05 firstdayonthejob joined #perl6
18:07 kaare_ joined #perl6
18:11 TimToady joined #perl6
18:14 dvinciguerra joined #perl6
18:16 DrForr Evenin'. Can someone point me to a module that links to a C++ library?
18:18 hoelzro DrForr: not published, but here's my xapian binding: https://github.com/hoelzro/p6-xapian
18:18 hoelzro also potentially helpful: http://hoelz.ro/blog/binding-to-cpp-with-nativecall
18:19 DrForr That'll do - I've got 5 legs ahead of me tomorrow and I want something to play with :)
18:20 * jnthn really hopes that's not "a 5 leg flight"...
18:21 hoelzro DrForr: just playing around, or do you have a C++ library you're meaning to bind?
18:21 DrForr Playing for the moment, when I finally land I might have something to show :)
18:22 hoelzro nice!
18:23 RabidGravy or https://github.com/Perl6-Noise-Gang/Audio-Soundtouch
18:23 hoelzro if I have new candidates for a multi within a module, should they be available to calls to that multi outside of that module?
18:24 hoelzro oops, false alarm
18:24 DrForr 4 legs, 3 flights but it'll be ~24 hours.
18:24 RabidGravy DrForr, if you can actually just finish that it would be sweet
18:24 hoelzro please disregard that
18:25 timotimo hoelzro: well, in general, the availability of multis is lexically scoped
18:27 hoelzro timotimo: that's what I thought
18:27 hoelzro so if a module provides candidates for a multi, I would need to import them (or it would need to export them) for them to be considered, right?
18:28 timotimo that's right
18:29 hoelzro ok, thanks for the sanity check =)
18:30 hoelzro now if I have two new candidates in a module, should specifying 'is export' on one implicitly export the other?
18:30 timotimo .o( "is expert" )
18:30 timotimo i think you can't export individual candidates only, but i don't know for real
18:31 hoelzro ok
18:31 hoelzro I'
18:31 hoelzro grr
18:31 hoelzro I'm seeing that behavior, but I think I'm just misunderstanding how multi candidates and exports work
18:33 leedo I should be able to do `is export` on a sub inside a class, right? recently this stopped working in a project of mine
18:33 leedo i need to make a smaller test case i guess
18:33 timotimo yeah, i guess so, but don't you still have to import the class' package then?
18:34 Ulti so the JIT was turned off on OSX? my tests run faster than before o___O
18:34 RabidGravy wahay!
18:35 timotimo it was just turned off for a short while
18:35 Ulti oh right
18:35 Ulti lets see what commit I'm on... either way this is the fastest they've been and its a significant improvement
18:36 slobo joined #perl6
18:36 timotimo that's surprising. and good.
18:36 Ulti 1.95s usually up above 2.4s
18:54 buharin joined #perl6
18:55 _4d47 joined #perl6
18:56 hotel timotimo, did you ever go to sleep? 0.0
18:57 nicqbot man brew
18:57 nicqbot oops, wrong window!
18:59 _4d47 hello everybody, is it possible to create a class that answers the same for any method name invoked on it ?
18:59 leedo so loading a perl 5 module with Inline::Perl5 causes my subs to stop exporting from a class
19:01 nine _4d47: yes, add a FALLBACK method
19:01 geekosaur _4d47, http://design.perl6.org/S12.html#FALLBACK_methods
19:02 * geekosaur slow
19:02 nine slower but more usefull
19:03 nine leedo: any Perl 5 module?
19:03 _4d47 nine: i would like it to answers same for all methods, even those defined in parents
19:03 nine _4d47: what exactly is your use case?
19:04 nine _4d47: and yes, you can do it with some meta model trickery
19:06 _4d47 nine: my use case is fixing https://github.com/4d47/perl6-tag-helper and having fun learning perl6 :)
19:08 leedo nine: https://gist.github.com/leedo/cc2f52430291aee95c6f8102472e840c yeah, so far any module will do it
19:09 leedo i also have to manually delete the .precomp directory
19:09 leedo for it to pick up the changes
19:11 nine leedo: is the precomp issue on the very latest rakudo?
19:11 leedo yeah, i built it about 20 minutes ago
19:12 nine _4d47: incidentally I do something quite similar: https://github.com/niner/Inline-Perl5/blob/master/lib/Inline/Perl5.pm6#L753
19:12 leedo I only have to nuke .precomp when i add Inline::Perl5 usage to a file though
19:12 leedo not when I remove it
19:13 nine leedo: ooh... Inline::Perl5 exports a "no precompilation" into your module. We therefore abort precompilation of your module and never get to overwrite the outdated precomp file.
19:14 leedo ah, that'd explain that
19:14 leedo I think the exported sub not working is another unrelated issue
19:16 nine I hope so :)
19:18 _4d47 nine: oh your dynamically overriding methods from the base class, cool
19:19 nine Perl 6++
19:20 brrt joined #perl6
19:20 spider-mario joined #perl6
19:22 leedo nine: is there a way to disable precomp with an env variable?
19:23 lizmat ping
19:23 yoleaux 15:37Z <brrt> lizmat: we'll need os x debug permissions to be enabled
19:25 nine leedo: no. Many people asked, but noone wanted it badly enough to commit the two lines necessary ;)
20:22 sortiz joined #perl6
20:23 cdg joined #perl6
20:27 araujo joined #perl6
20:30 ShimmerFairy joined #perl6
20:32 _dolmen_ joined #perl6
20:32 tbrowder perl6 code question: could someone please look at my gist here and try to answer the question: \
20:32 tbrowder https://gist.github.com/tbrowder/4b4b2fd29a6aafd938436c04222cb782
20:34 tbrowder the question is why the backslashes are needed on two lines but not others in the chained expression
20:35 tbrowder the backslashed code in question is found in perl6/doc/htmlify.p6
20:39 lizmat tbrowder: looks to me that should work
20:40 lizmat what is the error that you get ?
20:40 lizmat fwiw, the backslash used to be needed
20:40 lizmat but that changed last November or so
20:40 mst tbrowder: two lines were written before larry saw sense, the rest after
20:41 mst (yes I have an opinion about that feature how did you guess)
20:42 tbrowder lizmat: it doesn't cause an error in the normal running of the code, but I'm trying to add something to the docs and I get an error in that visnity when I add my code elsewhere--just wondering if the backslashes are really needed--thanks
20:42 ShimmerFairy joined #perl6
20:42 tbrowder er, "vicinity"
20:43 lizmat they shouldn't be anymore
20:43 tbrowder okay--I'll press on--thanks
20:43 lizmat if you can prove they *are* necessary, then we have a bug  :0)
20:46 TEttinger joined #perl6
20:48 dvinciguerra joined #perl6
20:50 patrickz joined #perl6
20:55 lue joined #perl6
21:04 tbrowder lizmat: it looks like they are necessary. I removed all such backslashes in that prog and got errors like this: <===SORRY!=== Error while compiling /usr/local/people/tbrowde/mydata/tbrowde-home-bzr/perl6/perl6-repo-forks/doc/./htmlify.p6 Malformed postfix call (only alphabetic methods may be detached)>
21:05 tbrowder I then tried putting them back piecemeal and got errors until they were all put back in.
21:05 lizmat hmmm... perhaps the .&summary is throwing a spanner in the works?
21:06 sortiz or the >>
21:06 tbrowder don't know--it looks like several instances of a function arg with a chained method and the function itself with chained methods...
21:08 tbrowder but how does a backslashed line actually parese?  is the leading whitespace on the following line gobbled up?  if not...
21:09 lizmat yes, that's the idea of the \ at the end of a line
21:09 lizmat iirc
21:09 geekosaur \ followed by whitespace is an "unspace"
21:10 tbrowder right, but I though it only gobbled the newline, not the following whitespace on the following line--I guess it depends on what prog is using it
21:11 * psch wonders if there's a copy-pasto in line 4 of the gist or if infix methop really has problems
21:11 psch as in, line 4 doesn't have a \
21:11 geekosaur tbrowder, http://design.perl6.org/S02.html#Unspaces
21:11 psch we have two methops, one's the "normal" one, without space (or with unspace), the other is the one with space
21:12 psch like, < ^5.map(* + 2) > vs < ^5 .map(* + 2) >
21:12 psch m: say ^5.map(* + 2);
21:12 camelia rakudo-moar e39b21: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at /tmp/WQ5eY6touq:1␤    ------> 3say ^57⏏5.map(* + 2);␤^1␤»
21:12 psch m: say ^5 .map(* + 2);
21:12 camelia rakudo-moar e39b21: OUTPUT«(2 3 4 5 6)␤»
21:17 brrt joined #perl6
21:17 sufrostico joined #perl6
21:21 tbrowder geekosaur: thanks--very helpful--Perl 6 unspace is much different from C or bash!!
21:26 aindilis` joined #perl6
21:28 huggable joined #perl6
21:31 nowan_ joined #perl6
21:35 mohae_ joined #perl6
21:43 yqt joined #perl6
21:50 cosarara joined #perl6
22:07 cpage_ joined #perl6
22:10 dvinciguerra joined #perl6
22:13 dwb joined #perl6
22:14 _dolmen_ joined #perl6
22:15 dwb Perl with types is like a dream.  Nice work, y'all.
22:16 TimToady thanks!
22:18 derp_commander joined #perl6
22:18 derp_commander hey
22:18 psch types are cool, yeah.  but to me, the ease of switching between work-on-one-thing and work-on-many-things (and the different ways to do it) is more noticeably nice
22:19 jnthn Somebody who likes types and meta-model hackery and, unlike me, understands probability, might find http://ashishagarwal.org/2011/10/04/pdf-type-theory/ an interesting thing to explore in Perl 6 :)
22:19 psch ooh boy
22:19 timotimo oh lord, types for portable document formats? in our programming laungague?
22:19 TimToady not you, you're busy :P
22:20 derp_commander no, probability density functions
22:20 timotimo oh
22:20 timotimo .o( portability density functions )
22:20 geekosaur const 0 :p
22:20 jnthn Probability makes me feel dense... :)
22:20 derp_commander probability distribution objects exist in Mathematica
22:20 huf probability document formats is what the web is
22:21 timotimo "you can probably print it. also, you may be able to edit it, perhaps"
22:21 derp_commander heh
22:21 timotimo "there's a good chance it'll have forms that you can interact with if you have the officially sanctioned app"
22:21 jnthn timotimo: Pretty much sums up my experience with PDF forms :P
22:21 TimToady and there's some probability it will encrypt your boot record
22:21 huf it'll likely render mostly ok
22:21 huf if your concept of ok is sufficiently lax
22:22 timotimo it prints like you had given a laxative to the printer beforehand?
22:22 derp_commander you know, it's funny, I was just thinking earlier "What if blocks were actually just a kind of function?" Then I read the P6 docs and, yup, turns out they are
22:22 psch m: say Block ~~ Routine
22:22 camelia rakudo-moar 361448: OUTPUT«False␤»
22:22 psch m: say Block ~~ Code
22:22 camelia rakudo-moar 361448: OUTPUT«True␤»
22:23 psch m: say Routine ~~ Block
22:23 camelia rakudo-moar 361448: OUTPUT«True␤»
22:23 derp_commander psch: strictly speaking, both are callables
22:23 derp_commander m: say Block ~~ Callable
22:23 camelia rakudo-moar 361448: OUTPUT«True␤»
22:23 psch derp_commander: strictly speaking, functions (or subs) are a subtype of Blocks
22:24 timotimo actually, even more strictly speaking, many curly blocks you write won't actually get a Block object created for it, i don't think
22:24 dwb I'm working through a pet project of mine in Perl6, which is a content addressable article store.  When I write this system I like to start by implementing a "read" method, and then use that method to punch the rest of the code into place (which consists of articles in the store).  It wasn't immediately apparent to me how to load a multimethod out of a file and punch it into a class at runtime.  What docs/source should I be ponder?
22:24 psch that reminds me, i came across &?BLOCK not working recently..?
22:24 derp_commander psch: note I used the word "function" with a meaning from mathematics, not P6
22:24 dwb *ing
22:25 dwb jnthn: Oh, neat.
22:25 derp_commander from my perspective, a Block is simply a function which takes at most one argument, $_
22:25 psch m: my $x = -> $a, $b { }; say $x.WHAT
22:25 camelia rakudo-moar 361448: OUTPUT«(Block)␤»
22:25 dwb My love of types is directly proportional to the implementation of parametric multimethods.
22:25 psch derp_commander: that's unfortunately not right :)
22:25 Sgeo_ joined #perl6
22:26 timotimo if you want to punch a multi method into a class, maybe you want to work with multi subs instead?
22:26 derp_commander psch: it's not right in the P6 sense, but I'm coming from a Python/Mathematica background
22:26 dwb timotimo: I'll have a gander at that, thanks.
22:26 timotimo i mean, you can add multi methods into a class via the MOP
22:26 psch derp_commander: to get back to your previous point: i'm not sure what perl6 type i would map the mathematical concept of "function" to, fwiw
22:26 derp_commander and it was Mathematica that introduced me to the idea of multi subs, which all functions there are by default
22:27 dwb Ah, I didn't realize there was an MOP.  Dope, I'll look at that, too.
22:27 psch derp_commander: oh, yeah.  of course it might be different in other space.  apologies for wrongly assuming we're purely in perl 6 space
22:27 TimToady .oO(space, the final frontier...)
22:27 psch *other spaces
22:27 timotimo front: the final space
22:28 derp_commander These are the voyages...
22:28 psch m: { say &?BLOCK } # must've been mistaken about &?BLOCK...
22:28 camelia rakudo-moar 361448: OUTPUT«-> ;; $_? is raw { #`(Block|61490352) ... }␤»
22:29 derp_commander what's with the number?
22:29 psch derp_commander: it's the .WHICH of the Block
22:29 psch derp_commander: well, the number itself is the .WHERE, actually...
22:30 derp_commander psch: oh, Python's hash()
22:30 kid51 joined #perl6
22:30 derp_commander (or id(), pedantically speaking)
22:30 TimToady .WHICH would the the id, but can be more expensive, so I think it's using WHERE as a proxy
22:31 psch m: &?BLOCK()
22:31 derp_commander m: say &?BLOCK();
22:31 psch hihi
22:31 derp_commander ...
22:32 TimToady probably regressing
22:32 camelia rakudo-moar 361448: OUTPUT«(timeout)»
22:32 camelia rakudo-moar 361448: OUTPUT«(timeout)»
22:32 derp_commander ...I think we broke it
22:32 psch it's not quite < fork while fork >... :)
22:32 TimToady you recalled the mainline, I think
22:32 geekosaur it did respond, but it was recalling itself
22:32 jnthn Yeah :)
22:32 geekosaur stack: the final frontier...
22:32 psch geekosaur++
22:33 derp_commander STACK SMASH!
22:37 wamba joined #perl6
22:37 psch ...i kinda got nerd-sniped by the PDF pdf, i notice
22:37 derp_commander heh
22:38 derp_commander earlier in #perl I was tossing around thoughts of what would, to me, be an ideal programming language
22:39 derp_commander based on my travels in Python, JS, wikitext, shell, Lua, and now a little P5
22:40 derp_commander oh, and Mathematica
22:40 psch derp_commander: you can probably implement it in Perl 6 :)
22:40 derp_commander psch: I'd have to sketch it out first
22:41 derp_commander and Python is really the only language I know well enough to write a parser in, as weird as writing an interpreter in another interpreted language might be
22:43 psch derp_commander: well, rakudo *is* largely self-hosting
22:43 jnthn derp_commander: You might find Perl 6's built-in grammars interesting for parsing
22:44 derp_commander jnthn: like I said, I'd first have to sketch out what the language should look like
22:44 jnthn :)
22:46 derp_commander first thought: get rid of barewords. Except for certain special hacks, all program-level identifiers and literals should be in some way be sigiled or quoted
22:47 derp_commander that way the language builtins and the program globals are in two different contexts, and the language can be extended without breaking compatibility
22:54 TimToady sounds like Perl 3 or so :)
22:55 TimToady people didn't like verb sigils...
22:56 derp_commander TimToady: it simplifies a lot of parsing aspects. Also, if you use a ${identifier} format, you can have literally anything as an identifier name except '}'
22:56 TimToady are you making this easy for you or for your user?
22:57 TimToady our slogan in here is: Tormenting the implementor on behalf of the user.  :)
22:58 derp_commander TimToady: the harder parsing is, the more likely you're going to get something horribly wrong. And again, it leaves you free to define new builtins as the language develops
22:58 derp_commander From Python, I like duck typing, and the idea that the functionality of operators attaches to the object, as opposed to the operator
22:58 TimToady sure, it's all tradeoffs
22:59 TimToady otoh, if you take that too far, the reader of a program will have no idea what the + means in a + b
23:00 TimToady or >>, if you're C++
23:00 ZoffixWin m: sub infix:<+> { $^a - $^b }; say 2 + 2
23:00 camelia rakudo-moar 361448: OUTPUT«0␤»
23:00 ZoffixWin ^_^
23:00 derp_commander the different sigils would then serve as a kind of coercion operator, calling on the object referenced to return some kind of wrapper that implements a particular role. Python ends up using the type routines like str(), list(), dict(), and iter() for that purpose
23:00 dwb joined #perl6
23:00 TimToady ZoffixWin: sure, but the scope of that damage is lexical
23:01 TimToady derp_commander: one can go all OO like that, but it's possible to mesh decent functional programming in as well, by our lights
23:02 derp_commander TimToady: yes, by way of the various callable types, as in Python and P6
23:05 * TimToady classifies Python as a language that is too OO and very little FP, actually
23:05 TimToady at the same time, it's not as OO as Ruby
23:06 TimToady but again, it's all tradeoffs
23:07 psch m: ([=] (my $x), 1); (say "\$x is ", $x) # P6 is actually a lisp
23:07 camelia rakudo-moar 361448: OUTPUT«$x is 1␤»
23:07 derp_commander TimToady: at a certain level, the OO paradigm of Python starts to break down as you come up against the underlying C functions and structures
23:07 psch ...i kid, i kid. the commas ruin it :)
23:08 derp_commander isn't that considered one of the useful aspects of Lisp? That all code constructs are themselves data values?
23:10 psch derp_commander: as far as i know, yes.  but looking closer you can tell that that's not true for the snippet above.  "$x" is something different than "say"
23:11 psch derp_commander: mind, my knowledge of lisp is limited, and "code is data is code" is not much more than a catch phrase to me... :)
23:11 BenGoldberg joined #perl6
23:11 derp_commander psch: yeah, Python3 made the print statement into a function
23:12 derp_commander but then I thought, why not make the OTHER statements into functions too? functions that act on other expressions or statements
23:12 psch m: ([=] (my $x), (say "what's \$x now?"));
23:12 camelia rakudo-moar 361448: OUTPUT«what's $x now?␤»
23:12 psch in my understand, in a lisp that would not print anything
23:13 psch but assign the invocation of the say routine into $x, curried if you will
23:13 psch +ing
23:13 psch because "code is data is code"
23:14 derp_commander so if ( this ) { that } is actually a function we can sorta write as if((this), {that})
23:15 psch derp_commander: no, exactly not.  in a lisp-ier language it might be, but in Perl 6 "if" is a keyword
23:15 derp_commander now, of course at some point you have to stop and kick the logic up the interpreter, but you can say that this process is theoretically infinite
23:15 psch m: if(1) { say "this warns" }
23:15 camelia rakudo-moar 361448: OUTPUT«5===SORRY!5===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/c0RmHnDK98:1␤------> 3if7⏏5(1) { say "this warns" }␤Unexpected block in infix position (two terms in a row)␤at /tmp/c0RmHnDK98…»
23:15 psch s/warns/dies/ # ... :)
23:15 derp_commander psch: right, it isn't true in P6, nor Python, and I don't think Ruby either
23:15 gfldex m: sub if($a, &c){ $a && c }; if(True, {say 'Hi derp_commander!'});
23:15 camelia rakudo-moar 361448: OUTPUT«Hi derp_commander!␤»
23:17 psch m: my &if = { if $^a { &^b() } }; if(1, { say "hi" }) # huh?
23:17 camelia rakudo-moar 361448: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/lOVSGpYKi3 line 1␤␤»
23:17 psch ...it's not the &-sigil, fwiw
23:17 psch m: my &if = { if $^a { $^b() } }; if(1, { say "hi" }) #
23:17 camelia rakudo-moar 361448: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/aPNqj6kXku line 1␤␤»
23:17 psch apparently placeholder detection does only go one block deep..?
23:17 TimToady the inner ^ is hidden by the block
23:17 jnthn It's easily possible to make a language where everything is function application. And such a language will be really easy to write a parser for and pretty easy to add macros for. But, it seems most human readers then struggle to parse out intent from a sea of function application. :)
23:17 TimToady scoping of placeholders is always to nearest {}
23:17 psch m: my &if = { $^b() if $^a }; if(1, { say "hi" }) #
23:18 camelia rakudo-moar 361448: OUTPUT«hi␤»
23:18 gfldex $^b is the first anon parameter of the inner block
23:18 gfldex auto parameter even
23:18 derp_commander in Python you can, conceptually, keep going down the chain with func.__call__.__call__.__call___ and so on. Of course, you're not actually digging into anything, instead you're getting a bunch of method wrappers
23:19 TimToady derp_commander: Python tends to be weak on DSLs because of it's OO focus
23:19 TimToady *its
23:19 derp_commander TimToady: DSLs?
23:19 TimToady S99:DSL
23:19 synopsebot6 Link: http://design.perl6.org/S99.html#DSL
23:19 psch m: { sub CALL-ME { OUTER::<&CALL-ME> } }()()()()()
23:19 camelia rakudo-moar 361448: ( no output )
23:19 ZoffixWin Domain Specific Language
23:19 jnthn I kinda find earlier versions of JavaScript that way. function .. function ... function ... yeah, sure, but some of those are expressing modules, some methods, some subroutines, some lambdas...
23:20 jnthn And, by ES6, those patterns are now enshrined in special syntactic forms, which is generally welcomed.
23:20 psch m: { sub CALL-ME { say "called"; OUTER::<&CALL-ME> } }()()()()()()()()()()() # it never stops
23:20 camelia rakudo-moar 361448: OUTPUT«called␤called␤called␤called␤called␤called␤called␤called␤called␤called␤»
23:20 derp_commander TimToady: I can think of several DSLs that are simply extended Python
23:21 TimToady done by preprocessing somehow, I'll warrant
23:21 derp_commander TimToady: no
23:21 TimToady multi-pass parsing is evil
23:21 TimToady how are they implemented then?
23:21 derp_commander usually it's done by defining objects and importing them
23:21 dwb m: IO::Path.new("./foo/bar").WHAT.say
23:21 camelia rakudo-moar 361448: OUTPUT«IO::Path is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/fHSgqTgP5f line 1␤␤»
23:21 dwb Whups.
23:22 dwb I don't have good footing yet in the Perl6 type hierarchy, but should IO::Path $p.dirname maybe return an IO::Path?
23:22 psch dwb: dir*name* sounds like a Str to me, intuitively
23:22 ZoffixWin dwb, you can also do './foo/bar'.IO.WHAT.say
23:22 dwb I hoped to do IO::Path.new($path).dirname.mkdir;
23:22 ZoffixWin dwb, .dirname.IO.mkdir ?
23:22 TimToady derp_commander: how does this change the parsing?
23:22 derp_commander those objects then have method overrides that allow them to be used in interesting ways with the existing operators
23:23 dwb I got to IO::Path.new($path).dirname.IO.mkdir, just wondered why a path part of a path needed the coersion.
23:23 TimToady or do such DSLs have to fit into the One True Syntax?
23:23 derp_commander TimToady: it doesn't. The only thing that changes are the methods being called
23:23 TimToady that's a very limited view of DSL
23:24 TimToady you can't even add a new operator in such a world view
23:24 derp_commander TimToady: but since all the builtin operators simply call object methods anyway, you can create some really weird syntax without modifying the parser
23:24 ZoffixWin m: './eval'.IO.print
23:24 camelia rakudo-moar 361448: OUTPUT«./eval»
23:25 derp_commander TimToady: no, that is one thing Python lacks, the ability to add new operators
23:25 TimToady m: sub infix:<mynewop>($a,$b) { $a ** $b }; say 2 mynewop 3
23:25 camelia rakudo-moar 361448: OUTPUT«8␤»
23:26 TimToady all operators in P6 are lexically scoped functions, and language mutation is therefore lexically scoped, not object scoped
23:27 dwb psch: good point.
23:27 ZoffixWin dwb, my guess would be whoever implemented it thought a more common usecase would be to use the value as a string, so doing the extra step and instantiating an IO::Path object is needless overhead. A programmer who needs it, can type the extra three characters themselves :)
23:27 derp_commander it's a potentially useful ability, but it creates difficulties for a language which is executed line-by-line
23:27 TimToady if you can't add new operators, you find that the culture is overly accepting of overloading existing operators with completely unrelated semantics, to the great detriment of readability
23:28 dwb ZoffixWin: I dig.  I thought Paths were already stringy.
23:29 ZoffixWin dwb, no, they're Cool: http://docs.perl6.org/type/IO::Path#Related_roles_and_classes
23:29 ZoffixWin (if you meant Stringy, as in the role: http://docs.perl6.org/type/Stringy )
23:29 psch Junctions will never be Cool :/
23:29 dwb Ahhh.  I dig.
23:30 derp_commander TimToady: traditionally that's what methods are supposed to be used for. I would suggest the ability should exist, but I would put it in a special system module like Mathematica does, and with no guarantees of future compatibility, as well as possibly other restrictions.
23:30 TimToady traditionally, computer languages suck, and we aim to fix that here
23:33 TimToady methods are great for attaching behaviors to objects, but a lousy way to do language derivations, in the absence of a parser that understands lexical scoping as hierarchy of derived grammars
23:33 derp_commander TimToady: all such additional syntax, if not ALL syntax, would be converted at the intermediate stage to method calls in the interpreter's language
23:33 itcharlie joined #perl6
23:35 sufrostico joined #perl6
23:35 TimToady "the language" is a tricky concept when you're talking about multiple languages :)
23:35 TimToady P6 considers itself to be multiple languages braided together
23:36 Ben_Goldberg joined #perl6
23:37 derp_commander TimToady: when I say "the language", without qualifications, it means "this hypothetical language I'm cooking up"
23:38 derp_commander brb
23:38 BenGoldberg joined #perl6
23:39 TimToady and I'm saying thinking of your language as a single language is a mental trap
23:41 dvinciguerra joined #perl6
23:41 derp_commander TimToady: English includes constructs from multiple languages, yet we still say it's a language
23:42 derp_commander one that's used for a lot of things and in a lot of ways
23:42 psch derp_commander: but direct or indirect speech can both be considered sublanguages inside that language
23:42 TimToady nevertheless, Californian is a subtly different language than Texan
23:42 psch derp_commander: granted, direct speech is "the same as outside", but there's still a context switch
23:42 derp_commander poetry vs prose, technical journals vs novels, written vs spoken, etc.
23:43 stewa02 joined #perl6
23:44 derp_commander what you have within it are roles, contexts, and forms
23:45 dwb Is it possible to call several multi-methods that match a single signature?  I suppose I could make a dispatch table and do so myself fairly painlessly, but Perl6 seems like the language that might provide me junctions on ambiguous multis.
23:45 dwb So I thought I'd ask.
23:45 TimToady our philosophy is that pretty much any declaration changes the language for the rest of the lexical scope, and this is actually reflected internally by use of derived grammars with new methods
23:45 TimToady so we're already doing a lot of what you are starting to think about
23:46 derp_commander oh, and I like multi-methods
23:46 BenGoldberg joined #perl6
23:46 psch dwb: multi method dispatch decides via the signature which method to call
23:46 TimToady our multi-methods and multi-subs are well scoped, unlike the usual global implementation
23:46 psch dwb: so, i'm fairly confident that's a "no, you can't call multiple methods with one set of args"
23:46 autarch joined #perl6
23:47 psch dwb: well, the specific method op for that aside... :)
23:47 TimToady that being said, method dispatch is just another form of function application
23:47 skids Well, there's .*
23:48 TimToady yes, and we can substitute in different dispatchers like that
23:48 TimToady because a method is really just a function that has been chosen by a dispatcher
23:49 TimToady if you scratch our OO hard enough, you find fairly strong FP, and if you scratch our FP hard enough, you find fairly strong OO :)
23:49 derp_commander Mathematica I think supports predicate dispatching
23:50 derp_commander via pattern matching
23:50 TimToady is that basically delegation like Tcl does?
23:51 derp_commander TimToady: no, it's actually a very new concept in general purpose languages
23:51 slobo joined #perl6
23:51 RabidGravy and also, at an entirely user level low-magic level you could actually create a proto sub or method that did that kind of dispatch
23:51 TimToady is this pattern matching on a dispatch/arg-binding level, or on a macro level?
23:51 dwb TimToady: Nice.  So I should (after more than one day of playing) be able to do an `all`, `any`, `one` or `none` on a set of namespaced subroutines with the same signature?
23:52 derp_commander TimToady: dispatch level, let me pull some things up
23:52 TimToady okay, we can do pattern matching there already
23:52 skids There's also runtime where clauses, for a poor-man's solution to that.
23:52 dwb HASH::foo(sig) is different than OTHERHASH::foo(sig)?
23:52 cpage_ joined #perl6
23:53 TimToady derp_commander: see http://rosettacode.org/wiki/Pattern_matching#Perl_6
23:54 dwb Sorry, crossed streams I think.
23:55 pierre_ joined #perl6
23:55 skids Ergh that redblack example really steps on my C-ish efficiency nerves for some reason.
23:56 TimToady well, nobody is claiming it's gonna be efficient :)
23:56 derp_commander TimToady: in Mathematica, all of the syntax and grammar consists of rules that operate on patterns
23:56 skids Yeah but that's kinda the point of redblack trees. :-)
23:57 dwb psch: What I'm working toward is: "multi method dispatch decides via the signature which methods to call", where the plurality of methods is the thing I want.  Renaming them into a symbol table is okay, if that's the way to roll.
23:57 dmc_ joined #perl6
23:58 mspo TimToady: you come in around the same LOC as ocaml
23:59 mspo the erlang one is doing my head in
23:59 TimToady derp_commander: in Perl 6, all of the syntax and grammar consists of rules that operate on patterns :)

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

Perl 6 | Reference Documentation | Rakudo