»ö« 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.
Hotkeys what up p6 00:22
atweiden m: my @a = qw<zero one two>; my $a = @a.deepmap(*.clone); @a[0] = 'Zero'; $a[0] = 'Zero'; 00:46
camelia rakudo-moar 855de7: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/uqQa0ykUeM line 1␤␤»
atweiden m: my @a = qw<zero one two>; my $a = @a.deepmap(*.clone); @a[0] = 'Zero'; $a[0] = 'Zero'; say @a[0].perl; say $a[0].perl; 00:47
camelia rakudo-moar 855de7: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/jJAvS_EtvO line 1␤␤»
atweiden can anyone say why this is happening?
m: my @a = qw<zero one two>; my \a = @a.deepmap(*.clone); @a[0] = 'Zero'; say @a[0].perl; a[0] = 'Zero'; say $a[0].perl; 00:49
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3PBin828cT␤Variable '$a' is not declared. Did you mean '@a'?␤at /tmp/3PBin828cT:1␤------> 3ro'; say @a[0].perl; a[0] = 'Zero'; say 7⏏5$a[0].perl;␤»
atweiden m: my @a = qw<zero one two>; my \a = @a.deepmap(*.clone); @a[0] = 'Zero'; say @a[0].perl; a[0] = 'Zero';
camelia rakudo-moar 855de7: OUTPUT«"Zero"␤Cannot modify an immutable Str␤ in block <unit> at /tmp/XjiAxYpT0E line 1␤␤»
yadongz p6: say "Hello world" 01:28
camelia rakudo-moar 855de7: OUTPUT«Hello world␤»
yadongz m: say now - INIT now
camelia rakudo-moar 855de7: OUTPUT«0.00224836␤»
yadongz :a 01:36
timotimo heyo 01:57
timotimo m: say now - BEGIN now 02:03
camelia rakudo-moar 855de7: OUTPUT«0.01109792␤»
Herby_ Evening, everyone! 03:26
dalek ecs: fe8f074 | skids++ | S17-concurrency.pod:
spec Channel.fail and Channel.closed
04:43
dalek kudo/repl6: 384a70c | hoelzro++ | src/ (2 files):
REPL6: Stash the compiler object away inside the REPL
05:14
kudo/repl6: 2374c4a | hoelzro++ | src/core/REPL.pm:
REPL6: Implement update-completions
kudo/repl6: 377a9ae | hoelzro++ | src/core/REPL.pm:
REPL6: Update completions before reading a line

