»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:00
ymasory_ joined
00:04
dukeleto joined
00:08
daniel-s joined
00:15
drbean joined
00:22
drbean left,
hudnix left
|
|||
lichtkind | TimToady: do you consider it? | 00:30 | |
00:33
ardeshir joined
00:37
noganex left
|
|||
lichtkind | night heros | 00:40 | |
00:40
dukeleto left
00:41
dukeleto joined,
dukeleto left
00:42
silug joined
00:44
lichtkind left
00:45
dukeleto joined,
dukeleto left
00:46
lumi_ left
00:47
dukeleto joined
00:48
dukeleto left,
dukeleto joined
01:03
silug left
01:06
noganex joined
01:20
hudnix joined,
nymacro joined
01:22
daniel-s left
|
|||
colomon | o/ | 01:31 | |
01:37
estrabd left
01:39
estrabd joined
01:49
cooper left,
whiteknight left
01:50
cooper joined
01:51
ymasory_ left
02:02
daniel-s joined
02:10
Kovensky left
|
|||
sorear | hello colomon | 02:11 | |
02:12
daniel-s left
|
|||
colomon | Hello! Seems like finishing finals has you back working at niecza with a vengence. | 02:12 | |
sorear | :) | 02:17 | |
02:20
cotto left
02:23
ymasory_ joined
02:25
jaldhar_ left
02:29
drbean joined
|
|||
sorear | ping jnthn. | 02:30 | |
02:32
Chillance left
02:34
drbean left
02:45
cotto joined
|
|||
sorear | lovely. I just noticed that niecza's <nibbler> (quoted constructs, block comments) | 02:47 | |
is O(n^2) | |||
now I know why commenting out 1500 lines with #`『』 is so slow! | |||
02:56
cotto left
03:02
hudnix left
|
|||
colomon | O(n^2)-- | 03:09 | |
03:14
Limbic_Region left
03:48
jaldhar_ joined
03:51
envi joined
03:59
jaldhar_ left
04:06
ymasory_ left
04:14
silug joined
|
|||
sorear | ... UNDEAD BUG | 04:22 | |
so much for "upgrading mono fixes the amazing byte array breakage" | |||
wow. | 04:26 | ||
only 6 commits to Mono since I last updated | |||
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
04:41
benabik left
04:47
jaldhar_ joined
04:50
benabik joined
04:53
cooper left
04:59
envi left
05:05
envi joined
|
|||
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? | ||
sorear | benabik: I guess | 05:10 | |
I know you can segfault the AOT-compiler by giving it two versions of the same assembly | |||
and I've always had a bad feeling about this | |||
whee, I've broken off the Mono bug from any dependency on running Perl 6 code | 05:12 | ||
it's all misbehaving C# now. (ok, 10,000+ lines of it, but I can fix that) | |||
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 | ||
jdhore1 | ah | ||
05:16
lumi_ joined
05:43
molaf joined
05:49
wamba joined
|
|||
sorear screams | 06:03 | ||
the bug just *stopped manifesting* in my test area | 06:04 | ||
I've reverted all of my changes to the last broken revision. No help | |||
I would suspect an intermittant hardware failure at this point, except that it's still bugging for my production code | 06:05 | ||
06:07
pamera left
|
|||
sorear | obviously there is some variable that I have not adequately controlled for. | 06:11 | |
it's sensitive to some amazingly small things. | 06:13 | ||
"cp -a lab1 lab2" can make a lab2 that fails to reproduce the bug | |||
on second thought, the filename lengths were different | |||
that could affect GC timing, maybe, I guess? | 06:14 | ||
and this is definitely a GC involved fail | |||
06:15
mberends left
06:16
mberends joined
|
|||
sorear | \o/ | 06:17 | |
controlling for the length of the current directory's name has made the fail reproducable | |||
too bad printf debugging is quite useless now | 06:21 | ||
gdb time | |||
06:34
meteorjay left
06:46
wamba left
|
|||
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:50 | ||
06:55
cotto joined,
Mowah joined
07:05
lumi_ left
|
|||
sorear | \o/ | 07:10 | |
SUCCESS | |||
time to 1. file a mono bug 2. implement a workaround in niecza | |||
07:20
silug joined
07:21
lumi_ joined
07:27
birdwindupbird joined,
silug left
|
|||
sorear | bugzilla.novell.com/show_bug.cgi?id=696817 # hopefully a good report | 07:39 | |
07:44
Eevee joined
07:49
mj41 joined
07:54
molaf left
|
|||
dalek | ecza: 3cbbfcd | sorear++ | / (4 files): Implement workaround for DefineInitializedData/dynamic assembly/sgen incompatibility |
07:56 | |
ecza: ae3d3b7 | sorear++ | / (3 files): Add Any.delete-key, Hash.delete-key, Bool.Numeric accelerators |
08:17 | ||
ecza: de5e663 | sorear++ | lib/ (3 files): Avoid redundant cloning of Any type variable |
08:18 | ||
sorear | good night #perl6 | 08:21 | |
mberends | good night sorear | 08:27 | |
08:32
MayDaniel joined
08:46
birdwindupbird left
09:08
sayu joined
09:13
noganex_ joined
09:17
noganex left
09:27
daniel-s joined
09:28
sayu left
09:42
Katibe joined
09:43
sayu joined
|
|||
sayu | hello | 09:45 | |
mberends | hello sayu | ||
09:46
wamba joined
10:00
masak joined
|
|||
masak | hello, #perl6. | 10:00 | |
10:01
mberends left
10:04
Enlik| joined,
silug joined
|
|||
tadzik | witajcie, zebry | 10:13 | |
masak | czesc, tadeusz. | 10:15 | |
10:15
pff joined
|
|||
tadzik | jak leci Carl? | 10:15 | |
masak | dobrze, bardzo dziekuje. | 10:16 | |
a ty? | |||
tadzik | też dobrze, dziękuję | 10:17 | |
masak | akcenty. showoff :P | 10:18 | |
tadzik | masz na myśli: popisówa? :P | ||
this channel is super awesome | |||
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 | ||
masak | oh right. | ||
I used to know that... :) | |||
10:19
Enlik joined
|
|||
masak | I didn't get the 'masz na mysli' line at all, by the way. | 10:19 | |
tadzik | "did you mean: {"showoff".to-polish(:informal)}" | 10:20 | |
masak | ah. | ||
10:20
Enlik| left
|
|||
masak | "popisówa" means something like "performance", no? | 10:20 | |
so that kinda makes sense. | 10:21 | ||
tadzik | no, not really | ||
"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 | |||
no, it's not in a dictionary | |||
masak | ok, so here I go again, then. | 10:22 | |
ogonki. popisówa :P | |||
tadzik | ;) | 10:23 | |
masak | I will always have a soft spot for the Polish language. | ||
tadzik | now that I look at that, "popisówa" may be something related to performance, noun | 10:24 | |
at first I thought of performance, verb | |||
you say "popisowy numer" as the key point of a performance, when it comes to acrobacy or illusionism or something like that | |||
masak: why is that? | |||
masak | based on what you just said, I can't help wonder if "popisówa" isn't an adjective. | 10:25 | |
it looks like the sing-fem form of "popisowy". | 10:26 | ||
which is an adjective. | |||
tadzik | no, "popisówa" is a noun. It may be a nounisation of "popisowy" | 10:27 | |
masak | ok. | ||
tadzik | "popisowa popisówa" | ||
masak | oh wow. so the ogonek actually makes a difference there? | ||
er, "ogon" | 10:28 | ||
oh, both forms exist :) | |||
tadzik | ogonek is fine. You know what? I dnd'nt even notice that the only difference here is the ogonek | ||
masak | :P | ||
tadzik | yeah, it changes the word completely. You see, it's not just the accent :) | ||
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 | ||
masak | funny thing; огонёк means something completely different in Russian. means "twinkle" or "little light". | ||
tadzik | ó and u, like "rz" and ż are exactly the same things, when spelled | ||
10:30
mberends joined
|
|||
masak | tadzik: yeah. orthographic accidents of history, I guess. | 10:30 | |
10:31
daniel-s left
|
|||
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:31 | |
The comitee of a Polish language has already made an effort of making things allowed just because people write them incorrectly anyway | 10:32 | ||
I can understand that, but having a bit of a language purist that drives me nuts as well | |||
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 | |
10:33
wamba left
|
|||
masak | it's only from a static point in history that things feel completely hopeless :) | 10:33 | |
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:34 | |
but almost no one knows that anyway, so the joke is still on ;) | 10:35 | ||
masak | :) | 10:36 | |
ostrzyżenie & | 10:39 | ||
tadzik | :D | 10:40 | |
mberends noms a Śliwka Nałęczowska in an attempt to feel in-topic | 10:41 | ||
mmm, /me noms a nother one ;) | 10:42 | ||
10:44
wamba joined
10:49
silug left
10:50
silug joined
|
|||
tadzik | oh, you still have them? :) | 10:57 | |
sweets don't have such a long lifecycle in my sorrounding :) | |||
mberends | :-) | 10:59 | |
10:59
wknight8111 joined
11:01
wamba left
11:06
_twitch joined,
molaf joined
|
|||
mberends | tadzik: here they have a half-life, as the population shrinks I try harder to save them. and randomly they disappear :) | 11:09 | |
11:14
mj41 left
11:15
nymacro left
|
|||
tadzik | ;) | 11:17 | |
11:17
sayu left
11:19
pff left
11:41
daniel-s joined
11:49
satyavvd joined
11:51
kaare_ joined,
silug left
11:55
satyavvd left
11:59
Helios left
12:06
Helios joined
12:42
pochi left
13:05
kfo_ joined
13:06
wknight8111 left
13:08
kfo left
13:14
amkrankruleuen left
13:18
Moukeddar joined
|
|||
Moukeddar | Hello O/ | 13:19 | |
13:22
amkrankruleuen joined
13:29
_twitch left
13:30
satyavvd_ joined
|
|||
tadzik | hello Moukeddar | 13:34 | |
Moukeddar | sadly i have to go | 13:36 | |
later | |||
13:37
Moukeddar left
13:42
satyavvd_ left
13:45
ardeshir left
|
|||
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:52 | |
13:55
silug joined
14:02
wamba joined
14:04
dual left
14:13
xinming left
14:18
xinming joined
14:20
pmurias joined
14:31
wamba left
|
|||
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 | |
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
14:41
noganex_ left
|
|||
pmurias | tadzik: did you take a look at scons? | 14:42 | |
14:43
MayDaniel left
14:45
noganex joined
|
|||
ruoso always gets back to plain make... | 14:46 | ||
mberends knows the feeling too :) | 14:47 | ||
14:47
jmp__ joined
14:51
jmp__ left
14:53
jaldhar_ left
14:55
pmurias left
|
|||
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:56 | |
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 | |
Also, that all the alternatives are worse =) | |||
15:02
donri joined
|
|||
tadzik | phenny: tell pmurias no, haven't yet | 15:07 | |
phenny | tadzik: I'll pass that on when pmurias is around. | ||
tadzik | arnsholt: how about this scons thingy? | ||
scons looks more or less like a thing I'd want to use | 15:09 | ||
15:12
silug left
15:13
silug joined
|
|||
arnsholt | tadzik: I've not tried scons, but what I've heard about it hasn't been too good unfortunately | 15:14 | |
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:15 | |
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 | ||
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:22 | |
15:25
silug left
15:27
daniel-s left
|
|||
tadzik | I don't care who replaces what. I want a build system that does what I want :) | 15:29 | |
make is here to stay, in one form or another (see cmake) | |||
masak | aye. | 15:32 | |
15:35
jaldhar_ joined
|
|||
pmichaud | good morning, #perl6 | 15:38 | |
tadzik | good morning pmichaud | 15:40 | |
15:40
birdwindupbird joined
15:41
MayDaniel joined
|
|||
sorear | good * #perl6 | 15:47 | |
masak | morning, pmichaud, sorear. | 16:02 | |
16:03
sftp_ joined,
sftp left
16:04
wamba joined
16:07
jaldhar_ left,
jaldhar_ joined
16:09
sayu joined
16:11
sftp joined,
cognominal left
|
|||
sorear | o/ masak | 16:11 | |
16:12
dual joined
16:13
cognominal joined,
sftp_ left
16:20
jaldhar_ left
16:27
jaldhar_ joined
|
|||
masak decides to build rakudo/nom | 16:32 | ||
16:33
ymasory_ joined
16:35
jaldhar_ left
|
|||
tadzik | always funny | 16:36 | |
16:37
sftp left
16:38
sftp joined
16:41
wamba left
16:45
molaf left
|
|||
sorear has rerun the Profiler of Doom | 16:45 | ||
16:47
envi left
16:48
envi joined
16:50
jfried joined
16:52
envi left
|
|||
masak | oh, --gen-nqp :) | 16:52 | |
16:53
envi_ joined
|
|||
pmichaud | TimToady: ping | 16:56 | |
16:57
thou joined
|
|||
pmichaud | TimToady: larger question.... how should a sequence signal to the caller that the List it returns is infinite? (more) | 16:58 | |
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 | ||
for example: 1,2,3 ... * returns a (<generator> ,*) Parcel, and the Parcel knows that it's "infinite" because of that final whatever star | |||
but this doesn't seem to quite work when the sequence has a terminating iterator, as in | 17:00 | ||
1,2, { last if $_ >= 5; $_+1 } ... * | |||
because the sequence ends up being (1,2,3,4,5,*) instead of (1,2,3,4,5) | 17:01 | ||
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 | ||
(or (c) other) | |||
EOQ | |||
masak | building rakudo/nom dies with the error "Cannot open output file Perl6/ModuleLoader.pbc" here. | 17:05 | |
pmichaud | (d) I can give Lists an "$!infinite" or "$!whateverish" attribute that is somehow set by whatever is creating the list | 17:08 | |
(if so, how... thus returning to original question :-) | |||
17:08
jaldhar_ joined
|
|||
masak | pmichaud: feels like a question for github.com/perl6/mu/blob/master/misc/pm.txt ... | 17:10 | |
pmichaud | masak: yes, I'm not sure how closely that's being monitored atm, though. | 17:11 | |
if I don't get an answer here, I'll put it into pm.txt | |||
(and perhaps phrase it a little more clearly) | |||
anyway, the ,* approach has a hiccup or two to clean up | |||
tadzik | masak: did you install your nqp? | 17:13 | |
pmichaud | guess I need to work on the nom build system :) | 17:18 | |
sorear | pmichaud: how involved are you in nom? | 17:23 | |
17:36
sftp left
17:38
sftp joined
|
|||
masak | tadzik: I did 'perl Configure.pl --gen-nqp', but I didn't "install" nqp beyond that. | 17:40 | |
tadzik | I see | ||
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 | |
17:41
Limbic_Region joined
|
|||
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 | |
afk, lunch | |||
17:42
silug joined
17:44
sftp_ joined,
sftp left
17:51
JimmyZ joined
17:52
JimmyZ left
17:54
wamba joined,
cognominal left
|
|||
masak | oh! | 17:55 | |
turns out the error I got was just because there is no directory 'Perl6'. | |||
I have a feeling a path gets generated wrongly somewhere. | |||
17:56
cognominal joined
|
|||
masak | unless there's meant to be a 'Perl6' directory immediately in the 'rakudo' directory. | 17:56 | |
18:04
cognominal_ joined
|
|||
masak | now it builds. | 18:04 | |
$ ./perl6 -e 'say 42' | |||
18:05
Tedd1^ joined
|
|||
masak | Can only use get_who on a SixModelObject | 18:05 | |
18:05
arnsholt_ joined,
kaare_ left
18:06
cognominal left,
Chillance left,
Tedd1 left,
[Sec] left,
stepnem left,
revdiablo left,
kst left,
arnsholt left,
jevin left,
sjn left
18:08
stepnem joined,
silug left
18:09
kst joined,
envi_ left
18:10
sjn joined
18:11
revdiablo joined,
revdiablo left,
revdiablo joined
|
|||
sorear | odd | 18:13 | |
#`(foo) stopped working altogether... not quite sure why yet | |||
18:14
jevin joined
18:16
birdwindupbird left
|
|||
colomon | sorear++ # just read the epic mono debugging comments in the log from last night | 18:23 | |
18:27
dukeleto left
18:28
dukeleto joined
18:29
rindolf joined
18:30
molaf joined
|
|||
sorear | o/ rindolf | 18:32 | |
felher | are Lvalue subroutines already implemented in rakudo? | 18:33 | |
rindolf | Hi sorear | ||
Hi all. | |||
felher | hi rindolf | ||
masak | hi rindolf | ||
rindolf | What's new? | ||
sorear | felher: yes | 18:34 | |
felher: I don't beleive any current implementation has rvalue subroutines | |||
perl6: my $x; sub foo () { $x }; foo = 5; say $x | 18:35 | ||
p6eval | niecza v5-120-gde5e663: OUTPUT«===SORRY!===Any()Preceding context expects a term, but found infix = instead at /tmp/4d4NuqQiXD line 1:------> my $x; sub foo () { $x }; foo ⏏= 5; say $xParse failed» | ||
..pugs, rakudo 30809a: OUTPUT«5» | |||
sorear | perl6: my $x; sub foo () { $x }; foo() = 5; say $x | ||
p6eval | pugs, rakudo 30809a, niecza v5-120-gde5e663: OUTPUT«5» | ||
18:36
mj41 joined
|
|||
masak | std: my $x; sub foo () { $x }; foo = 5 | 18:37 | |
p6eval | std 4b1b100: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = instead at /tmp/WUysEoKeed line 1:------> my $x; sub foo () { $x }; foo ⏏= 5Parse failedFAILED 00:01 117m» | ||
masak submits rakudobug | 18:38 | ||
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:40 | |
sorear | perl6: my $x; sub foo is rw () { $x }; foo() = 5; say $x | 18:41 | |
p6eval | niecza v5-120-gde5e663: OUTPUT«5» | ||
..rakudo 30809a: OUTPUT«===SORRY!===Confused at line 22, near "sub foo is"» | |||
..pugs: OUTPUT«***  Unexpected "()" expecting trait or block at /tmp/2XOXAMyaDq line 1, column 22» | |||
sorear | perl6: my $x; sub foo () is rw { $x }; foo() = 5; say $x | ||
p6eval | pugs, niecza v5-120-gde5e663: OUTPUT«5» | ||
..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 | |||
..:rw($rw)… | |||
18:41
hudnix joined
|
|||
sorear | felher: all subs are rw for now because nobody can figure out how non-rw subs are supposed to work | 18:41 | |
niecza explicitly ignores "rw" because I want to be able to write futureproof code | 18:42 | ||
someday, we're going to work out what non-rw means | 18:43 | ||
felher | sorear: I see, thnx :) | ||
masak | forgive me, but what's so mysterious about non-rw? | ||
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 | |
sometimes it's hard to figure out how to interpret them | |||
masak | sure. | 18:45 | |
rakudo: 4 = 5 | |||
sorear | masak: the main interesting cases are things like sub foo () { @obj } | ||
p6eval | rakudo 30809a: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/5WEPUYxarh» | ||
masak | sorear: I figger a non-rw sub would be one that replied something like that. | ||
sorear: oh! arrays. | |||
sorear | masak: does that return a read-only pseudoarray that proxies to @obj? | ||
masak thinks | |||
sorear | the scalar and Parcel cases are not particularly hard | ||
masak | there's a rule (elsewhere) in the spec saying of arrays that "readonliness only goes one level deep". | 18:46 | |
I think it's in relation to parameters. | |||
sorear | we could also have @obj decaying into a read-only slice, but that would destroy .kv and other array functionality | ||
masak | would be nice if the same could be made to hold here. | ||
sorear | readonly array parameters also make no sense to me. | ||
masak | why not? | 18:47 | |
sorear | same reason really | ||
I don't see a sane way to take an arbitrary Positional and make it readonly | |||
maybe we need a new allomorphic flag for this | 18:48 | ||
masak | clearly at least Array needs to have some support for it. | 18:53 | |
18:54
rindolf left
|
|||
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 | |
but... one can ask nicely :) | |||
sorear | I guess we need to invent a new set of rules for that. | ||
masak | hah, rakudo/nom is funny: | 18:56 | |
$ ./perl6 -e '2' | |||
Class 'Int' not found | |||
sorear | reference-level allomorphism won't do - my $foo = @x strips off that level | ||
do you think it would make sense for list types to have an ASREADONLY method, masak? | 18:57 | ||
we could have it default (at the Any level) to just return self | |||
masak | sorear: maybe. | ||
sorear | Array and Hash can return readonly proxy objects | 18:58 | |
masak | (I'm guessing the method name was just a suggestion) :P | ||
sorear | Parcel distributes ro-ness over its children | ||
19:00
Limbic_Region left
|
|||
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? | ||
dalek | ecza: 048c930 | sorear++ | / (2 files): NIECZA_VERBOSE_EXCEPTIONS to print .args.perl in backtraces |
19:04 | |
tadzik | niecza: class A { has $.foo = 5; }; A.new.foo = 7 | 19:05 | |
p6eval | niecza v5-120-gde5e663: ( no output ) | ||
tadzik | rakudo: class A { has $.foo = 5; }; A.new.foo = 7 | ||
p6eval | rakudo 30809a: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/0mU494jvBM» | ||
tadzik | sorear: nieczabug above? | ||
sorear | tadzik: yes, ultimately the same as the lack of ro subs | ||
rakudo: class A { has @.foo = 1,2,3 }; A.new.foo[1] = 7 | 19:06 | ||
p6eval | rakudo 30809a: ( no output ) | ||
tadzik | sorear: I see | ||
rakudo: class A { has $!foo; method a { return $!foo }; }; A.new.a() = 19 | 19:07 | ||
p6eval | rakudo 30809a: ( no output ) | ||
tadzik | rakudo: class A { has $!foo; method a { return $!foo }; }; my $a = A.new; $a.a() = 19; say $a.a | ||
p6eval | rakudo 30809a: OUTPUT«19» | ||
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; | ||
tadzik | oh rakudo, you so crazy | ||
felher: yeah, I can see the issue | 19:08 | ||
man, that looks _broken_. I hope that's not intentional | |||
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 | ||
p6eval | rakudo 30809a: OUTPUT«5» | ||
masak | \o/ | ||
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. | ||
known issue. | |||
tadzik | so, a rakudobug? | ||
thank FSM | |||
masak | an old one, yes. | ||
sorear | ahahahaaa | 19:15 | |
niecza: #`(foo) say 5 | |||
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 | ||
..STD.comment:sym<#`(...)> @ … | |||
sorear | niecza: say 2; #`(foo) say 5 | ||
p6eval | niecza v5-120-gde5e663: OUTPUT«25» | ||
sorear | std: #`(foo) say 5 | 19:16 | |
p6eval | std 4b1b100: OUTPUT«ok 00:01 113m» | ||
sorear | the problem in niecza is that comp_unit is a 'rule' | ||
in particular, the first thing it does is to parse whitespace | |||
masak | oh! | ||
sorear | it tries to parse the comment... BEFORE setting up %*LANG | ||
masak | oops. | 19:17 | |
19:19
sayu left
|
|||
dalek | ecza: c9177a8 | sorear++ | src/niecza: Fix #`() at beginning of file |
19:31 | |
19:32
rgrau joined
19:34
donri left
19:39
donri joined
19:40
whiteknight joined
19:46
donri left
|
|||
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:00 | |
in the past we've called it "decontainerize" | 20:01 | ||
masak | oh, right. | ||
pmichaud | when we get it implemented, it'll also resolve the "take bug" | ||
masak | there's been talk of 'take' doing the same too, methinks. | ||
right. | 20:02 | ||
but returned arrays wouldn't get decontainerized, I guess? | |||
pmichaud | they could be made into Seqs -- that ends up being the same | 20:03 | |
20:03
Mowah left
|
|||
masak | ah. | 20:03 | |
pmichaud | but as a first cut ... no, I wouldn't decontainerize arrays | ||
20:03
[Sec] joined
|
|||
pmichaud | the tricky part is decontainerizing things without losing laziness in the process | 20:03 | |
20:04
wamba left
|
|||
pmichaud | I agree with sorear++ that we need to future-proof rakudo by parsing 'is rw' though... I'll start adding that | 20:07 | |
20:08
wamba joined
|
|||
masak | 'night, #perl6 | 20:10 | |
20:10
masak left
|
|||
felher | 'night, masak | 20:12 | |
20:21
wamba left
20:25
silug joined
20:28
pernatiy joined
20:30
flussence joined
20:44
Qerub joined
21:08
mberends left
|
|||
dalek | kudo: b15c9ef | pmichaud++ | src/core/ (6 files): Add dummy "is rw" trait for Routines. Doesn't do anything yet, but will ultimately be needed. Also mark many of the existing core routines that are known to be "is rw". |
21:11 | |
pmichaud | did we ever decide what the rw form (or readonly form) of 'take' should be? | 21:12 | |
there are a few places in the core setting where we use 'take' and need it to be rw. | |||
sorear | the rw form of take is specced to be take-rw, iirc | 21:13 | |
likewise there exist return-rw and leave-rw | |||
pmichaud | wow, don't think I ever saw those. (looking) | ||
sorear | the last is supposed to be useful when you need to have an rw return from a bare block | ||
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 | ||
pmichaud | I'm pretty sure it must be | 21:15 | |
I'm also curious about some of the others (.values, .pairs, etc.) | 21:16 | ||
21:16
mj41 left,
ymasory_ left
|
|||
pmichaud | grrrrr... can't irclog search for "take-rw" | 21:16 | |
ah, but I see it in S06 | 21:18 | ||
wow, how did I miss that commit last June? | 21:20 | ||
21:22
jaldhar_ left
21:23
pernatiy left,
jaldhar_ joined
21:25
pernatiy joined
|
|||
sorear | pmichaud: I have issues with your idea of using Seq (more) | 21:25 | |
21:25
silug left
|
|||
sorear | my @bytecode; sub bytecodes() { load-stuff unless @bytecode; @bytecode }; say bytecodes()[13994593] | 21:26 | |
it feels wrong to me for "is rw" to turn O(n) code into O(1) code | |||
pmichaud | I don't follow here | 21:27 | |
and using Seq was just conjectural | |||
sorear | ok | 21:28 | |
suppose @array is an array with, say, 10 million elements | |||
21:28
kjeldahl left
|
|||
sorear | "return-rw @array" - this is just returning a reference to the Array object, not more expensive than "return 5" | 21:28 | |
"return @array" - ??? | 21:29 | ||
21:29
jaldhar_ left
|
|||
pmichaud | you're objecting to the notion that we end up creating a 10-mil element Seq as a result? | 21:29 | |
sorear | yes | ||
pmichaud | I don't disagree. But I'm not the language designer. | 21:30 | |
my impression from past discussions has been that ro-ness ends up trumping efficiency here. | |||
it wouldn't bother me if we didn't enforce ro-ness on arrays. | |||
sbp | can't you return a reference to an ro object? | 21:31 | |
(might be an extremely stupid question, don't entirely follow) | |||
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 | |
i.e., it could override the at-pos to decontainerize elements as needed | |||
sbp: in this case we're trying to make a rw-object (array) into something that is ro | 21:33 | ||
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 | |||
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? | ||
(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 | ||
so my position is more of "what do we want the semantics to be" rather than "here's how we do it" | |||
sbp | I see | 21:35 | |
thanks | |||
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 | ||
and the shortcut mechanism at present for doing this is to create a Seq | |||
21:36
jaldhar_ joined
|
|||
pmichaud | but that can be expensive if the array is large (as sorear++ rightly points out) | 21:36 | |
21:39
lumi_ left
|
|||
dalek | ecza: 767fb25 | sorear++ | lib/CLRBackend.cs: Fix constants in void context breaking the compiler |
21:42 | |
ecza: 5ef2e84 | sorear++ | src/niecza: New linear time nibbler |
|||
kudo: 048573b | pmichaud++ | src/ (2 files): Add take-rw, to allow taking of rw containers instead of lvalues. now we can start to correct that.) |
|||
21:47
Vlavv left
21:49
Patterner left
21:52
Psyche^ joined,
Psyche^ is now known as Patterner
22:00
Vlavv joined
22:08
lumi_ joined
22:14
MayDaniel left
22:17
pernatiy left
22:30
awoodland left
22:33
Trashlord left,
ymasory left
|
|||
sorear | hmm... linear time nibbler did NOT make a huge dent in parser slowness (for the STD.pm6 benchmark) | 22:34 | |
22:34
rgrau` joined
22:35
rgrau left
22:37
donri joined
22:42
rgrau` left
22:48
aindilis` left
22:51
lumi__ joined
22:53
lumi_ left
23:00
dayangkun joined
23:05
lumi__ left
23:06
lumi_ joined,
ymasory joined
23:15
spetrea joined,
spetrea left
23:38
Sarten-X left
23:42
silug joined
23:44
whiteknight left
23:46
molaf_ joined
23:50
molaf left
23:59
cooper joined
|