Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-05-29

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:00 ymasory_ joined #perl6
00:04 dukeleto joined #perl6
00:08 daniel-s joined #perl6
00:15 drbean joined #perl6
00:22 drbean left #perl6
00:22 hudnix left #perl6
00:30 lichtkind TimToady: do you consider it?
00:33 ardeshir joined #perl6
00:37 noganex left #perl6
00:40 lichtkind night heros
00:40 dukeleto left #perl6
00:41 dukeleto joined #perl6
00:41 dukeleto left #perl6
00:42 silug joined #perl6
00:44 lichtkind left #perl6
00:45 dukeleto joined #perl6
00:45 dukeleto left #perl6
00:46 lumi_ left #perl6
00:47 dukeleto joined #perl6
00:48 dukeleto left #perl6
00:48 dukeleto joined #perl6
01:03 silug left #perl6
01:06 noganex joined #perl6
01:20 hudnix joined #perl6
01:20 nymacro joined #perl6
01:22 daniel-s left #perl6
01:31 colomon o/
01:37 estrabd left #perl6
01:39 estrabd joined #perl6
01:49 cooper left #perl6
01:49 whiteknight left #perl6
01:50 cooper joined #perl6
01:51 ymasory_ left #perl6
02:02 daniel-s joined #perl6
02:10 Kovensky left #perl6
02:11 sorear hello colomon
02:12 daniel-s left #perl6
02:12 colomon Hello!  Seems like finishing finals has you back working at niecza with a vengence.
02:17 sorear :)
02:20 cotto left #perl6
02:23 ymasory_ joined #perl6
02:25 jaldhar_ left #perl6
02:29 drbean joined #perl6
02:30 sorear ping jnthn.
02:32 Chillance left #perl6
02:34 drbean left #perl6
02:45 cotto joined #perl6
02:47 sorear lovely.  I just noticed that niecza's <nibbler> (quoted constructs, block comments)
02:47 sorear is O(n^2)
02:47 sorear now I know why commenting out 1500 lines with #`『』 is so slow!
02:56 cotto left #perl6
03:02 hudnix left #perl6
03:09 colomon O(n^2)--
03:14 Limbic_Region left #perl6
03:48 jaldhar_ joined #perl6
03:51 envi joined #perl6
03:59 jaldhar_ left #perl6
04:06 ymasory_ left #perl6
04:14 silug joined #perl6
04:22 sorear ... UNDEAD BUG
04:22 sorear so much for "upgrading mono fixes the amazing byte array breakage"
04:26 sorear wow.
04:26 sorear only 6 commits to Mono since I last updated
04:26 sorear back in Jan-Feb, I normally saw 6 commits *in the time it takes to compile* so any installed mono would necessarily be outdated
04:35 cooper is now known as alyxxxxxx
04:37 alyxxxxxx is now known as cooper
04:40 silug left #perl6
04:41 benabik left #perl6
04:47 jaldhar_ joined #perl6
04:50 benabik joined #perl6
04:53 cooper left #perl6
04:59 envi left #perl6
05:05 envi joined #perl6
05:09 sorear I knew it; the problem *is* contingent on having dissimilar assemblies in with the same name in different AppDomains
05:09 benabik sorear: Separate AppDomains not as separate as they should be?
05:10 sorear benabik: I guess
05:10 sorear I know you can segfault the AOT-compiler by giving it two versions of the same assembly
05:10 sorear and I've always had a bad feeling about this
05:12 sorear whee, I've broken off the Mono bug from any dependency on running Perl 6 code
05:12 sorear it's all misbehaving C# now.  (ok, 10,000+ lines of it, but I can fix that)
05:14 jdhore1 <sorear> only 6 commits to Mono since I last updated   <--- I'm guessing this is because Attachmate dissolved the Mono team so they've been working more on getting employed than Mono
05:14 sorear jdhore1: yeah, I also blame the community disruption
05:14 jdhore1 ah
05:16 lumi_ joined #perl6
05:43 molaf joined #perl6
05:49 wamba joined #perl6
06:03 * sorear screams
06:04 sorear the bug just *stopped manifesting* in my test area
06:04 sorear I've reverted all of my changes to the last broken revision.  No help
06:05 sorear I would suspect an intermittant hardware failure at this point, except that it's still bugging for my production code
06:07 pamera left #perl6
06:11 sorear obviously there is some variable that I have not adequately controlled for.
06:13 sorear it's sensitive to some amazingly small things.
06:13 sorear "cp -a lab1 lab2" can make a lab2 that fails to reproduce the bug
06:13 sorear on second thought, the filename lengths were different
06:14 sorear that could affect GC timing, maybe, I guess?
06:14 sorear and this is definitely a GC involved fail
06:15 mberends left #perl6
06:16 mberends joined #perl6
06:17 sorear \o/
06:17 sorear controlling for the length of the current directory's name has made the fail reproducable
06:21 sorear too bad printf debugging is quite useless now
06:21 sorear gdb time
06:34 meteorjay left #perl6
06:46 wamba left #perl6
06:50 * sorear is working under the guess that there's a race between runtime code generation and the GC, which is causing garbage to be copied into the runtime data under very special circumstances
06:55 cotto joined #perl6
06:55 Mowah joined #perl6
07:05 lumi_ left #perl6
07:10 sorear \o/
07:10 sorear SUCCESS
07:10 sorear time to 1. file a mono bug 2. implement a workaround in niecza
07:20 silug joined #perl6
07:21 lumi_ joined #perl6
07:27 birdwindupbird joined #perl6
07:27 silug left #perl6
07:39 sorear https://bugzilla.novell.com/show_bug.cgi?id=696817 # hopefully a good report
07:44 Eevee joined #perl6
07:49 mj41 joined #perl6
07:54 molaf left #perl6
07:56 dalek niecza: 3cbbfcd | sorear++ | / (4 files):
07:56 dalek niecza: Implement workaround for DefineInitializedData/dynamic assembly/sgen incompatibility
07:56 dalek niecza: review: https://github.com/sorear/niecza/commit/3cbbfcd4f3
08:17 dalek niecza: ae3d3b7 | sorear++ | / (3 files):
08:17 dalek niecza: Add Any.delete-key, Hash.delete-key, Bool.Numeric accelerators
08:17 dalek niecza: review: https://github.com/sorear/niecza/commit/ae3d3b7274
08:18 dalek niecza: de5e663 | sorear++ | lib/ (3 files):
08:18 dalek niecza: Avoid redundant cloning of Any type variable
08:18 dalek niecza: review: https://github.com/sorear/niecza/commit/de5e663fb8
08:21 sorear good night #perl6
08:27 mberends good night sorear
08:32 MayDaniel joined #perl6
08:46 birdwindupbird left #perl6
09:08 sayu joined #perl6
09:13 noganex_ joined #perl6
09:17 noganex left #perl6
09:27 daniel-s joined #perl6
09:28 sayu left #perl6
09:42 Katibe joined #perl6
09:43 sayu joined #perl6
09:45 sayu hello
09:45 mberends hello sayu
09:46 wamba joined #perl6
10:00 masak joined #perl6
10:00 masak hello, #perl6.
10:01 mberends left #perl6
10:04 Enlik| joined #perl6
10:04 silug joined #perl6
10:13 tadzik witajcie, zebry
10:15 masak czesc, tadeusz.
10:15 pff joined #perl6
10:15 tadzik jak leci Carl?
10:16 masak dobrze, bardzo dziekuje.
10:16 masak a ty?
10:17 tadzik też dobrze, dziękuję
10:18 masak akcenty. showoff :P
10:18 tadzik masz na myśli: popisówa? :P
10:18 tadzik this channel is super awesome
10:18 masak :D
10:19 tadzik and it's rather Ogonki (tails) than akcenty. Akcenty are purely oral, the tails are the things you attach to letters to create new letters
10:19 masak oh right.
10:19 masak I used to know that... :)
10:19 Enlik joined #perl6
10:19 masak I didn't get the 'masz na mysli' line at all, by the way.
10:20 tadzik "did you mean: {"showoff".to-polish(:informal)}"
10:20 masak ah.
10:20 Enlik| left #perl6
10:20 masak "popisówa" means something like "performance", no?
10:21 masak so that kinda makes sense.
10:21 tadzik no, not really
10:21 tadzik "popisywać się" is "showing off", "popisówa"... I don't think it's even in a dictionary, but it's the act of showing off
10:21 tadzik no, it's not in a dictionary
10:22 masak ok, so here I go again, then.
10:22 masak ogonki. popisówa :P
10:23 tadzik ;)
10:23 masak I will always have a soft spot for the Polish language.
10:24 tadzik now that I look at that, "popisówa" may be something related to performance, noun
10:24 tadzik at first I thought of performance, verb
10:24 tadzik you say "popisowy numer" as the key point of a performance, when it comes to acrobacy or illusionism or something like that
10:24 tadzik masak: why is that?
10:25 masak based on what you just said, I can't help wonder if "popisówa" isn't an adjective.
10:26 masak it looks like the sing-fem form of "popisowy".
10:26 masak which is an adjective.
10:27 tadzik no, "popisówa" is a noun. It may be a nounisation of "popisowy"
10:27 masak ok.
10:27 tadzik "popisowa popisówa"
10:27 masak oh wow. so the ogonek actually makes a difference there?
10:28 masak er, "ogon"
10:28 masak oh, both forms exist :)
10:28 tadzik ogonek is fine. You know what? I dnd'nt even notice that the only difference here is the ogonek
10:28 masak :P
10:28 tadzik yeah, it changes the word completely. You see, it's not just the accent :)
10:29 masak heh.
10:29 tadzik ó is just a u written in a fancy way, so you spell that exactly the same as "popisuwa", the last one being a ortographic error of course
10:29 masak funny thing; огонёк means something completely different in Russian. means "twinkle" or "little light".
10:29 tadzik ó and u, like "rz" and ż are exactly the same things, when spelled
10:30 mberends joined #perl6
10:30 masak tadzik: yeah. orthographic accidents of history, I guess.
10:31 daniel-s left #perl6
10:31 tadzik I hope they won't become history very soon. Although when you look at the young people, and I include people of my age, some of them are so ortographically impaired that I wonder if Polish won't end up massively simplified over the time
10:32 tadzik The comitee of a Polish language has already made an effort of making things allowed just because people write them incorrectly anyway
10:32 tadzik I can understand that, but having a bit of a language purist that drives me nuts as well
10:33 masak there's a tendency for simplification in every language. simply because the learning process is imperfect and sometimes people's spelling errors take hold and remain.
10:33 wamba left #perl6
10:33 masak it's only from a static point in history that things feel completely hopeless :)
10:34 tadzik my favourite joke, correcting "tą" and "tę" usage (almost no one can use it correctly, even professors or people of this sort), is becoming a dying joke because the comitee has allowed the incorrect usage of "tą" in informal speech, and recently even in informal writing
10:35 tadzik but almost no one knows that anyway, so the joke is still on ;)
10:36 masak :)
10:39 masak ostrzyżenie &
10:40 tadzik :D
10:41 * mberends noms a Śliwka Nałęczowska in an attempt to feel in-topic
10:42 mberends mmm, /me noms a nother one ;)
10:44 wamba joined #perl6
10:49 silug left #perl6
10:50 silug joined #perl6
10:57 tadzik oh, you still have them? :)
10:57 tadzik sweets don't have such a long lifecycle in my sorrounding :)
10:59 mberends :-)
10:59 wknight8111 joined #perl6
11:01 wamba left #perl6
11:06 _twitch joined #perl6
11:06 molaf joined #perl6
11:09 mberends tadzik: here they have a half-life, as the population shrinks I try harder to save them. and randomly they disappear :)
11:14 mj41 left #perl6
11:15 nymacro left #perl6
11:17 tadzik ;)
11:17 sayu left #perl6
11:19 pff left #perl6
11:41 daniel-s joined #perl6
11:49 satyavvd joined #perl6
11:51 kaare_ joined #perl6
11:51 silug left #perl6
11:55 satyavvd left #perl6
11:59 Helios left #perl6
12:06 Helios joined #perl6
12:42 pochi left #perl6
13:05 kfo_ joined #perl6
13:06 wknight8111 left #perl6
13:08 kfo left #perl6
13:14 amkrankruleuen left #perl6
13:18 Moukeddar joined #perl6
13:19 Moukeddar Hello O/
13:22 amkrankruleuen joined #perl6
13:29 _twitch left #perl6
13:30 satyavvd_ joined #perl6
13:34 tadzik hello Moukeddar
13:36 Moukeddar sadly i have to go
13:36 Moukeddar later
13:37 Moukeddar left #perl6
13:42 satyavvd_ left #perl6
13:45 ardeshir left #perl6
13:52 masak I haven't really started seeing the deep parallels between Dependency Injection, testability, and some slightly more nebulous notion of "good, durable design", until fairly recently.
13:55 silug joined #perl6
14:02 wamba joined #perl6
14:04 dual left #perl6
14:13 xinming left #perl6
14:18 xinming joined #perl6
14:20 pmurias joined #perl6
14:31 wamba left #perl6
14:34 tadzik playing a ball with my nephew I got an idea for a Perl6-based build system, basically "I don't want to write makefiles, something is ought to do the dirty work for me"
14:34 tadzik I imagine plugins for doing the dirty work for specific languages. Maybe I'll end up reimplementing the wheel, if not the square
14:36 Chillance joined #perl6
14:41 noganex_ left #perl6
14:42 pmurias tadzik: did you take a look at scons?
14:43 MayDaniel left #perl6
14:45 noganex joined #perl6
14:46 * ruoso always gets back to plain make...
14:47 * mberends knows the feeling too :)
14:47 jmp__ joined #perl6
14:51 jmp__ left #perl6
14:53 jaldhar_ left #perl6
14:55 pmurias left #perl6
14:56 masak that's the problem with those X that make up a "Tyrrany of X". :) they're in a sweet spot, and they're occupying it as a niche.
14:58 arnsholt I talked to some people at work about make on friday. We all agreed that it sucks and we wish it upon noone to work with make
14:58 arnsholt Also, that all the alternatives are worse =)
15:02 donri joined #perl6
15:07 tadzik phenny: tell pmurias no, haven't yet
15:07 phenny tadzik: I'll pass that on when pmurias is around.
15:07 tadzik arnsholt: how about this scons thingy?
15:09 tadzik scons looks more or less like a thing I'd want to use
15:12 silug left #perl6
15:13 silug joined #perl6
15:14 arnsholt tadzik: I've not tried scons, but what I've heard about it hasn't been too good unfortunately
15:15 tadzik though it doesn't make running external commands too easy it seems, as I can see from the docs. I've been reading them for like 5 minutes though
15:21 masak there's also Rake. and probably many others.
15:21 arnsholt That'd be big minus in my book, since running external commands is pretty much my only use-case for make ATM
15:22 masak thing is, even if they *were* better than make (along some dimension that matters), they're not going to replace make overnight anyway.
15:25 silug left #perl6
15:27 daniel-s left #perl6
15:29 tadzik I don't care who replaces what. I want a build system that does what I want :)
15:29 tadzik make is here to stay, in one form or another (see cmake)
15:32 masak aye.
15:35 jaldhar_ joined #perl6
15:38 pmichaud good morning, #perl6
15:40 tadzik good morning pmichaud
15:40 birdwindupbird joined #perl6
15:41 MayDaniel joined #perl6
15:47 sorear good * #perl6
16:02 masak morning, pmichaud, sorear.
16:03 sftp_ joined #perl6
16:03 sftp left #perl6
16:04 wamba joined #perl6
16:07 jaldhar_ left #perl6
16:07 jaldhar_ joined #perl6
16:09 sayu joined #perl6
16:11 sftp joined #perl6
16:11 cognominal left #perl6
16:11 sorear o/ masak
16:12 dual joined #perl6
16:13 cognominal joined #perl6
16:13 sftp_ left #perl6
16:20 jaldhar_ left #perl6
16:27 jaldhar_ joined #perl6
16:32 * masak decides to build rakudo/nom
16:33 ymasory_ joined #perl6
16:35 jaldhar_ left #perl6
16:36 tadzik always funny
16:37 sftp left #perl6
16:38 sftp joined #perl6
16:41 wamba left #perl6
16:45 molaf left #perl6
16:45 * sorear has rerun the Profiler of Doom
16:47 envi left #perl6
16:48 envi joined #perl6
16:50 jfried joined #perl6
16:52 envi left #perl6
16:52 masak oh, --gen-nqp :)
16:53 envi_ joined #perl6
16:56 pmichaud TimToady: ping
16:57 thou joined #perl6
16:58 pmichaud TimToady:  larger question....    how should a sequence signal to the caller that the List it returns is infinite?  (more)
16:59 pmichaud TimToady: currently, I have it locally that a sequence ending in *  returns a Parcel containing the generator portion and a whatever star  (i.e.,  ,*)
16:59 pmichaud for example:     1,2,3 ... *   returns   a   (<generator> ,*)  Parcel, and the Parcel knows that it's "infinite" because of that final whatever star
17:00 pmichaud but this doesn't seem to quite work when the sequence has a terminating iterator, as in
17:00 pmichaud 1,2, { last if $_ >= 5; $_+1 } ... *
17:01 pmichaud because the sequence ends up being  (1,2,3,4,5,*)   instead of (1,2,3,4,5)
17:02 pmichaud do we:  (a) come up with a different mechanism for signaling infinite/whateverish, or (b) always have the final whatever star in a sequence that ends with * ?
17:02 pmichaud (or (c) other)
17:02 pmichaud EOQ
17:05 masak building rakudo/nom dies with the error "Cannot open output file Perl6/ModuleLoader.pbc" here.
17:08 pmichaud (d)  I can give Lists an "$!infinite" or "$!whateverish" attribute that is somehow set by whatever is creating the list
17:08 pmichaud (if so, how... thus returning to original question :-)
17:08 jaldhar_ joined #perl6
17:10 masak pmichaud: feels like a question for https://github.com/perl6/m​u/blob/master/misc/pm.txt ...
17:11 pmichaud masak: yes, I'm not sure how closely that's being monitored atm, though.
17:11 pmichaud if I don't get an answer here, I'll put it into pm.txt
17:11 pmichaud (and perhaps phrase it a little more clearly)
17:11 pmichaud anyway, the ,* approach has a hiccup or two to clean up
17:13 tadzik masak: did you install your nqp?
17:18 pmichaud guess I need to work on the nom build system :)
17:23 sorear pmichaud: how involved are you in nom?
17:36 sftp left #perl6
17:38 sftp joined #perl6
17:40 masak tadzik: I did 'perl Configure.pl --gen-nqp', but I didn't "install" nqp beyond that.
17:40 tadzik I see
17:41 pmichaud sorear:  @otherstuff has prevented me from being involved in the day-to-day stuff of nom, although I hope that to change soon
17:41 Limbic_Region joined #perl6
17:41 pmichaud I've keep a high-level view of what's going on with nom and left it to others to carry the day-to-day stuff :)
17:41 pmichaud afk, lunch
17:42 silug joined #perl6
17:44 sftp_ joined #perl6
17:44 sftp left #perl6
17:51 JimmyZ joined #perl6
17:52 JimmyZ left #perl6
17:54 wamba joined #perl6
17:54 cognominal left #perl6
17:55 masak oh!
17:55 masak turns out the error I got was just because there is no directory 'Perl6'.
17:55 masak I have a feeling a path gets generated wrongly somewhere.
17:56 cognominal joined #perl6
17:56 masak unless there's meant to be a 'Perl6' directory immediately in the 'rakudo' directory.
18:04 cognominal_ joined #perl6
18:04 masak now it builds.
18:04 masak $ ./perl6 -e 'say 42'
18:05 Tedd1^ joined #perl6
18:05 masak Can only use get_who on a SixModelObject
18:05 arnsholt_ joined #perl6
18:05 kaare_ left #perl6
18:06 cognominal left #perl6
18:06 Chillance left #perl6
18:06 Tedd1 left #perl6
18:06 [Sec] left #perl6
18:06 stepnem left #perl6
18:06 revdiablo left #perl6
18:06 kst left #perl6
18:06 arnsholt left #perl6
18:06 jevin left #perl6
18:06 sjn left #perl6
18:08 stepnem joined #perl6
18:08 silug left #perl6
18:09 kst joined #perl6
18:09 envi_ left #perl6
18:10 sjn joined #perl6
18:11 revdiablo joined #perl6
18:11 revdiablo left #perl6
18:11 revdiablo joined #perl6
18:13 sorear odd
18:13 sorear #`(foo) stopped working altogether... not quite sure why yet
18:14 jevin joined #perl6
18:16 birdwindupbird left #perl6
18:23 colomon sorear++ # just read the epic mono debugging comments in the log from last night
18:27 dukeleto left #perl6
18:28 dukeleto joined #perl6
18:29 rindolf joined #perl6
18:30 molaf joined #perl6
18:32 sorear o/ rindolf
18:33 felher are Lvalue subroutines already implemented in rakudo?
18:33 rindolf Hi sorear
18:33 rindolf Hi all.
18:33 felher hi rindolf
18:33 masak hi rindolf
18:33 rindolf What's new?
18:34 sorear felher: yes
18:34 sorear felher: I don't beleive any current implementation has rvalue subroutines
18:35 sorear perl6: my $x; sub foo () { $x }; foo = 5; say $x
18:35 p6eval niecza v5-120-gde5e663: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Any()Preceding context expects a term, but found infix = instead at /tmp/4d4NuqQiXD line 1:␤------> [32mmy $x; sub foo () { $x }; foo [33m⏏[31m= 5; say $x[0m␤␤Parse failed␤␤»
18:35 p6eval ..pugs, rakudo 30809a: OUTPUT«5␤»
18:35 sorear perl6: my $x; sub foo () { $x }; foo() = 5; say $x
18:35 p6eval pugs, rakudo 30809a, niecza v5-120-gde5e663: OUTPUT«5␤»
18:36 mj41 joined #perl6
18:37 masak std: my $x; sub foo () { $x }; foo = 5
18:37 p6eval std 4b1b100: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/WUysEoKeed line 1:␤------> [32mmy $x; sub foo () { $x }; foo [33m⏏[31m= 5[0m␤Parse failed␤FAILED 00:01 117m␤»
18:38 * masak submits rakudobug
18:40 felher sorear: Ah, great. I tried it with 'sub something() is rw { ... }'. The current way is diffrent to what S06 says, isn't it? Or am i just misunderstanding something?
18:41 sorear perl6: my $x; sub foo is rw () { $x }; foo() = 5; say $x
18:41 p6eval niecza v5-120-gde5e663: OUTPUT«5␤»
18:41 p6eval ..rakudo 30809a: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo is"␤»
18:41 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "()"␤    expecting trait or block␤    at /tmp/2XOXAMyaDq line 1, column 22␤»
18:41 sorear perl6: my $x; sub foo () is rw { $x }; foo() = 5; say $x
18:41 p6eval pugs, niecza v5-120-gde5e663: OUTPUT«5␤»
18:41 p6eval ..rakudo 30809a: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Routine $r, Any :default($default)!)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤:(Mu $type where ({ ... }), Any
18:41 p6eval ..:rw($rw)…
18:41 hudnix joined #perl6
18:41 sorear felher: all subs are rw for now because nobody can figure out how non-rw subs are supposed to work
18:42 sorear niecza explicitly ignores "rw" because I want to be able to write futureproof code
18:43 sorear someday, we're going to work out what non-rw means
18:43 felher sorear: I see, thnx :)
18:43 masak forgive me, but what's so mysterious about non-rw?
18:44 sorear the specs are written in a very head-in-the-clouds way.  one of the rules we set ten years ago was that TimToady was not allowed to look at the implementations
18:44 sorear sometimes it's hard to figure out how to interpret them
18:45 masak sure.
18:45 masak rakudo: 4 = 5
18:45 sorear masak: the main interesting cases are things like sub foo () { @obj }
18:45 p6eval rakudo 30809a: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/5WEPUYxarh␤»
18:45 masak sorear: I figger a non-rw sub would be one that replied something like that.
18:45 masak sorear: oh! arrays.
18:45 sorear masak: does that return a read-only pseudoarray that proxies to @obj?
18:45 * masak thinks
18:45 sorear the scalar and Parcel cases are not particularly hard
18:46 masak there's a rule (elsewhere) in the spec saying of arrays that "readonliness only goes one level deep".
18:46 masak I think it's in relation to parameters.
18:46 sorear we could also have @obj decaying into a read-only slice, but that would destroy .kv and other array functionality
18:46 masak would be nice if the same could be made to hold here.
18:46 sorear readonly array parameters also make no sense to me.
18:47 masak why not?
18:47 sorear same reason really
18:47 sorear I don't see a sane way to take an arbitrary Positional and make it readonly
18:48 sorear maybe we need a new allomorphic flag for this
18:53 masak clearly at least Array needs to have some support for it.
18:54 rindolf left #perl6
18:55 masak I agree that one can not reasonably expect all user-defined Positional types that anyone will ever write to play along with some readonly-related rules.
18:55 masak but... one can ask nicely :)
18:55 sorear I guess we need to invent a new set of rules for that.
18:56 masak hah, rakudo/nom is funny:
18:56 masak $ ./perl6 -e '2'
18:56 masak Class 'Int' not found
18:56 sorear reference-level allomorphism won't do - my $foo = @x strips off that level
18:57 sorear do you think it would make sense for list types to have an ASREADONLY method, masak?
18:57 sorear we could have it default (at the Any level) to just return self
18:57 masak sorear: maybe.
18:58 sorear Array and Hash can return readonly proxy objects
18:58 masak (I'm guessing the method name was just a suggestion) :P
18:58 sorear Parcel distributes ro-ness over its children
19:00 Limbic_Region left #perl6
19:02 felher So how can i return the value of a private attribute of a class? I can not write get_private_attribute() { return $!privat_attribute; } as that would expose the attribute.
19:02 tadzik why don't you want a public accessor?
19:04 dalek niecza: 048c930 | sorear++ | / (2 files):
19:04 dalek niecza: NIECZA_VERBOSE_EXCEPTIONS to print .args.perl in backtraces
19:04 dalek niecza: review: https://github.com/sorear/niecza/commit/048c930020
19:05 tadzik niecza: class A { has $.foo = 5; }; A.new.foo = 7
19:05 p6eval niecza v5-120-gde5e663:  ( no output )
19:05 tadzik rakudo: class A { has $.foo = 5; }; A.new.foo = 7
19:05 p6eval rakudo 30809a: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/0mU494jvBM␤»
19:05 tadzik sorear: nieczabug above?
19:05 sorear tadzik: yes, ultimately the same as the lack of ro subs
19:06 sorear rakudo: class A { has @.foo = 1,2,3 }; A.new.foo[1] = 7
19:06 p6eval rakudo 30809a:  ( no output )
19:06 tadzik sorear: I see
19:07 tadzik rakudo: class A { has $!foo; method a { return $!foo }; }; A.new.a() = 19
19:07 p6eval rakudo 30809a:  ( no output )
19:07 tadzik rakudo: class A { has $!foo; method a { return $!foo }; }; my $a = A.new; $a.a() = 19; say $a.a
19:07 p6eval rakudo 30809a: OUTPUT«19␤»
19:07 felher tadzik: Let's say I have the following class: >> class Man { has $!is_werewolf; method is_werewolf() { if not is_fullmoon() { return false; } return $!is_werewolf; } } <<. As one can only identify a werewolf during fullmoon, i have to check if its fullmoon first. If so, i return the attribute, otherwise false;
19:07 tadzik oh rakudo, you so crazy
19:08 tadzik felher: yeah, I can see the issue
19:08 tadzik man, that looks _broken_. I hope that's not intentional
19:08 masak rakudo: class A { has $!x; method x { my $x = $!x; return $x } }; my $a = A.new(:x(5)); $a.x = 42; say $a.x
19:08 p6eval rakudo 30809a: OUTPUT«5␤»
19:08 masak \o/
19:09 tadzik masak: is the behaviour in my example correct?
19:09 masak tadzik: no, it's not intentional. routines are supposed to be non-rw by default.
19:09 masak known issue.
19:09 tadzik so, a rakudobug?
19:09 tadzik thank FSM
19:09 masak an old one, yes.
19:15 sorear ahahahaaa
19:15 sorear niecza: #`(foo) say 5
19:15 p6eval niecza v5-120-gde5e663: OUTPUT«Unhandled exception: Unable to resolve method balanced in class Any␤  at /home/p6eval/niecza/src/STD.pm6 line 495 (STD STD.babble @ 13)␤  at /home/p6eval/niecza/src/STD.pm6 line 542 (STD STD.quibble @ 4)␤  at /home/p6eval/niecza/src/STD.pm6 line 671 (STD
19:15 p6eval ..STD.comment:sym<#`(...)> @ …
19:15 sorear niecza: say 2; #`(foo) say 5
19:15 p6eval niecza v5-120-gde5e663: OUTPUT«2␤5␤»
19:15 sorear std: #`(foo) say 5
19:16 p6eval std 4b1b100: OUTPUT«ok 00:01 113m␤»
19:16 sorear the problem in niecza is that comp_unit is a 'rule'
19:16 sorear in particular, the first thing it does is to parse whitespace
19:16 masak oh!
19:16 sorear it tries to parse the comment... BEFORE setting up %*LANG
19:17 masak oops.
19:19 sayu left #perl6
19:31 flussence left #perl6
19:31 dalek niecza: c9177a8 | sorear++ | src/niecza:
19:31 dalek niecza: Fix #`() at beginning of file
19:31 dalek niecza: review: https://github.com/sorear/niecza/commit/c9177a8e9b
19:32 rgrau joined #perl6
19:34 donri left #perl6
19:39 donri joined #perl6
19:40 whiteknight joined #perl6
19:46 donri left #perl6
20:00 pmichaud (is rw) ...   routines and blocks that aren't declared 'is rw' have to remove the containers of any return values prior to returning them
20:01 pmichaud in the past we've called it "decontainerize"
20:01 masak oh, right.
20:01 pmichaud when we get it implemented, it'll also resolve the "take bug"
20:01 masak there's been talk of 'take' doing the same too, methinks.
20:02 masak right.
20:02 masak but returned arrays wouldn't get decontainerized, I guess?
20:03 pmichaud they could be made into Seqs -- that ends up being the same
20:03 Mowah left #perl6
20:03 masak ah.
20:03 pmichaud but as a first cut ... no, I wouldn't decontainerize arrays
20:03 [Sec] joined #perl6
20:03 pmichaud the tricky part is decontainerizing things without losing laziness in the process
20:04 wamba left #perl6
20:07 pmichaud I agree with sorear++ that we need to future-proof rakudo by parsing 'is rw' though... I'll start adding that
20:08 wamba joined #perl6
20:10 masak 'night, #perl6
20:10 masak left #perl6
20:12 felher 'night, masak
20:21 wamba left #perl6
20:25 silug joined #perl6
20:28 pernatiy joined #perl6
20:30 flussence joined #perl6
20:44 Qerub joined #perl6
21:08 mberends left #perl6
21:11 dalek rakudo: b15c9ef | pmichaud++ | src/core/ (6 files):
21:11 dalek rakudo: Add dummy "is rw" trait for Routines.  Doesn't do anything yet, but
21:11 dalek rakudo: allows us to properly future-proof code by adding "is rw" where it
21:11 dalek rakudo: will ultimately be needed.   Also mark many of the existing core
21:11 dalek rakudo: routines that are known to be "is rw".
21:11 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/b15c9ef26d
21:12 pmichaud did we ever decide what the rw form (or readonly form) of 'take' should be?
21:12 pmichaud there are a few places in the core setting where we use 'take' and need it to be rw.
21:13 sorear the rw form of take is specced to be take-rw, iirc
21:13 sorear likewise there exist return-rw and leave-rw
21:13 pmichaud wow, don't think I ever saw those.  (looking)
21:13 sorear the last is supposed to be useful when you need to have an rw return from a bare block
21:14 pmichaud yes, these would all be very useful
21:14 sorear I don't know if map is specced to be rw yet but it would be extremely useful
21:15 pmichaud I'm pretty sure it must be
21:16 pmichaud I'm also curious about some of the others (.values, .pairs, etc.)
21:16 mj41 left #perl6
21:16 ymasory_ left #perl6
21:16 pmichaud grrrrr... can't irclog search for "take-rw"
21:18 pmichaud ah, but I see it in S06
21:20 pmichaud wow, how did I miss that commit last June?
21:22 jaldhar_ left #perl6
21:23 pernatiy left #perl6
21:23 jaldhar_ joined #perl6
21:25 pernatiy joined #perl6
21:25 sorear pmichaud: I have issues with your idea of using Seq (more)
21:25 silug left #perl6
21:26 sorear my @bytecode; sub bytecodes() { load-stuff unless @bytecode; @bytecode }; say bytecodes()[13994593]
21:26 sorear it feels wrong to me for "is rw" to turn O(n) code into O(1) code
21:27 pmichaud I don't follow here
21:27 pmichaud and using Seq was just conjectural
21:28 sorear ok
21:28 sorear suppose @array is an array with, say, 10 million elements
21:28 kjeldahl left #perl6
21:28 sorear "return-rw @array" - this is just returning a reference to the Array object, not more expensive than "return 5"
21:29 sorear "return @array" - ???
21:29 jaldhar_ left #perl6
21:29 pmichaud you're objecting to the notion that we end up creating a 10-mil element Seq as a result?
21:29 sorear yes
21:30 pmichaud I don't disagree.  But I'm not the language designer.
21:30 pmichaud my impression from past discussions has been that ro-ness ends up trumping efficiency here.
21:30 pmichaud it wouldn't bother me if we didn't enforce ro-ness on arrays.
21:31 sbp can't you return a reference to an ro object?
21:31 sbp (might be an extremely stupid question, don't entirely follow)
21:32 pmichaud there's also the possibility that there could be a Seq that is able to shadow an existing Array without having to clone its elements
21:32 pmichaud i.e., it could override the at-pos to decontainerize elements as needed
21:33 pmichaud sbp: in this case we're trying to make a rw-object (array) into something that is ro
21:33 pmichaud sbp: but more precisely, what ends up having to happen is that we have to mark all of the elements of that array as ro
21:33 sbp ah, so you were suggesting to flag the array as ro rather than all the elements, and make the ro-marking kind of lazy?
21:34 sbp (well, not the array itself, but marking the shadow-Seq)
21:34 pmichaud sbp: possibly.  I don't have a good answer to this issue at the moment, tbh -- because I don't know that the speced semantics are clear yet
21:34 pmichaud so my position is more of "what do we want the semantics to be" rather than "here's how we do it"
21:35 sbp I see
21:35 sbp thanks
21:35 pmichaud my interpretation of things that have been discussed in the past (and my memory is foggy here) is that the array elements should end up acting ro
21:35 pmichaud and the shortcut mechanism at present for doing this is to create a Seq
21:36 jaldhar_ joined #perl6
21:36 pmichaud but that can be expensive if the array is large (as sorear++ rightly points out)
21:39 lumi_ left #perl6
21:42 dalek niecza: 767fb25 | sorear++ | lib/CLRBackend.cs:
21:42 dalek niecza: Fix constants in void context breaking the compiler
21:42 dalek niecza: review: https://github.com/sorear/niecza/commit/767fb25ead
21:42 dalek niecza: 5ef2e84 | sorear++ | src/niecza:
21:42 dalek niecza: New linear time nibbler
21:42 dalek niecza: review: https://github.com/sorear/niecza/commit/5ef2e8470d
21:42 dalek rakudo: 048573b | pmichaud++ | src/ (2 files):
21:42 dalek rakudo: Add take-rw, to allow taking of rw containers instead of lvalues.
21:42 dalek rakudo: (The existing C<take> function still also returns lvalues... but
21:42 dalek rakudo: now we can start to correct that.)
21:42 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/048573ba06
21:47 Vlavv left #perl6
21:49 Patterner left #perl6
21:52 Psyche^ joined #perl6
21:52 Psyche^ is now known as Patterner
22:00 Vlavv joined #perl6
22:08 lumi_ joined #perl6
22:14 MayDaniel left #perl6
22:17 pernatiy left #perl6
22:30 awoodland left #perl6
22:33 Trashlord left #perl6
22:33 ymasory left #perl6
22:34 sorear hmm... linear time nibbler did NOT make a huge dent in parser slowness (for the STD.pm6 benchmark)
22:34 rgrau` joined #perl6
22:35 rgrau left #perl6
22:37 donri joined #perl6
22:42 rgrau` left #perl6
22:48 aindilis` left #perl6
22:51 lumi__ joined #perl6
22:53 lumi_ left #perl6
23:00 dayangkun joined #perl6
23:05 lumi__ left #perl6
23:06 lumi_ joined #perl6
23:06 ymasory joined #perl6
23:15 spetrea joined #perl6
23:15 spetrea left #perl6
23:38 Sarten-X left #perl6
23:42 silug joined #perl6
23:44 whiteknight left #perl6
23:46 molaf_ joined #perl6
23:50 molaf left #perl6
23:59 cooper joined #perl6

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

Perl 6 | Reference Documentation | Rakudo