»ö« 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 mcmillhj left, jkva_ left, Hotkeys left, eater joined 00:01 jkva_ joined, agentzh joined, committable6 left, huggable left, benchable6 left, M-Illandan left, yoleaux left, unicodable6 left, unicodable6 joined, ChanServ sets mode: +v unicodable6 00:02 benchable6 joined, ChanServ sets mode: +v benchable6, hoelzro left, bisectable6 left, evalable6 left, isacloud left, domm1 left, riatre left, plicease_ left
ajr_ bye 00:03
00:03 ajr_ left, hoelzro joined, mcmillhj joined 00:05 isacloud joined 00:06 plicease joined 00:07 riatre joined 00:08 mcmillhj left 00:09 chansen_ left, chansen_ joined, risou_awy is now known as risou
sjn Zoffix: btw, I can't seem to find any hyper operators on map.perl6.party/ ... is that a bug? 00:09
00:10 committable6 joined, ChanServ sets mode: +v committable6 00:11 Hotkeys joined, M-Illandan joined
sjn (also, if it isn't I'm also interested learning how one introspects Perl 6 in order to find available hyperops :) 00:11
Zoffix sjn: hyperops... like, which ones?
sjn »whatever« 00:12
«+»
etc.
00:13 domm1 joined
Zoffix sjn: those are generated dynamically. 00:14
sjn ok, so... how can I automatically figure out which ones are available? :)
Zoffix m: say &[RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR,]
camelia -> |args is raw { #`(Block|38489944) ... }
00:14 pyrimidine joined
Zoffix sjn: the subs that make them are in github.com/rakudo/rakudo/blob/nom/...metaops.pm I don't know of any mapping that maps syntax to those subs; could be just grammar stuff 00:15
sjn hm
Zoffix m: say &infix_circumfix_meta_operator:sym<« »> 00:17
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
infix_circumfix_meta_operator:sym<« »> used at line 1
Zoffix Yeah, looks like these bits of grammar handle 'em: github.com/rakudo/rakudo/blob/nom/...4086-L4108
00:19 mcmillhj joined
sjn has no idea on how to access that programatically 00:19
00:22 pyrimidine left, adu joined 00:24 cpage_ left, cpage_ joined 00:25 risou is now known as risou_awy 00:26 muraiki joined 00:29 mcmillhj left 00:32 lizmat joined
TimToady they can't be, currently, because they're more-or-less hardwired syntax, and it would be difficult to put them in as mere higher-order functions because they are smart about thunking thunky operators, which functions can't do 00:34
00:34 llfourn joined
TimToady m: say [||] 1, 2, die "oops" 00:35
camelia 1
TimToady m: say (1, 2, die "oops").reduce(&infix:<||>)
camelia oops
in block <unit> at <tmp> line 1
00:36 risou_awy is now known as risou
TimToady so while you could say that .reduce is the HOF underneat [||], it's not entirely accurate 00:36
really, what you'd need to do is pull proto-rules out of the Perl 6 grammar 00:37
sammers hi #perl6
TimToady which is pretty much what Zoffix++ was saing already 00:38
*saying
00:39 dalek left 00:40 dalek joined, ChanServ sets mode: +v dalek 00:43 cdg left
TimToady m: .say when /meta_operator/ for $?LANG.grammar.^methods».name 00:46
camelia prefix_circumfix_meta_operator
infix_postfix_meta_operator
infix_prefix_meta_operator
infix_circumfix_meta_operator
postfix_prefix_meta_operator
prefix_postfix_meta_operator
postfix_prefix_meta_operator:sym<»>
prefix_postfix_meta_operator:…
TimToady sjn: ^^^ 00:47
00:47 aborazmeh joined, aborazmeh left, aborazmeh joined
TimToady m: .say when /fix '_meta_operator'? ':'/ for $?LANG.grammar.^methods».name 00:49
camelia statement_prefix:sym<BEGIN>
statement_prefix:sym<COMPOSE>
statement_prefix:sym<TEMP>
statement_prefix:sym<CHECK>
statement_prefix:sym<INIT>
statement_prefix:sym<ENTER>
statement_prefix:sym<FIRST>
statement_prefix:sym<END>
statement_prefix…
TimToady heh
well, there's a sense in which statement_prefixes are operators too... 00:50
00:50 astj joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/02/28/...a-changin/ 00:50
00:52 risou is now known as risou_awy, kurahaupo left 00:55 astj left
TimToady m: .say when /^ < pre in post circum postcircum> fix .*? ":sym" / for $?LANG.grammar.^methods».name 00:59
camelia infix:sym<lambda>
circumfix:sym<STATEMENT_LIST( )>
circumfix:sym<( )>
circumfix:sym<[ ]>
circumfix:sym<ang>
circumfix:sym«<< >>»
circumfix:sym<« »>
circumfix:sym<{ }>
postfix_prefix_meta_operator:sym<»>
prefix_postfix_meta_operator…
01:00 pmurias left, mcmillhj joined 01:02 Actualeyes left 01:05 mcmillhj left, mcmillhj joined 01:09 llfourn left 01:11 mcmillhj left 01:22 risou_awy is now known as risou, agentzh left 01:23 lukaramu_ left 01:26 agentzh joined
sjn TimToady: oh, nice! :D 01:28
timotimo put a <( after ":sym" to make the stuff a bit more compact: 01:29
m: $/.Str.say when /^ < pre in post circum postcircum> fix .*? ":sym" <( / for $?LANG.grammar.^methods».name
camelia



















































































timotimo whoops :D
m: $/.Str.say when /^ < pre in post circum postcircum> fix .*? ":sym" / for $?LANG.grammar.^methods».name 01:30
camelia infix:sym
circumfix:sym
circumfix:sym
circumfix:sym
circumfix:sym
circumfix:sym
circumfix:sym
circumfix:sym
postfix_prefix_meta_operator:sym
prefix_postfix_meta_operator:sym
infix_circumfix_meta_operator:sym
infix_circumfix_meta_ope…
timotimo m: $/.Str.say when /^ < pre in post circum postcircum> fix .*? ":sym" <( .* / for $?LANG.grammar.^methods».name
camelia <lambda>
<STATEMENT_LIST( )>
<( )>
<[ ]>
<ang>
«<< >>»
<« »>
<{ }>
<»>
<«>
<« »>
«<< >>»
<[ ]>
<{ }>
<ang>
«<< >>»
<« »>
<( )>
<[; ]>
<{; }>
<i>
<++>
<-->
<++>
<-->
<ⁿ>
«->»
<**>
<…
timotimo of course it then has to match stuff after the "beginning" marker :D
01:31 aborazmeh left 01:32 Actualeyes joined
sjn isn't familiar with the <( syntax 01:33
01:33 adu left
sjn Aah, it's the capture marker... didn't make sense to me that there was only one of it 01:34
01:40 benchable6 left, unicodable6 left, committable6 left, unicodable6 joined, committable6 joined, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v committable6, benchable6 joined, bisectable6 joined, evalable6 joined, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v evalable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
timotimo what's worse, you can put )> before <( 01:41
sjn what's the rationale behind that? 01:42
elaADnlxie significantly reworked versions of *ables are up. Please report issues if there are any
(though gonna commit that all tomorrow)
01:43 jeffthedragonsla joined 01:44 jeffthedragonsla left 01:45 llfourn joined, kybr left
timotimo the rationale? behind being able to put it whereever you want? 01:51
for one, you can put it into optional groups, for example
sammers is there a way to create a prefix that captures a subroutine call without executing it? for example, say my prefix is called 'runlater': runlater foo 123; where runlater captures the "foo 123" call without actually running foo(123); 01:53
timotimo that's called "thunking"
01:53 elaADnlxie left
timotimo you need a macro for that purpose 01:53
sammers ok
01:53 obfusk joined
sjn hm 01:54
sammers timotimo, the docs don't have anything on macros / thunking yet. Are there any examples you can point me to? 01:55
01:57 gregf_ left
sammers ok, "use experimental :macros;", nevermind, I will hold off on this idea for now. 02:00
02:01 yoleaux joined, ChanServ sets mode: +v yoleaux
timotimo we should rename that "use experimental :oldmacros" in anticipation of the new macros landing this or next year 02:01
sammers thanks timotimo, found this older post about macros if anyone is interested strangelyconsistent.org/blog/macros...hey-really
timotimo yeah, mäsak is our macro implementor 02:02
sammers on the topic of experimental features, is there a schedule anywhere with ETAs for upcoming features?
timotimo hm, what experimental features do we even have? i seem to recall only macros and pack 02:03
02:03 gdonald_ left
sammers also, cache 02:03
collation
02:03 gdonald_ joined
timotimo oh, yeah, collation is super new 02:03
sammers what is the idea behind cache? 02:04
timotimo the idea behind the feature or the idea behind making it experimental? 02:06
sammers ok, on the Experimental features page it lists cache as experimental, but we can already use .cache on Lists today. Is it the same method? 02:07
timotimo that's different
sammers ah
timotimo the cache thing from experimental is about marking your subs and methods "is cached"
which will install a hash for you that is keyed on arguments passed to the sub or method and its values are what it returned the first time it ran with those arguments 02:08
from then on it'll just return the values from the hash instead of running your sub or method
but it's extremely problematic to just choose one way to make the key and be done with it
especially for methods
like, do you use the actual objects that were passed? then you'll be keeping objects alive until the process dies 02:09
do you stringify values? then you'll lose the subtle differences between values that stringify to the same thing - especially problematic for user-made types that don't have a fully thought-out .Str method - or none at all!
sammers will there be a way of doing introspection on the cached subs? to see what actually cached? 02:10
timotimo and if you "is cached" a method, what parts of the invocant (aka the "self") get put into the key? all public attributes? all private attributes, too?
that's easy to do, but who knows if we want to offer that
i'm actually not sure where the implementation of our experimental "is cached" lives at the moment 02:11
sammers it might be useful when constructing a sub to take advantage of caching more effectively
02:11 astj joined, pyrimidine joined
timotimo if you're already going past what the thing supplies by default, it's pretty much trivial to write your own cache 02:12
you can find the implementation of "is cached" in rakudo's lib/experimental.pm6 02:13
sammers thanks, I will take a look
timotimo all you'd need to do to make the hash available for introspection and manipulation: apply a role to the sub that is parameterized with the hash 02:14
and create a method that just returns that hash
02:16 pyrimidine left 02:18 user__ joined 02:22 kalkin- left
ZzZombo Sounds like a bug: 02:23
Ambiguous call to 'postcircumfix:<{ }>'; these signatures all match:
:(Str:D \s, \x, *%_)
:(\SELF, Iterable \key, :$delete!, *%other)
called like
say 'qeegrhddvs'<as for loop>:delete;
timotimo what were you expecting :D
ZzZombo Str:D should have precedence, shouldn't it?
as a less general
-a
timotimo actually with the Iterable key and :delete! it might not 02:24
m: say &postcircumfix:<{ }>.candidates
camelia (sub postcircumfix:<{ }> (\SELF, \key) { #`(Sub|52618544) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu \ASSIGN) { #`(Sub|52614592) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu :$BIND! is raw) { #`(Sub|52617480) ... } sub postcircumfix:<{ }> (\SELF, \…
timotimo m: say &postcircumfix:<{ }>.candidates>>.signature
camelia ((\SELF, \key) (\SELF, \key, Mu \ASSIGN) (\SELF, \key, Mu :$BIND! is raw) (\SELF, \key, :$delete!, *%other) (\SELF, \key, :$exists!, *%other) (\SELF, \key, :$kv!, *%other) (\SELF, \key, :$p!, *%other) (\SELF, \key, :$k!, *%other) (\SELF, \key, :$v!, *%ot…
02:24 retupmoca joined
timotimo anyway, i'm late for bed 02:28
oh, also: the less general a signature is, the less precedence it gets
more clearly: 02:29
ZzZombo what
timotimo the more specific signature is the one that will get called
i think what you get here is the problem where you have parameter 1 with a type constraint in candidate A, and parameter 2 with a type constraint in candidate B
and both type constraints match
m: multi sub aaaaaah(Str $a, $b) { "first" }; multi sub aaaaaah($a, Int $b) { "second" }; say aaaaaah("hi", 10) 02:30
camelia Ambiguous call to 'aaaaaah'; these signatures all match:
:(Str $a, $b)
:($a, Int $b)
in block <unit> at <tmp> line 1
timotimo m: multi sub aaaaaah(Str $a, $b) { "first" }; multi sub aaaaaah($a, Int $b) { "second" }; say aaaaaah("hi", "oh")
camelia first
ZzZombo that really... comes unexpected
timotimo m: multi sub aaaaaah(Str $a, $b) { "first" }; multi sub aaaaaah($a, Int $b) { "second" }; say aaaaaah(9, 9)
camelia second
timotimo why would it?
ZzZombo and different to all other languages with overloading.
timotimo i think we are using the word "general" with complete opposite meanings then 02:31
which is the more general one, DoTheThing(Object a, Object b) or DoTheThing(String a, String b)?
ZzZombo none?
timotimo wat
in that case, you're using "general" in a third way that i was not aware of even existed 02:32
ZzZombo "general" as in "more wide", "matches more things", what other meanings does it have here? 02:33
timotimo yeah, "general" is "more wide"
so then why would (Object, Object) not be more general than (String, String)?
every String is also Object, so Object, Object will match String, String, but every other possible combination of things as well 02:34
so Object, Object clearly is more general?
but you want the *less* general one to be called
otherwise you could never ever reach the (String, String) candidate in my example
ZzZombo if you talk about P6, there is no Object type I'm aware of, so it has to be a user type unrelated to String,
timotimo you were the one who started with "{ll other languages with overloading"
p6 also has no String type either 02:35
ZzZombo languages differ, in many of them strings don't inherit from any objects, so this example was hard to judge.
timotimo what, really?
certainly that's the case in java and c#
ZzZombo well... yea
timotimo c++ doesn't have something like Object, except if you count "void *" 02:36
python is that way, too
i mean, not the same way as c++, the same way as java and c#
also ruby i believe
i imagine haskell has something like the bottom type that everything is derived of (or maybe i mean the top type?) 02:37
ZzZombo Pascal and C++ don't have strings as objects.
timotimo well, you can surely claim std:: doesn't belong to the language, but i'd call that cheating
ZzZombo ow,
I meant C
timotimo ah
yeah, C doesn't really have a native notion of objects in the first place
also, C doesn't do any overloading, and i'm not sure if pascal does 02:38
object pascal probably does, though
ZzZombo Well, can we go back to topic of why does the Str:D candidate loses, exactly?
timotimo it doesn't lose 02:39
it ties with the other candidate
ZzZombo it doesn't win, I mean
timotimo candidate one wants the first argument to be a defined string
candidate two wants the key to be Iterable
the first argument is a defined string, the second argument is an Iterable
the second candidate also wants a :delete argument to exist, which it does in this case 02:40
the second candidate is theoretically narrower (less general) but named arguments don't factor into the calculation at all in p6 02:41
oh, and the first candidate allows any named to exist, so it doesn't get kicked out because of the :delete you've passed 02:42
i'm not sure if i'm explaining well
which part of what i say doesn't make sense to you?
SmokeMachine moritz: my Punnable wasnt mentioned... :(
modules.perl6.org/?q=Punnable 02:43
02:44 LeCamarade left
timotimo wasn't mentioned where? 02:44
02:45 ilbot3 left
timotimo i expect you meant the weekly, where i just put that in 02:45
SmokeMachine p6w 02:46
timotimo moritz isn't responsible for the weekly :)
SmokeMachine timotimo: thanks! :)
timotimo YW 02:47
okay, i'm waaaaay late for bed now, ZzZombo can we continue this tomorrow?
ZzZombo Yea, sure.
Thanks anyway.
timotimo (also, the rain stopped splattering violently against the blinds, so that's very good for the sleepings)
02:48 ilbot3 joined, ChanServ sets mode: +v ilbot3
timotimo i think my tone was a bit overbearing; sorry about that, i'm dealing with weird withdrawal effects :\ 02:48
02:49 LeCamarade joined
ZzZombo Well, anyway, the bit what makes no sense to me how does it ignore the less generic arguments to the left when deciding what to use in case of a tie. 02:50
timotimo that's just because perl6 doesn't have a rule where matches earlier in the signature win over matches later in the signature 02:51
i.e. if candidate A matches parameter 1 and candidate B matches parameter 2, no-one wins
well, there's the splattering water noise again :\
ZzZombo I've just refreshed my memory regarding how overloading works, say, in C++: cpp.sh/3milb 02:52
timotimo it's not the romantic kind of rain noise you'd get from a "rainy mood website" or something
ZzZombo The compiler guessed the candidate using the type of the first argument, so there was no ambigous call.
Why does P6 differ? 02:53
timotimo your c++ example doesn't map to the p6 example
ZzZombo Well, it was simplified, what do you think? Unless you want to say it's different enough not to illustrate anything.
02:53 mcmillhj joined
timotimo cpp.sh/23blg 02:54
02:54 agentzh left
timotimo this is the equivalent of what you're trying to do and it gives this message: 02:54
In function 'int main()':
18:12: error: call of overloaded 'x(int*, int*)' is ambiguous
18:12: note: candidates are:
5:6: note: void x(int*, void*)
9:6: note: void x(void*, int*)
note how C++ doesn't let the first one win because the earlier parameter matches 02:56
matches exactly*
02:58 mcmillhj left 03:00 regreg joined
timotimo finally goes to bed 03:01
03:06 adu joined 03:10 pyrimidine joined, adu left 03:11 agentzh joined 03:12 kyan joined 03:13 mcmillhj joined 03:14 pyrimidine left 03:17 mcmillhj left 03:18 _sfiguser left, xtreak joined 03:20 pyrimidine joined 03:22 noganex_ joined 03:24 noganex left 03:28 pyrimidine left 03:31 muraiki left 03:33 _sfiguser joined 03:48 retupmoca left 04:04 pyrimidine joined 04:12 pyrimidine left
ZzZombo Why all of the sudden my AT-KEY gets a capture for the key? 04:15
multi method AT-KEY(::?CLASS:D: \key) { print 'AT-KEY: ',\key,"\n"; say key.WHAT; <-- Capture } 04:16
04:22 mcmillhj joined 04:27 mcmillhj left 04:28 gdonald_ left, gdonald_ joined 04:30 agentzh left 04:36 khw left 04:48 xtreak left 04:49 Cabanoss- joined 04:51 xtreak joined 04:53 Cabanossi left, Cabanoss- is now known as Cabanossi 04:55 wamba joined
TimToady m: my regex abc { ‘aaa’ }; my regex xyz { <&abc> }; say ‘aaa’ ~~ /<xyz>/ 05:02
camelia 「aaa」
xyz => 「aaa」
05:08 pyrimidine joined 05:13 pyrimidine left 05:16 pyrimidine joined 05:18 ZzZombo left 05:21 pyrimidine left 05:24 xtreak left 05:25 mcmillhj joined 05:26 Actualeyes left 05:28 xtreak joined 05:42 Actualeyes joined 06:04 pyrimidine joined 06:06 mcmillhj left 06:09 pyrimidine left 06:19 bwisti left 06:20 darutoko joined 06:23 pyrimidine joined 06:28 pyrimidine left 06:39 xtreak left 06:43 xtreak joined 06:44 ZzZombo joined, ZzZombo left, ZzZombo joined 06:46 wamba left 06:52 RabidGravy joined 07:01 mcmillhj joined 07:05 pyrimidine joined 07:06 cyphase left, mcmillhj left 07:13 pyrimidine left 07:18 mcmillhj joined, cyphase joined 07:19 bjz joined, wamba joined 07:23 mcmillhj left, abraxxa joined 07:25 mcmillhj joined 07:26 salva0 joined 07:28 abraxxa left, pyrimidine joined 07:30 mcmillhj left, andrzejku left 07:31 andrzejku joined 07:33 abraxxa joined 07:46 llfourn left 07:48 mcmillhj joined 07:54 mcmillhj left 07:57 domidumont joined 08:06 ufobat joined 08:13 mcmillhj joined 08:15 darutoko left 08:17 mcmillhj left 08:18 _28_ria left 08:19 domidumont left, _28_ria joined 08:20 domidumont joined, xtreak left 08:27 xtreak joined 08:28 parv joined, brrt joined 08:30 xtreak left 08:32 mcmillhj joined, zakharyas joined 08:33 rindolf joined 08:34 xtreak joined 08:37 kyan left, mcmillhj left 08:40 mcmillhj joined 08:42 llfourn joined 08:43 wamba left, rindolf left 08:45 mcmillhj left, regreg left 08:46 llfourn left 08:49 mcmillhj joined 08:50 xtreak left 08:51 mcsnolte left 08:54 mcmillhj left 08:55 rindolf joined 08:59 risou is now known as risou_awy 09:02 mcmillhj joined 09:04 jonas1 joined, dakkar joined 09:07 mcmillhj left 09:09 risou_awy is now known as risou, unclechu left, Matthew[m] left, tadzik left, wictory[m] left, dp[m] left, xui_nya[m]1 left, ilmari[m] left, CIAvash[m] left, M-Illandan left, mienaikage left 09:21 Ven joined 09:24 zakharyas left 09:26 mcmillhj joined
ZzZombo m: sub x{ my $*x=$*x // 'abc'};my $*x=123;x 09:30
camelia ( no output )
ZzZombo m: sub x{ my $*x=$*x // 'abc'};my $*x=123;say x
camelia abc
ZzZombo m: sub x{ my $*x=$*x // 'abc'};my $*x=123;say x,$*x
camelia abc123
09:31 mcmillhj left
ZzZombo m: sub x{ with $*x {.say} };my $*x=123;say x,$*x 09:34
camelia 123
True123
ZzZombo m: sub x{ with $*x {.say} else {say 'NULL'} };my $*x=123;say x,$*x
camelia 123
True123
ZzZombo m: sub x{ with $*x {.say} else {say 'NULL'} };x
camelia NULL
ZzZombo WTF, doesn't work for me.
09:35 xtreak joined 09:36 wamba joined 09:38 gdonald_ left, gdonald_ joined 09:44 robertle joined
moritz seems to work fine 09:46
09:50 wamba left
Ven maybe upgrade your local rakudo™ :) 09:51
09:53 parv left 09:59 mcmillhj joined
masak TimToady: in the case of `my $x; quasi { my $x; quasi { {{{$x}}} } }`, which $x gets bound in the unquote? 10:03
TimToady: I've understood earlier remarks from you to mean the answe is "the outer one"; just double-checking 10:04
10:04 brrt left, mcmillhj left, llfourn joined, brrt joined 10:09 risou is now known as risou_awy, xtreak left 10:10 mcmillhj joined
lizmat clickbaits p6weekly.wordpress.com/2017/02/28/...a-changin/ 10:12
10:13 cyphase left
Ven lizmat++ 10:13
10:15 mcmillhj left
moritz lizmat++ 10:19
10:21 cyphase joined, bbkr_ joined
masak lizmat++ 10:22
masak read that as "the iOS are a-changin'" :P
lizmat :-) 10:23
bbkr_ p6: say (0+1i) * (0+1i); say (0+1i) ** 2 # power Num-ifies aruments? looks like bug to me
camelia -1+0i
-1+1.22464679914735e-16i
10:24 huggable joined, ChanServ sets mode: +v huggable
masak bbkr_: doesn't look like a bug to me 10:24
bbkr_: not if you take into account the definition of pow() for complex numbers
10:25 mcmillhj joined
masak that, plus, if you're doing complex numbers you're already doing Num under the hood, so on your head be it 10:25
jnthn A complex is defined as two floating point arguments
masak right
Ven Zoffix: your M module is very cute, but once again I wish we had a .grep-not :) 10:26
masak Ven: M module? 10:27
url?
Ven github.com/zoffixznet/perl6-M masak
jnthn Ven: is .grep(!*.foo) or .grep({ not .foo }) not enough? :-)
10:27 agentzh joined
masak indeed cute 10:28
Ven jnthn: not for the smartmatch-y cases. .grep(/foo/) is nice
but .grep(* !~~ /foo/) breaks the magic :).
bbkr_ thanks for explanation. this looks weird that "(0+1i) * (0+1i) == (0+1i) ** 2" gives False :(
jnthn As in, is too much to type, or doesn't work?
10:28 wictory[m] joined, xtreak joined
masak bbkr_: welcome to floating-point. 10:29
Ven no, it does work, I'd just like to have something that does !~~ for me, like the current grep does ~~ for me
jnthn bbkr_: This is exactly why 1.2 and similar are Rat, not Num, in Perl 6.
masak bbkr_: www.floating-point-gui.de/ ;) 10:30
masak hopes that last URL doesn't come across as too patronizing
10:30 brrt left
bbkr_ :) 10:30
masak it's a good resource.
jnthn bbkr_: But for Complex, Rat would probably be an odd default given most use cases for them would want floating point.
Warts and all
10:30 mcmillhj left
jnthn I think it's been speculated that there could be a Complex[Rat,Rat] at some point in the future 10:31
10:31 brrt joined
masak not sure you need one type parameter for each axis... :P 10:32
10:32 agentzh left
masak .oO( I'll have a complex number with the reals being integers and the imaginaries being 2-adic numbers, please ) 10:32
jnthn hah, point :P 10:33
bbkr_ masak: that's exactly what I was thinking after reading "If the right-hand side is a non-negative integer and the left-hand side is an arbitrary precision type (Int, FatRat), then the calculation is carried out without loss of precision." in docs. that Complex is made of 2 Ints, therefore it should be calculated without precision loss 10:34
10:34 mcmillhj joined, xtreak left
moritz bbkr_: we don't have Complex made of Ints yet 10:35
bbkr_: all our Complex are (num, num) right now
masak jnthn: the one thing I'm looking forward to, though, is Complex[Complex] :P
moritz and nobody seems to bother enough to do anything about it
masak my pet peeve about Complex is when people use them as a pair of numbers (and nothing more) 10:36
jnthn Why? 'cus it's...an overly-complex solution? :P 10:37
masak something like that
it doesn't carry the right kind of intent for me 10:38
jnthn *nod*
masak to me, the notable thing about complex numbers isn't "a pair of numbers" (though I guess it is for many, which kind of explains it)
it's the fact that i * i == -1
m: say i * i
camelia -1+0i
10:38 mcmillhj left
Ven
.oO( How could you not use this opportunity to showcase ² )
10:39
m: -1² # I have no idea what the priority is
camelia WARNINGS for <tmp>:
Useless use of "-" in expression "-1²" in sink context (line 1)
Ven m: say -1² # looks like - comes later? 10:40
camelia -1
masak yes, prefixes tend to be looser than postfixes
the exception being :
Ven I guess, much like in JS and others, we don't have negative literals :).
masak m: my $d = 42; say :$d.perl
camelia :d(42)
Ven m: my %h = -1 => a; say %h.perl;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
Ven m: my %h = -1 => 'a'; say %h.perl; # barefails 10:41
camelia {"-1" => "a"}
Ven m: my %h = 1 => 'a'; say %h.perl; # look ma, no strings(?)
camelia {"1" => "a"}
masak Ven: we don't, but thankfully the "constant parameter default" mechanism recognizes prefix:<-> as a part of a constant value
thanks to jnthn++, I believe
10:42 mcmillhj joined
Ven okay, thanks. we're better off than the aforementioned JS, where {-1: 1} is a parse error (because it expects a literal) :) 10:42
10:42 cyphase left
jnthn masak: I don't think that was me, fwiw :) 10:42
Or at least, I don't remember doing that :)
masak Ven: Perl 6's object notation isn't so literal-minded :P
jnthn: I'm not gonna retract that increment, if that's what you're hoping for :P 10:43
Ven
.oO( I always pretend I didn't do anything, in case it ever breaks )
10:43 risou_awy is now known as risou, xtreak joined 10:47 cyphase joined, mcmillhj left 10:50 mcmillhj joined 10:51 andrzejku left, andrzejku joined 10:54 TEttinger left 10:55 mcmillhj left, n1ce left 10:56 n1ce joined 10:59 risou is now known as risou_awy
ZzZombo I had to replace 11:01
callwith SELF,@a,|%_;
with
CORE::{'&postcircumfix:<{ }>'}(SELF,@a,|%_);
because the first complained about too many positional arguments (2), expected 1.
Why tho? 11:02
Zoffix - with ints in sig was TimToady's doing IIRC and I made it work for all numerics.
The priority in -1² is exactly the same as in regular math: -(1²) 11:03
I don't get how .grep-not(/foo/) is better than .grep({!/foo/})
11:11 mcmillhj joined
Zoffix lizmat++ good weekly 11:12
11:12 zakharyas joined 11:14 cyphase left 11:15 mcmillhj left 11:18 cyphase joined 11:19 grondilu left
ZzZombo This is stupid. Why should Ranges somehow get messed up when passing them around, unlike other objects? 11:19
m: say my $x=0..*
camelia 0..Inf
ZzZombo m: my $x=0..*;sub x($x){ $x.say };x $x; 11:20
camelia 0..Inf
ZzZombo wtf
moritz ZzZombo: please tone done your swearing a bit 11:21
ZzZombo m: my $x=0..*;sub x($x){ (1,2,3,4,5,6)[$x] };say x $x;
camelia Cannot coerce Inf to an Int
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Actually thrown at:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo m: my $x=0..*;sub x($x is raw){ (1,2,3,4,5,6)[$x] };say x $x;
camelia Cannot coerce Inf to an Int
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Actually thrown at:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
11:21 grondilu joined
ZzZombo m: my $x:=0..*;sub x($x is raw){ (1,2,3,4,5,6)[$x] };say x $x; 11:21
camelia (1 2 3 4 5 6)
ZzZombo why is that?
11:22 _sfiguser left 11:23 Ven left
ZzZombo Now I have to track down where exactly did I forget `is raw` or binding it instead of assigning. 11:23
jnthn Because $x is a Scalar container
moritz might be a difference in how the [] subscript deals with containerized vs. not-containerized values
jnthn If you assign into it you are putting something into the container
If you bind, you're replacing the container with a value
And then [...] subscripting cares about whether there's an item or not 11:24
m: my @a = 1..5; my @b = 1..3; say @a[@b]; say @a[$@b]
camelia (2 3 4)
4
11:24 mcmillhj joined
jnthn Probably better to just use sigilless vars which imply no context 11:25
That's primarily why they exist
ZzZombo But it comes from within a hash :S
unless there is a way to make it as a whole "sigilles"... is there? 11:26
jnthn Could also bind into the hash in the first place, or just do <> at the point of use 11:28
ZzZombo it was bound in the hash
11:29 mcmillhj left
ZzZombo %h<range>:=0..* if %h<range>:!exists; 11:29
and it is not set up otherwise in the test.
jnthn m: my %h; %h<range> := 0..*; m: my @a = 1..5; say @a[%h<range>]; 11:30
camelia (1 2 3 4 5)
jnthn m: my %h; %h<range> := 0..*; sub x(\r) { my @a = 1..5; say @a[r] }; x %h<range>; 11:31
camelia (1 2 3 4 5)
ZzZombo m: my %h; %h<range> := 0..*; sub x(%_) { my @a = 1..5; say @a[%_<range>] }; x %h; # more like this in my code 11:32
camelia (1 2 3 4 5)
ZzZombo duh 11:33
11:34 _sfiguser joined 11:35 avalenn left
ZzZombo m: my %h; %h<range> := 0..*; sub x(%_) { my @a = 1..5; say @a[%_<range>] }; my %h2=%h; x %h2 11:36
camelia Cannot coerce Inf to an Int
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Actually thrown at:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo Bingo
this is really so fragile, I can't believe.
11:37 avalenn joined, lukaramu joined, dp[m] joined, M-Illandan joined, tadzik joined, Matthew[m] joined, unclechu joined, ilmari[m] joined, xui_nya[m] joined, CIAvash[m] joined
moritz it's mostly fragile because there are so many edge cases you need to consider 11:38
11:38 mienaikage joined
jnthn ZzZombo: If you know it's going to be a range at the point of use, it'd probably be better to do <> 11:39
moritz and it took us quite some time (like, years) to get it right
ZzZombo jnthn: can you show what exactly do you mean? 11:41
11:43 mcmillhj joined
Zoffix Can I somehow get at Perl6::Compiler? 11:44
11:44 risou_awy is now known as risou, jkva_ left
Zoffix Wanna do REPL.new(compiler, %).repl-eval("die"); but I can't figure out where to get the compiler from 11:44
brrt iirc, there was something called 'getcomp' 11:45
moritz m: use nqp; say nqp::getcomp('perl6').^name 11:46
camelia Perl6::Compiler
jnthn nqp::getcomp
Zoffix m: use Perl6::Compiler:from<NQP>; Perl6::Compiler.new
camelia ( no output )
Zoffix Thanks.
jnthn m: my $a = 0..*; my @a = 1..5; say @a[$a<>]
camelia (1 2 3 4 5)
jnthn ZzZombo: ^^
11:46 jkva_ joined, adu joined 11:47 mcmillhj left 11:48 TBSliver left, regreg joined
ZzZombo but the thing is, I wanted to cover as many possibilities to index the object in a single parameter. 11:48
like [*], [], [1..2], [*-3,*-1], etc 11:49
11:50 bjz left, zakharyas left, mcmillhj joined, mienaikage left, xui_nya[m] left 11:53 andrzejku left, TBSliver joined, andrzejku joined, ilmari[m] left, xui_nya[m] joined 11:55 chee left, mcmillhj left 11:56 zakharyas joined 11:57 chee joined 12:00 risou is now known as risou_awy 12:02 pyrimidine left 12:03 lizmat left, lizmat joined 12:04 user9 left 12:05 adu left 12:07 mienaikage joined 12:08 user9 joined, ilmari[m] joined, darutoko joined, abraxxa left 12:09 aindilis joined, gregf_ joined, xtreak left
tbrowder mornin' #perl6 12:10
12:11 araraloren joined 12:12 xtreak joined, mcmillhj joined, dp[m] left
tbrowder i was just looking at the perl6 home page and wonder what you think about two possible changes: (1) make the upper-left Camelia a hot link to the home page from all the other perl6 pages and (2) add some kind of modest svh animation to one or more pages. 12:14
s/svh/svg/
12:17 mcmillhj left 12:18 risou_awy is now known as risou
DrForr I'd agree to the Camelia link, in retrospect I'm a bit surprised it wasn't that way already. 12:19
tbrowder one example of animation is to make the larger Camelia flutter a small amount periodically. the flutter could be just a minor rotation cw then ccw a few degrees. the time interval and flutter amount could be randomized. of course TimToady would have to approve since Camelia is his and the orientation is currently fixed as is.
masak laughs out loud at "of course TimToady would have to approve" 12:21
tbrowder well it's his copyright
masak we're talking about rotating a logo by a few degrees 12:22
12:22 xtreak left 12:23 dp[m] joined
Zoffix -1 to any animation or fluttering unless there's an easy way to disable it. For me, it'd make the page completely unreadable. 12:23
12:24 abraxxa joined
Zoffix www.webaccessibility.com/best_prac...form_id=11 12:24
masak there used to be a time when Esc in the browser stopped all animations
I miss that
Zoffix Yeah, I don't get why it was apparently rwmoved. 12:25
tbrowder i don't think minor and slow reorientation occasionally would trigger an epilepticc fit or bting on the internet police 12:26
masak Zoffix: there's probably an interesting story behind that, but I don't know it 12:27
12:27 huggable left
tbrowder (mumble stupid virtual keyboard...) 12:27
masak tbrowder: I would agree, but I could also argue Zoffix's PoV. in this case, what would be the *usability* story for such an animation 12:28
other that "we're cute!", I guess
DrForr Accessibility isn't about triggering epilepsy or being PC, it's about being available to the widest crowd possible.
masak if the animation doesn't work, it doesn't work
can still view the page in lynx
tbrowder yeah, "cute" to make Camelia seem alive
12:29 cyphase left, lizmat left 12:30 lizmat joined, cyphase joined
masak I'm not sure making Camelia seem alive is a goal of perl6.org 12:30
do you know any other languages (python, ruby, etc) whose logotype moves?
DrForr I empathize with the desire, my problem is that movement is going to distract, and a fluttering of wings in the UL corner of the screen is going to make my eyes flicker to that corner of the screen when I'm trying to puzzle out what @f>><==@bar means, which is going to be distracting as all f*ck. 12:31
brrt i'm not sure which part of this is not bikeshedding :-)
tbrowder DrForr: i was just referring to a bit of the rules Zoffix pointed out--don't think it would fall under the guidelines if done modestly--wouldn't affect content really
Zoffix tbrowder: a person with cognitive disability just told you the feature would make the page unreadable... feels strange to me you dismiss it as "internet police". There are user scrips to fight it, of course...
tbrowder why would it be unreadable?
i'm not unsympathetic, just trying to understand... 12:32
DrForr I could argue for it on the front page where your eyes are already flickering around trying to find the topic you're after, it gives some action and life to the page. But if I'm reading docs, the last thing I want is some damn animation distracting me from trying to read the text. I'm already assaulted by enough of that crap on an hourly basis. 12:33
12:34 lucasb joined
Zoffix tbrowder: every time the butterfly would move your full attention moves to it, then you have to go back and try to find where you were reading, until it moves again, and quickly the brain starts to anticipate the next movement, just focusing on it, so you have to block it out by scrolling away or with your hand or movinf another window over it 12:34
12:34 risou is now known as risou_awy, rindolf left
lucasb re animated logos: you can play with Crystal logo here: crystal-lang.org/ , try spinning it 12:34
Zoffix or using AdBlock to block the image, if it is an image 12:35
lucasb cute, no?
DrForr That's why I like focus-follows-mouse on window managers that have it. I can scroll around in a window at the bottom of a stack of 10 to find a line and mouse back to the terminal without losing my hierarchy.
12:37 movl left
masak lucasb: not really :P 12:37
lucasb :)
12:38 mcmillhj joined
timotimo i just made my xfwm4 not raise windows when i use the scrollwheel on 'em 12:38
DrForr Again, just to make myself clear, I'm fine with it on the home page and maybe pages like 'download' where you're either making a decision or waiting for software. Not on documentation, especially language docs where we have long pages of text. 12:39
timotimo (window manager tweaks -> accessibility -> raise windows when any mouse button is pressed"
")
ZzZombo: you still awake? interested in talking about the ambiguous dispatch case any more, or is that no longer an issue?
DrForr Also on some mobile browsers animations refocus the page to the top when they cycle. 12:40
brrt pro: cute; con: everything
timotimo m(
there's a subreddit that has an animated banner that scrolls through from right to left and it has a "stop animation" button that just links to the mobile version of reddit on that same subreddit 12:41
Zoffix heh 12:42
12:42 movl joined, mcmillhj left 12:44 pmurias joined, risou_awy is now known as risou 12:45 cibs left
ZzZombo timotimo: uh, I don't even remember what my code looked like this morning anymore. 12:46
12:47 cibs joined, pyrimidine joined 12:48 mcmillhj joined
timotimo that's cool 12:49
12:50 rindolf joined 12:51 pyrimidine left 12:53 mcmillhj left, pyrimidine joined 13:00 cibs left 13:01 risou is now known as risou_awy 13:02 cibs joined
lucasb when 6.d is scheduled? can I leave my suggestions here on the channel? 13:04
lizmat #perl6-dev may be a better place ? 13:05
lucasb right, thanks lizmat
Zoffix Wow, $5 Linode... RIP shared hosting. 13:06
13:07 chee left 13:08 buggable left, chee joined, buggable joined, ChanServ sets mode: +v buggable, Geth left, Geth joined, ChanServ sets mode: +v Geth, huggable joined, ChanServ sets mode: +v huggable, newbie1 joined 13:09 NeuralAnomaly left, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly, mcmillhj joined 13:13 lichtkind joined
timotimo ugh, reading about the CloudPets database situation makes me sick 13:14
13:14 mcmillhj left
timotimo www.troyhunt.com/data-from-connect...-messages/ - if you want to vomit alongside me 13:15
DrForr Just read that from another source. 13:17
Or at least the headline portion.
timotimo yeah, guess what 13:20
they left their mongodb accessible from the public internet
multiple parties copied their whole database off-site and left a ransom demand database next to the original data
El_Che well
in my view that part is irrelevant
the part that matters is why are they keeping all that stuff
timotimo to put a cherry on top, the company later responded saying it's just "a very minimal issue"
that's not surprising 13:21
it's just how the app works
El_Che the fly on top the Internet-Of-Shit
DrForr So they got hit by the MongoDB "exploit" that made the rounds last month or so, and just now were forced to report it due to whatever timeline issues? 13:22
timotimo at least this time the physical addresses of folks weren't in the database 13:23
i don't remember an exploit
DrForr Freely accessible, I see.
timotimo yes
and every voice message and profile photo was just put onto s3 without any further requirements for authentication 13:24
13:25 abraxxa left, Khisanth left
SmokeMachine m: say True ⁇ "OK" ‼︎ "NOK" # :( 13:26
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say True7⏏5 ⁇ "OK" ‼︎ "NOK" # :(
expecting any of:
infix
infix stopper
postfix
statement end
statement m…
13:27 risou_awy is now known as risou
SmokeMachine u: ⁇ 13:27
unicodable6 SmokeMachine, U+2047 DOUBLE QUESTION MARK [Po] (⁇)
13:28 rindolf left
SmokeMachine u: ‼︎ 13:28
unicodable6 SmokeMachine, U+203C DOUBLE EXCLAMATION MARK [Po] (‼)
SmokeMachine, U+FE0E VARIATION SELECTOR-15 [Mn] (◌︎)
SmokeMachine m: say True ⁇ "OK" ‼ "NOK"
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say True7⏏5 ⁇ "OK" ‼ "NOK"
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier…
ZzZombo wait, what is the difference between a package and a module?
13:28 sammers left, dp[m] left 13:29 dp[m] joined
SmokeMachine shouldn't ⁇ ‼ work? 13:30
timotimo you can make it work
lizmat .u ⁇ 13:31
yoleaux U+2047 DOUBLE QUESTION MARK [Po] (⁇)
13:31 avalenn left
lizmat .u ‼ 13:31
yoleaux U+203C DOUBLE EXCLAMATION MARK [Po] (‼)
lizmat wow
SmokeMachine timotimo: I can try... but should it work?
timotimo why does it stop at double, though? why can't we have triple?
i mean we have triple period in …
also, it'd be lovely if we could have TRIPLE LATIN CAPITAL LETTER X for the bad-ass action movie 13:32
13:32 lukaramu_ joined
DrForr Tempted to s/.ass// there but will reserve as it was kinda fun. 13:33
13:33 avalenn joined
timotimo i was still a little child, very impressionable, when that movie came out 13:33
13:36 lukaramu left
DrForr I just saw the latest outing in the franchise last week. 13:36
13:37 gdonald_ left, gdonald_ joined
DrForr Must've missed at least one because I had no idea why they needed the deus ex at the end, but I guess there was at least one movie I missed. 13:38
SmokeMachine u: EXCLAMATION MARK
unicodable6 SmokeMachine, U+0021 EXCLAMATION MARK [Po] (!)
SmokeMachine, U+00A1 INVERTED EXCLAMATION MARK [Po] (¡)
13:38 Khisanth joined
unicodable6 SmokeMachine, 22 characters in total: gist.github.com/00ab817a6ac83f34f1...ba996eb085 13:38
DrForr looks to see if there's a COMBINING RIGHT EXCLAMATION MARK... 13:39
.u ⃒ 13:41
yoleaux U+20D2 COMBINING LONG VERTICAL LINE OVERLAY [Mn] (◌⃒)
DrForr That's close but not there.
13:42 sammers joined
ZzZombo m: say 1234 ~~ all(* > 0,* %% 2==0,*-4==1230) 13:42
camelia False
ZzZombo m: say 1234 ~~ all(* > 0,* % 2==0,*-4==1230)
camelia True
ZzZombo m: say 1234 ~~ all((* > 0,* % 2==0,*-4==1230)) 13:43
camelia True
ZzZombo so is it deep?
13:43 mcmillhj joined
ZzZombo m: say 1234 ~~ all() 13:43
camelia True
timotimo all implements "single-arg rule" semantics, i think 13:44
so you can do stuff like all(@a) > 4
it's not "deep" though, it just iterates the outermost list
ZzZombo hmm 13:45
13:45 abraxxa joined
ZzZombo what if I have a list of conditions to pass, with nested lists to AND-group them, how would I do it nicely and concise? 13:46
moritz you can nest all() junctions inside any() junctions 13:50
but in general, people tend to over-use junctions. Don't
13:51 koki left
moritz they are need for short boolean matchers, but if you base the design of your programs on junctions, it'll byte you 13:51
13:52 rindolf joined, llfourn left
masak .oO( it'll nybble you ) 13:54
DrForr sets out the playtes.
Zoffix m: class Foo { has $.bar = 72 }.perl.say 13:56
camelia Foo
Zoffix I thought .perl included public attributes?
Oh
m: class Foo { has $.bar = 72 }.new.perl.say
camelia Foo.new(bar => 72)
Zoffix never mind
masak in related news, I realized the other day that what I tried to do by overriding infix:<&&> (which didn't work), can instead be done by just using infix:<&>
moritz' advice still stands, though -- they are overused
perlpilot actually tends to under-use junctions 13:57
lizmat masak: related to that, I was hoping for another type of signature that would make infix:<&&> a normal sub
masak lizmat: reminds me of one of my early macros blog posts 13:58
timotimo masak: in my shooter game i'm using complex numbers for cartesian coordinates. would it be fine to you if i implemented "rotate 90 degrees around origin" by multiplying with i? :)
DrForr just converted a bunch of stuff in Perl6::Parser to use method sigil { Q{$} } just to get an attribute out of the data dump.
lizmat in any case, that would require some new binding code
and a general slowdown :-(
timotimo it's only a compile-time slowdown, though?
masak lizmat: also, github.com/masak/007/issues/154
Geth specs: eccde7873a | (Zoffix Znet)++ | v6d.pod
Reword requirem,ents for idea submitions
masak timotimo: I think so, yes. if you got any actual use out of the rotation. 13:59
jnthn lizmat: The "another type of signature" is actually "another type of sub", called a macro. ;-)
timotimo masak: well ... not yet! but maybe in the future?
masak jnthn: (but see the linked issue)
timotimo also, i use .polar and .unpolar a bunch, even though in my case it's quite a bit of unnecessary overhead
lizmat jnthn: I could live with that :-) 14:00
masak jnthn: tl;dr: there's a tendency to write macros as if they were subs with lazily-evaluated parameters. that "shortcoming" or thinko could *itself* be turned into a macro (trait), which code-walks the sub and turns it into the corresponding macro
issue #151 shows an example with infix:<//> (also a macro) 14:01
timotimo is that an issue in 007? 14:02
oh
now i see the link
14:02 koki joined
jnthn masak: I'd expect it to be something like macro infix:<&&>($a, $b) { quasi { my \tmp = {{{$a}}}; if tmp { tmp } else { {{{$b}}} } } } 14:02
Juerd What are those group-hugged variables? 14:03
masak jnthn: aye
Juerd: unquotes
Juerd Oh, macro specific?
timotimo yup
masak aye
Juerd Thanks
timotimo that's old-style macros, though :)
will new-style macros only differ by having an "@ expression" part inside the hugs? 14:04
masak {{{Q::Term @ $a}}}
but Q::Term is the default, so you can shorten it to just {{{$a}}} 14:05
there's also a "cleaner" competing syntax that we're still evaluating: unquote(Q::Term @ $a) and unquote($a)
timotimo oh, it's the other way around
masak it is now, yes
for reasons similar to why we put the regex adverbs at the front of the regex 14:06
timotimo that looks kind of like you could also write unquote($type @ $stuff)
which i suppose you can
masak you mean with an actual variable $type?
timotimo yup
masak no, not unless it's a constant, and maybe not even then 14:07
remember that this affects the *parser*
:)
timotimo hm. so it'd have to be a big if/else
maybe you mean a different kind of variable there, though
i mean a variable that's inside the macro, not inside the quasiquote
so it essentially is a constant at the time of constructing the AST to use
masak it needs to be a value known at parse time 14:08
because the parser is going to go into some state based on the shape of the unquote
"always know what language you're parsing"
timotimo right
perlpilot
.oO( Macros need a better vocabulary so that we can talk about macro-ish concepts without getting confused about timing or "level" )
14:09
masak perlpilot: "early", "late" :)
timotimo %)
essentially i was thinking of something at the same level as this: 14:10
if $type eq "term" { return quasi { unquote(Q::Term @ $foo) } } elif $type eq "statement" { return quasi { unquote(Q::Stmt @ $foo) } } elif $type eq "duck" { ... }
14:13 CIAvash[m] left, eroux joined
Zoffix m: sub foo { return ($^a, False) }; my ($a, $b) = foo Slip; dd [$a, $b] 14:13
camelia [Slip, Bool::False]
14:13 CIAvash[m] joined
Zoffix Is there a way to call foo with some value that would affect what ends up being in $b? 14:13
masak correction: junctions didn't work. instead they byted me :P 14:14
timotimo m: sub foo { return ($^a, False) }; my ($a, $b) = foo Slip.new(); dd [$a, $b]
camelia [Bool::False, Any]
timotimo hm
Zoffix m: sub foo { return ($^a, False) }; my ($a, $b) = foo Slip.new(42, 55); dd [$a, $b] 14:15
camelia [42, 55]
Zoffix timotimo++
14:15 cyphase left
timotimo i wrote "hm" because i thought it didn't work, but it did actually work 14:15
so that's nice
14:18 eroux left
Zoffix I'm guessing nqp::getcomp("perl6").eval does not get the lexical scope of the code it's run it? As in, I can safely use a dynamic variable and it won't see it? 14:20
jnthn Dyanmic variables use dynamic scope
timotimo dynamic variables aren't lexically scoped, they are dynamically scoped
jnthn So lexical scope is irrelevant
And yeah, it'll be seen
Zoffix Ph
*Oh
jnthn m: sub foo() { my $*a = 42; bar() }; sub bar() { EVAL 'say $*a' }; foo 14:21
camelia 42
Zoffix OK, lexical variables aren't seen at least.
jnthn Right, you have to arrnage specially for lexicals via outer_ctx
14:21 cyphase joined
Zoffix Oh, so you still can reach them from within the evaled code? 14:21
timotimo only if you supply the outer_ctx to EVAL 14:22
Zoffix Ah
OK
Thanks
SmokeMachine timotimo: it passed on the tests... but im sure that's not the best way to do it: github.com/FCO/rakudo/commit/aeaa7...34e551c14d
timotimo huh, that <!before '??'> looks suspicious 14:23
oh, that's for ???, not for ??
i'd throw out the ⁇ there unless you want to make ??? spell-able as ?⁇ 14:24
14:24 jonas1 left, dj_goku_ left
timotimo and i think the dupprefix for ⁇ is not an issue 14:24
Zoffix You're add ⁇ as Mexican version of ?? !! ?
*adding
timotimo is "mexican" the opposite of "texas" now?
Zoffix Yes :) 14:25
SmokeMachine Zoffix: why mexican?
hum!
Zoffix Because it's opposite of Texas
duh :)
huf but surely texas is basically mexico
timotimo now do we want to allow a texmex for that?
lizmat hmmm..... isn't this 6.d worthy ?
Zoffix lizmat: how come? I don't think it'd break any of 6.c-errata tests. 14:26
lizmat I seem to recall a discussion about ≥ and friends ?
Zoffix My recollection of tha tdiscussion is TimToady wanting to make it possible for users to declare such ops first.
14:26 cdg joined
lizmat I mean, why don't we have ≥ and ⪬ as well ? 14:26
brrt it does rather shaft things into the namespace of the user, imho 14:27
if we are to do that, it'd be very nice to collect all these changes together and do it at one go
Zoffix Agreed.
timotimo do we want to put some wording into rakudobrew's readme to suggest to people that they probably don't want this? 14:28
Zoffix lizmat: I doubt I'd find it in logs, but I fuzzily remember TimToady wanted to make it possible for users to declare such ops and then we'd just add an op in SETTING
14:30 bwisti joined
Zoffix timotimo: yes 14:30
maybe even some message on installation or something. 14:31
ZzZombo m: say $x for (1,2,3)->$x 14:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3say 7⏏5$x for (1,2,3)->$x
ZzZombo :(
14:32 kaare_ left
SmokeMachine so, shouldn't I PR the mexican version of ?? !! ? 14:32
timotimo ZzZombo: write a slang to make that work, i guess?
the reason why you can use -> with for is because for just takes a block
Zoffix SmokeMachine: I'd want to hear TimToady's opinion on the matter first.
14:32 kaare_ joined
timotimo and blocks can start with -> if they want to have a signature 14:32
but also: 14:33
you can't use $x before it's declared
so the code would have to be "say my $x for (1,2,3)->$x"
SmokeMachine Zoffix: ok... Ill save that on my repo... :)
Zoffix SmokeMachine: it's easy to shove all sorts of weird operators because they look cute to you on IRC, but the amount of people who'll actually use them is pretty small, I'd think.
Zoffix still has nightmares from U+2212 minus 14:34
It's not even entirely fixed.
m: printf '%−2s', 'foo'
camelia Directive −2s is not valid in sprintf format sequence %−2s
Zoffix ^ and fixing that would bleed it into nqp
SmokeMachine Zoffix: probably just me... (just because "I am writing it")
Zoffix well, proper way of fixing it would
14:35 tadzik left
Zoffix I highly doubt there's any programming shop with more than 3 people who'd allow their programmers to use Mexican operators. 14:36
[Coke] any sixers going to the NY pm meeting on 3/14 ? 14:37
SmokeMachine timotimo: did you mean this? github.com/FCO/rakudo/commit/e9f27...ba3cd086c1 it still works and the tests are passing... 14:38
ZzZombo m: say :a(123)
camelia Unexpected named argument 'a' passed
in block <unit> at <tmp> line 1
ZzZombo m: say (:a(123)) 14:39
camelia a => 123
SmokeMachine m: say 'a' => 123
camelia a => 123
14:39 tadzik joined
Zoffix m: say 123 R=> 'a' 14:40
camelia a => 123
Zoffix m: say [=>] 'a', 123
camelia a => 123
masak m: my $x = "a"; $x =>= 123; say $x 14:41
camelia Potential difficulties:
Useless use of =>= in sink context
at <tmp>:1
------> 3my $x = "a"; $x 7⏏5=>= 123; say $x
a => 123
masak TimToady: ^ what do you think about the above "useless use"? 14:42
(seems discriminating to the mutating-cons crowd) :P
jnthn I'd have somewhat expecting that to complain it was too fiddly :) 14:44
masak that was my expectation too!
but given that it works, I'm instead annoyed that it complains :P
CIAvash[m] lizmat: irclog.perlgeek.de/perl6/2016-01-09#i_11859391 the issue is that if users define those operators, the chaining won't work
14:45 lichtkind_ joined
Zoffix huggable: ≥ :is: irclog.perlgeek.de/perl6/2016-01-09#i_11859391 14:45
huggable Zoffix, Added ≥ as irclog.perlgeek.de/perl6/2016-01-09#i_11859391
14:49 koki left, lichtkind left, llfourn joined
timotimo SmokeMachine: i think that's correct, but i probably haven't looked closely enough 14:49
14:50 hoelzro left
SmokeMachine timotimo: :) 14:51
14:51 hoelzro joined 14:52 wamba joined
Zoffix With so many people using rakudobrew, maybe we should make it better instead? 14:52
14:54 llfourn left
[Coke] that's always an option, sure. 14:54
Zoffix defaulting to latest release instead of HEAD by default and shimming zef to run `rakudobrew rehash` will probably fix a lot of problems users are currently experiencing 14:55
timotimo also: ugh, not being able to "which" the wrapper scripts 14:56
Zoffix $ which perl6
/home/zoffix/.rakudobrew/bin/perl6
timotimo that totally helps. not.
Zoffix But that is where the wrapper script is? :S 14:57
timotimo okay
you can't which "through" the wrapper scripts
Zoffix to what end?
timotimo to the end of "wtf how do i get at the source code of what it's running when i invoke this command?"
Zoffix I guess the sourcecode when I open the file... ¯\_(ツ)_/¯ 14:58
timotimo huh? 14:59
oh, rakudobrew does have a which and a whence command though
Zoffix s/guess/get/; 15:00
timotimo when i open the files i get rakudobrew's source code
masak colomon++ # news.ycombinator.com/item?id=13753894 15:01
15:02 cdg left, koki joined 15:04 zakharyas left 15:05 cdg joined
ZzZombo my @children=create xx (0..2).pick; #Undeclared routine: xx used 15:06
create is a sub 15:07
help, please
Zoffix ZzZombo: create()
15:08 skids joined
ZzZombo doesn't change anything 15:08
Zoffix u lie
ZzZombo no
Zoffix m: sub create {rand}; my @children=create xx (0..2).pick;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
xx used at line 1
Zoffix m: sub create {rand}; my @children=create() xx (0..2).pick;
camelia ( no output )
15:13 xui_nya[m] left
ZzZombo damn, forgot to hit 'save' the other time. 15:15
Zoffix :)
ZzZombo but!
15:15 sena_kun joined
ZzZombo "returns five distinct arrays (but with the same content each time), and 15:15
rand xx 3"
no () 15:16
Zoffix ZzZombo: because rand is a term
ZzZombo huh
m: rand
camelia ( no output )
ZzZombo m: say rand
camelia 0.153238475468308
Zoffix m: sub term:<create> {rand}; my @children=create xx (0..2).pick;
camelia ( no output )
lucasb it's thunking
ZzZombo can you remind me how do you mix-in a role into a variable? My array refuses to comply :( 15:17
gregf_ *finally Zoffix is back*
Zoffix ZzZombo: but
lucasb $var does Role ?
15:17 brrt left
Zoffix Oh wait, yeah, does. but copies 15:18
ZzZombo m: my @a but role{ method duh { die 'Duh
camelia 5===SORRY!5===
Whitespace required after keyword 'role'
at <tmp>:1
------> 3my @a but role7⏏5{ method duh { die 'Duh
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 3my @a but role{ method d…
ZzZombo m: my @a but role{ method duh { die 'Duh'}};@a.duh
camelia 5===SORRY!5=== Error while compiling <tmp>
Whitespace required after keyword 'role'
at <tmp>:1
------> 3my @a but role7⏏5{ method duh { die 'Duh'}};@a.duh
15:18 M-Illandan left
ZzZombo m: my @a but role { method duh { die 'Duh'}};@a.duh 15:18
camelia No such method 'duh' for invocant of type 'Array'
in block <unit> at <tmp> line 1
15:18 brrt joined
ZzZombo see 15:18
I can't make it
m: my @a does role { method duh { die 'Duh'}};@a.duh
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'role'
at <tmp>:1
------> 3my @a does role7⏏5 { method duh { die 'Duh'}};@a.duh
Zoffix m: my @a.^mixin: role { method duh { die "Duh"}}; @a.duh 15:19
camelia Duh
in method duh at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo Thanks!
Zoffix m: my @a; @a does role { method duh { die "Duh"}}; @a.duh
camelia Duh
in method duh at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix ZzZombo: as for the () thing. It parses your call as create(xx (0..2).pick) so `xx` ends up being a term instead of the operator so it complains when it can't find it. Terms can't take args, so rand xx 5 is not ambiguouis 15:20
And exactly why rand was made a term (despite there being a proper sub under the hood for it)
s: &rand 15:21
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/05ad...um.pm#L486
15:21 cdg_ joined, cdg left
Zoffix
.oO( why not just make sub term:<rand> {...} )
15:21
m: sub term:<foo> { 42 }; say foo() 15:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
Zoffix I guess so it could complain at people. 15:23
m: say rand()
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of rand(); in Perl 6 please use rand
at <tmp>:1
------> 3say rand7⏏5()
lucasb m: say &rand() # just testing
camelia 0.60544234643555
15:25 xui_nya[m] joined 15:26 kurahaupo joined 15:29 kurahaupo left
[Coke] u: - 15:29
unicodable6 [Coke], U+0000 <control-0000> [Cc] (control character)
[Coke], U+0001 <control-0001> [Cc] (control character)
[Coke], 5694 characters in total: gist.github.com/343bb2c24d80ebaf26...44376b3e0d
[Coke] ... I did not expect that.
ooooh. 15:30
15:30 kurahaupo joined
[Coke] oops. 15:30
timotimo haha :)
you meant to ask for "what is this"
instead you got "which characters have this in their name"
Zoffix m: '-'.uniname.say
camelia HYPHEN-MINUS
15:30 tadzik left
Zoffix .u - 15:31
yoleaux U+002D HYPHEN-MINUS [Pd] (-)
15:31 ZzZombo left 15:32 tadzik joined, ZzZombo joined, M-Illandan joined
ZzZombo I'm about to kill something 15:32
Zoffix Lik what? 15:33
ZzZombo m: role R[$x is copy='Die'] { sub Die{ die 'Ded'}};my $a does R;$a.Die
camelia No such method 'Die' for invocant of type 'Scalar+{R}'
in block <unit> at <tmp> line 1
timotimo lik the bread?
ZzZombo m: role R[$x is copy='Die'] { sub Die{ die 'Ded'}};my $a;$a does R;$a.Die 15:34
camelia Cannot use 'does' operator with a type object.
in block <unit> at <tmp> line 1
ZzZombo m: role R[$x is copy='Die'] { sub Die{ die 'Ded'}};my $a=123;$a does R;$a.Die
camelia No such method 'Die' for invocant of type 'Int+{R}'
in block <unit> at <tmp> line 1
ZzZombo m: role R[$x is copy='Die'] { method Die{ die 'Ded'}};my $a=123;$a does R;$a.Die
camelia Ded
in method Die at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo why do you have "sub Die" but try to call a method die?
ZzZombo m: role R[$x is copy=Nil] { method Die{ die 'Ded'}};my $a=123;$a does R;$a.Die
camelia Ded
in method Die at <tmp> line 1
in block <unit> at <tmp> line 1
15:34 kurahaupo_ joined
timotimo looks like it works perfectly fine 15:34
ZzZombo similar code just killed my laptop. 15:35
Zoffix haha :)
m: role R[$x is copy] { method Die { $x.Die } }; my $a=123; $a does R[$a]; $a.Die 15:36
camelia (timeout)
ZzZombo yea, keeps on hanging
Zoffix Well, what's the code? 15:37
15:37 kurahaupo left
timotimo stuff that "kills my laptop" is probably doing infinite recursion 15:37
yeah 15:38
test { test }; test gives me a laggy computer for three seconds
and my swap filled up a whole bunch
can't kill it. probably because it's doing a coredump right now? 15:39
15:40 Sound joined
ZzZombo silly that Windows doesn't prevent one application from clogging up all resources. 15:41
timotimo there must be a way
windows actually has many features you'd wish it had. but they are usually very unobvious to find
which is weird because GUI is all about discoverability of functionality
brrt har har har har har har har har har
timotimo maybe this discoverability benefit really only goes skin-deep 15:42
Zoffix C'mon, if it were easy to discover the sales of Windows books would plummet!
ZzZombo Zoffix: nevermind, I rewrote eveything just because it was too bloated. 15:43
Zoffix cool
ZzZombo Now I'm not sure if .TWEAK is supposed to be a method, not a submethod.
timotimo btw, you weren't applying the role R to the variable, but to the variable's contents
it's supposed to be a submethod
just like BUILD 15:44
are you having trouble with it?
ZzZombo "TWEAK After the BUILD methods have been called, methods named TWEAK are called, if they exist, again with all the named arguments that were passed to new."
timotimo oh, is that on docs.perl6.org?
ZzZombo Yea
timotimo that wants fixed 15:45
actually
it uses find_method to find TWEAK methods
m: class Test { method TWEAK { say "tweaking" } }; class B is Test {}; class C is B {}; class D is C {}; D.new() 15:46
camelia tweaking
tweaking
tweaking
tweaking
timotimo m: class Test { submethod TWEAK { say "tweaking" } }; class B is Test {}; class C is B {}; class D is C {}; D.new()
camelia tweaking
lucasb well, both BUILD and TWEAK *can* be methods, and it wil work, but it'll also get inherited by subclasses, no?
timotimo m: class Test { method TWEAK { say "tweaking" } }; class B is Test { method TWEAK { say "tweaking B" }}; class C is B {}; class D is C {}; D.new()
camelia tweaking
tweaking B
tweaking B
tweaking B
15:46 lukaramu_ left
timotimo correct 15:46
15:47 brrt left 15:48 dp[m] left
ZzZombo m: my @a;@a does role { multi method elems { say 'ahaha';-1} };say @a+0 15:48
camelia ahaha
-1
Zoffix heh 15:49
ZzZombo but
Zoffix finds the conversation that explains why moritz is changing the logo.
ZzZombo "A method defined directly in a class will always override definitions from applied roles or from inherited classes."
another lie on the Internet? 15:50
15:50 llfourn joined
Zoffix ZzZombo: why a lie? 15:50
15:51 dp[m] joined
ZzZombo because the role has just overridden method that was declared in (Array), no? 15:51
Zoffix ZzZombo: is it declared in Array?
ZzZombo where else?
lucasb I think there's a difference between mixing a role into a class and into a object
timotimo that's the difference between "class Array does MyRole { ... }" and "$foo but MyRole"
ZzZombo I have no idea, but seems like it should
lucasb class C does R {} works like you stated
$x does R works the other way around 15:52
timotimo otherwise roles would be pretty much useless :)
ZzZombo m: my @a;@a but role { multi method elems { say 'ahaha';-1} };say @a+0
camelia 0
Zoffix you're throwing away your mixed in version
s: [], 'elems', \() 15:53
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/7f92...st.pm#L455
Zoffix Surprise! :)
ZzZombo m: my @a;@a=@a but role { multi method elems { say 'ahaha';-1} };say @a+0
camelia 0
ZzZombo you mean that ^?
Zoffix Nope
timotimo m: my @a;@a := @a but role { multi method elems { say 'ahaha';-1} };say @a+0 15:54
camelia ahaha
-1
timotimo your code was throwing away the @a variant with the role applied to it immediately
because assigning to an array will iterate when storing
ZzZombo ah 15:55
15:55 sufrostico left, kurahaupo joined, llfourn left
timotimo can you give a link to the sentence from the docs you quoted? 15:55
ZzZombo docs.perl6.org/syntax/role
timotimo thanks 15:56
ZzZombo in "Pecking order"
15:56 kurahaupo_ left
timotimo right, just found it 15:57
the thing is, on that page there wasn't yet any mention of the infix operator "does" or "but"
only the stuff you can put into your class declaration
Zoffix m: (() but role { multi method elems($ where ::?ROLE:) { say "ahaha";-1} }).elems.say 15:58
camelia 0
Zoffix Wonder why the method doesn't get chosen...
timotimo does ::?ROLE work properly?
Zoffix nope
Oh,
I tried with $?ROLE too... both output the name when I use them in a method 15:59
timotimo m: (() but role { multi method elems($ where { say ::?ROLE; $_ ~~ ::?ROLE: }) { say "ahaha";-1} }).elems.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3ms($ where { say ::?ROLE; $_ ~~ ::?ROLE:7⏏5 }) { say "ahaha";-1} }).elems.say
Zoffix m: role { method x { say ::?ROLE } }.x
camelia (<anon|41591216>)
timotimo m: (() but role { multi method elems($ where { say ::?ROLE; $_ ~~ ::?ROLE }:) { say "ahaha";-1} }).elems.say
camelia 0
timotimo doesn't try it, apparently
Zoffix Oh, doh
m: (() but role { multi method elems(List:D $ where ::?ROLE:) { say "ahaha";-1} }).elems.say
camelia ahaha
-1
16:03 lukaramu joined 16:04 sufrostico joined, Zoffix is now known as IOninja 16:08 Dunearhp left, Dunearhp joined, dp[m] left, CIAvash[m] left 16:09 lucasb left, CIAvash[m] joined 16:10 dp[m] joined 16:12 brrt joined 16:13 khw joined 16:18 dwarring left
IOninja hmmm... 16:22
IOninja is about to pessimise biog... :o
*big
timotimo we have a logic problem that requires something we have to be less optimal? 16:23
IOninja IO::Path caches .e and then tries to keep state of it, but that makes the assumption nothing changes on the filesystem
16:24 brrt left
IOninja m: start { sleep 1; "/tmp/foo42".IO.spurt: "meow"; say "done creating file!" }; my $p = "/tmp/foo42".IO; say $p.e; sleep 2; say $p.e 16:24
camelia False
done creating file!
False
16:25 brrt joined
IOninja Well, I'll pessimize it right now as a fix for RT#130889 and then think harder if stuff can be improved 16:25
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130889
16:26 dp[m] left, brrt left
IOninja would be handy to have `make perftest` 16:29
Like a spectest that would complain if your changes are way slower than expected :P 16:30
16:30 agentzh joined 16:34 agentzh left 16:35 dp[m] joined
perlpilot IOninja: It would be interesting if you could get timings from each test hat could be compared over many runs. 16:35
*that
IOninja Should be pretty trivial, considering we've got PERL6_TEST_TIMES var 16:37
16:37 mcsnolte joined
araraloren Anyone help me ? A problem about nativecall : gist.github.com/araraloren/f9a647a...593df2fec9 16:37
IOninja I wasn't paying attention but I thought I saw someone mention callbacks with NativeCall were problematic/NYI 16:40
16:42 tadzik left
araraloren Oh . 16:42
16:42 domidumont left
jnthn Seems you can't currently use a native function directly as the callback 16:42
Just wrap it up in a block that calls it 16:43
araraloren jnthn, thanks, I will try it.
16:45 cdg joined 16:47 captain-adequate joined 16:48 timotimo left, cdg_ left 16:49 llfourn joined
araraloren It works just fine, not so bad .. 16:53
Night..
16:53 araraloren left, pyrimidine left 16:54 llfourn left, pyrimidine joined 16:56 tadzik joined 16:58 timotimo joined
timotimo until further notice, you can use "dlsym" to get the pointer value for the callback and have a second sub for setint (with a different name that you can fix up with 'is symbol') that just takes a pointer-sized int as second arg 16:59
16:59 pyrimidine left
timotimo a bit surprising that it took so long until someone stumbled upon this use-case 17:01
m: use NativeCall; nativecast(&cb(--> int32), Pointer.new(0x12345))()
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3use NativeCall; nativecast(&cb(7⏏5--> int32), Pointer.new(0x12345))()
expecting any of:
a…
timotimo m: use NativeCall; nativecast(&cb:(--> int32), Pointer.new(0x12345))()
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb
at <tmp>:1
------> 3e NativeCall; nativecast(&cb:(--> int32)7⏏5, Pointer.new(0x12345))()
timotimo m: use NativeCall; nativecast(Callable, Pointer.new(0x12345))() 17:02
camelia Internal error: unhandled target type
in sub nativecast at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 411
in block <unit> at <tmp> line 1
17:03 tadzik left
robertle anyone know a http server component that actually reads the request body? as in post/put? 17:03
timotimo i seem to recall there's at least one that gives you a filehandle-like that you can read the body from 17:04
might be hallucinating, though
robertle that would be awesome actually, I think I prefer that over a buffer or string
17:06 mcsnolte left, tadzik joined, Actualeyes left
timotimo oh, damn 17:07
i was thinking of HTTP::Server::Async
but it gives you the data as a Buf
17:08 mcsnolte joined
IOninja Where are our stats for the sites? I wanna see how many unique users we get on docs.perl6.org a year 17:09
timotimo ISTR we had a visitors running somewhere
visitors is certainly installed 17:10
17:11 domidumont joined
moritz IOninja: www.p6c.org/stats/doc.perl6.org 17:11
timotimo aha!
IOninja Thanks
17:11 unclechu left, Matthew[m] left, wictory[m] left, tadzik left, dp[m] left, mienaikage left
moritz looks like we had between 21k and 35k visitors a month 17:11
17:11 M-Illandan left, xui_nya[m] left, CIAvash[m] left 17:12 ilmari[m] left
timotimo where liveth a cron job for this? 17:12
17:12 zakharyas joined
timotimo october 07 is a really hot day 17:12
localhost:1313/post/2016-10-19-Perl...A%84Block/ 17:13
IOninja m: say 11543/11543
camelia 1
timotimo i wonder who got referred to the docs this way :D
moritz timotimo: root's crontab
timotimo fantastic, thanks
IOninja wtf
oh
timotimo copy-pasto
IOninja copy-paste fail :P
m: say 31290/11543
camelia 2.710734
IOninja So our users grown 2.7x in a year 17:14
timotimo the visitors we're using really wants to have a few more things listed as spiders
IOninja
.oO( there are lies, damned lies, and... )
timotimo baiduspider alone is 52k visits
17:15 abraxxa left 17:16 pyrimidine joined
timotimo "visitors" is *really* difficult to google stuff for 17:16
like "has someone forked visitors and built a more comprehensive list of bots?"
17:16 domidumont left 17:18 domidumont joined 17:19 kybr joined
IOninja m: ␤=begin pod␤␤=head2 meows␤␤foos␤␤=end pod␤␤say $=pod[0].contents[1] 17:19
camelia Pod::Block::Para
foos
IOninja There's no line info for where the pod block came from, is there?
[Coke] IOninja: don't believe so, nope.
IOninja Ah.. 17:20
[Coke] Was looking for it as part of the doc examples work, didn't find it
17:20 pyrimidine left
IOninja I was gonna say github.com/perl6/doc/issues/1212 is easy to do, until I remembered htmlify.p6 doesn't actually parse all the pod files 17:20
17:20 zakharyas left 17:21 pyrimidine joined
[Coke] it's not just passthrough pod parsing, no 17:21
it's extracted, then mined, then put back together elsewise.
[Coke] tags that "wishlist" 17:23
Geth doc: 3ed1803f11 | (Zoffix Znet)++ | doc/Type/Signature.pod6
Add note on where-clause side-effects

  rt.perl.org/Ticket/Display.html?id=130886
17:25 rindolf left 17:26 agentzh joined
[Coke] IOninja: while I'd love to make it easier for people, I think opening an issue as as simple as that's going to get for now. 17:26
17:27 grondilu left
IOninja It's easy to learn how to find what to edit tho 17:27
17:30 bwisti left 17:33 grondilu joined 17:38 vike left
timotimo the damn perl6 -e 'sub test { test }; test' thing isn't going away >_< 17:40
can't ctrl-c it, can't ctrl-\ it, doesn't show up in htop ...
IOninja lol
glad I didn't run it then, when I had the temptation
$ ./perl6 -e 'sub test { test }; test' 17:42
Killed
:) ♥ Debian
17:42 wictory[m] joined
IOninja I see it in htop too 17:42
chewed through 24GB of RAM in 7 seconds 17:43
17:43 rindolf joined, bwisti joined
IOninja Ah no, in 22 seconds 17:43
I can CTRL+C it too. What OS are you on? 17:44
timotimo this is fedora with fish
17:44 dakkar left
gregf_ wonders why one would want to shoot themselves in the foot :) 17:46
17:47 vike joined
sena_kun on a gentoo with fish it is totally possible to kill 17:47
with Ctrl-C or Ctrl-Z 17:48
IOninja gregf_: sometimes the shooting may be accidental: 17:49
m: Numeric.new + 42
17:49 agentzh left
camelia WARNINGS for <tmp>:
Useless use of "+" in expression ".new + 42" in sink context (line 1)
MoarVM panic: Memory allocation failed; could not allocate 131072 bytes
17:49
IOninja the sub test thing ^ behaves exactly the same on my box. Just nomming through RAM
17:50 llfourn joined, sufrostico left 17:52 agentzh joined 17:55 llfourn left 18:03 Sound left 18:06 sufrostico joined 18:14 risou is now known as risou_awy, buggable left, buggable joined, ChanServ sets mode: +v buggable 18:15 cyphase left 18:17 zakharyas joined 18:20 cyphase joined
IOninja Is Suman Khanal in channel? They keep pinging and mentioning me on Twitter and it's starting to get a bit annoying. Mostly because half the time I don't understand why the mention was made... 18:21
Like this one: twitter.com/suman12029/status/8366...6344576000 I don't understand. Do I need to do something?
IOninja tries making a polite request to stop 18:24
timotimo that mention was probably "hey look perl6devs, they put a perl6 course on their wishlist!"
IOninja Feels like it. Gonna tell them to come announce stuff like that over here. 18:25
18:29 eliasr joined
IOninja is amused Freenode never bothered to replace default Apache page irc.freenode.net/#perl6 18:32
You'd figure that would redirect to the webchat thing
18:37 cdg left 18:38 cdg joined
DrForr swcarpentry is an aggregator site for programming lessons. All I think they've got to do is add something from the tutorial page. 18:39
timotimo why does irc.freenode.net even have a web server on it in the first place?
18:39 darutoko left 18:40 cibs left
IOninja 'cause they have a website, I guess freenode.net 18:42
18:42 cibs joined 18:45 gdonald_ left 18:46 gdonald_ joined, lostinfog joined 18:47 robertle left 18:51 llfourn joined 18:52 wamba left 18:56 llfourn left 18:58 M-Illandan joined, tadzik joined, dp[m] joined, Matthew[m] joined, unclechu joined, ilmari[m] joined, CIAvash[m] joined, mienaikage joined, xui_nya[m] joined 19:04 khw left 19:06 sena_kun left
IOninja m: say "Rakudo has seen an average of {round 6217/(Date.today - Date.new("2015-07-26"))} commits per day for the past year and a half" 19:12
camelia Rakudo has seen an average of 11 commits per day for the past year and a half
IOninja pretty good
19:14 risou_awy is now known as risou 19:15 sufrostico left 19:23 ufobat left 19:26 _sfiguser left
timotimo oh what?! amazon s3 is down?! 19:27
arnsholt Maybe they checked in the SHA-1 colliding PDFs into their SVN repo? 19:28
That was the most hilarious thing about that, TBH
19:29 Ven joined
IOninja timotimo: so should 130886 be closed? (it's the where-clause one) 19:30
timotimo i think so, but i wanted to wait for others to comment ... maybe 19:31
IOninja OK
IOninja has no comments...
19:32 risou is now known as risou_awy 19:35 cdg left 19:36 andrzejk_ joined 19:38 regreg left 19:39 _sfiguser joined, lostinfog left
IOninja c: 2017.02 say "hi" 19:40
committable6 IOninja, ¦«2017.02»: Cannot find this revision (did you mean “2017.01”?)
IOninja AlexDaniel: ^ seems again it's buggy with the tags
19:45 regreg joined 19:46 zakharyas left, pyrimidine left 19:47 pyrimidine joined 19:50 effbiai joined, effbiai left, effbiai joined 19:51 pyrimidine left, agentzh left 19:52 agentzh joined 19:53 llfourn joined 19:55 pyrimidine joined 19:58 llfourn left 20:02 hankache joined
TimToady m: #|meows␤sub x { }; say &x.WHY 20:11
camelia Nil
TimToady m: #|{meows}␤sub x { }; say &x.WHY
camelia meows
TimToady apparently only the #|{} variant is implemented
timotimo: ^^
well, and Zoffix 20:12
IOninja :)
TimToady but yeah, #= is only for after, just as #| is only for before 20:13
IOninja Reminder to test writers: after your test in, be sure to close the ticket its for (or find someone with perms to close tickets and ask them to close it). 20:15
20:19 domidumont left
IOninja It's thread-safe to do a my @stuff; react { whenever ... { @stuff.push: 42 } }; right? 'cause whenever uses .act on supply? 20:19
lizmat IOninja: yes, that's the idea I think :-) 20:21
IOninja Thanks.
jnthn Yes, that is safe 20:23
It doesn't actually use .act on the Supply, that wouldn't be sufficient
The concurrency control is across the whole react block
IOninja Ah cool
20:27 zakharyas joined 20:28 hankache left 20:30 ufobat joined 20:34 labster joined, wamba joined 20:38 ajr_ joined 20:40 andrzejk_ left
ajr_ The failure to make Rakudo* on a Pi (3) appears to be when it's trying to make CORE.setting.moarvm (in the Stage parse 20:40
I think it's running out of memory (using at least 703 of 750MB available) 20:41
Is there any way to limit the memory usage of this process?
IOninja It uses about 1.2-1.4GB to build.
Make lots of swap, if there's a way?
buggable: tag TESTNEEDED 20:43
buggable IOninja, There are 22 tickets tagged with TESTNEEDED; See perl6.fail/t/TESTNEEDED for details
IOninja ^^^^^^^ lots of easy tasks if you want to contribute. Write tests to github.com/perl6/roast/ to test the fixed bugs. Tests for texttual content of error messages (if you have to write such) should go to github.com/rakudo/rakudo/tree/nom/t/05-messages REPL tests are usually placed in github.com/rakudo/rakudo/blob/nom/...udo/repl.t 20:45
IOninja relocates 20:46
20:48 lichtkind__ joined, lichtkind_ left 20:53 geekosaur left 20:54 llfourn joined 20:55 geekosaur joined
ajr_ IOninja - I've found some information on extending the swap space, so I'll try that later and report results tomorrow. 20:57
21:00 llfourn left 21:01 grumble left 21:05 grumble joined 21:08 TEttinger joined 21:09 ajr_ left 21:12 agentzh left 21:17 risou_awy is now known as risou 21:19 Sound joined, cdg joined 21:22 sufrostico joined, cdg left, cdg joined 21:23 rindolf left 21:26 _sfiguser left 21:30 agentzh joined 21:32 rindolf joined 21:34 risou is now known as risou_awy 21:36 cale2 joined
cale2 off topic question: why is packaging and importing so confusing in python? 21:37
yoleaux 25 Feb 2017 17:53Z <IOninja> cale2: note that since you have a commit bit in perl6 repos, any time you use online editor to make a PR you create a branch in the repo; once PR is processed, don't forget to use the "Delete branch" button. I see there's a couple of `WildYorkies-patch-` branches in perl6/doc. Would you mind deleting them if they were merged/closed already?
moritz cale2: I find importing rather intuitive in python; how it locates modules/packages is the confusing part, IMHO 21:38
cale2 __init__ files and all that 21:39
21:39 espadrine joined
moritz right 21:39
there's two way to get to a foo, foo.py and foo/__init__.py
cale2 idk, i've read docs and tutorials. But it's still easier to just keep everything in the same directory and reference them that way haha 21:40
so many relative import errors otherwise 21:41
moritz speaking of off-topic stuff: opensource.com/article/17/2/mysql-8-coming mysql gets transactional DDL, it seems. Yay! 21:43
and my hopefully final question for the night: can any of you recommend some tech publishers? 21:44
besides the obvious ones (O'Reilly, Addison Wesley)
lizmat Wrox ?
21:46 sena_kun joined
lizmat pragprog.com ? 21:46
moritz lizmat: never heard of wrox, thanks
pragprog is on my list, as well as Packt and Apress
21:48 cdg left 21:49 cdg joined 21:50 cdg_ joined 21:53 cdg left 21:56 llfourn joined 21:58 rindolf left, smls joined
smls m: say ([o] {$_ + 1} xx 3)(5) 21:59
camelia 8
smls m: say ([o] {$_ xx 3} xx 3)(5)
camelia Too many positionals passed; expected 0 or 1 arguments but got 3
in block <unit> at <tmp> line 1
smls Does anyone know why that fails? ^^
22:01 llfourn left
smls m: say ({$_ x 2} o {$_ x 2} o {$_ x 2})(5) 22:01
camelia 55555555
smls m: say ({$_ xx 2} o {$_ xx 2} o {$_ xx 2})(5)
camelia Too many positionals passed; expected 0 or 1 arguments but got 2
in block <unit> at <tmp> line 1
22:01 gdonald_ left 22:02 gdonald_ joined
smls Something about the xx operator it seems... 22:02
22:02 grumble left 22:04 skids left
IOninja smls: what did you expect it to do? The m: say ([o] {$_ xx 3} xx 3)(5) 22:04
22:05 ufobat left
IOninja is somewhat glad such monstrocities fail... 22:05
22:05 grumble joined
moritz $_ xx 2 returns two elements, so you call the next one in the chain with two arguments instead of one 22:05
hence the error
IOninja Ah 22:06
smls IOninja: Create a 3x3x3 List filled with 5's
moritz: Why is the next one called with two arguments instead of one List argument? 22:07
22:07 zakharyas left
smls does the `o` operator automatically interpolate lists into the argument list? 22:07
IOninja smls: if the .count of the callable is more than one, then yes 22:08
cale2 moritz: No Starch Press
IOninja Hm..
smls m: say {$_ xx 2}.count
camelia 1
IOninja Yeah...
m: dd ({$_ xx 3} xx 3)(5) 22:09
camelia Invocant requires a type object of type List, but an object instance was passed. Did you forget a 'multi'?
in block <unit> at <tmp> line 1
IOninja m: dd ({$_ xx 3} xx 3)».(5) 22:10
camelia ((5, 5, 5), (5, 5, 5), (5, 5, 5))
IOninja s: &infix:<o> 22:11
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/7966...rs.pm#L714
smls m: say ({$_ xx 2} o {$_ xx 2}).count; # Possibly interesting... 22:12
camelia Inf
IOninja s: &infix:<[o]>
SourceBaby IOninja, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ infix:<[o]> used at line 6. Did you mean 'infix:<o>', 'infix:<+|>', 'infix:<∖>'?␤␤
IOninja oohhh
cale2 Why do the best programming communities use the most esoteric and complex languages?
IOninja m: -> | {}.count.say
camelia Inf
IOninja That's why
smls++
smls Thats why it works with just two copies of the block chained with o 22:13
But not with 3 or more
IOninja smls: the second combination's callables have > 1 count, so the lists get slipped in
smls Shouldn't `o` return something with the same .count as its left argument? 22:14
IOninja dunno 22:15
Not really. Why the left argument? Currently the left arg can return whatever it wants. 22:16
22:16 rindolf joined
smls Yeah, I mean the right argument (which gets the input first) 22:17
22:17 RabidGravy left
IOninja Wonder how that would work with multies, tho. 22:17
m: multi x ($) {}; multi x($, $) {}; &x.count.say 22:18
camelia Inf
IOninja :S
Oh, right, you need to call it on individual multi.
So yeah, how'd you pick which can candidate to take the .count from 22:19
smls Well if something (multi or otherwise) already has count=Inf, then the result of using it as the right argument of `o` would also have count=Inf 22:21
But chaining two count=1 functions and getting count=Inf, seems LTA
22:21 mcmillhj left
IOninja fair enough 22:21
smls Although you're right that the given example is a monstrosity... :) 22:22
I was trying to make something like ->\n{[o]({$_ xx n}xx n)(n)} work for this code golf: codegolf.stackexchange.com/a/111728/14880
But there are more legit cases where this could matter, like chaining two simple functions with `o` and passing the result to .sort or .map or amything else that cares about count. 22:23
smls will RT 22:27
IOninja m: use nqp; sub x($, $) {}; my $c = -> {}; nqp::bindattr(nqp::decont($c), Code, '$!signature', nqp::getattr(nqp::decont(&x), Code, '$!signature').clone); say $c.count 22:28
camelia 2
IOninja wonders if that's a bad idea™....
Is there a sane way to transplant a copy of a signature onto a block? 22:29
22:30 agentzh left
IOninja Oh wait, that ain't gonna work, how would I pass the args to the combined function :P 22:30
m: use nqp; sub x($a, $b) {}; my $c = -> { say $a, $b }; nqp::bindattr(nqp::decont($c), Code, '$!signature', nqp::getattr(nqp::decont(&x), Code, '$!signature').clone); say $c.count
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3nqp; sub x($a, $b) {}; my $c = -> { say 7⏏5$a, $b }; nqp::bindattr(nqp::decont($c),
IOninja hehe
22:32 cibs left 22:33 cibs joined 22:38 Voldenet left
avar nine: Any idea why the rest of the tests would work but metacpan.org/source/NINE/Inline-Pe...08/t/use.t fails with undef $tester value on ->get_one 22:38
22:43 rindolf left, dj_goku joined 22:44 Voldenet joined, Voldenet left, Voldenet joined, pyrimidine left
avar also now e.g.: 22:44
perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q["hi".say])'
vomits out an inordinate amount of p5 subs redefined, but not: 22:45
perl -mInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q["hi".say])'
i.e. -m v.s. -M
22:45 pyrimidine joined 22:46 cpage_ left 22:50 pyrimidine left 22:52 kurahaupo left 22:53 kurahaupo joined, elaADnlxie joined 22:55 Ven left 22:57 llfourn joined
IOninja First time running a Rakudo Star installer... a bit confusing 22:59
22:59 kurahaupo left
IOninja 'cause instructions say run make/make install, but the output of Configure.pl suggests those are to install Rakudo only ("'make install' will install Rakudo.") so how to install modules? Didn't see anything on the topic in the README 23:00
23:00 cdg_ left
IOninja so I just ran `make install` to see what happens... and after a bit, it says "== Installing modules for MoarVM" 23:00
MoarVM? Wtf is MoarVM? I wanted modules for Perl 6 23:01
23:01 cdg joined
avar it's really confusing 23:01
Configure.pl actually builds most of the software
Then 'install' builds some of the rest, then runs tests on it, then actually installs it 23:02
23:02 llfourn left 23:08 pyrimidine joined 23:10 sufrostico left, Sound left 23:11 sufrostico joined 23:12 pyrimidine left 23:17 risou_awy is now known as risou 23:18 sufrostico left 23:20 sufrostico joined
IOninja Hm. Looks like github.com/rakudo/star/issues/78 is 'cause zef is made to ignore test results :/ It still continues to install a module after failed tests, even though if you run `make install` twice it does abort and the error code is available in $? 23:25
I think I'll leave it at that for today. Need to relax and then do IO ninjaing. 23:26
23:26 espadrine left
samcv good * everyone 23:27
23:27 drrho_ left, drrho_ joined
IOninja \o 23:27
23:29 smls left
avar IOninja: Thanks, I filed that bug, doesn't 'make install' fail the second time for unrelated reasons, it does for me due to 'hey we installed this already' or whatever 23:29
i.e. nothing to do with the test failures
IOninja yeah, zef bails out when a module's already installed; and normally it bails out if tests fail too, but there I see it still installs a module; not sure if that's on purpose or not, but because zef is made to ignore test failures, it never gives make install the failure code 23:30
(that's my interpretation of results I saw so far, at least0
23:30 pmurias left
avar *nod*, would be consistent with what I saw 23:32
23:34 risou is now known as risou_awy
avar But it's quite unnerving to encounter these "surely if anyone used this not-from-source this would be fixed already" bugs 23:34
23:34 sufrosti1o joined
avar i.e. the test suite failing for non-network access environments, and 'make install' just ignoring failures, both of which I've spotted, but would be spotted in pretty much any distro packaging 23:35
IOninja We had a team come to us about Rakudo's test suite returing 0 for failures :) 23:36
Dunno, maybe not many people want to hack on Star. Today's the first time I ever cloned a repo and ran the build TBH. And I've been with Perl 6 for ~1.5 years 23:37
23:38 drrho_ left
samcv i've never installed star either 23:38
23:38 drrho_ joined 23:39 lep_ joined 23:40 eliasr left
avar I'm packaging perl6 for centos, so I'm grabbing the "latest stable" 23:41
and the rakudostar distro makes it fairly idiot proof to ship with a few modules
23:41 sufrostico left, sufrosti1o left 23:42 lep-delete left, sufrostico joined 23:43 sufrosti1o joined, sufrosti2o joined 23:47 sena_kun left
samcv great avar 23:54
we need more packaging
avar It's quite a hack, but it sort of mostly works 23:56
packaging rakudo* as a perl5 module, due to it needing interop with Inline::* 23:57
samcv hmm
seems a weird classification 23:58
i mean it has a perl 5 module in it
23:59 llfourn joined