Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:06 sQuEE joined #perl6
00:08 baest_ joined #perl6
00:11 krakan joined #perl6
00:15 khw joined #perl6
00:16 TakinOver joined #perl6
00:22 BenGoldberg m: (^0x1ffff).map(*.uniname).sort(*.chars).tail(5).reverse.say;
00:22 camelia rakudo-moar 4a7eaa: OUTPUT«(ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM CLOCKWI…»
00:23 TakinOver joined #perl6
00:24 BenGoldberg m: (^5).greatest(3).say;
00:24 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'greatest' not found for invocant of class 'Range'␤  in block <unit> at /tmp/XuKAGPlnJt line 1␤␤»
00:24 BenGoldberg m: (^5).least(3).say;
00:24 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'least' not found for invocant of class 'Range'␤  in block <unit> at /tmp/BPjQ1uQ82k line 1␤␤»
00:24 BenGoldberg m: (^5).lowest(3).say;
00:24 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'lowest' not found for invocant of class 'Range'␤  in block <unit> at /tmp/VLX2K3X3Yz line 1␤␤»
00:25 skids m: (^5).first.say; (^5).first(:end).say
00:25 camelia rakudo-moar 4a7eaa: OUTPUT«0␤4␤»
00:25 skids m: (^1000000).first(:end).say # Also, is efficient
00:25 camelia rakudo-moar 4a7eaa: OUTPUT«999999␤»
00:26 * BenGoldberg thinks that it would be nice if there was a way of efficiently getting the N largest (or smallest) elements of a list.  Doing sort then head/tail is not the best way to do it.
00:26 Actualeyes joined #perl6
00:26 AlexDaniel yea
00:27 mohae joined #perl6
00:28 skids There are ways to write a lazy-ish sort.  But you'll always have to at least iterate the whole list.
00:28 BenGoldberg But you don't need to *sort* the whole list.
00:29 skids Yes.  But the difference between one pass of a bubbleish sort and an iteration may not be much.
00:29 * skids was eyeing cubesort while back as a prospective lazy-able algorithm.
00:30 BenGoldberg Sorting an N element list takes O(N log N) time.  To get the M lowest elements of a list should be doable in O(M log N) time.
00:31 BenGoldberg One of many ways of getting the M lowest elements is to perform a make-heap operation once, and then perform a heap-remove-min operation M times.
00:31 skids yeah, and same for a M-depth first-pass of bubblesort, mod a constant for fiddling.
00:32 TakinOver joined #perl6
00:33 skids or do some .grep with a stateful closure.
00:34 BenGoldberg Or quickselect.
00:36 BenGoldberg Or introselect.
00:38 pierre joined #perl6
00:47 TakinOver joined #perl6
00:47 ggoebel114 joined #perl6
00:49 AlexDaniel .tell dogbert17 Hey. If you want to work on broken links, check this out: https://gist.githubusercontent.com/AlexDaniel/fc6cb8d6f66516c837268d43ecc47c33/raw/88c43b2891bed4d2f69087977e190afb22189a02/doc.perl6_checklink
00:49 yoleaux AlexDaniel: I'll pass your message to dogbert17.
00:50 AlexDaniel .tell dogbert17 the output is slightly redundant but I've found some obvious errors while scrolling it
00:50 yoleaux AlexDaniel: I'll pass your message to dogbert17.
00:52 kurahaupo_ joined #perl6
00:53 AlexDaniel .tell dogbert17 the thing is, I think that all of these errors have to be eliminated… there's no reason to keep broken links. Pick any problem (e.g. <a> inside of <a>) and fix it :) The tool that I've used to generate this is w3c checklink
00:53 yoleaux AlexDaniel: I'll pass your message to dogbert17.
01:02 jack_rabbit joined #perl6
01:25 Akagi201 joined #perl6
01:26 cognominal joined #perl6
01:26 cognominal joined #perl6
01:27 cognominal joined #perl6
01:28 cognominal joined #perl6
01:29 cognominal_ joined #perl6
01:29 cognominal__ joined #perl6
01:29 cpage_ joined #perl6
01:30 cognominal_ joined #perl6
01:31 cognominal_ joined #perl6
01:32 cognominal joined #perl6
01:32 cognominal joined #perl6
01:33 cognominal_ joined #perl6
01:34 cognominal_ joined #perl6
01:35 cognominal joined #perl6
01:36 cognominal joined #perl6
01:37 cognominal joined #perl6
01:38 cognominal joined #perl6
01:38 TakinOver joined #perl6
01:38 cognominal joined #perl6
01:39 cognominal joined #perl6
01:40 cognominal joined #perl6
01:40 ssotka joined #perl6
01:41 cognominal joined #perl6
01:46 cognominal joined #perl6
01:46 cognominal joined #perl6
01:46 cognominal joined #perl6
01:46 cognominal_ joined #perl6
01:46 molaf joined #perl6
01:46 cognominal_ joined #perl6
01:46 cognominal joined #perl6
01:46 cognominal_ joined #perl6
01:47 cognominal joined #perl6
01:47 TakinOver joined #perl6
01:47 cognominal_ joined #perl6
01:48 cognominal_ joined #perl6
01:49 cognominal_ joined #perl6
01:50 cognominal_ joined #perl6
01:51 cognominal joined #perl6
01:52 cognominal joined #perl6
01:53 cognominal joined #perl6
01:53 cognominal joined #perl6
01:54 cognominal joined #perl6
01:57 TakinOver joined #perl6
02:10 TakinOver joined #perl6
02:19 pierre joined #perl6
02:22 TakinOver joined #perl6
02:24 finanalyst joined #perl6
02:29 TakinOver joined #perl6
02:36 ugexe joined #perl6
02:38 pierre joined #perl6
02:44 noganex_ joined #perl6
02:47 pierre joined #perl6
02:58 TakinOver joined #perl6
03:05 Xliff_ Are there any articles on the use of Backtrace?
03:07 jeek Jessi Slaughter posted a couple of relevant videos
03:10 Xliff_ Hrm.
03:10 Xliff_ jeek: I will try to look them up. Thanks.
03:12 Xliff_ jeek: Er... Well that was a nifty troll. :P
03:12 Xliff_ I don't pay much attention to internet news so I didn't really recognize the name.
03:15 TakinOver joined #perl6
03:19 jeek My apologies for the differing consequences.
03:24 wbill joined #perl6
03:27 pierre joined #perl6
03:36 _28_ria joined #perl6
03:36 TakinOver joined #perl6
03:54 pierre joined #perl6
03:59 pierre joined #perl6
04:03 labster joined #perl6
04:08 pierre joined #perl6
04:10 awwaiid joined #perl6
04:13 anomie__ joined #perl6
04:13 anomie__ sub printf (Str) is native(){} has some unexpected behaviour for me.
04:13 anomie__ It doesn't print until I press enter a second time.
04:15 gfldex anomie__: could be buffered
04:16 anomie__ Like, what does that mean? Never played with FFI before.
04:17 gfldex see http://www.gnu.org/software/libc/manual/html_node/Flushing-Buffers.html
04:19 anomie__ All right, so if I want it to print immediately I need to create a buffer and flush it, or something?
04:20 gfldex that depends on your OS, terminal and when you last sacrificed a goat
04:21 anomie__ Just what I need to here.
04:21 anomie__ But I suppose the real question is, why would I want to reimplement say?
04:21 Zero_Dogg joined #perl6
04:21 gfldex indeed
04:22 skink Perl6 has printf, why are you NativeCalling it?
04:22 Xliff_ How can I access the call stack in Perl6?
04:23 Xliff_ I can't find any useful documentation on that.
04:23 anomie__ skink: Just wanted to get familiar with NativeCall.
04:23 skink Ah
04:23 skids Well if you want exact C format.  But you could use sprintf.
04:23 Xliff_ anomie__, I know that feeling. ;)
04:23 Xliff_ Except when I did it, I used libogg and libvorbis.
04:24 skink Xliff, That's because you're insane :)
04:24 Xliff skink: Duh!
04:24 anomie__ I'm gonna try to create yet another textboard with perl, so expect to see me for the next few weeks or so.
04:24 gfldex Xliff_: you can't find any useful documentation because a) it has not been written yet or b) it's an implementation detail
04:24 Xliff Shit. So there is no caller() equivalent for Perl6?
04:25 awwaiid I found https://rosettacode.org/wiki/Stack_traces#Perl_6 but it appears to not work
04:25 awwaiid though it doesn't thrown an error
04:25 anomie__ Also, out of curiosity, any idea how to encode text to SHIFT_JIS?
04:26 awwaiid m: say Backtrace.new.concise
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«␤»
04:26 anomie__ Or should I just cheat and execute iconv for that?
04:26 Actualeyes joined #perl6
04:26 Xliff awwaiid, yes. I have tried using Backtrace, but the documentation doesn't seem to help.
04:26 awwaiid m: say Backtrace.new.full
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«  in block  at gen/moar/m-CORE.setting line 21050␤  in method new at gen/moar/m-CORE.setting line 21051␤  in block <unit> at /tmp/pUUttQ0oRj line 1␤␤»
04:26 Xliff m: sub f () { say BACKTRACE.full }; F
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z2K_qyBVNy␤Undeclared names:␤    BACKTRACE used at line 1. Did you mean 'Backtrace'?␤    F used at line 1␤␤»
04:26 Xliff m: sub f () { say Backtrace.full }; F
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E9LQQ78LkQ␤Undeclared name:␤    F used at line 1␤␤»
04:26 awwaiid m: say Backtrace.new[2]
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "/tmp/jNPMgimLTz", line => 1, code => ->  { #`(Block|53388096) ... }, subname => "<unit>")␤»
04:26 Xliff m: sub f () { say Backtrace.full }; f
04:26 camelia rakudo-moar 4a7eaa: OUTPUT«Invocant requires an instance of type Backtrace, but a type object was passed.  Did you forget a .new?␤  in sub f at /tmp/P5WoXlo7KP line 1␤  in block <unit> at /tmp/P5WoXlo7KP line 1␤␤»
04:26 Xliff Hmm.... now THAT might be just what I need, awwaiid
04:27 awwaiid Xliff: I found that via Backtrace.new.^methods, and noticed AT-POS :)
04:27 Xliff m: sub f () { dd Backtrace.new[0] }; f
04:27 camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "gen/moar/m-CORE.setting", line => 21050, code => ->  { #`(Block|65927456) ... }, subname => "")␤»
04:27 Xliff m: sub f () { dd Backtrace.new[1] }; f
04:27 camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "gen/moar/m-CORE.setting", line => 21051, code => method new (Backtrace $: Int $offset = 0, *%_) { #`(Method|69464728) ... }, subname => "new")␤»
04:27 sno joined #perl6
04:28 Xliff m: sub f () { dd Backtrace.new[-1] }; f
04:28 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dfI5kCno0k␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/dfI5kCno0k:1␤------> 3sub f () { dd Backtrace.new[-1]7⏏5 }; f␤»
04:28 awwaiid Xliff: there is also CALLER::
04:28 Xliff m: sub f () { dd Backtrace.new[*-1] }; f
04:28 camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "/tmp/TYeIMczeZW", line => 1, code => ->  { #`(Block|63760336) ... }, subname => "<unit>")␤»
04:28 Xliff Where is CALLER:: documented?
04:29 awwaiid Xliff: http://doc.perl6.org/language/packages -- it is a pseudo-package, but you can do all the symbol and info lookups like other packages
04:30 anomie__ So, how do I encode SHIFT_JIS?
04:30 anomie__ Derp, I might have found it.
04:30 gfldex https://design.perl6.org/S06.html#The_callframe_and_caller_functions
04:30 awwaiid m: sub f { say CALLER::.keys } ; sub g { my $local_var = 2; f() } ; g()
04:30 camelia rakudo-moar 4a7eaa: OUTPUT«($local_var $_ $! $*DISPATCHER RETURN $¢ $/)␤»
04:31 anomie__ Nevermind, the Encode module doesn't cover SHIFT_JIS.
04:31 awwaiid Xliff: that's what I've used CALLER:: for at least, peeking into the scope of my caller
04:31 gfldex the order of a stack is not fixed. Expect the optimiser and black magic to get in your way.
04:32 Cabanossi joined #perl6
04:32 gfldex also https://github.com/perl6/roast/blob/master/S06-advanced/caller.t#L7-L63
04:32 huggable joined #perl6
04:32 gfldex if it's in roast it's likely safe to use
04:32 awwaiid gfldex: nice roast reference \o
04:33 Xliff Ooh! Thanks, gfldex
04:33 Xliff anomie__, what are you trying to encode SHIFT_JIS into?
04:33 gfldex after you got the advanced basics, roast is actually a nice place to learn Perl 6
04:34 anomie__ Xliff: Unicode, and vice versa. Looks like for now I'll have to NativeCall iconv, which seems to be a part of libc.
04:35 BenGoldberg m: sub printf (Str) is native(){}; printf("foo\n");
04:35 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z0DzuF0VLt␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/z0DzuF0VLt:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
04:35 BenGoldberg m: use NativeCall; sub printf (Str) is native(){}; printf("foo\n");
04:35 camelia rakudo-moar 4a7eaa: OUTPUT«foo␤»
04:35 Xliff Undeclared routine:
04:35 Xliff caller used at line 25
04:36 anomie__ How can I represent size_t *inbytesleft as a perl signature?
04:36 Xliff anomie__, can I get the full C declaration?
04:36 anomie__ Oh nvm, there is a size_t.
04:37 BenGoldberg For a pointer to size_t, use Pointer[size_t], I think.
04:37 anomie__ Xliff: Sure.        size_t iconv(iconv_t cd,
04:37 anomie__ char **inbuf, size_t *inbytesleft,
04:37 anomie__ char **outbuf, size_t *outbytesleft);
04:38 Xliff Yeah. BenGoldberg++ is right.
04:40 Xliff Looks like access to caller() has been removed.
04:40 skink Xliff, Speaking of crazy work with audio libraries, wanna help convert some Nyquist to P6?
04:40 anomie__ What about iconv_t though? It looks like I can't define that subroutine without doing some work first.
04:40 Xliff m: sub f () { caller.subname }; f
04:40 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8PKUVrFxw6␤Undeclared routine:␤    caller used at line 1␤␤»
04:40 Xliff skink: I could be talked into it. =)
04:41 Xliff However, I have no experience with Nyquist.
04:41 anomie__ So, would I see where iconv_t is define, and define it perl with c types, then use that as an argument to iconv?
04:42 Xliff Aaieee! LISP!
04:42 * Xliff flees.
04:42 skink I wanted to make Audacity's Clip Fix plugin into a standalone script. I kinda succeeded via a very hacky bash script, but it's all rather slow and messy
04:42 skink Yeah it's an audio DSL based on XLISP
04:42 Xliff You can fondle the LSP. I will stick with Perl.
04:43 Xliff Doing lisp makes me feel dirty.
04:43 Xliff It must be all of the curved surfaces. :P
04:44 skink This isn't beautiful to you? :)
04:44 skink https://github.com/audacity/audacity/blob/master/plug-ins/clipfix.ny
04:45 anomie__ So, what is the go-to module right now for making a stand alone web app, without cgi or anything?
04:45 Xliff skink, I now need a very cold shower after looking at all of those ().
04:46 b2gills joined #perl6
04:47 Xliff I learned Lisp for a college course that I needed for graduation. Then forgot everything about it. Never looked back.
04:48 anomie__ Hey, does Hiker build for you guys?
04:48 Xliff anomie__, "Hiker"? Never heard of it?
04:49 Xliff s/heard/hoid/ # Annoying NY accent.
04:49 anomie__ Xliff: It's an MVC framework. Could you just try to build it please? It fails here.
04:49 anomie__ with panda install Hiker, I mean.
04:50 anomie__ It looks it passed tha travis build, so I'm confused.
04:50 aries_liuxueyang joined #perl6
05:07 Xliff HTTP::Response is not composable, so HTTP::Server::Async::Response cannot compose it
05:07 Xliff That basic problem is causing the install to fail.
05:09 pierre joined #perl6
05:12 Xliff Nope. Hiker install cannot proceed because HTTP::Server::Async will not install. HTTP::Server::Async will not install because HTTP::Response is not composable.
05:12 Xliff So the question is... why is HTTP::Response not composable.
05:12 Xliff s/\./?/
05:12 Xliff Er.
05:12 Xliff s/\.$/?/
05:37 domidumont joined #perl6
05:41 domidumont joined #perl6
05:45 ufobat joined #perl6
05:45 sdas joined #perl6
05:47 Xliff Aside from doing "does" when you really want "is", what other situations will rakudo throw an X::Composition::NotComposable exception?
05:49 rurban joined #perl6
05:52 Xliff tell lizmat Does caller() still work in rakudo?
05:52 Xliff .tell lizmat Does caller() still work in rakudo?
05:52 yoleaux Xliff: I'll pass your message to lizmat.
06:00 domidumont joined #perl6
06:11 pierre joined #perl6
06:28 _mg_ joined #perl6
06:29 maybekoo2 joined #perl6
06:33 buharin joined #perl6
06:34 tomboy64 joined #perl6
06:37 brrt joined #perl6
06:37 brrt good * #perl6
06:46 Woodi hallo :)
06:48 zakharyas joined #perl6
06:51 pierre joined #perl6
06:58 sno joined #perl6
07:07 rindolf joined #perl6
07:08 pierre joined #perl6
07:11 ufobat joined #perl6
07:20 pierre_ joined #perl6
07:22 darutoko joined #perl6
07:25 pierre_ joined #perl6
07:30 RabidGravy joined #perl6
07:31 Xliff Anyone awake know if call stack inspection is implemented in Rakudo?
07:32 nine Xliff: it is
07:33 Xliff nine: Have a link with a good writeup on it?
07:33 Xliff S06 looks to be out of date.
07:34 Xliff The docs on class Backtrace are inaccurate, and don't seem to wokr.
07:34 Xliff s/kr/rk/
07:34 nine m: sub foo() { say callframe(1).code }; sub bar() { foo }; bar
07:34 camelia rakudo-moar 4a7eaa: OUTPUT«sub bar () { #`(Sub|65174232) ... }␤»
07:34 Xliff m sub foo() { dd callframe(1) }; sub bar() { foo }; bar
07:34 Xliff m: sub foo() { dd callframe(1) }; sub bar() { foo }; bar
07:34 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot find method 'WHICH': no method cache and no .^find_method␤  in sub foo at /tmp/Y5OkKklu7A line 1␤  in sub bar at /tmp/Y5OkKklu7A line 1␤  in block <unit> at /tmp/Y5OkKklu7A line 1␤␤»
07:35 nine m: sub foo() { say callframe(1).^methods }; sub bar() { foo }; bar
07:35 camelia rakudo-moar 4a7eaa: OUTPUT«(new line file code callframe gist level annotations my)␤»
07:35 Xliff m: sub foo() { my $a = callframe(1); dd $a }; sub bar() { foo }; bar
07:35 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot find method 'WHICH': no method cache and no .^find_method␤  in sub foo at /tmp/fzubB5vw96 line 1␤  in sub bar at /tmp/fzubB5vw96 line 1␤  in block <unit> at /tmp/fzubB5vw96 line 1␤␤»
07:36 Xliff Dammit. Nothing at the method/sub level?
07:36 nine m: sub foo() { say callframe(1).my<$a> }; sub bar() { my $a = "not so hidden"; foo }; bar # also funny
07:36 camelia rakudo-moar 4a7eaa: OUTPUT«not so hidden␤»
07:36 Xliff m: sub foo() { say callframe(1).gist;  }; sub bar() { foo }; bar
07:36 camelia rakudo-moar 4a7eaa: OUTPUT«/tmp/PmokO8KCnC at line 1␤»
07:37 nine Xliff: what do you mean by method/sub level?
07:37 Xliff Something that has the name of the calling method or sub.
07:37 nine m: sub foo() { say callframe(1).code.name }; sub bar() { foo }; bar
07:37 camelia rakudo-moar 4a7eaa: OUTPUT«bar␤»
07:37 Xliff Ah!
07:38 Xliff What object does .code return?
07:38 nine m: sub foo() { say callframe(1).code.^name }; sub bar() { foo }; bar
07:38 camelia rakudo-moar 4a7eaa: OUTPUT«Sub␤»
07:38 pierre_ joined #perl6
07:38 nine Well it obviously depends on who the caller is :)
07:39 nine It generally returns a Callable
07:39 Xliff m: sub foo() { say callframe(2).name;  }; sub bar() { foo }; bar
07:39 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'name' not found for invocant of class 'CallFrame'␤  in sub foo at /tmp/VJ4zdGkRqY line 1␤  in sub bar at /tmp/VJ4zdGkRqY line 1␤  in block <unit> at /tmp/VJ4zdGkRqY line 1␤␤»
07:39 nine Xliff: I'm curious what you need this for?
07:40 Xliff Caching
07:40 Xliff So the Cache object needs to know the caller.
07:40 nine why?
07:41 Xliff Because it does! =)
07:41 Xliff One sec. Writing test.
07:43 moritz code that introspects the call chain is generally not composable
07:43 moritz and should be used only for debugging
07:43 Xliff moritz: How so?
07:43 abraxxa joined #perl6
07:43 Xliff I'm running into non-compose issues with HTTP::Server::Async, too.
07:43 moritz Xliff: the very idea of composable code is that you can use it from anywhere, and it makes no difference
07:44 Xliff code introspection doesn't necessarily break that.
07:44 moritz Xliff: if it depends on the caller, then you might need to try to fake a caller if you want the code to behave differently
07:44 moritz so you end up with programs that lie to other parts of the program
07:44 Xliff moritz: In this case, that is a non-issue.
07:44 pierre_ joined #perl6
07:44 moritz ... and the humans reading the code are supposed to understand that
07:45 Xliff Code needs to know where it is being run from so that it can save state properly.
07:45 Xliff Used for caching for a RESTful API
07:46 moritz ... until somebody wants to share a cache between two functions
07:46 Xliff ???
07:46 Xliff Again... not an issue.
07:46 Xliff If I am understanding you, correctly.
07:47 nine The more flexible, and easier testable way would be to just pass some kind of cache key to the caching method
07:47 timotimo you don't have to introspect the call chain if the callers uses a dynamic variable
07:47 Xliff And here I am bitten by hidden funcs in objects. In particular... "call_with_args"
07:47 nine Yes, that means that each caller has to pass an additional argument, but it will make the code crystal clear instead of magical.
07:47 Xliff What's wrong with magic?
07:48 nine It makes code less maintainable.
07:48 Xliff And yes, initially I was going that way.
07:48 Xliff It makes the code less susceptible to fat fingering in data that's already available.
07:49 moritz you could always make the cache key optional, and do the magic only if it's not passed along
07:49 Xliff So... pros and cons....
07:49 Xliff And I don't see how less code makes things less maintanable.
07:49 Xliff moritz: Sure! That is sensible.
07:50 Xliff However, would like to have the magic first so I can see how feasible my thoughts are to rakudo reality.
07:50 RabidGravy there probably is enough in any given callframe to generate some hash, you just may have to be more selective about which pieces you use depending on what the callframe represents
07:51 nine Explicit is usually better than implicit. With the magic version the reader of the code would have to know much more about Perl 6 to understand it.
07:51 Xliff All I really want are: Class of caller, name of method.
07:51 Xliff That's it.
07:51 RabidGravy skip the frames that don't have that information
07:52 Xliff nine: Generally, I agree. However, good documentation can go a long way with alleviating that problem.
07:53 RabidGravy you can always do it, but randomly iterating over any number of callframes you won't have all the information, because it gets it from e.g. the block (may be anonymous) or the package (which comes from the block)
07:53 Xliff Ah. And then gotta mix in class inheritance with that...
07:54 wamba joined #perl6
07:59 Xliff So I had to use "callframe(5)" to finally get back to something useable.
08:00 Xliff And that may not always be true. *sigh*
08:00 lizmat messages ?
08:00 yoleaux 05:52Z <Xliff> lizmat: Does caller() still work in rakudo?
08:00 lizmat m: caller()
08:00 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vTyq4P3xXB␤Undeclared routine:␤    caller used at line 1␤␤»
08:00 Xliff \o
08:00 lizmat :-)
08:00 Xliff Question answered. Thanks, liz.
08:00 lizmat Xliff: you're welcome  :-)
08:01 Xliff Of course, all you grownups in this channel....
08:01 Xliff Trying to convince me "magic is bad"
08:01 Xliff =P
08:01 timotimo isn't callframe the "wrong way around"?
08:02 Xliff Depends on how you use it.
08:02 timotimo like, does callframe(0) give you the current call frame, or the "initial" callframe?
08:02 Xliff In this case, I don't think there's enough data for the magic to give me the right answer.
08:02 Xliff Which means more code and more maintenance
08:02 Xliff timotimo, current IIRC
08:04 timotimo OK
08:04 nine Yes, callframe(0) is the current one
08:04 timotimo i could imagine optimizations that cause in-lining might make the number wobble
08:04 llfourn joined #perl6
08:04 nine timotimo: I hope not :/
08:07 llfourn m: sub foo(+@at-least-one) { say "GOT HERE" }; foo() #NYI?
08:07 camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
08:10 llfourn m: sub foo(*@at-least-one[$first]) { say "GOT HERE" }; foo() # I wonder...
08:10 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6CV8Pznj6x␤Variable '$first' is not declared. Did you mean '&first'?␤at /tmp/6CV8Pznj6x:1␤------> 3sub foo(*@at-least-one[7⏏5$first]) { say "GOT HERE" }; foo() # I w␤»
08:11 ocbtec joined #perl6
08:11 * llfourn forgets the unpacking syntax
08:12 timotimo you'd at least need a space there
08:13 llfourn m: sub foo( *@at-least-one [ $first ] ) { say "GOT HERE" }; foo() # ?
08:13 camelia rakudo-moar 4a7eaa: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter @at-least-one␤  in sub foo at /tmp/2RNKtkD80a line 1␤  in block <unit> at /tmp/2RNKtkD80a line 1␤␤»
08:14 llfourn ok so +@ is NYI but you should be able to do:
08:14 llfourn m: sub foo( *@at-least-one [ $,*@ ] ) { say "GOT HERE" }; foo()
08:14 camelia rakudo-moar 4a7eaa: OUTPUT«Too few positionals passed; expected at least 1 argument but got only 0 in sub-signature of parameter @at-least-one␤  in sub foo at /tmp/8XHjyy0gpn line 1␤  in block <unit> at /tmp/8XHjyy0gpn line 1␤␤»
08:14 jjido joined #perl6
08:14 llfourn m: sub foo( *@at-least-one [ $,*@ ] ) { say "GOT HERE" }; foo("wee")
08:14 camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
08:14 llfourn \o/
08:15 nine m: sub foo( *@at-least-one where *.elems ) { say "GOT HERE" }; foo() # alternative
08:15 camelia rakudo-moar 4a7eaa: OUTPUT«Constraint type check failed for parameter '@at-least-one'␤  in sub foo at /tmp/XzvPwseNvb line 1␤  in block <unit> at /tmp/XzvPwseNvb line 1␤␤»
08:16 pierre_ joined #perl6
08:16 llfourn yeah that's probably less noisy :)
08:16 llfourn you could even:
08:16 rurban left #perl6
08:17 llfourn m: sub foo( *@at-least-one where ?* ) { say "GOT HERE" }; foo("wee") #perhaps?
08:17 camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
08:17 Xliff So callframe.package doesn't seem to return the full namespace of the class. How can I get that info?
08:17 llfourn m: sub foo( *@at-least-one where ?* ) { say "GOT HERE" }; foo()
08:17 camelia rakudo-moar 4a7eaa: OUTPUT«Constraint type check failed for parameter '@at-least-one'␤  in sub foo at /tmp/HkbPlpUh_U line 1␤  in block <unit> at /tmp/HkbPlpUh_U line 1␤␤»
08:18 timotimo TBH, i find the sub-signature with one required parameter easier to understand from the view-point of the caller
08:18 RabidGravy Xliff, I think it's long_name or something
08:19 llfourn timotimo: yeah it gives a nicer error if that's what you're after
08:19 timotimo yup
08:20 dakkar joined #perl6
08:24 AlexDaniel joined #perl6
08:29 Xliff RabidGravy, looks like it's $!longname, and...private.
08:29 Akagi201 joined #perl6
08:29 RabidGravy no, that's not right
08:30 Xliff Looking at BOOTSTRAP.nqp.
08:30 Xliff Am I too far down the rabbit hole?
08:30 timotimo there might still be an accessor somewhere?
08:31 Xliff .long-name and .long_name both throw errors.
08:33 pierre_ joined #perl6
08:33 RabidGravy actually name does return the long name
08:33 RabidGravy I'm getting confused
08:33 RabidGravy there is a shortname
08:33 llfourn Xliff: what are you calling this on?
08:34 RabidGravy m: class Bar::Foo {}; say Bar::Foo.^name
08:34 camelia rakudo-moar 4a7eaa: OUTPUT«Bar::Foo␤»
08:34 RabidGravy there full name
08:34 llfourn right.
08:35 llfourn m: class { callframe(0).package.say } # ?
08:35 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'package' not found for invocant of class 'CallFrame'␤  in block <unit> at /tmp/MF3saW6BNy line 1␤␤»
08:35 llfourn I don't really understand what's the question because callframe.package is not a thing
08:35 Xliff I'm calling callframe from a method, not a type object.
08:35 vytas joined #perl6
08:36 llfourn m: class { method foo { callframe.package.note }.foo
08:36 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DSFBx9Dfy5␤Missing block␤at /tmp/DSFBx9Dfy5:1␤------> 3ethod foo { callframe.package.note }.foo7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        stateme…»
08:36 Xliff callframe.code.name; callframe.code.package
08:36 RabidGravy I don't understand the difference
08:36 llfourn m: class { method foo { callframe.package.note } }.foo
08:36 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'package' not found for invocant of class 'CallFrame'␤  in method foo at /tmp/mVrI4Ogn3f line 1␤  in block <unit> at /tmp/mVrI4Ogn3f line 1␤␤»
08:36 llfourn ah
08:36 RabidGravy m: class Bar::Foo {method baz() { say callframe(0).code.package.^name } }; Bar::Foo.baz
08:36 camelia rakudo-moar 4a7eaa: OUTPUT«Bar::Foo␤»
08:36 llfourn m: class { method foo { callframe.code.package.^name.note } }.foo
08:36 camelia rakudo-moar 4a7eaa: OUTPUT«<anon|79638688>␤»
08:37 labster joined #perl6
08:38 Xliff llfourn++ && RabidGravy++ # Progress!
08:38 Xliff Thanks, guys.
08:39 llfourn \o/
08:39 Xliff Now I must thunk on proceedings.
08:47 moritz m: sub d ( callframe.code.package.^name.note ); multi a(Int) { d }; multi a(Str) { d }; a 1; a 'foo'
08:47 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RFSvcM5Wjb␤Invalid typename 'callframe' in parameter declaration. Did you mean 'CallFrame'?␤at /tmp/RFSvcM5Wjb:1␤------> 3sub d ( callframe7⏏5.code.package.^name.note ); multi a(Int)␤»
08:47 moritz m: sub d { callframe.code.package.^name.note }; multi a(Int) { d }; multi a(Str) { d }; a 1; a 'foo'
08:47 camelia rakudo-moar 4a7eaa: OUTPUT«GLOBAL␤GLOBAL␤»
08:48 pierre_ joined #perl6
08:48 moritz m: sub d { callframe.code.package.^name.note }; multi a(Int) { d }; { my class A { method a { d }; A.new.d }; { my class A { method a { d }; A.new.d };
08:48 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4PFYRojKaN␤Missing block␤at /tmp/4PFYRojKaN:1␤------> 3 my class A { method a { d }; A.new.d };7⏏5<EOL>␤»
08:48 timotimo you have the A.new.d inside your class A
08:48 moritz m: sub d { callframe.code.package.^name.note }; multi a(Int) { d }; { my class A { method a() { d() } }; A.new.d }; { my class A { method a() { d() } }; A.new.d }
08:48 camelia rakudo-moar 4a7eaa: OUTPUT«Method 'd' not found for invocant of class 'A'␤  in block <unit> at /tmp/zxje56PPnf line 1␤␤»
08:48 moritz m: sub d { callframe.code.package.^name.note }; multi a(Int) { d }; { my class A { method a() { d() } }; A.new.a }; { my class A { method a() { d() } }; A.new.a }
08:48 camelia rakudo-moar 4a7eaa: OUTPUT«GLOBAL␤GLOBAL␤»
08:50 llfourn shouldn't you do callframe(1)?
08:53 moritz m: sub d { callframe(1).code.package.^name.note }; multi a(Int) { d }; { my class A { method a() { d() } }; A.new.a }; { my class A { method a() { d() } }; A.new.a }
08:53 camelia rakudo-moar 4a7eaa: OUTPUT«A␤A␤»
08:53 moritz m: sub d { callframe(1).code.package.WHICH.note }; multi a(Int) { d }; { my class A { method a() { d() } }; A.new.a }; { my class A { method a() { d() } }; A.new.a }
08:53 camelia rakudo-moar 4a7eaa: OUTPUT«A␤A␤»
08:55 llfourn which shows why caching based on caller package name is a bad idea in general ;)
08:56 llfourn one could use callerframe(1).package.WHICH which would be less bad
08:56 llfourn oh but that's what you did
08:56 llfourn and it isn't less bad
08:57 llfourn I guess you could do .WHERE :D
08:58 timotimo that's really not such a good idea :)
08:59 llfourn hmmm
08:59 llfourn what about HOW.WHICH....
09:00 timotimo
09:00 llfourn because each type should have it's own metaobject instance right?
09:00 llfourn m: sub d { callframe(1).code.package.HOW.WHICH.note }; multi a(Int) { d }; { my class A { method a() { d() } }; A.new.a }; { my class A { method a() { d() } }; A.new.a }
09:00 camelia rakudo-moar 4a7eaa: OUTPUT«Perl6::Metamodel::ClassHOW|71008368␤Perl6::Metamodel::ClassHOW|71058560␤»
09:01 llfourn it works :P!
09:01 timotimo oh lord
09:01 llfourn :D:D:D
09:01 teatime dang is there no WHEN
09:01 teatime I really wanted .WHO.WHAT.WHERE.WHEN.WHY.HOW to be valid
09:02 RabidGravy I have no idea what it would do but I think it should be made to happen
09:02 llfourn m: say .WHO.WHAT.WHERE when .WHY.HOW
09:02 camelia rakudo-moar 4a7eaa: ( no output )
09:02 * llfourn coolface
09:05 llfourn WHEN could store the epoch of when the object was created
09:06 llfourn microsecond epoch
09:08 moritz m: say 1.?WHO.?WHAT.?WHERE.?WHEN.?WHY.?HOW
09:08 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bLiZzf0nY5␤Cannot use .? on a non-identifier method call␤at /tmp/bLiZzf0nY5:1␤------> 3say 1.?WHO7⏏5.?WHAT.?WHERE.?WHEN.?WHY.?HOW␤    expecting any of:␤        method arguments␤»
09:09 moritz LTA error. I don't see where I used a non-identifier method call.
09:09 llfourn yeah :\
09:13 AlexDani` joined #perl6
09:19 jjido joined #perl6
09:19 Xliff Can you alter the access/mod/changed time of a file in perl6?
09:26 Xliff <teatime> I really wanted .WHO.WHAT.WHERE.WHEN.WHY.HOW to be valid
09:26 Xliff Ooh! I second that.
09:27 teatime lol
09:36 AlexDani` joined #perl6
09:47 timotimo .WHEN should obviously always return "teatime"
09:47 teatime !
09:47 teatime if that were my perl6 legacy
09:47 teatime I would be so ashamed
09:47 timotimo :D
09:57 RabidGravy Xliff, sure, nativecall to utime
09:57 RabidGravy or "however you might do that on windows"
09:58 timotimo why not just
09:58 timotimo m: say time
09:58 camelia rakudo-moar 4a7eaa: OUTPUT«1464688716␤»
09:58 timotimo er, i mean
09:58 timotimo m: say now
09:58 camelia rakudo-moar 4a7eaa: OUTPUT«Instant:1464688756.759042␤»
10:00 RabidGravy er
10:16 kid51 joined #perl6
10:21 kaare_ joined #perl6
10:36 RabidGravy boo! a week without me adding anything to the ecosystem
10:36 eone joined #perl6
10:36 RabidGravy may just have to make more than one this week to make up for it
10:37 pierre_ joined #perl6
10:41 pmurias joined #perl6
10:42 pmurias Xliff: you have seen the $*dynamic_variables? If you want to pass data from the caller without using parameters they are the accepted solution
10:45 azawawi joined #perl6
10:45 azawawi https://gist.github.com/azawawi/a2349d4f22d8a33a3c52d69a04637f73  # GTK::Simple + Scintilla editor :)
10:47 rurban joined #perl6
10:48 Xliff pmurias++ # Thanks!
10:49 Xliff RabidGravy, how about an OAuth2 module? # =)
10:49 azawawi http://pasteboard.co/1kBerSBh.png # GTK::Simple + Scintilla editor component screenshot :)
10:51 Xliff azawawi, why not use NativeCall for everything, including what you have in widget.c?
10:51 Xliff Still, though.... nifty!
10:52 azawawi Xliff: because scintilla is not dynamically linked
10:52 Xliff Ahh!
10:53 azawawi https://sourceforge.net/p/scintilla/feature-requests/555/
10:53 RabidGravy don't you just hate that
10:53 RabidGravy looks nice
10:55 azawawi farabi7 gtk editor :)
10:57 RabidGravy if I get a bit of time today I may implement menus and or toolbars for GTK::Simple
10:58 RabidGravy the only thing stopping me is the tedium of typing in all the required subs and methods
10:59 * azawawi dreams of an all Perl 6 GTK editor :)
11:03 rurban left #perl6
11:25 berov joined #perl6
11:26 * RabidGravy wonders why he hasn't got something for XDG_RUNTIME_DIR in XDG::BaseDirectory
11:26 RabidGravy better make that happen
11:36 kalkin-_ joined #perl6
11:36 kalkin-_ hi
11:38 kalkin- How does the whole Pod::To::Foo system works? Is it documented somewhere? I would like to patch Pod::To::Markdown to support some additional options, like --code-block=fenced --code-lang=perl6
11:39 aries_liuxueyang joined #perl6
11:43 vytas joined #perl6
11:46 Actualeyes joined #perl6
11:52 pmurias how is padre (the Perl 5 editor) doing nowdays?
11:52 kalkin- Also is there a way to mark multiple code lines in Pod as a specific programming language similar to GH Markdown style of ```foo?
11:52 kalkin- Or is it always assumed it's perl6 code in a code block?
11:55 tomboy64 joined #perl6
11:55 Deep_Thought joined #perl6
12:02 ecocode joined #perl6
12:03 RabidGravy kalkin-, in answer to your last question, it 's like "=begin code :whatever"  then your Pod::Block::Code object will have a .configs<whatever>
12:04 RabidGravy your first question, I'd start with the implemented Pod::To:: modules and http://design.perl6.org/S26.html and have a fiddle because that stuff isn't really all that well documented
12:08 kalkin- RabidGravy: I want just to patch Pod::To::Markdown and not write one from scratch. I just want to know if it's possible to obtain any other options?
12:08 Ajay joined #perl6
12:08 Ajay Hi
12:08 kalkin- I basically want to do perl6 --doc=Markdown --my-option1=asd --my-option2=Bar lib/Foo.pm6
12:09 kalkin- RabidGravy: The first answer to my second question ☺ is exactly what i searched thanks
12:09 Ajay I am working on Perl 5
12:13 itaipu joined #perl6
12:14 RabidGravy kalkin-, I'd say no, you don't get any additional options, the Pod::To:: thing just calls a method render() in the appropriate package with the $=pod object or its equivalent
12:15 RabidGravy but as I said it isn't well documented so you should examine the source of the module and experiment
12:15 colomon joined #perl6
12:21 cognominal joined #perl6
12:22 sjn \o
12:22 sjn quick question; what's the situation with Duration and other date calc tools today?
12:23 sjn the docs seem a bit lacking
12:23 pmurias joined #perl6
12:24 RabidGravy I'm not quite sure what you mean by "the situation"
12:27 moritz sjn: they exist
12:29 moritz they are also meant to be used as the base of more fancy libraries, should a more fancy interface be necessary
12:29 * sjn tries to get some other information than seconds out of a Duration object
12:29 RabidGravy it has fractions
12:30 teatime yeah, it's fractional seconds
12:30 teatime Rat internally
12:30 teatime although it will often get cast to a Num rather than a Rat in operations
12:31 * sjn is also trying to create a Duration object from a string (eg. "01:14", which is hh:mm)
12:31 teatime the docs including S02 and S32 are pretty complete and only contain minimal NYI fantasies, iirc
12:31 Xliff <RabidGravy> the only thing stopping me is the tedium of typing in all the required subs and methods
12:32 * Xliff puts "- Code a "DOITFORME" button for RabidGravy" on his TODO.
12:32 huggable joined #perl6
12:32 pierre_ joined #perl6
12:32 RabidGravy well I was actually putting off the OAuth2 thing because someone else said they were looking at it
12:33 Xliff Huh! Missed that.
12:33 RabidGravy there is a partial (just enough to work) implementation in WebService::Soundcloud
12:33 RabidGravy and if all else fails I could extract that
12:34 Xliff :-o
12:34 Xliff RabidGravy++
12:35 teatime sjn: say DateTime.new("1999-01-01T00:00:00Z").Instant.to-posix  # (915148800 False)
12:35 teatime I think this is the only thing that is built-in.
12:36 RabidGravy m: my $a = "01:04";  my ($hours, $mins) = $a.split(":"); say Duration.new(($hours * 3600) + ($mins * 60))
12:36 camelia rakudo-moar 4a7eaa: OUTPUT«3840␤»
12:37 RabidGravy more succinct techniques may be available
12:37 sjn teatime: ok
12:37 teatime oh, right, he wanted a duration
12:38 RabidGravy I may even have some code that does this for ISO or W3c durations knocking around
12:39 RabidGravy and the other way round it's some polymod gubbins, which I think is used as an example somewhere
12:40 brrt joined #perl6
12:41 andreoss joined #perl6
12:41 kalkin- RabidGravyL: thanks
12:45 andreoss is p6doc(or any other doc reading tool) going to be a part of official release?
12:46 RabidGravy kalkin-, on the question of the args, you can access the @*ARGS in the render() method as long as they are *after* the filename
12:47 RabidGravy andreoss, inasmuch as it's in Rakudo Star then yes
12:50 xinming joined #perl6
12:51 andreoss are there going to be perl6intro, perl6re, perl6var and so on?
12:51 [Coke] the current goal is to get the docs on the website.
12:52 moritz andreoss: there's http://doc.perl6.org/language/variables already (covering perl6var)
12:52 [Coke] and there will be analogs to those, but don't expect them to be named identically to the p5 variants.
12:52 moritz and http://doc.perl6.org/language/regexes for perl6re
12:52 moritz intro is... difficult
12:53 andreoss i know that
12:53 stmuk "p6doc -l" lists at the command line
12:53 RabidGravy and as for actual manpages, well, I did look at a troff generator for five minutes, realised how much I had forgotten about troff and instantly dropped the idea
12:55 andreoss stmuk: so basically there will be no correspondence between perldoc(Perl 5) and p6doc(Perl 6)
12:56 stmuk andreoss: I don't think that's ever been a goal
12:56 moritz not in the names of the documents, no
12:57 stmuk andreoss: I suppose p6doc could contain a simple mapping table and make suggestions based on original perl doc names .. not sure if there is much correspondence possible
12:58 stmuk the original perl5 doc pages were quite confusingly named anyway IMO
12:58 literal does Perl 6 have a golfier way of writing this? "if my $foo = ... { ... = $foo }" I was thinking something like "$foo = $_ given $bla" but of course given does not require truthiness
12:58 RabidGravy and have grown organically over a very long time
12:58 perlpilot stmuk: perlboot -  Give Perl the boot!
12:58 perlpilot stmuk: perltoot - Toot your own horn
12:58 stmuk there are some existing "5to6" pages like "5to6-perlfunc" as well
12:59 stmuk perlpilot: :)
12:59 perlpilot literal: perhaps you want "with"?
13:00 perlpilot not sure if there's a postfix form of it though.
13:00 andreoss m: given my $foo = "hi" { say $foo }
13:00 camelia rakudo-moar 4a7eaa: OUTPUT«hi␤»
13:01 andreoss m: with my $foo = "hi" { say $foo };
13:01 camelia rakudo-moar 4a7eaa: OUTPUT«hi␤»
13:01 [Coke] did irclog ever deal with camelia color codes?
13:02 tomboy64 joined #perl6
13:02 [Coke] http://irclog.perlgeek.de/perl6/2016-05-31#i_12577302 looks wonky, e.g.
13:06 moritz it did, but never really well
13:06 literal perlpilot: do you know where I might find the docs for 'with' ?
13:06 prammer joined #perl6
13:08 andreoss literal: http://doc.perl6.org/syntax/with%20orwith%20without
13:08 perlpilot literal: http://doc.perl6.org/syntax/with%20orwith%20without
13:09 cdg joined #perl6
13:10 kalkin- RabidGravy: hmm that sounds better.
13:10 kalkin- RabidGravy: I probably also could just read out an env variable
13:11 teatime RabidGravy: hrm, I think pandoc will output manpages
13:11 teatime might make it easy enough to auto-gen them from whatever other-format docs you have
13:11 RabidGravy kalkin-, "class Pod::To::Stuff { method render($pod) { say  $pod, @*ARGS; } }" will show you what it gets
13:12 RabidGravy teatime, I have no motivation to do it except that someone else asked - but a Pod::To::Man would be nice for packagers
13:12 Walex joined #perl6
13:13 teatime I would feel bad making pandoc a prereq for such a module.
13:13 [Coke] literal: additionally, http://docs.perl6.org - enter "with" in the search box.
13:13 teatime but if I had a personal need I would use it in a heartbeat.
13:13 [Coke] (will get you to the same spot if you pick the right item from the list)
13:14 awwaiid teatime: such a good tool should be embraced as a dependency :)
13:15 teatime we were actually looking at how to interface with pandoc from perl6 a week or two ago.
13:15 awwaiid teatime: though I suppose re-implementing a SMALL subset of it's features would be ok
13:15 awwaiid but I hate all the re-implementing in this world
13:15 teatime it looks like the best/easiest way would just be a wrapper around the clui tool
13:15 awwaiid (except for educational, exploratory, creative type re-implementations of course)
13:15 perlpilot awwaiid: Just think of "re-implementing" as "refactoring" under another name  :)
13:15 teatime which, would be fine and easy enough
13:16 literal [Coke]: ah, cool, didn't know about this
13:16 awwaiid perlpilot++ # enlightenment!
13:16 RabidGravy awaiid, you keep saying this, but I still haven't seen the installer implementation that can express external dependencies
13:16 literal much better than trying google :)
13:16 awwaiid perlpilot: I also tell everyone that all "refactoring" is a larger or lesser degree of "rewrite" ... so I guess that's just the inverse!
13:17 awwaiid RabidGravy: hm. good point. Though I have been looking at Nix lately :)
13:18 Walex p6: sub postfix<!> (Int $n) { [*] 2..$N; }
13:18 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> 3sub postfix7⏏5<!> (Int $n) { [*] 2..$N; }␤    expecting any of:␤        new name to be defined␤»
13:18 RabidGravy infact let's just scrap perl 6, because everything it does can be done with assembler
13:18 awwaiid Walex: needs more colons
13:18 awwaiid m: sub postfix:<!> (Int $n) { [*] 2..$N; } ; say 5!
13:18 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ExLp5KQ1GQ␤Variable '$N' is not declared. Did you mean '$n'?␤at /tmp/ExLp5KQ1GQ:1␤------> 3sub postfix:<!> (Int $n) { [*] 2..7⏏5$N; } ; say 5!␤»
13:18 awwaiid m: sub postfix:<!> (Int $n) { [*] 2..$n; } ; say 5!
13:18 camelia rakudo-moar 4a7eaa: OUTPUT«120␤»
13:19 Walex ahhhh not seen in the example my font had the color too small
13:19 awwaiid RabidGravy: that is definitely not what I advocate in any way shape or form!
13:19 RabidGravy but the logical extension thereof
13:20 Walex So it turns out that Perl6 is a descendant of Algol 68. Amusing.
13:21 awwaiid RabidGravy: not at all. I want the implementation of a thing to be done once, and ideally in whatever is the best (best might "first") way, and then for you to be able to call that from wherever. Still I think your first thing about being able to do it with dep-management and such is a nightmare and I should keep working on that.
13:22 RabidGravy quite, so I (arbitrarily) declare assembly language the *best* way of doing programming
13:22 awwaiid haha
13:22 awwaiid How about JVM?
13:22 awwaiid Though I've only written very very small amount of JVM bytecode
13:22 RabidGravy eugh
13:22 teatime awwaiid: that's just portable assembly.
13:22 teatime so, RabidGravy-approved.
13:22 RabidGravy :)
13:23 Walex silly discussion. Only Turing Machines are fully formally proven to be computationally complete, so we should just build those for safety. :-)
13:23 awwaiid I want a beautiful snowflake of languages all dancing happily together
13:23 * Walex worries a bit about the weight of a turing machine, it might collapse in a black hole
13:23 teatime maybe the ultimate purpose of evolution and the universe is to create the best, perfect programming language.
13:23 teatime which will then be used to implement universe 2.0
13:23 RabidGravy so I should delete all the modules on the ecosystem, because clearly someone has already done it "better", okay, just on it
13:25 perlpilot awwaiid: https://en.wikipedia.org/wiki/Ise_Grand_Shrine  ponder how that relates to "implementing something once"  :)
13:25 Walex p6: sub postfix:<!> (Int $n) { return ($n == 2) ?? 2 !! $n * ($n-1)!; }; 7!
13:25 camelia rakudo-moar 4a7eaa: ( no output )
13:25 Walex p6: sub postfix:<!> (Int $n) { return ($n == 2) ?? 2 !! $n * ($n-1)!; }; say 7!
13:25 camelia rakudo-moar 4a7eaa: OUTPUT«5040␤»
13:25 skids joined #perl6
13:25 * awwaiid meditates
13:26 andreoss p6: sub postfix:<!> (Int $n) { return ($n == 2) ?? 2 !! $n * ($n-1)!; }; say 1!
13:26 camelia rakudo-moar 4a7eaa: OUTPUT«Memory allocation failed; could not allocate 114896 bytes␤»
13:26 Walex "implementing something once" vs "there is more than one way to do it", interesting discussion
13:27 Walex :-)
13:28 teatime well, code re-use obviously has value, but competing implementations also have undeniable value
13:28 teatime so may I suggest, as usual, the middle path
13:28 awwaiid indeed
13:29 Walex What about Perl6 for numerical analysis as compared to NumPy+Python? Perl5 has a nice compact native-float-array module, anything similar in Perl6?
13:31 andreoss left #perl6
13:31 darutoko- joined #perl6
13:32 perlpilot Walex: not yet.
13:32 [Coke] support for native storage is built in to Perl 6, but I don't think it's been optimized for speed yet. let me see if I can find jnthn's announcement...
13:32 brrt not soon, if i'm very, very honest
13:33 perlpilot Walex: You might be able to use Inline::Perl5 + PDL, but I've never tried it.
13:33 brrt if you want to do that, you want fast linear algebra routines. we have native storage, we have a jit to make such routines go fast, we have autothreading hints etc
13:33 [Coke] ah. I'm misremembering the announcement: https://6guts.wordpress.com/2015/11/21/what-one-christmas-elf-has-been-up-to/ (look for "shaped arrays")
13:33 awwaiid Walex: also you could try Inline::Python
13:34 brrt but..... it will take a while before this all comes together, and in the meantime, numpy is here to stay
13:34 perlpilot Walex: well ... I did try it once, but Inline::Perl5 was very very new and it didn't work out well
13:34 brrt my 'systems' view says this may never happen because the necessity just isn't there
13:34 perlawhirl joined #perl6
13:35 brrt because python already has numpy, and all the scientific world uses that
13:35 brrt if they don't use numpy, they'd sooner go for FORTRAN than for perl6
13:35 Walex I have some bionformatics users, and Perl used to be big in bioinformatics, and currently they mostly use R unfortunately.
13:35 brrt i know someone whose favorite language was, in fact, FORTRAN. intelligent person, too
13:36 brrt R is a fine language, if you can cope with its evils
13:36 RabidGravy I worked with a GIS once that was mostly written in FORTRAN
13:36 RabidGravy only twenty years ago too
13:36 perlpilot brrt: The scientific organizations I used to deal with in the federal government were moving away from fortran and towards java.  Which I still find quite weird.
13:36 Walex one of my colleagues says that R makes it difficult for its users to think in terms of structured data, just arrays, arrays
13:37 brrt that is bizarre..
13:37 brrt java
13:37 brrt Walex: and how does this differ from, say, numpy?
13:37 Walex A french guy wrote an amazingly good *full* ALGOL 68 compiler by himself in 3 year in FORTRAN VI.
13:38 brrt the object-oriented pointer-chasing camp sometimes forgets that a lot of work is being done by array-munging in FORTRAN/Numpy/R
13:38 Walex brrt: well, with Perl+native float arrays they have perl, and structures, and a lot of other stuff
13:38 awwaiid Walex: nevermind, Inline::Python has code-rotted. I was going to whip up a quick numpy example, but fail.
13:39 Walex brrt: the idea is that moving them from R to Python+NumPy would be nice, with a nice interactive environment, but Perl/Perl6 of course would be much nicer.
13:39 brrt R has a nice interactive environment?
13:39 DrForr What I saw at OSCON looked a bit clunky, but interactive at least.
13:40 brrt anyway, i'm coming off perhaps a bit dismissive or grumpy
13:40 awwaiid Increasingly Jupyter is wrapping more langs
13:40 brrt i don't mean to be :-)
13:40 brrt i think scientific perl6 is a great idea
13:40 brrt i just don't see it happening in the short term
13:41 pmurias brrt: the performance stuff needed for scientific perl6 seems like something that will need to be implemented for other things
13:42 pmurias brrt: so once we have it, it should be matter of someone making a numpy equivalent
13:42 perlpilot brrt: As soon as enough people try to port their PDL programs to Perl 6, it'll happen  :)
13:42 Xliff If I want to get an attribute from an object, but I don't know what that will be until runtime, how would I do that?
13:43 [Coke] m: say "\r\n" eq "\r"
13:43 camelia rakudo-moar 4a7eaa: OUTPUT«False␤»
13:43 [Coke] m: say "\r\n".uninames; say "\r".uninames
13:43 camelia rakudo-moar 4a7eaa: OUTPUT«(CARRIAGE RETURN (CR) LINE FEED (LF))␤(CARRIAGE RETURN (CR))␤»
13:43 RabidGravy yeah, even the dumbest of DSP stuff is unfeasibly slow, I mean I think we got it to generate a sine wave just fast enough to feed a sound card in real time
13:43 RabidGravy but doing nothing else at the same time
13:44 brrt agreed with all that...
13:44 brrt also not my point
13:44 brrt my point is: who's going to make scientific perl6, if we have numpy/R/fortran
13:45 DrForr Who's going to make perl if we already have Python? Same question :)
13:45 brrt not really
13:45 RabidGravy yeah, I'd say that if it's feasible they will come
13:45 brrt i hope
13:45 brrt :-)
13:46 kalkin- I want to have access to some subroutines in my tests, but don't want to export it. Is this possible?
13:46 kalkin- something like javas protected
13:46 jjido joined #perl6
13:47 perlpilot kalkin-: so ... don't export them?
13:47 RabidGravy well you can make them "our" scoped and access them by fully qualified names,  have a "secret" export tag that isn't the default
13:47 perlpilot kalkin-: oh ... maybe you want to use "our sub foo { }"
13:47 RabidGravy make a wrapper
13:47 * perlpilot is slow this morning
13:47 RabidGravy or y'know, rethink how the tests work
13:47 perlpilot RabidGravy++
13:50 Xliff m: class A { has $.a; submethod BUILD { $!a = 42 } }; my $aref = "$.a"; say A.new.$aref
13:50 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SjZbbwncUB␤Variable $.a used where no 'self' is available␤at /tmp/SjZbbwncUB:1␤------> 3od BUILD { $!a = 42 } }; my $aref = "$.a7⏏5"; say A.new.$aref␤    expecting any of:␤        double quotes…»
13:50 kalkin- our is the solution, I need.
13:51 Xliff m: class A { has $.a; submethod BUILD { $!a = 42 } }; my $aref = "\$.a"; say A.new.$aref
13:51 camelia rakudo-moar 4a7eaa: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤  in block <unit> at /tmp/K_PKNHeDys line 1␤␤»
13:52 Xliff m: class A { has $.a; submethod BUILD { $!a = 42 } }; my $aref = "a"; say A.new.$aref
13:52 camelia rakudo-moar 4a7eaa: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤  in block <unit> at /tmp/z2DRXIPLT8 line 1␤␤»
13:53 jnthn Xliff: A.new."$aref"() if $aref is a name
13:55 Xliff jnthn! Speak of the devil. I just found http://www.jnthn.net/papers/2015-fosdem-static-dynamic.pdf
13:55 Xliff Was reading.
13:55 pmurias_ joined #perl6
13:56 Xliff So... how can I get an attribute from an object if I don't know the attribute name at runtime?
13:56 Xliff Assuming it is public.
13:56 rindolf joined #perl6
13:57 gfldex m: class A { has $.b }; A.new.^attributes.say;
13:57 camelia rakudo-moar 4a7eaa: OUTPUT«(Mu $!b)␤»
13:57 perlpilot m:  class A { has $.a; submethod BUILD { $!a = 42 } }; A.^attributes.say
13:57 camelia rakudo-moar 4a7eaa: OUTPUT«(Mu $!a)␤»
13:57 perlpilot even cutting and pasting I'm slow
13:57 gfldex m: class A { has $.b }; A.new.^attributes.WHAT.say;
13:57 camelia rakudo-moar 4a7eaa: OUTPUT«(List)␤»
13:57 perlpilot Must. Need. Caffeine.
13:58 gfldex i'm enpowered by tea. You can not beat me!
13:58 * teatime bows.
13:58 gfldex :D
13:59 jnthn m: class A { has $.b }; my $obj = A.new(b => 42); say $obj.^attributes[0].get_value($obj)
13:59 camelia rakudo-moar 4a7eaa: OUTPUT«42␤»
13:59 Xliff LOL
13:59 gfldex see http://doc.perl6.org/type/Attribute
13:59 Xliff jnthn: Yikes!
14:00 Xliff jnthn, OK. I follow that. It just makes my head hurt.
14:00 Xliff I did ask for that, though! =)
14:01 Xliff Um. Allow me to rephrase the question though, because like perlpilot I need caffeine and made a mistake!
14:01 Xliff So... how can I get an attribute from an object if I don't know the attribute name UNTIL runtime?
14:01 perlpilot jnthn: Does $obj.^attributes have a guaranteed order? (I would guess declaration order)
14:01 [Coke] Xliff: his exmple doesn't get by name
14:01 Xliff [Coke], I know.
14:01 jnthn Xliff: Where does the name come from?
14:02 [Coke] you can iterate over them an inspect the names.
14:02 Xliff That was the mistake I was talking about.
14:02 [Coke] m: class A { has $.b }; my $obj = A.new(b => 42); say $obj.^attributes[0].perl;
14:02 camelia rakudo-moar 4a7eaa: OUTPUT«Attribute.new␤»
14:02 jnthn m: class A { has $.b }; my $obj = A.new(b => 42); say $obj.^attributes[0].name
14:02 camelia rakudo-moar 4a7eaa: OUTPUT«$!b␤»
14:02 gfldex m: class A { has $.b }; A.new."b"().say;
14:02 camelia rakudo-moar 4a7eaa: OUTPUT«(Any)␤»
14:02 jnthn You can filter on that for example
14:02 llfourn m: class A { has $.b }; my $obj = A.new(b => 42); $obj.^attributes.first(*.name eq 'b').say
14:02 camelia rakudo-moar 4a7eaa: OUTPUT«Nil␤»
14:03 llfourn m: class A { has $.b }; my $obj = A.new(b => 42); $obj.^attributes.first(*.name eq '$.b').say
14:03 camelia rakudo-moar 4a7eaa: OUTPUT«Nil␤»
14:03 [Coke] I think there's a ticket about giving attributes nicer perl & gist output.
14:03 llfourn m: class A { has $.b }; my $obj = A.new(b => 42); $obj.^attributes.first(*.name eq '$!b').say
14:03 camelia rakudo-moar 4a7eaa: OUTPUT«Mu $!b␤»
14:03 gfldex m: class A { has $.b }; my $name = b; A.new."$name"().say; # are you asking for this?
14:03 camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9VepBaM0zH␤Undeclared routine:␤    b used at line 1␤␤»
14:03 Xliff jnthn++: OK. That works for me.
14:04 gfldex m: class A { has $.b }; my $name = 'b'; A.new."$name"().say;
14:04 camelia rakudo-moar 4a7eaa: OUTPUT«(Any)␤»
14:04 kaare__ joined #perl6
14:05 Xliff HAH!
14:05 Xliff m: class A { has $.b }; my $name = 'b'; A.new(b => 42)."$name"().say; # gfldex++ -- Why yes! I was!
14:05 camelia rakudo-moar 4a7eaa: OUTPUT«42␤»
14:05 llfourn gfldex++ #actually understanding the question
14:05 gfldex i'm just guessing :)
14:06 Xliff I tried to do that earlier and didn't roll my syntactic check.
14:06 perlpilot I'm pretty sure that was the first thing that jnthn said
14:06 Xliff And apparently my comprehension check, to! # perlpilot++
14:06 Xliff s/to/too/
14:06 Xliff Yeah. It's time for chai.
14:11 perlawhirl hi perlers... i'm taking user input via prompt & want to coerce to an Int. it'd be nice if i could do > $i = prompt(':').Int or next;
14:11 perlawhirl if i enter 'a' into the prompt it's fine, but 'aa' kills it
14:11 perlawhirl why doesn't 'aa' short circuit ?
14:12 perlpilot perlawhirl: I don't understand.
14:12 perlawhirl m: my $i = 'a'.Int or do { say "Nope" }
14:12 camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
14:12 perlawhirl m: my $i = 'aa'.Int or do { say "Nope" }
14:12 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5aa' (indicated by ⏏)␤  in block <unit> at /tmp/k5tFRmyLVQ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/k5tFRmyLVQ line 1␤␤»
14:12 perlpilot ah
14:12 perlawhirl short-circuit 'or' doesn't work with 'aa'
14:13 perlawhirl i can wrap it in a try {}, that works... but just wondering why it doesn't DWIM
14:13 perlpilot I think that's a bug
14:13 jnthn m: my $i = 'aa'.Int || do { say "Nope" }
14:13 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5aa' (indicated by ⏏)␤  in block <unit> at /tmp/j_UzopWxKI line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/j_UzopWxKI line 1␤␤»
14:13 perlawhirl m: my $i = try { 'aa'.Int } or do { say "Nope" }
14:13 camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
14:14 jnthn m: say 'aa'.Int.WHAT
14:14 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5aa' (indicated by ⏏)␤  in block <unit> at /tmp/1VPWqAMI7z line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/1VPWqAMI7z line 1␤␤»
14:14 teatime m: my $i = try { 'a'.Int } or do { say "Nope" }
14:14 camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
14:14 jnthn m: say 'aa'.Numeric.WHAT
14:14 camelia rakudo-moar 4a7eaa: OUTPUT«(Failure)␤»
14:14 jnthn Curious
14:14 perlpilot m: 'a'.Int;
14:14 perlawhirl jnthn: 'aa'.Numeric doesn't exhibit the same behaivior
14:14 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot coerce NaN to an Int␤  in block <unit> at /tmp/XMdcwuKsAs line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/XMdcwuKsAs line 1␤␤»
14:14 perlpilot That doesn't look right
14:14 perlawhirl tho i realise Numeric is a Role and Int is a type
14:15 Xliff m: 'z'.Int
14:15 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot coerce NaN to an Int␤  in block <unit> at /tmp/GHY4DdMgNv line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/GHY4DdMgNv line 1␤␤»
14:15 Xliff m: 'aa'.Int
14:15 camelia rakudo-moar 4a7eaa: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5aa' (indicated by ⏏)␤  in block <unit> at /tmp/XtRCTJeefe line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/XtRCTJeefe line 1␤␤»
14:15 Xliff Might be assuming that you meant 0xaa and is trying to convey that.
14:16 perlpilot perlawhirl: in any case, I think you should be using try
14:16 perlawhirl Xliff: perhaps, but i feel like the 'or' should still short-cicuirt rather than your app just dies
14:17 perlawhirl yeah i am using try block for now, just seems... off. wanted to bring it up just incase it was unintended
14:19 gregf_ m: class Foo { has Int $.a; has Str $.b; }; my $f = Foo.new;my $arr = [100, "foo", [1,2,3,4], { one => 1, two => 2 }]; my $i = 1; Foo.^attributes.map: { $_.set_value($f,$arr[$i+=1]) }; say $f;
14:19 camelia rakudo-moar 4a7eaa: OUTPUT«Foo.new(a => $[1, 2, 3, 4], b => ${:one(1), :two(2)})␤»
14:19 gregf_ # was expecting that to fail typecheck :|
14:21 dalek doc: 0d55631 | (Wenzel P. P. Peppmeyer)++ | doc/Language/objects.pod:
14:21 dalek doc: put C<.""> in a findable spot
14:21 dalek doc: Xliff++ for asking the right question the wrong way
14:21 dalek doc: review: https://github.com/perl6/doc/commit/0d55631a24
14:22 literal is there an idiomatic way of combining these two? "for @a_of_h -> %hash {" and the subsequent "my ($k, $v) = %hash;"
14:22 literal er, sorry, that made no sense
14:23 literal I meant "for @a_of_h -> %hash {" and the subsequent "my ($k, $v) = %hash<foo bar>;"
14:23 literal when I only care about two of the keys
14:23 gfldex m: my %h = a => 1; for %h.kv -> $k, $v { say "$k => $v" }
14:23 camelia rakudo-moar 4a7eaa: OUTPUT«a => 1␤»
14:23 literal $v1 and $v2 being more appropriate
14:32 Walex gfldex: does not convert %h to a list "lazily" or all at once?
14:33 Walex gfldex: does '.kv' convert %h to a list "lazily" or all at once?
14:33 RabidGravy I have an unhealthy urge to make something for http://dev.midi.org/dtds/MIDINameDocument10.dtd.html
14:33 RabidGravy strangely I have a perceived need for it
14:33 azawawi joined #perl6
14:34 llfourn isn't it a bug that "call_with_args" shows up in backtraces?
14:34 azawawi sleep 10 * YEARS; use Modern::Perl6; # :)
14:34 azawawi hi
14:35 gfldex Walex: it's created an Interator so it should be lazy see https://github.com/rakudo/rakudo/blob/nom/src/core/Hash.pm#L427
14:37 kaare__ joined #perl6
14:38 [Coke] might be worth bisecting the numeric conversion fail.
14:43 Walex gfldex: ah interesting, the core lib worth skimming over.
14:44 * Walex already does not like some of the style and technique, but then he is very fussy :-)
14:45 Walex uhm, admittedly mine was a bit a trick question: using iterators/lazy lists to do that kind of stuff is a but overkill, very Pythnesque in some way :-).
14:45 dalek specs: 9a8149f | (Zoffix Znet)++ | html/style.css:
14:45 dalek specs: Match historical message style with that of auto-generated subpages
14:45 dalek specs: review: https://github.com/perl6/specs/commit/9a8149f939
14:46 pmurias [Coke]: I haven't yet packaged up nqp-js and fix the rakudo-js build process yet, I still have to think over how to sanely split thing into node.js usable packages
14:46 Walex is 'Hash' class entirely implemented in "user" code in Perl6? Not a primitive like '%'?
14:47 jjido joined #perl6
14:47 [Coke] Walex: https://github.com/rakudo/rakudo/blob/nom/src/core/Hash.pm
14:48 Walex [Coke]: I was just looking at that, and I wonder if I am missing something.
14:48 [Coke] it's not quite all Perl 6 code since it's needed early in the core.
14:49 Walex [Coke]: but that 'Hash.pm' seems pretty complete...
14:49 Walex Perl6 looks more and more like a derivative of ALGOL 68
14:49 Walex :-)
14:50 [Coke] Sure. A lot of Perl 6 is written in Perl 6. (and barring that, NQP)
14:50 mst Walex: well, it's attempting to be a derivative of everything good that ever existed at once, so :D
14:51 pmurias Walex: aren't most currently used languages ALGOL 68 derivatives?
14:51 Walex [Coke]: ahhh so there is an 'nqp::Map' base runtime presumably part of the compiler. I need to read the implementation paper then :-)
14:51 [Coke] FYI, here's the bootstrap that comment refers to: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/BOOTSTRAP.nqp
14:51 [Coke] note that while that looks like Perl 6, it's NQP.
14:52 Walex pmurias: actually most scripting languages (Perl and Python) for example are thinly disguided alternative syntaxes for LISP 2.
14:52 kaare__ joined #perl6
14:52 Walex pmurias: I know that the idea that Perl 4/5 are just a syntax sugaring of LISP is an unpopular thesis, but it can be easily demonstrated.
14:53 * Walex wonders what was LarryW thinking :-)
14:53 mst Walex: well, everything is CLISPscript yes
14:53 mst Walex: though perl5 is more a lisp-6
14:53 geekosaur it's been claimed that every language is just syntax-changed lisp...
14:53 dalek doc: 93d791f | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
14:53 dalek doc: fix broken link
14:53 dalek doc: review: https://github.com/perl6/doc/commit/93d791fba3
14:53 dalek doc: f08dc9f | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
14:53 dalek doc: doc C<use soft;> and add .wrap example
14:53 dalek doc: review: https://github.com/perl6/doc/commit/f08dc9f149
14:54 Walex geekosaur: sort of, but the similarity of Python and perl 4/5 to LISP is very, very strong in my opinion
14:54 jast by that logic virtually all languages are lispy to some extent
14:55 geekosaur well, lisp *is* at its heart a thin wrapper over untyped lambda calculus
14:55 Walex list based, with property lists, atoms with multiple properties ("sigils" in perl 4/5), expression based, function-oriented, ...
14:55 Walex geekosaur: that is how it was intended, but it came out a bit different.
14:55 geekosaur although modern takes on it are dubiously thin
14:56 pmurias Walex: one could argue that it's not really lisp without the s-expresions ;)
14:57 Walex pmurias: I said LISP 2 :-)
14:58 ptolemarch joined #perl6
14:58 * Walex is trying to be sneaky as he is one of the few people to have read the LISP 2 manual :-)
14:58 Xliff Crap. I have to parse "2016-05-31 14:51:34". Can't use DateTime::Parse.
14:59 setty1 joined #perl6
15:00 * DrForr grumbles something about M-expressions and that he has that manual as well :)
15:00 RabidGravy Xliff, replace the space with a T and DateTime will do it fine by itself
15:00 Xliff O?
15:00 Xliff Nice!
15:01 perlpilot m: my @a = { foo => 1, bar => 4, baz => 14 }, { foo => 4, bar => 2 }, { foo => 8, bar => 6 };  for @a -> %h ( :$foo, :$bar, *% ) { say "$foo $bar" }
15:01 camelia rakudo-moar 4a7eaa: OUTPUT«1 4␤4 2␤8 6␤»
15:02 perlpilot Walex: Earlier you were asking about something like the above.   Is that helpful?
15:02 perlpilot (I just think that more people should know about unpacking hashes in signatures)
15:03 gfldex m: dd DateTime.new(|("2016-05-31 14:51:34".split(/'-'|':'|' '/)>>.Int)); # silly but works
15:03 camelia rakudo-moar 4a7eaa: OUTPUT«DateTime.new(2016,5,31,14,51,34)␤»
15:04 literal (<1 2 2>, <3 3 1>).map(&unique) <-- why does this do what I want but this doesn't? --> [<1 2 2>, <3 3 1>].map(&unique)
15:05 perlpilot literal: the second one only ever iterates once.
15:05 dalek specs: 3a3148d | (Zoffix Znet)++ | html/ (2 files):
15:05 dalek specs: Offset :target
15:05 dalek specs:
15:05 dalek specs: To ensure it"s first lines aren"t covered by historical message when visiting a direct link to section
15:05 dalek specs: review: https://github.com/perl6/specs/commit/3a3148d239
15:06 literal perlpilot: how come?
15:06 gfldex both [] and , create a list
15:07 kurahaupo joined #perl6
15:07 [Coke] one of those is an Array, I think.
15:07 [Coke] m: (<1 2 2>, <3 3 1>).WHAT.say; [<1 2 2>, <3 3 1>].WHAT.say
15:07 camelia rakudo-moar 4a7eaa: OUTPUT«(List)␤(Array)␤»
15:08 gfldex m: dd [<1 2 2>, <3 3 1>];
15:08 camelia rakudo-moar 4a7eaa: OUTPUT«[(IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(2, "2")), (IntStr.new(3, "3"), IntStr.new(3, "3"), IntStr.new(1, "1"))]␤»
15:08 gregf_ m: [<1 2 2>, <3 3 1>].map(*.unique)
15:08 camelia rakudo-moar 4a7eaa: ( no output )
15:12 xinming joined #perl6
15:16 azawawi http://pasteboard.co/1kSGJYZM.png  # Perl editor using Perl 6 GTK + Scintilla :)
15:18 * azawawi starts working on GTK::Scintilla :)
15:18 jjido joined #perl6
15:20 RabidGravy do it! do it!
15:22 khw joined #perl6
15:24 pat_js joined #perl6
15:25 ZoffixW joined #perl6
15:25 hoelzro o/ #perl6
15:25 ZoffixW Can someone with sudo perms on hack run passwd -l zoffix
15:25 ZoffixW Please :)
15:26 teatime gentlemen, I have an important question, that none of the people currently gathered round the screen can come up with a suitable answer for
15:26 teatime wth would a police cat do??  http://i.imgur.com/fRl1EVB.gif
15:26 teatime that would be, like, useful.
15:27 ZoffixW teatime, so... that question is only for gentlemen? :P
15:27 teatime heh, appologies.
15:27 gfldex mice usually don't care about property rights
15:31 perlpilot teatime: it would do the same thing as any other cat.
15:31 hoelzro what does one use the NFD and other NF* types for? I figured you might be able to do codepoint-based rather than grapheme-based regex stuff, but it turns out NFD and friends don't have a .subst method
15:31 * hoelzro is writing a blog post about the consequences of NFG he experienced using Perl 6 to process a Russian corpus
15:32 ZoffixW teatime, I don't see any mentions online about cats in police service. I suspect that gif is just a joke
15:33 ZoffixW hoelzro, FWIW I had to use NFCs for my Anguish parser: http://perl6.party/post/Anguish--Invisible-Programming-Language-and-Invisible-Data-Theft#theinterpreter
15:33 hoelzro ah, I see
15:34 hoelzro so if you use NF*, you have to do things at a much lower level?
15:34 teatime ZoffixW: yeah, someone pointed out that it was probably from a sketch show, and now I feel silly
15:35 ZoffixW .ask timotimo can you run `run passwd -l zoffix` on hack? That'll disable the password you've set up for me yesterday, so only the key works. Thanks.
15:35 teatime hoelzro: there are :codes :bytes :chars etc. adverbs for regex, but they are NYI
15:35 yoleaux ZoffixW: I'll pass your message to timotimo.
15:36 hoelzro teatime: ah, thanks for pointing that out!
15:37 timotimo thank you, yoleaux, i just did that.
15:37 yoleaux 15:35Z <ZoffixW> timotimo: can you run `run passwd -l zoffix` on hack? That'll disable the password you've set up for me yesterday, so only the key works. Thanks.
15:38 Walex perlpilot: ah thanks. someone else was asking about "hash iteration with comprehension" and I was a bit skeptical about using dynamic/lazy lists for that.
15:40 jjido joined #perl6
15:45 dalek ecosystem: 4d282cb | azawawi++ | META.list:
15:45 dalek ecosystem: Add GTK::Scintilla
15:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4d282cbda7
15:46 azawawi RabidGravy: https://github.com/azawawi/perl6-gtk-scintilla/blob/master/examples/01-hello-world.pl6 :)
15:46 azawawi RabidGravy: now to fix build issues
15:48 ssotka joined #perl6
15:50 RabidGravy why didn't you make SSM a method on $editor?
15:51 RabidGravy also you can just do $app.set-content($editor_ ;-)
15:51 azawawi on it
15:52 azawawi once i fix the build issues
15:53 RabidGravy oh you've so got to make an editor for Perl 6 in Perl 6
15:53 RabidGravy I might not use it but it would be sweet nonetheless
15:56 azawawi :)
15:57 rurban joined #perl6
16:04 jjido joined #perl6
16:05 kaare__ joined #perl6
16:10 skink joined #perl6
16:16 gregf_ m: say 100.Array
16:16 camelia rakudo-moar 4a7eaa: OUTPUT«[100]␤»
16:17 gregf_ m: sub postfix:<&> (Mu $s) { return $s.Array.map(*.uc); }; say <100,foo,<bar, baz, quux>>.&(*.&)
16:17 camelia rakudo-moar 4a7eaa: OUTPUT«Value of type List uselessly passed to val()  in block <unit> at /tmp/8KIbYmZe_t line 1␤(100,FOO,<BAR, BAZ, QUUX>)␤»
16:20 dogbert17 joined #perl6
16:21 skink Is there a way to read() a Buf[int16] instead of a Buf[uint8]? Or a simple way to convert the latter to the former?
16:24 Walex I am starting to think that my next favourite languages will be Perl6 and Rust...
16:32 itaipu joined #perl6
16:32 huggable joined #perl6
16:46 ZoffixW joined #perl6
16:47 ZoffixW Is there a way to search for stuff in ticket bodies in RT?
16:48 ZoffixW RT's interface always makes me want to buy matches and a jug of gasoline...
16:50 llfourn does google index RT?
16:52 ZoffixW Probably, but it's index is incomplete
16:52 ZoffixW *its
16:55 ZoffixW Seems the answer is "no." I see nothing but `subject` and a metric fuckton of useless fields even in the advanced interface, but no body.
16:56 acrussell joined #perl6
16:56 * ZoffixW adds a mental note to write an RT scraper and plop a decent interface on it
16:57 RabidGravy skink, no but it's read twice as many as you need, get two at a time in a map, shift the first by eight bits and add them
16:59 RabidGravy (or something like that)
17:05 azawawi RabidGravy: hmm
17:06 azawawi RabidGravy: https://github.com/azawawi/perl6-gtk-scintilla/commit/7cd4004594a311a351e71c73586d3b432e73f9bd :)
17:06 azawawi RabidGravy: should work on linux atm
17:07 RabidGravy cool
17:08 * azawawi watches https://travis-ci.org/azawawi/perl6-gtk-scintilla/jobs/134223812
17:13 skink RabidGravy, That appears to work, thanks
17:14 skink Now for my next trick, I need to get the contents of such a Buf to be the stdin for a process
17:14 skink run :in($buf) and :in($*OUT.write($buf)) don't seem to work
17:16 spider-mario joined #perl6
17:17 timotimo you'll have to write it into the proc::async after it's started
17:17 dalek doc: b78ed07 | (Jan-Olof Hendig)++ | doc/ (3 files):
17:17 dalek doc: A bunch of broken links fixed. AlexDaniel++ for running checklink on the doc site
17:17 dalek doc: review: https://github.com/perl6/doc/commit/b78ed076fb
17:19 azawawi RabidGravy: so now we're a step closer to a true Perl 6 editor :)
17:20 RabidGravy yay
17:20 RabidGravy azawawi++ # making stuff
17:20 mosh joined #perl6
17:20 ZoffixW :o a true Perl 6 editor :o
17:33 skink asyncwritebytes requires a native array of uint8 or int8
17:34 tony-o azawawi: so.. works?
17:37 tony-o actually, installing to find out
17:38 azawawi just committed sugar-free OO API :)
17:38 azawawi https://github.com/azawawi/perl6-gtk-scintilla/blob/master/examples/01-hello-world.pl6
17:39 ggoebel115 joined #perl6
17:39 azawawi https://travis-ci.org/azawawi/perl6-gtk-scintilla/jobs/134229139
17:39 tony-o ah, gtk::simple fails on osx
17:40 ptolemarch joined #perl6
17:40 azawawi brew update
17:41 azawawi brew install gtk+3
17:41 domidumont joined #perl6
17:42 azawawi jnthn++ # for building GTK::Simple::Widget https://github.com/azawawi/perl6-gtk-scintilla/blob/master/lib/GTK/Scintilla/Editor.pm6 :)
17:42 azawawi Perl6 implementation is just so elegant so far :)
17:50 tony-o azawawi: https://gist.github.com/tony-o/b03abf04a82c86895449ba54a7d9716b <- this is what i get from running that hello-world example
17:51 azawawi unfortunately i do not a macos box to test on it
17:52 azawawi i only use travis ci macos vm
17:52 brrt joined #perl6
17:52 tony-o ah
17:53 tony-o it's happening here: https://github.com/azawawi/perl6-gtk-scintilla/blob/master/examples/01-hello-world.pl6#L25
17:53 azawawi oops my bad
17:53 azawawi fixing it :)
17:53 tony-o one sec, i'll get ll-exception
17:54 tony-o ah, lmk if you want the ll-exception
17:58 skink timotimo, Seems like proc::async writing a Buf[int16] is troublesome
17:59 timotimo oh? hmm.
18:02 skink asyncwritebytes must be (u)int8. I have a int16_to_uint8s(int16) returning (uint8, uint8), but mapping with that returns a consumed Seq I can't write either
18:02 RabidGravy yeah you'd have to do the reverse to split a 16 bit into two 8s
18:03 [Coke] (rt scraper) no, use the CLI.
18:03 [Coke] which is what I use to drive the summaries I dump in perl6-dev occasionally, like:
18:04 [Coke] RT: 1308; CONC: 7; GLR: 6; JVM: 68; LHF: 1; LTA: 75; NYI: 28; OSX: 6; PERF: 15; POD: 3; PRECOMP: 3; RFC: 23; SEGV: 19; STAR: 1; TESTNEEDED: 29; TODO: 9; UNI: 5; WEIRD: 3
18:05 [Coke] https://rt.perl.org/rt-cli.html has the docs on getting it setup. https://github.com/coke/rt-six-help has that script.
18:05 azawawi tony-o: done :)
18:06 timotimo if you get a consumed seq, all you have to do is put a .cache in some place
18:06 azawawi tony-o: remember to zef uninstall GTK::Scintilla or panda --force GTK::Scintilla
18:06 ZoffixW [Coke], are you saying the cli has full-content search? Because my understanding is the rt instance needs to be configured to allow full-text search for it to be available
18:06 timotimo sometimes it's hard to find the right place, though, i suppose
18:06 [Coke] ZoffixW: full content search still needs to be enabled on the server, yes.
18:06 skink Ah, wait
18:06 [Coke] I have a ticket open for that, which is pending an upgrade.
18:07 ZoffixW Neat. [Coke]++
18:07 skink Buf.new($seq.cache.flat) works
18:07 azawawi https://github.com/azawawi/perl6-gtk-scintilla/blob/master/examples/01-hello-world.pl6   # feedback appreciated
18:08 itaipu joined #perl6
18:08 azawawi tony-o: 'panda install GTK::Scintilla' on travis ci MacOSX btw
18:09 azawawi tony-o: s/on/passed tests on/
18:10 [Coke] I'm pretty sure that with the CLI, you could grab a snapshot of each ticket in a friendlier way than doing a screen scrape, though.
18:10 [Coke] so even if you do it the hard way, it doesn't have to be -that- hard.
18:10 skink $fh.write(Buf[uint8].new($data.map(&int16_to_uint8s).cache.flat))
18:10 skink There's probably a better way to do that :)
18:11 azawawi http://pasteboard.co/1l4cpzJE.png  # Perl Editor in Perl 6 :)
18:12 tony-o what editor are you using the background azawawi ?
18:12 azawawi atom
18:12 ZoffixW :o
18:12 ZoffixW azawawi, you get syntax highlights even?
18:12 tony-o it doesn't look like vim
18:13 ZoffixW Oh, p5
18:13 azawawi https://atom.io/packages/atom-perl6-editor-tools
18:13 azawawi :)
18:13 ZoffixW Oh that reminds, me. That package kept nagging me that it couldn't find perl6 and I uninstalled it before I even got a chance to learn what it's all about :)
18:13 tony-o azawawi: now it dies immediately with: 2016-05-31 11:14:40.641 moar[22011:5293715] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
18:13 tony-o Native call expected return type with CPointer representation, but got a P6opaque
18:13 tony-o on line 25 :p
18:14 _mg_ joined #perl6
18:14 tony-o azawawi: disregard - didn't notice you changed hello-world
18:15 azawawi that's what happens when i eat sugar after days of not eating sugar :)
18:15 azawawi so much code
18:15 ZoffixW \o/
18:15 tony-o azawawi: ah, same dump with segmentation fault: 11 when i try to hit a key - but it opens an editor window now :)
18:15 azawawi cool
18:16 azawawi we're getting somewhere
18:16 azawawi the fun thing is that i do not have macos x box and it worked so far :)
18:17 tony-o what does the expected 'CPointer representation, but got a P6opaque' mean ?
18:18 tony-o i'm getting it with scintilla and was getting it when fiddling around with XML::Expat
18:18 azawawi scintilla 3.6.6 (latest) btw
18:19 kalkin- joined #perl6
18:19 shlomif joined #perl6
18:21 azawawi tony-o which line?
18:25 khw joined #perl6
18:27 mohae_ joined #perl6
18:28 tony-o azawawi: it isn't saying anymore, and -ll-exception isn't helping, just segfaults with the update
18:30 kalkin- joined #perl6
18:31 azawawi hmmm... Scintilla editing widget + Perl 6 supplies and parallelism = PadreGTK6+ :)
18:32 AlexDaniel joined #perl6
18:33 TimToady joined #perl6
18:34 AlexDaniel ZoffixW: by the way, if you just search for 404 in the output, you will see LOTS of blatantly wrong stuff
18:34 AlexDaniel ZoffixW: http://doc.perl6.org/type/NaN http://doc.perl6.org/type/Enumeration http://doc.perl6.org/routine/containers and so on
18:34 ZoffixW AlexDaniel, I'm not saying that ALL of them are false positives, just that the few I checked were.
18:35 ZoffixW And sure, there are 200+ markup errors on that page. They could be the cause
18:37 AlexDaniel ZoffixW: well, I am just a little bit pissed off by getting a response like “Are you sure you ran the program correctly?” for reporting hundreds of broken links…
18:37 AlexDaniel :)
18:40 RabidGravy to be honest, I looked at the issue, saw the thousands of unkonwn scheme  things, found they were spurious, didn't look any harder
18:40 brabo joined #perl6
18:41 ZoffixW same
18:47 * [Coke] fires up a local build of docs and markup validator SAC
18:48 ZoffixW There's something that generates nested links in the titles. That'll probably get rid of 90% of errors
18:48 [Coke] I'd like to see smaller, more closable tickets than that giant one, but I'll see if I can make some progress on it.
18:48 AlexDaniel ZoffixW: yes
18:48 AlexDaniel [Coke]: I don't see any problem. Just point your finger at random place of the output and try to fix it
18:49 [Coke] AlexDaniel: the problem is that one giant ticket is hard to close.
18:49 [Coke] that's all.
18:49 [Coke] I don't see nested <link>, ZoffixW
18:49 AlexDaniel [Coke]: sure, yes. But creating 100 tickets for every issue in the output is not a good idea too
18:49 ZoffixW [Coke], links as in <a>s
18:50 [Coke] AlexDaniel: of course.
18:50 AlexDaniel [Coke]: <li class="indexItem indexItem2"><a href="#routine_chop"><a href="/routine/chop#class_Str">routine chop</a></a></li>
18:51 AlexDaniel [Coke]: I will rerun the whole thing as we move forward, consider the output to be a todo list :)
18:55 hoelzro so, the post I'm writing is about how trying to use <:Combining_Mark> tripped me up when processing some text - is there actually a valid use for <:Combining_Mark>, since NFG essentially gets rid of combining chars?
18:56 hoelzro I mean, there'll be a use once the :codes adverbs is impl'd, but until then, I'm wondering if there should be a warning like "hey, that probably won't work" thoughts?
18:58 labster joined #perl6
18:58 jjido joined #perl6
19:00 [Coke] ugh. every time I want to work on docs, "make is slow". "maybe I'll work on optimizing it.." "optimizer explodes" "hey, let's pay bloodborne."
19:00 [Coke] *play
19:01 sno joined #perl6
19:02 hoelzro the optimizer tortures you, so you then play bloodborne, which also tortures you? =P
19:03 moritz hoelzro: I don't think <:Combining_Mark> makes sense in NFG strings, no
19:03 moritz m: say so 'ä' ~~ /<:Combining_Mark>/
19:03 camelia rakudo-moar 4a7eaa: OUTPUT«False␤»
19:03 hoelzro moritz: how would you feel about a warning message if the regex parser sees it?
19:03 moritz hoelzro: wait a second, maybe for strings consisting only of cominbing marks
19:03 hoelzro that's the only time it does anything, afaict
19:04 moritz m: say so "\c[MUSICAL SYMBOL COMBINING STEM]" ~~ /<:Combining_Mark>/
19:04 camelia rakudo-moar 4a7eaa: OUTPUT«True␤»
19:05 hoelzro 9 times out of 10, though, use of <:Combining_Mark> is a thinko, right? does it merit a warning?
19:05 moritz I don't think so
19:05 moritz I mean, there *are* legitimate use cases; how do you disable the warning then?
19:06 hoelzro yeah, that's true
19:06 hoelzro maybe it belongs in a linter
19:06 hoelzro I'd rather not add $*DISABLE-COMBINING-MARK-THINKO-WARNING
19:06 hoelzro we have enough dynamic variables flying around!
19:07 mst fly! be free()!
19:07 mst [segmentation fault]
19:07 hoelzro hehe
19:09 jjido joined #perl6
19:12 adu joined #perl6
19:12 [Coke] hoelzro: at least with bloodborne I can level up.
19:13 hoelzro haha, true, true
19:15 [Coke] well, eventually, anyway. :)
19:16 dalek doc: c2c3eb8 | (Jan-Olof Hendig)++ | doc/Type/Str.pod:
19:16 dalek doc: Fixed broken link
19:16 dalek doc: review: https://github.com/perl6/doc/commit/c2c3eb8a88
19:16 [Coke] Noooo, now I have to rebuild the whole thing again!
19:18 [Coke] .... sooooo slllloooooow
19:19 AlexDaniel [Coke]: why not rebuild just some specific files?
19:20 [Coke] because that's not how the makefile currently works.
19:20 [Coke] make just runs htmlify, which does no dependency checking.
19:21 [Coke] I'm not actually killing my run for that one change, but having such a slow turnaround time (like 30 minutes) is insane.
19:22 gfldex [Coke]: you may want to give https://github.com/gfldex/pod-to-bigpage a try
19:22 telex joined #perl6
19:22 gfldex takes 1m35s on my slowbox to render all pods
19:22 [Coke] gfldex: is it intended to replace the stuff the doc site build is using?
19:23 azawawi joined #perl6
19:23 |meta joined #perl6
19:23 gfldex not right now. It doesn't support numbered item lists and may require a fairly large rewrite to do so
19:23 [Coke] crap. should have updated all my panda modules before starting.
19:23 azawawi http://pasteboard.co/1l8QqzMf.png # GTK::Scintilla events demo
19:24 gfldex i use it to preview my dockings and query the docs with fulltextsearch
19:25 AlexDaniel [Coke]: I've often used bin/p6doc to check some basic stuff
19:25 AlexDaniel it depends on what you do
19:29 tbrowder joined #perl6
19:30 yqt joined #perl6
19:31 dalek doc: 9d0cf6e | (Jan-Olof Hendig)++ | / (2 files):
19:31 dalek doc: Added docs for X::IO::DoesNotExist
19:31 dalek doc: review: https://github.com/perl6/doc/commit/9d0cf6eca6
19:32 * azawawi good night &
19:43 masak "To remember that the parentheses go inside the brackets, visualize a *banana in a box*." -- how to tell if your hipster web framework has gone off the deep end wrt syntax
19:43 masak (from the official Angular 2 user guide)
19:45 masak (evening, #perl6)
19:46 tadzik I'm not sure if I'm ever gonna use angular, but I sure as hell will remember this for quite a while
19:46 tadzik now if only markdown came up with something similar for []() vs ()[]
19:47 masak oh, I've long since found my mnemonic for links in Markdown
19:47 masak allow me to share it with you, sir
19:48 masak it's [mumble mumble](and oh the URL is mentioned here, parenthetically)
19:48 tadzik please do!
19:48 masak if that makes any sense :)
19:48 masak the point is that one could imagine a URL being mentioned in parentheses in normal, non-Markdown text
19:49 masak seems to work for me to remember it
19:51 tadzik hmm, makes sense
19:51 pochi Is there a way to turn off the precomp stuff globally?
19:52 RabidGravy I actually quite like angular 1, but 2 yeah, it's not even javascript
19:53 masak RabidGravy: ES3 chauvinist! :P
19:53 AlexDaniel yea, it's like “you can check it out [here]” and the reader goes like WTF? Where? Here → “(http://…)”
19:54 skink You know your implementation is naive when it takes almost two orders of magnitude longer than the original...
19:54 skink And here I was writing it to be faster :(
19:56 dwarring joined #perl6
19:59 yqt joined #perl6
20:04 nine I wonder how markdown copes with IPv6 URIs like http://[2a02:2e0:3fe:1001:7777:772e:2:85]/
20:05 lizmat pochi: globally would mean a startup of 1.5 minutes to compile the setting everytime ?
20:05 nine tough [heise.de](http://[2a02:2e0:3fe:1001:7777:772e:2:85]) is probably better than (heise.de)[http://[2a02:2e0:3fe:1001:7777:772e:2:85]]
20:06 nine pochi: why do you even want that?
20:06 [Coke] speaking of adding a makefile with deps to doc... had to reboot at about 80% to completion. :P
20:07 dalek doc: fdc9b34 | (Jan-Olof Hendig)++ | doc/ (2 files):
20:07 dalek doc: Another five broken links fixed
20:07 dalek doc: review: https://github.com/perl6/doc/commit/fdc9b34b33
20:07 pochi nine: I keep running into this bug
20:07 pochi nine: RT 128287
20:08 [Coke] my old school solution to this is to rip out the monolithic htmlify and replace it with more discrete steps that depend on each other. I imagine it would be "better" if we used our builtin task scheduler and had a monolithic script that could ||ize itself.
20:08 [Coke] #128287
20:08 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128287
20:11 nine Wow, looks like a genuine precompilation bug rather than the more common "we try to use an outdated precomp file or refuse to use an up to date one" bugs I'm dealing with
20:13 sno joined #perl6
20:14 RabidGravy yeah, that one is interesting, it's actually worse for CArray as you get it without the intervening step
20:14 [Coke] is there a way to get MAIN to explode if someone passes in an invalid -- arg?
20:17 mst [Coke]: I thought if you didn't have the %* it did?
20:18 [Coke] https://github.com/perl6/doc/blob/master/htmlify.p6#L108 does not explode.
20:20 [Coke] (and does not have the %*)
20:20 nadim joined #perl6
20:21 mst hmf
20:21 mst EIDEA then, sorry
20:21 nadim joined #perl6
20:21 [Coke] IWBNI there was a --profile option that just collected data about use defined subs (things in source, or loaded by filename, or with a use lib.)
20:25 [Coke] any doc developers have a preference as to "makefile" or "smarter htmlify.p6" ?
20:27 nadim joined #perl6
20:29 skink RabidGravy, Oh look, I could've just been using Audio::Sndfile's read/write stuff :)
20:31 RabidGravy well if you said that's what you were doing ;-)
20:33 skink btw in JSON::Marshal's meta, JSON::Fast needs to be moved into build-depends
20:33 hoelzro [Coke]: /me raises his hand for "makefile"
20:33 skink since its tests use it but it's scheduled to be installed after
20:35 RabidGravy test depends then
20:35 RabidGravy I thought I did that
20:35 al2o3-cr joined #perl6
20:35 skink Hm, it is in test-depends, but panda didn't install it before testing
20:35 skink Weird
20:36 labster joined #perl6
20:36 RabidGravy panda just installs all of the build test depends up front afaik
20:37 RabidGravy is it possible you have an old version of JSON::Fast?
20:38 RabidGravy righteous pain that panda doesn't allow a full dependency specification
20:39 [Coke] doc home page has several instances of <p><p>...</p></p>
20:39 skink Original failure was: Could not find JSON::Fast:ver<0.4..*>
20:40 skink I manually installed it after so I probably just had an old version
20:40 al2o3-cr left #perl6
20:41 RabidGravy yeah, it relies on that version (which is the default bundled with panda now, but wasn't until a while back)
20:44 [Coke] doc question : shouldn't html/.htaccess go to /language/5to6-nutshell so it works when run locally?
20:45 dalek Heuristic branch merge: pushed 1000 commits to doc/makefile by coke
20:45 geekosaur o.O
20:45 geekosaur busy beaver
20:45 [Coke] just the opposite, that branch was super old.
20:47 skink RabidGravy, I was gonna toy with writing a P6 version of: https://github.com/skinkade/sundry-scripts/tree/master/clipfix
20:47 * TimToady back online after a week...
20:47 yoleaux 26 May 2016 01:00Z <AlexDaniel> TimToady: qww<foo „hello world” bar> – no quote protection here. Was it supposed to be this way or is it a bug?
20:48 masak m: say $_ for qww<foo „hello world” bar>
20:48 camelia rakudo-moar 4a7eaa: OUTPUT«foo␤„hello␤world”␤bar␤»
20:49 AlexDaniel m: say $_ for qww<foo “hello world” bar>
20:49 camelia rakudo-moar 4a7eaa: OUTPUT«foo␤hello world␤bar␤»
20:49 lizmat TimToady o/
20:49 TimToady .tell AlexDaniel I can argue qww<foo „hello world” bar> both ways, since it could be consistent with either Perl 6 quoting or shell quoting (since qww is supposed to emulate shell)
20:49 yoleaux TimToady: I'll pass your message to AlexDaniel.
20:49 AlexDaniel .
20:49 yoleaux 20:49Z <TimToady> AlexDaniel: I can argue qww<foo „hello world” bar> both ways, since it could be consistent with either Perl 6 quoting or shell quoting (since qww is supposed to emulate shell)
20:49 AlexDaniel TimToady: how consistent is “” with shell quoting? ;)
20:49 masak yoleaux: that was some meaningless message-passing right there! :P
20:50 TimToady AlexDaniel: well, it's not consistent *yet* with shell quoting, but you never know...
20:50 brrt joined #perl6
20:50 RabidGravy skink, doable in P6 but you may want to bind nyquist somehow
20:51 TimToady I'm fine with making „hello world” work there
20:51 AlexDaniel sounds great
20:52 skink RabidGravy, I wanted to see how the performance was if the clip-detecting/correcting stuff were written multithreaded in P6
20:53 RabidGravy it would be interesting but not very fast
20:53 cpage_ joined #perl6
20:53 dalek doc: 60d0eda | (Jan-Olof Hendig)++ | doc/Language/variables.pod:
20:53 dalek doc: Another batch of broken links fixed
20:53 dalek doc: review: https://github.com/perl6/doc/commit/60d0eda0eb
20:53 skink On my system, the Nyquist script takes e.g. 3min to process a 4min file
20:53 skink Somewhere around there
20:54 AlexDaniel dogbert17: I'm glad that you found it useful
20:54 AlexDaniel dogbert17++
20:56 dogbert17 AlexDaniel: might need a new report soon :-)
20:56 yoleaux 00:49Z <AlexDaniel> dogbert17: Hey. If you want to work on broken links, check this out: https://gist.githubusercontent.com/AlexDaniel/fc6cb8d6f66516c837268d43ecc47c33/raw/88c43b2891bed4d2f69087977e190afb22189a02/doc.perl6_checklink
20:56 yoleaux 00:50Z <AlexDaniel> dogbert17: the output is slightly redundant but I've found some obvious errors while scrolling it
20:56 yoleaux 00:53Z <AlexDaniel> dogbert17: the thing is, I think that all of these errors have to be eliminated… there's no reason to keep broken links. Pick any problem (e.g. <a> inside of <a>) and fix it :) The tool that I've used to generate this is w3c checklink
20:57 dogbert17 oops
20:57 AlexDaniel dogbert17: that's ok :)
20:57 skink The Nyquist interpreter doesn't seem to have any sort of library to bind to
20:57 skink Another option is having some C code do the heavy lifting and just using P6 to wrap that more cleanly than the shell/lisp
20:57 AlexDaniel dogbert17: perhaps I should find a way to generate it locally without actually scraping doc.perl6.org :)
20:58 dogbert17 AlexDaniel: sounds like a good idea, did it take long to scrape the site?
20:58 AlexDaniel dogbert17: less than an hour
20:58 [Coke] AlexDaniel: check it out. "make run"
20:59 dogbert17 AlexDaniel: cool
20:59 AlexDaniel [Coke]: yeah
21:00 AlexDaniel ok, #128304
21:00 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128304
21:01 travis-ci joined #perl6
21:01 travis-ci Doc build passed. Will "Coke" Coleda 'Merge branch 'master' into makefile'
21:01 travis-ci https://travis-ci.org/perl6/doc/builds/134283118 https://github.com/perl6/doc/compare/6478396ac538...c64e8bc96f5e
21:01 travis-ci left #perl6
21:04 dalek doc/makefile: 350524c | coke++ | / (5 files):
21:04 dalek doc/makefile: First pass at making Makefile dynamic-ish
21:04 dalek doc/makefile: review: https://github.com/perl6/doc/commit/350524ca1e
21:06 robinsmidsrod joined #perl6
21:11 nadim joined #perl6
21:15 [Coke] huh. apparently GCC means something at $dayjob that isn't a compiler.
21:16 grondilu joined #perl6
21:16 RabidGravy skink, there is a libnyquist in the audacity sources https://github.com/audacity/audacity/tree/master/lib-src/libnyquist
21:16 timotimo [Coke]: is it something naughty? or a curse-word?
21:17 [Coke] timotimo: https://en.wikipedia.org/wiki/Gulf_Cooperation_Council , I think.
21:18 timotimo oh, huh
21:19 skink RabidGravy, That's different :)
21:19 rurban joined #perl6
21:20 RabidGravy yeah, I was thinking I was sure it was embedded somewhere
21:20 timotimo oh, so it's a little bit like the OECD?
21:25 dolmen joined #perl6
21:26 jjido joined #perl6
21:26 kurahaupo joined #perl6
21:37 pmurias joined #perl6
21:39 pmurias masak: isn't angular the *not*-hipster framework? before react.js it was the only one made by serious engineers instead of having a cute website
21:40 mst angular is pretty anti-hipster, yeah
21:40 jjido joined #perl6
21:40 skids joined #perl6
21:41 geekosaur anyone else remember the general cinemas co. pre-movie snippets? :p
21:42 geekosaur (logo GCC but the Cs placed as rolling film reels)
21:42 mst pmurias: I'm currently enjoying react + mobx in a limited capacity
21:44 kurahaupo joined #perl6
21:47 pmurias mst: I'll check that out, I like angular.js but react.js will integrate with rakudo-js a lot better ;)
21:48 mst pmurias: redux is also actually really nice as well as being the hipster wank material of choice at the moment
21:48 mst I *think* I can get something *I* like better with mobx
21:48 jast personally I don't like angular, ember, react and all those
21:49 jast conceptually out of all these frameworks I liked Vue.js most, but it's not nearly as well-known
21:50 jast angular is death by IoC. ember is death by framework-for-everything. react is eww markup in my JS code. Vue.js just made a lot of sense to me.
21:53 mst vue.js is ok. but react lets me implement template packs as an ES6 class
21:53 mst and
21:53 jast I found the idea of redux intriguing but so far I couldn't really bring myself to try it on a real project
21:54 mst MegaWidget ({ args, go, here }) { let { SubWidget } = this; return <div id={args}><SubWidget go={go} here={here}></div> }
21:54 mst is actually surprising not awful
21:55 mst every other solution I've found for 'lots of small templates' is worse
21:55 jast in my use case the UI markup is maintained by the customer inside the system, and the code is maintained by me (and others)
21:56 jast so that alone makes mixing the two rather tricky... plus I simply don't like the mixing
21:56 jjido joined #perl6
21:56 mst jjido: well, basically, I keep the code and the markup separate anyway
21:57 mst the markup just happens to incidentally be compiled to JS
21:57 jast with vue what I do is I put all my widget markup in a file, load it into the various components, and then go <Widget params here><SubWidget params here>[...] in my main views
21:57 mst right, basically, my react code works equivalently
21:57 jast sure, but in my case the markup is customized at runtime
21:57 mst except it's multiple templates per file
21:57 mst and they happen to be parsed by somnething else
21:57 mst hrm?
21:58 jast that's what I just said... all my widgets are in the same file
21:58 jast the markup, anyway
21:58 jast and the code is one file per widget or whatever I like
21:58 mst oh, you're doing basically
21:58 mst <div id="Widget">,...</div><div id="SubWidget">...</div> ?
21:58 jast no
21:58 mst so how are you doing multiple sets of markup in one file?
21:58 jast well, that's one way
21:59 jast actually it's pretty much exactly that, only it's <script> tags instead of <div>
21:59 jast to prevent the engine from messing with the contents
21:59 jast (the browser engine, I mean)
21:59 pmurias mst: re why use react.js from Perl6, have you seen react-blessed? (it allows one to write curses like interfaces with react)
21:59 jast but I hide that away from whoever makes the templates
22:00 mst right, my point is to have a multi-template file for the people who make the templates
22:00 jast sure, and I can make up my own format because my app engine can just bundle it up in a way it's easy to process for the JS part
22:00 jast in this case the app has a pretty darn powerful template engine so I use that
22:01 jjido mst wrong person
22:01 mst jjido: sorry, you'd just joined and that put you ahead in my autocomplete
22:01 jast jjido: you joined at an inopportune moment for tab completion ;)
22:01 jjido interesting we get to talk about JS frameworks on this channel ;)
22:01 mst jast: right, so far, I'm not feeling the need to do that
22:01 jast yeah, my case is special
22:01 mst if I do, I figure I can still process it into react components
22:02 jast I don't doubt react has its merits. I just don't like it, and it doesn't mesh well with this specific use case either
22:02 mst (note that "allowing not-really-devs to edit the markup" is a goal here)
22:02 mst I got a serious ick factor from JSX to begin with
22:02 mst I'm finding that, in practice, it's not actually that icky
22:03 jast in my case people who are customers and not at all involved in our internal product teams are the ones who tinker with the markup after we ship it to them, and see the effects in their system in real time
22:03 mst so the way vue.js limits what attributes can invoke what programmatic stuff becomes rather valuable
22:03 jjido can you replace the template engine in these frameworks?
22:04 jast most of these frameworks kind of *are* the template engine
22:04 jast so, usually not
22:04 mst react is just a rendering layer
22:04 mst putting non-rendering logic into it makes bunny cry
22:04 mst hence redux, mobx, etc.
22:04 jast template engines are rendering layers, too
22:04 jast unless we're talking about C++ and I just didn't notice :}
22:04 mst yes, that was rather my point
22:04 ocbtec joined #perl6
22:05 jast though I guess "rendering insane" might count
22:05 mst it's a different sort of rendering layer to a template engine, sort of, but
22:05 jjido well they are more sophisticated than Mustache for example
22:05 jjido is it possible to use Mustache for the template part
22:05 jast a number of them have syntax similar to Mustache or Handlebars
22:06 jast e.g. Vue.js which I brought up earlier
22:06 jast Vue.js implements Handlebars syntax with a few extras
22:06 jast it's not as logic-less as Mustache, though
22:06 firstdayonthejob joined #perl6
22:07 jast I'm a big fan of markup that is logic-free, but it seems you can't have everything :)
22:07 mst I'm a big fan of markup that's as close to logic-free as possible
22:07 jast completely logic-free *is* possible
22:08 jast just takes a different approach to rendering
22:08 mst I have a strange and wonderful idea for that involving compiling plain HTML files to JSX
22:08 jast I've been thinking about how to make it practical, but didn't really get around to writing anything practical
22:08 mst yeah, I did implement http://p3rl.org/HTML::Zoom
22:08 mst I've done this once already :)
22:08 jast there's an extension to react that does use plain HTML and magicks it into react widgets, I think
22:08 jast forgot the name
22:10 mst I've seen a couple
22:10 mst they weren't quite what I wanted
22:10 jast yeah, HTML::Zoom is kind of nice... but it goes a bit further than what I was envisioning
22:11 jast it's great as long as you don't want to make more 'dynamic' changes to HTML properties
22:11 mst it powers the static generator for shadow.cat just fine
22:12 mst then there's http://p3rl.org/Template::Pure which is probably a much less crazy API/implementation
22:12 mst Zoom was what pushed me over the edge into writing Moo
22:12 jast e.g. suppose you want to highlight some of your list items, based on what data is in there. you can go add_to_attribute but that ties you to one specific instantiation of the view
22:13 jast if a different theme/frontend wants to do a different kind of highlighting for the same data, you need different code
22:13 jast so what I personally like is for the markup to be slightly more declarative about where the data goes
22:14 jast but not to the extent that you have explicit 'control flow' in the markup
22:14 kid51 joined #perl6
22:15 jast but my pipe dream is something that works on both client and server side without you having to write notable amounts of code twice
22:15 jast ... and absolutely no duplicate boilerplate
22:15 TEttinger joined #perl6
22:16 jast still waiting for someone to implement that for me ;)
22:18 mst one day I'm going to try, though you may hate the implementation ;)
22:20 jast I'm suspending judgement until I see it
22:31 kurahaupo joined #perl6
22:41 Sgeo joined #perl6
22:51 tony-o html::zoom is pretty interesting
22:53 teatime .tell hoelzro hey guess what, I just ran across a link to your blog, and *not* from a perl-related forum!
22:53 yoleaux teatime: I'll pass your message to hoelzro.
22:53 jast very nice for static generation, yeah
22:54 tony-o what would the template look like without the flow control but still retaining the ability to generate a list of items?
22:55 anomie__ joined #perl6
22:57 jast the examples for HTML::Zoom cover that
22:59 Zero_Dogg joined #perl6
23:34 gorgonzola joined #perl6
23:38 pierre_ joined #perl6
23:41 Actualeyes left #perl6
23:42 hoelzro teatime: oh, really? where was it?
23:42 yoleaux 22:53Z <teatime> hoelzro: hey guess what, I just ran across a link to your blog, and *not* from a perl-related forum!
23:43 teatime /r/commandline I think
23:43 teatime I assume this is your stuff:  http://hoelz.ro/blog/unsung-heroes-of-the-command-line
23:45 hoelzro ah, yes!

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

Perl 6 | Reference Documentation | Rakudo