»ö« 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:05 bjz left
AlexDaniel samcv: 2.9G here :) 00:06
00:07 bjz joined
rightfold Why does S:g sometimes return a slip instead of a string? 00:07
notviki samcv: replied and rejected.
rightfold: your rakudo is too old.
rightfold I have Rakudo 2016.11. To which version should I upgrade? 00:08
00:08 kurahaupo__ joined
notviki rightfold: are you using Rakudo Star? 00:08
rightfold no
notviki rightfold: then 2016.12 00:09
rightfold where can I find it?
notviki rightfold: where did you find 2016.11?
rightfold perl6.org/downloads/ 00:10
notviki rightfold: there are multiple instructions on that page. Which did you follow?
samcv i just made Send an email to rakudobug at perl.org. on the rakudo wiki in bold
rightfold The one that is no longer there, apparently.
samcv so people can easily find it by scanning the page
rightfold Maybe I did get Rakudo Star by accident. How do I check? 00:11
notviki unsure
samcv perl6 --version
idk what does it say
rightfold This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c.
samcv 2016.11 is the newest on rakudo.org/how-to-get-rakudo/ 00:12
notviki There's no final 2016.12 R* release yet, just the beta: pl6anet.org/drop/rakudo-star-2016.1...eta.tar.gz 00:13
rightfold: or you can download just the compiler and build it: rakudo.org/downloads/rakudo/
rightfold I'll just work around the slip
notviki rightfold: or you can just use .subst(:g) instead of S:g/// and wait for next star
rightfold Thanks :) 00:15
00:16 CQ joined 00:17 BenGoldberg left 00:18 BenGoldberg joined
SmokeMachine m: use Test; pass Q[\] 00:27
camelia rakudo-moar a687d9: OUTPUT«ok 1 - \\␤»
SmokeMachine is the "\\" expected? 00:28
m: say Q[\] 00:29
camelia rakudo-moar a687d9: OUTPUT«\␤»
geekosaur looks like it 00:30
artifact of Test.pm
m: use Test; pass chr(92)
camelia rakudo-moar a687d9: OUTPUT«ok 1 - \\␤»
00:32 lukaramu left
notviki SmokeMachine: yes, there's an explicit code that backslashes the backslashes so that backslashes backslashing the # don't get backslashed if the message contains backslashes 00:33
also backslashes.
geekosaur managed to parse that somehow. and it even makes sense...
SmokeMachine notviki: so: I can't use only 1 backslash as test description? 00:34
notviki: I got a little confused... 00:35
geekosaur try this: the response needs to be parseable by TAP, so it needs to backslash stuff that TAP might interpret, so it needs to escape actual backslashes 00:36
notviki SmokeMachine: you can, but it'll be backslashed in the output. 00:37
SmokeMachine geekosaur: ok... now I got it!
00:38 CQ left
SmokeMachine will prove remove that extra backslash if it shows the test description? 00:38
in case of an error, for example...
00:38 shayan_ left
notviki Don't think so 00:39
SmokeMachine no, it didn't with -v...
:( 00:40
I was trying to say that the fund received a Capture... but it shows: ok 189 - test-func received \\(42) 00:41
notviki SmokeMachine: well, it needs to backslashes prior to '#' char (ensuring the backslash backslashing # doesn't get backslashed accidentally). See if you can achieve that without backslashing all the backslashes: github.com/rakudo/rakudo/blob/nom/...#L617-L623 00:43
It's very very very preferable for that code to be very fast.
00:44 rindolf left 00:54 TimToady left 00:59 curt_ left
dugword Woo! First pull request merged! Thank you all very much for the help and guidance! 01:00
notviki dugword++ 01:01
keep 'em coming.
dugword I'm hooked now
01:02 realityeuphoria joined 01:03 newbie1 left, newbie1 joined
.oO( Hook, line, and sinker ... )
01:11 bwisti left
dugword Anyone using the default vim perl 6 syntax highlighting? It is unusably slow for me on files larger than a few hundred. Suggestions for a better one? 01:14
few hundred lines*
SmokeMachine notviki: if I understood it well, it's backslashing the #, not preventing it... am I wrong? 01:20
geekosaur # has a meaning to TAP, so if you use it in a description it needs to be escaped 01:22
SmokeMachine "#" Will become "\#" and "\#" Will become "\\\#". Is it it?
geekosaur yes
SmokeMachine If I don't backslash the backslash, so "\#" will become "\\#", and the backslash will be escaped... 01:24
I think I got the problem... 01:25
notviki SmokeMachine: and "\\#" => "\\\#"
geekosaur actually \\# becomes \\\\#
actually \\# becomes \\\\\#
leaning toothpicks, ho! 01:26
notviki SmokeMachine: the big picture goal is to escape "#" using a backslash. The extra fuffing is to ensure that the backslash we add to escape the "#" doesn't get backslahed by any previous backslashes
SmokeMachine Is it possible to use regex? 01:27
notviki SmokeMachine: you can try, but my guess it'll be slow.
01:28 floutenvy joined
SmokeMachine Ok... 01:28
notviki SmokeMachine: and we want this very fast. This code is used literally by every test. Currenty Rakudo's stresstest has 130902 top-level tests (even more if you count stuff in subtest) and on my box it takes 507 wallclock secs to run.
SmokeMachine It's using nqp::* to be faster? 01:29
notviki Yes
SmokeMachine Probably I shouldn't mess with it...
notviki And core devs have to run the spectest on every change (that subset of tests is ~55K of tests and takes 3-5 minutes to run).
SmokeMachine: why not? :) 01:30
SmokeMachine I'm not the best one to make a change that can affect so many places... 01:31
notviki But it'll be reviewed
SmokeMachine But I'll think how would I do that...
01:33 Ven joined 01:35 claytonrowe left
SmokeMachine notviki: I jus want every # backslashed, right? 01:36
notviki pretty much 01:37
SmokeMachine # wrong; \# ok; \\# wrong; \\\# ok; right?
notviki right
01:37 Ven left
SmokeMachine Not a very good solution, but I could change the "#" for " \#" 01:38
With the space...
*to 01:40
notviki That could work.
01:42 newbie1 left
SmokeMachine m: say "\ " 01:42
camelia rakudo-moar 37941d: OUTPUT« ␤»
notviki well, for ' \#' to be more accurate
Double quotes would turn it back into plain '#' unless you escape the backslash
01:43 floutenvy left
SmokeMachine Right! 01:43
notviki: but it will change the message... is that ok?
notviki Though note that '\#' will end up as '\ \#' when it could stay unchanged; would people be similarly disappointed with that as you were with the scaped backslash? 01:45
SmokeMachine: if it passes roast tests, then it's fine.
01:48 aborazmeh joined, aborazmeh left, aborazmeh joined, wamba left
SmokeMachine notviki: but it will affect only messages with # (that is the real problem) not every message with \ 01:50
notviki yeah
SmokeMachine Probably it will be faster, it'll be only 1 pair of split/join 01:51
Not 2
01:52 floutenvy joined
SmokeMachine notviki: I'll try to write a pull request tomorrow (I'm out of my computer now (I'd love to have perl6 on iOS)) 01:52
notviki SmokeMachine: and put a comment above that code, saying that space is there to prevent previous backslashes from interfering. Otherwise, some future programmer might assume the space is accidental and remove it. 01:54
SmokeMachine notviki: ok! Thank you very much! 01:56
notviki: are there tests to test the print of tests? Tests that might be affected by the change? 01:58
01:58 shayan_ joined
notviki No(t yet) 01:59
For now the roast itself serves as a test for tests. 02:00
(which doesn't cover failure modes, which is why eventually we'd want proper tests for test routines)
mst a script to diff 'current t/ output' versus 'last commit t/ output' might be a neat first step
02:00 floutenvy left
SmokeMachine notviki: ok 02:01
mst: doesn't looks hard...
mst: wouldn't be a problem when testing random, pick, roll, etc? 02:02
mst, sorry! Of course not!
mst I've no idea, but you can make a stable mode for tests like that with a fixed seed usually
notviki diff probably won't help you much in this case, because you *are* changing the output. 02:03
SmokeMachine It will test the test output...
notviki: sure! But probably would help after the change...
mst notviki: the way I find it useful is to be able to see "this all passed, *and* other than my specific change, it passed the *way* I expected" 02:04
notviki: like, if you get a diff in a test file you didn't expect, you can go look and work out if there's a problem with that test or if that change makes sense
SmokeMachine But how could that be done? Run the tests again getting the output?
mst well on my projects where I use this I strive for stable test output 02:05
and commit the output
and juust overwrite those files and then git diff them
this is not a fully general answer
but it turns out, for me, for those projects, to be really handy
SmokeMachine Or write a file with the output while running the tests and test that file?
mst basically, what I'm talking about is, roughly 02:06
'git checkout HEAD~1; <run tests>; git checkout HEAD; <run tests>; <diff>;'
it's not clever, it's not complicared, it's not always useful, but sometimes it's well worth it
I have no opinion beyond that 02:07
I'm not saying it's necessarily worth it, just "I have done this on projects that are language-ish and it was helpful to me"
SmokeMachine mst: makes sense for me... 02:08
02:09 espadrine left
dalek c: 35b6eb9 | coke++ | doc/Language/ (2 files):
remove trailing whitespace
c: 86b1beb | coke++ | xt/words.pws:
allow non-american spelling
c: 97173d2 | coke++ | xt/code.pws:
new code snippet
02:13 BenGoldberg left, shayan_ left 02:15 BenGoldberg joined
rightfold Do slangs still require nqp calls? 02:17
To install them
02:19 shayan_ joined 02:27 BenGoldberg left 02:29 BenGoldberg joined 02:38 kalkin- left, kalkin-_ joined
notviki buggable: slang 02:38
buggable: eco slang
buggable notviki, Found 5 results: Slang::Tuxic, Slang::Piersing, v5, Slang::SQL, Slang::Roman. See modules.perl6.org/#q=slang
02:42 realityeuphoria left 02:45 labster left 02:46 ilbot3 left, labster joined 02:47 ilbot3 joined 02:51 bjz left 02:55 kyan joined
BenGoldberg m: my $f = proto multi(Int) { * }; { $f.add_dispatchee(multi sub fac (0) { 1 }); $f.add_dispatchee(multi sub fac ($n) { $n * $f($n-1) }) }; say $f(5) 03:02
camelia rakudo-moar 37941d: OUTPUT«120␤»
BenGoldberg m: my $f = proto multi(Int) { * }; { $f.add_dispatchee(multi sub (0) { 1 }); $f.add_dispatchee(multi sub ($n) { $n * $f($n-1) }) }; say $f(5)
camelia rakudo-moar 37941d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An anonymous routine may not take a multi declarator␤at <tmp>:1␤------> 3 { $f.add_dispatchee(multi sub (0) { 1 }7⏏5); $f.add_dispatchee(multi sub ($n) { $n␤ expecting any of:␤ horizo…»
BenGoldberg m: my $f = proto multi(Int) { * }; { $f.add_dispatchee(sub (0) { 1 }); $f.add_dispatchee(sub ($n) { $n * $f($n-1) }) }; say $f(5) 03:03
camelia rakudo-moar 37941d: OUTPUT«120␤»
BenGoldberg Whee! Anonymous multi sub. A bit wordy, but it works :) 03:04
03:05 dugword left 03:08 bjz joined 03:12 pyrimidine left 03:13 pyrimidine joined 03:14 noganex joined 03:17 noganex_ left 03:23 dugword joined
BenGoldberg is confused by this error message: 03:27
m: sub ack(*@stack) { my $n = @stack.pop; proto helper(Int) { * }; multi helper(3) { 2 ** ( $n + 3 ) - 3 }; multi helper(2) { 2 * $n + 3 }; multi helper($m where 0|1) { $n + $m + 1 }; multi helper($m is copy) { push @stack, (--$m) x $n; push @stack, reverse 3 .. --$m; 13 }; while @stack { $n = helper(pop @stack) }; $n }; say ack(3,4);
camelia rakudo-moar 37941d: OUTPUT«125␤»
03:27 dugword left, pyrimidi_ joined
BenGoldberg m: sub ack(*@stack) { my $n = @stack.pop; proto helper(Int) { * }; multi helper(3) { 2 ** ( $n + 3 ) - 3 }; multi helper(2) { 2 * $n + 3 }; multi helper($m where 0|1) { $n + $m + 1 }; multi helper($m is copy) { push @stack, (--$m) x $n; push @stack, reverse 3 .. --$m; 13 }; while @stack { $n = helper(pop @stack) }; $n }; say ack(4, 1); 03:27
camelia rakudo-moar 37941d: OUTPUT«Type check failed in binding to <anon>; expected Int but got Seq (().Seq)␤ in sub ack at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
03:27 mr-foobar left 03:29 pyrimidine left 03:47 aborazmeh left 03:49 lichtkind__ joined, diakopter joined 03:52 lichtkind_ left 03:57 shayan_ left 03:59 shayan_ joined 04:06 shayan_ left 04:07 shayan_ joined 04:11 pyrimidi_ left 04:12 pyrimidine joined 04:21 dugword joined 04:24 TimToady joined 04:33 aborazmeh joined, aborazmeh left, aborazmeh joined 04:50 xtreak joined 04:54 mr-foobar joined 04:57 pyrimidine left, aborazmeh left 04:58 pyrimidine joined 05:07 kurahaupo__ left 05:14 BenGoldberg left 05:40 bwisti joined 05:43 shayan_ left 05:55 Cabanossi left 05:57 Cabanossi joined 06:01 tojo joined 06:02 tojo left 06:03 tojo joined 06:05 tojo left 06:06 dugword left 06:08 tojo joined, khw left, tojo left, grondilu left 06:09 grondilu joined 06:12 tojo joined 06:13 tojo left 06:14 tojo joined, tojo left, skids left 06:25 tojo joined 06:28 CIAvash joined 06:32 tojo left
CIAvash .ask TimToady any thoughts on this: irclog.perlgeek.de/perl6/2016-12-22#i_13784143 06:34
yoleaux CIAvash: I'll pass your message to TimToady.
06:44 AlexDaniel left 06:45 labster left 06:46 labster joined 06:48 kyan left 06:50 rburkholder left 06:56 dugword joined
samcv wooooo. 100%%%% passing with my branch of MoarVM for unicode 9.0 06:58
will be a bit til that is merged though because makes too many changes and might break things 06:59
but the other one that is less drastic gets us down to only failing 7
and should be much easier for us to extend things for future unicode version being able to save state between parsing charcaters
i'm excited 07:00
Woodi hi #perl6 :) 07:01
samcv: I have serious problems with accepting Unicode in forms other then UTF8. maybe there are more ppls lik me... so some blog post or introduction or other form of mind educating would be helpfull... 07:04
samcv hi
which formats?
UTF-16? 07:05
Woodi samcv: all up to you, even that if you want to do such thing :)
samcv well what formats do you need 07:06
no I want to do it
i want everything unicode
all of the things
Woodi and UTF-16 is something I for reasons not known to me realy hate :)
samcv non-standard number of bytes to character
well. 'standard' from an 8bit per char world
Woodi probaby becouse it is a "change"...
samcv yeah. and it is sort of wasteful for small numbers and stuff 07:07
er like ascii gets larger
07:07 Wanderer68 joined
samcv Moar stores them as 32 bit ints though 07:07
TEttinger wooo samcv, 100% is great
samcv each grapheme seperately and they're negative if it's a synthetic grapheme
yeah i know
now it is crashing randomly tho :P
well not randomly. but. like 1/2 of the types you start it, it immediately crashes. other than that it works perfect 07:08
so that's probably not too bad since there must be some place it's getting mad at
Woodi samcv: all that subject seems to be "embaded" somehow, eg. not straight way to move from vt100 to Unicode graphemes :)
samcv embaded? 07:09
embedded and a bad thing?
Woodi, if you have seen i'm also imlementing Unicode Collation Algorithm
Woodi you need some box like vm for that, far from "natural" machine representations :)
samcv so you can sort strings by alphabetic type order
my goal is that the user shouldn't even care about the encoding 07:10
so if we switched from unicode to like. some format different 100 years from now
things would still appear the same
well at least from the sorting standpoint for sorting strings
also Woodi what formats 07:14
did you want
Woodi define "formats" pls :) 07:17
samcv encodings
unicode encoding
Woodi I like A4, more then 80x25... ah
samcv encodings of the unicode format :) 07:18
Woodi I like utf-8
samcv but we already have that!
also anybody here good with gdb
i'm trying to debug the random crashes. i run perl6-gdb-m, type run
Unhandled exception: should eventually be unreachable
Woodi samcv: for what formats are used ? storing in file ?
samcv type 'backtrace'
> no stack 07:19
how can i backtrace when no stack
do i need to set breakpoints or something
still have no clue where it's screwing up
Woodi maybe compile with debugging symbols ?
samcv should still have a stack. if no debugging symbols should just print out random junk 07:20
Woodi call stack, memory stack ? 07:21
samcv it says no stack. so. idk!
the program has terminated though so i assume it just can't find it 07:22
cause it's closed already
geekosaur or it's dying in ld.so 07:27
(which typically ends with it SIGKILL-ing itself)
samcv not sure why it would die there though
but anything's possible
geekosaur (and which can't be intercepted, so no chance for the debugger to intervene)
samcv ack 07:28
and it doesn't crash every time so i don't know how to proceed
TEttinger samcv: maybe an issue with your computer, rather than Perl6? 07:29
samcv uhm it works fine if i revert to before my changes
TEttinger hm nvm
07:30 darutoko joined
samcv github.com/samcv/MoarVM/compare/mo...0?expand=1 these are the changes since it broke 07:31
07:35 bjz left 07:38 holli left, mr-foobar left 07:41 bjz joined
samcv ok actually it broke from just this commit github.com/samcv/MoarVM/commit/86c...0667d05738 07:42
i feel really lucky that i can at least track it to some smaller change, cause the commit before it was tons of changes
07:42 RabidGravy joined
samcv should_break is only called in that file FYI 07:43
maybe should_break isn't returning a MVMint32? 07:45
could the type be causing that? i wasn't having problems with changes before
since i basically did similarish changes so i can retain state across a different section of it 07:46
i mean it says static MVMint32 should_break, so i'd think it would return all things as MVMint32 or cast or whatever if it's not, though i've never had any problems in C before 07:47
07:51 pierre_ joined, pierre_ left, pierre_ joined 07:53 nine joined 07:54 camelia left, chienjo joined 07:55 camelia joined 07:56 ChanServ sets mode: +v camelia 07:57 shayan_ joined 07:58 CQ joined 07:59 chienjo left, chienjo joined, chienjo is now known as hchienjo
CQ hello, is there something like cpanm-reporter for perl6? I can offer to build modules under a freenas jail (freebsd 10) 07:59
08:02 thayne joined 08:03 bwisti left
RabidGravy well, there is testers.perl6.org/ 08:09
I'm not sure if there is any other client for it than panda, but I haven't checked recently 08:11
but it's just a POST of some JSON to testers.perl6.org/report 08:13
CQ github.com/perl6/cpandatesters.perl6.org ... not touched in a while...
08:14 Tonik joined
RabidGravy yes that's the same code 08:14
seems to work fine 08:16
08:16 dugword left 08:18 nine left 08:19 pyrimidine left, camelia left 08:20 nine joined, pyrimidine joined, camelia joined 08:22 ChanServ sets mode: +v camelia 08:23 petrutrimbitas joined 08:27 pyrimidi_ joined, pyrimidine left 08:29 tokomer joined 08:31 petrutrimbitas left 08:34 thayne left 08:37 thayne joined 08:38 hchienjo left 08:40 wamba joined 08:43 abraxxa joined 08:46 xtreak left 08:49 bjz_ joined 08:50 bjz left 08:51 xtreak joined
dalek c: 8a2f868 | (Nic Q)++ | doc/Type/ (2 files):
Add header to 'is default'
c: dbcefef | (Nic Q)++ | doc/Type/Sub.pod6:
Made the 'is default' a sub-heading in the Sub type
synopsebot6 Link: doc.perl6.org/type/Sub
c: 1d48c87 | Altai-man++ | doc/Type/ (2 files):
Merge pull request #1100 from nicqrocks/master

Edit headers to 'is default' sections
09:03 jonas1 joined 09:06 shayan_ left
masak morning, #perl6 09:09
gfldex: I'm available to discuss macros if you like
I find it difficult to summarize the situation in small non-scary words, but I also remain hopeful that macros do have a place in the design of Perl 6 09:10
it won't be easy to sneak them in, but it will be worth it
think of it as an API for the program structure
09:18 petrutrimbitas joined 09:25 romrador joined
arnsholt masak: I'm not gfldex, but since you mentioned the topic: What's your current vision of macros for Perl 6? 09:26
I haven't been able to follow 007, unfortunately
09:28 petrutrimbitas left
gfldex is this a bug? www.reddit.com/r/perl6/comments/5l...v/dbwdem2/ 09:30
09:31 kaare_ left
jast so... what's the situation in not-so-small, not-so-non-scary words? ;) 09:31
09:31 mst joined
arnsholt gfldex: The issue might be something to do with lexical scoping of things, since the new multi candidate isn't in the lexical scope of the array eqv definition 09:33
ISTR reading something about a way to lift an operator to the caller's scope in one of the synopses, but not sure what the current state of that is
gfldex arnsholt: I believe to remeber that TimToady had the same opinion until I convinced him otherwise. 09:34
masak arnsholt: can you read this? github.com/masak/007/issues/176#is...-240849038 09:37
(if not, I'll be happy to walk you through it)
it's about parsing something like `[+]` or `[||]` in 007
09:37 domidumont joined
arnsholt masak: Meeting now, but I'll read it later! 09:38
masak cool
I want to reply concretely to your question about my current vision; that definition of `term:reduce` is part of my vision :)
gfldex arnsholt: see (for operator overloading discussion) irclog.perlgeek.de/perl6/2010-08-11#i_2691533
masak the fact that it contains a closure both in macro-space and runtime-space pleases me immensely. that feels like *using* macros, for reals 09:39
samcv also guys. so is UTF-16 NYI or what is the status of that
gfldex i'm inclined to give myself a bonus point for remembering stuff from 6 years ago :->
samcv because i have never had to use it 09:40
masak well, not a closure in runtime-space. just a slurpy parameter.
but still.
samcv m: say "string".encode("utf-8").elems 09:41
camelia rakudo-moar 37941d: OUTPUT«6␤»
samcv m: say "string".encode("utf-16").elems
camelia rakudo-moar 37941d: OUTPUT«6␤»
samcv m: say "string".encode("utf-32").elems
camelia rakudo-moar 37941d: OUTPUT«Unknown string encoding: 'utf32'␤ in block <unit> at <tmp> line 1␤␤»
samcv m: say "string".encode("utf-32LE").elems
camelia rakudo-moar 37941d: OUTPUT«Unknown string encoding: 'utf-32le'␤ in block <unit> at <tmp> line 1␤␤»
samcv m: say "🐧".encode("utf-16").elems
camelia rakudo-moar 37941d: OUTPUT«2␤»
samcv m: say "🐧".encode("utf-8").elems
camelia rakudo-moar 37941d: OUTPUT«4␤»
samcv so i guess we have it implemented right
09:41 domidumont left
RabidGravy gfldex, that's winning, I can't remember stuff from a week and a half ago 09:42
09:42 domidumont joined
gfldex RabidGravy: don't worry, that just alsheimers 09:43
RabidGravy that's fine then ;-) 09:46
09:52 pyrimidi_ left 09:53 pyrimidine joined
samcv m: say "\x[6F]\x[34F]\x[323]".chars 09:55
camelia rakudo-moar 37941d: OUTPUT«1␤»
samcv hmm looks like i broke multiple extending marks somehow
m: "\x[6F]\x[34F]\x[323]".uniprops("GCB").say 09:57
camelia rakudo-moar 37941d: OUTPUT«(Other Extend Extend)␤»
09:58 TEttinger left 10:06 grondilu_ joined 10:08 CQ left, grondilu left 10:17 bjz joined 10:18 xtreak left, bjz_ left 10:20 xtreak joined 10:25 jonas1 left 10:26 jonas1 joined 10:27 pyrimidine left, pyrimidine joined 10:33 rindolf joined 10:34 dogbert2 left 10:35 dogbert17 joined 10:41 kalkin-_ is now known as kalkin- 10:44 avalenn joined
masak toolforger: found it! it's called "Zermelo's construction" by Wikipedia: en.wikipedia.org/wiki/Natural_numb...structions 10:46
I would say Zermelo's construction is simpler than von Neumann's, but it also misses some nice properties that the latter has 10:47
(notably, in von Neumann's construction, less-than comparison comes down to set membership) 10:48
10:51 ralisch joined, brrt joined, labster left 11:01 petrutrimbitas joined 11:08 wamba left 11:11 zakharyas joined
arnsholt masak: I *think* I can read it. Basically, a term:reduce is a term that looks like /\[ <infix> \]/ and expands to "(sub macro_reduce_or_whatever(*values) { values.reduce($op.identifier) })" 11:12
I'm not *quite* sure how the values after the term get turned into arguments to a call, except I guess maybe "(sub ($arg) { $arg + 1 }) 1" does that already?
And having a closure both in macro- and code-space is very neat! 11:13
I also like how it falls out entirely naturally of the macro definition that the reduce op uses op multis from the lexical scope where it's used 11:14
DrForr El_Che: Around finally. 11:16
arnsholt masak: Anyways, does this mean that macros will mean hooking into well-defined bits of the parser (like term and expr, and maybe atoms)? 11:22
masak arnsholt: basically `[+]` parses to a function (created at macro-time) that reduces with infix:<+> on its arguments 11:25
DrForr Oo, polishing up my code *just* in time to have the grammar internals rewritten :)
masak arnsholt: yes, full agreement about "falls out entirely naturally" -- it feels like the first "reward" for insisting on having Perl 6's scoping rules even inside macros/quasis 11:26
11:27 toolforger joined
masak arnsholt: basically, the macro comes down to using slurpy params and array reduce to define the reduce metaop. 11:27
toolforger: hiya. backlog for you, sir: irclog.perlgeek.de/perl6/2017-01-02#i_13835698 11:28
toolforger thx
masak (or madam. or bot.)
toolforger ask my significant other :-)
11:28 hankache joined
masak arnsholt: as you can see from that issue, my early attempts included parsing also the argument list. but I gradually realized that it's better to leave that to the underlying language. 11:29
arnsholt: also, having the macro create an anonymous function that DTRT at runtime feels *very* Lispy and right in some way 11:30
basically "aaah, yes. this is how I want to write macros." and then we just make sure to have a supporting toolset around that.
11:31 pierre_ left
masak TimToady seems not to believe so much in `is parsed` anymore. I've lately come to like it more. it has limits, yes, similar to how one shouldn't use small regexes for big-enough parsing problems. but for making individual additions to a language, they're very nice. 11:31
philosophical question remain regarding `is parsed`, and I'd be happy to discuss them here. but for now, they seem like the way forward and the natural next step for 007 11:32
11:33 jonas1 left 11:34 Actualeyes left 11:36 zakharyas left, lukaramu joined 11:37 Actualeyes joined
toolforger BTW what's the status of auth: ? 11:38
is there a consensus?
arnsholt masak: `is parsed` seems sensible enough to me 11:43
RabidGravy I'm not quite sure I understand the question, "auth" is a thing, it's part of the long name of a module 11:44
arnsholt It feels like it's basically equivalent to an addition to the grammar of "token $macro-name { $is-parsed-bit }" with a corresponding action method that does whatever the macro code does
toolforger RabidGravy: there were some discussions about it lately, but I missed the conclusion, if any, and probably context as well 11:45
arnsholt The argument to is parsed is a regex, sure, but it's no different from a token/rule/regex except in notation
11:47 xtreak left
arnsholt masak: But in the concrete example of your reduce metaop above, I guess it has the drawback of having to be used like `[+](1, 2, 3)`? 11:47
Given that "(sub { $^a + 1 }) 1` is TTIAR 11:48
toolforger What does TTIAR mean? 11:50
arnsholt Two terms in a row
toolforger ah ok thx 11:51
arnsholt masak++ has a blog post (about macros, appropriately) which describes it in some detail: strangelyconsistent.org/blog/macros...s-in-a-row 11:52
11:55 Actualeyes left 11:56 pmurias joined
DrForr Looks like I've got a new post to read :) 12:00
toolforger read it, understood about 75% (as I expected) 12:01
ralisch masak++
toolforger at least I now understand what the fuss is about :-)
RabidGravy "Looks like you failed 18 tests of 18" 12:04
top job
12:05 xtreak joined
masak arnsholt: yes. 007 is "a simpler Perl 6" in many ways. one of those ways is that it eschews listops. 12:06
arnsholt: for a while I had an error message in the parser that caught listops, because I kept typing `say x;` in my 007 programs :)
arnsholt =D 12:07
masak but the parser error was problematic, and I had to remove it for reasons I don't remember
m: say [+](1, 2, 3)
camelia rakudo-moar 37941d: OUTPUT«6␤»
masak anyway, the `[+](1, 2, 3)` syntax works in Perl 6 as well as in (coming soon to a computer near you) 007 12:08
arnsholt Hmm. I guess in full Perl 6 making it prefix:reduce might let you use the paren-less syntax as well? 12:09
Assuming operator macros are on the table 12:10
masak ah; yes. here's what the listop error ended up tripping on: github.com/masak/007/issues/76
arnsholt: operator macros already work in 007.
ralisch When are we getting an "Inline::007"?
masak arnsholt: as I've been known to say more than once, implementing macros in 007 was way easier than implementing operators :)
ralisch: that should be entirely doable. they could even share a runloop. 12:11
ralisch: contributions welcome! :D
arnsholt masak: Hee hee! 12:12
masak arnsholt: hm. looking at #76 with fresh eyes makes me think that the fault wasn't really with the parse error.
arnsholt I like the EXPR rule I see in the commit linked from that issue, BTW
masak yeah. 12:13
arnsholt token EXPR { <term> +% <infix> } # SO much easier that operator precedence =D
ralisch masak: did you improve the "{{{ }}}" construct yet?
masak arnsholt: 007 still has operator precedence.
arnsholt: it's <termish>, not <term> -- the former includes pre- and postfixes
arnsholt: 007 has a slight simplification compared to Perl 6, where prepostfixes are always tighter than infixes 12:14
arnsholt Right. And then you do the infix precedence stuff in the EXPR action instead?
masak makes us get away with that simpler parsing rule
yeah, kinda
arnsholt Cool
masak there's one batch of precedence handling in the termish action (the prepostfixes), and one in EXPR (the infixes)
arnsholt Makes sense 12:15