»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 Akagi201 left 00:06 grondilu left, sQuEE left, sQuEE joined 00:08 yqt left, baest_ joined 00:11 baest left, pmurias left, krakan joined 00:12 i42 left 00:15 khw joined 00:16 TakinOver joined 00:21 TakinOver left
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:22 mohae left 00:23 TakinOver joined
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␤␤»
BenGoldberg m: (^5).least(3).say;
camelia rakudo-moar 4a7eaa: OUTPUT«Method 'least' not found for invocant of class 'Range'␤ in block <unit> at /tmp/BPjQ1uQ82k line 1␤␤»
BenGoldberg m: (^5).lowest(3).say;
camelia rakudo-moar 4a7eaa: OUTPUT«Method 'lowest' not found for invocant of class 'Range'␤ in block <unit> at /tmp/VLX2K3X3Yz line 1␤␤»
00:24 awwaiid left
skids m: (^5).first.say; (^5).first(:end).say 00:25
camelia rakudo-moar 4a7eaa: OUTPUT«0␤4␤»
00:25 cognominal left
skids m: (^1000000).first(:end).say # Also, is efficient 00:25
camelia rakudo-moar 4a7eaa: OUTPUT«999999␤»
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
00:26 Actualeyes joined
AlexDaniel yea 00:26
00:27 mohae joined
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:28 TakinOver left
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.
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:30
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, huggable left
skids or do some .grep with a stateful closure. 00:33
BenGoldberg Or quickselect. 00:34
Or introselect. 00:36
00:38 pierre joined 00:42 TakinOver left 00:45 Zoffix left 00:47 TakinOver joined, ggoebel114 joined
AlexDaniel .tell dogbert17 Hey. If you want to work on broken links, check this out: gist.githubusercontent.com/AlexDan..._checklink 00:49
yoleaux AlexDaniel: I'll pass your message to dogbert17.
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
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.
00:55 kurahaupo left 00:57 kurahaupo_ left 01:02 jack_rabbit joined 01:05 TakinOver left 01:25 Akagi201 joined 01:26 cognominal joined, cognominal left, cognominal joined 01:27 cognominal left, cognominal joined 01:28 cognominal left, cognominal joined, cognominal left 01:29 cognominal_ joined, cognominal_ left, cognominal__ joined, cpage_ joined 01:30 cognominal__ left, cognominal_ joined 01:31 cognominal_ left, cognominal_ joined, cognominal_ left 01:32 cognominal joined, molaf left, cognominal left, cognominal joined 01:33 cognominal left, cognominal_ joined 01:34 cognominal_ left, cognominal_ joined, cognominal_ left 01:35 cognominal joined, cognominal left 01:36 cognominal joined 01:37 cognominal left, cognominal joined, cognominal left 01:38 cognominal joined, TakinOver joined, cognominal left, cognominal joined 01:39 cognominal left, cognominal joined 01:40 cognominal left, cognominal joined, ssotka joined, maybekoo2 left, cognominal left 01:41 cognominal joined, cognominal left 01:42 cognominal joined, cognominal left, cognominal joined 01:43 cognominal left, cognominal joined 01:44 cognominal left, cognominal_ joined, cognominal_ left, molaf joined, cognominal_ joined 01:45 TakinOver left, cognominal_ left, cognominal joined 01:46 cognominal left, cognominal_ joined, cognominal_ left 01:47 cognominal joined, TakinOver joined, cognominal left, cognominal_ joined 01:48 cognominal_ left, cognominal_ joined 01:49 cognominal_ left, cognominal_ joined, cognominal_ left 01:50 cognominal_ joined, cognominal_ left 01:51 cognominal joined, cognominal left 01:52 cognominal joined, cognominal left 01:53 cognominal joined, cognominal left, cognominal joined 01:54 AlexDaniel left, TakinOver left, cognominal left, cognominal joined, cognominal left 01:57 TakinOver joined 02:03 stevieb9 left 02:04 kid51 left 02:05 TakinOver left 02:09 ugexe left, sufrostico left 02:10 TakinOver joined 02:15 pierre left 02:16 TakinOver left 02:19 pierre joined 02:22 TakinOver joined 02:24 finanalyst joined 02:27 TakinOver left 02:29 TakinOver joined, pierre left 02:34 TakinOver left 02:36 ugexe joined 02:38 pierre joined 02:43 pierre left 02:44 noganex_ joined 02:47 noganex left, pierre joined 02:57 [Sno] left 02:58 TakinOver joined 03:03 TakinOver left
Xliff_ Are there any articles on the use of Backtrace? 03:05
jeek Jessi Slaughter posted a couple of relevant videos 03:07
Xliff_ Hrm. 03:10
jeek: I will try to look them up. Thanks.
jeek: Er... Well that was a nifty troll. :P 03:12
I don't pay much attention to internet news so I didn't really recognize the name.
03:15 TakinOver joined
jeek My apologies for the differing consequences. 03:19
03:20 TakinOver left 03:21 |meta left 03:24 labster left, wbill joined 03:26 pierre left 03:27 pierre joined 03:35 _28_ria left 03:36 _28_ria joined, TakinOver joined 03:41 MasterDuke left 03:53 pierre left 03:54 pierre joined 03:55 pierre left 03:59 pierre joined 04:01 pierre left, Actualeyes left 04:03 labster joined 04:08 pierre joined 04:10 awwaiid joined 04:13 pierre left, anomie__ joined
anomie__ sub printf (Str) is native(){} has some unexpected behaviour for me. 04:13
It doesn't print until I press enter a second time.
gfldex anomie__: could be buffered 04:15
anomie__ Like, what does that mean? Never played with FFI before. 04:16
gfldex see www.gnu.org/software/libc/manual/ht...ffers.html 04:17
anomie__ All right, so if I want it to print immediately I need to create a buffer and flush it, or something? 04:19
gfldex that depends on your OS, terminal and when you last sacrificed a goat 04:20
04:20 Zero_Dogg left
anomie__ Just what I need to here. 04:21
But I suppose the real question is, why would I want to reimplement say?
04:21 Zero_Dogg joined
gfldex indeed 04:21
skink Perl6 has printf, why are you NativeCalling it? 04:22
Xliff_ How can I access the call stack in Perl6?
I can't find any useful documentation on that. 04:23
anomie__ skink: Just wanted to get familiar with NativeCall.
skink Ah
skids Well if you want exact C format. But you could use sprintf.
Xliff_ anomie__, I know that feeling. ;)
Except when I did it, I used libogg and libvorbis.
04:23 wbill left, Xliff_ is now known as Xliff
skink Xliff, That's because you're insane :) 04:24
04:24 khw left
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.
gfldex Xliff_: you can't find any useful documentation because a) it has not been written yet or b) it's an implementation detail
Xliff Shit. So there is no caller() equivalent for Perl6?
awwaiid I found rosettacode.org/wiki/Stack_traces#Perl_6 but it appears to not work 04:25
though it doesn't thrown an error
anomie__ Also, out of curiosity, any idea how to encode text to SHIFT_JIS?
awwaiid m: say Backtrace.new.concise 04:26
camelia rakudo-moar 4a7eaa: OUTPUT«␤»
anomie__ Or should I just cheat and execute iconv for that?
04:26 Actualeyes joined
Xliff awwaiid, yes. I have tried using Backtrace, but the documentation doesn't seem to help. 04:26
awwaiid m: say Backtrace.new.full
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␤␤»
Xliff m: sub f () { say BACKTRACE.full }; F
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␤␤»
Xliff m: sub f () { say Backtrace.full }; F
camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E9LQQ78LkQ␤Undeclared name:␤ F used at line 1␤␤»
awwaiid m: say Backtrace.new[2]
camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "/tmp/jNPMgimLTz", line => 1, code => -> { #`(Block|53388096) ... }, subname => "<unit>")␤»
Xliff m: sub f () { say Backtrace.full }; f
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␤␤»
Xliff Hmm.... now THAT might be just what I need, awwaiid
awwaiid Xliff: I found that via Backtrace.new.^methods, and noticed AT-POS :) 04:27
Xliff m: sub f () { dd Backtrace.new[0] }; f
camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "gen/moar/m-CORE.setting", line => 21050, code => -> { #`(Block|65927456) ... }, subname => "")␤»
Xliff m: sub f () { dd Backtrace.new[1] }; f
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
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␤»
awwaiid Xliff: there is also CALLER::
Xliff m: sub f () { dd Backtrace.new[*-1] }; f
camelia rakudo-moar 4a7eaa: OUTPUT«Backtrace::Frame.new(file => "/tmp/TYeIMczeZW", line => 1, code => -> { #`(Block|63760336) ... }, subname => "<unit>")␤»
Xliff Where is CALLER:: documented?
04:29 Cabanossi left
awwaiid Xliff: doc.perl6.org/language/packages -- it is a pseudo-package, but you can do all the symbol and info lookups like other packages 04:29
anomie__ So, how do I encode SHIFT_JIS? 04:30
Derp, I might have found it.
gfldex design.perl6.org/S06.html#The_call..._functions
awwaiid m: sub f { say CALLER::.keys } ; sub g { my $local_var = 2; f() } ; g()
camelia rakudo-moar 4a7eaa: OUTPUT«($local_var $_ $! $*DISPATCHER RETURN $¢ $/)␤»
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
gfldex the order of a stack is not fixed. Expect the optimiser and black magic to get in your way.
04:32 Cabanossi joined
gfldex also github.com/perl6/roast/blob/master...r.t#L7-L63 04:32
04:32 huggable joined
gfldex if it's in roast it's likely safe to use 04:32
awwaiid gfldex: nice roast reference \o
Xliff Ooh! Thanks, gfldex 04:33
anomie__, what are you trying to encode SHIFT_JIS into?
gfldex after you got the advanced basics, roast is actually a nice place to learn Perl 6
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:34
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…»
BenGoldberg m: use NativeCall; sub printf (Str) is native(){}; printf("foo\n");
camelia rakudo-moar 4a7eaa: OUTPUT«foo␤»
Xliff Undeclared routine:
caller used at line 25
anomie__ How can I represent size_t *inbytesleft as a perl signature? 04:36
Xliff anomie__, can I get the full C declaration?
anomie__ Oh nvm, there is a size_t.
BenGoldberg For a pointer to size_t, use Pointer[size_t], I think. 04:37
anomie__ Xliff: Sure. size_t iconv(iconv_t cd,
char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
Xliff Yeah. BenGoldberg++ is right. 04:38
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?
anomie__ What about iconv_t though? It looks like I can't define that subroutine without doing some work first.
Xliff m: sub f () { caller.subname }; f
camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8PKUVrFxw6␤Undeclared routine:␤ caller used at line 1␤␤»
Xliff skink: I could be talked into it. =)
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?
Xliff Aaieee! LISP! 04:42
Xliff flees.
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
Yeah it's an audio DSL based on XLISP
Xliff You can fondle the LSP. I will stick with Perl.
Doing lisp makes me feel dirty. 04:43
It must be all of the curved surfaces. :P
skink This isn't beautiful to you? :) 04:44
github.com/audacity/audacity/blob/...clipfix.ny
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
Xliff I learned Lisp for a college course that I needed for graduation. Then forgot everything about it. Never looked back. 04:47
anomie__ Hey, does Hiker build for you guys? 04:48
Xliff anomie__, "Hiker"? Never heard of it?
04:49 aries_liuxueyang left
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.
with panda install Hiker, I mean.
It looks it passed tha travis build, so I'm confused. 04:50
04:50 aries_liuxueyang joined 04:51 skink left 05:02 BenGoldberg left
Xliff HTTP::Response is not composable, so HTTP::Server::Async::Response cannot compose it 05:07
That basic problem is causing the install to fail.
05:09 pierre joined
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
So the question is... why is HTTP::Response not composable.
s/\./?/
Er.
s/\.$/?/
05:14 pierre left 05:22 anomie__ left 05:29 sno left 05:37 domidumont joined 05:41 domidumont left, domidumont joined 05:42 _28_ria left 05:45 ufobat joined, sdas joined 05:46 sdas left
Xliff Aside from doing "does" when you really want "is", what other situations will rakudo throw an X::Composition::NotComposable exception? 05:47
05:47 domidumont left 05:49 rurban joined
Xliff tell lizmat Does caller() still work in rakudo? 05:52
.tell lizmat Does caller() still work in rakudo?
yoleaux Xliff: I'll pass your message to lizmat.
06:00 domidumont joined 06:01 ufobat left 06:11 pierre joined, baest_ is now known as baest 06:28 _mg_ joined 06:29 ssotka left, maybekoo2 joined 06:32 tomboy64 left 06:33 buharin joined 06:34 tomboy64 joined 06:37 brrt joined
brrt good * #perl6 06:37
Woodi hallo :) 06:46
06:48 zakharyas joined 06:51 pierre left, pierre joined 06:53 labster left, buharin left 06:58 sno joined 07:03 pierre left 07:07 rindolf joined 07:08 pierre joined 07:11 ufobat joined 07:13 pierre left 07:20 pierre_ joined 07:22 darutoko joined 07:23 pierre_ left 07:25 pierre_ joined 07:30 RabidGravy joined
Xliff Anyone awake know if call stack inspection is implemented in Rakudo? 07:31
07:32 pierre_ left
nine Xliff: it is 07:32
Xliff nine: Have a link with a good writeup on it? 07:33
S06 looks to be out of date.
The docs on class Backtrace are inaccurate, and don't seem to wokr. 07:34
s/kr/rk/
nine m: sub foo() { say callframe(1).code }; sub bar() { foo }; bar
camelia rakudo-moar 4a7eaa: OUTPUT«sub bar () { #`(Sub|65174232) ... }␤»
Xliff m sub foo() { dd callframe(1) }; sub bar() { foo }; bar
m: sub foo() { dd callframe(1) }; sub bar() { foo }; bar
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␤␤»
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)␤»
Xliff m: sub foo() { my $a = callframe(1); dd $a }; sub bar() { foo }; bar
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␤␤»
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
camelia rakudo-moar 4a7eaa: OUTPUT«not so hidden␤»
Xliff m: sub foo() { say callframe(1).gist; }; sub bar() { foo }; bar
camelia rakudo-moar 4a7eaa: OUTPUT«/tmp/PmokO8KCnC at line 1␤»
nine Xliff: what do you mean by method/sub level? 07:37
Xliff Something that has the name of the calling method or sub.
nine m: sub foo() { say callframe(1).code.name }; sub bar() { foo }; bar
camelia rakudo-moar 4a7eaa: OUTPUT«bar␤»
Xliff Ah!
What object does .code return? 07:38
nine m: sub foo() { say callframe(1).code.^name }; sub bar() { foo }; bar
camelia rakudo-moar 4a7eaa: OUTPUT«Sub␤»
07:38 pierre_ joined
nine Well it obviously depends on who the caller is :) 07:38
It generally returns a Callable 07:39
Xliff m: sub foo() { say callframe(2).name; }; sub bar() { foo }; bar
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␤␤»
nine Xliff: I'm curious what you need this for?
Xliff Caching 07:40
So the Cache object needs to know the caller.
nine why?
Xliff Because it does! =) 07:41
One sec. Writing test.
moritz code that introspects the call chain is generally not composable 07:43
and should be used only for debugging
Xliff moritz: How so?
07:43 abraxxa joined
Xliff I'm running into non-compose issues with HTTP::Server::Async, too. 07:43
07:43 pierre_ left
moritz Xliff: the very idea of composable code is that you can use it from anywhere, and it makes no difference 07:43
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
so you end up with programs that lie to other parts of the program
Xliff moritz: In this case, that is a non-issue.
07:44 pierre_ joined
moritz ... and the humans reading the code are supposed to understand that 07:44
Xliff Code needs to know where it is being run from so that it can save state properly. 07:45
07:45 dogbert17 left
Xliff Used for caching for a RESTful API 07:45
moritz ... until somebody wants to share a cache between two functions 07:46
Xliff ???
Again... not an issue.
If I am understanding you, correctly.
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
Xliff And here I am bitten by hidden funcs in objects. In particular... "call_with_args"
nine Yes, that means that each caller has to pass an additional argument, but it will make the code crystal clear instead of magical.
Xliff What's wrong with magic?
nine It makes code less maintainable. 07:48
Xliff And yes, initially I was going that way.
It makes the code less susceptible to fat fingering in data that's already available.
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....
And I don't see how less code makes things less maintanable.
moritz: Sure! That is sensible.
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
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.
That's it.
RabidGravy skip the frames that don't have that information
Xliff nine: Generally, I agree. However, good documentation can go a long way with alleviating that problem. 07:52
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
Xliff So I had to use "callframe(5)" to finally get back to something useable. 07:59
And that may not always be true. *sigh* 08:00
lizmat messages ?
yoleaux 05:52Z <Xliff> lizmat: Does caller() still work in rakudo?
lizmat m: caller()
camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vTyq4P3xXB␤Undeclared routine:␤ caller used at line 1␤␤»
Xliff \o
lizmat :-)
Xliff Question answered. Thanks, liz.
lizmat Xliff: you're welcome :-)
Xliff Of course, all you grownups in this channel.... 08:01
Trying to convince me "magic is bad"
=P
timotimo isn't callframe the "wrong way around"?
Xliff Depends on how you use it. 08:02
timotimo like, does callframe(0) give you the current call frame, or the "initial" callframe?
Xliff In this case, I don't think there's enough data for the magic to give me the right answer.
Which means more code and more maintenance
timotimo, current IIRC
timotimo OK 08:04
nine Yes, callframe(0) is the current one
timotimo i could imagine optimizations that cause in-lining might make the number wobble
08:04 llfourn joined
nine timotimo: I hope not :/ 08:04
llfourn m: sub foo(+@at-least-one) { say "GOT HERE" }; foo() #NYI? 08:07
camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
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
llfourn forgets the unpacking syntax 08:11
timotimo you'd at least need a space there 08:12
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␤␤»
llfourn ok so +@ is NYI but you should be able to do: 08:14
m: sub foo( *@at-least-one [ $,*@ ] ) { say "GOT HERE" }; foo()
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
llfourn m: sub foo( *@at-least-one [ $,*@ ] ) { say "GOT HERE" }; foo("wee") 08:14
camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
llfourn \o/
08:14 pierre_ left
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 jjido left, pierre_ joined
llfourn yeah that's probably less noisy :) 08:16
you could even:
08:16 rurban left
llfourn m: sub foo( *@at-least-one where ?* ) { say "GOT HERE" }; foo("wee") #perhaps? 08:17
camelia rakudo-moar 4a7eaa: OUTPUT«GOT HERE␤»
Xliff So callframe.package doesn't seem to return the full namespace of the class. How can I get that info?
llfourn m: sub foo( *@at-least-one where ?* ) { say "GOT HERE" }; foo()
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␤␤»
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
llfourn timotimo: yeah it gives a nicer error if that's what you're after 08:19
timotimo yup
08:20 dakkar joined 08:24 AlexDaniel joined 08:27 pierre_ left 08:28 Akagi201 left
Xliff RabidGravy, looks like it's $!longname, and...private. 08:29
08:29 Akagi201 joined
RabidGravy no, that's not right 08:29
Xliff Looking at BOOTSTRAP.nqp. 08:30
Am I too far down the rabbit hole?
timotimo there might still be an accessor somewhere?
Xliff .long-name and .long_name both throw errors. 08:31
08:32 huggable left 08:33 pierre_ joined
RabidGravy actually name does return the long name 08:33
I'm getting confused
there is a shortname
llfourn Xliff: what are you calling this on?
RabidGravy m: class Bar::Foo {}; say Bar::Foo.^name 08:34
camelia rakudo-moar 4a7eaa: OUTPUT«Bar::Foo␤»
RabidGravy there full name
llfourn right.
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␤␤»
llfourn I don't really understand what's the question because callframe.package is not a thing
Xliff I'm calling callframe from a method, not a type object.
08:35 vytas joined
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…»
Xliff callframe.code.name; callframe.code.package
RabidGravy I don't understand the difference
llfourn m: class { method foo { callframe.package.note } }.foo
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␤␤»
llfourn ah
RabidGravy m: class Bar::Foo {method baz() { say callframe(0).code.package.^name } }; Bar::Foo.baz
camelia rakudo-moar 4a7eaa: OUTPUT«Bar::Foo␤»
llfourn m: class { method foo { callframe.code.package.^name.note } }.foo
camelia rakudo-moar 4a7eaa: OUTPUT«<anon|79638688>␤»
08:37 labster joined
Xliff llfourn++ && RabidGravy++ # Progress! 08:38
Thanks, guys.
llfourn \o/ 08:39
Xliff Now I must thunk on proceedings.
08:43 pierre_ left
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)␤»
moritz m: sub d { callframe.code.package.^name.note }; multi a(Int) { d }; multi a(Str) { d }; a 1; a 'foo'
camelia rakudo-moar 4a7eaa: OUTPUT«GLOBAL␤GLOBAL␤»
08:48 pierre_ joined
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>␤»
timotimo you have the A.new.d inside your class A
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 }
camelia rakudo-moar 4a7eaa: OUTPUT«Method 'd' not found for invocant of class 'A'␤ in block <unit> at /tmp/zxje56PPnf line 1␤␤»
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 }
camelia rakudo-moar 4a7eaa: OUTPUT«GLOBAL␤GLOBAL␤»
llfourn shouldn't you do callframe(1)? 08:50
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␤»
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 }
camelia rakudo-moar 4a7eaa: OUTPUT«A␤A␤»
llfourn which shows why caching based on caller package name is a bad idea in general ;) 08:55
one could use callerframe(1).package.WHICH which would be less bad 08:56
oh but that's what you did
and it isn't less bad
I guess you could do .WHERE :D 08:57
timotimo that's really not such a good idea :) 08:58
llfourn hmmm 08:59
what about HOW.WHICH....
timotimo 09:00
llfourn because each type should have it's own metaobject instance right?
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 }
camelia rakudo-moar 4a7eaa: OUTPUT«Perl6::Metamodel::ClassHOW|71008368␤Perl6::Metamodel::ClassHOW|71058560␤»
llfourn it works :P! 09:01
timotimo oh lord
llfourn :D:D:D
teatime dang is there no WHEN
I really wanted .WHO.WHAT.WHERE.WHEN.WHY.HOW to be valid
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
camelia ( no output )
llfourn coolface
WHEN could store the epoch of when the object was created 09:05
microsecond epoch 09:06
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␤»
moritz LTA error. I don't see where I used a non-identifier method call. 09:09
llfourn yeah :\
09:13 AlexDani` joined 09:14 finanalyst left 09:15 AlexDaniel left 09:19 jjido joined
Xliff Can you alter the access/mod/changed time of a file in perl6? 09:19
09:24 AlexDani` left
Xliff <teatime> I really wanted .WHO.WHAT.WHERE.WHEN.WHY.HOW to be valid 09:26
Ooh! I second that.
teatime lol 09:27
09:32 jjido left 09:36 AlexDani` joined, AlexDani` is now known as AlexDaniel
timotimo .WHEN should obviously always return "teatime" 09:47
teatime !
if that were my perl6 legacy
I would be so ashamed
timotimo :D
09:54 tomboy64 left
RabidGravy Xliff, sure, nativecall to utime 09:57
or "however you might do that on windows"
timotimo why not just 09:58
m: say time
camelia rakudo-moar 4a7eaa: OUTPUT«1464688716␤»
timotimo er, i mean
m: say now
camelia rakudo-moar 4a7eaa: OUTPUT«Instant:1464688756.759042␤»
RabidGravy er 10:00
10:02 brrt left 10:11 labster left 10:16 kid51 joined 10:21 kaare_ joined, nadim left 10:36 pierre_ left
RabidGravy boo! a week without me adding anything to the ecosystem 10:36
10:36 eone joined
RabidGravy may just have to make more than one this week to make up for it 10:36
10:37 pierre_ joined 10:41 pmurias joined
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:42
10:44 rindolf left 10:45 azawawi joined
azawawi gist.github.com/azawawi/a2349d4f22...9a04637f73 # GTK::Simple + Scintilla editor :) 10:45
10:46 TEttinger left 10:47 rurban joined
Xliff pmurias++ # Thanks! 10:48
RabidGravy, how about an OAuth2 module? # =) 10:49
azawawi pasteboard.co/1kBerSBh.png # GTK::Simple + Scintilla editor component screenshot :)
10:50 pierre_ left
Xliff azawawi, why not use NativeCall for everything, including what you have in widget.c? 10:51
Still, though.... nifty!
azawawi Xliff: because scintilla is not dynamically linked 10:52
Xliff Ahh!
azawawi sourceforge.net/p/scintilla/featur...uests/555/ 10:53
RabidGravy don't you just hate that
looks nice
10:54 eone left
azawawi farabi7 gtk editor :) 10:55
RabidGravy if I get a bit of time today I may implement menus and or toolbars for GTK::Simple 10:57
the only thing stopping me is the tedium of typing in all the required subs and methods 10:58
azawawi dreams of an all Perl 6 GTK editor :) 10:59
11:03 rurban left 11:06 azawawi left 11:14 xinming left 11:19 teatime is now known as one-zero 11:25 berov joined
RabidGravy wonders why he hasn't got something for XDG_RUNTIME_DIR in XDG::BaseDirectory 11:26
better make that happen
11:32 Actualeyes left 11:36 kalkin-_ joined
kalkin-_ hi 11:36
11:36 kalkin-_ is now known as kalkin-, AlexDaniel left
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:38
11:38 maybekoo2 left, aries_liuxueyang left 11:39 aries_liuxueyang joined 11:40 vytas left 11:41 berov left 11:43 vytas joined 11:46 Actualeyes joined 11:49 kid51 left, one-zero is now known as teatime
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?
Or is it always assumed it's perl6 code in a code block?
11:55 tomboy64 joined, Deep_Thought joined 12:02 ecocode joined
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:03
your first question, I'd start with the implemented Pod::To:: modules and design.perl6.org/S26.html and have a fiddle because that stuff isn't really all that well documented 12:04
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
12:08 Ajay joined
Ajay Hi 12:08
kalkin- I basically want to do perl6 --doc=Markdown --my-option1=asd --my-option2=Bar lib/Foo.pm6
12:08 skids left
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:11 Ajay left 12:13 itaipu joined
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:14
but as I said it isn't well documented so you should examine the source of the module and experiment 12:15
12:15 colomon joined 12:21 cognominal joined
sjn \o 12:22
quick question; what's the situation with Duration and other date calc tools today?
the docs seem a bit lacking 12:23
12:23 pmurias left, pmurias joined
RabidGravy I'm not quite sure what you mean by "the situation" 12:24
moritz sjn: they exist 12:27
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
RabidGravy it has fractions
teatime yeah, it's fractional seconds 12:30
Rat internally
although it will often get cast to a Num rather than a Rat in operations
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
Xliff <RabidGravy> the only thing stopping me is the tedium of typing in all the required subs and methods
Xliff puts "- Code a "DOITFORME" button for RabidGravy" on his TODO. 12:32
12:32 huggable joined, pierre_ joined
RabidGravy well I was actually putting off the OAuth2 thing because someone else said they were looking at it 12:32
Xliff Huh! Missed that. 12:33
12:33 cognominal left
RabidGravy there is a partial (just enough to work) implementation in WebService::Soundcloud 12:33
and if all else fails I could extract that
Xliff :-o 12:34
RabidGravy++
teatime sjn: say DateTime.new("1999-01-01T00:00:00Z").Instant.to-posix # (915148800 False) 12:35
I think this is the only thing that is built-in.
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␤»
RabidGravy more succinct techniques may be available 12:37
sjn teatime: ok
teatime oh, right, he wanted a duration
RabidGravy I may even have some code that does this for ISO or W3c durations knocking around 12:38
and the other way round it's some polymod gubbins, which I think is used as an example somewhere 12:39
12:40 brrt joined 12:41 andreoss joined
kalkin- RabidGravyL: thanks 12:41
andreoss is p6doc(or any other doc reading tool) going to be a part of official release? 12:45
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:46
andreoss, inasmuch as it's in Rakudo Star then yes 12:47
12:50 xinming joined
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.
moritz andreoss: there's 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.
moritz and doc.perl6.org/language/regexes for perl6re
intro is... difficult
andreoss i know that 12:53
stmuk "p6doc -l" lists at the command line
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
andreoss stmuk: so basically there will be no correspondence between perldoc(Perl 5) and p6doc(Perl 6) 12:55
stmuk andreoss: I don't think that's ever been a goal 12:56
moritz not in the names of the documents, no
12:56 tomboy64 left
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:57
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
RabidGravy and have grown organically over a very long time
perlpilot stmuk: perlboot - Give Perl the boot!
stmuk: perltoot - Toot your own horn
stmuk there are some existing "5to6" pages like "5to6-perlfunc" as well
perlpilot: :) 12:59
perlpilot literal: perhaps you want "with"?
13:00 Sgeo left
perlpilot not sure if there's a postfix form of it though. 13:00
andreoss m: given my $foo = "hi" { say $foo }
camelia rakudo-moar 4a7eaa: OUTPUT«hi␤»
andreoss m: with my $foo = "hi" { say $foo }; 13:01
camelia rakudo-moar 4a7eaa: OUTPUT«hi␤»
[Coke] did irclog ever deal with camelia color codes?
13:02 tomboy64 joined
[Coke] irclog.perlgeek.de/perl6/2016-05-31#i_12577302 looks wonky, e.g. 13:02
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
andreoss literal: doc.perl6.org/syntax/with%20orwith%20without 13:08
perlpilot literal: doc.perl6.org/syntax/with%20orwith%20without
13:09 cdg joined
kalkin- RabidGravy: hmm that sounds better. 13:10
RabidGravy: I probably also could just read out an env variable
teatime RabidGravy: hrm, I think pandoc will output manpages 13:11
might make it easy enough to auto-gen them from whatever other-format docs you have
RabidGravy kalkin-, "class Pod::To::Stuff { method render($pod) { say $pod, @*ARGS; } }" will show you what it gets
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
13:12 Walex joined 13:13 prammer left
teatime I would feel bad making pandoc a prereq for such a module. 13:13
[Coke] literal: additionally, docs.perl6.org - enter "with" in the search box.
teatime but if I had a personal need I would use it in a heartbeat.
[Coke] (will get you to the same spot if you pick the right item from the list)
awwaiid teatime: such a good tool should be embraced as a dependency :) 13:14
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
but I hate all the re-implementing in this world
teatime it looks like the best/easiest way would just be a wrapper around the clui tool
awwaiid (except for educational, exploratory, creative type re-implementations of course)
perlpilot awwaiid: Just think of "re-implementing" as "refactoring" under another name :)
teatime which, would be fine and easy enough
literal [Coke]: ah, cool, didn't know about this 13:16
awwaiid perlpilot++ # enlightenment!
RabidGravy awaiid, you keep saying this, but I still haven't seen the installer implementation that can express external dependencies
literal much better than trying google :)
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!
RabidGravy: hm. good point. Though I have been looking at Nix lately :) 13:17
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␤»
RabidGravy infact let's just scrap perl 6, because everything it does can be done with assembler
awwaiid Walex: needs more colons
m: sub postfix:<!> (Int $n) { [*] 2..$N; } ; say 5!
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!␤»
awwaiid m: sub postfix:<!> (Int $n) { [*] 2..$n; } ; say 5!
camelia rakudo-moar 4a7eaa: OUTPUT«120␤»
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!
RabidGravy but the logical extension thereof 13:20
Walex So it turns out that Perl6 is a descendant of Algol 68. Amusing.
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:21
RabidGravy quite, so I (arbitrarily) declare assembly language the *best* way of doing programming 13:22
awwaiid haha
How about JVM?
Though I've only written very very small amount of JVM bytecode
RabidGravy eugh
teatime awwaiid: that's just portable assembly.
so, RabidGravy-approved.
RabidGravy :)
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
Walex worries a bit about the weight of a turing machine, it might collapse in a black hole
teatime maybe the ultimate purpose of evolution and the universe is to create the best, perfect programming language.
which will then be used to implement universe 2.0
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 buharin_ left
perlpilot awwaiid: 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!
camelia ( no output )
Walex p6: sub postfix:<!> (Int $n) { return ($n == 2) ?? 2 !! $n * ($n-1)!; }; say 7!
camelia rakudo-moar 4a7eaa: OUTPUT«5040␤»
13:25 skids joined
awwaiid meditates 13:25
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␤»
Walex "implementing something once" vs "there is more than one way to do it", interesting discussion
:-) 13:27
teatime well, code re-use obviously has value, but competing implementations also have undeniable value 13:28
so may I suggest, as usual, the middle path
awwaiid indeed
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:29
13:31 andreoss left, darutoko- joined
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...
brrt not soon, if i'm very, very honest
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
[Coke] ah. I'm misremembering the announcement: 6guts.wordpress.com/2015/11/21/wha...een-up-to/ (look for "shaped arrays")
awwaiid Walex: also you could try Inline::Python
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
brrt my 'systems' view says this may never happen because the necessity just isn't there
13:34 perlawhirl joined
brrt because python already has numpy, and all the scientific world uses that 13:35
13:35 darutoko left
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.
brrt i know someone whose favorite language was, in fact, FORTRAN. intelligent person, too
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
only twenty years ago too
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.
Walex one of my colleagues says that R makes it difficult for its users to think in terms of structured data, just arrays, arrays
brrt that is bizarre.. 13:37
java
Walex: and how does this differ from, say, numpy?
Walex A french guy wrote an amazingly good *full* ALGOL 68 compiler by himself in 3 year in FORTRAN VI.
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
awwaiid Walex: nevermind, Inline::Python has code-rotted. I was going to whip up a quick numpy example, but fail.
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?
DrForr What I saw at OSCON looked a bit clunky, but interactive at least.
brrt anyway, i'm coming off perhaps a bit dismissive or grumpy 13:40
awwaiid Increasingly Jupyter is wrapping more langs
brrt i don't mean to be :-)
i think scientific perl6 is a great idea
i just don't see it happening in the short term
pmurias brrt: the performance stuff needed for scientific perl6 seems like something that will need to be implemented for other things 13:41
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 :)
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"
camelia rakudo-moar 4a7eaa: OUTPUT«False␤»
[Coke] m: say "\r\n".uninames; say "\r".uninames
camelia rakudo-moar 4a7eaa: OUTPUT«(CARRIAGE RETURN (CR) LINE FEED (LF))␤(CARRIAGE RETURN (CR))␤»
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
but doing nothing else at the same time
brrt agreed with all that... 13:44
also not my point
my point is: who's going to make scientific perl6, if we have numpy/R/fortran
13:44 jack_rabbit left
DrForr Who's going to make perl if we already have Python? Same question :) 13:45
brrt not really
RabidGravy yeah, I'd say that if it's feasible they will come
brrt i hope
:-)
kalkin- I want to have access to some subroutines in my tests, but don't want to export it. Is this possible? 13:46
something like javas protected
13:46 jjido joined
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
perlpilot kalkin-: oh ... maybe you want to use "our sub foo { }"
RabidGravy make a wrapper
13:47 pierre_ left
perlpilot is slow this morning 13:47
RabidGravy or y'know, rethink how the tests work
perlpilot RabidGravy++
13:49 brrt left
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…»
kalkin- our is the solution, I need.
13:51 jjido left
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
camelia rakudo-moar 4a7eaa: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤ in block <unit> at /tmp/z2DRXIPLT8 line 1␤␤»
13:52 darutoko- left
jnthn Xliff: A.new."$aref"() if $aref is a name 13:53
Xliff jnthn! Speak of the devil. I just found www.jnthn.net/papers/2015-fosdem-st...ynamic.pdf 13:55
Was reading.
13:55 pmurias_ joined
Xliff So... how can I get an attribute from an object if I don't know the attribute name at runtime? 13:56
Assuming it is public.
13:56 rindolf joined
gfldex m: class A { has $.b }; A.new.^attributes.say; 13:57
camelia rakudo-moar 4a7eaa: OUTPUT«(Mu $!b)␤»
perlpilot m: class A { has $.a; submethod BUILD { $!a = 42 } }; A.^attributes.say
camelia rakudo-moar 4a7eaa: OUTPUT«(Mu $!a)␤»
perlpilot even cutting and pasting I'm slow
gfldex m: class A { has $.b }; A.new.^attributes.WHAT.say;
camelia rakudo-moar 4a7eaa: OUTPUT«(List)␤»
perlpilot Must. Need. Caffeine.
gfldex i'm enpowered by tea. You can not beat me! 13:58
teatime bows.
gfldex :D
13:59 pmurias left
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␤»
Xliff LOL
gfldex see doc.perl6.org/type/Attribute
Xliff jnthn: Yikes!
jnthn, OK. I follow that. It just makes my head hurt. 14:00
I did ask for that, though! =)
Um. Allow me to rephrase the question though, because like perlpilot I need caffeine and made a mistake! 14:01
So... how can I get an attribute from an object if I don't know the attribute name UNTIL runtime?
perlpilot jnthn: Does $obj.^attributes have a guaranteed order? (I would guess declaration order)
[Coke] Xliff: his exmple doesn't get by name
Xliff [Coke], I know.
jnthn Xliff: Where does the name come from?
[Coke] you can iterate over them an inspect the names. 14:02
Xliff That was the mistake I was talking about.
[Coke] m: class A { has $.b }; my $obj = A.new(b => 42); say $obj.^attributes[0].perl;
camelia rakudo-moar 4a7eaa: OUTPUT«Attribute.new␤»
jnthn m: class A { has $.b }; my $obj = A.new(b => 42); say $obj.^attributes[0].name
camelia rakudo-moar 4a7eaa: OUTPUT«$!b␤»
gfldex m: class A { has $.b }; A.new."b"().say;
camelia rakudo-moar 4a7eaa: OUTPUT«(Any)␤»
jnthn You can filter on that for example
llfourn m: class A { has $.b }; my $obj = A.new(b => 42); $obj.^attributes.first(*.name eq 'b').say
camelia rakudo-moar 4a7eaa: OUTPUT«Nil␤»
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␤»
[Coke] I think there's a ticket about giving attributes nicer perl & gist output.
llfourn m: class A { has $.b }; my $obj = A.new(b => 42); $obj.^attributes.first(*.name eq '$!b').say
camelia rakudo-moar 4a7eaa: OUTPUT«Mu $!b␤»
gfldex m: class A { has $.b }; my $name = b; A.new."$name"().say; # are you asking for this?
camelia rakudo-moar 4a7eaa: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9VepBaM0zH␤Undeclared routine:␤ b used at line 1␤␤»
Xliff jnthn++: OK. That works for me.
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
Xliff HAH! 14:05
m: class A { has $.b }; my $name = 'b'; A.new(b => 42)."$name"().say; # gfldex++ -- Why yes! I was!
camelia rakudo-moar 4a7eaa: OUTPUT«42␤»
llfourn gfldex++ #actually understanding the question
gfldex i'm just guessing :)
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
Xliff And apparently my comprehension check, to! # perlpilot++
14:06 kaare_ left
Xliff s/to/too/ 14:06
Yeah. It's time for chai.
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
if i enter 'a' into the prompt it's fine, but 'aa' kills it
why doesn't 'aa' short circuit ?
14:11 pmurias_ is now known as pmurias
perlpilot perlawhirl: I don't understand. 14:12
perlawhirl m: my $i = 'a'.Int or do { say "Nope" }
camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
perlawhirl m: my $i = 'aa'.Int or do { say "Nope" }
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␤␤»
perlpilot ah
perlawhirl short-circuit 'or' doesn't work with 'aa'
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
jnthn m: my $i = 'aa'.Int || do { say "Nope" }
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␤␤»
perlawhirl m: my $i = try { 'aa'.Int } or do { say "Nope" }
camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
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␤␤»
teatime m: my $i = try { 'a'.Int } or do { say "Nope" }
camelia rakudo-moar 4a7eaa: OUTPUT«Nope␤»
jnthn m: say 'aa'.Numeric.WHAT
camelia rakudo-moar 4a7eaa: OUTPUT«(Failure)␤»
jnthn Curious
perlpilot m: 'a'.Int;
perlawhirl jnthn: 'aa'.Numeric doesn't exhibit the same behaivior
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␤␤»
perlpilot That doesn't look right
perlawhirl tho i realise Numeric is a Role and Int is a type
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␤␤»
Xliff m: 'aa'.Int
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␤␤»
Xliff Might be assuming that you meant 0xaa and is trying to convey that.
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
yeah i am using try block for now, just seems... off. wanted to bring it up just incase it was unintended 14:17
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)})␤»
gregf_ # was expecting that to fail typecheck :|
dalek c: 0d55631 | (Wenzel P. P. Peppmeyer)++ | doc/Language/objects.pod:
put C<.""> in a findable spot
14:21
literal is there an idiomatic way of combining these two? "for @a_of_h -> %hash {" and the subsequent "my ($k, $v) = %hash;" 14:22
er, sorry, that made no sense
I meant "for @a_of_h -> %hash {" and the subsequent "my ($k, $v) = %hash<foo bar>;" 14:23
when I only care about two of the keys
gfldex m: my %h = a => 1; for %h.kv -> $k, $v { say "$k => $v" }
camelia rakudo-moar 4a7eaa: OUTPUT«a => 1␤»
literal $v1 and $v2 being more appropriate
14:28 ecocode left
Walex gfldex: does not convert %h to a list "lazily" or all at once? 14:32
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 dev.midi.org/dtds/MIDINameDocument10.dtd.html
strangely I have a perceived need for it
14:33 azawawi joined
llfourn isn't it a bug that "call_with_args" shows up in backtraces? 14:34
azawawi sleep 10 * YEARS; use Modern::Perl6; # :)
hi
14:34 kaare__ left
gfldex Walex: it's created an Interator so it should be lazy see github.com/rakudo/rakudo/blob/nom/...sh.pm#L427 14:35
14:37 kaare__ joined
[Coke] might be worth bisecting the numeric conversion fail. 14:38
Walex gfldex: ah interesting, the core lib worth skimming over. 14:43
Walex already does not like some of the style and technique, but then he is very fussy :-) 14:44
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 ecs: 9a8149f | (Zoffix Znet)++ | html/style.css:
Match historical message style with that of auto-generated subpages
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, kaare__ left
[Coke] Walex: github.com/rakudo/rakudo/blob/nom/...re/Hash.pm 14:47
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.
Walex [Coke]: but that 'Hash.pm' seems pretty complete... 14:49
Perl6 looks more and more like a derivative of ALGOL 68
:-)
[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
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 :-)
[Coke] FYI, here's the bootstrap that comment refers to: github.com/rakudo/rakudo/blob/nom/...TSTRAP.nqp
note that while that looks like Perl 6, it's NQP.
Walex pmurias: actually most scripting languages (Perl and Python) for example are thinly disguided alternative syntaxes for LISP 2. 14:52
14:52 kaare__ joined
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:52
Walex wonders what was LarryW thinking :-) 14:53
mst Walex: well, everything is CLISPscript yes
Walex: though perl5 is more a lisp-6
geekosaur it's been claimed that every language is just syntax-changed lisp...
dalek c: 93d791f | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
fix broken link
c: f08dc9f | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
doc C<use soft;> and add .wrap example
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
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, ...
geekosaur: that is how it was intended, but it came out a bit different.
geekosaur although modern takes on it are dubiously thin
pmurias Walex: one could argue that it's not really lisp without the s-expresions ;) 14:56
Walex pmurias: I said LISP 2 :-) 14:57
14:58 ptolemarch joined
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
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
Xliff O?
Nice!
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␤»
perlpilot Walex: Earlier you were asking about something like the above. Is that helpful? 15:02
(I just think that more people should know about unpacking hashes in signatures)
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)␤»
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:04
perlpilot literal: the second one only ever iterates once. 15:05
dalek ecs: 3a3148d | (Zoffix Znet)++ | html/ (2 files):
Offset :target

