Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-25

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 RabidGravy pointer to a pointer? You van, it's just a second step of indirection.
00:05 dalek doc: 9eabdc2 | titsuki++ | doc/Type/ (2 files):
00:05 dalek doc: Use .perl instead of dd
00:05 dalek doc: review: https://github.com/perl6/doc/commit/9eabdc2e8d
00:05 dalek doc: b9edd20 | titsuki++ | doc/Type/ (2 files):
00:05 dalek doc: Merge pull request #1079 from titsuki/use-perl-instead-of-dd
00:05 dalek doc:
00:05 dalek doc: Use .perl instead of dd
00:05 dalek doc: review: https://github.com/perl6/doc/commit/b9edd20f8e
00:06 notviki titsuki++
00:09 AlexDaniel oh, there are two posts for 24 now, cool :)
00:12 samcv do we have to be done with advent or can I make an advent
00:13 samcv it always ends today right?
00:15 notviki In the past, yeah, it ended on 24ths. You can always post a post on blogs.perl.org or perl6.party or any other blog
00:20 samcv kk
00:20 AlexDaniel awww, that could've been a nice post
00:21 floutenvy joined #perl6
00:22 samcv hanukkah is not over yet tho ;)
00:24 notviki samcv: I think you've missed a plan bump in uniprop.t
00:24 samcv oh
00:24 samcv k fixing
00:27 mr_ron m: dd $(3, 5, 7) ; dd $[3, 5, 7]
00:27 camelia rakudo-moar 38ec79: OUTPUT«$(3, 5, 7)␤$[3, 5, 7]␤»
00:27 bjz joined #perl6
00:27 mr_ron what is the difference between the two results and why did item documentation choose $[ ?
00:29 notviki one is a list the other is an array
00:29 floutenvy joined #perl6
00:29 mr_ron m: say $(1, 2, 3) ~~ item(1, 2, 3)
00:29 camelia rakudo-moar 38ec79: OUTPUT«True␤»
00:31 mr_ron why does the item documentation do scalar/item of an array?  would a list have been as good a choice?  Isn't [] an array reference and a scalar anyway if there is a difference between array and array ref in p6?
00:32 notviki There are no references in Perl 6.
00:32 notviki Array is just a mutable List.
00:34 mr_ron If there is no ref what is item doing to the array in item([]) ?
00:35 notviki Itemizes it
00:35 notviki m: for [<a b c>] { say "|$_|" }
00:35 camelia rakudo-moar 38ec79: OUTPUT«|a|␤|b|␤|c|␤»
00:35 notviki m: for item [<a b c>] { say "|$_|" }
00:35 camelia rakudo-moar 38ec79: OUTPUT«|a b c|␤»
00:37 mr_ron m: for item $(1, 3, 5) { say "|$_|" }
00:37 camelia rakudo-moar 38ec79: OUTPUT«|1 3 5|␤»
00:38 mr_ron Seems like sort of an inverse of flat (but not quite sure what I'm talking about)
00:39 rightfold m: my @a = (1,2; 3,4); say @a.perl;
00:39 camelia rakudo-moar 38ec79: OUTPUT«[(1, 2), (3, 4)]␤»
00:39 rightfold > Assigning Lists of Lists to @-sigiled variables does not provide the same shortcut. In this case the outer List becomes the first element of the Array.
00:40 rightfold Is this doc incorrect? ^
00:44 notviki It would be more helpful if we had context.
00:44 notviki What shortcut?
00:46 rightfold Right :-)
00:46 dataangel joined #perl6
00:46 rightfold https://docs.perl6.org/language/list#The_@_sigil
00:47 notviki No idea what it's talking about.
00:48 notviki What shortcut?
00:48 dataangel joined #perl6
00:48 notviki :S
00:48 notviki m: my @a = (1,2; 3,4); dd @a
00:48 camelia rakudo-moar 38ec79: OUTPUT«Array @a = [(1, 2), (3, 4)]␤»
00:48 notviki the "outer list" is not first item in the aray
00:48 notviki It's possible that was written pre-GLR
00:48 notviki committable6: 2015.07 m: my @a = (1,2; 3,4); dd @a
00:48 committable6 notviki, ¦«2015.07»: @a = [1, 2; 3, 4]<>
00:48 * notviki shrugs
00:49 notviki rightfold: yes, seems wrong.
00:49 notviki rightfold: you can fix it in this file :) https://github.com/perl6/doc/blo​b/master/doc/Language/list.pod6
00:49 rightfold yay
00:50 mr_ron Maybe not that important but it looks like $([1, 2, 3]) examples could be golfed to $(1, 2, 3) ...
00:50 mr_ron Not same operation but explains same idea
00:53 AlexDaniel notviki: fwiw, pre-glr tag can also be used
00:53 notviki cool
00:53 AlexDaniel committable6: pre-glr my @a = (1,2; 3,4); dd @a
00:53 committable6 AlexDaniel, ¦«pre-glr»: @a = [1, 2; 3, 4]<>
00:55 rightfold Should I write CONSTANT-NAME or CONSTANT_NAME?
00:55 notviki heh
00:56 notviki c'mon, we're not python ;)
00:56 notviki In Perl, you can do it any way you like :)
00:57 floutenvy joined #perl6
00:57 mr_ron m: for $(1, 3, 5).item { say "|$_|" }; for $(1, 3, 5).item.flat { say "|$_|" }; for flat($(1, 3, 5).item) { say "|$_|" }
00:57 camelia rakudo-moar c498d5: OUTPUT«|1 3 5|␤|1|␤|3|␤|5|␤|1 3 5|␤»
00:58 aborazmeh joined #perl6
00:58 aborazmeh joined #perl6
01:01 AlexDaniel rightfold: CONSTANT-NAME looks nicer though
01:01 mr_ron "There are no references in p6" https://docs.perl6.org/language/​5to6-nutshell#Reference_creation
01:02 * notviki rolls eyes at that paragraph
01:03 * notviki reads the "Dereferencing" one and fetches the flamethrower
01:03 floutenvy joined #perl6
01:05 mr_ron If you get to enlightening me(us?) on the docs ... have started watching docs on GitHub
01:06 notviki mr_ron: well, you're free to think we have refernces and use idiotic, superfluous syntax to satisfy a flawed paradigm :)
01:07 notviki m: my @aaa = ^10; my $aref = @aaa; say $aref[2]
01:07 camelia rakudo-moar c498d5: OUTPUT«2␤»
01:07 notviki None of that "reference" crap and it still works is my enlightenment :)
01:09 djbkd joined #perl6
01:13 mr_ron I came across item context looking at S04-blocks-and-statements/temp.t in roast and wondered about it.  Also wondering if your for item() example might be helpful explanation in item docs.
01:16 notviki mr_ron: I created an issue: https://github.com/perl6/doc/issues/1081
01:17 mr_ron notviki: thanks
01:18 notviki And the only time I recall needing an item is when telling a set to use a list as one key instead of a slice.
01:18 notviki So I'd say it's not that important piece of equipment.
01:19 notviki m: dd elems set $<a b c>
01:19 camelia rakudo-moar c498d5: OUTPUT«1␤»
01:19 notviki m: dd elems set <a b c>
01:19 camelia rakudo-moar c498d5: OUTPUT«3␤»
01:21 mr_ron m: dd elems set <a b c>.item; dd elems set <a b c>.item.flat
01:21 camelia rakudo-moar c498d5: OUTPUT«1␤3␤»
01:22 mr_ron looks again like a sort of inverse of flat but not all syntax seems to work.  Is inverse of flat sort of the idea?
01:28 dalek doc: 39f4221 | (Zoffix Znet)++ | doc/Type/Any.pod6:
01:28 dalek doc: Don't reinvent the wheel in .flat example
01:28 dalek doc: review: https://github.com/perl6/doc/commit/39f4221cef
01:28 synopsebot6 Link: http://doc.perl6.org/type/Any
01:30 notviki mr_ron: I think the idea is more of: item−when used with things that contains other things−is to talk about that thing itself rather than the things in it
01:30 notviki mr_ron: that's my understanding of it, but I don't know much. I suspect reading docs about contains would shed some light
01:30 notviki *docs about containers
01:48 cognominal joined #perl6
01:50 ugexe hmmm, the advent snowfall.p6 example just gives me a blank screen. And everything else in Terminal::Print's examples/ segfaults
01:54 notviki :(
01:56 rightfold Where are the advent posts?
01:58 notviki rightfold: https://perl6advent.wordpress.com
01:59 rightfold Thanks
02:02 rmothe joined #perl6
02:02 rmothe algum brasileiro?
02:03 rmothe quit
02:28 itcharlie_linux joined #perl6
02:28 notviki Infelizmente não
02:28 Ben_Goldberg joined #perl6
02:29 Rawriful joined #perl6
02:30 cyphase joined #perl6
02:35 BenGoldberg joined #perl6
02:41 mspo joined #perl6
02:46 cyphase joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:52 aborazmeh joined #perl6
02:52 aborazmeh joined #perl6
03:06 itcharlie_linux left #perl6
03:24 kyan joined #perl6
03:41 kyan joined #perl6
03:47 kyan joined #perl6
03:54 noganex_ joined #perl6
03:57 kyan joined #perl6
03:57 skids joined #perl6
04:02 kaare_ joined #perl6
04:10 pyrimidine joined #perl6
04:19 MasterDukeLaptop joined #perl6
04:37 aborazmeh joined #perl6
04:37 aborazmeh joined #perl6
04:37 Rawriful joined #perl6
04:38 BenGoldberg joined #perl6
04:59 aborazmeh joined #perl6
04:59 aborazmeh joined #perl6
05:15 notviki How can I introspect a thing in NQP? I need to know what methods I can call on a QAST::Var
05:18 Cabanossi joined #perl6
05:37 cyphase joined #perl6
05:43 samcv http://shapecatcher.com/
05:43 samcv this is really cool. you can draw unicode chars and it'll find closely matching ones
06:20 TimToady joined #perl6
06:29 pyrimidi_ joined #perl6
06:37 samcv sweet. I just fixed MoarVM so Bidi_Matching_Bracket and Bidi_Mirroring_Glyph work!
06:49 samcv sweet PR sent https://github.com/MoarVM/MoarVM/pull/468
06:50 samcv notviki, if you find out, let me know as well
06:58 Rawriful joined #perl6
07:02 darutoko joined #perl6
07:11 samcv Bidi_Paired_Brackets are derived as follows: two characters, A and B,
07:11 samcv # form a bracket pair if A has gc=Ps and B has gc=Pe, both have bc=ON and
07:11 samcv # Bidi_M=Y, and bmg of A is B. Bidi_Paired_Bracket (bpb) maps A to B and
07:11 samcv # vice versa, and their Bidi_Paired_Bracket_Type (bpt) property values are
07:11 samcv # Open (o) and Close (c), respectively.
07:12 CIAvash joined #perl6
07:12 samcv interesting. They have a file with all of them, but it's cool they're basically derived from other properties, and even says how you can optimize finding matching brackets based on other properties. this is relevant to me :)
07:27 aborazmeh joined #perl6
07:27 aborazmeh joined #perl6
07:36 wamba joined #perl6
07:39 toolforger joined #perl6
07:43 floutenvy joined #perl6
07:50 toolforger Happy holidays everyone
07:50 samcv happy holidays :)
07:50 toolforger MasterDuke, are you there?
07:53 floutenvy joined #perl6
08:02 toolforger Totally different question: What places do you find the name of a Perl module in?
08:02 samcv there's a file i believe that stores them
08:02 samcv not sure which it is though…
08:03 toolforger I was aiming more at the technical level
08:03 toolforger I.e. there's modulename.pm
08:03 toolforger I think it's also declaring its name in code, is that right?
08:04 bjz joined #perl6
08:05 samcv it can… but doesn't have to
08:05 samcv my modules do not do this. though maybe they should …
08:05 toolforger :-)
08:05 samcv that's not where it gets them from though. well it looks in directories for them if in the path it wants to look
08:06 samcv but there's the hashed modules and then it looks up the names/authors/versions in said file i specified
08:06 samcv and the file puts hashes to the author/modulename etc what it provides
08:08 toolforger Is the module namespace hierarchical? I.e. can a module have submodules?
08:09 toolforger (Seems they can, just trying to confirm vague description-by-example docs)
08:11 toolforger Ah. I just found out what the package keyword does.
08:11 samcv uhm yeah they can
08:12 samcv watch out for reverse uh something something
08:12 samcv i think it gets the methods from the lowest on the chain package
08:12 samcv maybe. something. idk
08:12 samcv maybe that's just objects
08:12 toolforger "reverse uh"?
08:12 samcv ignore what I just said :) i probably have no clue what i mean
08:12 * toolforger is even more clueless
08:13 samcv maybe that's BUILD
08:13 samcv BUILDALL walks all subclasses in reverse method resolution order (i.e. from Mu to most derived classes) and in each class checks for existence of a method named BUILD. If
08:13 samcv yeah ignore what i said :P
08:13 toolforger No problem
08:13 toolforger I'm just trying to find out a bit more about Perl packages in general
08:13 domidumont joined #perl6
08:15 toolforger I guess if @INC contains two directories with the same module, the program will ever see only one of them, right?
08:16 samcv well it goes in the order it is supposed to
08:16 samcv i would read the design.perl6.org for specifics on the order
08:17 samcv m: my %hash; %hash<Emoji><type>              = 'B';
08:17 camelia rakudo-moar a6c37a: ( no output )
08:17 samcv hmm wtf
08:18 toolforger I just wanted to be sure that no two modules with the same name can exist inside a running program :-)
08:18 domidumont joined #perl6
08:18 samcv no they can though. but. they have to probably have different versions or aauthors
08:19 samcv there was a advent post on this i think
08:19 toolforger I guess if you put modules with the same into two different directories in the search path, you still get only one of them
08:20 toolforger Or can a program still access both if they have different author and/or version?
08:20 samcv yeah that is true
08:20 samcv if you include them by that yeah
08:20 samcv ye
08:21 samcv though… they probably have to set author in the file if it's not installed and just in a folder
08:22 * toolforger is starting to read anything that says "module" in its title on design.perl6.org
08:23 samcv heh
08:23 toolforger Christmas reading :-D
08:23 samcv that's usually my goto thing to read if I can't find enough nitty gritty in the docs
08:23 * toolforger has been reading Language Reference Manuals for a few decades now
08:28 toolforger Synopsis 11 draws a sharp distinction between _modules_ and _repositories_. The latter may contain multiple versions of the former. Now I "just" have to find out whether a repository has a run-time representation, and whether it allows loading multiple module versions at the same time...
08:29 samcv well it does
08:29 samcv at of like
08:29 samcv moar-blead of half a week ago or something
08:29 samcv paging nine
08:33 * toolforger just found a reference to S22
08:35 samcv "In the original Space Invaders the level got faster as you killed more aliens. This was actually not by design but a by product of the graphics rendering being processor limited. As fewer elements were shown on screen the rendering got faster."
08:35 samcv heh
08:36 samcv this one is even better though:
08:36 samcv This is from an anecdote by Ken Demarest, one of the original developers who worked on Wing Commander I on the PC...
08:36 samcv ... we were getting an exception from our EMM386 memory manager when we exited the game. We'd clear the screen and a single line would print out, something like "EMM386 Memory manager error. Blah blah blah." We had to ship ASAP. So I hex edited the error in the memory manager itself to read "Thank you for playing Wing Commander!"
08:36 samcv Genius
08:37 toolforger Luckily, nobody ever had to maintain it...
08:37 samcv instead of MoarVM errors it should just say "Thank you for using Perl 6!"
08:38 samcv "Your trial has expired. Please visit perl6.org to purchase!"
08:38 toolforger Cha-chingggg! $$$
08:38 toolforger Actually that would be self-regulating
08:38 samcv yeah
08:38 samcv hahaha
08:39 toolforger more errors -> more money to fix them
08:39 toolforger money decreases as errors get fixed
08:39 toolforger Now how to prevent coders from adding errors to make more money...
08:39 * toolforger thinks he just discovered the business model of some software companies
08:41 samcv would still be nice to put "Thank you for using Perl 6" at the end of a moarvm crash lol
08:41 rindolf joined #perl6
08:41 samcv at least rakudo is more apologetic
08:41 samcv SORRY!
08:42 toolforger I wouldn't want the thankyou message though
08:42 samcv yeah i guess.
08:42 toolforger It's just like "Your program has crashed, your data lost. [OK]"
08:42 samcv true. but would be nice if it was more polite when crashing
08:43 toolforger I can't say anything about that. I'm a developer, I don't care about programs pretending to be friendly humans, because I know too well it's fake.
08:43 samcv hah
08:43 toolforger So I just ignore the "fluff" and dig right to the technical parts of the message
08:44 samcv yah but the human mind can easily just skip over unimportant stuff
08:44 toolforger true
08:44 toolforger though I found that SORRY annoying, it is visually distracting from what I really want to read
08:44 toolforger Maybe it should be lowercase, and less standout around it
08:45 toolforger but that's just my personal preference
08:47 samcv yeah it would be nice if it were titlecase
08:47 samcv Sorry!
08:47 samcv though maybe it's made to seem like an error
08:48 samcv u: square
08:48 unicodable6 samcv, U+005B LEFT SQUARE BRACKET [Ps] ([)
08:48 unicodable6 samcv, U+005D RIGHT SQUARE BRACKET [Pe] (])
08:48 unicodable6 samcv, U+033B COMBINING SQUARE BELOW [Mn] (◌̻)
08:48 unicodable6 samcv, https://gist.github.com/7206​52c58ca12857bcf4219e134d740f
08:48 samcv oh yes what i was doing. adding more unicode props to moar
08:48 toolforger 504 results...
08:48 samcv will be my christmas present to myself and all perl 6
08:49 toolforger Yeah, Unicode properties are really important
08:52 toolforger They guide all the algorithms, and it's the algorithms that make Unicode usable
08:52 samcv oh sweet. i see the problem with our Line Break property
08:52 samcv should be able to get it passing the 4 unicode 9 tests we are failing for this one thing
08:52 samcv for detecting grapheme count
08:52 samcv :D
08:52 toolforger I was somewhat surprised that Perl6 was doing its own grapheme definition
08:53 toolforger That's a pretty risky move
08:53 samcv is it though?
08:53 toolforger Yeah
08:53 samcv tell me since I don't know that we do…
08:53 samcv isn't char's graphemes?
08:53 toolforger I think so
08:53 samcv *chars
08:53 samcv yeah…
08:53 samcv well at least it passes all but 4 of the unicode provided tests for this one thing
08:54 samcv and hopefully maybe will fix another 50/750 on the other new test i added from unicode 9
08:54 * samcv crosses fingers
08:54 toolforger Issue is that future modifications of Unicode may make it harder to properly implement graphemes
08:54 samcv why would that be?
08:54 samcv do we know this might happen?
08:54 toolforger It's more a gut feeling on my side
08:54 toolforger and some historic knowledge about what has changed in Unicode and what hasn't
08:55 toolforger I.e. they might have to introduce something radically new in normalization forms to deal with some corner case in Cuneiform, or whatever
08:56 toolforger Perl6' graphemes might lose some of the guarantees they were built for, so they might become pointless
08:57 toolforger I foresee the debate raging between "but... uh... it's not correct" and "who cares about Cuneiform" camps
08:57 samcv just count it as unicode defined graphemes
08:57 samcv idki
08:57 samcv i mean there's already plenty of scripts that we define in graphemes that are are composed of many things
08:58 toolforger I'm not sure myself, I probably missed a lot of what the purposes graphemes were designed for
08:58 toolforger s/what//
08:58 samcv m: 0x00A7.uniprop('Line_Break').say
08:58 camelia rakudo-moar a6c37a: OUTPUT«BK␤»
08:58 samcv eeeekkkkkk
08:58 samcv makes me so sad that is wtrong too
08:59 samcv there's so many wrong. i just hope this doesn't break any spectests if we are doing anything weird
08:59 samcv when these all get fixed
09:00 samcv not sure why the generation script only specifies certain ones, i think they were forgotten
09:00 cyphase joined #perl6
09:00 samcv that is not good at all though.
09:00 samcv only specifies like 3/5 of them
09:00 samcv so all the rest get the default of BK
09:01 toolforger Shouldn't the generation script simply be reading the Unicode character database files?
09:01 samcv agreed. but this one has its own routine
09:02 samcv and it has ones specified. i don't know i did not write it
09:02 toolforger Yay for code that doesn't document its purpose :-(
09:02 samcv but it makes so much sense why it wasn't passing 1/10 of the tests for 9.0
09:02 samcv well no its documented. idk the function is called LineBreak
09:02 samcv haha
09:03 samcv let me see what happens if i just generate it the same way all the other ones are generated. in theory it should probably work
09:03 toolforger fun times :-D
09:03 samcv idk it may have been coded before the other functions were
09:03 samcv maybe should check git blame
09:04 toolforger just my thinking
09:04 samcv see how long ago it was
09:04 samcv in 2012 :D
09:04 samcv !!!!!!!!
09:04 * samcv makes a note to go through and check all the functions written that long ago
09:05 toolforger omg
09:05 samcv !!!!!!!!!!!!!!
09:06 * samcv cries in the corner
09:06 * toolforger plays "losing my religion"
09:06 toolforger "I know I said too much / I haven't said enough"
09:06 toolforger "that's me in the corner"
09:07 samcv ^
09:07 samcv it's as old as travis ci's ubuntu!
09:08 samcv well not ours since i updated it to 14.04
09:08 samcv at least for rakudo
09:09 samcv only 19/151 failed tests now :)
09:09 samcv down from like 39 fails (for uniprop)
09:09 samcv i am so happy now
09:09 toolforger Oh. "Losing my religion" is southern states slang for "losing my temper".
09:09 toolforger Well, that fits even better :-)
09:10 toolforger Now the interesting part: are the tests failing that didn't fail before?
09:10 toolforger s/the/there/
09:10 samcv well i will need to run spectest
09:10 samcv well for uniprop at least, just calling that routine
09:10 pierre_ joined #perl6
09:11 samcv gonna run the whole suite now
09:12 toolforger New failures outside of uniprop are likely workarounds now failing
09:12 samcv yeah
09:12 samcv or incorrect tests. or something the generalized function does that this doesn't but
09:12 toolforger So that's "just work", not an indicator that switching to tables was a bad idea
09:12 samcv i think it should be fine based on reading the code but. i don't know how half of it works
09:13 samcv tables?
09:13 toolforger character database
09:13 toolforger well, "database", it's just text files after all
09:13 samcv uhm it works fine
09:13 samcv the problem was just the script used to create moar's thingy
09:13 toolforger in tabular form, that's why I misnamed them "tables"
09:13 samcv the c file with all the things
09:13 samcv ah
09:14 samcv no that's fine, it works pretty well
09:14 toolforger sweet
09:14 samcv but doesn't work good if you hard code in the list of possible values…
09:14 samcv and set anything not those to BK
09:14 dalek gtk-simple: a403ec7 | (Richard Hainsworth)++ | / (6 files):
09:14 dalek gtk-simple: Merge pull request #1 from perl6/master
09:14 dalek gtk-simple:
09:14 dalek gtk-simple: merge to master
09:14 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/a403ec7de9
09:14 dalek gtk-simple: 949481f | finanalyst++ | / (2 files):
09:14 dalek gtk-simple: Adding a Pane Widget
09:14 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/949481f508
09:14 dalek gtk-simple: 92c6efd | finanalyst++ | / (5 files):
09:14 dalek gtk-simple: updating
09:14 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/92c6efd0d2
09:14 dalek gtk-simple: 3a44f5f | (Richard Hainsworth)++ | / (7 files):
09:14 dalek gtk-simple: Merge pull request #70 from finanalyst/master
09:14 dalek gtk-simple:
09:14 dalek gtk-simple: update
09:14 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/3a44f5ffa2
09:14 samcv for the Line_Break property (╯°□°)╯︵ ┻━┻
09:15 samcv how do you like these tables
09:16 toolforger They are Unicode's Single Source of Truth, so I'd stick with them as far as humanly possible
09:16 samcv no the tables are fine. just. the script makes me mad. the tables are not bad at all
09:16 samcv except some of them could use like annotation of them at the top. but i think the reason unicode didn't for some is because they didn't before
09:16 samcv (have any comments at all))
09:17 samcv like unidata.txt has no lines except data
09:17 toolforger Essentially the tables are just data, their usage is in the algorithms
09:17 samcv and i don't think any comments
09:17 samcv yeah and some are derived but there's separate files for them anyway, which is probably good
09:17 samcv on both counts
09:18 toolforger I'm not sure whether one should use the pregenerated dependent tables, or just download them from unicode.org
09:18 samcv wait what. pregenerated?
09:18 toolforger a.k.a. derived
09:18 samcv well that's from unicode.org
09:18 samcv Bidi_Paired_Brackets are derived as follows: two characters, A and B,
09:18 samcv <samcv> # form a bracket pair if A has gc=Ps and B has gc=Pe, both have bc=ON and
09:18 samcv <samcv> # Bidi_M=Y, and bmg of A is B. Bidi_Paired_Bracket (bpb) maps A to B and
09:18 samcv <samcv> # vice versa, and their Bidi_Paired_Bracket_Type (bpt) property values are
09:18 samcv <samcv> # Open (o) and Close (c), respectively.
09:19 samcv for example. but it has its own file
09:19 toolforger Generating on your own swaps the Unicode consortium's mistakes in the generation process with your own, not sure whether that's a good or a bad trade
09:20 toolforger Probably better to leave it to unicode.org though. They have more attention span left for issues with that.
09:20 samcv well i like to think that they probably did it right
09:20 * toolforger nods
09:20 samcv since the files are cannon. but i mean if it's derived then there could be errors
09:21 samcv because the values in that file definitive values are based on their rules. but if there's an error in a non-derived property then that's not an error. it's a mistake i guess
09:21 toolforger Anyway.
09:21 toolforger The usage of the data is explained in the Technical Reports that unicode.org carries
09:22 samcv yeah. i wish the technical reports were in their ftp
09:22 samcv if they are i didn't find them
09:22 samcv well. some are. not all
09:22 toolforger I tend to download them via HTTP
09:22 toolforger also the annexes
09:23 toolforger E.g. UAX #9 details bidi
09:23 samcv yeah
09:23 toolforger that also defines how to interpret the bidi data files, so you don't need extra commentary on the bidi data
09:24 toolforger I've been thinking that's the way it is for all data files
09:25 cibs joined #perl6
09:27 dalek gtk-simple/revert-70-master: 5b0a16a | (Richard Hainsworth)++ | / (7 files):
09:27 dalek gtk-simple/revert-70-master: Revert "update"
09:27 dalek gtk-simple/revert-70-master: review: https://github.com/perl6/gt​k-simple/commit/5b0a16a86c
09:28 dalek gtk-simple: 5b0a16a | (Richard Hainsworth)++ | / (7 files):
09:28 dalek gtk-simple: Revert "update"
09:28 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/5b0a16a86c
09:28 dalek gtk-simple: 0f3b51e | (Richard Hainsworth)++ | / (7 files):
09:28 dalek gtk-simple: Merge pull request #71 from perl6/revert-70-master
09:28 dalek gtk-simple:
09:28 dalek gtk-simple: Revert "update"
09:28 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/0f3b51e7e8
09:30 samcv well so far it's passing all the spectests :)
09:31 samcv almost done
09:32 toolforger Argh. Perl really got the multi dispatch wrong. In the sense that adding another module may change MD resolution for modules that are unaware of that module.
09:39 samcv that sounds such a pain
09:39 samcv gonna add in East_Asian_Width property too now
09:39 samcv that is a useful one
09:39 toolforger spectest passed?
09:39 toolforger s/spectest/spectests/
09:39 samcv yep :)
09:39 toolforger :-):-):-)
09:39 samcv deleted that 2012 code
09:39 samcv and it felt good
09:40 toolforger :-D
09:40 ufobat joined #perl6
09:41 samcv east asian width working now too :) as of 30 secs ago
09:44 TEttinger nice
09:46 toolforger Oh. A12 says "we want to be able to run different versions of the Frog module simultaneously"
09:48 samcv who would not want multiple frogs
09:48 toolforger And it's unclear whether he really means classes or modules, the terminology changes within the paragraph.
09:48 samcv modules are classes though
09:48 samcv but i am sure the wording is poor as well
09:49 samcv ;)
09:49 toolforger I can understand that
09:49 toolforger It's an Apocalypse anyway, I still have to read the Exegesis and the Synopses
09:50 toolforger fortunately A12 insists that version and author information be available as metadata, so there's hope
09:50 toolforger Plus, it's Perl, so there's always hope that SOMEBODY thought about any problem you see :-)
09:51 samcv ^
09:51 samcv it makes me sad. i saw pythons list of unicode properties it supports with the unicode whatever pluginmodulewhatever
09:51 samcv and it was so short
09:51 samcv and i almost cried
09:52 samcv though there probably are more extra modules whatever, but i think all unicode props MINIMUM the ones in the UCD should be in any modern language
09:52 toolforger Python seems to be attracting people with not enough knowledge about module design and guarantees
09:53 toolforger Stuff like "no globals", "specify a contract", "no hidden contract clauses" etc. are routinely violated
09:55 toolforger The language itself is a surprising mix: pretty neat overall, but some glaring design mistakes
09:56 bjz joined #perl6
09:59 toolforger Phew. A16 done. I just skimmed most of it, but I need a break :-)
10:00 toolforger seeya!
10:00 toolforger left #perl6
10:00 samcv kk!
10:01 Tonik joined #perl6
10:13 samcv now to add in the Unicode_1_Name property. kewl
10:18 samcv don't think i'm going to add the UNicode 1 name until this PR gets accepted though
10:18 samcv i am done for tonight though! all of them now pass except the NFK NFC weird ones that we prolly alrady have in MoarVM but just don't expose it in moar, so very productive day
10:18 samcv night all
10:18 ufobat hi :-) little zef question, i think that if zef has someting in the LocalCache it takes a module from there instead of querying github. how can i "force" to take it from github or how can I delete the cache
10:19 ufobat when installing Data::Dump zef takes a probably older version from its localcache, i think
10:21 RabidGravy joined #perl6
10:24 Bluebell_ joined #perl6
10:24 puffyfluff joined #perl6
10:29 bjz joined #perl6
10:29 ufobat i did probably something stupid but removing $HOME/.zef/* helped
10:34 RabidGravy removing things is always the solution
10:51 espadrine joined #perl6
10:57 bjz joined #perl6
11:08 ufobat joined #perl6
11:30 bjz joined #perl6
11:37 pmurias joined #perl6
11:38 TimToady joined #perl6
11:43 rburkholder joined #perl6
12:13 Tonik joined #perl6
12:13 Bluebell_ left #perl6
12:13 bjz_ joined #perl6
12:17 TEttinger joined #perl6
12:21 bjz joined #perl6
12:46 AlexDaniel joined #perl6
12:50 ufobat joined #perl6
12:51 dalek doc: cab78cb | gfldex++ | doc/Language/typesystem.pod6:
12:51 dalek doc: doc parameters for roles
12:51 dalek doc: review: https://github.com/perl6/doc/commit/cab78cbb20
12:51 dalek doc: f7eeb52 | gfldex++ | doc/Language/typesystem.pod6:
12:51 dalek doc: we call them parameters these days and we indent examples with 4 spaces
12:51 synopsebot6 Link: http://doc.perl6.org/language/typesystem
12:51 synopsebot6 Link: http://doc.perl6.org/language/typesystem
12:51 dalek doc: review: https://github.com/perl6/doc/commit/f7eeb52190
12:52 gfldex I'm docing things because I cant move. Merry Christmas to all of you and don't eat as much as I did.
12:55 rightfold But I'm hungry!
12:55 AlexDaniel .oO( maybe we can start feeding people forcibly… :) )
12:56 tbrowder Merry Christmas, #perl6!
12:56 rightfold $food ==> &rightfold
12:57 tbrowder And Happy Birthday, Perl 6!
12:57 ufobat does stuff like this make sense in a way? class F { has $*foo } or class F { my @.bar } I just did "my" instead of "has" and i was wondering why it isnt a error
12:58 AlexDaniel my is not an attribute, so it's 「my @bar」
12:58 AlexDaniel m: class Foo { my $x; method z { say $x++ } }; Foo.new.z; Foo.new.z
12:58 camelia rakudo-moar a6c37a: OUTPUT«0␤1␤»
12:59 AlexDaniel and it makes sense, ya
13:00 ufobat but when i am writing my with twigil?
13:04 ufobat shouldn't has require ! or . as twigil and my allow just the others?
13:05 gfldex ufobat: no because a class is also a package
13:05 notviki ufobat: my @.foo is a class attribute
13:06 gfldex m: class C { my $.bar }; say C.^methods
13:06 camelia rakudo-moar a6c37a: OUTPUT«(bar)␤»
13:06 gfldex the . twigil will create an accessor method
13:06 ufobat so in classes my is more or less the same as has?
13:06 notviki ufobat: errr, no
13:06 notviki ufobat: has $.foo is an instance attribute and my $.foo is a class attribute
13:07 ufobat ah
13:07 ufobat and what about class F {has $*foo}?
13:07 AlexDaniel ufobat: I think has $f defaults to has $!f
13:07 AlexDaniel m: class Foo { my $x; method z { say $!x } }; say Foo.new.x
13:07 camelia rakudo-moar a6c37a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Attribute $!x not declared in class Foo␤at <tmp>:1␤------> 3lass Foo { my $x; method z { say $!x } }7⏏5; say Foo.new.x␤    expecting any of:␤        horizontal whitespace␤        postfix␤  …»
13:07 notviki m: class Foo { my $.foo; has $.bar }; my $f1 = Foo.new: :42foo; my $f2 = Foo.new: :72foo; $f1.bar = 'meow'; dd [ .foo, .bar ] for $f1, $f2
13:07 camelia rakudo-moar a6c37a: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at <tmp> line 1␤␤»
13:08 notviki screw you
13:08 notviki m: class Foo { has $.foo; my $.bar }; my $f1 = Foo.new: :42foo; my $f2 = Foo.new: :72foo; $f1.bar = 'meow'; dd [ .foo, .bar ] for $f1, $f2
13:08 camelia rakudo-moar a6c37a: OUTPUT«[42, "meow"]␤[72, "meow"]␤»
13:08 AlexDaniel m: class Foo { has $x; method z { say $!x } }; say Foo.new.x
13:08 camelia rakudo-moar a6c37a: OUTPUT«No such method 'x' for invocant of type 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
13:08 AlexDaniel m: class Foo { has $x; method z { say $!x } }; say Foo.new.z
13:08 camelia rakudo-moar a6c37a: OUTPUT«(Any)␤True␤»
13:08 AlexDaniel yea
13:09 lukaramu joined #perl6
13:10 lukaramu joined #perl6
13:10 ufobat okay, clear so far
13:10 gfldex ufobat: $*-sigiles variables are lookup in the callers-scope. I'm not sure if that makes sense for classes. You may want to query roast to see if that case is tested. If not, it's just an artifact.
13:12 gfldex m: class C { my $*d = 1; method d { $*d } }; C.new.d
13:12 camelia rakudo-moar a6c37a: OUTPUT«Dynamic variable $*d not found␤  in method d at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:13 gfldex do we have introspection for dynamic variables for a package (from outside the package)
13:13 gfldex ?
13:13 gfldex m: class C { our $*d = 1; method d { $*d } }; my $*d = 2; say C.new.d
13:13 camelia rakudo-moar a6c37a: OUTPUT«2␤»
13:27 notviki m: class C { our $*d = 1; method d { $*d } }; my $*d = 2; say C::.keys'
13:27 camelia rakudo-moar a6c37a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3od d { $*d } }; my $*d = 2; say C::.keys7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤     …»
13:27 notviki m: class C { our $*d = 1; method d { $*d } }; my $*d = 2; say C::.keys
13:27 camelia rakudo-moar a6c37a: OUTPUT«($*d)␤»
13:29 Gavs joined #perl6
13:29 Gavs hello
13:31 RabidGravy I suppose I could make a special hack of the parser to allow the Amharic translation of "use" and then https://gist.github.com/jonathansto​we/9e6def365d623504ee8d2fabf210641d would be perfect
13:31 notviki Gavs: hi
13:31 Gavs how is development on Perl6 going?
13:32 notviki Gavs: busy
13:32 RabidGravy it's finished, we're just the cleaners cleaning up after the party ;-)
13:32 notviki Gavs: first production release was released exactly a year ago, if that's what you're asking.
13:32 Gavs oh, nice
13:33 lustlife joined #perl6
13:33 Gavs I just haven't heard about it at all, it's not in the mainstream
13:34 Gavs but, from my experience Perl community is the friendliest, so I thought I'd just try to check it out
13:34 notviki We like to keep a low profile :)
13:34 RabidGravy underground is the best, same for programming languages as music ;-)
13:34 notviki Yeah, we're friendly. I mean, what other community has a hug bot?
13:35 notviki huggable: hug Gavs
13:35 * huggable hugs Gavs
13:35 notviki ^_^
13:35 Gavs haha cute :D
13:36 RabidGravy actually if were to make a module that introduced a slang or macros that has "use" in every known language then the jobs a good un
13:36 Gavs any interesting stuff about v6? something to win other programmers over?
13:37 notviki Gavs: grammars and sane concurency, we'd be my picks
13:37 RabidGravy unicode identifiers, fabulous aynchronous programming
13:37 TEttinger joined #perl6
13:37 notviki *would'd be
13:37 Gavs hmm
13:37 RabidGravy rich object metamodel
13:37 notviki Gavs: Perl 6 parses itself. That's how powerful grammars are.
13:38 Gavs what are grammars about exactly?
13:38 RabidGravy regular expressions on steroids in summary
13:38 notviki Gavs: parsing text
13:38 Gavs ah, I see
13:39 notviki Gavs: you can also do stuff when some rule finishes parsing. Here's a calculator: https://docs.perl6.org/langua​ge/grammars#Creating_Grammars
13:40 notviki And they're classes, so you can mixin roles and subclass them \o/
13:40 Gavs I'm generally retarded in terms of regex and such, but I think I get it
13:41 notviki Gavs: as for concurrency.... I have a short lighning talk I did in a "look, shiny" format: http://perl6.party/post/Perl-6-What​-Programming-In-The-Future-Is-Like
13:41 notviki ( slides at http://tpm2016-2.zoffix.com/ )
13:42 Gavs thank you
13:43 Gavs any notable web stuff? frameworks?
13:43 RabidGravy I think I'm going to fire up a concurrency cookbook in the new year, separate to the workflow/FSM stuff
13:44 notviki Gavs: nope, nothing native. However, we have excellent interop with Perl 5, so you could use Mojolicious, for example (I heard Catalyst works too)
13:44 Gavs oh :/
13:44 RabidGravy It does work I tried it
13:44 notviki Gavs: web is kinda of a weak point for us at the moment, due to performance.
13:44 Gavs perhaps something will come up in the future
13:44 notviki Gavs: and stability.
13:45 notviki Yeah, probably in a year or two.
13:45 Gavs I guess Perl could be quite powerful there
13:46 RabidGravy though Bailador, Crust etc work quite well it's just someone needs to pick these up and run with them
13:46 gfldex I know of 2 CONC bugs that are a blocker for most web stuff. If those are fixed we are ready to rock (IMHO).
13:46 notviki RabidGravy: do they actually? Doesn't Bailador not support concurrent requests or has that been fixed?
13:46 SmokeMachine What's wrong?
13:46 SmokeMachine m: class A is Proxy {has $.val; has &.STORE = method ($v) {$.val = $v}; has &.FETCH = method () {$.val}}; my \a := A.bless; a = 42
13:46 camelia rakudo-moar 8104ff: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at <tmp> line 1␤␤»
13:47 SmokeMachine Shouldn't that work?
13:47 gfldex SmokeMachine: you are trying to subclass a very internal class.
13:47 RabidGravy it would be nice if that worked though
13:47 gfldex the magic of Proxy is hardwired into it's new method
13:48 SmokeMachine :(
13:48 RabidGravy I do use Proxy quite a lot
13:48 gfldex you would have to provide a new method in A that is calling Proxy.new (brain compiled)
13:49 RabidGravy yeah, I'm certain it could be made to work
13:49 SmokeMachine I tried that to...
13:49 gfldex and you will add slowness to you program. Some benchmarking early one may save you headaches.
13:50 SmokeMachine m: class A is Proxy {has $.val; method new {callwith(STORE => method ($v) {$.val = $v}, FETCH = method () {$.val})}}; my \a := A.new; a = 42
13:50 camelia rakudo-moar 8104ff: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix = instead␤at <tmp>:1␤------> 3ORE => method ($v) {$.val = $v}, FETCH =7⏏5 method () {$.val})}}; my \a := A.new; a␤»
13:51 SmokeMachine 11:50 <SmokeMachine> m: class A is Proxy {has $.val; method new {callwith(STORE => method ($v) {$.val = $v}, FETCH => method () {$.val})}}; my \a := A.new; a = 42
13:51 SmokeMachine m: class A is Proxy {has $.val; method new {callwith(STORE => method ($v) {$.val = $v}, FETCH => method () {$.val})}}; my \a := A.new; a = 42
13:51 SmokeMachine Sorry I'm on a mobile...
13:51 camelia rakudo-moar 8104ff: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 131728 bytes␤»
13:54 SmokeMachine m: class A is Proxy {has $.val; method new {samewith(STORE => method ($v) {$.val = $v}, FETCH => method () {$.val})}}; my \a := A.new; a = 42
13:54 camelia rakudo-moar 8104ff: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in method new at <tmp> line 1␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:55 SmokeMachine gfldex: ^^
13:55 SmokeMachine RabidGravy: any idea?
13:57 SmokeMachine RabidGravy: I'm glad you "liked" my advent calendar post, thanks!
13:58 RabidGravy I don't have any particular ideas but I suspect that the constructor of proxy is doing something other than expecting two named arguments
13:59 RabidGravy and I think it's implemented entirely in nqp so I can't find the source right now ;-)
13:59 notviki m: class A is Proxy {has $.val; method new {self.Proxy::new: (STORE => method ($v) {$.val = $v}, FETCH => method () {$.val})}}; my \a := A.new; a = 42
13:59 camelia rakudo-moar 8104ff: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:00 SmokeMachine RabidGravy: https://docs.perl6.org/type/Proxy#method_new
14:00 RabidGravy yeah I think its  Positional[Pair]
14:00 gfldex RabidGravy: src/Perl6/Metamodel/BOOTSTRAP.nqp:1347
14:02 gfldex calling self.Proxy::new would return the wrong type object (Proxy instead of A)
14:03 gfldex Proxy does not provide accessor methods for its attributes called STORE and FETCH. So the author (likely jnthn) didn't want you to fiddle with them.
14:03 moritz so have two advent posts for day 24 :-)
14:03 moritz *we
14:04 gfldex \o/
14:05 gfldex double is twice as good
14:06 SmokeMachine m: class A is Proxy {has $.val; has &!STORE = method ($v) {$.val = $v}; has &!FETCH = method () {$.val}}; my \a := A.bless; a = 42
14:06 camelia rakudo-moar 8104ff: OUTPUT«Cannot invoke this object (REPR: Null; VMNull)␤  in block <unit> at <tmp> line 1␤␤»
14:06 notviki m: class A is Proxy {has $.val; method new {self.bless: STORE => method ($v) {$.val = $v}, FETCH => method () {$.val}}}; my \a := A.new; A = 42
14:06 camelia rakudo-moar 8104ff: OUTPUT«Cannot look up attributes in a A type object␤  in block <unit> at <tmp> line 1␤␤»
14:07 notviki SmokeMachine: what were you trying to do anywhay?
14:08 gfldex The problem is that Proxy isn't using a submethod where it should.
14:08 RabidGravy I'm wondering whether you could actually do it with delegation of some sort
14:08 gfldex SmokeMachine: please file a rakudobug saying: "can't subclass Proxy".
14:09 pyrimidine joined #perl6
14:09 gfldex you an do it functional with hiding the private attributes in a closure.
14:11 SmokeMachine notvick: I'm writing a HTML::Builder... so I'm writing it to use something like: HTML { .version = 5; .BODY += "blablabla"} like the kotlin HTML builder... and on my model tag attributes should be subclass of proxy...
14:11 gfldex m: role C {}; sub postfix:<.new>(C $what){}; C.new
14:11 camelia rakudo-moar 8104ff: ( no output )
14:11 SmokeMachine gfldex: doing that!
14:12 gfldex that way you can make make a sub call look like a method call
14:12 notviki .oO( what could possibly go wrong! )\
14:12 gfldex that's what I am thinking about right now
14:13 gfldex if you mixin that role, things might get wonky
14:14 notviki m: role C {}; sub postfix:<.new>(C $what){}; C.new; 42.new
14:14 camelia rakudo-moar 8104ff: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling postfix:<.new>(Int) will never work with declared signature (C $what)␤at <tmp>:1␤------> 3sub postfix:<.new>(C $what){}; C.new; 427⏏5.new␤»
14:16 pierre_ joined #perl6
14:17 gfldex m: role C {}; multi sub postfix:<.new>(C $what){}; multi sub postfix:<.new>($what, |c){ $what.new(|c) }; C.new; 42.new
14:17 camelia rakudo-moar 8104ff: OUTPUT«(timeout)»
14:18 notviki try using new $what: form
14:18 notviki right now you're just calling the same postfix in infiniloop
14:19 CIAvash joined #perl6
14:19 gfldex m: role C {}; multi sub postfix:<.new>(C $what){}; multi sub postfix:<.new>($what, |c){ $what.^can('new')[0]($what, |c) }; C.new; say 42.new
14:19 camelia rakudo-moar 8104ff: OUTPUT«0␤»
14:20 * moritz has some free time, and doesn't feel at all like hacking or writing
14:20 SmokeMachine gfldex: I linked the log of this conversation, ok?
14:20 gfldex yes
14:20 RabidGravy I was wondering about something similar for an arbitrary thingy maker, I don't now what language it is that allows "foo { bar = 1; zub { .... } }"
14:22 RabidGravy and wondered whether it could be in code rather than a gramma
14:22 SmokeMachine RabidGravy: notviki : https://kotlinlang.org/docs/ref​erence/type-safe-builders.html
14:23 gfldex RabidGravy: looks like sub calls that take a block as it's single argument
14:24 SmokeMachine gfldex: that's how I'm implementing the HTML() function...
14:24 gfldex dude, there is a module for that
14:24 gfldex :->
14:25 gfldex https://github.com/gfldex/p​erl6-typesafe-xhtml-writer
14:25 gfldex i'm cheating tho
14:25 cibs joined #perl6
14:25 gfldex I use the xhtml schema to generate most of the modules code
14:26 RabidGravy nothing cheating about that, that's what machine readable descriptions are for ;-)
14:27 gfldex makes the rest of the code rather ugly
14:27 SmokeMachine gfldex: thanks... throwing all my code on the garbage...
14:27 RabidGravy I started looking at the OpenAPI (née Swagger) thing the other day and concluded that some of the specs around JSON are made of crack
14:29 gfldex For any perl project: 1) check if there is a module, 2) ask on perlmonks which of those 5 modules you should use to have your problem solved, 3) implement as little code yourself as you can because writing good tests is hard
14:29 RabidGravy JSON-Pointer is just like a crap non-obvious implementation of XPath
14:31 gfldex XPath is non-obvious too :->
14:31 espadrine joined #perl6
14:31 RabidGravy I'm with you on 1 or 3, stopped using perlmonks ten years ago
14:32 gfldex I'm hoping we can avoid to replicate the redundancy you can find with Perl 5 modules.
14:32 RabidGravy but I often find a module which is more trouble than it's worth an re-implement the whole thing
14:33 ufobat joined #perl6
14:34 RabidGravy gfldex, the thing is a given problem space may have a number of different solutions, and in Perl 6 that may be more marked as you could do OO, functional or whatever styles
14:35 RabidGravy so I can foresee a proliferation
14:35 gfldex no reason not to put OO and functional into the same module
14:35 gfldex that's what commit bits are fore
14:35 RabidGravy there are no reasons to do it either
14:36 RabidGravy why make code that you don't want to use?
14:36 rightfold Is there a function to replace a file extension, or should I use subst?
14:36 gfldex I wouldn't but I would give somebody a commit bit to do the other part, so long it makes using Perl 6 easier.
14:38 SmokeMachine gfldex: that was more a way to study than a project...
14:39 gfldex SmokeMachine: it resulted in a bug-report. So it's all good.
14:51 notviki m: "foo.txt".IO.&({.parts<basename>.subst: .extension, "doc"; $_}).say
14:51 camelia rakudo-moar 8104ff: OUTPUT«"foo.txt".IO␤»
14:51 moritz what's a file exxtension?
14:51 moritz in foo-1.2.3.tar.gz, is the file extension tar.gz or just gz?
14:51 moritz and doesn't that change whether you talk about using gunzip or tar?
14:51 notviki m: "foo-1.2.3.tar.gz".IO.extension.say
14:51 camelia rakudo-moar 8104ff: OUTPUT«gz␤»
14:51 notviki It's gz! :)
14:51 gfldex file extensions are defined for DOS
14:52 gfldex the convention is 'the last thing behind a dot in a basename'
14:53 gfldex m: "foo.txt.txt".IO.&({.parts<basename>.subst: .extension, "doc"; $_}).say
14:53 camelia rakudo-moar 8104ff: OUTPUT«"foo.txt.txt".IO␤»
14:53 gfldex m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, '')
14:53 camelia rakudo-moar 8104ff: OUTPUT«/foo/bar.buz␤»
14:53 gfldex m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, 'txt')
14:53 camelia rakudo-moar 8104ff: OUTPUT«/foo/bar.buztxt␤»
14:53 gfldex m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, '.txt')
14:53 camelia rakudo-moar 8104ff: OUTPUT«/foo/bar.buz.txt␤»
14:54 rightfold notviki: TIL .&
14:55 rightfold $out.subst(/'.purs'$/, ".purspg").IO works :-)
14:55 notviki m: sub cool { $^z.uc }; "neat".&cool.say
14:55 camelia rakudo-moar 8104ff: OUTPUT«NEAT␤»
15:00 jkaye joined #perl6
15:02 lustlife joined #perl6
15:03 jkaye Is it possible to constraint type captures within roles and/or subs? Essentially I want to be able to say something like `sub test(::SomeType $type) where SomeType <: Concrete:U`
15:04 notviki What's "<:"?
15:04 moritz m: role A[Cool:D ::T] { method t { T } }; say A[42].t
15:04 camelia rakudo-moar 8104ff: OUTPUT«(Int)␤»
15:05 gfldex jkaye: yes, use a subset
15:05 SmokeMachine Shouldn't .extension be rw?
15:05 moritz nope
15:05 gfldex jkaye: see https://docs.perl6.org/langua​ge/typesystem#Role_Parameters
15:06 lustlife camelia:help
15:06 camelia lustlife: Usage: <(nqp-js|prof-m|rakudo-MOAR|nqp-parrot|rakudo​-jvm|std|nqp-jvm|rakudo-moar|nqp-moarvm|niecz​a|debug-cat|star-j|pugs|p5-to-p6|star-m|r-j|r​|P|Pnr|star|rnP|sj|perl6|j|rPn|rm|M|nqp-mvm|p​6|nr|nqp-q|rn|r-m|m|nrP|rj|p56|nqp|rakudo|sm|​r-jvm|nPr|Prn|n|nom|nqp-m)(?^::\s(?!OUTPUT))
15:06 camelia ..$perl6_program>
15:06 moritz uhm, most of those are probably outdated
15:06 moritz p: say 42
15:06 moritz P: say 42
15:06 camelia pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory␤»
15:06 TEttinger ha wow
15:07 TEttinger nrP: say 42
15:07 TEttinger oh
15:07 TEttinger camelia come back!
15:07 RabidGravy bad TEttinger BAD BAD
15:08 moritz M: say 42
15:08 camelia joined #perl6
15:08 TEttinger yay
15:08 TEttinger star-j: say 42
15:09 TEttinger std: say 42
15:09 TEttinger j: say 42
15:09 jkaye gfldex: Excellent! I've been looking for this exact documentation for an hour or so. Thank you
15:09 TEttinger I wonder if I'm ignored
15:09 moritz niecza: say 42
15:09 TEttinger m: say 42
15:09 TEttinger oh crud
15:09 camelia niecza: OUTPUT«Can't chdir to '/home/camelia/niecza': No such file or directory at lib/EvalbotExecuter.pm line 184.␤    EvalbotExecuter::_auto_execute(HASH(0x3905f00), "say 42", GLOB(0x3b7c580), "<tmp>", "niecza") called at lib/EvalbotExecuter.pm line 132␤        EvalbotExecuter::_fork_an…»
15:09 moritz TEttinger: stop flooding it please :-)
15:09 camelia ..rakudo-jvm 8ca367: OUTPUT«42␤»
15:09 camelia ..pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory␤»
15:09 TEttinger woah
15:09 camelia niecza: OUTPUT«Can't chdir to '/home/camelia/niecza': No such file or directory at lib/EvalbotExecuter.pm line 184.␤    EvalbotExecuter::_auto_execute(HASH(0x3905f00), "say 42", GLOB(0x3b7c580), "<tmp>", "niecza") called at lib/EvalbotExecuter.pm line 132␤        EvalbotExecuter::_fork_an…»
15:09 camelia niecza: OUTPUT«Can't chdir to '/home/camelia/niecza': No such file or directory at lib/EvalbotExecuter.pm line 184.␤    EvalbotExecuter::_auto_execute(HASH(0x3905f00), "say 42", GLOB(0x3b7c580), "<tmp>", "niecza") called at lib/EvalbotExecuter.pm line 132␤        EvalbotExecuter::_fork_an…»
15:09 camelia ..rakudo-jvm 8ca367: OUTPUT«42␤»
15:09 moritz TEttinger: after a rejoin, it needs a while to work around its rate limit
15:09 camelia ..rakudo-jvm 8ca367: OUTPUT«42␤»
15:09 camelia ..pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory␤»
15:09 camelia ..pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory␤»
15:10 camelia star-j 2016.10: OUTPUT«(timeout)Can't exec "./bin/perl6-j": No such file or directory at lib/EvalbotExecuter.pm line 206.␤#perl6 <TEttinger> std: say 42␤»
15:10 camelia star-j 2016.10: OUTPUT«No such file or directory»
15:10 camelia std : OUTPUT«No such file or directory»
15:10 camelia niecza : OUTPUT«(timeout)cat: /home/camelia/niecza/VERSION: No such file or directory␤Received line i.freenode.net 352 camelia #learnprogramming ~gucci_meo 112.205.25.245 kornbluth.freenode.net gucci_meow H :0 gucci_meow that is not IRC protocol␤Received line  camelia #perl6-dev…»
15:10 TEttinger uh wha
15:10 moritz nqp-parrot: say(42)
15:10 camelia nqp-parrot: OUTPUT«No such file or directory»
15:10 moritz nqp-json: say(42=
15:10 camelia nqp-parrot: OUTPUT«(timeout)Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 206.␤msg <lustlife> Perl6: sub powers_of ($radix) { $radix \xAB**\xAB [0 ... *] }; say powers_of(2)[^5];␤»
15:11 jkaye gfldex: Do you know if there is a difference between using the type capture constraints vs a signature like this one: `sub getLogger(Str $name, LogEntry:U $logEntryType=JK-LogEntry) returns Logger[$logEntryType]` ?
15:11 TEttinger that's a bit messy
15:11 moritz prof-m: say 42
15:11 camelia prof-m : OUTPUT«No such file or directory»
15:11 camelia .. Prof: http://p.p6c.org/3bb61c3
15:11 jkaye The latter does work which actually surprised me a bit, but it doesn't seem to communicate the intent quite as well
15:11 gfldex jkaye: I would not expect the returns form to work
15:11 TEttinger what is nrP anyway
15:12 camelia prof-m : OUTPUT«(timeout)Can't exec "./rakudo-inst/bin/perl6-m": No such file or directory at lib/EvalbotExecuter.pm line 206.␤cat: /home/camelia/rakudo-inst/revision: No such file or directory␤␤now running scp...␤/tmp/mprof.html: No such file or directory␤»
15:12 camelia .. Prof: http://p.p6c.org/3bb61d9
15:12 jkaye gfldex: Yeah, I was really surprised when it worked
15:12 moritz TEttinger: niecza, rakudo, Pugs
15:12 TEttinger oh wow
15:12 moritz std: say 42
15:12 camelia std : OUTPUT«No such file or directory»
15:12 TEttinger I can see why that crashes it...
15:12 moritz p5-to-p6: print("42\n")
15:12 camelia p5-to-p6 : OUTPUT«# Do not edit this file - Generated by Perlito5 9.021␤␤print('42' ~ chr(10))␤»
15:13 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤#perl6 <moritz> p5-to-p6: print("42\n")␤sh: Perlito: command not found␤»
15:13 TEttinger something seems wrong
15:13 moritz TEttinger: you mean that nobody has maintained that beast in the last two years, except for fixing rakudo-m and star-m when it's broken?
15:14 TEttinger no, I mostly mean there seems to be some mix of input and output in this current session
15:14 TEttinger m: say 42
15:14 camelia rakudo-moar 8104ff: OUTPUT«42␤»
15:14 dalek evalbot: 7dd2944 | moritz++ | evalbot.pl:
15:14 dalek evalbot: Remove some targets that don't work anymore
15:14 dalek evalbot: review: https://github.com/perl6/evalbot/commit/7dd29448ef
15:14 TEttinger hooray
15:15 jkaye gfldex: Huh, the capture constraint actually doesn't work in this case it seems. Or perhaps I am using it wrong. This signature: ` sub getLogger(Str $name, LogEntry:U ::LogEntryType $logEntryType=JK-LogEntry) returns Logger[LogEntryType]` gives me this error: Cannot find method 'ACCEPTS' on object of type LogEntryType
15:15 TEttinger m: say s
15:15 camelia rakudo-moar 8104ff: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    s used at line 1␤␤»
15:15 lustlife hi,i see some code here => http://rosettacode.org/wiki/Hamming_numbers#Perl_6 => sub powers_of ($radix) { 1, |[\*] $radix xx * } . i want to use hyper operator for the same things:  sub powers_of ($radix) { $radix «**« [0 ... *] } ; say powers_of(2)[^10] ; but get an error, anyone can help?
15:15 zakharyas joined #perl6
15:15 gfldex jkaye: please file a bug report
15:16 jkaye gfldex: Sure thing if you think that's actually a bug
15:16 moritz lustlife: what error do you get?
15:16 lustlife m: sub powers_of ($radix) { $radix «**« [0 ... 10] }; say powers_of(2)[^5];
15:16 camelia rakudo-moar 8104ff: OUTPUT«(1 2 4 8 16)␤»
15:16 SmokeMachine Is there any plan to "create" a rakudo to iOS?
15:16 jkaye I'm usually hesitant to think it's misuse :)
15:16 gfldex jkaye: if you get a type object from `my $T = Logger[LogEntryType]`, than it's a bug
15:17 camelia joined #perl6
15:17 lustlife m: sub powers_of ($radix) { $radix «**« [0 ... *] }; say powers_of(2)[^5];
15:18 lustlife moritz: List on right side of hyperop of infix:<**> is known to be infinite
15:18 moritz lustlife: that's because hyperops are eager
15:18 camelia rakudo-moar 8104ff: OUTPUT«List on right side of hyperop of infix:<**> is known to be infinite␤  in sub powers_of at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:18 moritz lustlife: and you can't eagerly evaluate an infinite list
15:18 moritz use X** instead, which is lazy
15:19 notviki moritz: do you know anything about statement_ids on QAST::Vars? (see my Q in #perl6-dev)
15:19 moritz m: say (2 X** (0..*)).head(5)
15:19 camelia rakudo-moar 8104ff: OUTPUT«(1 2 4 8 16)␤»
15:19 moritz M-Illandan: no
15:19 moritz sorry, meant notviki (no)
15:19 notviki aw :(
15:20 moritz notviki: you could look into the git blame, maybe the commit that introduced them gives you some idea
15:20 dalek doc: 8f2fa9f | gfldex++ | doc/Language/typesystem.pod6:
15:20 dalek doc: index role (typesystem)
15:20 dalek doc: review: https://github.com/perl6/doc/commit/8f2fa9fd60
15:20 synopsebot6 Link: http://doc.perl6.org/language/typesystem
15:20 pmurias joined #perl6
15:23 lustlife moritz: thx , it works, learn that hyperops are eager.
15:26 bstamour joined #perl6
15:28 lustlife moritz: how can i know weather
15:30 lustlife moritz: how to know whether an operator is lazy or not?
15:32 TimToady joined #perl6
15:38 jkaye joined #perl6
15:57 bstamour joined #perl6
15:59 pierre_ joined #perl6
16:03 bstamour Happy holidays everyone!
16:05 plicease joined #perl6
16:09 wamba joined #perl6
16:10 notviki Happy!
16:21 tailgate happy jolidays
16:21 espadrine_ joined #perl6
16:22 moritz Merry Christmas!
16:29 RabidGravy መልካም ገና
16:29 tailgate some of those characters need to  become operators
16:31 RabidGravy I wouldn't know how to type any of them unfortunately
16:31 RabidGravy but https://gist.github.com/jonathansto​we/9e6def365d623504ee8d2fabf210641d
16:32 RabidGravy it's a shame I have to have "use" in the script though
16:34 KinkkoPekkonen joined #perl6
16:34 KinkkoPekkonen hey what ide u use?
16:34 RabidGravy ide?
16:34 KinkkoPekkonen every time I come back to perl6 it kinda lacked some nice setup
16:34 KinkkoPekkonen what editor
16:34 KinkkoPekkonen atom?
16:34 KinkkoPekkonen vim?
16:35 KinkkoPekkonen what makes u most comfortable with perl6
16:35 RabidGravy I use vim (or whatever vi like thing thing is around)
16:35 KinkkoPekkonen u compile stuff manually like in next terminal
16:35 notviki I use atom
16:35 bstamour I use emacs. Just like I do for everything else
16:35 RabidGravy can't abide graphical editors
16:36 KinkkoPekkonen is there some addition for atom?
16:36 tailgate are there even perl5 oriented IDEs?
16:36 KinkkoPekkonen usually languages have shiny stuff in vim atom or stuff?
16:36 Ven joined #perl6
16:36 tailgate something like IDEA or eclipse, i mean
16:36 notviki KinkkoPekkonen: there's "language-perl6" to give highlights and I saw some kind of tool-thing too, just searrch for perl6
16:37 notviki tailgate: Pedro or whatever it's called?
16:37 notviki Padre
16:37 KinkkoPekkonen I used one tool padre or what not
16:37 KinkkoPekkonen but it crashed often
16:37 KinkkoPekkonen I don't mind vim or atom
16:37 notviki Yeah, I had the same experience with it
16:37 KinkkoPekkonen I thought some experienced old wolf of perl6 has comfortable workflow going on for him
16:37 KinkkoPekkonen and does not mind sharing
16:37 KinkkoPekkonen or her
16:37 RabidGravy there's some plugin for Eclipse too, but y'know, Eclipse
16:37 notviki There aren't any experienced old wolves. The language is 1 year old
16:38 KinkkoPekkonen we'll it's been developed for nearly a decade
16:38 KinkkoPekkonen :-D
16:38 notviki 15 years isn't nearly a decade ;)
16:38 RabidGravy I just work with code the same as I have been working with code for twenty five years
16:39 notviki KinkkoPekkonen: I just use atom and alt+tab (or ctrl+space on my dual-monitor system) to a terminal, press Up and enter to run
16:39 RabidGravy it doesn't really matter what language it is, it's just text
16:39 KinkkoPekkonen well something really cool is what clojure has that send to repl thing
16:39 notviki we have the repl
16:39 notviki just run `perl6` without any args
16:40 tailgate RabidGravy: I used to write eclipse plugins for a lving, it was insane
16:40 KinkkoPekkonen I guess vim-slime can be used to send region to repl :-D
16:40 KinkkoPekkonen who payed you?
16:40 tailgate IBM
16:40 KinkkoPekkonen nice
16:41 pierre_ joined #perl6
16:41 tailgate eclipse plugins themselves are pretty fun to write, but a lot of the related java tech like EMF is overengineered
16:42 RabidGravy I don't think you need anything special to the perl6 repl from vim, just select a region and then  :<selector>!perl6
16:42 RabidGravy of course writing the outpur to a separate buffer is a new problem
16:43 KinkkoPekkonen I guess you did not see Tim Baldridge doing this trick with clojure in his talks
16:43 pmurias what's the advantage of a repl over 'perl6 short-file'?
16:43 KinkkoPekkonen it's quite nice and comfortable thing
16:43 RabidGravy no
16:43 RabidGravy pmurias, none really
16:43 RabidGravy it just seems to make people happy for some reason
16:44 KinkkoPekkonen it's cool trick you have a file and you select region and send it to repl and it executes in terminal next to vim
16:44 KinkkoPekkonen if you have tmux than it's nice
16:44 tailgate I find it faster, it lets you quickily iterate when you have an idea
16:44 RabidGravy about three lines of vimrc I'd say
16:44 ufobat joined #perl6
16:44 tailgate especially when you are learnign the language
16:45 tailgate I think a short test file makes me context switch in my head
16:46 RabidGravy you know the fun is over when people start talking about editors
16:46 pmurias having a good Perl6 IDE-like support would be fun
16:47 tailgate get big enough and hopefully jetbrains will make a "Perl of great price"
16:47 mst Happy *; # since I've been saying 'happy whatever' everywhere else :D
16:48 pmurias tailgate: I want it in my vim not in intelliJ ;)
16:48 pyrimidine joined #perl6
16:48 tailgate I think vim-perl6 is pretty good
16:48 mst http://72.14.189.113/tmp/feed http://72.14.189.113/tmp/feed.1
16:49 mst ^^ for feeding a chunk of buffer to a repl
16:49 tailgate I need to push up my snippets though
16:49 mst RabidGravy: ^^ maybe or may not be of any use, I can relay comments to the author
16:49 notviki 404s
16:50 RabidGravy mst++
16:50 mst notviki: oh? bah
16:50 mst must've been more tmp-orary than I thought
16:51 mst cocks. I shall request a real URL or provide one myself.
16:54 khw joined #perl6
17:09 tailgate \
17:10 mst RabidGravy: have poked author, will re-link when I have a stable URL
17:11 RabidGravy groovesome
17:12 notviki grusome?
17:13 araujo joined #perl6
17:16 pmurias nqp-m: my $bar := 4;my int $foo2 := $bar || 200;say($foo2);
17:16 camelia nqp-moarvm: OUTPUT«0␤»
17:20 pochi joined #perl6
17:21 b2gills I wrote an evaluator for a made up language for a Code Golf post https://codegolf.stackexchange.com/questions​/104426/maths-metagolf-mania#comment-253845
17:26 skids joined #perl6
17:28 pmurias m: my int $foo = 4; my int $bar = 200; say(($foo || $bar));
17:28 camelia rakudo-moar 1374fc: OUTPUT«1␤»
17:28 pmurias ^^ is that correct?
17:33 gfldex m: my int $foo = 4; my int $bar = 200; say(so ($foo || $bar));
17:33 camelia rakudo-moar 1374fc: OUTPUT«True␤»
17:33 gfldex m: my int $foo = 4; my int $bar = 200; say(so $foo || $bar);
17:33 camelia rakudo-moar 1374fc: OUTPUT«True␤»
17:34 gfldex pmurias: that's a bug
17:35 gfldex m: say so 4;
17:35 camelia rakudo-moar 1374fc: OUTPUT«True␤»
17:42 floutenvy joined #perl6
17:42 lluchs left #perl6
17:46 geekosaur joined #perl6
17:50 notviki RTed https://rt.perl.org/Ticket/Display.html?id=130404
17:53 mst RabidGravy: https://github.com/thrig/scripts/tree/master/misc
17:53 mst RabidGravy: 'feed' in there
17:55 RabidGravy mst, nice one, but it appears to want Tcl, What is this 1995? ;-)
17:56 RabidGravy presumably for expect
17:56 mst RabidGravy: nah, it's straight up Tcl
17:57 RabidGravy I have a USB disco light here and frankly It's all gone a bit 1987
17:58 RabidGravy corr so it is
17:58 RabidGravy proper old skool stylee
17:58 mst I kinda like Tcl, it's like bash bitten by a radioactive lisp
17:59 mst also they shipped an OO system with a MOP in core before we did ;)
18:03 vendethiel joined #perl6
18:03 vendethiel SmokeMachine: had you seen https://github.com/vendethiel/Sixcheck when you wrote Test::Fuzz?
18:05 SmokeMachine vendethiel: no... opening...
18:06 vendethiel I... definitely need to write a README...
18:06 vendethiel I think the test file should tell you what it does in the meantime
18:07 pyrimidine joined #perl6
18:09 pyrimidi_ joined #perl6
18:09 notviki test file for docs.... so pre-Christmas-Perl-6-y :)
18:09 vendethiel yup
18:11 vendethiel I need to get it done, but I got stuck on some stuff while I was writing it.
18:11 vendethiel SmokeMachine: I also wrote an article pretty much on that topic last year: https://perl6advent.wordpress.com/2015/12/19/
18:17 samcv no readme :(
18:18 vendethiel we did establish that :P
18:18 notviki But it doesn't hurt to make you feel extra bad about it ;)
18:20 vendethiel it does, it's just noise :)
18:29 tailgate I want to capture from a sentence (foo|bar \d+) - how do I express foo OR bar followed by \d+ ?
18:29 vendethiel do you want to capture that OR?
18:29 tailgate I'm using (foo|bar \s \d+) but it's not quite right
18:30 tailgate there's no OR in the sentence,
18:30 notviki tailgate: because that's "foo" or "bar followed by stuff"
18:30 vendethiel no, indeed. here, you have either foo, either bar and space and a number
18:30 vendethiel you want to group around that OR as well
18:31 tailgate ((foo|bar) \s \d+)
18:31 notviki Use []
18:31 vendethiel you can do that, but you're gonna capture foo|bar again.
18:31 vendethiel You can use [] in the inner group to not capture them instead.
18:32 vendethiel moritz: perlgeek.de is down?
18:32 tailgate thanks
18:33 vendethiel uh, it seems searching for "run" in docs.perl6 gives out the whole website... mmh.
18:41 notviki vendethiel: what do you mean?
18:41 notviki Looks fine to me: http://i.imgur.com/NYkk1ma.png
18:42 vendethiel seems a bit too much when there's a perfect match :-).
18:42 vendethiel (well volunteered!)
18:42 notviki I think there's a ticket for that
18:46 FROGGS joined #perl6
19:00 culb Merry Christmas.
19:05 notviki Happy Festivus!
19:05 notviki Hanukkah Sameach!
19:09 ufobat joined #perl6
19:09 RabidGravy ACIEEEED!
19:12 mr_ron joined #perl6
19:14 rightfold Leuke kerst
19:15 mr_ron m: use Test; is -2**2 . abs.Str.ord, "4".ord, "on right side . is tighter than methodcall"; # what are they testing here ? which . is tighter than which ? https://github.com/perl6/roast/blob/m​aster/S03-operators/precedence.t#L48
19:15 camelia rakudo-moar 1374fc: OUTPUT«ok 1 - on right side . is tighter than methodcall␤»
19:16 rightfold vendethiel: lol "venndethiel"
19:17 espadrine joined #perl6
19:17 vendethiel rightfold: vendethiel was already taken! and since "venn" means friend it sounded good
19:21 moritz vendethiel: looking into it
19:35 rightfold vendethiel: someone did another post on quickcheck btw recently
19:35 vendethiel rightfold: check out the log from ~7pm
19:35 rightfold oh XD
19:39 rightfold SmokeMachine: have you considered multi sub instead of augment for generate-samples?
19:40 SmokeMachine rightfold: that's a good idea!
19:41 SmokeMachine I'll change it!
19:42 SmokeMachine rightfold: are you reading the master branch? The next version is de role branch...
19:43 rightfold yeah I was
19:43 djbkd joined #perl6
19:44 SmokeMachine rightfold: I think the branch role is a better code...
20:08 pyrimidine joined #perl6
20:09 Xliff What's the best way to do a system level rakudobrew?
20:10 Wanderer68 joined #perl6
20:10 pyrimidine joined #perl6
20:11 mst Xliff: stick it in /usr/local/rakudobrew and then symlink the stuff you want into /usr/local/bin maybe?
20:12 * geekosaur would likely avoid rakudobrew for maintaining a system installation
20:12 geekosaur it's better for hacking around than distribution
20:12 ufobat joined #perl6
20:12 mst yes, I'd much prefer to build a straight rakudo release in /usr/local/ but
20:16 Xliff I'm using /opt/rakudo
20:17 Xliff Thus everything can be found in /opt/rakudo/bin
20:17 mst also works
20:17 Xliff And this is an EC2 box that has noone else on it.
20:17 Xliff Then I'm going to try to write a sample Bailador app for something. :/
20:21 notviki +++++++++++++++++++++++++++++++++++++​+++++++++++++++++++++++++++++++++++++​+++++++++++++++++++++++++++++++++++++
20:21 domidumont joined #perl6
20:22 domidumont joined #perl6
20:27 domidumont joined #perl6
20:27 Xliff Wow! EC2 just throttled at stage parse.
20:28 Xliff It usually never takes longer than a minute. :/
20:28 notviki Xliff: rakudo's stage parse?
20:28 Xliff Yup
20:28 notviki weird. I too noticed a 15-20 second increase in its time :/
20:28 Xliff This is more like minutes.
20:28 notviki in like the last 2 days
20:29 Xliff Which it will say if it ever completes.
20:29 Xliff I don't know why it wouldn't... but that's the whole reason for this experiment.
20:29 Xliff "Is EC2 a viable rakudo install base?"
20:29 Xliff I would have expected this image to blow through the rakudo install process.
20:30 lichtkind_ joined #perl6
20:37 lukaramu joined #perl6
20:40 Xliff Aaannnd... that would be because this EC2 instance is way underspec'd.
20:40 Xliff < 1G of mem
20:40 Xliff MoarVM finally panicked at stage parse.
20:41 Xliff I will have to relook into this, later. :/
20:41 notviki use moar swap
20:41 notviki you need like 2-2.5GB of RAM for install
20:42 notviki Or 1.8GB I think.
20:42 * notviki tries to measure
20:45 notviki 163.28user 2.27system 2:46.06elapsed 99%CPU (0avgtext+0avgdata 1381080maxresident)k
20:45 notviki 8inputs+77448outputs (0major+956435minor)pagefaults 0swaps
20:45 notviki That's for make install after making source change
20:46 Wanderer68 joined #perl6
20:49 dalek perl6-most-wanted: 209e601 | (Tom Browder)++ | most-wanted/modules.md:
20:49 dalek perl6-most-wanted: add  USNO API module
20:49 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/209e601648
20:53 jkaye joined #perl6
20:54 bjz joined #perl6
20:56 jkaye Another question about type captures/generics. Does anyone know why this constructor would fail to set $!formatter within the object isntace? `my $logger = DefaultLogger[LogEntry].new(:form​atter(DefaultFormatter.new()));` If I manually set $logger.formatter to the same DefaultFormatter.new() object after constructing $logger, everything works as expected
20:57 notviki jkaye: because $!formatter is a private attribute
20:57 jkaye Sorry, minor typo. The declaration for the formatter is `has Formatter[LogEntryType] $.formatter is rw;`
20:58 jkaye (I do not actually want this to be rw eventually, just to test things out for now)
20:58 notviki Does it work if you remove Formatter[LogEntryType]?
20:58 jkaye Let me give it a shot
20:58 notviki do you use submethod BUILD or your own method new by any chance?
20:59 jkaye I have not overridden any of the defaults, just added a method or two
20:59 jkaye Different error but the same gist: No such method 'format' for invocant of type 'Any'
20:59 jkaye Leading me to believe it's not getting set somehow
21:00 notviki ummm....
21:00 notviki Can you show us full code we can run?
21:00 notviki There's no 'format' in what you've shown so far.
21:00 jkaye Was just going to get that for you: http://pastebin.com/yYe9KAk0
21:00 jkaye That's the full code I'm trying to work with currently
21:01 notviki I get no errors when I run it...
21:01 jkaye I'm try to play around with types; I'd like to be able to specify as much as possible ideally
21:01 jkaye The errors are at run time
21:02 jkaye my $logger = getLogger('anything');
21:02 moritz note that Perl 6 is not Haskell
21:02 jkaye my $entry = LogEntry(message => 'hello');
21:02 jkaye $logger.info($entry);
21:02 moritz you should try to play to Perl's strenths, not to overexert it
21:03 jkaye moritz: Surely, but this would not seem like overexertion to me.. This is pretty basic stuff
21:03 rightfold So complex
21:04 notviki jkaye: so how do I repro the error?
21:04 moritz jkaye: I haven't followed your examples closely, but my impression from yesterday was that you try to drive (parametric) type constraints pretty far
21:05 jkaye moritz: The full code I've been working with for my Perl6 career so far is that pastebin. I'm really just exploring at the moment. But I would love for it to be a strictly better Python, which it seems like it could be
21:05 jkaye notviki: One second, I'll add my commands to the paste
21:06 mspo so is perl 7 being released today or what?
21:06 notviki mspo: it was already
21:06 notviki mspo: rakudo.org/downloads/star/
21:07 mspo 2016-11-27 17:52 :)
21:11 pyrimidine joined #perl6
21:12 * notviki leaves for a quick jam session
21:13 pierre_ joined #perl6
21:13 jkaye Sorry about that, here you go: http://pastebin.com/5dj8Hzwu
21:16 tbrowder Merry Christmas, #perl6
21:16 tbrowder i'm looking for advice on module categories (names)
21:17 geekosaur isn't that one of the two hardest problems in CS? >.>
21:18 tbrowder i need a tree class and have made one using the p6 tree traversal TreeNode on rosettacode.org as a starting point.
21:19 tbrowder in
21:20 tbrowder i am considering making a public module of one or the others
21:21 tbrowder other and seek advice on naming for the ecosystem. the category seems to be data structures, trees or graphs, types of such
21:22 tbrowder so a name something like Data::BinaryTree or???
21:26 jkaye notviki: About to have to head out for some Christmas stuff. I'll probably be back on tomorrow to try to get that figured out. Thanks for your help so far
21:27 moritz tbrowder: sounds good
21:27 labster joined #perl6
21:27 gfldex jkaye: I'm golfing your example right now.
21:28 jkaye gfldex: Awesome
21:28 AlexDaniel joined #perl6
21:30 gfldex jkaye: found your mistake, can you /query gfldex with an email-address?
21:30 notviki jkaye: unrelated to your issue: when $_ { $_.new(); }  <-- that's that supposed to do? It's always true
21:31 notviki gfldex: why not share it?
21:31 notviki So we all know and learn.
21:31 samcv eek ok so looks like mass-chars.t doesn't test what we're trying to test at_all
21:31 gfldex he may be gone already
21:31 jkaye notviki: Not always, ie. if $_ is Any (missing key)
21:31 notviki m: say Any ~~ Any
21:31 camelia rakudo-moar 1374fc: OUTPUT«True␤»
21:31 notviki jkaye: still true
21:31 notviki when smartmatches
21:31 jkaye it coerces to Bool
21:31 jkaye In given
21:31 notviki m: given Any { when $_ { say "test" } }
21:31 camelia rakudo-moar 1374fc: OUTPUT«test␤»
21:31 samcv test needs to be removed, because it generates its own "concept" of how many characters something is. based only on unicode nonstarters, not based on all the other rules… should delete that test and just use the GraphemeBreakTest.t i added recently
21:32 jkaye If I pass in something with a missing key it does die
21:32 jkaye Ogg
21:32 samcv which actually tests against actual unicode things, not just starters/non-starters (not checking other properties)
21:32 jkaye Odd
21:32 notviki m: given False { when $_ { say "test" } }
21:32 camelia rakudo-moar 1374fc: ( no output )
21:32 samcv notviki, if i remove a test from roast when it's in spectest rakudo it will fail yes :P
21:32 notviki samcv: no, it's just issue a warning that a file is missing
21:32 samcv ah ok
21:33 notviki m: say False ~~ False
21:33 camelia rakudo-moar 1374fc: OUTPUT«Potential difficulties:␤    Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead␤    at <tmp>:1␤    ------> 3say False ~~ 7⏏5False␤False␤»
21:33 samcv yeah so the 4 tests we're failing (todo'd) in that file, we're not really failing. but
21:33 notviki jkaye: OK, I was wrong, not always. But it's a weird test. If you're checking a bool value use :so or :not
21:33 samcv generating the concept of graphemes from the file it has as its source is not a good idea
21:33 jkaye notviki: Will make the change, thanks for the info
21:34 notviki gfldex: so what's the issue with jkaye's code?
21:34 jkaye Heading out, thanks for the help everyone. Looking forward to hearing from you gfldex
21:34 jkaye Bye for now
21:34 AlexDaniel \o
21:34 AlexDaniel o/
21:35 notviki |
21:35 notviki λ
21:36 notviki samcv: why do you ask? I see mass-chars.t is in 6.c-errata. We can't change tests willy-nilly
21:36 samcv well we can leave it in 6.c-errata
21:37 samcv that is fine
21:37 kurahaupo joined #perl6
21:37 samcv i mean the test is fine in that revision
21:37 samcv but updates to unicode have made it so the script which generated that test are not accurate and probably never will be
21:37 notviki ok
21:38 samcv because the file it generates it from does not map codepoints to graphemes 1->1
21:38 samcv so it was fine since unicode didn't include any joining characters in the older tests
21:38 samcv but now we fail some of them because the tests contains them, so it was never really a dependable thing anyway
21:38 notviki gfldex-- # saying you found an issue the channel was trying to solve but never telling the rest of the channel what the issue was
21:38 gfldex m: role R1 {}; role R2[::T]{ method m(T $t){ say $t.WHAT } }; class C does R1 { has R2[R1] $.r2 = R2[R1].new; method cm { $.r2.m(self) } }; C.new.cm
21:38 camelia rakudo-moar 1374fc: OUTPUT«(C)␤»
21:39 samcv notviki, is that fine to remove then? just from master that is
21:39 gfldex notviki: i'm not done yet. There is a bug in there too.
21:39 notviki OK
21:39 samcv since i already wrote a proper test which tests the same thing
21:39 tailgate anyone else here doing advent of code? I like playing with perl6 but I can't say my solutions are very elegant or perlish
21:40 samcv advent of code?
21:40 gfldex m: role R {}; say R.defined;
21:40 camelia rakudo-moar 1374fc: OUTPUT«False␤»
21:40 tailgate http://adventofcode.com
21:40 tailgate much like our advent calendar, a problem a day
21:41 jkaye joined #perl6
21:41 notviki samcv: you're saying we're failing 6.c-errata tests now? :/
21:41 samcv no
21:42 notviki OK
21:42 samcv 6.c-errata is fine
21:42 * notviki says "I don't know" and goes to play video games :)
21:42 samcv :)
21:45 cognominal joined #perl6
21:51 pierre_ joined #perl6
21:52 ufobat joined #perl6
21:55 Gasher joined #perl6
21:58 gfldex notviki: he is never calling registerLogger, but %logger-registry got a type constraint. So when pulling a value out of that Hash it autovivifies to some type object what is then used in getLogger.
21:59 gfldex (i think)
22:02 gfldex actually he is adding one value to that Hash but that is not a proper class instance.
22:03 gfldex %logger-registry{LogEntry} = DefaultLogger[LogEntry].new(:for​matter(DefaultFormatter.new()));
22:04 gfldex DefaultLogger is a role and the .new should explode but doesn't because of all those type captures (and there is a bug in there somewhere)
22:05 rightfold My favorite logger interface is Callable. You can combine loggers with ;, add filters with if, and add transformations with function composition :)
22:11 gfldex m: role R1 {}; role R2[R1 ::T1] {}; R2[R1].new
22:11 camelia rakudo-moar 1374fc: ( no output )
22:11 gfldex there we go
22:11 gfldex m: role R1 {}; role R2[R1 ::T1] {}; say R2[R1].new
22:11 camelia rakudo-moar 1374fc: OUTPUT«R2[R1].new␤»
22:12 gfldex m: role R1 {}; role R2[R1 ::T1] {}; say R2[R1].new.^mro
22:12 camelia rakudo-moar 1374fc: OUTPUT«((R2[R1]) (Any) (Mu))␤»
22:13 gfldex i'm not sure that makes sense
22:13 dalek perl6-most-wanted: 9476433 | (Tom Browder)++ | most-wanted/modules.md:
22:13 dalek perl6-most-wanted: want a binanary tree
22:13 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/9476433dea
22:17 geekosaur bananary tree?
22:18 notviki :)
22:19 mr_ron left #perl6
22:22 dalek perl6-most-wanted: b7d06e7 | (Tom Browder)++ | most-wanted/modules.md:
22:22 dalek perl6-most-wanted: need n-ary tree
22:22 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/b7d06e7ef8
22:22 gfldex notviki: I believe jkaye get hit by #RT127256
22:22 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127256
22:23 tbrowder s/binanary/binary/ stupid github editor can't read my mind
22:24 timotimo what's your nana got to do with it
22:51 SmokeMachine Any plan to run rakudo on iOS?
22:51 AlexDaniel :o
22:52 pierre_ joined #perl6
22:53 SmokeMachine Something like this: https://itunes.apple.com/us/ap​p/pythonista/id528579881?mt=8
22:55 rightfold you won't get JIT though
22:56 SmokeMachine If it runs...
22:57 SmokeMachine Do you think is it possible?
23:00 TEttinger joined #perl6
23:02 rightfold don't see why not
23:02 rightfold if it works on ARM
23:03 SmokeMachine I just should Cross compile and should that work?
23:07 RabidGravy toodles
23:13 rightfold m: (^27).map({($ //= "a.txt")++}).perl.say
23:13 camelia rakudo-moar 1374fc: OUTPUT«("a.txt", "b.txt", "c.txt", "d.txt", "e.txt", "f.txt", "g.txt", "h.txt", "i.txt", "j.txt", "k.txt", "l.txt", "m.txt", "n.txt", "o.txt", "p.txt", "q.txt", "r.txt", "s.txt", "t.txt", "u.txt", "v.txt", "w.txt", "x.txt", "y.txt", "z.txt", "aa.txt").Seq␤»
23:13 rightfold m: ("a.txt" .. "aa.txt").List.perl.say
23:13 camelia rakudo-moar 1374fc: OUTPUT«("a.txt",)␤»
23:13 rightfold is this expected?
23:13 AlexDaniel m: say ‘a.txt’.succ
23:13 camelia rakudo-moar 1374fc: OUTPUT«b.txt␤»
23:14 geekosaur m: ("a.txt" ... "aa.txt").List.perl.say
23:14 camelia rakudo-moar 1374fc: OUTPUT«("a.txt",)␤»
23:14 gfldex rightfold: yes
23:14 AlexDaniel m: say ("a.txt" .. "aa.txt")[^10]
23:14 camelia rakudo-moar 1374fc: OUTPUT«(a.txt Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
23:14 gfldex say "file-001.txt".succ
23:14 gfldex m: say "file-001.txt".succ
23:14 camelia rakudo-moar 1374fc: OUTPUT«file-002.txt␤»
23:14 gfldex m: say "file-001a.txt".succ
23:14 camelia rakudo-moar 1374fc: OUTPUT«file-001b.txt␤»
23:15 rightfold gfldex: it seems strange that .. behaves differently from repeated .succ
23:16 gfldex a range is not a list of values
23:16 gfldex converting it to a list may or may not make sense, depending on the range
23:16 AlexDaniel so how does the range determine the next value?
23:17 AlexDaniel or values in between
23:17 gfldex heuristic
23:17 gfldex if you want a proper list you need to take care about the start and end points
23:18 AlexDaniel but…
23:18 gfldex the docs could be better tho
23:18 notviki AlexDaniel: in this case, using sequence op
23:19 notviki For single-letter Str, it increments ord values
23:19 AlexDaniel notviki: what sequence op?
23:19 notviki
23:19 AlexDaniel m: say ("a.txt" .. "aa.txt")[^10]
23:19 camelia rakudo-moar 1374fc: OUTPUT«(a.txt Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
23:19 AlexDaniel m: say ("a.txt" ... "aa.txt")[^10]
23:19 camelia rakudo-moar 1374fc: OUTPUT«(a.txt Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
23:20 notviki For the rest, it uses .succ, with a fast-path for integer ranges
23:20 mst m: say "z.txt".succ
23:20 camelia rakudo-moar 1374fc: OUTPUT«aa.txt␤»
23:20 * mst glares
23:21 timotimo is that not to your liking?
23:21 AlexDaniel notviki: how does .. and … work in this case? I don't get it at all!!
23:21 mst say ("a.txt", *.succ, ... "aa.txt")[^10]
23:21 gfldex m: say ('a.txt', *.succ ... 'aa.txt')[20..30]
23:21 camelia rakudo-moar 1374fc: OUTPUT«(u.txt v.txt w.txt x.txt y.txt z.txt aa.txt Nil Nil Nil Nil)␤»
23:21 mst oh, good, I almost got it right
23:21 timotimo AlexDaniel: it probably fails to cmp 'a.txt' to 'aa.txt' correctly?
23:22 notviki AlexDaniel: .. works same as … in this case
23:22 notviki AlexDaniel: https://github.com/rakudo/rakudo​/blob/nom/src/core/Range.pm#L299
23:22 AlexDaniel timotimo: I guess so, but people here are claiming that everything is ok?
23:22 timotimo m: say ("a.txt" .. "z.txt")[^10]
23:22 camelia rakudo-moar 1374fc: OUTPUT«(a.txt b.txt c.txt d.txt e.txt f.txt g.txt h.txt i.txt j.txt)␤»
23:22 notviki Is anyone claiming that something's not OK?
23:23 timotimo m: say "a.txt" leg "aa.txt"
23:23 camelia rakudo-moar 1374fc: OUTPUT«Less␤»
23:23 timotimo but that should make it use .succ
23:23 AlexDaniel notviki: yes?
23:23 notviki AlexDaniel: so what is it?
23:24 mst notviki: seems like '..' is being insufficiently smart, but only in odd cases
23:24 AlexDaniel m: say ("x.txt" .. *)[^10]
23:24 camelia rakudo-moar 1374fc: OUTPUT«(x.txt y.txt z.txt aa.txt ab.txt ac.txt ad.txt ae.txt af.txt ag.txt)␤»
23:24 pyrimidine joined #perl6
23:24 AlexDaniel m: say ("x.txt" .. "ac.txt")[^10]
23:24 camelia rakudo-moar 1374fc: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
23:24 geekosaur hasn't this been discussed before? it's a bad interaction between a couple of DWIMs iirc
23:24 AlexDaniel notviki: ↑ this does not make any sense
23:24 notviki AlexDaniel: the first uses .succ, the second goes to the sequence.
23:25 geekosaur and no good way to resolve it
23:25 notviki AlexDaniel: it makes perfect sense
23:25 AlexDaniel :o
23:25 notviki m: say 42
23:25 camelia rakudo-moar 1374fc: OUTPUT«42␤»
23:25 notviki m: say "foo"
23:25 camelia rakudo-moar 1374fc: OUTPUT«foo␤»
23:25 AlexDaniel ok, so far so good
23:25 notviki AlexDaniel: ↑ this does not make any sense
23:26 AlexDaniel notviki: it does, you printed 42 and then you printed foo
23:26 AlexDaniel notviki: but in the examples above, I asked for 10 elements from "x.txt" to whatever it gets
23:26 AlexDaniel and it gave me values including ac.txt
23:27 AlexDaniel now I said OK, give me values from "x.txt" to "ac.txt", I know you can do it!
23:27 notviki Yes, that mode uses .succ
23:27 AlexDaniel and it's like “NO!”
23:27 notviki What does "to" mean?
23:27 dalek doc: 200060b | gfldex++ | doc/Type/Range.pod6:
23:27 dalek doc: link to infix:<...>
23:27 dalek doc: review: https://github.com/perl6/doc/commit/200060b7a2
23:27 dalek doc: a8ba75c | gfldex++ | doc/Type/Range.pod6:
23:27 dalek doc: hint that ... is better for complex cases
23:27 synopsebot6 Link: http://doc.perl6.org/type/Range
23:27 synopsebot6 Link: http://doc.perl6.org/type/Range
23:27 dalek doc: review: https://github.com/perl6/doc/commit/a8ba75c32a
23:27 AlexDaniel I don't care as long as it is consistent
23:28 mst m: say ("x.txt" .. * .. "ac.txt")[^10]
23:28 camelia rakudo-moar 1374fc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Operators '..' and '..' are non-associative and require parentheses␤at <tmp>:1␤------> 3say ("x.txt" .. *7⏏5 .. "ac.txt")[^10]␤    expecting any of:␤        infix␤        infix stopper␤»
23:28 mst ah, screw you, hippy
23:28 AlexDaniel m: say ("x.txt" .. "zzzzzzzzzzzz")[^10]
23:28 camelia rakudo-moar 1374fc: OUTPUT«(x.txt y.txt z.txt aa.txt ab.txt ac.txt ad.txt ae.txt af.txt ag.txt)␤»
23:29 mst ?!
23:29 mst notviki: from an outside POV, this is now Completely Bizarre even if it does seem to make sense to you.
23:29 notviki Well, stop abusing Range op then.
23:29 gfldex the range operator doesn't do the magic file name succ stuff
23:30 AlexDaniel what does it do then?
23:30 AlexDaniel m: say ("x.txt" .. "「」=‹=")[^10]
23:30 camelia rakudo-moar 1374fc: OUTPUT«(x.txt x.txs x.txr x.txq x.txp x.txo x.txn x.txm x.txl x.txk)␤»
23:31 espadrine joined #perl6
23:31 AlexDaniel does some other magic?
23:32 notviki m: say "x.txt" cmp "aa.txt"
23:32 camelia rakudo-moar 1374fc: OUTPUT«More␤»
23:32 gfldex m: say "x.txt".ord
23:32 camelia rakudo-moar 1374fc: OUTPUT«120␤»
23:32 lizmat fwiw, I've always found that behaviour of .succ surprising, but it is definitely according to speculation, afaik
23:33 AlexDaniel I don't think I have any problem with .succ
23:33 AlexDaniel it does succ, but I can accept that
23:34 AlexDaniel my problem is with .. and …
23:34 notviki And what's the problem?
23:34 gfldex m: use nqp; say nqp::ord("x.txt");
23:34 camelia rakudo-moar 1374fc: OUTPUT«120␤»
23:34 * notviki PageUps
23:34 * geekosaur does wonder if magic autoincrement behavior perhaps belongs elsewhere, since it interacts in such fun ways with lexical ordering and such
23:35 geekosaur (like, a role mixin)
23:35 geekosaur (which is opt-*in*)
23:35 notviki geekosaur: and what'd you get by default?
23:36 geekosaur I'm not sure you should get anything aside from an attempt to coerce to numeric
23:37 * notviki could live with that
23:37 geekosaur an advantage of pushing it into the role is you can provide alternatives, for people who want e.g. autoincrement ons arbitrary strings vs. autoincrement on things that look like filename.ext (not to mention those cases where you have to work with a program with an odd notion of ".ext")
23:38 notviki Well, we have that fine control this form now:
23:38 mst notviki: dude, when something looks like it should work and doesn't, shouting "stop abusing" doesn't actually help, unless you're auditioning for sri's understudy :P
23:38 notviki m: say eager "a.txt", *.succ … "aa.txt"
23:38 camelia rakudo-moar 1374fc: OUTPUT«(a.txt b.txt c.txt d.txt e.txt f.txt g.txt h.txt i.txt j.txt k.txt l.txt m.txt n.txt o.txt p.txt q.txt r.txt s.txt t.txt u.txt v.txt w.txt x.txt y.txt z.txt aa.txt)␤»
23:38 notviki mst: OK :)
23:39 notviki mst: "a.txt" cmp's more than "aa.txt" so it generates a list with just "a.txt" in it and thinks it's done
23:39 notviki I mean "z.txt"
23:39 notviki or "x.txt"
23:39 notviki s: infix:<cmp>, \("x.txt", "aa.txt")
23:39 SourceBaby notviki, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Calling infix:<cmp>() will never work with proto signature (Mu, Mu)â�¤at -e:6â�¤------> [32m    put sourcery( [33mâ��[31minfix:<cmp>, \("x.txt", "aa.txt") )[1];[0mâ�¤
23:40 notviki s: &infix:<cmp>, \("x.txt", "aa.txt")
23:40 SourceBaby notviki, Sauce is at https://github.com/rakudo/rakudo/b​lob/1374fcf/src/core/Str.pm#L2696
23:40 AlexDaniel and zzzzzz is more than a.txt so it will keep trying even though it will never reach it
23:41 AlexDaniel whan about "「」=<=" though?
23:41 notviki .oO( make Range fallback on .succ instead of sequence )
23:41 grondilu joined #perl6
23:41 notviki AlexDaniel: x.txt is less, so it keeps generating it
23:41 mst notviki: yeah, I can sorrrt of see it, but it seems like while that's completely sane for numbers, it's a bit weird for strings
23:41 AlexDaniel m: say ("x.txt" .. "「____")[^10]
23:41 camelia rakudo-moar 1374fc: OUTPUT«(x.txt x.txs x.txr x.txq x.txp x.txo x.txn x.txm x.txl x.txk)␤»
23:42 AlexDaniel notviki: yes, but why does it do it this way?
23:42 mst because it's christmas, so even the bots are insisting on The Final Countdown ?
23:42 notviki mst: there's more weirdness in it: some points produce repeating infinite sequences, because a .succ makes a char that gets normalized to a char lower in the range, and it keeps .succing in that loop
23:43 gfldex because ranges are performance critical, so we don't have tons if sanity checks in its constructor
23:43 mst part of me wonders if it'd be better to have this universally broken and require explicit use of .succ
23:44 mst that would be more surprising up front but I'd expect the surprise to pass quicker
23:44 gfldex it does use .succ under the hood
23:44 mst ...
23:44 notviki gfldex: the above gets forwarded to ...
23:44 AlexDaniel :-/
23:44 mst gfldex: yes. that was my point. re-read.
23:44 gfldex i c
23:44 notviki AlexDaniel: I don't know. It's a 264-line function and I'm wasted :}
23:45 notviki AlexDaniel: a guess would be it tries to by smart about templating
23:45 mst basically, I'm wondering if 'half-DWIM-half-weird' as we have now is inferior to 'quarter-DWIM-reliably-fails-otherwise'
23:46 notviki m: say eager "aaXXXbbcc" … "aaYYYbbcc"
23:46 camelia rakudo-moar 1374fc: OUTPUT«(aaXXXbbcc aaXXYbbcc aaXYXbbcc aaXYYbbcc aaYXXbbcc aaYXYbbcc aaYYXbbcc aaYYYbbcc)␤»
23:46 notviki m: "aaXXXbbcc".succ.say
23:46 camelia rakudo-moar 1374fc: OUTPUT«aaXXXbbcd␤»
23:46 mst ok, that's even crazier
23:47 notviki So it increases parts that are the same only, and in m: say ("x.txt" .. "「____")[^10] there are no same parts, so it icreases them by .succ
23:47 notviki that are different only I mean
23:48 notviki m: say "XXXmstYYY" … "XXXtestYYY"
23:48 camelia rakudo-moar 1374fc: OUTPUT«(XXXmstYYY XXXmstYYZ XXXmstYZA XXXmstYZB XXXmstYZC XXXmstYZD XXXmstYZE XXXmstYZF XXXmstYZG XXXmstYZH XXXmstYZI XXXmstYZJ XXXmstYZK XXXmstYZL XXXmstYZM XXXmstYZN XXXmstYZO XXXmstYZP XXXmstYZQ XXXmstYZR XXXmstYZS XXXmstYZT XXXmstYZU XXXmstYZV XXXmstYZW XXXms…»
23:48 notviki 0.o
23:48 notviki m: say "XXXmstYYYY" … "XXXtestYYY"
23:48 camelia rakudo-moar 1374fc: OUTPUT«(XXXmstYYYY XXXmstZYYY XXXmst[YYY XXXmst\YYY XXXmst]YYY XXXmst^YYY XXXmst_YYY XXXmst`YYY XXXmstaYYY XXXmstbYYY XXXmstcYYY XXXmstdYYY XXXmsteYYY XXXmstfYYY XXXmstgYYY XXXmsthYYY XXXmstiYYY XXXmstjYYY XXXmstkYYY XXXmstlYYY XXXmstmYYY XXXmstnYYY XXXmstoYYY XX…»
23:48 * notviki coughs
23:48 notviki So yeah, as you can see it all makes perfect sense!
23:48 notviki ^_^
23:49 AlexDaniel what the fucking fuck
23:49 notviki I forget, what was the first example where you there wasn't consistency
23:49 notviki aye
23:50 notviki m: m: say eager "x.txt" … "ac.txt"
23:50 camelia rakudo-moar 1374fc: OUTPUT«(x.txt w.txt v.txt u.txt t.txt s.txt r.txt q.txt p.txt o.txt n.txt m.txt l.txt k.txt j.txt i.txt h.txt g.txt f.txt e.txt d.txt c.txt b.txt)␤»
23:50 notviki m: m: say eager "x.txt" .. "ac.txt"
23:50 camelia rakudo-moar 1374fc: OUTPUT«()␤»
23:50 notviki Well, I was wrong.
23:50 AlexDaniel well, my problem with it was that it was not generating the values when it should have… now that I look at it, perhaps it should refrain from generating anything in all possible cases…
23:50 notviki Ah, I missed "$max before $!min in code
23:51 notviki m: say "x.txt" before "ac.txt"
23:51 camelia rakudo-moar 1374fc: OUTPUT«False␤»
23:51 notviki right
23:51 notviki So it short-curcuits and returns empty
23:51 notviki m: say "x.txt" cmp "ac.txt"
23:51 camelia rakudo-moar 1374fc: OUTPUT«More␤»
23:51 notviki :S
23:52 notviki m: say "a.txt" cmp "aa.txt"
23:52 camelia rakudo-moar 1374fc: OUTPUT«Less␤»
23:53 notviki Well, I conceed. This doesn't make any sense.
23:53 mst *concede
23:53 mst (sorry)
23:53 rightfold .oO(My favorite programming languages of the month all start with a P)
23:53 AlexDaniel well, that's probably a Christmas miracle
23:53 AlexDaniel we agree on something!
23:53 notviki :)
23:57 AlexDaniel notviki: I guess we need a ticket for this?
23:57 notviki Well, we were blindling guessing behaviour by mashing on the keyboard with one semi-conscious person reading parts of code.
23:57 notviki Maybe there are few sane rules that can explain all that.
23:58 mst ("a.txt", *.ballmer ... "aa.txt")
23:58 * notviki doesn't drink anymore
23:58 notviki ^_^
23:59 notviki AlexDaniel: there was a ticket about this area. What happened to it?
23:59 notviki It was you and me talking.
23:59 notviki And I was saying everything is fine because templates...
23:59 AlexDaniel are you saying that we already had this conversation before?

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo