»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo not bad. 00:00
tadzik and then people stared to exploit it :)
timotimo i'm kinda glad the dotfiles in ~/ are getting somewhat more organized these days
with .share and .config and such
tadzik yeah
useful if you actually use hidden files and dirs :)
timotimo aye.
tadzik also, I'm glad we still have dotfiles, and not everything is in gnome-registry-thingy 00:01
timotimo yes.
tadzik I don't even remeber its name, so hopefully it's dead :P 00:02
timotimo gconf is dead
dconf is "the new hotness"
tadzik oh, gconf :)
mumble grumblie
timotimo i think dconf is in some way less sucky
but i don't know much about it
tadzik I'd rather see a nice API which does plaintext files mangling under the hood
so if you need to access it from cat and grep, it still works
timotimo aye. 00:03
dconf is a simple key-based configuration system. Keys exist in an unstructured database (but it is intended that keys that logically belong together are grouped together).
Change notification is supported. ← that's something that's not as trivial with text files
Stacking of multiple configuration sources is supported. ← that's pretty cool actually 00:04
and it's integrated with policykit
i'm going to bed now. gnite #perl6! 00:13
colomon o/ 00:15
00:20 cognominal__ left 00:29 LootingLemur joined 00:32 benabik joined 00:41 rurban joined 00:43 rom1504 left 00:44 rom1504 joined
segomos [A 00:51
01:00 LootingLemur left 01:05 Guest27230 left 01:08 __thou left 01:09 rurban left 01:18 v joined 01:21 v left 01:26 dayangkun left 01:39 dayangkun joined 01:42 Guest27230 joined 01:44 daniel-s_ joined 01:48 Guest27230 left, Guest27230 joined, Guest27230 is now known as hoverboard 01:57 bjz left 01:58 bjz joined 02:09 klapperl_ joined 02:12 klapperl left
japhb__ .u block 02:15
yoleaux U+0017 END OF TRANSMISSION BLOCK [Cc] (␗)
U+2417 SYMBOL FOR END OF TRANSMISSION BLOCK [So] (␗)
U+2580 UPPER HALF BLOCK [So] (▀)
02:16 FROGGS left 02:29 FROGGS joined 02:33 hoverboard left
lue r: say "a b c" ~~ /<.alpha> % \s/ 02:42
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter % (must be quoted to match literally)␤at /tmp/tmpfile:1␤------> say "a b c" ~~ /<.alpha> ⏏% \s/␤Unable to parse regex; cou…»
lue isn't that supposed to work?
benabik r: say "a b c" ~~ /<.alpha> *% \s/
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«「a b c」␤␤»
benabik % needs to be attached to a quantifier now, as I recall. 02:43
02:43 kaare__ joined
lue yeah, I realize now I don't want % anyway; I want to match a list of terms with some intervening separator, and /@b % \s/ won't quite DWIM :) 02:46
lue idly wonders if bare % (without repetition) could be spec'd to be used with interpolated arrays in the way he demonstrated... 02:50
benabik It makes sense to me.
lue It might mess with people who try to treat arrays as junctions there, but then again you need a quantifier for those cases already. 02:51
02:52 __thou joined
lue More interesting is how to make it work for someone who wants to interleave a non-@var list like that... might be /{<constant in-place list>} % ","/ 02:53
(similar to /thing ** {closure}/ methinks)
03:35 grep0r left 03:39 grep0r joined 04:07 xenoterracide left 04:15 __thou left 04:28 hoverboard joined 04:44 BenGoldberg left 04:45 skids left 04:47 bjz_ joined 04:48 bjz left 04:51 jnap left 05:13 rurban joined 05:22 jnap joined, xenoterracide joined 05:24 [Sno] left 05:26 jnap left 05:33 SamuraiJack joined 05:41 telex left 05:43 telex joined 06:12 molaf joined 06:21 xragnar left 06:22 xragnar joined, jnap joined 06:27 jnap left 06:32 vincent22 joined 06:33 [Sno] joined 06:37 rurban left
lue r: class A { has $.z }; class B is A { has $.z }; say "alive‽" 06:40
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«alive‽␤»
lue I'll leave that for you all to ponder. ♘ #perl6 o/
06:42 hoverboard left 06:48 FROGGS left 07:23 jnap joined
timotimo r: class A { method foo() { say "ohai" } }; class B is A { method foo() { say "goodbye" } }; say "alive!" 07:27
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«alive!␤»
07:27 bjz_ left
timotimo r: class A { has $!foo; }; class B is A { has $!foo; }; say "alive, as well" 07:27
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«alive, as well␤»
timotimo same thing as those two things
07:27 jnap left
timotimo private attributes are per-class, methods can be overridable. public attributes are a private attribute + an autogenerated method 07:28
07:39 dalek left, dalek joined, ChanServ sets mode: +v dalek 07:41 darutoko joined 07:43 virtualsue joined
masak morning, #perl6 07:51
moritz \o masak, timotimo, * 07:52
timotimo o/
== SORRY == could not deduce sequence
masak :) 07:59
moritz == SORRY == did not use sequence operator
masak == SORRY == using 'sorry' is starting to feel slightly passive-aggressive 08:01
08:03 bjz joined
moritz I'm == SORRY == about that :-) 08:03
moritz has spent way too much time playing gabrielecirulli.github.io/2048/ 08:04
08:05 bjz_ joined 08:08 bjz left 08:11 brrt joined 08:12 zakharyas joined
timotimo 3052 points <3 08:13
08:13 FROGGS joined 08:17 virtualsue left
moritz my hiscore so far has been around 16k 08:17
and I had a 1024 and a 512 tile 08:18
08:18 denis_boyun joined
moritz but as I said, I spent way too much time on it :-) 08:19
08:24 jnap joined 08:25 jnap1 joined, jnap left 08:27 jnap joined, jnap1 left
timotimo only 2944 this time ... up to a 256 tile 08:27
damn this is addicting
moritz there's a trick 08:29
collect all the big numbers in the bottom row, for example
and never use the 'up' key
08:31 jnap left
timotimo mhm 08:32
08:33 sqirrel joined 08:34 pdcawley joined 08:36 kaare__ left 08:38 kaare_ joined
timotimo with your hint i got to 3576 08:40
bleh! 08:42
just by going (up, left, down, right) xx * i got 3224 points
moritz but is it web scale? :-) 08:43
timotimo 3272 points this time 08:45
it's quite discouraging if a very simple data-independent strategy gets so close to the score you get by trying to think it out ...
08:46 kaare_ left 08:47 vincent21 joined, vincent21 left, vincent21 joined
timotimo okay, now that's just ridiculous 08:47
08:47 kaare__ joined
timotimo just going (down, left, down, right) xx * got me to 6392 just now 08:48
moritz do you automate that? :-)
timotimo no, if i automated it, i wouldn't have the opportunity for my brain to link me hitting the keys with the game merging tiles 08:49
moritz just got to 11k, with a 1024 tile
timotimo okay so the only "danger" to the down, left, down, right strategy is when your whole thing gets stuck so you can't do any of these three actions 08:51
then you have to go up and get a low-number tile in your bottom-most column
row*
after that, your bottom-most row gets stuck
08:53 fhelmberger joined
moritz there's a an alternative 08:53
timotimo yeah, i just tried one
i turned the "gravity" by 90 degrees
moritz control the pushing down so that the bottom-most row doesn't get stuck
timotimo hehe.
08:54 kaare__ left, kaare__ joined
moritz that's the part that requires thinking/attention 08:54
08:54 sqirrel left
timotimo there's an alternative 08:56
shut up with your thinking and let me watch colorful blocks with numbers merge! :D
damnit
moritz :-)
08:56 brrt left 08:57 brrt joined 09:10 arnsholt left 09:11 virtualsue joined 09:12 arnsholt joined
arnsholt I <3 SSDs 09:12
tadzik oh yes. Let's never again use anything else :) 09:15
DrEeevil I kinda dislike their binary nature
either they work, or they are a brick ;)
(and some SSDs are not worth the name ... 10 IO/s ?!?!) 09:16
tadzik isn't that just like regular hard drives? :)
DrEeevil nah, those start to have read errars and slov corrupxion
then you at least have enough time to do something
tadzik I guess you can disassemble the HDD and use the disks as those thingys-under-teacups
well, I only once heard of a broken SSD, and that was Linus' 09:17
and he has a *slight* tendency to exaggarrate...
or however you write that
DrEeevil I've had one die, and had it replaced with an "equivalent" device 09:18
... no, OCZ is not equivalent to anything else
FROGGS tadzik: I have such a under-teacup thingy :o) 09:20
I guess that is mandatory when one is working in the IT department
timotimo 16872 \o/ 09:26
moritz timotimo: that's quite good 09:27
timotimo tadzik: "coasters"
moritz: mostly luck :P
i did get a 1024 tile :)
09:28 jnap joined
timotimo moritz: you have turned me into a push-down automaton 09:30
09:32 jnap left
tadzik ah, coasters 09:37
09:44 SamuraiJack left 09:46 salv0 left 09:47 SamuraiJack joined 09:51 rindolf joined 09:53 SamuraiJack left 09:55 SamuraiJack joined 10:01 dakkar joined, salv0 joined
arnsholt timotimo: Hey, at least you can recognise center-embedding. Beats plain FSAs =) 10:01
10:04 pecastro joined 10:08 SamuraiJack left
timotimo aye 10:10
10:10 denis_boyun left 10:14 aje_ left 10:15 aje_ joined 10:17 arnsholt left, vincent22 left 10:18 vincent22 joined 10:21 kaleem joined 10:22 pmurias joined 10:24 vincent22 left 10:26 vincent22 joined 10:28 jnap joined 10:32 jnap left 10:33 SamuraiJack joined 10:34 Mouq left 10:57 xenoterracide left 11:03 brrt left 11:09 denis_boyun joined 11:29 jnap joined 11:34 jnap left 11:37 skids joined
FROGGS m: class Foo; say GLOBAL 11:42
camelia rakudo-moar 1aeb7c: OUTPUT«(GLOBAL)␤»
FROGGS m: class Foo; say $?PACKAGE
camelia rakudo-moar 1aeb7c: OUTPUT«(Foo)␤»
11:52 skids left 12:02 SamuraiJack left
timotimo r: class Foo; say GLOBAL::.keys 12:07
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«Foo␤»
12:09 SamuraiJack joined 12:15 SamuraiJack left, SamuraiJack joined 12:21 benabik left 12:22 virtualsue left
timotimo moritz: a core insight to this seems to be that you always want to have as few different numbers on the board as possible, because every number that doesn't have any other numbers near it is going to be blocking your board for a long time to come. 12:25
that's why it's pretty easy to button-mash your way to your first 256 or even 512
but after that you have to work for more points
12:30 jnap joined 12:34 jnap left 13:01 mavcunha joined 13:07 brrt joined 13:17 guru joined 13:18 guru is now known as Guest42036 13:24 skids joined, Guest42036 is now known as ajr_ 13:31 jnap joined, kbaker joined 13:35 jnap left
moritz timotimo: agreed 13:37
timotimo i'm getting somewhat far with the strategy "always seek to merge twos"
but that seems a bit short-sighted. 13:38
masak timotimo: try "always seek to (greedily) merge the highest pair possible" ? 13:45
brrt you have no other strategy than greedy do you? :-)
its not like you can backtrack 13:46
timotimo well, you have to be on-line, but you can try to be competitive against the most malevolent placer of new 2s and 4s
[Coke] is this the web game that is like the ios game threes?
brrt is also curious how the author claims 2048 is the highest obtainable value 13:47
its not obvious to me why that should be
timotimo well, if you go to 4096, you'll be spending a *lot* of time :) 13:48
but feel free to write an exhaustive search in perl6 :)
brrt hmmm 13:49
timotimo (it will also be spending a *lot* of time, except the jvm's jit may very well kick into full gear there)
gotta run now.
brrt i'm not sure you can exhaustively search in all cases
because some moves decrease the number of cells on the board
and you only finish once all cells are filled/
?
13:55 dayangkun_ joined 13:57 dayangkun left 14:02 rindolf left 14:06 jnap joined, Sqirrel joined 14:08 benabik joined, btyler joined 14:13 bluescreen10 joined
masak brrt: indeed, I'm not convinced the game cannot be sustained infinitely. 14:19
the random component essentially makes it a two-player game.
moritz it cannot 14:20
Timbus_ it would run out of space..
masak oh, if it cannot, then it should be eminently simulatable.
moritz you can't turn a 2 into a 2^18 with only 16 spaces
masak hm, right.
moritz that's also why it gets more difficult with time
masak so you *must* run out of space at some point.
Timbus_ imagine if, it wasnt a grid, but just a line of squares. and the 2 always spawned on the left, and you shifted it right 14:21
moritz the more high numbers you have, the less free space you have to navigate
Timbus_ that simplifies the problem easily
14:22 __thou joined
masak ah, it's one of those "the moves fold into the board (and make it more messy)" kind of problems. 14:25
moritz small numbers enter the board, large numbers are created by merging. The challenge is just to create the larger numbers in the correct place, adjacent to other numbers in the same order of magnitude 14:29
fragmentation kills
14:30 brrt left 14:34 brrt joined
brrt hmmm 14:34
i see 14:35
14:44 telex left 14:46 treehug88 joined, telex joined 15:02 treehug88 left 15:03 treehug88 joined
masak spryfox.com/our-games/tripletown/ is like that too -- fragmentation kills. 15:07
Go/圍棋 (allegedly) is like that too. 15:08
15:09 logie joined 15:16 rurban joined, ajr_ left 15:17 guru joined 15:19 rindolf joined 15:25 bluescreen100 joined 15:27 rurban left 15:29 kaleem left, bluescreen10 left 15:30 i0825993 joined 15:31 i0825993 left
dalek p/r2-lex-to-local: fb4ffa9 | (Elizabeth Mattijsen)++ | src/ (4 files):
Change .ast to .made where it seemed appropriate
15:32
nqp/r2-lex-to-local: 15869c8 | (Elizabeth Mattijsen)++ | src/ (12 files):
nqp/r2-lex-to-local: "past" is now a thing of the ast
15:32 dalek left 15:33 dalek joined, ChanServ sets mode: +v dalek
timotimo oh? why did these commits get reported again? 15:34
15:35 vincent21 left
jnthn Can happen if you merge a brunch 15:36
uh
a branch
.oO( bit late to be pondering brunch... )
15:37
timotimo :)
that reminds me that i'm kinda hungry
jnthn Time for lunner :P 15:38
colomon time to stir-fry! 15:41
just realized I have no green onions. time to cry.
benabik Generally I cry when I have onions. 15:42
I guess I cry when I have no pre-cut onions.
colomon benabik: I got my preliminary lists of players for Ambercon a couple of days ago… :) 15:44
benabik colomon: ooooh 15:45
colomon benabik: if those games don't go well, I have no one to blame but myself. 15:48
(ie good players)
timotimo it occurs to me 15:49
managing the fragmentation of square numbers by tidying up pairs of them
seems like a stereotypically german thing to enjoy
colomon benabik: one new thing -- this year I'm involved in as many Lords of Gossamer and Shadow games as Amber games. (three of each)
benabik colomon: Lords of Gossamer? (I assume shadow just means outside the court.) 15:50
colomon benabik: www.ritepublishing.com/dicelessroleplaying.html (It's Amber DRPG system skinned onto a new multiverse.) 15:51
jercos jnthn: bit late perhaps, that's why it'd be a merged brunch ;)
merged with dinner?
benabik colomon: Oh hey hey. Hadn't seen THAT before. 15:53
16:04 slavik left 16:05 slavik joined 16:06 vincent22 left
pmichaud good morning, #perl6 16:13
16:16 vincent__ joined
[Coke] pmichaud: o/ 16:17
timotimo greetings pmichaud :) 16:19
dalek kudo-star-daily: 38b274f | coke++ | log/ (5 files):
today (automated commit)
16:21
16:22 fhelmberger left, FROGGS left 16:25 denis_boyun left 16:26 SamuraiJack left 16:28 [Sno] left 16:29 rurban joined
timotimo another idea 16:31
you have a 4x4 grid
you can place a 2 or a 4 in any free space
then you must shift all tiles to one of four directions as if gravity affected them
tiles that rest upon each other during such a phase that have the same number merge into 2 x the number 16:32
in how few turns can you fill up the whole board?
16:35 brrt left, zakharyas left
TimToady m: my @array = <a b c>; say "a,b,c" ~~ /<{@array.shift}> +% ','/ 16:43
camelia rakudo-moar 1aeb7c: OUTPUT«「a,b,c」␤␤»
TimToady what's the big deal?
16:44 hoverboard joined
TimToady lue: ^^ 16:44
16:44 molaf_ joined
TimToady it won't backtrack, mind you 16:45
being destructive like that
one would have to arrange to return the correct @array[$i] to make it re-usable 16:46
or arrange to copy the array at the re-entrance
more realistically, you'd pull an iterator out and use that destructively 16:47
16:47 molaf left 16:48 kurahaupo joined, isBEKaml joined
TimToady perhaps one could arrange this as an <each(@array)> subrule 16:48
assuming one could get it to clone at the appropriate scope 16:49
however, the lack of demand for this up till now indicates that a solution like / :my @tmp = @array; <{@tmp.shift}> +% ',' / might be quite sufficient 16:50
that would at least be re-entrant, if not backtrackable 16:51
benabik Attempting to backtrack through code just makes the entire rule fail, yes?
TimToady no
it just ignores it 16:52
it assumes you write your code idempotently such that it doesn't matter
benabik Hm. Would have to be very careful how you use destructive iteration then, or you could end up skipping elements. 16:53
16:53 hoverboard left
TimToady yes, though generally you'd re-enter something like this from the top when you need to 16:54
if the + here backtracked it would not recalculate the LHS, it would just throw away one of the results
or generate the next one, in the case of +?
16:55 rurban left
TimToady greedy backtracking generates all the possible Cursors first; it doesn't have to regen any Cursors from the left 16:55
(unless the backtracking is violent enough to cause re-entry, but then your :my recopies the array)
so I don't think we need a new feature here 16:56
much to the surprise of those who think Perl 6 includes every feature anyone can ever think of :)
benabik Sensible.
TimToady could certainly be wrong at this stage of the morning, or of life 16:57
benabik Failure is always an option.
16:57 stevan_ left
TimToady in which case I will attempt to backtrack non-destructively :) 16:57
17:04 arnsholt joined
arnsholt o 17:04
/
Delayed wave ^_^
isBEKaml arnsholt: you got your arm detached?
arnsholt: that's what happens when you go through a time warp. splicing. :-) 17:05
17:05 guru left 17:06 kaleem joined
isBEKaml \ o 17:06
17:07 rurban joined
benabik "My arm's come off. How am I going to operate my digital watch now?" 17:08
17:11 rurban left
isBEKaml "Bluddy hell - I'll just carry this arm around!" 17:14
timotimo is remimnded of that one Space Janitors episode 17:17
17:19 isBEKaml left 17:26 rurban joined, Celelibi left 17:27 hoverboard joined 17:28 Celelibi joined, rurban1 joined
[Coke] 17:30
17:30 rurban left
timotimo 17:30
17:34 treehug88 left 17:35 kaleem left 17:36 stevan_ joined, stevan_ left 17:37 stevan_ joined 17:40 pdcawley left 17:41 pdcawley joined, raiph joined 17:42 guru joined 17:43 pmurias left 17:44 guru is now known as ajr_ 17:45 grondilu joined
raiph m: print ^Inf # for Ulti 17:45
camelia rakudo-moar 1aeb7c: OUTPUT«(timeout)0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118…»
17:47 pecastro left, denis_boyun joined 17:48 dakkar left 17:49 [Sno] joined, rurban1 left, FROGGS joined 17:59 fridim__ joined 18:00 kurahaupo left 18:13 dwarring joined 18:19 fhelmberger joined
raiph .tell Ulti warn ^Inf # I love the idea of elegant golf with P6. For example, refusing to omit spaces when it would work but be ugly. 18:27
yoleaux raiph: I'll pass your message to Ulti.
18:31 fhelmberger left 18:32 bjz_ left 18:33 fhelmberger joined
TimToady one should do token golf, not keystroke golf 18:36
'course then you have to figure out how to count tokens
:16<cafebeef> is one token, probably , but how many is :16($string) ? 18:37
and is foo() fewer tokens than foo.() ?
18:38 fhelmberger left, hoverboard left
TimToady one could do keystrokes without counting whitespace, I suppose 18:39
whitspace would correspond to a "free drop" in golf :)
when your ball token is too close to the grandstands token 18:40
or maybe it's more like lift-clean-and-place rules :) 18:41
would be a nice cultural hack to start the Clean Golf meme 18:42
ignore whitespace, allow Unicode chars as single strokes
timotimo m) 18:43
18:44 hoverboard joined 18:46 sorear left, kaare__ is now known as kaare_ 18:47 rurban joined 18:49 sorear joined 18:52 rurban left 19:04 darutoko left 19:16 salenteva joined, SHODAN left, SHODAN joined
jnthn back 19:20
masak stomach 19:21
19:24 salenteva left
segomos chest 19:27
moritz timotimo: ov3y.github.io/2048-AI/
19:28 pecastro joined
moritz ... but it doesn't win here 19:28
19:30 mesoamerica joined 19:32 Util joined, mp__ joined 19:39 xenoterracide joined
segomos moritz: thanks for ruining my work day 19:39
moritz segomos: you're welcome 19:40
19:42 skids left, mesoamerica left 19:45 skids joined 19:47 vincent__ left 19:48 vincent22 joined, rurban joined 19:53 rurban left
FROGGS score 4948 for the first run... is that good? 19:58
but I won't play it a second time, that is very addicting 19:59
jnthn
.oO( And all Perl 6 development ground to a halt as a result of a game... :) )
19:59 stevan_ left
FROGGS hehe, yeah 19:59
FROGGS .oO( only parrot will survive ) 20:00
20:02 stevan_ joined 20:03 treehug88 joined
FROGGS std: my %foo; %foo<bar> => "baz" 20:03
camelia std 09dda5b: OUTPUT«ok 00:01 125m␤»
FROGGS p6: my %foo; %foo<bar> => "baz" 20:04
camelia ( no output )
FROGGS that took my a while to spot it... in my code should have been an assignment instead...
shouldn't that warn?
lue p6: my %foo; %foo<bar> => "baz"; say %foo; 20:05
camelia niecza v24-109-g48a8de3: OUTPUT«{}␤»
..rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«().hash␤»
vendethiel ().hash ? really ? :D 20:06
lue FROGGS: I feel the same way about class A { has $.x }; class B is A { has $.x } :)
vendethiel
.oO(is {} too mainstream or something ?)
vendethiel .oO( is {} too mainstream or something ? )
lue vendethiel: TIMTOWTDI
FROGGS lue: what do you want it to do? 20:07
vendethiel lue: oh yeah, that's for sure, but I don't see why .perl doesn't return {}
lue FROGGS: I'd like it to at least warn me that I've redeclared a variable like that, it caused a subtle and annoying bug yesterday :/
masak vendethiel: it used to, but it got changed for some reason I don't remember, or may never have known. 20:08
vendethiel masak: oke!
TimToady p6: my %foo; %foo<bar> => "baz"; say $%foo;
lue vendethiel: because ().hash is just as valid, and also it probably avoids confusion with code-block-based {} :)
camelia niecza v24-109-g48a8de3: OUTPUT«{}␤»
..rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«().hash␤»
vendethiel FROGGS: should void statements produce a warning ?
masak vendethiel: same thing with arrays.
jnthn FROGGS: I've a sinking feeling that should warn... :)
TimToady p6: my %foo; %foo<bar> => "baz"; say %foo.item;
vendethiel masak: that's true
camelia niecza v24-109-g48a8de3: OUTPUT«{}␤»
..rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«().hash␤»
masak r: say [].perl
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«[]␤»
masak hm. 20:09
TimToady r: say {}.perl
FROGGS vendethiel: yes, things that clearly do not make sense should warn or fail
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«{}␤»
lue I personally think => there should work just like =
masak r: say [1, 2, 3].perl
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«[1, 2, 3]␤»
TimToady p6: my %foo; %foo<bar> => "baz"; say %foo.item.perl;
vendethiel lue: well, then you can't create a hash with a key based on a value from another hash ?
masak I distinctly remember getting Array.new(...) sometimes.
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c, niecza v24-109-g48a8de3: OUTPUT«{}␤»
TimToady yes, depends on whether it's itemized
vendethiel masak: oh, even I remember it and I've been here for like a month :p
TimToady p6: my %foo; %foo<bar> => "baz"; say $%foo.perl; 20:10
FROGGS lue: btw, I'm not even sure there is a redecl in your example
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c, niecza v24-109-g48a8de3: OUTPUT«{}␤»
FROGGS yeah
lue vendethiel: %a{%b<5>} => 1; :)
masak r: say { 4 => [] }.perl 20:11
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«{"4" => []}␤»
masak hrm.
vendethiel r: my %foo = 'a' => 1; my %bar = %foo<a> => 2; say %bar.perl;
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«("1" => 2).hash␤»
vendethiel lue: ^
That's what I meant 20:12
lue FROGGS: yeah, I realize it's not quite so simple, but I left it behind while creating a new base class, and the different methods in the new base class and the derived class affect different $!x's
vendethiel: ah, I see what you mean.
FROGGS lue: yes, that is what I expect it should do :o)
TimToady r: say (1 => 2).perl
vendethiel lue: that might be a corner-case though :)
camelia rakudo-parrot 1aeb7c, rakudo-jvm 1aeb7c, rakudo-moar 1aeb7c: OUTPUT«1 => 2␤»
lue FROGGS: not so much fun when you don't realize you forgot to delete a 'has' line :)
FROGGS lue: sure 20:13
lue: but that is something that might or might not be intentional... a compiler can not always decide there
lue I just think it'd be nice if P6 went "hey, just so you know, you declared another $!x in this derived class. Things might not work fine"
"Potential difficulties" I think it's called :)
jnthn lue: The point is that it *will* work fine.
FROGGS I don't like warning for potentionally ok things 20:14
jnthn lue: They are different attributes.
TimToady Potential difficulties: Failed to read your mind...
lue FROGGS: aren't all Potential Difficulties "potentially ok things" though?
jnthn It's important that it's that way. You should be able to subclass without having to care about what's in the parent class.
FROGGS lue: don't thinks so
think*
20:14 rindolf left
jnthn That's one of the ways Perl 6 gets inheritance righter than the likes of Java and C#, which make it easy to flaunt things in the base class through using protected... 20:15
FROGGS m: my $a; my $a # this is clearly not ok
camelia rakudo-moar 1aeb7c: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $a␤ at /tmp/2vCz8FTAwe:1␤ ------> my $a; my $a # this is clearly not ok⏏<EOL>␤»
TimToady the only one people carp about frequently is declared but not used
jnthn declared but not used is annoying by default. 20:16
TimToady FROGGS: actually that one is officially ok
lue jnhtn: yeah, I'm just annoyed that Perl 6 let me get away with something that in my case broke things :) [a method in Base modifies its $!x, and then Derived.x doesn't return what I changed; that's what my issue was]
TimToady std: my $a; my $a
camelia std 09dda5b: OUTPUT«Potential difficulties:␤ Useless redeclaration of variable $a (see line 1) at /tmp/JbstzFzwGb line 1:␤------> my $a; my $a⏏<EOL>␤ok 00:01 122m␤»
FROGGS TimToady: for the parser yes, but there is no situation where you would need to do that and really mean it
TimToady note it's a *useless* redeclaration in sTD
lue m: my $a; my $a; say "alive!" 20:17
camelia rakudo-moar 1aeb7c: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $a␤ at /tmp/FSxYsJ3cAG:1␤ ------> my $a; my $a⏏; say "alive!"␤alive!␤»
TimToady well, you can leave the foo off of $foo when you declare it, too, so why all the carpage about declared but not used?
FROGGS m: my $a = 42; my $a; say $a 20:18
camelia rakudo-moar 1aeb7c: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $a␤ at /tmp/JDFTmpE8jO:1␤ ------> my $a = 42; my $a⏏; say $a␤42␤»
FROGGS lue: see this one, do you expect that to happen?
lue FROGGS: since the second one is a *useless* redeclaration, yes :)
[rakudo should be clearer on that point...]
FROGGS lue: yes
jnthn TimToady: 'cus a normal way of working is to stub stuff with names, and then go write tests, and come back and fill in the stubbed stuff. 20:19