Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-07-23

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:16 bluescreen10 left #perl6
00:17 uvtc joined #perl6
00:33 ruz is now known as ruz_
00:33 ruz_ is now known as ruz
00:48 uvtc left #perl6
00:54 kcwu left #perl6
00:54 jevin left #perl6
00:58 jevin joined #perl6
01:01 noganex joined #perl6
01:04 noganex_ left #perl6
01:07 kcwu joined #perl6
01:24 jaldhar joined #perl6
01:38 cooper joined #perl6
01:46 whiteknight left #perl6
01:46 envi joined #perl6
02:40 Chillance left #perl6
02:52 am0c left #perl6
03:02 satyavvd joined #perl6
03:04 am0c joined #perl6
03:04 satyavvd left #perl6
03:23 Su-Shee_ joined #perl6
03:26 Su-Shee left #perl6
03:32 dayangkun joined #perl6
04:05 TimToady http://rosettacode.org/wiki/Pattern_matching#Perl_6  <-- Red/Black trees (sig patterns, not regex patterns)
04:12 sorear TimToady: How much are Perl 6 metaoperators related to J metaoperators?
04:12 TimToady not very
04:13 TimToady I did decide to make dwimmy hyper cyclic after seeing some APL though
04:14 uvtc joined #perl6
04:15 TimToady I also decided to (continue to) make metaops visually distinctive in Perl 6 after seeing how APL didn't :)
04:16 am0c left #perl6
04:16 TimToady so far I think that has been quite successful
04:18 uvtc TimToady: I was just thinking about back when svn replaced cvs.
04:18 uvtc I remember it being marketed heavily as the cvs replacement.
04:19 uvtc Maybe the same thing happend with Java and C++...
04:19 uvtc It's interesting, Perl 6 seems to be taking the opposite approach.
04:20 uvtc For example, the perl6.org site saying that Per 6 is Perl 5's spunky little sister.
04:20 Mowah joined #perl6
04:21 uvtc It made me think of a part of the "who killed the electric car" movie. At one point,
04:21 uvtc the narrator was listing the reasons why GM killed the EV-1. One of the reasons was
04:22 uvtc that to properly advertise the electric car meant also implicitly listing why the fossil-fuel vehicles were ... worse.
04:23 uvtc And GM wouldn't do that to their bottom line.
04:23 uvtc Gah. Sorry for blathering. Just saw some parallels there.
04:24 TimToady when the time is right, Perl 6 will advertise itself
04:24 uvtc I understand.
04:25 uvtc Thanks for the reply. TimToady++ :)
04:26 uvtc left #perl6
04:41 cooper left #perl6
04:45 dayangkun left #perl6
04:45 kaare_ joined #perl6
04:46 cooper joined #perl6
04:46 cooper left #perl6
04:46 cbk joined #perl6
04:47 sorear perl 6 has slept for many years in dark obscurity, but when the stars are right, it will rise, and no agency of man will be able to stop it...
05:01 buubot_backup joined #perl6
05:01 s1n left #perl6
05:04 s1n joined #perl6
05:04 s1n left #perl6
05:05 offby1 is now known as frotzbot
05:06 frotzbot is now known as offby1
05:44 ciphertext left #perl6
06:08 jevin left #perl6
06:12 moritz good morning fellow lambdazebras
06:12 jevin joined #perl6
06:21 mberends good morning moritz. I hope your Norwegian family are all safe after yesterday's terrible events.
06:22 moritz mberends: safe but shocked
06:23 mberends everyone here in .nl is also shocked
06:28 [Sec] left #perl6
06:30 sorear o/ moritz
06:31 sorear o/ mberends too
06:40 moritz perl6: say ~'123'.match(:g, :p(0), /\d/)
06:41 p6eval niecza v7-44-g54b5188: OUTPUT«Unhandled exception: Unable to resolve method match in class Str␤  at /tmp/SruhkI59qc line 1 (MAIN mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1933 (CORE C906_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1934 (CORE module-CORE…
06:41 p6eval ..rakudo 922500: OUTPUT«1 2 3␤»
06:41 p6eval ..pugs: OUTPUT«*** No such method in class Str: "&match"␤    at /tmp/35NaTNVfTb line 1, column 5 - line 2, column 1␤»
06:41 moritz rakudo: say ~'1x3'.match(:g, :p(0), /\d/)
06:41 p6eval rakudo 922500: OUTPUT«1 3␤»
06:44 CBro2007 joined #perl6
06:53 Mowah left #perl6
06:56 mberends o/ sorear. it's fun to see all the "little animal farm" programs evolve, even as a lurker. don't worry at all about the arbitrary 100 line goal, you'll get more satisfaction by simply ignoring it.
07:01 moritz the goal of the 100 line limit is not to encourage golfing, but to encourage soluations that are not bloated
07:09 moritz niecza: $_ = "aba"; s:g[a] = do { say $/.from; 'FOO' }; .say
07:09 p6eval niecza v7-44-g54b5188: OUTPUT«0␤2␤FOObFOO␤»
07:10 moritz so the second match has seen the original string
07:11 Instil left #perl6
07:20 masak joined #perl6
07:20 masak morning, #perl6.
07:21 * masak feels sadness for the shootings
07:21 masak :/
07:22 * moritz too
07:22 masak mberends: indeed, the 100-LoC goal was mainly to get out of the OO thinking that led to bloat already by the first test, with the promise of much more to come.
07:23 moritz I raelly hope they won't lead to the kind of security paranoia/theatre that we see in the US (and parts of Europe too)
07:23 masak moritz: I thought we already had that.
07:24 masak moritz: though I do see more guards in France and Poland than I do in Sweden. it never really occurred to me that you can screen the bags in the entrance to a library or a science park.
07:27 sorear hmm.  how heterogenous is Europe on security theatre?  is any of it worse than the US?
07:28 * masak doubts that
07:28 masak only leaving Russia was I ever asked to take off my shoes so they could have my socks screened.
07:34 moritz on the one hand they forbid liquids on flights, but nobody would stop you from driving on a big ferry with a truck full of explosives
07:35 masak nobody ever said security theatre would make much sense.
07:43 pernatiy joined #perl6
07:47 mathw I don't think we're as bad as the US for security theatre
07:47 mathw Although we may be worse in the UK
07:47 mathw I remember flying back from Germany once, they seemed to have a special extra security line for us :/
07:48 mathw I suppose that might have been something connected with us not being part of Schengen
07:48 tadzik mathw: where are you from?
07:48 mathw England
07:48 tadzik oh
07:49 mathw So kind of European but kind of not European, thanks stupid governments
07:50 mathw Oh and stupid tabloid newspapers who keep writing ridiculous, easily-disprovable stories about things the EU apparently make us do
07:53 Khisanth there is an easy solution for that :)
07:53 masak mathw: there are so many unions and trade associations and whatnot, either of which you could be or not be a member of: http://www.boingboing.net/2011/03/12/venn-diagram-illustr.html
07:54 moritz mathw: it's the British that want the additional security, not the Germans (at the airports at least)
07:56 mathw moritz: thought it might be
07:57 mathw masak: yes it's complicated isn't it
08:10 masak how feasible is it for subtypes to have methods?
08:10 ruz hi, would lovely to be able to extend subsets with methods and attributes: https://gist.github.com/1101175
08:10 masak ruz++
08:11 masak (we were just privmsging about it)
08:15 moritz I'm not sure if that's how subsets are meant to be in Perl 6
08:15 tadzik I look at it as a way of easy inheritance
08:16 tadzik so, class Direction is Str { but bla bla }
08:16 masak ...which is probably wrong :)
08:16 moritz subsets inherently break Liskov, which inheritance is meant to preserve
08:16 tadzik oh, that... right
08:16 tadzik just saw that one coming
08:16 moritz note that if you add methods ore attributes, you need to change storage
08:16 masak in particular, subset membership is defined (dynamicaaly!) by the object's properties.
08:17 tadzik right
08:17 ruz ok
08:17 ruz it should be syntax I presented
08:17 moritz so you can't make   subset Positive of Int where * > 0; 1 ~~ Positive  work (at least not without major hacks)
08:17 ruz is there clear way to jump from subsets to classes?
08:18 * masak begins a slow migration to the airport
08:18 masak left #perl6
08:19 ruz moritz: Liskov?
08:19 * tadzik moves out too
08:19 dalek rakudo/nom: 98fed2e | moritz++ | src/core/Str.pm:
08:19 moritz ruz:  http://en.wikipedia.org/wiki/Liskov_substitution_principle
08:19 dalek rakudo/nom: implement :overlap in Str.match
08:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/98fed2eb5e
08:19 dalek rakudo/nom: 1123ec5 | moritz++ | / (3 files):
08:19 dalek rakudo/nom: &truncate
08:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1123ec5cec
08:22 CBro2007 left #perl6
08:27 Jackneill joined #perl6
08:43 SHODAN joined #perl6
08:45 moritz nom: m:g/a/
08:45 p6eval nom: OUTPUT«Null PMC access in clone()␤current instr.: 'nqp;QRegex;P6Regex;Grammar;nibbler' pc 34669 (src/stage2/QRegex.pir:11430) (src/stage2/QRegex.nqp:771)␤»
08:57 sivoais joined #perl6
09:00 ab5tract joined #perl6
09:00 sivoais left #perl6
09:01 sivoais joined #perl6
09:16 M_o_C joined #perl6
09:33 CBro2007 joined #perl6
09:35 nebuchadnezzar left #perl6
09:36 nebuchadnezzar joined #perl6
09:37 felher TimToady++ (Rosetta Code). You've written that perl6 does not _(yet)_ have algebraic datatypes. Are they planned to come in near future?
09:42 araujo left #perl6
09:52 sorear Perl 6 is designed for unplanned extension
09:56 felher sorear: guess that means they are not plannend but may very well come. thnx. :)
09:57 TiMBuS i know this is a perl 6 channel, but: Can't locate object method "getline" via package "IO::Handle" <- honestly stumped here
09:57 TiMBuS since the IO::Handle doc says right there, method $io->getline
09:58 Su-Shee_ is now known as Su-Shee
09:58 sorear TiMBuS: have you use'd the appropriate module?
09:59 TiMBuS WHAT KIND OF SECOND RATE PROGRAMMER DO YOU THINyeah thats probably it
09:59 TiMBuS :p
10:09 sorear truism of the day: only second-rate programmers can see second-rate bugs easily
10:09 CBro2007 left #perl6
10:10 felher :D
10:20 whiteknight joined #perl6
10:28 smash left #perl6
10:35 pernatiy left #perl6
10:36 MayDaniel joined #perl6
10:40 pernatiy joined #perl6
11:01 araujo joined #perl6
11:07 im2ee joined #perl6
11:16 mj41 joined #perl6
11:17 CBro2007 joined #perl6
11:27 MayDaniel left #perl6
11:36 jaldhar left #perl6
11:37 jaldhar joined #perl6
12:01 Jackneill left #perl6
12:30 SHODAN left #perl6
12:31 MayDaniel joined #perl6
12:32 mj41 left #perl6
12:41 [Coke] left #perl6
12:43 [Coke] joined #perl6
12:47 MayDaniel left #perl6
12:51 s1n joined #perl6
12:53 JimmyZ joined #perl6
13:03 [Coke] left #perl6
13:05 [Coke] joined #perl6
13:24 tadzik is now known as straz_nocna
13:25 straz_nocna is now known as tadzik
13:29 [Coke] left #perl6
13:31 [Coke] joined #perl6
13:34 jack-ji joined #perl6
13:35 donri joined #perl6
13:35 jack-ji left #perl6
13:44 M_o_C left #perl6
13:45 [Coke] left #perl6
13:47 [Coke] joined #perl6
13:49 Jackneill joined #perl6
13:50 MayDaniel joined #perl6
13:50 drbean left #perl6
13:58 CBro2007 left #perl6
13:59 [Coke] left #perl6
14:02 [Coke] joined #perl6
14:02 Mowah joined #perl6
14:06 MayDaniel left #perl6
14:31 envi left #perl6
14:39 tokuhirom left #perl6
14:44 im2ee left #perl6
15:02 mattp_ left #perl6
15:22 pmurias joined #perl6
15:27 MayDaniel joined #perl6
15:33 CBro2007 joined #perl6
15:39 jevin left #perl6
15:40 jevin joined #perl6
15:41 MayDaniel left #perl6
15:53 MayDaniel joined #perl6
16:01 MayDaniel left #perl6
16:14 ab5tract left #perl6
16:20 perlhack joined #perl6
16:21 am0c joined #perl6
16:21 perlhack left #perl6
16:26 molaf joined #perl6
16:43 JimmyZ left #perl6
16:53 am0c left #perl6
17:22 perlhack joined #perl6
17:24 ashleydev left #perl6
17:27 perlhack left #perl6
17:40 masak joined #perl6
17:40 masak good evening, #perl6
17:57 mberends hi masak, just departing to London for a few days o/
17:59 mberends left #perl6
18:01 masak ...preserving the eternal balance of Stroopwafel fans on the channel :)
18:08 Jackneill left #perl6
18:11 Mowah left #perl6
18:43 moritz the stroopwafel concentration is deplorably low in Erlangen, Germany
18:46 SHODAN joined #perl6
18:46 yath .nl is too far...
18:47 masak we have wafels here in Sweden, but it's not the same.
18:48 masak they just don't stroop like those in .nl do
18:49 * masak tries a root beer and concludes that it must be one of those "acquired taste" things
18:53 * moritz makes waffles too, but it's just not the same
18:54 Jackneill joined #perl6
19:04 dorlamm joined #perl6
19:29 wooden joined #perl6
19:31 cosimo left #perl6
19:37 cosimo joined #perl6
19:41 Hexta joined #perl6
19:42 Hexta left #perl6
19:44 Chillance joined #perl6
19:55 donri left #perl6
19:56 donri joined #perl6
20:06 sorear good * #perl6
20:06 MayDaniel joined #perl6
20:12 simcop2387 left #perl6
20:13 [particle]1 joined #perl6
20:14 pmurias sorear: hi
20:15 [particle] left #perl6
20:16 SHODAN left #perl6
20:18 kaare_ left #perl6
20:18 simcop2387 joined #perl6
20:19 masak good *, sorear
20:22 dorlamm left #perl6
20:45 masak I like it when changes due to a new test turn old tests red because they don't follow the rules of the new test. :)
20:47 masak in that vein, my farm game now has the monozooism restriction, too.
20:48 CBro2007 left #perl6
20:49 sorear monozooism?
20:50 masak the one we discussed yesterday.
20:50 masak only one animal either bought or sold.
20:51 masak in my code, the corresponding boolean test turned out to be spelled '1 == [+] %trade{'selling'|'buying'}.values'
20:55 Jackneill left #perl6
21:01 dual joined #perl6
21:22 whiteknight left #perl6
21:32 MayDaniel left #perl6
21:38 y3llow_ joined #perl6
21:38 pothos_ joined #perl6
21:40 y3llow left #perl6
21:40 y3llow_ is now known as y3llow
21:40 pothos left #perl6
21:40 pothos_ is now known as pothos
21:43 colomon left #perl6
21:43 Psyche^ joined #perl6
21:44 colomon joined #perl6
21:46 masak perl6: my @e = 1, 2, 3; .say for @e[0 ..^ *]
21:46 p6eval rakudo 922500, niecza v7-44-g54b5188: OUTPUT«(timeout)»
21:46 p6eval ..pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
21:47 Patterner left #perl6
21:47 Psyche^ is now known as Patterner
21:47 masak for something I think should work, the implementations seem unusually united against me.
21:47 * masak goes to read S09
21:51 masak std: my @seasons[4:map(*%4)];
21:51 p6eval std 516268a: OUTPUT«ok 00:01 122m␤»
21:51 masak \o/
21:52 moritz nom: my @e = 1, 2, 3; .say for @e[0 ..^ *]
21:53 p6eval nom: OUTPUT«1␤2␤3␤»
21:53 * masak hugs nom
21:55 masak huh!? S09 talks about substr on an array of uint8 without batting an eye... I'm not sure I like that idea.
21:56 masak correction. I am sure I don't like that idea.
21:57 moritz array of unit8... a Buf?
21:58 * moritz -> sleep
21:58 sorear masak: S09 is a living fossil
21:58 masak isomorphically, yes. but it's declared as 'my uint8 @buffer;'.
21:59 masak sorear: I am aware that much of S09 is blue-skying. but this seems different; it seems more like dangerous certitude.
22:00 sorear masak: I mean that large parts of S09 date from the time before we had Buf and Str straight
22:00 masak hm, I hope that's the reason in this case.
22:01 masak but we've had Bug and Str straight for a few years now. longer than S09 has gone without edits.
22:01 masak and I don't believe anyone has ever seriously proposed substr working on arrays (except by stringifying them first).
22:04 masak am I understanding correctly that 'my @a = [42]; say @a[0;0]' will lead to an error?
22:04 flussence "Bug and Str"? :)
22:04 flussence (it's technically correct...)
22:05 flussence rakudo: my @a = [42]; say @a[0;0]
22:05 p6eval rakudo 922500: OUTPUT«42␤»
22:06 flussence not what I'd expect...
22:06 masak flussence: oops. s/Bug/Buf/. guess I'm used to writing the former more often... :)
22:07 masak flussence: Rakudo doesn't implement the semantics of ; inside of .[] yet, so you only get the last 0 from that indexing.
22:07 masak rakudo: my @a = [42]; say @a[65535;0]
22:07 p6eval rakudo 922500: OUTPUT«42␤»
22:09 flussence rakudo: my $a = 42; say $a[0]
22:09 p6eval rakudo 922500: OUTPUT«42␤»
22:09 flussence I'm not sure whether that's right or wrong, actually...
22:09 flussence rakudo: my $a = 42; say $a[0][0]
22:09 p6eval rakudo 922500: OUTPUT«42␤»
22:10 flussence it's 42 all the way down
22:11 masak that's correct.
22:11 masak .[0] is a no-op for scalar values.
22:11 Tene That kind of duck typing still seems wrong to me. :(
22:13 masak I have no strong opinion either way. to me it feels neither more nor less wrong than list flattening in various situations.
22:13 masak it's... just something that happens in Perl :)
22:13 Tene :)
22:15 masak ok, S09 supports my belief that @e[0 ..^ *] shouldn't loop infinitely.
22:15 * masak submits rakudobug
22:15 flussence I think the 0;0 case could at least warn when it hits a scalar before the end, since it's being given enough information to know the user's expecting something else.
22:16 masak flussence: again, Rakudo doesn't implement any of the multidim indexing stuff.
22:16 flussence yeah, but when it does.
22:17 masak flussence: S09 seems to indicate that doing .[0;0] on a normally declared array is erroneous, yes.
22:19 mattp_ joined #perl6
22:19 masak 'night, #perl6
22:19 TimToady o/
22:19 masak left #perl6
22:21 ashleydev joined #perl6
22:25 sorear I don't understand how @a[0;0] is supposed to work at all
22:26 mattp_ left #perl6
22:27 mattp_ joined #perl6
22:36 donri left #perl6
22:37 flussence AIUI (as a lowly user), @a[$x;$y;$z] is similar to doing @a[$x]».[$y]».[$z]
22:40 flussence (except that the postcircumfix is given full knowledge of what it's returning, so it's free to optimise into something less stupid than I'd write :)
22:52 REPLeffect left #perl6
22:52 whiteknight joined #perl6
23:09 TimToady nom: say ((0),(0)).lol.perl
23:09 p6eval nom: OUTPUT«LoL.new(0, 0)␤»
23:09 TimToady nom: say ((0,),(0,)).lol.perl
23:09 p6eval nom: OUTPUT«LoL.new((0,), (0,))␤»
23:10 TimToady that's really uninformative
23:11 TimToady nom: say ((1..10),<a b c>)[1].perl
23:11 p6eval nom: OUTPUT«2␤»
23:11 TimToady nom: say ((1..10),<a b c>).lol[1].perl
23:11 p6eval nom: OUTPUT«("a", "b", "c")␤»
23:12 TimToady basically subscripts bind with lol semantics to **@x, so @x[0] is the first lazy list, @x[1] is the second, etc
23:13 Transformer joined #perl6
23:13 TimToady with [0;0] it's just that either list has only one element
23:13 TimToady but [1..10;<a b c>] would be two lists
23:15 TimToady when everything is done with nested references, it doesn't buy you much, but we have shaped arrays that can calculate multi-dim offsets, it's starts getting all fortrany
23:15 TimToady well, apart from column-major vs row-major...
23:15 Transformer left #perl6
23:16 TimToady and yes, it does have the auto-hyper between subscripts as flussence++ points out, so that multi-dim slices work the way mathematicians think they oughta
23:19 TimToady we probably also need a way to express ideas like @a[0;0], @a[1;1], @a[2;2]...
23:20 flussence @a.rotate(45°)[0][*] # :)
23:20 TimToady this is much the same problem as making the right side of X depend on the current value of the left side
23:27 sorear @a[i;0]
23:27 TimToady well, I was thinking of 𝘪
23:28 TimToady .u 𝘪
23:28 phenny U+1D62A MATHEMATICAL SANS-SERIF ITALIC SMALL I (𝘪)
23:28 TimToady I meant 𝑖
23:28 TimToady .u 𝑖
23:28 phenny U+1D456 MATHEMATICAL ITALIC SMALL I (𝑖)
23:29 TimToady we could either have an an explicit 𝑖<- or >-𝑖, or we could implicitly label them 𝑖, 𝑗, 𝑘
23:29 jaldhar left #perl6
23:29 orafu left #perl6
23:30 jaldhar joined #perl6
23:30 orafu joined #perl6
23:30 TimToady so the diagonal would be expressed as [*; �]
23:31 TimToady but still thinking about that
23:32 TimToady that's another bit that ties in with bindings to non-sigiled readonly syms that I was mentioning the other day
23:33 TimToady anyway, if we come up with a notation for [;], it should also work for X
23:33 TimToady and enable multi-dimensional list comprehensions
23:33 TimToady well, easier ones
23:33 benabik_ joined #perl6
23:34 TimToady not thinking this is for 6.0.0, just future directions
23:35 benabik left #perl6
23:35 benabik_ is now known as benabik
23:42 TimToady I meant [*; 𝑖], wasn't suggesting using REPLACEMENT CHARACTER :)
23:44 pmurias left #perl6
23:44 TimToady well, more likely we'll just grab bare ->$i without a block, or some such, and pass it through to the implicit loop of ; or X
23:46 TimToady so you can write for 1..10 -> $i X $i..10 -> $j {...} and such
23:46 flussence (for a diagonal slice, wouldn't something like ||(1..* xx @a.elems) work?)
23:46 flussence oh wait, that's wrong
23:46 TimToady only if you have a form that takes (0,0), (1,1), (2,2) as subscripts
23:47 TimToady oh, the double ||, hmm
23:48 TimToady it still seems wrongish
23:50 TimToady first, it'd have to be @a.dimensions
23:50 TimToady and second, it'd make [1..*; 1..*] which isn't gonna work
23:50 TimToady well, 0..*
23:51 TimToady APL/J probably has some magical way of turning a list of tuples into multidim subscripts
23:51 flussence .oO( I'm not quite in my right mind at the minute, I've been reading about PHP again... )
23:51 TimToady is that cause or effect? :)
23:52 flussence it doesn't help that I'm trying to fit multidimensional arrays into my head at the same time :)
23:54 TimToady multiple dimensions are supposed to help with that sort of thing...
23:55 molaf_ joined #perl6
23:58 molaf left #perl6
23:59 Trashlord left #perl6
23:59 whiteknight left #perl6

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

Perl 6 | Reference Documentation | Rakudo