The context of an evaluation is saved before reading the next line but after the call to eval(); we can't really guarantee when it's going be. Definitely LTA, but gets the job done.
sortiz hoelzro++ # More work in REPL 05:17
El_Che rakudo people: I see there are asc signatures in the downlaod directories, but I don't see instructions (or keys) in the site to verify the signature 08:20
moritz gpg --verify 08:24
and the keys can be found on the public key servers
proper documentation welcome :-)
lizmat waves from the North Sea 08:25
DrForr Where ya headed? 08:26
lizmat Newcastle Upon Tyne 08:29
DrForr Aha.
lizmat som R&R in Northern England :-) 08:30
*some
DrForr I'd go back to Edinburgh in a heartbeat. 08:30
lizmat hehe... not going to make it there this trip :-( 08:33
stmuk lizmat: Durham is very nice if you get chance to see it 08:34
lizmat stmuk: we'll keep that in mind... initially we're going to Harrogate 08:37
stmuk virtualsue recommends Betty's Tea Rooms Harrogate :) 08:38
dalek Iish: 01291d0 | (Salvador Ortiz)++ | lib/DB (19 files):
Typed Exceptions for proper error handling

Uses X::DBIish::* for pre-connect exceptions and X::DBDish::* for post-connect errors
08:40
Iish: 58b629a | (Salvador Ortiz)++ | t/35-pg-common.t:
Pg: Typo in dbname used for testing
Iish: 8ed4e18 | (Salvador Ortiz)++ | lib/DB (14 files):
All classes now does DBDish::ErrorHandling

Error handling round 2: Make DBDish::ErrorHandling a proper role. RaiseError now simply control if an Exception are throwed or returned as a Failure for standard Perl 6 semantics. Orthogonally all errors are reported up-tree (via the .err and .errstr methods) to conform with Perl 5 DBI. See t/41-sqlite-exec-error.t for examples. So, IMO this Fixes #4
Iish: 573d679 | (Salvador Ortiz)++ | / (3 files):
Extend tests for error handling
lizmat stmuk: we actually have been there, it was nice but way too crowded with all the buses of tourists :-(
stmuk ah :( 08:42
lizmat ok, deboarding time... & 08:50
RabidGravy rarr! 09:08
sortiz \o RabidGravy 09:09
stmuk arjj! zipp!
dalek Iish: e63c135 | (Salvador Ortiz)++ | / (2 files):
For the happiness of panda's users: v0.1.2
09:23
azawawi hi 09:27
where can i find a POD6 cheatsheet/
?
arnsholt I usually look at the documentation spec, TBH 09:28
azawawi arnsholt: thanks 09:39
RabidGravy is there some HTTP Authentication thingy in the ecosystem that I missed, i.e. given an Authentication: header it picks the bits out and returns the type and the split out credentials? 09:48
or something like that
getting a bit carried away here and about to implement the source authentication for this streaming thing 09:49
DrForr RabidGravy: I'd like your opinion on this - I'm adding session support tonight/over the weekend for Prancer and was looking at how Dancer handles sessions with a DSL. I think I'm probably better off just passing the session as an argument to the handler. That gives me a full object to work with, and people can write $SESSION.<logged-in> = 1; # and such rather than session('logged-in',1); and having to do some rather ugly hacks. Thoughts? 09:54
(he says, 5 minutes before a scrum meeting.) 09:55
multi GET( $SESSION, '/path', '/to', $username ) is handler { $SESSION.<is-valid> or die... } 09:56
RabidGravy yes, passing a proper object, maybe as a named argument, it would be useful to have it available as a multi selector for sure 10:01
DrForr Yeah. It doesn't have the convenience of being able to throw in a 'session(...)' anywhere without editing the arg list, but OTOH Dancer requires a bunch of DSL entries to do session management, and a single object serves the same purpose w/o cluttering namespace. 10:03
RabidGravy an alternative would be to have a "session" term (somewhat similar to "self") which is actually a $*SESSION dynvar under the hood 10:05
DrForr Yeah, I think I'll stick with this approach for now. I figured out last night how I can emulate what Dancer does, but it's ugly in that I'd have to wrap every user-provided handler in a call and have the 'session' "function" look backwards in the callstack for the marker and retrieve the session ID. Quick, but prone to all sorts of problems. 10:08
The first one being that the function call could get optimized away. 10:09
It could grow into a God object if I don't watch it, though. I can restrict it to *only* the stuff that requires a per-browser ID. 10:12
liztormato_ 1DrForr: depending on introspection is generally a code smell, or so I'm told 1 10:17
RabidGravy RARR! 13:43
llfourn has anyone else been getting these randomly over the past week or so: moar(55541,0x7fff7b6d9000) malloc: *** error for object 0x7ffb13cbe820: pointer being realloc'd was not allocated 13:46
*** set a breakpoint in malloc_error_break to debug
it seems to be non-deterministic and only happens on my mac so far
timotimo uh-oh 13:47
could you potentially bisect it? or does it happen too randomly?
is the problem excerberated by passing --full-cleanup to the moar commandline?
llfourn leme check this 13:48
yes it does exacerbate it.. sort of, now it prints it even at the end when it works 13:51
llfourn usually it fails at runtime 13:51
llfourn but now runtime succeeds and it prints the message 13:51
timotimo right
usually moar just exits instead of cleaning up all objects it owns
llfourn I've never done a bisect before but no time like the present to learn 13:51
timotimo because the OS will just throw out all the mapped memory regions and resources and that's the end of it
llfourn makes sense 13:52
timotimo --full-cleanup is more of a debugging thing to see if we do our memory management right
llfourn do I just go into moar and do bisect or do I do it in rakudo because of NQP/moar versioning 13:53
(and then Configure.pl again) 13:54
psch afair you can replace moar under rakudo/nqp without trouble
timotimo just recompile moar and if you see "invalid instruction" or totally bogus behavior, make clean/make install in rakudo
llfourn kk
psch right, barring format changes
or new ops
timotimo twitter.com/bluedelliquanti/status...8795464704 - this made the world all better again when i saw it 13:56
llfourn looks like it's been happening for a while. It must be that I've changed my code recently to be hitting it. 14:16
timotimo damn
could you run such a program under valgrind, or give us the backtrace malloc gives, or compile moar with --asan?
llfourn yes how do I do either of the last two? 14:19
valgrind is buggy on mac I find
maybe I'll check if it happens on debian as well
hankache Hello * 14:22
llfourn o/
timotimo well, you'll want to give moarvm's Configure.pl the --debug=3 and potentially a lower --optimize= value. and on top of that, you can pass --asan 14:23
llfourn timotimo: rgr
timotimo if you've been using --gen-moar and friends so far, you'll need to make sure to pass the same --prefix that also has your nqp and rakudo in it 14:24
timotimo i've got to be AFK for a bit 14:27
llfourn timotimo: thanks for your help :)
timotimo oh, and using the very latest moarvm would probably be good, since there was many memory management changes recently - well, mostly fixes of leaks 14:28
llfourn yeah I did go to the latest before mentionig it in irc
timotimo i thought so, but i figured i'd just point it out to be safe 14:29
llfourn timotimo: in case you're still here: it doesn't happen on debian 14:32
timotimo ugh, that's annoying 15:00
RabidGravy I'd be curious to see if it occurred on FreeBSD too 15:06
mspo more like openbsd which defaults to ASLR? 15:07
mspo (guessing that aslr is related) 15:08
llfourn timotimo: attempt at backtrace: gist.github.com/LLFourn/f70cea5e07ff0e49a852 15:10
dalek c: 6a25221 | jjatria++ | doc/Language/operators.pod:
Fixed wrong operator

The sample definition for "~" was the same as that for "-"
15:12
c: ff3da18 | (Zoffix Znet)++ | doc/Language/operators.pod:
Merge pull request #405 from jjatria/operators-fix

Fixed definition for ~
timotimo llfourn: every REPR has its own gc_free function, and they're all called the same thing 15:13
llfourn: you can't get a file and line number from frame number 2?
llfourn timotimo: I just updated the gist to show a different trace when it fails at runtime
timotimo oh, what?! inside set_size_internal?
that's very interesting; that'd be VMArray probably
yeah, only MVMArray has set_size_internal 15:15
llfourn looks into how to get file and line numbers in backtrace
oh I don't think I have the symbols there properly 15:16
jnthn llfourn: Does your code involve multiple threads?
llfourn jnthn: no
jnthn OK
Then it'll likely be a GC invariant violation...somewhere... /o\
timotimo oh? i would have thought memory corruption 15:17
llfourn: were you able to build moar with --asan?
llfourn timotimo: no it gets angry at me, probing whether your compiler thinks that it is gcc Can't compile simple gcc probe, so something is badly wrong (if on linux, maybe you need something like 'sudo apt-get install build-essential') at build/probe.pm line 92.
timotimo right, that happens to me, too
something seems to have broken --asan support at some point 15:18
.o( and also it won't say what exactly is wrong there, grr )
FROGGS I'd love to see a --verbose option there
so you get the C file dumped as well as the error message
jnthn timotimo: Those almost always lead to memory corruption
timotimo oh 15:19
/usr/bin/ld: cannot find /usr/lib64/libasan.so.2.0.0
well, that'd explain something 15:20
now that i have installed libasan, it actually works
llfourn: so what happens if you install libasan on your machine? 15:22
llfourn timotimo: I'm not sure how I get libasan on my mac 15:23
I have found this: github.com/Homebrew/homebrew/pull/17039
timotimo hm 15:24
clang has asan "built in" or something, but you'll still need the library to link your program against, i think?
llfourn I haven't found it 15:29
I gotta take a break ill see if I can get a better trace tomorrow or so :) 15:30
llfourn I might have to install GDB instead 15:31
GCC*
timotimo i find it hard to believe that it's clang's fault there's no line numbers
did you really --debug=3 in your Configure.pl?
llfourn perl Configure.pl --prefix=/Users/llfourn/tmp/p6/rakudo/install --debug=3 && make 15:32
is what I did
timotimo weird. could something have overridden that?
i don't think we have a "strip" anywhere in our Makefile 15:33
llfourn is there a way to ask moarvm the debug level it was compiled with? 15:33
timotimo m: say $*VM<config>
camelia rakudo-moar 855de7: OUTPUT«Type VM does not support associative indexing.␤ in block <unit> at /tmp/6_eDxll998 line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/6_eDxll998 line 1␤␤»
timotimo m: say $*VM.config. 15:34
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kyN92SrK8k␤Malformed postfix call␤at /tmp/kyN92SrK8k:1␤------> 3say $*VM.config.7⏏5<EOL>␤»
timotimo m: say $*VM.config
camelia rakudo-moar 855de7: OUTPUT«ar => ar, arflags => rcs, arout => , asm => .s, asmout => -o , asmswitch => -S, auxclean => @:, be => 0, bindir => /home/camelia/rakudo-m-inst-1/bin, booltype => _Bool, can_unaligned_int32 => 1, can_unaligned_int64 => 1, can_unaligned_num64 => 1, cancgoto …»
timotimo perhaps somewhere in there?
m: say $*VM.config.keys
camelia rakudo-moar 855de7: OUTPUT«(dcbrule ar mastdir tomrule syslibs[2] shaobjects ccshared be dynasmlua ld mtlib mtobjects noreturnspecifier perl shaclean static_inline ccdebugflags auxclean thirdpartylibs config ccinc booltype ldout moarlib mtrule syslibs[0] dcrule dcbobjects cflags lao…»
timotimo ccdebugflags, for example?
and cflags
m: say $*VM.config<cflags ccdebugflags ldflags> 15:35
camelia rakudo-moar 855de7: OUTPUT«(-Wdeclaration-after-statement -Werror=declaration-after-statement -O3 -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -g3 -O3 -DNDEBUG -Wl,-rpath,/home/camelia/rakudo-m-inst-1/lib -Wl,-rpath,/home/camelia/rakudo-m-inst-1/share/perl6/site/lib)␤»
timotimo there you see it has -g3, that's the debug level
llfourn yeah I have that too
timotimo okay. well, that's weird
llfourn but I just recmopiled so I'll check gdb again
timotimo on the other hand ... perhaps it's just glibc (or whatever) that'd need support for debug symbols?
timotimo perhaps libunwind or something needs to be present?!? 15:36
this is hard to google for :)
llfourn no luck 15:38
timotimo apparently there's an env var called "MALLOC_CHECK_" that you can set to 2 ?!?
llfourn when compiling moar or running? 15:39
llfourn doesn't do c stuff at all
anyways me sleepy. I'll give it another shot tomorrow. 15:40
timotimo when running
okay
have a good rest!
i hope we'll figure this out eventually 15:41
geekosaur that's a glibc malloc debug feature, yes. (so effectively linux/hurd only) 15:42
timotimo darn 15:43
ely-se tfw someone feels the need to mention Hurd 15:49
timotimo hurd could be cool at some point 15:50
geekosaur started out in #haskell this morning, pedantic precision now on the brain >.>
timotimo "got out on the wrong channel of the bed"? 15:51
geekosaur something like that
RabidGravy isn't the *idea* of hurd actually older than linux? 15:56
timotimo i think so? 15:58
perlpilot yes.
timotimo going to linux with the GNU system was kind of a compromise, wasn't it?
gnu needed a kernel, linux needed a userland
perlpilot (and hurd was imaginary) 15:59
RabidGravy www.gnu.org/software/hurd/history/hurd-announce 16:00
geekosaur afaik the gnu project never adopted linux, hurd was always their goal. linux needed a userland and adopted gnu
(this is part of the reason for the whole "gnu/linux" foofooraw, some linuxers see Stallman's insistence on that as appropriation of something they weren't involved with) 16:01
timotimo fair enough
ely-se ReactOS beats both
partly_ m: IO::.WHAT ~~ Stash 16:11
camelia ( no output )
partly_ m: say IO::.WHAT ~~ Stash 16:12
camelia rakudo-moar 855de7: OUTPUT«True␤»
partly_ m: my $f = IO; say $f::.WHAT ~~ Stash
camelia rakudo-moar 855de7: OUTPUT«False␤»
timotimo m: my $f := IO; say $f::.WHAT ~~ Stash
camelia rakudo-moar 855de7: OUTPUT«False␤»
timotimo hm.
partly_ m: my $f = IO; say $f::.WHAT.gist; 16:13
camelia rakudo-moar 855de7: OUTPUT«(IO)␤»
partly_ why?
JimmyZ m: my \f = IO; say f::.WHAT ~~ Stash
camelia rakudo-moar 855de7: OUTPUT«True␤»
timotimo probably because of the way the :: operator works
timotimo AFK
jnthn $f:: is a variable name, yeah
m: my $f = IO; say ::($f)::.WHAT ~~ Stash 16:14
camelia rakudo-moar 855de7: OUTPUT«Use of uninitialized value <element> of type IO in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/Yl6s9wXeYz line 1␤False␤»
jnthn ah
But easy way is
m: my $f = IO; say $f.WHO ~~ Stash
camelia rakudo-moar 855de7: OUTPUT«True␤»
partly_ Thanks for the hint with the .WHO aproach 16:20
Generally how do I find out if $f is a module or a class or a grammar or role?
RabidGravy look at the .HOW 16:21
moritz through the type of the HOW
m: say Grammar.HOW.^name
camelia rakudo-moar 855de7: OUTPUT«Perl6::Metamodel::ClassHOW␤»
moritz m: grammar G { }; say G.HOW.^name
camelia rakudo-moar 855de7: OUTPUT«Perl6::Metamodel::GrammarHOW␤»
moritz m: (my role { }).HOW.^name 16:22
camelia ( no output )
moritz m: say (my role { }).HOW.^name
camelia rakudo-moar 855de7: OUTPUT«Perl6::Metamodel::ParametricRoleHOW␤»
partly_ Hmm this makes sense. Thank you 16:23
timotimo \o/ 16:25
moritz partly_: why do you want to know? 16:28
because if you want to check things like "can this inherit" or "can it hold methods", there are better ways 16:29
partly_ moritz: I'm just playing around. Given a module i want to expose all subroutines as actions of a cli app and it's signature attributets as parameters 16:31
pyrimidine Ulti: know of anyone who wants to work on Perl 6 for GSoC? OBF and Genome Informatics were accepted :)
partly_ i just need to make a check if the given type is a module containing subroutines and not a class, grammar or so on... 16:34
RabidGravy wonders idly whether the Inputs and Outputs of this thing should be symmetrical with Supplies or use a Channel on the output 16:36
moritz partly_: but classes can also contain subroutines 16:41
partly_: which is why I think that's not a good approach
partly_ Oh, have not thought about that
moritz partly_: a class can act as a namespace (or has a namespace associated) if its meta object doe sthe Metamodel::Stashing role 16:42
partly_: that'd be a saner check
likewise, it can hold methods if it does the MethodContainer role
RabidGravy goes for the symmetrical to see how well it stacks up 16:44
partly_ Hmm no i confused. So I know that IO.HOW is a ParametricRoleGroupHOW but is it than also a Metamodel::Stashing? If so how do i check it? 16:46
I'm looking at the MOP docs currently but not getting smarter :) 16:47
moritz m: say (class A { }).HOW ~~ Metamodel::Stashing 16:48
camelia rakudo-moar 855de7: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Perl6::Metamodel::Stashing'␤ in block <unit> at /tmp/UX7sRYXFRA line 1␤␤»
moritz m: say (class A { }).HOW.^does(Metamodel::Stashing)
camelia rakudo-moar 855de7: OUTPUT«1␤»
partly_ Hmm i see. 16:52
Thanks 16:53
moritz the documentation on the MOP is still rather sparse; I recommend reading the top of each of the interesting files (like ClassHOW.nqp) in the rakudo repo to see which roles they implement 17:00
perlpilot
.oO( We have MOP docs?!? )
17:01
;)
moritz sure 17:02
nine_ I just love this low level stuff :)
partly_ moritz: thanks for the hint, I'm already on it :) 17:03
I'm really mising a ^subs like ^methods 17:04
moritz partly_: subs typically live in lexical scopes, which can't be accessed from the outside anyway
partly_ Ok let me paraphrase that: I want to have all what in java would call static methods 17:05
IO::Path::mkdir would be for me a static method, but how to filter it from other things like dirname, basename? 17:06
psch Path::mkdir isn't equivalent to a static method
partly_ But it's a method which i can execute without calling IO::Path.new first 17:07
partly_ is not sure what it is
perlpilot because it's not a method
psch partly_: which code do you use to call mkdir without instantiating an IO::Path object? 17:08
oh, that's possible too, right. there's also a mkdir sub
partly_ Hmm, i just call mkdir.
m: IO::Path::mkdir("foo")
camelia rakudo-moar 855de7: OUTPUT«Could not find symbol '&mkdir'␤ in block <unit> at /tmp/v1PoVgsAzk line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/v1PoVgsAzk line 1␤␤»
partly_ m: mkdir("foo")
camelia rakudo-moar 855de7: OUTPUT«mkdir is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting line 1␤ in sub mkdir at src/RESTRICTED.setting line 8␤ in block <unit> at /tmp/wyxMjXATs3 line 1␤␤»
psch partly_: yeah, that's a Sub, not a method 17:09
partly_: and under the hood it creates an IO::Path and calls the mkdir method on that
github.com/rakudo/rakudo/blob/nom/...rs.pm#L245 17:10
Skarsnik Hello 17:11
RabidGravy a "static" method is pretty much a method that can be called on the type object 17:12
psch right, what Java calls a static method is what we do by default 17:13
RabidGravy but still uses the '.', like Foo.bar()
psch IO::Path::mkdir explicitly isn't one, 'cause it wants IO::Path:D
as invocant
Javas static method can be called on instances and on the type
RabidGravy Foo::bar is just an "our scoped subroutine"
psch is botching the syntax a bit there though 17:14
...i also think this is somewhat of a digression from the actual, original question :/
Skarsnik always :)
psch sorry for that, especially as i feel i came of a bit abrasive
RabidGravy nothing like it 17:15
partly_ still i'm not wiser how to get all the "default"/static methods/subroutines 17:15
RabidGravy which? 17:17
psch m: module Foo { sub bar is export { } }; Foo.WHO<EXPORT>.WHO<ALL>.WHO.perl.say 17:18
camelia rakudo-moar 855de7: OUTPUT«{"\&bar" => sub bar () { #`(Sub|72363712) ... }}␤»
psch something like that, i guess?
RabidGravy or 17:20
m: module Foo { our sub bar { }; our sub baz { }; } ; for Foo::.values { say $_.name if $_ ~~ Callable; }
camelia rakudo-moar 855de7: OUTPUT«baz␤bar␤»
RabidGravy if non-exported "our" subs
perlpilot psch: seems a little long-winded ... 17:21
psch perlpilot: yeah... i don't know of a shorter way though :S 17:22
perlpilot m: module Foo { sub bar is export { } }; Foo::EXPORT::ALL::.kv.perl.say
camelia rakudo-moar 855de7: OUTPUT«("\&bar", sub bar () { #`(Sub|63257056) ... }).Seq␤»
RabidGravy Foo::<EXPORT>?
perlpilot There's also Foo::EXPORT::DEFAULT
Skarsnik Yes FOO::EXPORT::DEFAULT::.keys
RabidGravy Now I'm wondering whether you could do a trick with a trait where you could expose non-exported, non our subs (infact I'm sure there is, I just can't be bothered to work it up right now 17:25
partly_ My first aproach was using EXPORT, but this did not work on IO::Path as expected. Now I know why 17:29
Thank you guys for your patience 17:30
perlpilot partly_: maybe when you figure everything out, you could update the docs with whatever is missing 17:31
perlpilot partly_: and write a blog post about the kinds of "introspection" you're doing 17:31
partly_ Maybe, we will see ;) 17:35
RabidGravy I've got a thing here which finds all the methods in a class which do a particular role and optionally have a particular returns type 18:06
can I remember what I made it for, no, no I can't ? 18:07
RabidGravy If I wanted to name a role that is common to "sink" and "source" what could I call it? 18:15
before I go with IOThing 18:16
portal, edge, door 18:21
TimToady ports, sockets,
lots of words have been used 18:22
so hard to find a new one :)
RabidGravy ooh I just had a horrid flashback to SunOS "doors" :-\ 18:23
perlpilot "portal" :) 18:24
oh, already said that one
perlpilot should read faster
TimToady but do you have a portal gun? 18:25
perlpilot There ya go, at least 2 votes for portal! ;)
TimToady a mock endpoint would have to be called "cake" :)
perlpilot heh 18:26
RabidGravy portal is good :)
perlpilot TimToady: btw, do you know where I can find a reference for where P5 got its inspiration for its object system? 18:27
perlpilot someone was asking at $work yesterday and I recalled that it came from Python, but couldn't "independently confirm" 18:27
TimToady well, I can confirm it, in a general way; of course, all the specifics are different underneath 18:28
perlpilot (and I don't always trust my memory L(
er :)
TimToady but the whole explicit self as an argument thing was from Python 18:29
timotimo o/
TimToady in a sense Perl 6 still has that, but built on a much different metamodel
TimToady all that p5 stole was the notion that you can do a minimalistic OO system merely by building a dispatch system that looks at the first argument, and otherwise leave methods as functions 18:31
we certainly didn't borrow any of the __FOO__ crud underneath
perlpilot aye. 18:32
RabidGravy yeah I find all that really offputting in python programs
TimToady though to be sure, our BUILD is a little of the same idea 18:33
but arguably that's borrowed from all OO languages that separate init from construction 18:34
RabidGravy is anyone who is more au fait with the MoarVM IO stuff able to think of a reason why a program that uses IO::Socket::Async and some native binding to something that does its own network thing hang up trying to read from the sockets? 18:40
vendethiel looks around 18:41
Skarsnik hm 18:42
timotimo tries parsing that sentence
ah, you have something that does its own networking, and you have IO::S::A, and something hangs up?
perlpilot RabidGravy: they are trying to read from the same socket? 18:43
RabidGravy specifically I made a server thing initially to test Audio::Libshout and it just doesn't work, hangs up as soon as I try to use the data Supply of the connection
well one is a server and one is a client
timotimo it should be fine to have different things, as long as it's theoretically compatible with running the same process as something with libuv 18:44
RabidGravy and doing similar when both sockets are managed by Perl 6 is fune
fine
RabidGravy so currently I am running them in separate processes 18:45
lizmat good *, #perl6! 18:47
sevvie salud!
perlpilot lizmat: greetings! How are you today? 18:48
lizmat perlpilot o/
a little tired after a gruesome day of shopping :-) 18:49
RabidGravy *harsh*
lizmat yeah, life sucks :-)
perlpilot What did you buy? 18:50
lizmat apart from some CD's and music magazines, 2 7" high CD cabinets made of cherry wood 18:50
(7 feet)
perlpilot you know ... CDs will soon be obsolete ;)
lizmat not in my CD room they won't :-) 18:51
RabidGravy we took the majority of our CDs out of their cases and put them in folders
throwing the cases away
perlpilot yeah, my wife still has a box of cassette tapes with music she bought or recorded in the late 1980s to 1990s 18:52
lizmat yeah, you can do that
perlpilot: no 8-tracks ?
perlpilot nope
lizmat two years ago I bought one with the Moody Blues - Days of the future passed 18:53
just for the heck of it :-) I don't have a player
RabidGravy there are crates of vinyl LPs here, but to be fair I also have a shelf of U-Matic video tapes and a bunch of super 8 film
perlpilot though, a friend of mine who died a couple of years ago still had some music on reel-to-reel
lizmat wow 18:54
RabidGravy I've got reel to reel tapes (Infact I have at least one 1" video tape somewhere) 18:55
lizmat .tell jnthn What do you think of putting named parameters always in alphabetical order in the Signature.params list ?
yoleaux lizmat: I'll pass your message to jnthn.
RabidGravy media hoarding
lizmat .tell jnthn It would greatly simplify the signature matching logic
yoleaux lizmat: I'll pass your message to jnthn.
jnthn lizmat: You can't 'cus it'd hose up defaults that rely on earlier nameds 18:56
yoleaux 18:55Z <lizmat> jnthn: What do you think of putting named parameters always in alphabetical order in the Signature.params list ?
18:55Z <lizmat> jnthn: It would greatly simplify the signature matching logic
jnthn sub foo(:$pub, :$bar = $pub) { } 18:57
lizmat ah, duh... ok
jnthn where constraints also
lizmat yeah, I hear you
m: role A { multi method a($a) {} }; role B { multi method a($a) {} }; class C does A does B {} # this appears correct, spotted at compile time 18:59
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xpKYSih3Z0␤Multi method 'a' with signature :(C $: $a, *%_) must be resolved by class C because it exists in multiple roles (B, A)␤at /tmp/xpKYSih3Z0:1␤»
lizmat m: role A { multi method a($a) {} }; role B { multi method a($b) {} }; class C does A does B {} 19:00
camelia ( no output )
lizmat jnthn: ^^^ appears wrong to me, because the name of a positional shouldn't matter, right ?
m: role A { multi method a($a) {} }; role B { multi method a($b) {} }; class C does A does B {}; C.new' 19:01
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z2hu04p1r8␤Two terms in a row␤at /tmp/Z2hu04p1r8:1␤------> 3b) {} }; class C does A does B {}; C.new7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ …»
lizmat m: role A { multi method a($a) {} }; role B { multi method a($b) {} }; class C does A does B {}; C.new
camelia ( no output )
lizmat m: role A { multi method a($a) {} }; role B { multi method a($b) {} }; class C does A does B {}; C.new.a
camelia rakudo-moar 855de7: OUTPUT«Cannot call a(C: ); none of these signatures match:␤ (C $: $b, *%_)␤ (C $: $a, *%_)␤ in block <unit> at /tmp/MYlgY7VVXH line 1␤␤»
jnthn lizmat: Yeah, eqv is a little over-strong in places...
lizmat ok, yeah, I'm fixing that mess...
punning Buf is already down to .025 seconds instead of .32 seconds
for me :-) 19:02
jnthn It was one of the last changes that went in before the release...
Oh, nice :)
lizmat I just need to do the named params logic.. :-)
dalek c: 84e80fa | jjatria++ | doc/Language/regexes.pod:
Added missing adverb to regex pod
19:02
c: 3c0da4f | jjatria++ | doc/Language/regexes.pod:
Removed whitespace warning from regex example
c: b4dec1e | jjatria++ | doc/Language/regexes.pod:
More consistent true/false comments in regex pod
c: b8837d2 | jjatria++ | doc/Language/regexes.pod:
Added missing output comment in regex pod
c: 7d40fbf | jjatria++ | doc/Language/regexes.pod:
More consistent use of so instead of Bool in regex examples
c: 997e03d | (Zoffix Znet)++ | doc/Language/regexes.pod:
Merge pull request #406 from jjatria/regex-missing-adverb

