»ö« 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 _nadim joined 00:07 spintronic joined 00:16 spintronic left
_nadim can someone please unban my normal nick? 00:16
00:19 perlawhirl left 00:45 nadim joined 00:48 _nadim left
timotimo i don't know what your normal nick is, but i also don't have permissions to do administration of #perl6 00:50
00:51 nadim left 01:07 rodarmor left 01:11 vendethiel left 01:14 vendethiel joined 01:19 rodarmor joined 01:27 spider-mario left 01:29 jack_rabbit left 01:34 BenGoldberg joined 01:35 vendethiel left 01:39 vendethiel joined 01:46 michaelvipub joined 01:55 Ben_Goldberg joined 01:58 BenGoldberg left 02:01 kalkin- left, kalkin-_ joined 02:23 vendethiel left 02:24 jack_rabbit joined 02:26 vendethiel joined 02:30 michaelvipub left 02:49 FROGGS__ joined 02:53 FROGGS_ left 02:55 AlexDaniel left 02:59 kalkin- joined 03:00 colomon left 03:02 colomon joined 03:03 kalkin-_ left 03:05 sftp left 03:09 sftp joined 03:14 kid511 left 03:17 sftp left 03:19 sftp joined 03:22 perlawhirl joined 03:36 noganex_ joined 03:39 noganex left 03:53 perlawhirl left 04:02 skids joined 04:11 perlawhirl joined 04:17 BrassLantern joined, BrassLantern left, BrassLantern joined, BrassLantern left 04:20 colomon left 04:21 colomon joined 04:35 kaare_ joined 04:38 perlawhirl left, perlawhirl joined 04:46 perlawhirl left 04:47 tmch left 04:55 pdcawley joined 04:56 pdcawley_ left, colomon left 05:00 colomon joined, khw left 05:07 colomon left 05:08 Ben_Goldberg left 05:17 colomon joined 05:18 silug left 05:25 tmch joined 05:29 silug joined 05:45 Fleurety left 05:50 tmch left 05:52 Cabanossi left 05:54 Cabanossi joined
dalek Iish/myGLR: 38fdc10 | (Salvador Ortiz)++ | lib/DBIish/CommonTesting.pm6:
Remove remaining trailing zero
05:57
Iish/myGLR: 19cbc75 | (Salvador Ortiz)++ | lib/DBDish/Pg/StatementHandle.pm6:
Retab only
05:57 avalenn left 05:58 avalenn joined 06:04 jevin left 06:06 jevin joined 06:18 kentnl joined, kent\n left 06:26 CIAvash joined 06:27 sortiz left 06:32 jack_rabbit left, silug left 06:33 skids left 06:39 kentnl left 06:40 kent\n joined, kent\n left, kent\n joined 06:47 silug joined 06:55 colomon left, perlawhirl joined 06:56 colomon joined 06:58 labster left 07:04 labster joined 07:17 xinming joined 07:24 perlawhirl left 07:26 kentnl joined 07:27 vendethiel left 07:28 perlawhirl joined 07:30 kent\n left 07:43 vendethiel joined 07:50 domidumont joined 07:55 domidumont left, domidumont joined 08:04 vendethiel left 08:12 vendethiel joined 08:14 CIAvash left 08:15 perlawhirl left 08:22 yqt joined 08:24 abaugher left 08:25 abaugher joined 08:30 espadrine_ joined 08:45 wamba joined 08:56 vendethiel left, firstdayonthejob joined 09:00 vendethiel joined 09:05 bakedb left 09:07 rindolf joined 09:09 pmurias joined 09:11 Ven joined
rindolf Hi all, is there anything that can be done about the Perl 6 behaviour quirks mentioned in these quotes from a facebook thread - paste.debian.net/417281/ ? 09:25
Like - something I meant is not doing the right thing and the code runs but yields a wrong result. 09:26
teatime hrm, none of his examples seem very, well, convincing. 09:28
rindolf teatime: convincing? 09:30
teatime: and I am Shlomi Fish.
teatime ok, first, I know very little about Perl6, and haven't done Perl5 for several years. So I'm probably wrong. But, I'll say my bit anyway. 09:31
ok the first example is “+{}” returns 0 instead of a hash reference.
when would you ever actually do that? 09:32
rindolf teatime: I did it because I assumed it would be the same as Perl 5.
teatime why would you do that in perl5 ?
rindolf teatime: I wanted to disambiguate between a hash ref and a block.
teatime: to disambiguate between a hash ref and a block. 09:33
teatime fair enough, I see that's even recommended by perlref 09:35
09:35 Begi joined
teatime #3 seems to boil down to "the following operators do something different in perl6 than in other random languages including perl5, so when I paste code from other random languages into a perl6 file, it doesn't execute correct." 09:36
nine rindolf: they're not quirks in Perl 6 but quirks in Perl 5 that have been fixed
rindolf nine: 09:37
nine: I disagree.
nine: perl6 accepts and runs them fine, but they do the wrong thing and then you spend many minutes debugging. 09:39
teatime rindolf: I don't think you should expect random perl5 code to be valid, equivalent perl6 code.
this doesn't even work very well for python2 -> python3, which are much more similar than perl5 and perl6.
rindolf teatime: I don't , but coming from Perl 5 , I find a lot of the Perl 6 I write or port to be errorprone and silently accepted. 09:40
Why would [+] (map ... ) evaluate the map in numeric/scalar context? Who would ever want to do that? 09:41
What good is +{ ... } returning 0?
At least it should err or warn on those. 09:42
teatime rindolf: it might have to read your mind? to know you meant other than you wrote?
in the general case, I mean. you might could make a case in specific instances. 09:43
like, a C example. "if (a = b)" will generate a warning, because it's a common error, and almost never intended. but the warnings you want, may fall into neither category? 09:44
arnsholt As regards prefix:<+>, it's the operator that converts to numeric. For hashes, IIRC, the numeric value of a hash is the number of entries in it
m: my %x; %x<a> = 1; say +%x
camelia rakudo-moar 843741: OUTPUT«1␤»
arnsholt Thus, +{} is 0 since it's empty
09:44 RabidGravy joined
rindolf arnsholt: ok, I wish it was done in a more explicit manner. 09:45
arnsholt For #2, since adding flat helps, it sounds like a list semantics thing (which I haven't properly assimilated yet either)
09:50 tmch joined
nine rindolf: the numeric values of an array or hash is the number of their elements. Does that not make sense? 09:54
09:54 iH2O joined
rindolf nine: it does, but it can behave in a quirky manner. 09:56
09:56 iH2O left 09:57 vendethiel left
rindolf Anyway, this discussion is going nowhere. 09:57
09:59 vendethiel joined 10:04 virtualsue joined
nine rindolf: I'd argue that Perl 6 would be less of a Perl if it didn't have shortcuts like +%h and required you to be more explicit (Zen of Python #2). Now having a numeric operator return a Hash was a straight forward mistake that made no sense at all in a language where operators determine the type of operation instead of variables. 10:07
So Perl 6 sticks much more to the spirit of Perl in this case than Perl 5. 10:08
rindolf nine: fine, I guess I'll have to accept that my Perl 6 code will be errorprone. 10:12
nine rindolf: it will only be if you take code from other languages and expect it to work just the same in Perl 6. That said, Perl 6 has helped me often with informative error messages when I accidentally used Perl 5 syntax. It just cannot catch every case. 10:14
masak antenoon, #perl6 10:16
rindolf masak: morning.
masak rindolf: just jumping into this conversation -- sorry about that -- but when you say "it does, but it can behave in a quirky manner", all I hear is "I'm not quite used to Perl 6's behavior here yet" 10:18
for both arrays and hashes (and other container-y types), prefix:<+> means the same as `.elems`. it's quite consistent and non-quirky 10:19
pmurias rindolf: is accidently numerifing Hashes a common error? 10:20
masak arguably, if you want to project container types down into a single scalar number, its *size* is a prime candidate for that number
a container type*
masak is too tired to grammar
10:21 labster left
rindolf pmurias: well, it happened to me at least once and now I'll need to remember to avoid it. 10:22
El_Che is reading rindolf's url 10:23
10:23 perlawhirl joined
pmurias rindolf: in Perl 5 you also have to avoid doing that 10:26
rindolf pmurias: like %one + %two? 10:27
TEttinger I'm in the process of ungolfing (in a way) a piece of java code. in another sense I can still golf it.
Hello, World!
{'$' << (',' ^ '-'), '`' | ('-' - '('), '$' << (',' ^ '-') | '$', '$' << (',' ^ '-') | '$', '\\' + '@', ',', ' ', '(' + '\\', '\\' + '@', '\\' + '\\', '$' << (',' ^ '-') | '$', '\\' + '\\', '!'};
no alphanumerics used at all, still able to say Hello, World 10:28
rindolf TEttinger: this is Java?
TEttinger it does need new char[] before it
yes
rindolf TEttinger: ah.
TEttinger most people don't know java allows bitwise ops on chars
rindolf TEttinger: maybe it treats characters as integers.
TEttinger the one unsigned integer type, yeah
rindolf TEttinger: this looks like obfuscation rather than golf. 10:29
TEttinger it can be golfed down
many of these combinations may have better versions
pmurias rindolf: +%foo also doesn't warn in Perl 5, it's just that the chance that it fails silently is bit bigger
10:33 mr-foobar left 10:34 Guest11071 joined 10:36 mr-foobar joined 10:38 spider-mario joined, bjz left
masak rindolf: ...but do you not agree that it's more consistent like this? because `+` means "numeric addition" as an infix, `~` means "string concatenation", so it makes sense that the prefix versions numify and stringify (respectively) 10:40
10:42 domidumont left 10:43 TEttinger left 10:44 bakedb joined
masak ...have QAST::Compunit, want to recurse down it. what do I do? :) 10:45
rindolf masak: well, fine. 10:46
masak m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); say $foo.^name
camelia rakudo-moar 843741: OUTPUT«QAST::CompUnit␤»
masak rindolf: I really think it's a matter of getting used to it.
rindolf masak: OK, OK.
masak stops nagging ;)
rindolf is away - walk.
masak in the above, what does $foo have that lets me actually introspect the program? 10:47
I expected a .children or *something*
oh, QAST::CompUnit does QAST::Children, I see it now
so .list et al work 10:48
m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); multi hmm($node) {}; hmm($foo); 10:52
camelia rakudo-moar 843741: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at /tmp/uH6q_q9KtF line 1␤␤»
masak ^ this is a bit of a problem :)
m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); sub hmm($node) {}; hmm($foo);
camelia rakudo-moar 843741: OUTPUT«X::TypeCheck::Binding exception produced no message␤ in sub hmm at /tmp/gmqYXsvvCT line 1␤ in block <unit> at /tmp/gmqYXsvvCT line 1␤␤»
masak seems nqp-universe QAST nodes can't bind to Perl 6-universe routines
that... somewhat raises the bar required to do anything sensible with them 10:53
I've already got a (dirty, unwholesome) regex-based test in place in the 007 test suite. it's working fine, I guess. but help me replace it with a QAST-based one! :D
masak goes about emulating a call stack the hard way 10:54
10:56 bjz joined
masak I have a feeling I'm the first one to do this. 10:58
...which means I'm in the right place :)
masak .oO( well, technically it's a necessary but not sufficient condition... )
11:01 yqt left
masak ooh, $node.dump 11:02
11:02 darutoko joined 11:04 kid51 joined
pmurias masak: is there a plan to have the new ast format replace QAST or will it just be compiled to that? 11:08
11:08 virtualsue left
masak pmurias: that's a biggish question. 11:09
pmurias: fortunately, I don't feel I have to provide an excellent answer to it until-and-unless it becomes clear that Q is the right choice not just for macros in Perl 6, but for Perl 6 AST handling as such. 11:10
I'm reading the QAST dump now... and I'll say this: it's looking good for Q :P
(I don't mean to disparage QAST. it's clearly doing vital work for Perl 6 compiler code manipulation/generation) 11:11
11:14 iH2O joined
pmurias there is a big difference between handling Perl 6 AST as a transformable representations of the program and using it as a processed form that's suitable for compiling 11:17
RabidGravy wonders idly if making a grammar for "drum tabs" is worth it
masak pmurias: full ACK 11:19
pmurias: ...which, I guess, is the same thing as saying that there will be a place both for QAST and for Q
arnsholt masak: Regarding using NQP stuff in Perl 6, don't you need to make the arguments Mu? 11:21
To the Perl 6 subs, that is. NQP things not being subtypes of Any 11:22
masak arnsholt: good tip. 11:23
masak tries
m: use nqp; my $foo = nqp::getcomp('perl6').compile('say 42', :target('ast'), :compunit_ok); sub hmm(Mu $node) { say "this works!" }; hmm($foo); 11:24
camelia rakudo-moar 843741: OUTPUT«this works!␤»
masak arnsholt++ # nice!
arnsholt I think Perl 6 code I've seen that does NQP stuff also tends to bind the results of the operations
masak yeah, that'll simplify my life a bit
ok, good to know
arnsholt Probably some kind of interaction with containers, but not sure what
masak as far as I can see, I can't access *names* like `QAST::CompUnit`
but if I want to typecheck, I can always do something like `if $node.^name eq "QAST::CompUnit"` -- like a barbarian 11:25
arnsholt Hmmm, that's trickier
pmurias masak: there might also be a place for a QAST replacement that fully embraces it's role and is easily optimizable, full of stuff that helps compilations etc. 11:26
masak pmurias: sounds awesome. 11:27
pmurias: you're looking for another champion there though -- not me ;)
psch m: use QAST:from<NQP>; my $x = QAST::CompUnit.new 11:35
camelia ( no output )
psch masak: ^^
arnsholt m: use QAST:from<NQP>; say QAST::CompUnit ~~ Any # I wonder... 11:36
camelia rakudo-moar 843741: OUTPUT«False␤»
psch and that's the dispatch failure form before :)
*from
arnsholt Yeah, I was just wondering whether NQP types could occur directly as types in Perl 6, or if they'd need some kind of bridge type to supply some additional operations needed by Perl 6 11:37
From the looks of it, they can be used directly =)
psch m: use QAST:from<NQP>; QAST::CompUnit.^mro.say 11:38
camelia rakudo-moar 843741: OUTPUT«Method 'gist' not found for invocant of class 'QAST::CompUnit'␤ in block <unit> at /tmp/jpN354K3Ef line 1␤␤»
psch m: use QAST:from<NQP>; QAST::CompUnit.^mro>>.Str.say
camelia rakudo-moar 843741: OUTPUT«Method 'Str' not found for invocant of class 'QAST::CompUnit'␤ in block <unit> at /tmp/HC_JhX4N6N line 1␤␤»
psch m: use QAST:from<NQP>; QAST::CompUnit.^mro.elems.say
camelia rakudo-moar 843741: OUTPUT«3␤»
psch well, i suppose having .gist might be nice, but having them next to Any seems reasonable to me at least 11:39
if only 'cause it makes it obvious that something extraordinary is going on
arnsholt Oh, yeah, definitely 11:40
Was just curious about implementation details, really =)
psch m: use QAST:from<NQP>; say QAST::CompUnit.^mro.map: { $_.HOW.name($_) } # hm, not even next to Any, really
camelia rakudo-moar 843741: OUTPUT«(QAST::CompUnit QAST::Node NQPMu)␤»
psch seeing as that's no Mu at the top there... 11:41
11:51 Begi left
pmurias masak: It's very likely I will have to add a static analysis pass to rakudo-js to get decent performance, I do not plan to replace QAST but it should provide some insight 11:59
12:08 espadrine_ is now known as espadrine 12:20 shinobicl joined
dalek kudo-star-daily: dc17839 | coke++ | log/ (9 files):
today (automated commit)
12:21
kudo-star-daily: 51d8e09 | coke++ | log/ (9 files):
today (automated commit)
perlawhirl :q 12:22
12:22 perlawhirl left
shinobicl hi all! 12:24
is there support for multidimensional arrays in perl6?
psch shinobicl: i suspect you mean multidimensional *shaped* arrays? 12:25
m: my @a = [],[]; dd @a # unlike this 12:26
camelia rakudo-moar 843741: OUTPUT«Array @a = [[], []]␤»
psch m: my @a[2;2]; dd @a # but like this
camelia rakudo-moar 843741: OUTPUT«Array.new(:shape(2, 2), [Any, Any], [Any, Any])␤»
12:27 michaelvipub joined
shinobicl m: my @sa = [1,2,3], ['A','B','C']; say @sa.perl ; say @sa[1][2]; 12:29
camelia rakudo-moar 843741: OUTPUT«[[1, 2, 3], ["A", "B", "C"]]␤C␤»
psch hm, shaped arrays are less implemented than i though 12:31
t
shinobicl Why? It seems fine to me 12:32
psch m: my @a[2;2] = [1,2],[3,4]; say @a[0;*]
camelia rakudo-moar 843741: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at /tmp/CkVEOucmFU line 1␤␤»
psch m: my @a[2;2] = [1,2],[3,4]; say @a[0;1]
camelia rakudo-moar 843741: OUTPUT«2␤»
psch that's why :)
m: my @a[2;2] = [1,2],[3,4]; say @a[0][1] 12:33
camelia rakudo-moar 843741: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤ in block <unit> at /tmp/aT4zf3D9RT line 1␤␤»
shinobicl I am developing a "table class" (bi dimensional array), and i would like to use the same syntax to refer to a cell, something like this
say $table1['C'][3] 12:34
i'm not sure how toimplement an operator like this, [] [] though
or maybe ['C';3] 12:35
psch shinobicl: doc.perl6.org/language/subscripts#M...bscripting 12:36
shinobicl so far i am only using $table1.cell('C', 3), that seems good enough but if i can make it work in the same way perl6 habdles bidimensional arrays it would be much better
wow! thanks!
12:39 perlawhirl joined
perlawhirl thinks about accessing tables cells via quoteless letters with enums... 12:41
12:41 shinobicl left
perlawhirl m: my @table = ['one','two'],['alpha','beta']; my enum <A B>; say @table[B;1] 12:41
camelia rakudo-moar 843741: OUTPUT«beta␤»
psch fwiw, if i needed something like that i'd probably just go with an HoA and sort the keys whenever i have to iterate... :) 12:42
perlawhirl that makes sense
psch although an enum is a very nice approach as well 12:43
perlawhirl yeah, but how to create a infinite enum of incrementing letters?
12:45 iH2O left
psch hm, true, i don't think lazy enums are a thing we do 12:49
perlawhirl hah, not well anyway... i just troed : my enum ('a' ... 'z') which wordked ok, but: my enum ('a' ... 'za') segfaulted the first time 12:50
worked the second time
psch uh
perlawhirl but yeah. 'a'...'zzz' generates a list find, but trying to make an enum out of it just sat there
RabidGravy gosh I hate regular expressions
psch m: say ('a'...'zzz').elems 12:51
camelia rakudo-moar 843741: OUTPUT«18278␤»
12:51 Begi joined
perlawhirl yeah the list form works no probs... but enum will timeout 12:51
m: my enum ('a' ... 'zzz')
camelia ( no output )
perlawhirl o... k?
psch m: my enum ('a' ... 'zzz'); say abz
camelia rakudo-moar 843741: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jzjwXKgSih␤Two terms in a row␤at /tmp/jzjwXKgSih:1␤------> 3my enum ('a' ... 'zzz'); say7⏏5 abz␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ stat…»
psch RabidGravy: what's the problem? 12:52
RabidGravy regular expressions
psch ... i suppose i ran into that one :)
perlawhirl yeap
RabidGravy I just don't think my brane works that way 12:53
perlawhirl psch: by the way, repl just created the a...zzz enum, just took a few seconds, but yeah, it ain't lazy... anyway, moving on now 12:54
psch yeah, i don't think enum can be lazy, considering the keys are installed lexically 12:55
+s
perlawhirl m: my enum ('a' ... 'zzz'); my $n = 1 + abz; say $n; 12:57
camelia rakudo-moar 843741: OUTPUT«5===SORRY!5=== Error while compiling /tmp/meVloISDL5␤Two terms in a row␤at /tmp/meVloISDL5:1␤------> 3um ('a' ... 'zzz'); my $n = 1 + abz; say7⏏5 $n;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤…»
perlawhirl works in repl
12:58 perlawhirl left 13:05 espadrine left
Guest11071 m: say 'Test'; 13:10
camelia rakudo-moar 843741: OUTPUT«Test␤»
Guest11071 Hello 13:12
Is it possible to run a short snippet of code from pastebin here? 13:13
Begi m: say "Hello Guest11071 !";
camelia rakudo-moar 843741: OUTPUT«Hello Guest11071 !␤»
psch Guest11071: gisthub works
Guest11071 First time using irc ever I'm afraid
psch well, gist.github.com i think the url is
13:14 kurahaupo joined
Guest11071 Ok, thx, have a snippet which segfaults at home and wanted to try it here 13:14
lizmat Guest11071: please do 13:16
Guest11071 m: gist.github.com/anonymous/d5d04065881b55c1618d
camelia rakudo-moar 843741: OUTPUT«360360␤»
psch star-m: gist.github.com/anonymous/d5d04065881b55c1618d 13:17
camelia star-m 2016.01: OUTPUT«360360␤»
psch oh, that's 2016.01 already
Guest11071 it fails at home, must be something wrong with my install I guess
psch hmm
Guest11071 did rakudobrew build moar yesterday 13:18
Begi What's your version Guest11071 ?
psch is in the middle of a bisect...
Guest11071 This is Rakudo version 2016.02-189-g8437418 built on MoarVM version 2016.02-33-g1e3d2ac
psch m: say $*VM.version
camelia rakudo-moar 843741: OUTPUT«v2016.02.33.g.1.e.3.d.2.ac␤»
psch curious
as in, that's exactly the same version as camelia is running 13:19
lizmat Guest11071: fwiw, I can confirm the segfault
Guest11071 Phew, I was beginning to think I was wasting your time
psch Guest11071: what's your os? 13:20
lizmat Guest11071: looks like while (True) is to blame (at least for me)
Guest11071: if you replace this with loop {}, it works for me
Guest11071 Linux Mint 17.3 running in Virtual Box on W7
lizmat suspects a JIT / spesh issue
Guest11071 Yes it starts to work for me when I remove the comment in the beginning 13:21
lizmat not for me
psch lizmat: disabling either works?
lizmat no, :-( so it's something else
psch :/
Guest11071 I was trying to develop a solution for Project Euler, problem 5 13:22
RabidGravy there, can parse a "drum tab" 13:23
lizmat Guest11071: fwiw, I would write the loop as "$a += 14 while (2..13).first(-> $x { !($a %% $x) });" 13:24
Guest11071 thx, I'll try it. Seemed like a good idea to start learning p6 by doing some Project Euler problems 13:25
lizmat Guest11071: thanks for reporting: core devs love easy reproducible segfaults 13:26
Guest11071 Thank you for helping me out, hope you'll be able to figure out what's wrong 13:27
psch++, lizmat++ # hope that's the correct lingo :-) 13:29
lizmat yeah, that's about it, Guest11071++ :-)
psch Guest11071: as lizmat says, segfaults are never a waste of time :) 13:30
... well, alluded to at least vOv
Guest11071 i'll check the weechat manual and get a proper nick but dogbert was taken :(
13:41 michaelvipub left 13:53 domidumont joined 13:54 itaipu joined, colomon left
RabidGravy LAWKS! 13:59
perl6++
so you may remember a while back I was wondering about the stability of the Supply.interval 14:05
well
rabidgravy.com:8000/stream
psch it's more stable than meg white live?
RabidGravy sequencing that live 14:06
psch amen brother :P
RabidGravy++ 14:07
RabidGravy took longer to parse the drum tab than make the program ;-) 14:08
Begi m: ("Hello World !").grep: '!';
camelia ( no output )
Begi m: (("Hello World !").split('')).grep: '!';
camelia ( no output )
psch m: say "Hello World !".contains('!')
camelia rakudo-moar 843741: OUTPUT«True␤»
Begi Ahh, that's what I was looking for, thanks psch : 14:09
psch RabidGravy: now just bring the acid bass back, occassionally shuffle a few 8th or 4th of that drum beat around and presto, breakcore :) 14:10
RabidGravy quite a nice drum kit for the stock fluidsynth GM kit 14:11
psch sounds a bit heavy on the reverb for stock samples vOv 14:14
well, bisect finally finished... 14:15
apparently 93d597f40 broke the r-j build
RabidGravy it's the fluidsynth doing that 14:16
psch "Cannot do aggregate operation on a type object" it says, which seems to point at the nqp::join call in the patch... 14:17
RabidGravy that's "dry" now
psch RabidGravy: well, i've listened with headphones, so what sounds like "a bit heavy" might be perfectly fine for speaker-listening 14:18
RabidGravy all maximum velocity
psch no rim or deadnote sample in the kit? 14:20
i mean, low velocity on the deadnotes can work i guess, but...
lucs RabidGravy: Nasty 4/4 there :) 14:21
14:23 Ben_Goldberg joined
lucs Okay, same four bars repeating, not immediately obvious. 14:24
psch lucs: en.wikipedia.org/wiki/Amen_break 14:25
lucs Ah, nice.
14:27 telex left 14:28 telex joined 14:29 tmch left 14:30 aborazmeh joined, aborazmeh left, aborazmeh joined 14:33 tokomer joined 14:48 aborazmeh left 14:52 arcetera left
awwaiid I'm still not getting what's going on here, so I'll renew my question... 14:52
m: for <100 10_000 100_000> -> $batch { my $start = now; ((10..99) X (10..99)).map({$_[0] * $_[1]}).grep(-> $n { $n.Str eq $n.Str.flip }).sort[* - 1].say ; my $end = now; say "Batch $batch took { $end - $start } seconds" }
camelia rakudo-moar 843741: OUTPUT«9009␤Batch 100 took 0.1909047 seconds␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/Z8Bm3tjoGy line 1␤␤»
awwaiid It gets through the first iteration fine (prints out 9009 and the timing), but on the second iteration it says the seq is used up. which seq?
actually I'll put this in a file and maybe it'll tell me which line it's talking about 14:53
14:53 arc__ joined, arc__ is now known as arcetera, arcetera left, arcetera joined
psch m: for ^2 { ((10..99) X (10..99)).map( { $_ + 2 } ) } 14:54
camelia rakudo-moar 843741: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/jev26hJTlI line 1␤␤»
psch m: for ^2 { say [+] ((^5) X (^5)) }
camelia rakudo-moar 843741: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/9d9xKl4VVU line 1␤␤»
14:55 arcetera left
psch awwaiid: the Seq built by infix:<X>, apparently 14:55
awwaiid yep, I just got that from the breaking of lines
interesting
14:55 arc__ joined 14:56 arc__ is now known as arcetera, arcetera left, arcetera joined
awwaiid so is this wrong behavior? I expect it to construct that Seq from scratch on each iteration 14:56
psch m: for ^2 { ^5 .say } 14:57
camelia rakudo-moar 843741: OUTPUT«^5␤^5␤»
psch m: for ^2 { 0..4.say } 14:58
camelia rakudo-moar 843741: OUTPUT«WARNINGS for /tmp/2Y5I0bmw1X:␤Useless use of ".." in expression "0..4.say" in sink context (line 1)␤4␤4␤»
psch m: for ^2 { (0..4).say }
camelia rakudo-moar 843741: OUTPUT«0..4␤0..4␤»
psch hm
m: for ^2 { say (1..5).map: * }
camelia rakudo-moar 843741: OUTPUT«Cannot call map(Range: Whatever); none of these signatures match:␤ ($: Hash \h, *%_)␤ (\SELF: &block;; :$label, :$item, *%_)␤ (HyperIterable:D $: &block;; :$label, *%_)␤ in block <unit> at /tmp/51yvD2JMrA line 1␤␤»
awwaiid I'm wondering how to construct a Seq minimally too
psch m: for ^2 { say (1..5).map: { $_ } }
camelia rakudo-moar 843741: OUTPUT«(1 2 3 4 5)␤(1 2 3 4 5)␤»
psch yeah, it's not the Range itself then
that's somewhat reassuring at least
awwaiid: fwiw, i don't think you'd want to recreate that, if it's the same in each iteration anyway 14:59
Begi m: my Str $a; say 42 unless $a.chars;
camelia rakudo-moar 843741: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/QNvn680Cm2 line 1␤42␤»
psch awwaiid: but that doesn't really help with it being somewhat unintuitive there
awwaiid: ... at least the error tells you what to do i suppose :)
Begi Why a warning ?
psch m: Str.chars 15:00
camelia rakudo-moar 843741: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/7v3FjKeCXG line 1␤»
Begi my $a = ''; say 42 unless $a.chars;
m: my $a = ''; say 42 unless $a.chars;
camelia rakudo-moar 843741: OUTPUT«42␤»
awwaiid psch: well a seq is being lazily created, ya? so if I were bailing out of that loop early based on some detection, and then did it again based on another detection, I'd want it to start from the beginning and not fill up all my memory
psch awwaiid: how do you bail out of ($range X $range)? 15:01
Begi Is there a more idiomatic way to write this bit in Perl 6 ?
awwaiid psch: it'd be later in the seq chain, like in the grep 15:02
psch Begi: assuming you want "it's not the empty string and not a type object" you can use prefix:<?> or .Bool
m: my Str $a; my $b = ''; say 42 unless ?$a; say 43 unless $b.Bool 15:03
camelia rakudo-moar 843741: OUTPUT«42␤43␤»
awwaiid m: (^5 X ^5).map(* * 2).WHAT.say # sequences keep chaining
RabidGravy or just my $a = ''; say 42 unless $a
camelia rakudo-moar 843741: OUTPUT«(Seq)␤»
Begi Yes, RabidGravy, it's what I've done
15:04 yqt joined
psch awwaiid: does that preclude you from using .cache, as the error suggests? 15:05
awwaiid: afaik, .cache doesn't eagerly evaluate the Seq, but just keeps the reified bits around instead of falling off the end
teatime So, I'm wanting to make a compact syntax for XCompose file generation; I was planning to do this with Python, so forgive that I'm about to link to Python syntax, but I'm interested how it might look in Perl and/or Perl6 (since these would likely be both more concise and more sensible for creating this DSL-like thing.) Examples/syntax/functionality (very preliminary) at
gist.github.com/pprince/f2c5879242d3d5ef1929
(also, if you want to make suggestions about the syntax/features itself, *please do*) 15:06
awwaiid psch: I just don't know why you'd ever want (^5 X ^5) inside one iteration of a loop to be the same Seq on a second iteration. If I wanted that I should define it outside the loop 15:07
15:07 cognominal left 15:09 cognominal joined
psch awwaiid: fair enough. in that case i suggest talking to someone who's firmer with Seq semantics than me :) 15:09
awwaiid m: for ^2 { my $n = 5; say [+] (^$n X ^$n) } ; for ^2 { say [+] (^5 X ^5) } # when we use a variable for the generator it forces it to be re-created on each iteration
camelia rakudo-moar 843741: OUTPUT«50␤50␤50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/OKykQ60rge line 1␤␤»
psch yeah, cause that could change
but an X between literal changes is constant folded i guess vOv 15:10
m: for ^2 { constant n = 5; say [+] (^n X ^n) }
camelia rakudo-moar 843741: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/GQkymz1Cdj line 1␤␤»
psch s/changes/Ranges/
Ben_Goldberg m: for ^2 { say [+] (^(+5) X ^(+5)) } 15:11
camelia rakudo-moar 1ad917: OUTPUT«50␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/ZJWIOoB3P3 line 1␤␤»
Ben_Goldberg m: for ^2 { say [+] (^(($_-$_+5) X ^($_-$_+5)) }
camelia rakudo-moar 1ad917: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TiX41hp4fX␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/TiX41hp4fX:1␤------> 3^2 { say [+] (^(($_-$_+5) X ^($_-$_+5)) 7⏏5}␤ expecting any of:␤ …»
teatime I will flesh it out some more; maybe with more meat, people will be more interested.
Ben_Goldberg m: for ^2 { say [+] (^($_-$_+5) X ^($_-$_+5)) }
camelia rakudo-moar 1ad917: OUTPUT«50␤50␤»
awwaiid if I write them next to each other it doesn't see them as the same either 15:12
m: say [+] (^5 X ^5) ; say [+] (^5 X ^5)
camelia rakudo-moar 1ad917: OUTPUT«50␤50␤»
psch m: say [X~] (<c C>, <o O>, <a>, <b B>) 15:13
camelia rakudo-moar 1ad917: OUTPUT«(coab coaB cOab cOaB Coab CoaB COab COaB)␤»
psch teatime: i don't really know why that needs a DSL, fwiw :)
teatime excellent
Ben_Goldberg It seems like some sort of over-aggressive constant inlining, to me.
teatime I figured that would exist.
psch i mean, "for the sake of it", maybe yeah
15:14 tokomer left
teatime like, is it my imagine, or does Perl6 seem literally perfect for this task 15:14
awwaiid psch: Ben_Goldberg: I guess I can open a rakudobug. I'll do that 15:15
teatime psch: What do I read to understand how your code works?
awwaiid psch: Ben_Goldberg: thank you both for noodling with me :) 15:18
psch teatime: the brackets are shorthand for reduce, X is CROSS-META and ~ is concatenation 15:20
teatime: i'm pretty sure those should be documented on doc.perl6.org
awwaiid: yeah, RT is a good idea, thanks 15:21
teatime psch: excellent, the reduce/concat is exactly what I needed. 15:22
no clue what cross-meta is, but I shall figure it out. much thanks.
psch teatime: i think it's actually called METAOP_CROSS...
teatime ahhh 15:23
Ben_Goldberg Welcome :) 15:25
15:28 Ben_Goldberg left 15:29 Ben_Goldberg joined 15:35 sjoshi joined 15:45 khw joined
garu m: my Str $s; $s.chars.say 15:46
camelia rakudo-moar 1ad917: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/gOjV_8s_Ky line 1␤0␤»
15:47 zakharyas joined
garu shouldn't this output 0 without warnings? 15:47
psch m: Cool.chars 15:49
camelia rakudo-moar 1ad917: OUTPUT«Use of uninitialized value of type Cool in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/BBfhhJY7ly line 1␤»
psch way i see it: any Cool type object that wants to be .chars'd needs to be turned into a Str first, and still is undefined then 15:50
that generates the warning
so Str::chars(Str:U:) also has to generate that warning
15:51 xinming left 15:52 xinming joined
psch nqp-m: nqp::elems(nqp::what(nqp::list_s())) 15:59
camelia ( no output )
psch $ ./nqp-j -e'nqp::elems(nqp::what(nqp::list_s))'
org.perl6.nqp.sixmodel.TypeObject$AggregateRTE: Cannot do aggregate operation on a type object
and *that* is why r-j doesn't build at the moment...
16:00 skids joined
psch has to get used to having a dev channel... 16:01
awwaiid there's a dev channel? 16:03
psch yeah, #p6dev :)
for like a week or so i think..?
awwaiid ah right. With such a flexible and young language that can probably be tricky 16:04
psch ...having a dev channel?
awwaiid trying to keep them separate 16:05
psch oh, right
well, this one here is to be open for newbies and questions, which makes it hard to backlog for devs...
awwaiid yep 16:06
makes total sense, and I like :)
RabidGravy yeah, the clutter of "How do I (do something that is blindlingly obvious to anyone who has looked at the source)" was getting too much at times
awwaiid ya 16:07
psch nqp-m: say(nqp::elems(nqp::what(nqp::list_s()))) # yay pointers 16:08
camelia nqp-moarvm: OUTPUT«-4294967287␤»
psch i almost want to maintain that nqp-j is doing the right thing...
anyway, moving that discussion... now 16:09
16:11 colomon joined
garu psch: sorry, I'm not sure I understood your analysis :X. I mean, according to the docs, .chars "Returns the number of characters in the string". If the string is uninitialized, wouldn't you say it has 0 chars? Or should I just suck it up and use .defined? 16:14
I mean, it *does* say it has 0 chars, but it also triggers the warning 16:15
maybe it should, I don't know - that's why I'm askig :D
asking, even
psch garu: yeah, the warning makes sense in my opinion, because Cool things that are not Str have to have .Str called first
garu: and an undefined Str being the only Cool type that *doesn't* warn is weirdly inconsistent 16:16
garu right. ok, thanks!
16:18 raiph joined 16:25 lsm-desktop left 16:26 liztormato joined
RabidGravy also at a more stringy level, an empty string *is* different from an undefined string 16:31
16:40 virtualsue joined 16:43 liztormato left 16:50 mr-foobar left, pmurias left 16:54 yqt left 16:57 mr-foobar joined 16:58 AlexDaniel joined
AlexDaniel RabidGravy: the first time I actually got to your stream without getting 404 and there's just silence! What a disappointment! :) 17:10
RabidGravy hahah
17:11 KotH joined
AlexDaniel RabidGravy: So you're streaming silence from Perl 6! That's not a big achievement, you know xD 17:12
17:13 itaipu left 17:15 virtualsue left
RabidGravy there, fixed that 17:16
slightly different GM drum kit 17:17
17:17 ParsonsNose joined
RabidGravy well it would have been if I had connected the outputs 17:18
AlexDaniel :)
17:19 kaare__ joined
RabidGravy "it's coming out the headphones so it *must* be coming out the stream" 17:19
17:22 kaare_ left
AlexDaniel RabidGravy: this is getting boring pretty fast :) 17:25
RabidGravy well it is only about thirty lines of code, and most of that is parsing the "drum tab"
17:28 zakharyas left
psch RabidGravy: just add a chance to move back or forth 4 16th in line 87... :) 17:28
well, catching out of bounds too 17:29
17:29 mr-foobar left 17:30 mr-foobar joined
RabidGravy if I get distracted by making "interesting" music I'll never finish the module ;-) 17:34
psch fair enough :)
RabidGravy I may hook up the euclidean thing I used in Audio::Hydrogen a bit later when I've actually added the pod 17:36
17:39 raiph left, raiph joined 17:41 raiph left 17:42 raiph joined 17:44 molaf joined 17:49 virtualsue joined 17:50 virtualsue left 17:59 Begi left 18:02 zakharyas joined 18:09 lsm-desktop joined 18:10 lsm-desktop left 18:11 yqt joined 18:21 geekosaur left 18:22 geekosaur joined 18:41 yqt left 18:48 FROGGS__ is now known as FROGGS
RabidGravy Until this moment in time I had actually forgotten that I have a bunch of www.roland.co.uk/products/um-3ex/ somewhere in the house 18:53
where "bunch" > 1 and < some unknown number
masak .oO( 1 ^..^ * ) 19:03
19:10 ducky_ joined 19:18 zakharyas left
vendethiel masak: cute :) 19:25
teatime psch: I did a little more work: gist.github.com/pprince/f2c5879242d3d5ef1929
19:26 ely-se joined
teatime psch: The idea of writing this to replace 8 lines of crap is fun: © ↤ ⎄⟪↕co⟫ ∪ ⎄(↕c) 19:26
I'd have to write my own parser though, most likely.
19:34 Begi joined
psch m: sub prefix:<↕>(Str $s) { { @^a>>.uc X~ @a>>.lc }($s.comb) }; say ↕'co' 19:35
camelia rakudo-moar 5eaa15: OUTPUT«(Cc Co Oc Oo)␤»
19:35 lichtkind_ joined
teatime can you make it allow barewords? 19:37
psch doesn't know what's neccessary in XCompose syntax
teatime like ↕co ?
psch nah, that probably not
i guess with macros you could there
teatime still, that's very very promising.
psch also i wouldn't know how to get every unicode symbol mean "this is the symbol i want to define"
as well as (presumably) print it
but if you can make the concession of an e.g. &define sub and not using barewords but literals you could implement it in p6 as-is, if i'm not missing something 19:38
teatime that wouldn't be necessary
19:39 lichtkind__ left
psch making the concession wouldn't be neccessary..? :) 19:39
teatime hmm.
no I was going to say the way I have <symbol> ↤ is not strictly necessary
psch oh
teatime one advantage though of the syntax example from the doc, is it uses all high Unicode chars for operators/delimeters/etc. 19:40
psch i'm imagining something like < define '©' ↤ ⎄⟪↕'co'⟫ ∪ ⎄(↕'c') > instead
teatime Compose sequences usually only contain ASCII chars, but they contain *all* of them
psch that should be doable right now
teatime so the fewer you would have to escape, big win
ahhh
yeah that's pretty reasonably beautiful, psch 19:41
psch and quotes you can already evade, with q[] or q{} for example
so no escaping for those either
eh, don't the leftarrow there actually 19:42
'cause that's kinda what the define does
teatime with define you no longer need it
psch :)
teatime the idea was ⎄(↕'c') would become [['<Multi_key>', '<parenleft>', 'C', '<parenright>'], ['<Multi_key>', '<parenleft>', 'c', '<parenright>']], if that wasn't obvious. 19:44
psch: does it seem insane to use this much unicode? I don't really intent to try to convince anyone else to use the system, and the amount of typing it will save me is just, ginormous.
psch m: say (1,2,3) ∪ (6,7,8) 19:46
camelia rakudo-moar 5eaa15: OUTPUT«set(7, 8, 3, 1, 6, 2)␤»
psch teatime: i don't know about insane, but it's supported, so go wild..? :)
teatime hehe
19:49 ducky_ left, cognominal left 19:50 cognominal joined
psch oh, no that wasn't obvious to me right then actually 19:53
19:53 shadowpaste left
psch so ⟪⟫ are the 'only inside these are the chars' and () are 'just another key to press'? 19:54
teatime psch: well actually ⟪⟫ was intended as 'create all combinations from these elements', and () were just literal '(' and ')'. but I just made this up today, other chars can be used (if, e.g., ⟪⟫ conflicts with perl.) 19:55
psch teatime: no, it's more that () conflict 19:56
teatime psch: it can be '(' and ')' since we aren't doing barewords
psch right
teatime ⎄ is also a literal that stands for '<Multi_key>', but that's probably worth making work. 19:57
psch < define '©', ⎄ ⟪↕'co'⟫ ∪ ⎄ '(', ↕'c', ')' > # this is what i can actually see working, thinking more about it 19:58
but that's a bit eh too
teatime psch: you could probably so '(↕c)' and parse the string for certain chars :)
psch teatime: yeah, but then you're losing ↕ as an explicit operator 19:59
or having to do both, which would be silly :)
teatime yeah
psch hm, actually
↕ '(c)' is fine isn't it? 20:00
teatime yeah, I suppose so
psch m: say '('.uc; say '('.lc
camelia rakudo-moar 5eaa15: OUTPUT«(␤(␤»
psch 'cause ↕ is just .uc and .lc both
teatime right
psch hm, but then you are reliant on ordering, which means that ⎄ ⟪↕'co'⟫ can't include '<Multi_key> <C> <O>' 20:01
err
teatime not necessarily
psch the o c variants i mean 20:02
teatime I haven't decided if ↕co should mean co,CO or co,cO,Co,CO
and the order they get generated in, in either case, is not important
psch right, but your gist has it definitely mean at least one of oc and OC
teatime they can be a set
psch: see the thing is, if you have a big expression 20:03
psch and that's what you'd have to give up with ↕ '(c)'
teatime psch: ↕'a' in the middle, should double the number of output sequences
psch 'cause that'd also mean )(c
teatime oh no
no I'm pretty sure ↕ shouldn't permute/combine; we'd have a diff operator for that
timotimo RabidGravy: looking at rabidgravy.com gives me a 404 for soundcloud.com//stratus.js; maybe something's out of date there? 20:04
psch right, so ↕co can at most mean co,cO,Co,CO
teatime yeah
psch yeah, in that case my last suggestion should be workable
20:04 shadowpaste0 joined
RabidGravy timotimo, very probably, I'm useless with websites 20:04
timotimo hah
why is rabid gravy an alternative to music? :) 20:05
RabidGravy "noise with beats in", may or may not be music depending on your point of view ;-)
FROGGS my kids (age 1, 4 and 6) and me count that as music :o) 20:07
psch RabidGravy: fwiw, gist.github.com/peschwa/638df29b3f394cdf3cdf makes the amen examples lots more interesting, i find :P
FROGGS I mean, they know and love skrillex, that's worth something I guess
psch well, the lib change isn't for interesting, just for "work" :)
geekosaur one person's music is always another's noise :p
FROGGS aye 20:08
RabidGravy haha
psch, interesting, what platform are you on such that portmidi isn't versioned like that? 20:09
teatime psch: so, would you define ↕ as a prefix operator that returns, say, a set, and after the RHS has processed, your define() sub gets like, something that might be a list of lists and sets that might contain lists and sets etc.; and define() walks through that and flattens, doing permutations where it finds a set?
RabidGravy or did you build it yourself
teatime does that make sense?
psch RabidGravy: i'm on archlinux, the lib exists as libportmidi.so
RabidGravy weird 20:10
it's libportmidi.so.0 and libportmidi.so.0.217 here
maybe NC should do something like try it unversioned first and then try the versioned 20:11
timotimo i can make a website for you, but it'll cost ya. it'll be worth it, though. i know wicked cool tricks like making things look totally like 3d with <TABLE> and also how to make scroll bars with wicked-cool colors! 20:12
FROGGS timotimo: holy grail!
timotimo also until that new website is done, i can post a totally radical gif with an "under construction" sign that, like, spins and stuff!
psch teatime: yeah, that sounds like what i'd try to implement with the syntax 20:13
20:13 ely-se left
FROGGS timotimo: you can also do lots of good stuff with bgColor on tables! 20:13
RabidGravy I WANNA MARQUEE AND BLINK AND STUFFS!
psch teatime: note that &define would also get the unicode symbols itself as first char
timotimo i know, FROGGS! if i set the border to 0 i can make pictures with that! even without letting the user download my .jpgs!
FROGGS haha
timotimo BBIAB 20:14
FROGGS ALRIGHT!!11
masak SEE YOU LATER 20:15
FROGGS will slam the door shut when he leaves 20:16
20:16 shadowpaste0 is now known as shadowpaste 20:19 domidumont left 20:20 shadowpaste left 20:22 shadowpaste joined
teatime BTW, is the unicode data for Perl6 up to date with Unicode 8.0 ? 20:22
20:22 CurtisOvidPoe left, shadowpaste left
moritz teatime: yes 20:23
from MoarVM's docs/Changelog, section New in 2015.07: "+ Updated to Unicode 8"
20:23 shadowpaste joined 20:24 shadowpaste left, sjoshi left 20:25 shadowpaste joined 20:26 shadowpaste left
timotimo that's not up to date, that's like almost half a year old! 20:26
20:26 labster joined 20:27 azwieg103 joined
lizmat I don't think there's a newer version? 20:27
afaik, 9.0 is still in draft stage
masak nevertheless!
20:27 darutoko left
timotimo OK, so unicode isn't up to date 20:27
20:27 shadowpaste joined
timotimo lizmat: when i set MVM_SPESH_DISABLE=foo in the environment, i don't seem to be able to get that script to segfault 20:27
moritz expects montly releases from Unicode!
masak is there some way we can update to Unicode 9 before the consortium? :P
timotimo clearly everyone who says unicode is "production ready" is lying 20:28
stmuk there is probably a pirate torrent of a the prespec
lizmat who needs unicode 9,, we want a 10!
20:28 shadowpaste left
timotimo yeah, if they were dumb enough to release unicode 9, people's code will break left and right because they are checking if the version starts-with 9 to figure out if it's the 95 or 98 version 20:29
lizmat $ MVM_SPESH_DISABLE=foo perl6 2
Segmentation fault: 11
(2 being the name of the script)
20:29 shadowpaste0 joined
lizmat timotimo: ^^^ 20:30
masak shudders at the memory of Unicode 95
timotimo how reliable is that crash?
lizmat timotimo: 10 out of 10 times for me 20:31
20:32 ggoebel16 left, havenwood left
lizmat timotimo: afaics, it seems to be triggered by the (): take them away, and the problem goes away 20:33
timotimo: perhaps we should continue this on #p6dev ? 20:34
timotimo OK
20:34 mst is now known as shadowpaste, shadowpaste is now known as mst 20:35 nowan left, shadowpaste0 is now known as shadowpaste
masak has a thing now which can traverse a whole QAST tree from a parse of a Perl 6 program 20:40
it doesn't do anything yet, though
moritz masak: is it installed as a compiler stage? 20:42
20:44 nowan joined 20:57 Begi is now known as Testy, Testy is now known as Teto1
masak moritz: no -- I'm just running a Perl 6 script that begins with `use nqp;` 20:57
20:57 geraud joined
masak my proximal goal for this is to re-write a 007 test from regex-based to QAST-based 20:58
but I might also go the extra mile and publish a module that can traverse a Perl 6 program as QAST
we'll see :)
here's the regex-based version: github.com/masak/007/blob/0378d840...ishblock.t 21:02
21:04 yqt joined
masak 'night, #perl6 21:05
lizmat gnight masak
21:06 tmch joined 21:08 MilkmanDan left 21:09 census joined
census hi masak! i'm still banned in #perl after all this time. does #perl ever unban people? 21:10
lizmat suggests asking the banners ? 21:12
census lizmat i have no clue who banned me but it was years ago 21:13
El_Che census: who did you kill? 21:14
census El_Che hahaha i can't even remember 21:15
if we made it multiple choice i might remember
21:16 MilkmanDan joined
teatime is there a perl6 that has, like, readline-type functionality 21:19
perl6 REPL I mean
21:19 yqt left
lizmat $ perl6 21:20
should do it
awwaiid teatime: the built-in repl (just run 'perl6') has readline-type functionality if readline is installed, and linenoise if linenoise is installed (similar thing)
teatime hrm, ok
awwaiid teatime: failing that, try 'rlwrap perl6', though you'll have to get rlwrap
teatime OH! By "installed", you meant via panda! ? 21:25
timotimo that's right 21:26
teatime aha!
21:27 cpage joined 21:29 TEttinger joined 21:30 bjz left 21:31 kaare__ left, bjz joined 21:33 bjz left 21:36 kurahaupo left 21:41 ParsonsNose left 21:49 kentnl left, kentnl joined 22:03 BenGoldberg_ joined 22:04 cpage_ left 22:05 cpage_ joined, Ben_Goldberg left 22:08 Teto1 left 22:09 BenGoldberg_ is now known as BenGoldberg 22:15 lucasb joined
lucasb any chance to see the monthly release still today? :) 22:16
22:20 vendethiel left
timotimo it's being worked on actively 22:20
er, i think
at least NQP already has its tag
22:20 vendethiel joined
lizmat as far as I'm concerned, I've fixed (worked around) the blocker 22:21
lucasb yep, nqp is already there
I'm just waiting for rakudo to build the 3 tarballs at once
lizmat lucasb: fwiw, there are still some hours in the day left for [Coke] :-) 22:22
22:22 Vitrifur left
lucasb good :) 22:22
lizmat: sorry to bother you again with the Bool/defined issue, but don't you think type objects need to have the same behavior as instances? your second commit only changed the Bool(Mu:D) case. 22:25
lizmat Well, I liberally interpreted S02:4668: "Note that if you could instantiate a C<Mu> it would be considered defined, and thus true. (It is not clear that this is allowed, however.) 22:29
synopsebot6 Link: design.perl6.org/S02.html#line_4668
lizmat so that a type object is intrinsically always False unless you create your own Bool method that says otherwise 22:30
lucasb yeah, it's confusing. thanks for taking a look at this, lizmat++ 22:32
interesting that it is possible to instantiate a Mu 22:33
lizmat fwiw, I don't have a strong opinion about it: timotimo found .Bool being called a lot, so I saw an opportunity
m: dd IterationEnd
camelia rakudo-moar 1bbef9: OUTPUT«Mu.new␤»
lizmat :-)
lucasb oh, IterationEnd is a Mu instance. I didn't know that 22:35
lizmat meanwhile, there aren't that many hours left in my day, so I wish you all a good night!
lucasb good night
22:40 FROGGS left 22:41 vendethiel left 22:42 Actualeyes left 22:46 Vitrifur joined 22:57 census left
timotimo hm, didn't we want to put IterationEnd outside of the core setting and into RakudoInternals? 22:57
22:58 TEttinger left
lucasb there's no way to get a handle on IterationEnd in userland code? iirc, I think in Python and Ruby one can catch StopIteration in some circumstances 23:01
timotimo RabidGravy: i wonder if you've ever thought about making video game music 23:03
RabidGravy I made games for fun on the Amiga years ago and made the music :) 23:05
timotimo what do you mean?
having some packet loss between my laptop and my ssh server :\ 23:07
RabidGravy music, games, done a bit in the past
but I actually really prefer to make music with real hardware these days
I'm just doing this other stuff *because I can* ;-) 23:08
23:08 rindolf left 23:13 lucasb left
timotimo fair enough :) 23:19
RabidGravy the thing with this MIDI stuff is that I am finding myself forced to document parts of MIDI itself 23:20
which is a bit tedious
timotimo i can imagine
teatime R 23:21
23:21 vendethiel joined
timotimo Arrrr? 23:21
teatime heh 23:23
I am trying to make the irssi → weechat adjustment... it's painful at times.
Juerd teatime: Why?
teatime *shrug* boredom, and it does lots of neat stuff.
Juerd Why is it painful? 23:24
teatime oh
timotimo i prefer weechat, too
teatime it's very different in some ways, there are zillions of settings, and lots and lots of keybindings
timotimo did you see the user manual, though? it's pretty good
teatime yes.. 23:25
I haven't read it front-to-back
Juerd I've never tried weechat
teatime I probably should though it would save me time
timotimo it also lets you find out about some neat features here or there
Juerd The most painful thing, I imagine, would be to port all the irssi scripts I've come to depend on :)
teatime Juerd: a lot of the really popular ones have corresponding ones 23:26
Juerd Yea, but not all of my scripts got popular :P
teatime although they don't seem as featureful on average
I haven't yet found a suitable awaylog :(
Juerd I recently made a new script to change s/^$nick: /$newnick: / when someone changes their nickname while I'm still composing a line to them. 23:27
That's the kind of silly stuff I have.
Not live saving things that everyone would want, but small stuff that makes me happy in the one or two times a year it actually does something useful.
23:28 havenwood joined
Juerd Oh, sorry. I meant s/^ $nick ':'/$newnick: // I think ;) 23:29
Without that 4th slash. Er, s:4th/'/'//;
23:34 BenGoldberg left
AlexDaniel teatime: oh, it looks like you can type →arrows←! Welcome to the club! xD 23:34
teatime heh
There is so much stuff in Unicode, I am having trouble fitting it all into my compose bindings. 23:35
AlexDaniel compose bindings? I have it all right on my keyboard! 23:36
teatime: meanwhile, take a look at this: gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c
teatime I don't beleive you, because there's just not enough keys, even if you have like 4 groups defined.
but I am working on a new layout, w/ AltGr/Level3 and probably also multiple groups
that combined w/ Compose, should get me a lot further 23:37
AlexDaniel yep
I figured that most of the stuff that I actually use can perfectly fit on my keyboard, so I just did that.
teatime I want to pay *some* attention to legacy key locations and compose bindings, however Unicode has grown sooo much that I think it makes sense to feel free to overwrite cruft. 23:38
dalek kudo-star-daily: fb60b53 | coke++ | log/ (9 files):
today (automated commit)
23:39
teatime I would say I want to make sure all of the APL symbols are particularly accessible, but a lot of them are dumb?
AlexDaniel ‘’ “” 「」 «» 􏿽xE2􏿽x8C􏿽xA9􏿽xE2􏿽x8C􏿽xAA :) 23:40
geekosaur tries to remember if there's a unicode symbol for O^HU^HT (abort program at quote-quad input) 23:41
Juerd Since we're on the topic of composing characters... is there a way to load an X Compose file without restarting X?
23:43 vendethiel left
Hotkeys Juerd: I don't believe so 23:44
teatime you don't have to restart X
just whatever client you want to recognize it
although gtk is weird, you might have to restart the gtk im thingy 23:45
Juerd Ah, that's helpful :) 23:46
Hotkeys what does =~= do 23:47
m: say 3.1 =~= 3
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.1 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
AlexDaniel Hotkeys: ah you mean ≅ 23:48
geekosaur equal within some epsilon, for floating point
AlexDaniel Hotkeys: it's for comparing floats 23:49
Hotkeys m: 3.001 =~= 3.0
camelia ( no output )
Hotkeys m: say 3.001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.000000000000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«True␤»
geekosaur basiucally a workaround for floating point's least significant digits collecting errors 23:50
Hotkeys m: say 3.00001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.0000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.00000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.000000001 =~= 3.0
geekosaur if you add 0.1 10 times to 3 you expect to get 4, with IEEE floating point you may get 3.99999999999998 or sth
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.0000000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.00000000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.000000000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.00000000000001 =~= 3.0 23:51
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
Hotkeys m: say 3.000000000000001 =~= 3.0
camelia rakudo-moar 1bbef9: OUTPUT«True␤»
Hotkeys intersting
AlexDaniel m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y == 0.3 23:53
camelia rakudo-moar 1bbef9: OUTPUT«False␤»
AlexDaniel m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y ≅ 0.3
camelia rakudo-moar 1bbef9: OUTPUT«True␤»
Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; say $x + $y
camelia rakudo-moar 1bbef9: OUTPUT«0.3␤»
Hotkeys well now I
am confused
AlexDaniel m: ‘∨’.uniname.say 23:54
camelia rakudo-moar 1bbef9: OUTPUT«LOGICAL OR␤»
AlexDaniel m: ‘∧’.uniname.say
camelia rakudo-moar 1bbef9: OUTPUT«LOGICAL AND␤»
23:54 firstdayonthejob left
geekosaur say is doing .gist which simplifies it 23:54
Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; put $x + $y
camelia rakudo-moar 1bbef9: OUTPUT«0.3␤»
Hotkeys m: my num $x = 0.1.Num; my num $y = 0.2.Num; say ($x + $y).perl
camelia rakudo-moar 1bbef9: OUTPUT«0.3e0␤»
23:54 tmch left
geekosaur although... that, it's also clipped by the default format for exponential 23:55
RabidGravy anyway, I think I'm all documented out today 23:58
last bit tomorrow
toodles
AlexDaniel .u ‖ 23:59
yoleaux U+2016 DOUBLE VERTICAL LINE [Po] (‖)
Juerd <Multi_key> <Left> : "←" leftarrow # LEFTWARDS ARROW
etc.