To ensure it"s first lines aren"t covered by historical message when visiting a direct link to section
literal perlpilot: how come? 15:06
gfldex both [] and , create a list
15:07 kurahaupo joined
[Coke] one of those is an Array, I think. 15:07
m: (<1 2 2>, <3 3 1>).WHAT.say; [<1 2 2>, <3 3 1>].WHAT.say
camelia rakudo-moar 4a7eaa: OUTPUT«(List)␤(Array)␤»
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"))]␤»
gregf_ m: [<1 2 2>, <3 3 1>].map(*.unique)
camelia ( no output )
15:11 xinming left 15:12 xinming joined 15:13 jjido left
azawawi pasteboard.co/1kSGJYZM.png # Perl editor using Perl 6 GTK + Scintilla :) 15:16
15:17 domidumont left
azawawi starts working on GTK::Scintilla :) 15:18
15:18 jjido joined 15:19 perlawhirl left 15:20 _mg_ left
RabidGravy do it! do it! 15:20
15:22 khw joined 15:24 pat_js joined 15:25 ZoffixW joined
hoelzro o/ #perl6 15:25
ZoffixW Can someone with sudo perms on hack run passwd -l zoffix
Please :)
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
wth would a police cat do?? i.imgur.com/fRl1EVB.gif
that would be, like, useful.
ZoffixW teatime, so... that question is only for gentlemen? :P 15:27
teatime heh, appologies.
gfldex mice usually don't care about property rights
15:28 jjido left
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
hoelzro is writing a blog post about the consequences of NFG he experienced using Perl 6 to process a Russian corpus
ZoffixW teatime, I don't see any mentions online about cats in police service. I suspect that gif is just a joke 15:32
hoelzro, FWIW I had to use NFCs for my Anguish parser: perl6.party/post/Anguish--Invisible...nterpreter 15:33
hoelzro ah, I see
15:34 kaare__ left
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
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
yoleaux ZoffixW: I'll pass your message to timotimo.
15:36 ZoffixW left
hoelzro teatime: ah, thanks for pointing that out! 15:36
15:36 ptolemarch left
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.
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:38
15:40 jjido joined
dalek osystem: 4d282cb | azawawi++ | META.list:
Add GTK::Scintilla
15:45
azawawi RabidGravy: github.com/azawawi/perl6-gtk-scint...-world.pl6 :) 15:46
RabidGravy: now to fix build issues
15:48 ssotka joined
RabidGravy why didn't you make SSM a method on $editor? 15:50
also you can just do $app.set-content($editor_ ;-) 15:51
azawawi on it
once i fix the build issues 15:52
RabidGravy oh you've so got to make an editor for Perl 6 in Perl 6 15:53
I might not use it but it would be sweet nonetheless
15:54 jjido left
azawawi :) 15:56
15:57 rurban joined 16:04 jjido joined 16:05 kaare__ joined 16:10 skink joined
gregf_ m: say 100.Array 16:16
camelia rakudo-moar 4a7eaa: OUTPUT«[100]␤»
16:17 pmurias left
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:19 itaipu left 16:20 dogbert17 joined
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:21
Walex I am starting to think that my next favourite languages will be Perl6 and Rust... 16:24
16:24 sno left 16:30 mst is now known as mst{[, mst{[ is now known as mst 16:32 itaipu joined, huggable left, huggable joined 16:46 ZoffixW joined 16:47 abraxxa left
ZoffixW Is there a way to search for stuff in ticket bodies in RT? 16:47
RT's interface always makes me want to buy matches and a jug of gasoline... 16:48
16:50 dakkar left
llfourn does google index RT? 16:50
ZoffixW Probably, but it's index is incomplete 16:52
*its
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:55
16:56 acrussell joined
ZoffixW adds a mental note to write an RT scraper and plop a decent interface on it 16:56
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:57
(or something like that) 16:59
azawawi RabidGravy: hmm 17:05
RabidGravy: github.com/azawawi/perl6-gtk-scint...432e73f9bd :) 17:06
RabidGravy: should work on linux atm
RabidGravy cool 17:07
azawawi watches travis-ci.org/azawawi/perl6-gtk-sc.../134223812 17:08
skink RabidGravy, That appears to work, thanks 17:13
Now for my next trick, I need to get the contents of such a Buf to be the stdin for a process 17:14
run :in($buf) and :in($*OUT.write($buf)) don't seem to work
17:16 spider-mario joined, jjido left
timotimo you'll have to write it into the proc::async after it's started 17:17
dalek c: b78ed07 | (Jan-Olof Hendig)++ | doc/ (3 files):
A bunch of broken links fixed. AlexDaniel++ for running checklink on the doc site
azawawi RabidGravy: so now we're a step closer to a true Perl 6 editor :) 17:19
RabidGravy yay 17:20
azawawi++ # making stuff
17:20 mosh joined
ZoffixW :o a true Perl 6 editor :o 17:20
17:30 rurban left
skink asyncwritebytes requires a native array of uint8 or int8 17:33
tony-o azawawi: so.. works? 17:34
actually, installing to find out 17:37
azawawi just committed sugar-free OO API :) 17:38
github.com/azawawi/perl6-gtk-scint...-world.pl6
17:39 ggoebel115 joined
azawawi travis-ci.org/azawawi/perl6-gtk-sc.../134229139 17:39
tony-o ah, gtk::simple fails on osx
17:40 ptolemarch joined, ggoebel114 left
azawawi brew update 17:40
brew install gtk+3 17:41
17:41 domidumont joined
azawawi jnthn++ # for building GTK::Simple::Widget github.com/azawawi/perl6-gtk-scint...Editor.pm6 :) 17:42
Perl6 implementation is just so elegant so far :)
tony-o azawawi: gist.github.com/tony-o/b03abf04a82...54a7d9716b <- this is what i get from running that hello-world example 17:50
azawawi unfortunately i do not a macos box to test on it 17:51
i only use travis ci macos vm 17:52
17:52 brrt joined
tony-o ah 17:52
17:52 itaipu left
tony-o it's happening here: github.com/azawawi/perl6-gtk-scint...ld.pl6#L25 17:53
azawawi oops my bad
fixing it :)
tony-o one sec, i'll get ll-exception
ah, lmk if you want the ll-exception 17:54
skink timotimo, Seems like proc::async writing a Buf[int16] is troublesome 17:58
17:58 khw left
timotimo oh? hmm. 17:59
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
[Coke] (rt scraper) no, use the CLI. 18:03
which is what I use to drive the summaries I dump in perl6-dev occasionally, like:
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:04
rt.perl.org/rt-cli.html has the docs on getting it setup. github.com/coke/rt-six-help has that script. 18:05
azawawi tony-o: done :)
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
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
timotimo sometimes it's hard to find the right place, though, i suppose
[Coke] ZoffixW: full content search still needs to be enabled on the server, yes.
skink Ah, wait
[Coke] I have a ticket open for that, which is pending an upgrade.
ZoffixW Neat. [Coke]++ 18:07
skink Buf.new($seq.cache.flat) works
azawawi github.com/azawawi/perl6-gtk-scint...-world.pl6 # feedback appreciated
18:08 itaipu joined
azawawi tony-o: 'panda install GTK::Scintilla' on travis ci MacOSX btw 18:08
tony-o: s/on/passed tests on/ 18:09
[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
so even if you do it the hard way, it doesn't have to be -that- hard.
skink $fh.write(Buf[uint8].new($data.map(&int16_to_uint8s).cache.flat))
There's probably a better way to do that :)
azawawi pasteboard.co/1l4cpzJE.png # Perl Editor in Perl 6 :) 18:11
tony-o what editor are you using the background azawawi ? 18:12
azawawi atom
ZoffixW :o
azawawi, you get syntax highlights even?
tony-o it doesn't look like vim
ZoffixW Oh, p5 18:13
azawawi atom.io/packages/atom-perl6-editor-tools
:)
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 :)
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.
Native call expected return type with CPointer representation, but got a P6opaque
on line 25 :p
18:14 _mg_ joined
tony-o azawawi: disregard - didn't notice you changed hello-world 18:14
azawawi that's what happens when i eat sugar after days of not eating sugar :) 18:15
so much code
ZoffixW \o/
tony-o azawawi: ah, same dump with segmentation fault: 11 when i try to hit a key - but it opens an editor window now :)
azawawi cool
we're getting somewhere 18:16
the fun thing is that i do not have macos x box and it worked so far :)
tony-o what does the expected 'CPointer representation, but got a P6opaque' mean ? 18:17
18:17 kalkin- left
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, shlomif joined 18:20 ufobat left, rindolf left
azawawi tony-o which line? 18:21
18:25 shlomif is now known as rindolf, khw joined 18:27 kalkin- left, mohae_ joined
tony-o azawawi: it isn't saying anymore, and -ll-exception isn't helping, just segfaults with the update 18:28
18:30 kalkin- joined, mohae left 18:31 itaipu left
azawawi hmmm... Scintilla editing widget + Perl 6 supplies and parallelism = PadreGTK6+ :) 18:31
18:32 TimToady left, AlexDaniel joined 18:33 TimToady joined
AlexDaniel ZoffixW: by the way, if you just search for 404 in the output, you will see LOTS of blatantly wrong stuff 18:34
ZoffixW: doc.perl6.org/type/NaN doc.perl6.org/type/Enumeration doc.perl6.org/routine/containers and so on
ZoffixW AlexDaniel, I'm not saying that ALL of them are false positives, just that the few I checked were.
And sure, there are 200+ markup errors on that page. They could be the cause 18:35
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
:)
18:39 brabo left
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
18:40 brabo joined
ZoffixW same 18:41
18:42 Deep_Thought left
[Coke] fires up a local build of docs and markup validator SAC 18:47
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.
AlexDaniel ZoffixW: yes
[Coke]: I don't see any problem. Just point your finger at random place of the output and try to fix it
[Coke] AlexDaniel: the problem is that one giant ticket is hard to close. 18:49
that's all.
I don't see nested <link>, ZoffixW
AlexDaniel [Coke]: sure, yes. But creating 100 tickets for every issue in the output is not a good idea too
ZoffixW [Coke], links as in <a>s
[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>
[Coke]: I will rerun the whole thing as we move forward, consider the output to be a todo list :) 18:51
18:52 ZoffixW left
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:55
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:56
18:57 brrt left, pat_js left 18:58 labster joined, jjido joined
[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
*play
19:00 zakharyas left 19:01 sno joined
hoelzro the optimizer tortures you, so you then play bloodborne, which also tortures you? =P 19:02
moritz hoelzro: I don't think <:Combining_Mark> makes sense in NFG strings, no 19:03
m: say so 'ä' ~~ /<:Combining_Mark>/
camelia rakudo-moar 4a7eaa: OUTPUT«False␤»
hoelzro moritz: how would you feel about a warning message if the regex parser sees it?
moritz hoelzro: wait a second, maybe for strings consisting only of cominbing marks
hoelzro that's the only time it does anything, afaict
19:04 jjido left
moritz m: say so "\c[MUSICAL SYMBOL COMBINING STEM]" ~~ /<:Combining_Mark>/ 19:04
camelia rakudo-moar 4a7eaa: OUTPUT«True␤»
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
I mean, there *are* legitimate use cases; how do you disable the warning then?
hoelzro yeah, that's true 19:06
maybe it belongs in a linter
I'd rather not add $*DISABLE-COMBINING-MARK-THINKO-WARNING
we have enough dynamic variables flying around!
mst fly! be free()! 19:07
[segmentation fault]
hoelzro hehe
19:09 jjido joined 19:12 adu joined
[Coke] hoelzro: at least with bloodborne I can level up. 19:12
hoelzro haha, true, true 19:13
[Coke] well, eventually, anyway. :) 19:15
dalek c: c2c3eb8 | (Jan-Olof Hendig)++ | doc/Type/Str.pod:
Fixed broken link
19:16
[Coke] Noooo, now I have to rebuild the whole thing again!
.... sooooo slllloooooow 19:18
19:19 azawawi left
AlexDaniel [Coke]: why not rebuild just some specific files? 19:19
[Coke] because that's not how the makefile currently works. 19:20
19:20 telex left
[Coke] make just runs htmlify, which does no dependency checking. 19:20
I'm not actually killing my run for that one change, but having such a slow turnaround time (like 30 minutes) is insane. 19:21
gfldex [Coke]: you may want to give github.com/gfldex/pod-to-bigpage a try 19:22
19:22 telex joined
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, |meta joined
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.
azawawi pasteboard.co/1l8QqzMf.png # GTK::Scintilla events demo
gfldex i use it to preview my dockings and query the docs with fulltextsearch 19:24
AlexDaniel [Coke]: I've often used bin/p6doc to check some basic stuff 19:25
it depends on what you do
19:29 tbrowder joined 19:30 yqt joined
dalek c: 9d0cf6e | (Jan-Olof Hendig)++ | / (2 files):
Added docs for X::IO::DoesNotExist
19:31
19:32 sno left
azawawi good night & 19:32
19:32 azawawi left, domidumont left, ocbtec left 19:38 tbrowder left
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
(from the official Angular 2 user guide)
(evening, #perl6) 19:45
19:46 adu left
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
now if only markdown came up with something similar for []() vs ()[]
masak oh, I've long since found my mnemonic for links in Markdown 19:47
allow me to share it with you, sir
it's [mumble mumble](and oh the URL is mentioned here, parenthetically) 19:48
tadzik please do!
masak if that makes any sense :)
the point is that one could imagine a URL being mentioned in parentheses in normal, non-Markdown text
seems to work for me to remember it 19:49
19:50 yqt left
tadzik hmm, makes sense 19:51
pochi Is there a way to turn off the precomp stuff globally?
RabidGravy I actually quite like angular 1, but 2 yeah, it's not even javascript 19:52
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 → “(…)”
skink You know your implementation is naive when it takes almost two orders of magnitude longer than the original... 19:54
And here I was writing it to be faster :(
19:56 dwarring joined 19:59 yqt joined
nine I wonder how markdown copes with IPv6 URIs like [2a02:2e0:3fe:1001:7777:772e:2:85]/ 20:04
20:04 _mg_ left
lizmat pochi: globally would mean a startup of 1.5 minutes to compile the setting everytime ? 20:05
nine tough [heise.de]([2a02:2e0:3fe:1001:7777:772e:2:85]) is probably better than (heise.de)[[2a02:2e0:3fe:1001:7777:772e:2:85]]
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
dalek c: fdc9b34 | (Jan-Olof Hendig)++ | doc/ (2 files):
Another five broken links fixed
20:07
pochi nine: I keep running into this bug
nine: RT 128287
20:08 jjido left
[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
#128287
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128287
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:11
20:13 sno joined
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:15 acrussell left 20:17 skids left
mst [Coke]: I thought if you didn't have the %* it did? 20:17
20:17 cpage_ left
[Coke] github.com/perl6/doc/blob/master/h...fy.p6#L108 does not explode. 20:18
(and does not have the %*) 20:20
20:20 nadim joined 20:21 labster left, nadim left
mst hmf 20:21
EIDEA then, sorry
20:21 nadim joined
[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:21
any doc developers have a preference as to "makefile" or "smarter htmlify.p6" ? 20:25
20:26 nadim left 20:27 nadim joined
skink RabidGravy, Oh look, I could've just been using Audio::Sndfile's read/write stuff :) 20:29
RabidGravy well if you said that's what you were doing ;-) 20:31
20:32 kaare__ left, huggable left
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"
skink since its tests use it but it's scheduled to be installed after
RabidGravy test depends then 20:35
I thought I did that
20:35 al2o3-cr joined
skink Hm, it is in test-depends, but panda didn't install it before testing 20:35
Weird
20:36 labster joined
RabidGravy panda just installs all of the build test depends up front afaik 20:36
is it possible you have an old version of JSON::Fast? 20:37
righteous pain that panda doesn't allow a full dependency specification 20:38
[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..*>
I manually installed it after so I probably just had an old version 20:40
20:40 nadim left, al2o3-cr left
RabidGravy yeah, it relies on that version (which is the default bundled with panda now, but wasn't until a while back) 20:41
[Coke] doc question : shouldn't html/.htaccess go to /language/5to6-nutshell so it works when run locally? 20:44
dalek Heuristic branch merge: pushed 1000 commits to doc/makefile by coke 20:45
geekosaur o.O
busy beaver
[Coke] just the opposite, that branch was super old.
skink RabidGravy, I was gonna toy with writing a P6 version of: github.com/skinkade/sundry-scripts...er/clipfix 20:47
TimToady back online after a week...
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?
masak m: say $_ for qww<foo „hello world” bar> 20:48
camelia rakudo-moar 4a7eaa: OUTPUT«foo␤„hello␤world”␤bar␤»
AlexDaniel m: say $_ for qww<foo “hello world” bar> 20:49
camelia rakudo-moar 4a7eaa: OUTPUT«foo␤hello world␤bar␤»
lizmat TimToady o/
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)
yoleaux TimToady: I'll pass your message to AlexDaniel.
AlexDaniel .
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)
AlexDaniel TimToady: how consistent is “” with shell quoting? ;)
masak yoleaux: that was some meaningless message-passing right there! :P
TimToady AlexDaniel: well, it's not consistent *yet* with shell quoting, but you never know... 20:50
20:50 brrt joined
RabidGravy skink, doable in P6 but you may want to bind nyquist somehow 20:50
TimToady I'm fine with making „hello world” work there 20:51
AlexDaniel sounds great
skink RabidGravy, I wanted to see how the performance was if the clip-detecting/correcting stuff were written multithreaded in P6 20:52
RabidGravy it would be interesting but not very fast 20:53
20:53 cpage_ joined
dalek c: 60d0eda | (Jan-Olof Hendig)++ | doc/Language/variables.pod:
Another batch of broken links fixed
20:53
skink On my system, the Nyquist script takes e.g. 3min to process a 4min file
Somewhere around there
AlexDaniel dogbert17: I'm glad that you found it useful 20:54
dogbert17++
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: gist.githubusercontent.com/AlexDan..._checklink
00:50Z <AlexDaniel> dogbert17: the output is slightly redundant but I've found some obvious errors while scrolling it
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
dogbert17 oops 20:57
AlexDaniel dogbert17: that's ok :)
skink The Nyquist interpreter doesn't seem to have any sort of library to bind to
Another option is having some C code do the heavy lifting and just using P6 to wrap that more cleanly than the shell/lisp
AlexDaniel dogbert17: perhaps I should find a way to generate it locally without actually scraping doc.perl6.org :)
dogbert17 AlexDaniel: sounds like a good idea, did it take long to scrape the site? 20:58
AlexDaniel dogbert17: less than an hour
[Coke] AlexDaniel: check it out. "make run"
dogbert17 AlexDaniel: cool 20:59
AlexDaniel [Coke]: yeah
ok, #128304 21:00
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128304
21:01 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'Merge branch 'master' into makefile' 21:01
travis-ci.org/perl6/doc/builds/134283118 github.com/perl6/doc/compare/64783...4e8bc96f5e
21:01 travis-ci left
dalek c/makefile: 350524c | coke++ | / (5 files):
First pass at making Makefile dynamic-ish
21:04
21:06 robinsmidsrod joined 21:08 brrt left 21:11 nadim joined
[Coke] huh. apparently GCC means something at $dayjob that isn't a compiler. 21:15
21:16 grondilu joined
RabidGravy skink, there is a libnyquist in the audacity sources github.com/audacity/audacity/tree/...libnyquist 21:16
timotimo [Coke]: is it something naughty? or a curse-word?
[Coke] timotimo: en.wikipedia.org/wiki/Gulf_Cooperation_Council , I think. 21:17
timotimo oh, huh 21:18
21:18 kurahaupo left
skink RabidGravy, That's different :) 21:19
21:19 rurban joined
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 21:26 jjido joined, kurahaupo joined 21:28 ptolemarch left 21:31 jjido left 21:36 setty1 left 21:37 pmurias joined 21:38 kurahaupo left
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:39
mst angular is pretty anti-hipster, yeah 21:40
21:40 jjido joined, skids joined
geekosaur anyone else remember the general cinemas co. pre-movie snippets? :p 21:41
(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 molaf left, kurahaupo joined
pmurias mst: I'll check that out, I like angular.js but react.js will integrate with rakudo-js a lot better ;) 21:47
mst pmurias: redux is also actually really nice as well as being the hipster wank material of choice at the moment 21:48
I *think* I can get something *I* like better with mobx
jast personally I don't like angular, ember, react and all those
conceptually out of all these frameworks I liked Vue.js most, but it's not nearly as well-known 21:49
21:50 mr-foobar left
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:50
21:52 dolmen left
mst vue.js is ok. but react lets me implement template packs as an ES6 class 21:53
and
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 jjido left
mst MegaWidget ({ args, go, here }) { let { SubWidget } = this; return <div id={args}><SubWidget go={go} here={here}></div> } 21:54
is actually surprising not awful
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)
so that alone makes mixing the two rather tricky... plus I simply don't like the mixing 21:56
21:56 jjido joined
mst jjido: well, basically, I keep the code and the markup separate anyway 21:56
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
mst right, basically, my react code works equivalently
jast sure, but in my case the markup is customized at runtime
mst except it's multiple templates per file
and they happen to be parsed by somnething else
hrm?
jast that's what I just said... all my widgets are in the same file 21:58
the markup, anyway
and the code is one file per widget or whatever I like
mst oh, you're doing basically
<div id="Widget">,...</div><div id="SubWidget">...</div> ?
jast no
mst so how are you doing multiple sets of markup in one file?
jast well, that's one way
21:59 kurahaupo left
jast actually it's pretty much exactly that, only it's <script> tags instead of <div> 21:59
to prevent the engine from messing with the contents
(the browser engine, I mean)
pmurias mst: re why use react.js from Perl6, have you seen react-blessed? (it allows one to write curses like interfaces with react)
jast but I hide that away from whoever makes the templates
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
in this case the app has a pretty darn powerful template engine so I use that
jjido mst wrong person 22:01
mst jjido: sorry, you'd just joined and that put you ahead in my autocomplete
jast jjido: you joined at an inopportune moment for tab completion ;)
jjido interesting we get to talk about JS frameworks on this channel ;)
mst jast: right, so far, I'm not feeling the need to do that
jast yeah, my case is special
mst if I do, I figure I can still process it into react components
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)
I got a serious ick factor from JSX to begin with
I'm finding that, in practice, it's not actually that icky
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
jjido can you replace the template engine in these frameworks?
jast most of these frameworks kind of *are* the template engine 22:04
so, usually not
mst react is just a rendering layer
putting non-rendering logic into it makes bunny cry
hence redux, mobx, etc.
jast template engines are rendering layers, too
unless we're talking about C++ and I just didn't notice :}
mst yes, that was rather my point
22:04 ocbtec joined
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
jjido well they are more sophisticated than Mustache for example
is it possible to use Mustache for the template part
jast a number of them have syntax similar to Mustache or Handlebars
22:06 jjido left
jast e.g. Vue.js which I brought up earlier 22:06
Vue.js implements Handlebars syntax with a few extras
it's not as logic-less as Mustache, though
22:06 firstdayonthejob joined
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
jast completely logic-free *is* possible
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
jast I've been thinking about how to make it practical, but didn't really get around to writing anything practical
mst yeah, I did implement p3rl.org/HTML::Zoom
I've done this once already :)
jast there's an extension to react that does use plain HTML and magicks it into react widgets, I think
forgot the name
22:09 rindolf left
mst I've seen a couple 22:10
they weren't quite what I wanted
jast yeah, HTML::Zoom is kind of nice... but it goes a bit further than what I was envisioning
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
then there's p3rl.org/Template::Pure which is probably a much less crazy API/implementation 22:12
Zoom was what pushed me over the edge into writing Moo
22:12 pmurias left
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:12
if a different theme/frontend wants to do a different kind of highlighting for the same data, you need different code 22:13
so what I personally like is for the markup to be slightly more declarative about where the data goes
but not to the extent that you have explicit 'control flow' in the markup 22:14
22:14 kid51 joined
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
... and absolutely no duplicate boilerplate
22:15 TEttinger joined
jast still waiting for someone to implement that for me ;) 22:16
mst one day I'm going to try, though you may hate the implementation ;) 22:18
jast I'm suspending judgement until I see it 22:20
22:23 grondilu left 22:26 RabidGravy left 22:31 kurahaupo joined 22:41 Sgeo joined 22:42 kurahaupo left 22:43 DarthGandalf left
tony-o html::zoom is pretty interesting 22:51
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.
jast very nice for static generation, yeah
tony-o what would the template look like without the flow control but still retaining the ability to generate a list of items? 22:54
22:55 anomie__ joined
jast the examples for HTML::Zoom cover that 22:57
22:59 Zero_Dogg left, Zero_Dogg joined 23:03 firstdayonthejob left 23:08 spider-mario left 23:11 rurban left 23:32 cdg left 23:34 gorgonzola joined 23:38 pierre_ joined, ocbtec left 23:41 Actualeyes left
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!
teatime /r/commandline I think 23:43
I assume this is your stuff: hoelz.ro/blog/unsung-heroes-of-the-command-line 23:44
hoelzro ah, yes! 23:45
23:46 wamba left 23:56 pierre_ left