»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
RabidGravy | pointer to a pointer? You van, it's just a second step of indirection. | 00:05 | |
dalek | c: 9eabdc2 | titsuki++ | doc/Type/ (2 files): Use .perl instead of dd |
||
c: b9edd20 | titsuki++ | doc/Type/ (2 files): Merge pull request #1079 from titsuki/use-perl-instead-of-dd Use .perl instead of dd |
|||
notviki | titsuki++ | 00:06 | |
AlexDaniel | oh, there are two posts for 24 now, cool :) | 00:09 | |
00:11
pmurias left
|
|||
samcv | do we have to be done with advent or can I make an advent | 00:12 | |
it always ends today right? | 00:13 | ||
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:15 | |
00:17
RabidGravy left
|
|||
samcv | kk | 00:20 | |
AlexDaniel | awww, that could've been a nice post | ||
00:21
floutenvy joined
00:22
bjz left
|
|||
samcv | hanukkah is not over yet tho ;) | 00:22 | |
notviki | samcv: I think you've missed a plan bump in uniprop.t | 00:24 | |
samcv | oh | ||
k fixing | |||
00:24
floutenvy left,
lukaramu left
|
|||
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
|
|||
mr_ron | what is the difference between the two results and why did item documentation choose $[ ? | 00:27 | |
notviki | one is a list the other is an array | 00:29 | |
00:29
floutenvy joined
|
|||
mr_ron | m: say $(1, 2, 3) ~~ item(1, 2, 3) | 00:29 | |
camelia | rakudo-moar 38ec79: OUTPUT«True» | ||
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:31 | |
notviki | There are no references in Perl 6. | 00:32 | |
Array is just a mutable List. | |||
mr_ron | If there is no ref what is item doing to the array in item([]) ? | 00:34 | |
notviki | Itemizes it | 00:35 | |
m: for [<a b c>] { say "|$_|" } | |||
camelia | rakudo-moar 38ec79: OUTPUT«|a||b||c|» | ||
notviki | m: for item [<a b c>] { say "|$_|" } | ||
camelia | rakudo-moar 38ec79: OUTPUT«|a b c|» | ||
mr_ron | m: for item $(1, 3, 5) { say "|$_|" } | 00:37 | |
camelia | rakudo-moar 38ec79: OUTPUT«|1 3 5|» | ||
mr_ron | Seems like sort of an inverse of flat (but not quite sure what I'm talking about) | 00:38 | |
rightfold | m: my @a = (1,2; 3,4); say @a.perl; | 00:39 | |
camelia | rakudo-moar 38ec79: OUTPUT«[(1, 2), (3, 4)]» | ||
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. | ||
Is this doc incorrect? ^ | 00:40 | ||
notviki | It would be more helpful if we had context. | 00:44 | |
What shortcut? | |||
rightfold | Right :-) | 00:46 | |
00:46
dataangel joined
|
|||
rightfold | docs.perl6.org/language/list#The_@_sigil | 00:46 | |
00:46
holli left
00:47
dataangel left
|
|||
notviki | No idea what it's talking about. | 00:47 | |
What shortcut? | 00:48 | ||
00:48
dataangel joined
|
|||
notviki | :S | 00:48 | |
m: my @a = (1,2; 3,4); dd @a | |||
camelia | rakudo-moar 38ec79: OUTPUT«Array @a = [(1, 2), (3, 4)]» | ||
notviki | the "outer list" is not first item in the aray | ||
It's possible that was written pre-GLR | |||
committable6: 2015.07 m: my @a = (1,2; 3,4); dd @a | |||
committable6 | notviki, ¦«2015.07»: @a = [1, 2; 3, 4]<> | ||
notviki shrugs | |||
rightfold: yes, seems wrong. | 00:49 | ||
rightfold: you can fix it in this file :) github.com/perl6/doc/blob/master/d.../list.pod6 | |||
rightfold | yay | ||
mr_ron | Maybe not that important but it looks like $([1, 2, 3]) examples could be golfed to $(1, 2, 3) ... | 00:50 | |
Not same operation but explains same idea | |||
AlexDaniel | notviki: fwiw, pre-glr tag can also be used | 00:53 | |
notviki | cool | ||
AlexDaniel | committable6: pre-glr my @a = (1,2; 3,4); dd @a | ||
committable6 | AlexDaniel, ¦«pre-glr»: @a = [1, 2; 3, 4]<> | ||
00:53
floutenvy left
00:55
wamba left
|
|||
rightfold | Should I write CONSTANT-NAME or CONSTANT_NAME? | 00:55 | |
notviki | heh | ||
00:56
bjz left
|
|||
notviki | c'mon, we're not python ;) | 00:56 | |
In Perl, you can do it any way you like :) | |||
00:57
floutenvy joined
|
|||
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,
aborazmeh left,
aborazmeh joined
|
|||
AlexDaniel | rightfold: CONSTANT-NAME looks nicer though | 01:01 | |
mr_ron | "There are no references in p6" docs.perl6.org/language/5to6-nutsh...e_creation | ||
notviki rolls eyes at that paragraph | 01:02 | ||
01:03
floutenvy left
|
|||
notviki reads the "Dereferencing" one and fetches the flamethrower | 01:03 | ||
01:03
floutenvy joined
|
|||
mr_ron | If you get to enlightening me(us?) on the docs ... have started watching docs on GitHub | 01:05 | |
notviki | mr_ron: well, you're free to think we have refernces and use idiotic, superfluous syntax to satisfy a flawed paradigm :) | 01:06 | |
m: my @aaa = ^10; my $aref = @aaa; say $aref[2] | 01:07 | ||
camelia | rakudo-moar c498d5: OUTPUT«2» | ||
notviki | None of that "reference" crap and it still works is my enlightenment :) | ||
01:08
Ven left
01:09
djbkd joined
01:11
floutenvy left
|
|||
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:13 | |
notviki | mr_ron: I created an issue: github.com/perl6/doc/issues/1081 | 01:16 | |
mr_ron | notviki: thanks | 01:17 | |
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 | |
So I'd say it's not that important piece of equipment. | |||
m: dd elems set $<a b c> | 01:19 | ||
camelia | rakudo-moar c498d5: OUTPUT«1» | ||
notviki | m: dd elems set <a b c> | ||
camelia | rakudo-moar c498d5: OUTPUT«3» | ||
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«13» | 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? | ||
dalek | c: 39f4221 | (Zoffix Znet)++ | doc/Type/Any.pod6: Don't reinvent the wheel in .flat example |
01:28 | |
synopsebot6 | Link: doc.perl6.org/type/Any | ||
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 | |
mr_ron: that's my understanding of it, but I don't know much. I suspect reading docs about contains would shed some light | |||
*docs about containers | |||
01:43
cognominal left
01:48
cognominal joined,
rburkholder left
|
|||
ugexe | hmmm, the advent snowfall.p6 example just gives me a blank screen. And everything else in Terminal::Print's examples/ segfaults | 01:50 | |
notviki | :( | 01:54 | |
rightfold | Where are the advent posts? | 01:56 | |
01:57
newbie1 left
|
|||
notviki | rightfold: perl6advent.wordpress.com | 01:58 | |
rightfold | Thanks | 01:59 | |
02:02
rmothe joined
|
|||
rmothe | algum brasileiro? | 02:02 | |
quit | 02:03 | ||
02:03
rmothe left
02:24
aborazmeh left
02:25
cyphase left
02:28
itcharlie_linux joined
|
|||
notviki | Infelizmente não | 02:28 | |
02:28
Ben_Goldberg joined
02:29
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg,
Rawriful joined
02:30
cyphase joined
02:33
BenGoldberg left
02:35
BenGoldberg joined
02:40
cyphase left
02:41
mspo joined
02:45
cyphase joined,
ilbot3 left
02:47
kalkin- left,
kalkin-_ joined,
ilbot3 joined
02:52
aborazmeh joined,
aborazmeh left,
aborazmeh joined
03:06
itcharlie_linux left
03:24
kyan joined
03:40
kyan left
03:41
kyan joined
03:46
kyan left
03:47
kyan joined
03:48
MasterDukeLaptop left
03:52
AlexDaniel left
03:54
noganex_ joined
03:56
kyan left
03:57
kyan joined,
skids joined,
noganex left,
kyan left
04:02
kaare_ joined
04:10
pyrimidine joined,
pyrimidi_ left
04:19
MasterDukeLaptop joined
04:21
Rawriful left
04:31
aborazmeh left
04:34
MasterDukeLaptop left
04:35
BenGoldberg left
04:37
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
Rawriful joined
04:38
BenGoldberg joined
04:40
mr_ron left
04:44
aborazmeh left
04:57
Rawriful left
04:58
khw left
04:59
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:14
Cabanossi left
|
|||
notviki | How can I introspect a thing in NQP? I need to know what methods I can call on a QAST::Var | 05:15 | |
05:18
Cabanossi joined
05:24
aborazmeh left
05:32
cyphase left
05:37
cyphase joined
|
|||
samcv | shapecatcher.com/ | 05:43 | |
this is really cool. you can draw unicode chars and it'll find closely matching ones | |||
05:49
TimToady left
06:07
BenGoldberg left
06:20
TimToady joined
06:29
pyrimidi_ joined,
pyrimidine left
|
|||
samcv | sweet. I just fixed MoarVM so Bidi_Matching_Bracket and Bidi_Mirroring_Glyph work! | 06:37 | |
06:47
skids left
|
|||
samcv | sweet PR sent github.com/MoarVM/MoarVM/pull/468 | 06:49 | |
notviki, if you find out, let me know as well | 06:50 | ||
06:58
Rawriful joined
07:02
darutoko joined
|
|||
samcv | Bidi_Paired_Brackets are derived as follows: two characters, A and B, | 07:12 | |
# form a bracket pair if A has gc=Ps and B has gc=Pe, both have bc=ON and | |||
# Bidi_M=Y, and bmg of A is B. Bidi_Paired_Bracket (bpb) maps A to B and | |||
# vice versa, and their Bidi_Paired_Bracket_Type (bpt) property values are | |||
# Open (o) and Close (c), respectively. | |||
07:12
CIAvash joined
|
|||
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:12 | |
07:27
aborazmeh joined,
aborazmeh left,
aborazmeh joined
07:36
wamba joined
07:39
Rawriful left,
toolforger joined
07:43
floutenvy joined
07:49
floutenvy left,
aborazmeh left
|
|||
toolforger | Happy holidays everyone | 07:50 | |
samcv | happy holidays :) | ||
toolforger | MasterDuke, are you there? | ||
07:53
floutenvy joined
07:56
floutenvy left
|
|||
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 | ||
not sure which it is though… | |||
toolforger | I was aiming more at the technical level | 08:03 | |
I.e. there's modulename.pm | |||
I think it's also declaring its name in code, is that right? | |||
08:04
bjz joined
|
|||
samcv | it can… but doesn't have to | 08:05 | |
my modules do not do this. though maybe they should … | |||
toolforger | :-) | ||
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 | ||
but there's the hashed modules and then it looks up the names/authors/versions in said file i specified | 08:06 | ||
and the file puts hashes to the author/modulename etc what it provides | |||
toolforger | Is the module namespace hierarchical? I.e. can a module have submodules? | 08:08 | |
(Seems they can, just trying to confirm vague description-by-example docs) | 08:09 | ||
Ah. I just found out what the package keyword does. | 08:11 | ||
samcv | uhm yeah they can | ||
watch out for reverse uh something something | 08:12 | ||
i think it gets the methods from the lowest on the chain package | |||
maybe. something. idk | |||
maybe that's just objects | |||
toolforger | "reverse uh"? | ||
samcv | ignore what I just said :) i probably have no clue what i mean | ||
toolforger is even more clueless | 08:13 | ||
samcv | maybe that's BUILD | ||
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 | |||
yeah ignore what i said :P | |||
toolforger | No problem | ||
I'm just trying to find out a bit more about Perl packages in general | |||
08:13
domidumont joined
|
|||
toolforger | I guess if @INC contains two directories with the same module, the program will ever see only one of them, right? | 08:15 | |
samcv | well it goes in the order it is supposed to | 08:16 | |
i would read the design.perl6.org for specifics on the order | |||
m: my %hash; %hash<Emoji><type> = 'B'; | 08:17 | ||
camelia | ( no output ) | ||
samcv | hmm wtf | ||
08:17
domidumont left
|
|||
toolforger | I just wanted to be sure that no two modules with the same name can exist inside a running program :-) | 08:18 | |
08:18
domidumont joined
|
|||
samcv | no they can though. but. they have to probably have different versions or aauthors | 08:18 | |
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 | ||
Or can a program still access both if they have different author and/or version? | 08:20 | ||
samcv | yeah that is true | ||
if you include them by that yeah | |||
ye | |||
though… they probably have to set author in the file if it's not installed and just in a folder | 08:21 | ||
toolforger is starting to read anything that says "module" in its title on design.perl6.org | 08:22 | ||
samcv | heh | 08:23 | |
toolforger | Christmas reading :-D | ||
samcv | that's usually my goto thing to read if I can't find enough nitty gritty in the docs | ||
toolforger has been reading Language Reference Manuals for a few decades now | |||
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:28 | ||
samcv | well it does | 08:29 | |
at of like | |||
moar-blead of half a week ago or something | |||
paging nine | |||
toolforger just found a reference to S22 | 08:33 | ||
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 | |
heh | |||
this one is even better though: | 08:36 | ||
This is from an anecdote by Ken Demarest, one of the original developers who worked on Wing Commander I on the PC... | |||
... 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!" | |||
Genius | |||
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!" | ||
"Your trial has expired. Please visit perl6.org to purchase!" | 08:38 | ||
toolforger | Cha-chingggg! $$$ | ||
Actually that would be self-regulating | |||
samcv | yeah | ||
hahaha | |||
toolforger | more errors -> more money to fix them | 08:39 | |
money decreases as errors get fixed | |||
Now how to prevent coders from adding errors to make more money... | |||
toolforger thinks he just discovered the business model of some software companies | |||
samcv | would still be nice to put "Thank you for using Perl 6" at the end of a moarvm crash lol | 08:41 | |
08:41
rindolf joined
|
|||
samcv | at least rakudo is more apologetic | 08:41 | |
SORRY! | |||
toolforger | I wouldn't want the thankyou message though | 08:42 | |
samcv | yeah i guess. | ||
toolforger | It's just like "Your program has crashed, your data lost. [OK]" | ||
samcv | true. but would be nice if it was more polite when crashing | ||
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 | ||
toolforger | So I just ignore the "fluff" and dig right to the technical parts of the message | ||
samcv | yah but the human mind can easily just skip over unimportant stuff | 08:44 | |
toolforger | true | ||
though I found that SORRY annoying, it is visually distracting from what I really want to read | |||
Maybe it should be lowercase, and less standout around it | |||
but that's just my personal preference | 08:45 | ||
samcv | yeah it would be nice if it were titlecase | 08:47 | |
Sorry! | |||
though maybe it's made to seem like an error | |||
u: square | 08:48 | ||
unicodable6 | samcv, U+005B LEFT SQUARE BRACKET [Ps] ([) | ||
samcv, U+005D RIGHT SQUARE BRACKET [Pe] (]) | |||
samcv, U+033B COMBINING SQUARE BELOW [Mn] (◌̻) | |||
samcv, gist.github.com/720652c58ca12857bc...9e134d740f | |||
samcv | oh yes what i was doing. adding more unicode props to moar | ||
toolforger | 504 results... | ||
samcv | will be my christmas present to myself and all perl 6 | ||
toolforger | Yeah, Unicode properties are really important | 08:49 | |
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 | ||
should be able to get it passing the 4 unicode 9 tests we are failing for this one thing | |||
for detecting grapheme count | |||
:D | |||
toolforger | I was somewhat surprised that Perl6 was doing its own grapheme definition | 08:53 | |
That's a pretty risky move | |||
samcv | is it though? | ||
toolforger | Yeah | ||
samcv | tell me since I don't know that we do… | ||
isn't char's graphemes? | |||
toolforger | I think so | ||
samcv | *chars | ||
yeah… | |||
well at least it passes all but 4 of the unicode provided tests for this one thing | |||
and hopefully maybe will fix another 50/750 on the other new test i added from unicode 9 | 08:54 | ||
samcv crosses fingers | |||
toolforger | Issue is that future modifications of Unicode may make it harder to properly implement graphemes | ||
samcv | why would that be? | ||
do we know this might happen? | |||
toolforger | It's more a gut feeling on my side | ||
and some historic knowledge about what has changed in Unicode and what hasn't | |||
08:54
cyphase left
|
|||
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:55 | |
Perl6' graphemes might lose some of the guarantees they were built for, so they might become pointless | 08:56 | ||
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 | ||
idki | |||
i mean there's already plenty of scripts that we define in graphemes that are are composed of many things | |||
toolforger | I'm not sure myself, I probably missed a lot of what the purposes graphemes were designed for | 08:58 | |
s/what// | |||
samcv | m: 0x00A7.uniprop('Line_Break').say | ||
camelia | rakudo-moar a6c37a: OUTPUT«BK» | ||
samcv | eeeekkkkkk | ||
makes me so sad that is wtrong too | |||
there's so many wrong. i just hope this doesn't break any spectests if we are doing anything weird | 08:59 | ||
when these all get fixed | |||
not sure why the generation script only specifies certain ones, i think they were forgotten | 09:00 | ||
09:00
cyphase joined
|
|||
samcv | that is not good at all though. | 09:00 | |
only specifies like 3/5 of them | |||
so all the rest get the default of BK | |||
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 | ||
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 :-( | ||
samcv | but it makes so much sense why it wasn't passing 1/10 of the tests for 9.0 | ||
well no its documented. idk the function is called LineBreak | |||
haha | |||
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 | ||
samcv | idk it may have been coded before the other functions were | ||
maybe should check git blame | |||
toolforger | just my thinking | 09:04 | |
samcv | see how long ago it was | ||
in 2012 :D | |||
!!!!!!!! | |||
samcv makes a note to go through and check all the functions written that long ago | |||
toolforger | omg | 09:05 | |
samcv | !!!!!!!!!!!!!! | ||
samcv cries in the corner | 09:06 | ||
toolforger plays "losing my religion" | |||
"I know I said too much / I haven't said enough" | |||
"that's me in the corner" | |||
samcv | ^ | 09:07 | |
it's as old as travis ci's ubuntu! | |||
well not ours since i updated it to 14.04 | 09:08 | ||
at least for rakudo | |||
only 19/151 failed tests now :) | 09:09 | ||
down from like 39 fails (for uniprop) | |||
i am so happy now | |||
toolforger | Oh. "Losing my religion" is southern states slang for "losing my temper". | ||
Well, that fits even better :-) | |||
Now the interesting part: are the tests failing that didn't fail before? | 09:10 | ||
s/the/there/ | |||
samcv | well i will need to run spectest | ||
well for uniprop at least, just calling that routine | |||
09:11
pierre_ joined
|
|||
samcv | gonna run the whole suite now | 09:11 | |
toolforger | New failures outside of uniprop are likely workarounds now failing | 09:12 | |
samcv | yeah | ||
or incorrect tests. or something the generalized function does that this doesn't but | |||
toolforger | So that's "just work", not an indicator that switching to tables was a bad idea | ||
samcv | i think it should be fine based on reading the code but. i don't know how half of it works | ||
tables? | 09:13 | ||
toolforger | character database | ||
well, "database", it's just text files after all | |||
samcv | uhm it works fine | ||
the problem was just the script used to create moar's thingy | |||
toolforger | in tabular form, that's why I misnamed them "tables" | ||
samcv | the c file with all the things | ||
ah | |||
no that's fine, it works pretty well | 09:14 | ||
toolforger | sweet | ||
samcv | but doesn't work good if you hard code in the list of possible values… | ||
and set anything not those to BK | |||
dalek | k-simple: a403ec7 | (Richard Hainsworth)++ | / (6 files): Merge pull request #1 from perl6/master merge to master |
||
k-simple: 949481f | finanalyst++ | / (2 files): Adding a Pane Widget |
|||
k-simple: 92c6efd | finanalyst++ | / (5 files): updating |
|||
k-simple: 3a44f5f | (Richard Hainsworth)++ | / (7 files): Merge pull request #70 from finanalyst/master update |
|||
samcv | for the Line_Break property (╯°□°)╯︵ ┻━┻ | ||
how do you like these tables | 09:15 | ||
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 | ||
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 | |||
(have any comments at all)) | |||
like unidata.txt has no lines except data | 09:17 | ||
toolforger | Essentially the tables are just data, their usage is in the algorithms | ||
samcv | and i don't think any comments | ||
yeah and some are derived but there's separate files for them anyway, which is probably good | |||
on both counts | |||
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? | ||
toolforger | a.k.a. derived | ||
samcv | well that's from unicode.org | ||
Bidi_Paired_Brackets are derived as follows: two characters, A and B, | |||
<samcv> # form a bracket pair if A has gc=Ps and B has gc=Pe, both have bc=ON and | |||
<samcv> # Bidi_M=Y, and bmg of A is B. Bidi_Paired_Bracket (bpb) maps A to B and | |||
<samcv> # vice versa, and their Bidi_Paired_Bracket_Type (bpt) property values are | |||
<samcv> # Open (o) and Close (c), respectively. | |||
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 | ||
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 | ||
toolforger nods | |||
samcv | since the files are cannon. but i mean if it's derived then there could be errors | ||
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. | ||
The usage of the data is explained in the Technical Reports that unicode.org carries | |||
samcv | yeah. i wish the technical reports were in their ftp | 09:22 | |
if they are i didn't find them | |||
09:22
djbkd left
|
|||
samcv | well. some are. not all | 09:22 | |
toolforger | I tend to download them via HTTP | ||
also the annexes | |||
E.g. UAX #9 details bidi | 09:23 | ||
samcv | yeah | ||
09:23
cibs left
|
|||
toolforger | that also defines how to interpret the bidi data files, so you don't need extra commentary on the bidi data | 09:23 | |
I've been thinking that's the way it is for all data files | 09:24 | ||
09:25
cibs joined
09:27
pierre_ left
|
|||
dalek | k-simple/revert-70-master: 5b0a16a | (Richard Hainsworth)++ | / (7 files): Revert "update" |
09:27 | |
k-simple: 5b0a16a | (Richard Hainsworth)++ | / (7 files): Revert "update" |
09:28 | ||
k-simple: 0f3b51e | (Richard Hainsworth)++ | / (7 files): Merge pull request #71 from perl6/revert-70-master Revert "update" |
|||
samcv | well so far it's passing all the spectests :) | 09:30 | |
almost done | 09:31 | ||
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:32 | |
samcv | that sounds such a pain | 09:39 | |
gonna add in East_Asian_Width property too now | |||
that is a useful one | |||
toolforger | spectest passed? | ||
s/spectest/spectests/ | |||
samcv | yep :) | ||
toolforger | :-):-):-) | ||
samcv | deleted that 2012 code | ||
and it felt good | |||
toolforger | :-D | 09:40 | |
09:40
ufobat joined
|
|||
samcv | east asian width working now too :) as of 30 secs ago | 09:41 | |
TEttinger | nice | 09:44 | |
toolforger | Oh. A12 says "we want to be able to run different versions of the Frog module simultaneously" | 09:46 | |
samcv | who would not want multiple frogs | 09:48 | |
09:48
wamba left
|
|||
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 | ||
but i am sure the wording is poor as well | 09:49 | ||
;) | |||
toolforger | I can understand that | ||
It's an Apocalypse anyway, I still have to read the Exegesis and the Synopses | |||
fortunately A12 insists that version and author information be available as metadata, so there's hope | 09:50 | ||
Plus, it's Perl, so there's always hope that SOMEBODY thought about any problem you see :-) | |||
samcv | ^ | 09:51 | |
it makes me sad. i saw pythons list of unicode properties it supports with the unicode whatever pluginmodulewhatever | |||
and it was so short | |||
and i almost cried | 09:52 | ||
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 | |||
toolforger | Python seems to be attracting people with not enough knowledge about module design and guarantees | ||
Stuff like "no globals", "specify a contract", "no hidden contract clauses" etc. are routinely violated | 09:53 | ||
09:54
bjz left
|
|||
toolforger | The language itself is a surprising mix: pretty neat overall, but some glaring design mistakes | 09:55 | |
09:56
bjz joined
09:58
domidumont left
|
|||
toolforger | Phew. A16 done. I just skimmed most of it, but I need a break :-) | 09:59 | |
seeya! | 10:00 | ||
10:00
toolforger left
|
|||
samcv | kk! | 10:00 | |
10:01
Tonik joined
10:03
bjz left
|
|||
samcv | now to add in the Unicode_1_Name property. kewl | 10:13 | |
don't think i'm going to add the UNicode 1 name until this PR gets accepted though | 10:18 | ||
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 | |||
night all | |||
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 | ||
when installing Data::Dump zef takes a probably older version from its localcache, i think | 10:19 | ||
10:21
RabidGravy joined
10:24
Bluebell_ joined,
puffyfluff joined
10:29
bjz joined
|
|||
ufobat | i did probably something stupid but removing $HOME/.zef/* helped | 10:29 | |
RabidGravy | removing things is always the solution | 10:34 | |
10:38
puffyfluff left
10:42
Tonik left
10:51
espadrine joined
10:54
bjz left
10:55
ufobat left
10:57
bjz joined
10:59
labster left
11:03
TimToady left
11:08
ufobat joined
11:14
dgl is now known as dg
11:23
bjz left
11:30
bjz joined
11:37
pmurias joined
11:38
espadrine left,
TimToady joined
11:43
rburkholder joined
11:46
ufobat left
12:08
TEttinger left
12:13
Tonik joined,
Bluebell_ left,
bjz left,
bjz_ joined
12:17
TEttinger joined
12:19
bjz_ left
12:20
CIAvash left
12:21
TEttinger left,
bjz joined
12:36
cooper_ left
12:46
AlexDaniel joined
12:50
ufobat joined
|
|||
dalek | c: cab78cb | gfldex++ | doc/Language/typesystem.pod6: doc parameters for roles |
12:51 | |
c: f7eeb52 | gfldex++ | doc/Language/typesystem.pod6: we call them parameters these days and we indent examples with 4 spaces |
|||
synopsebot6 | Link: doc.perl6.org/language/typesystem | ||
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:52 | |
rightfold | But I'm hungry! | 12:55 | |
AlexDaniel | .oO( maybe we can start feeding people forcibly… :) ) |
12:56 | |
tbrowder | Merry Christmas, #perl6! | ||
rightfold | $food ==> &rightfold | ||
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 | ||
AlexDaniel | my is not an attribute, so it's 「my @bar」 | 12:58 | |
m: class Foo { my $x; method z { say $x++ } }; Foo.new.z; Foo.new.z | |||
camelia | rakudo-moar a6c37a: OUTPUT«01» | ||
AlexDaniel | and it makes sense, ya | 12:59 | |
ufobat | but when i am writing my with twigil? | 13:00 | |
shouldn't has require ! or . as twigil and my allow just the others? | 13:04 | ||
gfldex | ufobat: no because a class is also a package | 13:05 | |
notviki | ufobat: my @.foo is a class attribute | ||
gfldex | m: class C { my $.bar }; say C.^methods | 13:06 | |
camelia | rakudo-moar a6c37a: OUTPUT«(bar)» | ||
gfldex | the . twigil will create an accessor method | ||
ufobat | so in classes my is more or less the same as has? | ||
notviki | ufobat: errr, no | ||
ufobat: has $.foo is an instance attribute and my $.foo is a class attribute | |||
ufobat | ah | 13:07 | |
and what about class F {has $*foo}? | |||
AlexDaniel | ufobat: I think has $f defaults to has $!f | ||
m: class Foo { my $x; method z { say $!x } }; say Foo.new.x | |||
camelia | rakudo-moar a6c37a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Attribute $!x not declared in class Fooat <tmp>:1------> 3lass Foo { my $x; method z { say $!x } }7⏏5; say Foo.new.x expecting any of: horizontal whitespace postfix …» | ||
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:08 | |
camelia | rakudo-moar a6c37a: OUTPUT«Cannot modify an immutable Any in block <unit> at <tmp> line 1» | ||
notviki | screw you | ||
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 | |||
camelia | rakudo-moar a6c37a: OUTPUT«[42, "meow"][72, "meow"]» | ||
AlexDaniel | m: class Foo { has $x; method z { say $!x } }; say Foo.new.x | ||
camelia | rakudo-moar a6c37a: OUTPUT«No such method 'x' for invocant of type 'Foo' in block <unit> at <tmp> line 1» | ||
AlexDaniel | m: class Foo { has $x; method z { say $!x } }; say Foo.new.z | ||
camelia | rakudo-moar a6c37a: OUTPUT«(Any)True» | ||
AlexDaniel | yea | ||
13:09
lukaramu joined,
lukaramu left
13:10
lukaramu joined
|
|||
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. | ||
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 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
gfldex | do we have introspection for dynamic variables for a package (from outside the package) | 13:13 | |
? | |||
m: class C { our $*d = 1; method d { $*d } }; my $*d = 2; say C.new.d | |||
camelia | rakudo-moar a6c37a: OUTPUT«2» | ||
13:16
AlexDaniel left
|
|||
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 rowat <tmp>:1------> 3od d { $*d } }; my $*d = 2; say C::.keys7⏏5' expecting any of: infix infix stopper postfix statement end …» | ||
notviki | m: class C { our $*d = 1; method d { $*d } }; my $*d = 2; say C::.keys | ||
camelia | rakudo-moar a6c37a: OUTPUT«($*d)» | ||
13:29
Gavs joined
|
|||
Gavs | hello | 13:29 | |
RabidGravy | I suppose I could make a special hack of the parser to allow the Amharic translation of "use" and then gist.github.com/jonathanstowe/9e6d...abf210641d would be perfect | 13:31 | |
notviki | Gavs: hi | ||
Gavs | how is development on Perl6 going? | ||
notviki | Gavs: busy | 13:32 | |
RabidGravy | it's finished, we're just the cleaners cleaning up after the party ;-) | ||
notviki | Gavs: first production release was released exactly a year ago, if that's what you're asking. | ||
Gavs | oh, nice | ||
13:33
lustlife joined
|
|||
Gavs | I just haven't heard about it at all, it's not in the mainstream | 13:33 | |
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 :) | ||
RabidGravy | underground is the best, same for programming languages as music ;-) | ||
notviki | Yeah, we're friendly. I mean, what other community has a hug bot? | ||
huggable: hug Gavs | 13:35 | ||
huggable hugs Gavs | |||
notviki | ^_^ | ||
Gavs | haha cute :D | ||
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? | ||
notviki | Gavs: grammars and sane concurency, we'd be my picks | 13:37 | |
RabidGravy | unicode identifiers, fabulous aynchronous programming | ||
13:37
TEttinger joined
|
|||
notviki | *would'd be | 13:37 | |
Gavs | hmm | ||
RabidGravy | rich object metamodel | ||
notviki | Gavs: Perl 6 parses itself. That's how powerful grammars are. | ||
Gavs | what are grammars about exactly? | 13:38 | |
RabidGravy | regular expressions on steroids in summary | ||
notviki | Gavs: parsing text | ||
Gavs | ah, I see | ||
notviki | Gavs: you can also do stuff when some rule finishes parsing. Here's a calculator: docs.perl6.org/language/grammars#C...g_Grammars | 13:39 | |
13:40
bjz left
|
|||
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 | ||
notviki | Gavs: as for concurrency.... I have a short lighning talk I did in a "look, shiny" format: perl6.party/post/Perl-6-What-Progra...re-Is-Like | 13:41 | |
( slides at tpm2016-2.zoffix.com/ ) | |||
Gavs | thank you | 13:42 | |
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 | ||
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 :/ | ||
RabidGravy | It does work I tried it | ||
notviki | Gavs: web is kinda of a weak point for us at the moment, due to performance. | ||
Gavs | perhaps something will come up in the future | ||
notviki | Gavs: and stability. | ||
Yeah, probably in a year or two. | 13:45 | ||
Gavs | I guess Perl could be quite powerful there | ||
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). | ||
notviki | RabidGravy: do they actually? Doesn't Bailador not support concurrent requests or has that been fixed? | ||
SmokeMachine | What's wrong? | ||
m: class A is Proxy {has $.val; has &.STORE = method ($v) {$.val = $v}; has &.FETCH = method () {$.val}}; my \a := A.bless; a = 42 | |||
camelia | rakudo-moar 8104ff: OUTPUT«Too many positionals passed; expected 1 argument but got 2 in block <unit> at <tmp> line 1» | ||
SmokeMachine | Shouldn't that work? | 13:47 | |
gfldex | SmokeMachine: you are trying to subclass a very internal class. | ||
RabidGravy | it would be nice if that worked though | ||
gfldex | the magic of Proxy is hardwired into it's new method | ||
SmokeMachine | :( | 13:48 | |
RabidGravy | I do use Proxy quite a lot | ||
gfldex | you would have to provide a new method in A that is calling Proxy.new (brain compiled) | ||
RabidGravy | yeah, I'm certain it could be made to work | 13:49 | |
SmokeMachine | I tried that to... | ||
gfldex | and you will add slowness to you program. Some benchmarking early one may save you headaches. | ||
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 = insteadat <tmp>:1------> 3ORE => method ($v) {$.val = $v}, FETCH =7⏏5 method () {$.val})}}; my \a := A.new; a» | ||
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 | |
m: class A is Proxy {has $.val; method new {callwith(STORE => method ($v) {$.val = $v}, FETCH => method () {$.val})}}; my \a := A.new; a = 42 | |||
Sorry I'm on a mobile... | |||
camelia | rakudo-moar 8104ff: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 131728 bytes» | ||
13:53
Gavs left
|
|||
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» | ||
SmokeMachine | gfldex: ^^ | 13:55 | |
RabidGravy: any idea? | |||
13:57
lustlife left
|
|||
SmokeMachine | RabidGravy: I'm glad you "liked" my advent calendar post, thanks! | 13:57 | |
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:58 | |
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 | ||
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» | ||
SmokeMachine | RabidGravy: docs.perl6.org/type/Proxy#method_new | 14:00 | |
RabidGravy | yeah I think its Positional[Pair] | ||
gfldex | RabidGravy: src/Perl6/Metamodel/BOOTSTRAP.nqp:1347 | ||
calling self.Proxy::new would return the wrong type object (Proxy instead of A) | 14:02 | ||
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 :-) | ||
*we | |||
gfldex | \o/ | 14:04 | |
double is twice as good | 14:05 | ||
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» | ||
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 | ||
camelia | rakudo-moar 8104ff: OUTPUT«Cannot look up attributes in a A type object in block <unit> at <tmp> line 1» | ||
notviki | SmokeMachine: what were you trying to do anywhay? | 14:07 | |
gfldex | The problem is that Proxy isn't using a submethod where it should. | 14:08 | |
14:08
ufobat left
|
|||
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
pyrimidi_ left,
pyrimidine joined
|
|||
gfldex | you an do it functional with hiding the private attributes in a closure. | 14:09 | |
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 | ||
camelia | ( no output ) | ||
SmokeMachine | gfldex: doing that! | ||
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
pmurias left
|
|||
gfldex | that's what I am thinking about right now | 14:12 | |
if you mixin that role, things might get wonky | 14:13 | ||
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
|
|||
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)» | ||
notviki | try using new $what: form | 14:18 | |
right now you're just calling the same postfix in infiniloop | |||
14:19
CIAvash joined
|
|||
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» | ||
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? | ||
gfldex | yes | ||
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 { .... } }" | ||
and wondered whether it could be in code rather than a gramma | 14:22 | ||
SmokeMachine | RabidGravy: notviki : kotlinlang.org/docs/reference/type...lders.html | ||
gfldex | RabidGravy: looks like sub calls that take a block as it's single argument | 14:23 | |
14:23
cibs left
|
|||
SmokeMachine | gfldex: that's how I'm implementing the HTML() function... | 14:24 | |
gfldex | dude, there is a module for that | ||
:-> | |||
github.com/gfldex/perl6-typesafe-xhtml-writer | 14:25 | ||
i'm cheating tho | |||
14:25
cibs joined
|
|||
gfldex | I use the xhtml schema to generate most of the modules code | 14:25 | |
RabidGravy | nothing cheating about that, that's what machine readable descriptions are for ;-) | 14:26 | |
gfldex | makes the rest of the code rather ugly | 14:27 | |
SmokeMachine | gfldex: thanks... throwing all my code on the garbage... | ||
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 | ||
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 | ||
gfldex | XPath is non-obvious too :-> | 14:31 | |
14:31
espadrine joined
|
|||
RabidGravy | I'm with you on 1 or 3, stopped using perlmonks ten years ago | 14:31 | |
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
|
|||
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:34 | |
so I can foresee a proliferation | 14:35 | ||
gfldex | no reason not to put OO and functional into the same module | ||
that's what commit bits are fore | |||
RabidGravy | there are no reasons to do it either | ||
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? | ||
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:37 | |
SmokeMachine | gfldex: that was more a way to study than a project... | 14:38 | |
gfldex | SmokeMachine: it resulted in a bug-report. So it's all good. | 14:39 | |
notviki | m: "foo.txt".IO.&({.parts<basename>.subst: .extension, "doc"; $_}).say | 14:51 | |
camelia | rakudo-moar 8104ff: OUTPUT«"foo.txt".IO» | ||
moritz | what's a file exxtension? | ||
in foo-1.2.3.tar.gz, is the file extension tar.gz or just gz? | |||
and doesn't that change whether you talk about using gunzip or tar? | |||
notviki | m: "foo-1.2.3.tar.gz".IO.extension.say | ||
camelia | rakudo-moar 8104ff: OUTPUT«gz» | ||
notviki | It's gz! :) | ||
gfldex | file extensions are defined for DOS | ||
the convention is 'the last thing behind a dot in a basename' | 14:52 | ||
m: "foo.txt.txt".IO.&({.parts<basename>.subst: .extension, "doc"; $_}).say | 14:53 | ||
camelia | rakudo-moar 8104ff: OUTPUT«"foo.txt.txt".IO» | ||
gfldex | m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, '') | ||
camelia | rakudo-moar 8104ff: OUTPUT«/foo/bar.buz» | ||
gfldex | m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, 'txt') | ||
camelia | rakudo-moar 8104ff: OUTPUT«/foo/bar.buztxt» | ||
gfldex | m: my $extension = 'buz'; say '/foo/bar.buz.buz'.subst(/'.' <$extension> $/, '.txt') | ||
camelia | rakudo-moar 8104ff: OUTPUT«/foo/bar.buz.txt» | ||
rightfold | notviki: TIL .& | 14:54 | |
$out.subst(/'.purs'$/, ".purspg").IO works :-) | 14:55 | ||
notviki | m: sub cool { $^z.uc }; "neat".&cool.say | ||
camelia | rakudo-moar 8104ff: OUTPUT«NEAT» | ||
15:00
jkaye joined
15:02
lustlife joined
|
|||
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:03 | |
notviki | What's "<:"? | 15:04 | |
moritz | m: role A[Cool:D ::T] { method t { T } }; say A[42].t | 15:05 | |
camelia | rakudo-moar 8104ff: OUTPUT«(Int)» | ||
gfldex | jkaye: yes, use a subset | ||
SmokeMachine | Shouldn't .extension be rw? | ||
moritz | nope | ||
gfldex | jkaye: see docs.perl6.org/language/typesystem...Parameters | ||
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|niecza|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|p6|nr|nqp-q|rn|r-m|m|nrP|rj|p56|nqp|rakudo|sm|r-jvm|nPr|Prn|n|nom|nqp-m)(?^::\s(?!OUTPUT)) | ||
..$perl6_program> | |||
moritz | uhm, most of those are probably outdated | ||
p: say 42 | |||
P: say 42 | |||
camelia | pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory» | ||
TEttinger | ha wow | ||
nrP: say 42 | 15:07 | ||
15:07
camelia left
|
|||
TEttinger | oh | 15:07 | |
camelia come back! | |||
RabidGravy | bad TEttinger BAD BAD | ||
moritz | M: say 42 | 15:08 | |
15:08
camelia joined
|
|||
TEttinger | yay | 15:08 | |
star-j: say 42 | |||
std: say 42 | 15:09 | ||
j: say 42 | |||
jkaye | gfldex: Excellent! I've been looking for this exact documentation for an hour or so. Thank you | ||
TEttinger | I wonder if I'm ignored | ||
moritz | niecza: say 42 | ||
TEttinger | m: say 42 | ||
oh crud | |||
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…» | ||
moritz | TEttinger: stop flooding it please :-) | ||
camelia | ..rakudo-jvm 8ca367: OUTPUT«42» | ||
..pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory» | |||
15:09
ChanServ sets mode: +v camelia
|
|||
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…» | ||
..rakudo-jvm 8ca367: OUTPUT«42» | |||
moritz | TEttinger: after a rejoin, it needs a while to work around its rate limit | ||
camelia | ..rakudo-jvm 8ca367: OUTPUT«42» | ||
..pugs: OUTPUT«sh: /home/camelia/.cabal/bin/pugs: No such file or directory» | |||
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 | ||
star-j 2016.10: OUTPUT«No such file or directory» | |||
std : OUTPUT«No such file or directory» | |||
niecza : OUTPUT«(timeout)cat: /home/camelia/niecza/VERSION: No such file or directoryReceived 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 protocolReceived line camelia #perl6-dev…» | |||
15:10
lukaramu left
|
|||
TEttinger | uh wha | 15:10 | |
moritz | nqp-parrot: say(42) | ||
camelia | nqp-parrot: OUTPUT«No such file or directory» | ||
moritz | nqp-json: say(42= | ||
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];» | ||
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 | ||
moritz | prof-m: say 42 | ||
camelia | prof-m : OUTPUT«No such file or directory» | ||
.. Prof: p.p6c.org/3bb61c3 | |||
jkaye | The latter does work which actually surprised me a bit, but it doesn't seem to communicate the intent quite as well | ||
gfldex | jkaye: I would not expect the returns form to work | ||
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 directorynow running scp.../tmp/mprof.html: No such file or directory» | ||
.. Prof: p.p6c.org/3bb61d9 | |||
jkaye | gfldex: Yeah, I was really surprised when it worked | ||
moritz | TEttinger: niecza, rakudo, Pugs | ||
TEttinger | oh wow | ||
moritz | std: say 42 | ||
camelia | std : OUTPUT«No such file or directory» | ||
TEttinger | I can see why that crashes it... | ||
moritz | p5-to-p6: print("42\n") | ||
camelia | p5-to-p6 : OUTPUT«# Do not edit this file - Generated by Perlito5 9.021print('42' ~ chr(10))» | ||
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 | ||
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? | ||
TEttinger | no, I mostly mean there seems to be some mix of input and output in this current session | 15:14 | |
m: say 42 | |||
camelia | rakudo-moar 8104ff: OUTPUT«42» | ||
dalek | albot: 7dd2944 | moritz++ | evalbot.pl: Remove some targets that don't work anymore |
||
TEttinger | hooray | ||
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 | ||
camelia | rakudo-moar 8104ff: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: s used at line 1» | ||
lustlife | hi,i see some code here => 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
|
|||
gfldex | jkaye: please file a bug report | 15:15 | |
jkaye | gfldex: Sure thing if you think that's actually a bug | 15:16 | |
moritz | lustlife: what error do you get? | ||
lustlife | m: sub powers_of ($radix) { $radix «**« [0 ... 10] }; say powers_of(2)[^5]; | ||
camelia | rakudo-moar 8104ff: OUTPUT«(1 2 4 8 16)» | ||
SmokeMachine | Is there any plan to "create" a rakudo to iOS? | ||
jkaye | I'm usually hesitant to think it's misuse :) | ||
gfldex | jkaye: if you get a type object from `my $T = Logger[LogEntryType]`, than it's a bug | ||
15:17
camelia left,
camelia joined
|
|||
lustlife | m: sub powers_of ($radix) { $radix «**« [0 ... *] }; say powers_of(2)[^5]; | 15:17 | |
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
ChanServ sets mode: +v camelia
|
|||
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 | ||
use X** instead, which is lazy | |||
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) | ||
camelia | rakudo-moar 8104ff: OUTPUT«(1 2 4 8 16)» | ||
moritz | M-Illandan: no | ||
sorry, meant notviki (no) | |||
notviki | aw :( | ||
moritz | notviki: you could look into the git blame, maybe the commit that introduced them gives you some idea | 15:20 | |
dalek | c: 8f2fa9f | gfldex++ | doc/Language/typesystem.pod6: index role (typesystem) |
||
synopsebot6 | Link: doc.perl6.org/language/typesystem | ||
15:21
pmurias joined
|
|||
lustlife | moritz: thx , it works, learn that hyperops are eager. | 15:23 | |
15:26
bstamour joined,
TimToady left
15:28
pierre_ left
|
|||
lustlife | moritz: how can i know weather | 15:28 | |
15:29
bstamour left
|
|||
lustlife | moritz: how to know whether an operator is lazy or not? | 15:30 | |
15:32
TEttinger left,
TimToady joined
15:36
jkaye left
15:38
jkaye joined
15:42
zakharyas left
15:48
jkaye left
15:54
ufobat left
15:55
lustlife left
15:58
bstamour joined
15:59
pierre_ joined
|
|||
bstamour | Happy holidays everyone! | 16:03 | |
16:05
plicease joined
16:09
wamba joined
|
|||
notviki | Happy! | 16:10 | |
tailgate | happy jolidays | 16:21 | |
16:21
espadrine_ joined
16:22
espadrine left
|
|||
moritz | Merry Christmas! | 16:22 | |
RabidGravy | መልካም ገና | 16:29 | |
tailgate | some of those characters need to become operators | ||
RabidGravy | I wouldn't know how to type any of them unfortunately | 16:31 | |
but gist.github.com/jonathanstowe/9e6d...abf210641d | |||
it's a shame I have to have "use" in the script though | 16:32 | ||
16:34
KinkkoPekkonen joined
|
|||
KinkkoPekkonen | hey what ide u use? | 16:34 | |
RabidGravy | ide? | ||
KinkkoPekkonen | every time I come back to perl6 it kinda lacked some nice setup | ||
what editor | |||
atom? | |||
vim? | |||
what makes u most comfortable with perl6 | 16:35 | ||
RabidGravy | I use vim (or whatever vi like thing thing is around) | ||
KinkkoPekkonen | u compile stuff manually like in next terminal | ||
notviki | I use atom | ||
bstamour | I use emacs. Just like I do for everything else | ||
RabidGravy | can't abide graphical editors | ||
16:36
pierre_ left
|
|||
KinkkoPekkonen | is there some addition for atom? | 16:36 | |
tailgate | are there even perl5 oriented IDEs? | ||
KinkkoPekkonen | usually languages have shiny stuff in vim atom or stuff? | ||
16:36
Ven joined
|
|||
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 | ||
tailgate: Pedro or whatever it's called? | 16:37 | ||
Padre | |||
KinkkoPekkonen | I used one tool padre or what not | ||
but it crashed often | |||
I don't mind vim or atom | |||
notviki | Yeah, I had the same experience with it | ||
KinkkoPekkonen | I thought some experienced old wolf of perl6 has comfortable workflow going on for him | ||
and does not mind sharing | |||
or her | |||
RabidGravy | there's some plugin for Eclipse too, but y'know, Eclipse | ||
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 | ||
:-D | |||
notviki | 15 years isn't nearly a decade ;) | ||
RabidGravy | I just work with code the same as I have been working with code for twenty five years | ||
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 | ||
KinkkoPekkonen | well something really cool is what clojure has that send to repl thing | ||
notviki | we have the repl | ||
just run `perl6` without any args | |||
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 | ||
who payed you? | |||
tailgate | IBM | ||
KinkkoPekkonen | nice | ||
16:41
pierre_ joined
|
|||
tailgate | eclipse plugins themselves are pretty fun to write, but a lot of the related java tech like EMF is overengineered | 16:41 | |
16:42
pyrimidine left
|
|||
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 | |
of course writing the outpur to a separate buffer is a new problem | |||
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'? | ||
KinkkoPekkonen | it's quite nice and comfortable thing | ||
RabidGravy | no | ||
pmurias, none really | |||
it just seems to make people happy for some reason | |||
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 | |
if you have tmux than it's nice | |||
16:44
Ven left
|
|||
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
|
|||
tailgate | especially when you are learnign the language | 16:44 | |
I think a short test file makes me context switch in my head | 16:45 | ||
16:45
pierre_ left
|
|||
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 | ||
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 | ||
pmurias | tailgate: I want it in my vim not in intelliJ ;) | 16:48 | |
16:48
pyrimidine joined
|
|||
tailgate | I think vim-perl6 is pretty good | 16:48 | |
mst | 72.14.189.113/tmp/feed 72.14.189.113/tmp/feed.1 | ||
^^ for feeding a chunk of buffer to a repl | 16:49 | ||
tailgate | I need to push up my snippets though | ||
mst | RabidGravy: ^^ maybe or may not be of any use, I can relay comments to the author | ||
notviki | 404s | ||
RabidGravy | mst++ | 16:50 | |
mst | notviki: oh? bah | ||
must've been more tmp-orary than I thought | |||
cocks. I shall request a real URL or provide one myself. | 16:51 | ||
16:53
pyrimidine left
16:54
khw joined
16:56
araujo left
16:58
KinkkoPekkonen left
|
|||
tailgate | \ | 17:09 | |
mst | RabidGravy: have poked author, will re-link when I have a stable URL | 17:10 | |
RabidGravy | groovesome | 17:11 | |
notviki | grusome? | 17:12 | |
17:13
araujo joined,
ufobat left
|
|||
pmurias | nqp-m: my $bar := 4;my int $foo2 := $bar || 200;say($foo2); | 17:16 | |
camelia | nqp-moarvm: OUTPUT«0» | ||
17:20
pochi joined
|
|||
b2gills | I wrote an evaluator for a made up language for a Code Golf post codegolf.stackexchange.com/questio...ent-253845 | 17:21 | |
17:26
skids joined
17:27
espadrine_ is now known as espadrine
|
|||
pmurias | m: my int $foo = 4; my int $bar = 200; say(($foo || $bar)); | 17:28 | |
camelia | rakudo-moar 1374fc: OUTPUT«1» | ||
pmurias | ^^ is that correct? | ||
gfldex | m: my int $foo = 4; my int $bar = 200; say(so ($foo || $bar)); | 17:33 | |
camelia | rakudo-moar 1374fc: OUTPUT«True» | ||
gfldex | m: my int $foo = 4; my int $bar = 200; say(so $foo || $bar); | ||
camelia | rakudo-moar 1374fc: OUTPUT«True» | ||
gfldex | pmurias: that's a bug | 17:34 | |
m: say so 4; | 17:35 | ||
camelia | rakudo-moar 1374fc: OUTPUT«True» | ||
17:42
floutenvy joined,
lluchs left
17:43
espadrine left
17:44
geekosaur left
17:46
geekosaur joined
|
|||
notviki | RTed rt.perl.org/Ticket/Display.html?id=130404 | 17:50 | |
17:52
floutenvy left
|
|||
mst | RabidGravy: github.com/thrig/scripts/tree/master/misc | 17:53 | |
RabidGravy: 'feed' in there | |||
RabidGravy | mst, nice one, but it appears to want Tcl, What is this 1995? ;-) | 17:55 | |
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 | ||
corr so it is | 17:58 | ||
proper old skool stylee | |||
mst | I kinda like Tcl, it's like bash bitten by a radioactive lisp | ||
also they shipped an OO system with a MOP in core before we did ;) | 17:59 | ||
18:03
vendethiel joined
|
|||
vendethiel | SmokeMachine: had you seen github.com/vendethiel/Sixcheck when you wrote Test::Fuzz? | 18:03 | |
SmokeMachine | vendethiel: no... opening... | 18:05 | |
vendethiel | I... definitely need to write a README... | 18:06 | |
I think the test file should tell you what it does in the meantime | |||
18:07
pyrimidine joined
18:09
pyrimidine left,
pyrimidi_ joined
|
|||
notviki | test file for docs.... so pre-Christmas-Perl-6-y :) | 18:09 | |
vendethiel | yup | ||
I need to get it done, but I got stuck on some stuff while I was writing it. | 18:11 | ||
SmokeMachine: I also wrote an article pretty much on that topic last year: perl6advent.wordpress.com/2015/12/19/ | 18:12 | ||
18:12
cognominal left
|
|||
samcv | no readme :( | 18:17 | |
18:18
pyrimidi_ left
|
|||
vendethiel | we did establish that :P | 18:18 | |
notviki | But it doesn't hurt to make you feel extra bad about it ;) | 18:19 | |
vendethiel | it does, it's just noise :) | 18:20 | |
18:28
rburkholder left
|
|||
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? | ||
tailgate | I'm using (foo|bar \s \d+) but it's not quite right | ||
there's no OR in the sentence, | 18:30 | ||
notviki | tailgate: because that's "foo" or "bar followed by stuff" | ||
vendethiel | no, indeed. here, you have either foo, either bar and space and a number | ||
you want to group around that OR as well | |||
tailgate | ((foo|bar) \s \d+) | 18:31 | |
notviki | Use [] | ||
vendethiel | you can do that, but you're gonna capture foo|bar again. | ||
You can use [] in the inner group to not capture them instead. | |||
moritz: perlgeek.de is down? | 18:32 | ||
tailgate | thanks | ||
vendethiel | uh, it seems searching for "run" in docs.perl6 gives out the whole website... mmh. | 18:33 | |
notviki | vendethiel: what do you mean? | 18:41 | |
Looks fine to me: i.imgur.com/NYkk1ma.png | |||
vendethiel | seems a bit too much when there's a perfect match :-). | 18:42 | |
(well volunteered!) | |||
notviki | I think there's a ticket for that | ||
18:46
FROGGS joined
|
|||
culb | Merry Christmas. | 19:00 | |
notviki | Happy Festivus! | 19:05 | |
Hanukkah Sameach! | |||
19:09
ufobat joined
|
|||
RabidGravy | ACIEEEED! | 19:09 | |
19:12
mr_ron joined
|
|||
rightfold | Leuke kerst | 19:14 | |
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 ? github.com/perl6/roast/blob/master...ence.t#L48 | 19:16 | |
camelia | rakudo-moar 1374fc: OUTPUT«ok 1 - on right side . is tighter than methodcall» | ||
rightfold | vendethiel: lol "venndethiel" | ||
19:17
espadrine joined
|
|||
vendethiel | rightfold: vendethiel was already taken! and since "venn" means friend it sounded good | 19:18 | |
moritz | vendethiel: looking into it | 19:21 | |
19:25
darutoko left
19:29
CIAvash left
|
|||
rightfold | vendethiel: someone did another post on quickcheck btw recently | 19:35 | |
vendethiel | rightfold: check out the log from ~7pm | ||
rightfold | oh XD | ||
19:35
ufobat left
19:38
espadrine left
|
|||
rightfold | SmokeMachine: have you considered multi sub instead of augment for generate-samples? | 19:39 | |
SmokeMachine | rightfold: that's a good idea! | 19:40 | |
I'll change it! | 19:41 | ||
rightfold: are you reading the master branch? The next version is de role branch... | 19:42 | ||
rightfold | yeah I was | 19:43 | |
19:43
djbkd joined
|
|||
SmokeMachine | rightfold: I think the branch role is a better code... | 19:44 | |
20:08
pyrimidine joined
|
|||
Xliff | What's the best way to do a system level rakudobrew? | 20:09 | |
20:09
pyrimidine left
20:10
Wanderer68 joined,
pyrimidine joined
|
|||
mst | Xliff: stick it in /usr/local/rakudobrew and then symlink the stuff you want into /usr/local/bin maybe? | 20:11 | |
geekosaur would likely avoid rakudobrew for maintaining a system installation | 20:12 | ||
it's better for hacking around than distribution | |||
20:12
ufobat joined
|
|||
mst | yes, I'd much prefer to build a straight rakudo release in /usr/local/ but | 20:12 | |
20:15
pyrimidine left
|
|||
Xliff | I'm using /opt/rakudo | 20:16 | |
Thus everything can be found in /opt/rakudo/bin | 20:17 | ||
mst | also works | ||
Xliff | And this is an EC2 box that has noone else on it. | ||
Then I'm going to try to write a sample Bailador app for something. :/ | |||
notviki | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 20:21 | |
20:21
domidumont joined,
domidumont left
20:22
domidumont joined
20:23
vendethiel left
20:26
domidumont left
20:27
domidumont joined
|
|||
Xliff | Wow! EC2 just throttled at stage parse. | 20:27 | |
It usually never takes longer than a minute. :/ | 20:28 | ||
notviki | Xliff: rakudo's stage parse? | ||
Xliff | Yup | ||
notviki | weird. I too noticed a 15-20 second increase in its time :/ | ||
Xliff | This is more like minutes. | ||
notviki | in like the last 2 days | ||
Xliff | Which it will say if it ever completes. | 20:29 | |
I don't know why it wouldn't... but that's the whole reason for this experiment. | |||
"Is EC2 a viable rakudo install base?" | |||
I would have expected this image to blow through the rakudo install process. | |||
20:30
lichtkind_ joined
20:34
lichtkind__ left
20:37
lukaramu joined
|
|||
Xliff | Aaannnd... that would be because this EC2 instance is way underspec'd. | 20:40 | |
< 1G of mem | |||
MoarVM finally panicked at stage parse. | |||
I will have to relook into this, later. :/ | 20:41 | ||
20:41
khw left
|
|||
notviki | use moar swap | 20:41 | |
you need like 2-2.5GB of RAM for install | |||
Or 1.8GB I think. | 20:42 | ||
notviki tries to measure | |||
20:45
ufobat left
|
|||
notviki | 163.28user 2.27system 2:46.06elapsed 99%CPU (0avgtext+0avgdata 1381080maxresident)k | 20:45 | |
8inputs+77448outputs (0major+956435minor)pagefaults 0swaps | |||
That's for make install after making source change | |||
20:46
Wanderer68 left,
Wanderer68 joined,
Wanderer68 left
|
|||
dalek | rl6-most-wanted: 209e601 | (Tom Browder)++ | most-wanted/modules.md: add USNO API module |
20:49 | |
20:53
jkaye joined
20:54
bjz joined
|
|||
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(:formatter(DefaultFormatter.new()));` If I manually set $logger.formatter to the same DefaultFormatter.new() object after constructing $logger, everything works as expected | 20:56 | |
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;` | ||
(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]? | ||
jkaye | Let me give it a shot | ||
notviki | do you use submethod BUILD or your own method new by any chance? | ||
jkaye | I have not overridden any of the defaults, just added a method or two | 20:59 | |
Different error but the same gist: No such method 'format' for invocant of type 'Any' | |||
Leading me to believe it's not getting set somehow | |||
notviki | ummm.... | 21:00 | |
Can you show us full code we can run? | |||
There's no 'format' in what you've shown so far. | |||
jkaye | Was just going to get that for you: pastebin.com/yYe9KAk0 | ||
That's the full code I'm trying to work with currently | |||
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 | ||
The errors are at run time | |||
my $logger = getLogger('anything'); | 21:02 | ||
moritz | note that Perl 6 is not Haskell | ||
jkaye | my $entry = LogEntry(message => 'hello'); | ||
$logger.info($entry); | |||
moritz | you should try to play to Perl's strenths, not to overexert it | ||
jkaye | moritz: Surely, but this would not seem like overexertion to me.. This is pretty basic stuff | 21:03 | |
rightfold | So complex | ||
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 | ||
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 | |
notviki: One second, I'll add my commands to the paste | |||
mspo | so is perl 7 being released today or what? | 21:06 | |
notviki | mspo: it was already | ||
mspo: rakudo.org/downloads/star/ | |||
mspo | 2016-11-27 17:52 :) | 21:07 | |
21:11
pyrimidine joined
|
|||
notviki leaves for a quick jam session | 21:12 | ||
21:13
pierre_ joined
|
|||
jkaye | Sorry about that, here you go: pastebin.com/5dj8Hzwu | 21:13 | |
tbrowder | Merry Christmas, #perl6 | 21:16 | |
i'm looking for advice on module categories (names) | |||
geekosaur | isn't that one of the two hardest problems in CS? >.> | 21:17 | |
tbrowder | i need a tree class and have made one using the p6 tree traversal TreeNode on rosettacode.org as a starting point. | 21:18 | |
in | 21:19 | ||
i am considering making a public module of one or the others | 21:20 | ||
other and seek advice on naming for the ecosystem. the category seems to be data structures, trees or graphs, types of such | 21:21 | ||
so a name something like Data::BinaryTree or??? | 21:22 | ||
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:26 | |
moritz | tbrowder: sounds good | 21:27 | |
21:27
labster joined
|
|||
gfldex | jkaye: I'm golfing your example right now. | 21:27 | |
jkaye | gfldex: Awesome | 21:28 | |
21:28
AlexDaniel joined
|
|||
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 | ||
gfldex: why not share it? | 21:31 | ||
So we all know and learn. | |||
samcv | eek ok so looks like mass-chars.t doesn't test what we're trying to test at_all | ||
gfldex | he may be gone already | ||
jkaye | notviki: Not always, ie. if $_ is Any (missing key) | ||
notviki | m: say Any ~~ Any | ||
camelia | rakudo-moar 1374fc: OUTPUT«True» | ||
notviki | jkaye: still true | ||
when smartmatches | |||
jkaye | it coerces to Bool | ||
In given | |||
notviki | m: given Any { when $_ { say "test" } } | ||
camelia | rakudo-moar 1374fc: OUTPUT«test» | ||
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
domidumont left
|
|||
jkaye | If I pass in something with a missing key it does die | 21:32 | |
Ogg | |||
samcv | which actually tests against actual unicode things, not just starters/non-starters (not checking other properties) | ||
jkaye | Odd | ||
notviki | m: given False { when $_ { say "test" } } | ||
camelia | ( no output ) | ||
samcv | notviki, if i remove a test from roast when it's in spectest rakudo it will fail yes :P | ||
notviki | samcv: no, it's just issue a warning that a file is missing | ||
samcv | ah ok | ||
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⏏5FalseFalse» | ||
samcv | yeah so the 4 tests we're failing (todo'd) in that file, we're not really failing. but | ||
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 | ||
samcv | generating the concept of graphemes from the file it has as its source is not a good idea | ||
jkaye | notviki: Will make the change, thanks for the info | ||
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 | ||
Bye for now | |||
21:34
jkaye left
|
|||
AlexDaniel | \o | 21:34 | |
o/ | |||
notviki | | | 21:35 | |
λ | |||
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 | ||
that is fine | 21:37 | ||
21:37
kurahaupo joined
|
|||
samcv | i mean the test is fine in that revision | 21:37 | |
but updates to unicode have made it so the script which generated that test are not accurate and probably never will be | |||
notviki | ok | ||
samcv | because the file it generates it from does not map codepoints to graphemes 1->1 | 21:38 | |
so it was fine since unicode didn't include any joining characters in the older tests | |||
but now we fail some of them because the tests contains them, so it was never really a dependable thing anyway | |||
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 | ||
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 | ||
camelia | rakudo-moar 1374fc: OUTPUT«(C)» | ||
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. | ||
notviki | OK | ||
samcv | since i already wrote a proper test which tests the same thing | ||
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 | ||
samcv | advent of code? | 21:40 | |
gfldex | m: role R {}; say R.defined; | ||
camelia | rakudo-moar 1374fc: OUTPUT«False» | ||
tailgate | adventofcode.com | ||
much like our advent calendar, a problem a day | |||
21:41
jkaye joined
|
|||
notviki | samcv: you're saying we're failing 6.c-errata tests now? :/ | 21:41 | |
samcv | no | ||
notviki | OK | 21:42 | |
samcv | 6.c-errata is fine | ||
notviki says "I don't know" and goes to play video games :) | |||
samcv | :) | ||
21:45
cognominal joined
21:50
pierre_ left
21:51
pierre_ joined
21:52
ufobat joined
21:55
Gasher joined,
pierre_ left
21:58
kaare_ left
|
|||
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:58 | |
(i think) | 21:59 | ||
actually he is adding one value to that Hash but that is not a proper class instance. | 22:02 | ||
%logger-registry{LogEntry} = DefaultLogger[LogEntry].new(:formatter(DefaultFormatter.new())); | 22:03 | ||
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:04 | ||
rightfold | My favorite logger interface is Callable. You can combine loggers with ;, add filters with if, and add transformations with function composition :) | 22:05 | |
gfldex | m: role R1 {}; role R2[R1 ::T1] {}; R2[R1].new | 22:11 | |
camelia | ( no output ) | ||
gfldex | there we go | ||
m: role R1 {}; role R2[R1 ::T1] {}; say R2[R1].new | |||
camelia | rakudo-moar 1374fc: OUTPUT«R2[R1].new» | ||
gfldex | m: role R1 {}; role R2[R1 ::T1] {}; say R2[R1].new.^mro | 22:12 | |
camelia | rakudo-moar 1374fc: OUTPUT«((R2[R1]) (Any) (Mu))» | ||
gfldex | i'm not sure that makes sense | 22:13 | |
dalek | rl6-most-wanted: 9476433 | (Tom Browder)++ | most-wanted/modules.md: want a binanary tree |
||
22:14
bjz left
22:16
wamba left
|
|||
geekosaur | bananary tree? | 22:17 | |
notviki | :) | 22:18 | |
22:19
mr_ron left
|
|||
dalek | rl6-most-wanted: b7d06e7 | (Tom Browder)++ | most-wanted/modules.md: need n-ary tree |
22:22 | |
gfldex | notviki: I believe jkaye get hit by #RT127256 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127256 | ||
tbrowder | s/binanary/binary/ stupid github editor can't read my mind | 22:23 | |
timotimo | what's your nana got to do with it | 22:24 | |
22:27
grumbells is now known as grumble
22:30
Tonik left
|
|||
SmokeMachine | Any plan to run rakudo on iOS? | 22:51 | |
AlexDaniel | :o | ||
22:52
pierre_ joined
|
|||
SmokeMachine | Something like this: itunes.apple.com/us/app/pythonista...79881?mt=8 | 22:53 | |
rightfold | you won't get JIT though | 22:55 | |
SmokeMachine | If it runs... | 22:56 | |
22:57
pierre_ left
|
|||
SmokeMachine | Do you think is it possible? | 22:57 | |
23:00
TEttinger joined
|
|||
rightfold | don't see why not | 23:02 | |
if it works on ARM | |||
SmokeMachine | I just should Cross compile and should that work? | 23:03 | |
23:04
ufobat left
|
|||
RabidGravy | toodles | 23:07 | |
23:12
RabidGravy left
|
|||
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» | ||
rightfold | m: ("a.txt" .. "aa.txt").List.perl.say | ||
camelia | rakudo-moar 1374fc: OUTPUT«("a.txt",)» | ||
rightfold | is this expected? | ||
23:13
FROGGS left
|
|||
AlexDaniel | m: say ‘a.txt’.succ | 23:13 | |
camelia | rakudo-moar 1374fc: OUTPUT«b.txt» | ||
geekosaur | m: ("a.txt" ... "aa.txt").List.perl.say | 23:14 | |
camelia | rakudo-moar 1374fc: OUTPUT«("a.txt",)» | ||
gfldex | rightfold: yes | ||
AlexDaniel | m: say ("a.txt" .. "aa.txt")[^10] | ||
camelia | rakudo-moar 1374fc: OUTPUT«(a.txt Nil Nil Nil Nil Nil Nil Nil Nil Nil)» | ||
gfldex | say "file-001.txt".succ | ||
m: say "file-001.txt".succ | |||
camelia | rakudo-moar 1374fc: OUTPUT«file-002.txt» | ||
gfldex | m: say "file-001a.txt".succ | ||
camelia | rakudo-moar 1374fc: OUTPUT«file-001b.txt» | ||
rightfold | gfldex: it seems strange that .. behaves differently from repeated .succ | 23:15 | |
gfldex | a range is not a list of values | 23:16 | |
converting it to a list may or may not make sense, depending on the range | |||
AlexDaniel | so how does the range determine the next value? | ||
or values in between | 23:17 | ||
gfldex | heuristic | ||
if you want a proper list you need to take care about the start and end points | |||
AlexDaniel | but… | 23:18 | |
gfldex | the docs could be better tho | ||
notviki | AlexDaniel: in this case, using sequence op | ||
For single-letter Str, it increments ord values | 23:19 | ||
AlexDaniel | notviki: what sequence op? | ||
notviki | … | ||
AlexDaniel | m: say ("a.txt" .. "aa.txt")[^10] | ||
camelia | rakudo-moar 1374fc: OUTPUT«(a.txt Nil Nil Nil Nil Nil Nil Nil Nil Nil)» | ||
23:19
cpage_ left
|
|||
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)» | ||
notviki | For the rest, it uses .succ, with a fast-path for integer ranges | 23:20 | |
mst | m: say "z.txt".succ | ||
camelia | rakudo-moar 1374fc: OUTPUT«aa.txt» | ||
mst glares | |||
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!! | ||
mst | say ("a.txt", *.succ, ... "aa.txt")[^10] | ||
gfldex | m: say ('a.txt', *.succ ... 'aa.txt')[20..30] | ||
camelia | rakudo-moar 1374fc: OUTPUT«(u.txt v.txt w.txt x.txt y.txt z.txt aa.txt Nil Nil Nil Nil)» | ||
mst | oh, good, I almost got it right | ||
timotimo | AlexDaniel: it probably fails to cmp 'a.txt' to 'aa.txt' correctly? | ||
notviki | AlexDaniel: .. works same as … in this case | 23:22 | |
AlexDaniel: github.com/rakudo/rakudo/blob/nom/...ge.pm#L299 | |||
AlexDaniel | timotimo: I guess so, but people here are claiming that everything is ok? | ||
timotimo | m: say ("a.txt" .. "z.txt")[^10] | ||
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)» | ||
notviki | Is anyone claiming that something's not OK? | ||
timotimo | m: say "a.txt" leg "aa.txt" | 23:23 | |
camelia | rakudo-moar 1374fc: OUTPUT«Less» | ||
timotimo | but that should make it use .succ | ||
AlexDaniel | notviki: yes? | ||
notviki | AlexDaniel: so what is it? | ||
mst | notviki: seems like '..' is being insufficiently smart, but only in odd cases | 23:24 | |
AlexDaniel | m: say ("x.txt" .. *)[^10] | ||
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 left,
pyrimidine joined
|
|||
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)» | ||
geekosaur | hasn't this been discussed before? it's a bad interaction between a couple of DWIMs iirc | ||
AlexDaniel | notviki: ↑ this does not make any sense | ||
notviki | AlexDaniel: the first uses .succ, the second goes to the sequence. | ||
geekosaur | and no good way to resolve it | 23:25 | |
notviki | AlexDaniel: it makes perfect sense | ||
AlexDaniel | :o | ||
notviki | m: say 42 | ||
camelia | rakudo-moar 1374fc: OUTPUT«42» | ||
notviki | m: say "foo" | ||
camelia | rakudo-moar 1374fc: OUTPUT«foo» | ||
AlexDaniel | ok, so far so good | ||
notviki | AlexDaniel: ↑ this does not make any sense | ||
AlexDaniel | notviki: it does, you printed 42 and then you printed foo | 23:26 | |
notviki: but in the examples above, I asked for 10 elements from "x.txt" to whatever it gets | |||
and it gave me values including ac.txt | |||
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 | ||
AlexDaniel | and it's like “NO!” | ||
notviki | What does "to" mean? | ||
dalek | c: 200060b | gfldex++ | doc/Type/Range.pod6: link to infix:<...> |
||
c: a8ba75c | gfldex++ | doc/Type/Range.pod6: hint that ... is better for complex cases |
|||
synopsebot6 | Link: doc.perl6.org/type/Range | ||
AlexDaniel | I don't care as long as it is consistent | ||
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 parenthesesat <tmp>:1------> 3say ("x.txt" .. *7⏏5 .. "ac.txt")[^10] expecting any of: infix infix stopper» | ||
mst | ah, screw you, hippy | ||
AlexDaniel | m: say ("x.txt" .. "zzzzzzzzzzzz")[^10] | ||
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)» | ||
mst | ?! | 23:29 | |
notviki: from an outside POV, this is now Completely Bizarre even if it does seem to make sense to you. | |||
notviki | Well, stop abusing Range op then. | ||
gfldex | the range operator doesn't do the magic file name succ stuff | ||
AlexDaniel | what does it do then? | 23:30 | |
m: say ("x.txt" .. "「」=‹=")[^10] | |||
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
|
|||
AlexDaniel | does some other magic? | 23:31 | |
notviki | m: say "x.txt" cmp "aa.txt" | 23:32 | |
camelia | rakudo-moar 1374fc: OUTPUT«More» | ||
gfldex | m: say "x.txt".ord | ||
camelia | rakudo-moar 1374fc: OUTPUT«120» | ||
lizmat | fwiw, I've always found that behaviour of .succ surprising, but it is definitely according to speculation, afaik | ||
AlexDaniel | I don't think I have any problem with .succ | 23:33 | |
it does succ, but I can accept that | |||
my problem is with .. and … | 23:34 | ||
23:34
grondilu left
|
|||
notviki | And what's the problem? | 23:34 | |
gfldex | m: use nqp; say nqp::ord("x.txt"); | ||
camelia | rakudo-moar 1374fc: OUTPUT«120» | ||
notviki PageUps | |||
geekosaur does wonder if magic autoincrement behavior perhaps belongs elsewhere, since it interacts in such fun ways with lexical ordering and such | |||
(like, a role mixin) | 23:35 | ||
(which is opt-*in*) | |||
notviki | geekosaur: and what'd you get by default? | ||
geekosaur | I'm not sure you should get anything aside from an attempt to coerce to numeric | 23:36 | |
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
lukaramu left
|
|||
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 | ||
notviki | m: say eager "a.txt", *.succ … "aa.txt" | ||
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)» | ||
notviki | mst: OK :) | ||
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 | ||
I mean "z.txt" | |||
or "x.txt" | |||
s: infix:<cmp>, \("x.txt", "aa.txt") | |||
SourceBaby | notviki, Something's wrong: ERR: ===SORRY!=== Error while compiling -eCalling infix:<cmp>() will never work with proto signature (Mu, Mu)at -e:6------> put sourcery( ⏏infix:<cmp>, \("x.txt", "aa.txt") )[1]; | ||
notviki | s: &infix:<cmp>, \("x.txt", "aa.txt") | 23:40 | |
SourceBaby | notviki, Sauce is at github.com/rakudo/rakudo/blob/1374...r.pm#L2696 | ||
AlexDaniel | and zzzzzz is more than a.txt so it will keep trying even though it will never reach it | ||
whan about "「」=<=" though? | 23:41 | ||
notviki | .oO( make Range fallback on .succ instead of sequence ) |
||
23:41
grondilu joined
|
|||
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 | ||
AlexDaniel | m: say ("x.txt" .. "「____")[^10] | ||
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)» | ||
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 ? | ||
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 | ||
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 | ||
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 | ||
mst | ... | ||
notviki | gfldex: the above gets forwarded to ... | ||
AlexDaniel | :-/ | ||
mst | gfldex: yes. that was my point. re-read. | ||
gfldex | i c | ||
notviki | AlexDaniel: I don't know. It's a 264-line function and I'm wasted :} | ||
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:45
rindolf left
|
|||
notviki | m: say eager "aaXXXbbcc" … "aaYYYbbcc" | 23:46 | |
camelia | rakudo-moar 1374fc: OUTPUT«(aaXXXbbcc aaXXYbbcc aaXYXbbcc aaXYYbbcc aaYXXbbcc aaYXYbbcc aaYYXbbcc aaYYYbbcc)» | ||
notviki | m: "aaXXXbbcc".succ.say | ||
camelia | rakudo-moar 1374fc: OUTPUT«aaXXXbbcd» | ||
mst | ok, that's even crazier | ||
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 | |
that are different only I mean | |||
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…» | ||
notviki | 0.o | ||
m: say "XXXmstYYYY" … "XXXtestYYY" | |||
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…» | ||
notviki coughs | |||
So yeah, as you can see it all makes perfect sense! | |||
^_^ | |||
AlexDaniel | what the fucking fuck | 23:49 | |
notviki | I forget, what was the first example where you there wasn't consistency | ||
aye | |||
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)» | ||
notviki | m: m: say eager "x.txt" .. "ac.txt" | ||
camelia | rakudo-moar 1374fc: OUTPUT«()» | ||
notviki | Well, I was wrong. | ||
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… | ||
notviki | Ah, I missed "$max before $!min in code | ||
m: say "x.txt" before "ac.txt" | 23:51 | ||
camelia | rakudo-moar 1374fc: OUTPUT«False» | ||
notviki | right | ||
So it short-curcuits and returns empty | |||
m: say "x.txt" cmp "ac.txt" | |||
camelia | rakudo-moar 1374fc: OUTPUT«More» | ||
notviki | :S | ||
m: say "a.txt" cmp "aa.txt" | 23:52 | ||
camelia | rakudo-moar 1374fc: OUTPUT«Less» | ||
notviki | Well, I conceed. This doesn't make any sense. | 23:53 | |
mst | *concede | ||
(sorry) | |||
rightfold | .oO(My favorite programming languages of the month all start with a P) |
||
AlexDaniel | well, that's probably a Christmas miracle | ||
we agree on something! | |||
notviki | :) | ||
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. | ||
Maybe there are few sane rules that can explain all that. | |||
mst | ("a.txt", *.ballmer ... "aa.txt") | 23:58 | |
notviki doesn't drink anymore | |||
^_^ | |||
AlexDaniel: there was a ticket about this area. What happened to it? | 23:59 | ||
It was you and me talking. | |||
And I was saying everything is fine because templates... | |||
AlexDaniel | are you saying that we already had this conversation before? |