Improved consistency and formatting of examples in regex pod
perlpilot lizmat++
timotimo lizmat: damn, awesome!
partly_ module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say \module::.keys.gist; say \module::EXPORT::.keys.gist; 19:03
m: module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say \module::.keys.gist; say \module::EXPORT::.keys.gist;
camelia rakudo-moar 855de7: OUTPUT«\({:EXPORT(EXPORT)})␤Could not find symbol '&EXPORT'␤ in block <unit> at /tmp/xa0YwDB7qp line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/xa0YwDB7qp line 1␤␤»
jnthn wonders if his inlining and accessor improvements yesterday will show up in the next Text::CSV numbers... :)
partly_ m: module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say $module::.keys.gist; say $module::EXPORT::.keys.gist; 19:04
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TCZ_9mXYPP␤Variable '$module' is not declared. Did you mean 'module'?␤at /tmp/TCZ_9mXYPP:1␤------> 3export {} }; my \module = Foo::Bar; say 7⏏5$module::.keys.gist; say $module::EXPORT␤»
partly_ Hmm i think i still misundestand the whole adressing issue. How is \module::EXPORT different from Foo::Bar::EXPORT? 19:05
m: module Foo::Bar { sub f() is export {} }; say Foo::Bar::EXPORT::.keys.perl;
camelia rakudo-moar 855de7: OUTPUT«("DEFAULT", "ALL").Seq␤»
partly_ do i need to escape somehow \module? 19:06
timotimo the \ is only for declarating
er, declaring
it means the name (without the \ ) will be the name. it'll be sigil-less, so to say 19:07
partly_ m: module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say \module::.keys.gist; say module::EXPORT::.keys.gist;
camelia rakudo-moar 855de7: OUTPUT«\({:EXPORT(EXPORT)})␤Could not find symbol '&EXPORT'␤ in block <unit> at /tmp/yg_qo8HyXz line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/yg_qo8HyXz line 1␤␤»
partly_ m: module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say module::.keys.gist; say module::EXPORT::.keys.gist; 19:09
camelia rakudo-moar 855de7: OUTPUT«(EXPORT)␤Could not find symbol '&EXPORT'␤ in block <unit> at /tmp/BeoBTBKNYz line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/BeoBTBKNYz line 1␤␤»
partly_ m: module Foo::Bar { sub f() is export {} }; my \module = Foo::Bar; say module::.keys.gist;;
camelia rakudo-moar 855de7: OUTPUT«(EXPORT)␤»
partly_ So what would be the right way to access EXPORT? ::EXPORT seems not to work 19:10
lizmat m: role A { multi method a(Int(Any) $a) {} }; role B { multi method a(Int(Cool) $a) {} }; class C does A does B {}; C.new.a(42) 19:11
camelia rakudo-moar 855de7: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(C $: Cool $a, *%_)␤:(C $: $a, *%_)␤ in block <unit> at /tmp/x3j4QFNdhY line 1␤␤»
lizmat jnthn: shouldn't this be caught at compile time ?
aka, looks to me the coercion method should not be part of the equation 19:12
perlpilot partly_: you may have found a bug. 19:13
perlpilot partly_: See gist.github.com/perlpilot/018013c0766796b92893 19:15
Hotkeys What up home diggity dogs 19:16
jnthn lizmat: Hmm, that's a tricky one :) 19:17
lizmat yeah, I figured out just now: I mean, the method could do anything really, just like the post-constraint 19:18
partly_ perlpilot: i can reproduce it, but in source code it does not work 19:18
Could not find symbol &EXPORT. gist.github.com/kalkin/b99521c75c1cf37cd445 19:19
line 9 throws the error
jnthn lizmat: I can figure out what's going on, I guess...I'm not feeling smart enough to work out what to do with it though :) 19:22
lizmat: I think the ambiguity is because it inserts multis with coercion types into the candidate list twice, once at the Int level and once at the Cool/Any level. And the Int ones conflict with 'emselves. 19:23
lizmat so, maybe the coercion shouldn't be part of the check when merging roles?
lizmat so that it would catch it at role merge time ? 19:24
jnthn It's not that simple, though? 19:25
lizmat isn't it?
jnthn Wouldn't it produce false positives? 19:26
I think maybe this is DIHWIDT territory.
jnthn I can certainly see us wanitng eqv for signatures being something other than "they .perl the same" 19:27
*wanting
lizmat jnthn: that's what I'm working on
jnthn But I think we don't want the rules to get too involved :)
lizmat and the same for eqv parameters
jnthn The trouble with ruling the above "the same" and so getting a conflict, is that you'd allow a role with a requirement of Int(Any) to be satisfied by implementing an Int(Cool) 19:29
Which of course won't work out well
jnthn uh, and so catching the conflict 19:29
lizmat ok, so you're saying the coerce_type should be part of the eqv check? 19:32
for Parameters?
jnthn lizmat: I'm saying it should be as it is now result wise
jnthn That is, both the inside and outside should be the same 19:33
So Int(Any) eqv Int(Any) is true
Int(Any) eqv Int(Cool) is not
So, we won't catch the one you mentioned at compile time...that'll have to go to runtime, I think.
'cus otherwise we break requirement implementation
partly_ should i open a bug against rakudo/rakudo? 19:38
Skarsnik [email@hidden.address]
lizmat jnthn: that seems to contradicting? 19:43
so, Parameter eqv Parameter should give different values depending on compile vs runtime ??
jnthn lizmat: I don't see any contradiction? :) 20:07
lizmat: I'm simply saying that the semantics of coercion type comparison in eqv should require the inner and outer to both match exactly
lizmat: And that we can't both solve the problem you noted, *and* not create another one
lizmat ok 20:08
jnthn (And was trying to explain what problem we'd make... :)) 20:09
jnthn We actually probably *can* catch the ambiguity you mentioned at compile time, but it'd fall out of a more general multi-dispatch ambiguity compile-time analysis. 20:11
Rather than something we can sensibly solve within the realm of eqv's semantics. 20:12
m: multi a(Int) { }; multi a(Int) { }
camelia ( no output )
jnthn We don't even catch that at compile-time yet
nine_ I slowly get the impression that I can spend the whole 20 minutes of my module management talk talking about the requirements we try to fulfill. 20:14
jnthn Heh. "Why module management is harder than you think" : 20:15
:)
nine_ Would be a very fitting title ;)
arnsholt There was a "So, you're making a module ecosystem tool" post linked on HN a while back 20:17
It made much the same point, initially =)
nine_ arnsholt: I've read that :)
And quite ironically I complained about that post being too elaborate and the author babbling and cursing. And here I am at 767 words before I even start talking about solutions... 20:18
jdv79 what is your talk for? 20:19
jnthn How much is cursing? :) 20:20
nine_ German Perl Workshop
jnthn Cool, German cursing!
sjn german cursing is pretty awesome
oh, and hi, #perl6 :)
jnthn
.oO( When I said cursive writing, this was not what I meant... )
20:21
nine_ Yeah it would be the appropriate language. Alas I'll give the talk in English because I just can't stand talking about coding in German. It ends up being all English with German linking words. 20:22
arnsholt Yeah, I've pretty much given up trying to use Norwegian words for programming 20:24
All of the technical vocab is English, so let's just go with that
sjn Best german general curseword: WELTSCHMERZ! 20:25
huf that's a curse? really?
arnsholt Not really, I think =)
nine_ No I wouldn't characterize it as one.
sjn depends on how loud you shout it while waving your fist at the world in general 20:26
huf well okay.
but in that case, bucket is a swear word too
sjn yep :) 20:27
nine_ is gonna start using it as a curse from now on
nine_ Though my favourite will probably always be "Himmel Herrgott Kreuz Sakarament" which really is just "heaven Lord cross sacrament", i.e. completely innocent words (as far as cursing goes), yet have the perfect swearing sound when shouted. 20:29
huf herrgott does look very pretty 20:30
sjn my %førrbainna-hællvettes-mainnskit = %*ENV{@CGI-variables}; # Norwegian variables for arnsholt
jnthn CGI is a pretty strong curse word... 20:32
sjn is very proud to have used sensible variable names in that example :) 20:33
Herby_ \o 20:37
RabidGravy is .WHICH sufficiently unique to use it to grep a list of objects of the same type? 20:41
lizmat it should be
RabidGravy actually thinking about it I may make it a hash key and just pretend to the rest of the world its a list 20:43
but the same applies :)
nine_ RabidGravy: Sets? 20:44
RabidGravy sets? 20:44
nine_ collections of unique items. Just sounds like what you need and what Perl 6 has :) 20:45
lizmat m: dd (1,2,3).set 20:48
camelia rakudo-moar 855de7: OUTPUT«Method 'set' not found for invocant of class 'List'␤ in block <unit> at /tmp/NuXlO2jlNo line 1␤␤»
lizmat m: dd (1,2,3).Set
camelia rakudo-moar 855de7: OUTPUT«set(3,1,2)␤»
nine_ m: dd (1,2,3,2,1).Set
camelia rakudo-moar 855de7: OUTPUT«set(3,1,2)␤»
lizmat RabidGravy: note that they're not strings, but Ints
m: dd (1,2,3).Set.keys
camelia rakudo-moar 855de7: OUTPUT«(3, 1, 2).Seq␤»
RabidGravy Oh I see, I'm pretty certain that a hash is going to work here 20:49
the circumstances preclude any chance of duplicate anyway
RabidGravy for reference the code does something like " %!outputs{$output.WHICH} = $output; ... $output.finished-promise.then({%!outputs{$output.WHICH}:delete;});" 20:56
by the time I've finished with this it probably will only run on a squillion core computer but hey 20:58
lizmat RabidGravy: I would advise against using .WHICH as a key...
I know we use that for objects hashes, but it's because we don't have anything better yet
creating a .WHICH of an object can be *very* expensive... 20:59
RabidGravy right
but so is making a proper UUID
lizmat I guess... 21:02
RabidGravy is it calculated every time it is called? 21:06
I know I could look at the code
right, calculated every time, take it early and close over it 21:10
RabidGravy the "throttling" on new outputs can be an, er, feature ;-) 21:10
lizmat RabidGravy: if it's a value type and complex, it's usually only done once on demand, like Set/Bag/Mix
tweakism what's the general state of perl6 and what does the future look like 21:22
for someone who once lived and breathed perl5 but has drifted away from the community 21:23
perlpilot tweakism: The future's so bright, I gotta wear shades. :) 21:24
Skarsnik still not that much user I think x)
tweakism haha, also, did the camel really give way to this butterfly? 21:25
perlpilot tweakism: The camel was just the larval state of the butterfly 21:26
tweakism it has Clippy's eyes *shudder*
mst tweakism: the camel is an ORA-ism anyway
tweakism: perl5's mascot is the velociraptor
tweakism larry wrote the ORA book, and every code example involved camels. 21:27
mst tweakism: and if you left perl5 before the arrival of Moose, you're going to suddenly discover that both perls are more awesome than you could ever have imagined.
perlpilot tweakism: yeah ... how long has it been since you lived and breatherd perl 5?
er, breathed even 21:28
mst long enough to not know that State of the Velociraptor has been a thing and that the name comes from a Larry quote, apparently
tweakism I dunno, 10 years? maybe less.
mst right. you've missed a *lot* of fun stuff then
tweakism like what? throw me some links :) 21:29
mst notably the fact that perl5 now has demonstrably better OO than python/ruby/etc. because Moose and the perl6 metamodel have basically kept stealing things off each other
perlpilot tweakism: luckily you don't have to live through the missteps that got us where we are today :) 21:30
mst tweakism: or: Moose/Moo are the nicest OO system I've ever used in production. perl6's OO is even better. 21:31
sortiz \o
mst and, er, if you want to see what's been going on in perl5 land
the State of the Velociraptor talks I've given are probably not a bad summary over the years
tweakism my drifting has been entirely due to outside pressure 21:33
tweakism and it stabs at my heart when people say silly, mean things about perl 21:33
perlpilot tweakism: It's important to note that Perl 5 and Perl 6 are separate, sister languages.
tweakism yeah, I figured that. wasn't perl6 supposed to be like, a vm separate from the actual syntax, or something like that. 21:34
perlpilot tweakism: Perl 6 runs on top of a VM, yes. 21:35
tweakism: And "Perl 6" is a language spec rather than a particular implementation.
nine_ Actually, it's fair to say that Perl 6 is a test suite ;) 21:36
tweakism the camel book was very good at, in addition to the syntax and interfaces, giving a quick overview of the why and the implementation, and sometimes the history. and also amusing, with interesting anecdotes. and it made it so easy to read, and remember stuff from.
I've never found anything similiarly useful to me for any other language.
perlpilot If you haven't used Perl in 10ish years ... then the last Perl you used was 5.8? 21:37
tweakism that sounds right.
mst tweakism: perl5's syntax is less set in stone than it used to be
tweakism or maybe 5.10 but I don't think I was still developing perl then.
mst tweakism: I wrote a horrible hack called Devel::Declare that embarassed p5p into adding pluggable keywords 21:38
tweakism: so you get things like p3rl.org/Moops
tweakism heh that is indeed very different 21:39
perlpilot and even though Moops claims to be "unstable", we'er using it in production at $work :-) 21:40
tweakism welp, thanks for the pointers. I'll stick around in case you think of anything else cool to share. 21:45
perlpilot imgur.com/gallery/mkbTX is pretty cool 21:47
tweakism is pleasantly surprised that this isn't more triggering images of Clippy-like insects. 21:48
perlpilot tweakism: if you want to learn perl 6, see perl6.org/documentation/ for some useful stuff. Particularly check out Rosettacode if you want a side-by-side comparison with other languages. 21:54
RabidGravy anyway, my fully abstracted streaming server experiment is still able to stream at 320kbps with three supplies in the chain :) So all good. 22:08
RabidGravy that is IO::Socket::Async.Supply(:bin) -> Source.supplier -> Source.supply -> Output.supplier -> Output.supply -> IO::Socket::Async.write 22:10
keeping mplayer's cache filled to about 15% which is the same as proper icecast
jnthn RabidGravy: Nice! Really awesome to see supplies being used for such stuff. :) 22:11
jnthn Curious there's quite a few suppliers in the chain; I usually try to build stuff out of supply blocks 22:12
Or other supply combinators
RabidGravy still fiddling with the internal design, but at least one of the suppliers needs to be exposed as the "Mount" emits whatever it getsfrom the Source supply to all the Output suppliers 22:16
perlpilot RabidGravy: Are you doing a talk on this thing at YAPC or something?
RabidGravy nah, haven't done any conferences for ten years 22:17
perlpilot blog post? 22:18
jnthn 'night, #perl6 22:26
RabidGravy well, it still has to support source authentication nicely and check that a mount isn't being used before attaching a source to it to be at least feature compatible with icecast
mst RabidGravy: pretty sure the last time I had beer in the pub at lunch with you was -slightly- less than 10 years ago
maybe 8 though
mst feels old
RabidGravy but I have bigger plans 22:27
very possibly
partly_ Hmm I get message rejected if i try to send a bug report to [email@hidden.address] 22:30
perlpilot partly_: [email@hidden.address]
partly_ ahh ic 22:31
thanks
perlpilot Though, I'd say it's a bug that [email@hidden.address] doesn't get to the right place. :-) 22:32
mst perl6.org mail exchanger = 50 mailtest2.pair.com. 22:34
Hotkeys maybe submit a bug report to-- oh 22:35
AlexDaniel m: say ‘WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW’.comb(/(.)$0+/).map: {.comb[0] ~ .chars} 22:55
camelia rakudo-moar 855de7: OUTPUT«(W12 W12 B3 W24 W14)␤»
AlexDaniel too bad you can't replace .comb[0] with $0 22:56
AlexDaniel m: ‘WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW’ ~~ m:g/((.)$0+) {print $0.chars,$0[0]}/; say ‘’ 23:06
camelia rakudo-moar 855de7: OUTPUT«12W12W3B24W14W␤»
AlexDaniel ah
AlexDaniel m: say gather { ‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.)$0+) {take $0.chars,$0[0]}/ } 23:08
camelia rakudo-moar 855de7: OUTPUT«((12 「W」))␤»
AlexDaniel what am I doing wrong here?
or why it doesn't work?
TimToady use $0* instead of $*+ 23:10
$0+
AlexDaniel m: say gather { ‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.)$0*) {take $0.chars,$0[0]}/ } 23:11
camelia rakudo-moar 855de7: OUTPUT«((12 「W」))␤»
TimToady hmm
AlexDaniel you're right, but there's a problem with gather
m: say gather { ‘abc’ ~~ m:g/(.) {take $0}/ } 23:12
camelia rakudo-moar 855de7: OUTPUT«(「a」)␤»
AlexDaniel m: ‘abc’ ~~ m:g/(.) {say $0}/ 23:13
TimToady m: say gather { ‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.)$1*) {take $0.chars,$0[0]}/ }
camelia rakudo-moar 855de7: OUTPUT«「a」␤「b」␤「c」␤»
rakudo-moar 855de7: OUTPUT«((1 「W」))␤»
AlexDaniel TimToady: so, is it a bug? 23:15
TimToady m: say (‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.){}$0*)/).perl 23:22
camelia rakudo-moar 855de7: OUTPUT«(Match.new(ast => Any, list => (Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 1, from => 0),), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 12, from => 0),), hash => Ma…»
TimToady m: say (‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.){}$0*)/)[1].perl
camelia rakudo-moar 855de7: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 13, from => 12),), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 13, from => 12),), hash => …»
TimToady m: say (‘WWWWWWWWWWWWBWWWWW’ ~~ m:g/((.){}$0*)/)[2].perl
camelia rakudo-moar 855de7: OUTPUT«Match.new(ast => Any, list => (Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 14, from => 13),), hash => Map.new(()), orig => "WWWWWWWWWWWWBWWWWW", to => 18, from => 13),), hash => …»
TimToady seems kinda like a bug
AlexDaniel too tired to understand this. I'll probably try to submit it tomorrow 23:26
TimToady m: say gather ‘WWWWWWWWWWWWBWWWWW’ ~~ / ( ((.)$0*) { take $0.chars,$0[0]} )* / 23:29
camelia rakudo-moar 855de7: OUTPUT«((12 「W」) (1 「B」) (5 「W」))␤»
TimToady seems to lose the :g
AlexDaniel m: say gather ‘bc’ ~~ m/(.)+ {take ‘X’} ‘c’ / 23:34
camelia rakudo-moar 855de7: OUTPUT«(X X)␤»
AlexDaniel backtracking is still there
m: say gather ‘bc’ ~~ m:ex/ .+? {take ‘X’} / 23:36
camelia rakudo-moar 855de7: OUTPUT«(X)␤»
AlexDaniel m: say gather ‘bc’ ~~ m:ex/ .+? {say ‘X’} /
camelia rakudo-moar 855de7: OUTPUT«X␤X␤X␤()␤»
AlexDaniel exhaustive is broken too 23:37
tweakism this is off-topic, but I might get an actual worthwhile response here: Please link me to any tools you find particularly useful, relating to Unicode. Including character maps/finders, tools for querying unicodedata, other databases from 3rd parties, libraries for perl or other languages, etc. Wide net. (incidentally, also interested in tools etc. for XCompose, XKB, or fonts including font
managers/pickers.)
AlexDaniel tweakism: wow! May I ask why? :) 23:37
lizmat good night, #perl6!
AlexDaniel tweakism: well, most of the time I use perl6… like: 23:39
m: ‘π’.uniname.say
camelia rakudo-moar 855de7: OUTPUT«GREEK SMALL LETTER PI␤»
AlexDaniel m: ‘π’.uniprop.say
camelia rakudo-moar 855de7: OUTPUT«Ll␤»
AlexDaniel or if you want to find something
tweakism AlexDaniel: no one needs to put any effort into *finding* stuff like that or anything; just looking for pointers to things other people already find super-useful.
AlexDaniel m: say [~] (0..0x1FFFF ==> grep { .uniprop eq ‘Mn’ })».chr 23:40
camelia rakudo-moar 855de7: OUTPUT«…»
tweakism for character map/finder/info app, it seems like something that would exist in a nice form, but all the ones I have tried kindof suck in one way or another.
AlexDaniel camelia: meh, you could've done better :)
tweakism and the bot is cool, but a local solution would be more useful :) (although websites that have great interfaces are OK to recommend.)
AlexDaniel tweakism: if I can't hack it with perl6 I usually use www.fileformat.info/info/unicode/char/search.htm
tweakism oh, I suppose you weren't telling me to ask the bot, you were pointing out I could use perl. 23:41
AlexDaniel tweakism: no doubt you can run perl6 locally? :)
AlexDaniel tweakism: this is a good resource for entering unicode characters: doc.perl6.org/language/unicode_entry 23:43
AlexDaniel tweakism: this is a cool post too: perl6advent.wordpress.com/2015/12/...6-and-you/ 23:45
tweakism: sorry for too much Perl 6 propaganda but what did you expect :) 23:46
tweakism these are pretty perfect
and way better than anything else from anywhere else including #unicode
AlexDaniel I do that kind of stuff all the time: 23:48
m: say [~] (0..0x1FFFF ==> grep { .uniname ~~ /GRAVE/ })».chr
camelia rakudo-moar 855de7: OUTPUT«`ÀÈÌÒÙàèìòùǛǜǸǹȀȁȄȅȈȉȌȍȐȑȔȕˋˎ˴˵̖̀̏̀ЀЍѐѝѶѷ॓ᐠ᷀᷅᷆᷈᷉ḔḕṐṑẀẁẦầẰằỀềỒồỜờỪừỲỳ⛼`𛲂𛲃𛲒𛲓␤»
tweakism "The .codes method returns the number of codepoints in the string, while .chars returns the number of characters (aka graphemes)" ... this sounds heavenly.
did you mean 0x10ffff? :) 23:49
or did you do that on purpose
AlexDaniel tweakism: that is going to run for a little longer… :)
tweakism: and usually there is nothing interesting there
AlexDaniel if there is anything at all? :) let's see 23:50
tweakism well then did you check the 1st supp plane on purpose?
AlexDaniel m: say [~] (0x1FFFF..0x10FFFF })».chr
camelia rakudo-moar 855de7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vuSMYRf1I1␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/vuSMYRf1I1:1␤------> 3say [~] (0x1FFFF..0x10FFFF 7⏏5})».chr␤ expecting any of:␤ sta…»
AlexDaniel m: say [~] (0x1FFFF..0x10FFFF)».chr 23:51
tweakism heh that does take a bit longer.
AlexDaniel yup
camelia rakudo-moar 855de7: OUTPUT«(timeout)»
timotimo AlexDaniel: may i recommend Uni.new?
AlexDaniel timotimo: sure! What do you mean by that? :)
timotimo m: say Uni.new(0x1FFF..0x10FFF) 23:52
AlexDaniel woah
camelia rakudo-moar 855de7: OUTPUT«Uni:0x<1fff 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 200a 200b 200c 200d 200e 200f 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 201a 201b 201c 201d 201e 201f 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 202a 202b 202c 202d 202e 202f 2030…»
timotimo what's the method to turn a Uni into a Str?
well, that doesn't help :)
m: say Uni.new(0x1FFF..0x10FFF).Str
camelia rakudo-moar 855de7: OUTPUT«(signal SEGV)»
timotimo hah
AlexDaniel :/
timotimo that's not so good
AlexDaniel m: say ‘à̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾’.chars
camelia rakudo-moar 855de7: OUTPUT«1␤»
AlexDaniel tweakism: ↑ :)
tweakism: guess which tool did I use to generate this: gist.github.com/AlexDaniel/0521bc38fe827bd7d37b 23:53
geekosaur 's client rendered that as something resembling a mushroom cloud >.>
AlexDaniel geekosaur: at least it did not render that as vertical text… 23:54
tweakism heh mine did not do much better
AlexDaniel huggable: unzalgo 23:55
huggable AlexDaniel, irclog.perlgeek.de/perl6/2015-11-12#i_11522549
ugexe sub foo() { supply { try { CATCH { when X::Proc::Unsuccessful { say 123; }; }; run "asdf"; emit(666) }; }; }; react { whenever foo() -> $s { say $s.perl; }; }; # prints `123`, but if `emit(666)` is removed it dies with an exception. Why? 23:56
AlexDaniel m: say “p􏿽xCC􏿽x86􏿽xCC􏿽x84􏿽xCD􏿽x92􏿽xCD􏿽x9B􏿽xCC􏿽x81􏿽xCD􏿽x8A􏿽xCC􏿽x8B􏿽xCD􏿽xA3􏿽xCC􏿽xA2􏿽xCD􏿽xA2e͌͛̐ͨ̍ͬͮ̑̊͟r̅ͪ̌̑̾̄ͬ̈҉̨l􏿽xCC􏿽xBF􏿽xCD􏿽x8C􏿽xCD􏿽xA8􏿽xCC􏿽xBD􏿽xCC􏿽x82􏿽xCD􏿽x81􏿽xCC􏿽xA1􏿽xCC􏿽xA3􏿽xE2􏿽x80􏿽x8B􏿽xCC􏿽xA6􏿽xCC􏿽xB36􏿽xCC􏿽x8A􏿽xCD􏿽xA3􏿽xCD􏿽x8C􏿽xCD􏿽x8B􏿽xCD􏿽xA6􏿽xCD􏿽xA3􏿽xD2􏿽x89􏿽xCD􏿽x98􏿽xCC􏿽x9B􏿽xCD􏿽x93􏿽xE2􏿽x80􏿽x9D.comb.map(*.NFD[0].chr).join
camelia rakudo-moar 855de7: OUTPUT«perl​̦6␤»
AlexDaniel hmmmmm there is one character left behind? 23:57
tweakism what does that *. do
AlexDaniel m: say ‘perl​̦6’.comb.map(*.NFD[0].chr).join 23:58
timotimo m: say “p̆̄͒͛e͌͛̐ͨr̅ͪ̌̑l̿͌ͨ̽6̊ͣ͌͋”.comb.map(*.NFD[0].uniname)
camelia rakudo-moar 855de7: OUTPUT«perl​̦6␤»
rakudo-moar 855de7: OUTPUT«(LATIN SMALL LETTER P LATIN SMALL LETTER E LATIN SMALL LETTER R LATIN SMALL LETTER L DIGIT SIX)␤»