»ö« 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! | tinyurl.com/p6contest Set by moritz_ on 28 December 2010. |
|||
00:07
felliott joined
00:09
Kodi left
00:31
kst left,
kst joined
00:38
kfo_ joined
00:41
kfo left
00:43
molaf__ joined
00:46
molaf_ left
00:48
cdarroch left
00:57
QinGW joined
01:02
kst left
01:03
kst joined
01:18
felliott left
01:24
felliott joined
01:31
starcoder left
01:32
felliott left
01:38
starcoder joined
01:42
arlinius joined
01:50
dukeleto left,
dukeleto joined
01:54
_jaldhar joined
01:55
drbean joined,
kst left
01:57
kst joined
02:07
whiteknight left
|
|||
flussence | I was poking around the rakudo source and found "as" used inside a signature, what does that mean? The only place in the spec I can find mention of it is for return value types. | 02:08 | |
(and it's not the most greppable of keywords...) | |||
Tene | flussence: coerced to type | 02:09 | |
rakudo: sub foo($n as Str) { say $n.WHAT }; my $x = 1; say $x.WHAT; foo($x); | 02:10 | ||
p6eval | rakudo 723986: OUTPUT«Int()Str()» | ||
flussence | oh... that's useful to know :) | ||
Tene | flussence: like that: ^ | ||
colomon | woah, I didn't know that was implemented yet. | 02:14 | |
Tene | colomon: Neither did I. ;) | ||
colomon | rakudo: sub foo($n as Str) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x); | 02:15 | |
p6eval | rakudo 723986: OUTPUT«Int()Str()"n" => "1"» | ||
colomon | rakudo: sub foo($n as Rat) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x); | ||
p6eval | rakudo 723986: OUTPUT«Int()Rat()"n" => 1/1» | ||
colomon | rakudo: sub foo($n as Complex) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x); | 02:16 | |
p6eval | rakudo 723986: OUTPUT«Int()Complex()"n" => Complex.new(1, 0)» | ||
colomon | dang, it's good. | ||
flussence | rakudo: sub foo($n as IO) { say :$n.perl }; my Int $x = 1; foo($x); # wondering how it breaks | 02:18 | |
p6eval | rakudo 723986: OUTPUT«"n" => IO.new(PIO => Any, ins => Any, autoflush => Any, path => "1", stat => IO;Stat.new(path => "1"))» | ||
flussence | oh, probably won't do that with builtin types. | ||
rakudo: class A {}; sub foo($n as A) { say :$n.perl }; my Int $x = 1; foo($x); # wondering how it breaks | |||
p6eval | rakudo 723986: OUTPUT«Unable to coerce value for '$n' from Int to A; no coercion method defined in 'foo' at line 1:/tmp/gcRL90y4nT in main program body at line 22:/tmp/gcRL90y4nT» | ||
flussence | yey | ||
s/e/* | 02:19 | ||
rakudo: sub foo($x as Int where { $_ > 0 }) { say $x }; foo("0x10") | 02:20 | ||
p6eval | rakudo 723986: OUTPUT«16» | ||
flussence | ooh, I am *so* going to use that. | 02:21 | |
02:23
leprevost left
|
|||
flussence | Ick. (-1).sqrt == NaN and (i ** 2) is -1 + (float rounding error)i. | 02:34 | |
Tene | rakudo: say i * i | 02:42 | |
p6eval | rakudo 723986: OUTPUT«-1 + 0i» | ||
[Coke] | rakudo: say pi * e | 02:44 | |
p6eval | rakudo 723986: OUTPUT«8.53973422267357» | ||
[Coke] | rakudo: say pi e | ||
p6eval | rakudo 723986: OUTPUT«===SORRY!===Confused at line 22, near "say pi e"» | ||
02:47
cafesofie joined
02:53
kst left,
kst joined
02:55
felliott joined
03:00
jferrero left
03:29
am0c joined
04:03
agentzh joined
04:07
mtk left
04:16
mtk joined
04:25
cotto left
04:27
Su-Shee left
04:28
Su-Shee joined
04:32
GinoMan joined
04:46
Chillance left
05:04
envi joined,
felliott left
05:19
coldhead left
05:20
stifynsemons joined,
stifyn joined
05:21
zevpl left
05:31
jfried left,
jfried joined
05:37
cotto joined,
tomaw left,
jfried left
05:40
stifyn left,
stifynsemons left
05:43
Patterner left
05:46
Psyche^ joined,
Psyche^ is now known as Patterner
05:49
woosley joined
05:50
JimmyZ joined
05:52
jfried joined
05:54
JimmyZ left
|
|||
dalek | ecza: f1f77ce | sorear++ | / (2 files): Implement .method automatic $_ form |
05:54 | |
06:12
kaare_ joined
06:18
cjk101010 joined
06:19
f00li5h left
06:31
mberends left
06:33
dju left
06:40
orafu left,
orafu joined
06:45
dju joined,
dju left,
dju joined
06:47
ponbiki left,
ponbiki joined
06:59
wtw joined
07:05
drbean left,
ravic joined
07:07
tomaw joined
|
|||
ravic | i got a perl qquestion. and i m unable to login into #perl | 07:07 | |
m ashamed to ask it here as its nt perl6. can any help me dodging into #perl | |||
perigrin | why are you unable to login to #perl? | 07:08 | |
moritz_ | ravic: there's also irc.perl.org with lots of channels | ||
perigrin | including a #perl-help | ||
ravic | on it. | 07:20 | |
'how to copy a file to all 10 remote machines simulataneoulsy?' -> need somehelp in this context | |||
sorear | you don't need Perl for that | 07:21 | |
man bash_builtins | |||
look up "for" | |||
man scp | |||
moritz_ | or search for ntfs :-) | ||
erm, nfs | 07:22 | ||
moritz_ not quite awake | |||
sorear -> sleep | |||
plobsing | moritz_: if you could do that using only ntfs, I'd be impressed | 07:26 | |
07:30
cosimo left
07:31
cosimo joined,
PZt left
|
|||
moritz_ | plobsing: not only nfs, but nfs for distributing the file | 07:34 | |
ravic | nfs doesnt work out for me. architechure limitations | 07:37 | |
yes scp can push file | |||
rsync as well | |||
but u need a way to push it parllelly | 07:38 | ||
plobsing | ravic: have you heard of job control? your shell should have it. | 07:41 | |
07:50
coldhead joined
|
|||
Tene | ravic: man parallel | 07:52 | |
ravic: man bash, /^JOB | 07:53 | ||
ravic: man xargs, /-P | 07:54 | ||
08:18
kst left,
kst joined
08:23
cafesofie left
|
|||
TiMBuS | is there a way to unload or overwrite a module in perl6? | 08:24 | |
jnthn | morning, #perl6 | 08:25 | |
TiMBuS: You could use a different version of it in a nested lexical scope, maybe. Dunno how far that helps. Guess if you only use it within a given scope then it's "unloaded" outside that scope. But that's not unloaded as such I guess, only not in scope... | 08:26 | ||
TiMBuS | that could eventually get a bit bulky.. | 08:27 | |
08:28
bacek left
|
|||
jnthn | TiMBuS: What's the use case? | 08:31 | |
08:32
bacek joined
|
|||
TiMBuS | jnthn, irc bot, modules are used for callbacks | 08:33 | |
so being able to load/unload features would be mighty handy | |||
08:36
Mowah joined
|
|||
TiMBuS | or, if you need a more exact usage example: require 'the/module'; modulelist.push(the::module.new) | 08:40 | |
i guess hiding the name works | 08:41 | ||
08:41
PZt joined
08:47
daxim joined,
Mowah left
08:48
masak joined
08:49
kensanata joined,
drbean joined
|
|||
masak | morning, zebras. | 08:49 | |
daxim | now that sixers have a sizable toolchain, how about applying for the QA hackathon? interested/does something need fixing with facetime? www.nntp.perl.org/group/perl.qa/201...12675.html | 08:51 | |
masak | daxim: that's a splendid idea. daxim++ | 08:52 | |
daxim: especially since we have lots of tricks to learn from the Perl 5 people who have gone before us. | |||
rakudo: my $foo = [5]; for $foo { .shift }; say +$foo | 09:03 | ||
p6eval | rakudo 723986: OUTPUT«0» | ||
masak | \o/ | ||
09:11
ravic left
09:27
REPLeffect left
09:29
REPLeffect joined
09:35
drbean left
09:36
timbunce joined
09:47
noganex_ is now known as noganex
|
|||
masak | twitter.com/supernovus/status/29666617625419776 -- I know the feeling. I've solved this by searching out problems where CPU isn't the bottleneck. | 09:47 | |
09:56
timbunce left
|
|||
jnthn is speed away from using Rakudo for more stuff | 09:58 | ||
masak | ...which is why Niecza is interesting to me. it seems to run faster, which can be a plus even with fewer features than Rakudo. | 09:59 | |
jnthn | *nod* | 10:00 | |
10:02
QinGW left
|
|||
jnthn | The Rakudo 6model branch will be made in a week or so. | 10:02 | |
10:02
timbunce joined
|
|||
masak | that's excellent news. ++jnthn! | 10:09 | |
jnthn | We'll also get the multi semantics updated in with that lot. :) | 10:11 | |
masak | \o/ | ||
finally! | |||
jnthn | nqp-rx/nom supports them already ;) | ||
masak | yes, I've tried them. :) | 10:12 | |
jnthn | ooh :) | 10:13 | |
10:13
tzhs joined
|
|||
jnthn | It's still dead slow in nqp-rx though. | 10:13 | |
I didn't port the multi cache from /nom | |||
er | |||
to /nom | |||
from nqpclr :) | |||
10:14
dakkar joined
|
|||
masak | jnthn: see, even you are confused by the naming! :P | 10:14 | |
jnthn | :P | 10:15 | |
jnthn looks forward to pmichaud++'s forthcoming post to clear it all up :) | |||
10:17
justatheory left
10:20
cognominal joined
|
|||
masak | jnthn: www.angryduck.com/pictures/2010_11/..._Drunk.jpg :P | 10:23 | |
jnthn | That fish looks like it's fin-ished plenty of beer. :P | 10:27 | |
masak | :P | 10:35 | |
10:43
f00li5h joined,
f00li5h left,
f00li5h joined
|
|||
daxim | www.oreillymaker.com/ # have fun | 10:46 | |
masak | :) | ||
daxim | old idea, though, I think I used this one the last time: web.archive.org/web/20020124124713/...oracovers/ | 10:49 | |
mathw | jnthn: I read your blog post about 6model with great interest. | ||
jnthn | daxim: Oh, cool :) | 10:50 | |
mathw: Glad it was interesting. :) | 10:51 | ||
jnthn tries not to swear too loudly at TFS | 10:52 | ||
mathw | It was also rather exciting | ||
does prove the value of the dispatch cache doesn't it :) | 10:53 | ||
jnthn | mathw: Very much so | ||
mathw: It was exacberbated by the fact that I hadn't done anything much to optimize the non-dispatch-cache case. | |||
mathw | mmm | 10:54 | |
10:54
dukeleto left
|
|||
jnthn | (e.g. it shoudln't have been quite that much slower anyway) | 10:54 | |
mathw | well hopefully there'll be some wins there in the future :) | ||
jnthn | (but I'd not prioritized that bit yet as I expected to be hitting the cache lots :)) | ||
10:54
dukeleto joined
|
|||
mathw | well, what's the rule? make it work, then make it fast | 10:57 | |
hopefully :) | |||
with a load of caveats about trying to avoid implementations which are impossible to make faster | |||
jnthn | *nod* | 11:02 | |
11:03
dju left
11:04
dju joined
11:10
coldhead left
|
|||
mathw | jnthn: you're learning Russian, IIRC? | 11:12 | |
jnthn | Trying to :) | ||
mathw | I'm trying to learn how to pronounce it | ||
I joined a choir, and the first piece we're doing has four movements in Russian (and two in Latin) | 11:13 | ||
It's... got some interesting sounds | |||
dukeleto | ipv6 just landed in Parrot | 11:14 | |
jnthn | mathw: :) | ||
And all the palleted things | |||
jnthn bbs - lunch | 11:15 | ||
arnsholt | And lots of weird sibilants | ||
mathw | mmm | ||
masak | mathw: I agree, singing in Russian is fun. | ||
mathw | so of course when we have a whole load of consonants that don't exist in English | ||
Prokofiev puts them on a load of very fast notes | |||
arnsholt | There are some Polish placenames where I acknowledge only the German versions (because I can pronounce the real Polish names =) | 11:16 | |
masak | mathw: live with it, anglophone. :P | ||
mathw | pfft | ||
I can handle some of them better than my immediate neighbours in the tenor section | |||
because they're in Lojban :) | |||
masak | :) | 11:17 | |
mathw | and I have no idea what the man next to me thought he was singing last night | ||
but it wasn't what we've been taught | |||
masak | mathw: consider how well-suited the Cyrillic orthography is to the Russian phonology. | ||
mathw | certainly seems to fit it better than English is served by Latin alphabet | 11:18 | |
I'm trying to wean myself off the transliteration, because that's really misleading | |||
arnsholt | The problem with English isn't as much the alphabet as the orthography | 11:19 | |
mathw | I'm also trying to avoid the temptation to sing the German translation, which is also printed in my edition of the score | ||
it's all fun though | |||
arnsholt | Essentially, the Great Vowel Shift and the codification of written English occured in the wrong order =) | ||
mathw | heh yes | ||
we also didn't mangle our loanwords enough | |||
arnsholt | (Unfortunately for anyone born after Shakespeare) | 11:20 | |
Yeah, that's a pain as well | |||
But less so for me, since I know both French and Latin =) | |||
masak | mathw: no, you definitely shouldn't pay attention to the transliteration. :/ | ||
11:21
woosley left
|
|||
mathw | Ultimately it's going to be better to learn how to pronounce what's written in Russian | 11:22 | |
the transliteration takes too long to interpret at the speed this thing goes | |||
At least I have no existing assumptions about how to pronounce things written in Cyrillic | |||
Rather than having to remember what the transliterator meant when he wrote "l(y)oo" | |||
masak | :( | 11:23 | |
noganex | reminds me somehow of the time when i learned thai... | ||
gfldex | i was teached russian in school and i can tell you that english transliteration is a joke | ||
masak | thai doesn't even have a standardized transliteration... | ||
joke or not. | |||
mathw | gfldex: we figured that out :) | ||
11:24
jpike left
|
|||
mathw | we hired a Russian-speaker to help with the learning | 11:24 | |
noganex | masak: i remember driving in the wrong direction for ~40 miles because i misread a sign ;) | ||
mathw | his pronunciation is nothing like you'd think from the transliteration, so it's really not very helpful at all | ||
11:24
woosley1 joined
|
|||
noganex | and thai has a transliteration. | 11:25 | |
masak | oh? | ||
gfldex | around my hometown in eastern germany there are quite a few town with slavic names left | 11:27 | |
that helped a lot :) | |||
Tschopau, Tschochern and the like | |||
11:27
masak left
|
|||
arnsholt | Thai script is Brahmic, so it should be transcribable with something similar to IAST I'd think | 11:28 | |
11:29
drbean joined
|
|||
daxim | all hail ISO-9 | 11:30 | |
11:35
agentzh left
11:42
tzhs left
11:43
masak joined
|
|||
jnthn | mathw: Yes, learning the Cyrillic is probably a better way to go, if you have the time to do so. | 12:05 | |
sECuRE | hm, i’m currently trying to use my patch from #77992 on the current rakudo. i get a NULL PMC access in set_integer_native() in some of my code (the line numbers don’t seem to be precise). how can i debug this further? | 12:25 | |
masak | sECuRE: a very good question. | 12:31 | |
sECuRE: what I end up doing is trying to get the failing code down to its bare minimum. | |||
sECuRE | :-\ | 12:32 | |
flussence | .oO( I like how Vim just magically makes sense sometimes - transposing 2 characters is "xp" ) |
||
masak | flussence: right, and two lines is "ddp". | 12:33 | |
flussence | it's the way 2 independent actions spell out a mnemonic for the thing putting them together does :) | 12:34 | |
masak | oh, "x" can mean "trans-". cute. :) | 12:39 | |
daxim | xh, "o" can means "cis-". grave. :( | 12:44 | |
moritz_ | sECuRE: start rakudo with the --ll-backtrace option | ||
(needs very latest parrot) | |||
sECuRE | moritz_: alright, will try | ||
12:46
bluescreen joined
|
|||
moritz_ | it gives you a PIR level backtrace | 12:46 | |
which is more fine grade than the normal ones | 12:47 | ||
sECuRE | p.nnev.de/1700 < this is what i get | ||
moritz_ | do you have a quick link to the getaddrinfo code in IO::Socket::INET | 12:48 | |
sECuRE | rt.perl.org/rt3/Ticket/Attachment/7...do-A.patch | 12:49 | |
moritz_ | sECuRE: must be an assignment of the form $P0 = $I0 | 12:50 | |
sECuRE | hm, ok | 12:51 | |
moritz_ | where the RHS can be anything that returns an int | ||
sECuRE | ok | ||
and you’re sure it’s $P0, not maybe $P1? | 12:52 | ||
moritz_ | not at all | ||
can be any PMC container on the left | |||
sECuRE | to be clear: are $P0 etc. only for PMCs? | 12:53 | |
moritz_ | if you write $P0 = someInteger, theset_integer_native vtable is called | 12:54 | |
on the PMC that's previously in $P0 | |||
sECuRE | uhm, oh. i misunderstood the concept, then, i think | ||
moritz_ | s/theset/the set/ | ||
and set_string_native for strings etc. | |||
12:55
accel joined,
accel left
|
|||
takadonet | morning all | 12:55 | |
flussence | I'm not convinced a dual-stack-supporting thing should be called INET, especially after seeing this - www.reddit.com/r/perl/comments/f7f3...6_in_perl/ | ||
12:55
accel joined
|
|||
masak | takadonet: \o | 12:55 | |
sECuRE | flussence: yeah, but let’s focus on getting ipv6 support merged at all, right? ;) | ||
flussence | sECuRE: of course :) | 12:56 | |
moritz_ | #perl6 is always a funny mixture of "how can I achieve $x now?" and "Can't we do much better in future, somehow?" | 12:58 | |
daxim | duct-tape and bugs | 12:59 | |
sECuRE | moritz_: have a look at my method getaddrinfo() please. i need to call sock.'getaddrinfo'(…) with the arguments provided. how would i use find_lex correctly? | ||
moritz_ | sECuRE: Perl 6 level functions always need PMCs as arguments | 13:01 | |
13:01
tzhs joined
|
|||
moritz_ | s/functions/routines/ | 13:01 | |
sECuRE: it would be much easier to ony create sock in Q:PIR, return it from the PIR block, and then do the actual call in Perl 6 code | 13:02 | ||
my $sock = Q:PIR { %r = root_new ['parrot';'Socket'] } | |||
( plus newlines, I think) | |||
and then if pir::isnull($sock) { raise error } else { $sock.getaddrinfo($hostname, $port, ...) } | 13:03 | ||
or something along these lines | |||
hm, maybe the null check needs to be inside Q:PIR too | |||
but not the whole call | |||
13:04
y3llow left
13:05
y3llow joined
|
|||
sECuRE | moritz_: ok, i’ll try | 13:07 | |
13:12
plobsing left
|
|||
sECuRE | compiling core.pir takes ages :\ | 13:13 | |
masak | yes. :/ | 13:14 | |
it's likely to get better with jnthn++'s improvements. | |||
13:17
MayDaniel joined
13:20
felliott joined
|
|||
sECuRE | moritz_: i now reduced it to the following code: p.nnev.de/1703 | 13:22 | |
moritz_: new backtrace here: p.nnev.de/1704 | |||
13:23
bluescreen left,
bluescreen joined
13:26
stifyn joined,
stifynsemons joined
|
|||
sECuRE | moritz_: hm, now i changed it to p.nnev.de/1705 and get p.nnev.de/1706 | 13:30 | |
bluescreen | } | ||
13:33
y3llow left,
y3llow joined
|
|||
moritz_ | sECuRE: sorry, just had a bit local stress, will try to take a look | 13:39 | |
sECuRE | no worries | ||
just trying to compile a minimal %r = root_new …, like you suggested | |||
moritz_ | sECuRE: sholdn't you have %r = sock somewhere? | 13:40 | |
sECuRE | ok, it survives the call now and errors in the open() itself. probably a similar error there | ||
yeah, that was what i changed just now ;) | |||
13:45
accel left
|
|||
moritz_ | unless sock goto ERR # maybe should be "unless null sock goto ERR" | 13:45 | |
13:45
plobsing joined
13:48
plainhao joined
13:51
mtk left
|
|||
mathw | jnthn: concert's on the 16th of March... I may have managed to memorise the words by then, which would be far more helpful. | 13:51 | |
there aren't, in the grand scheme of things, very many of them | |||
jnthn | mathw: :) | 13:52 | |
mathw: Sounds like fun. :) | |||
jnthn can't sing at all | |||
:( | |||
mathw | it is fun :) | ||
stifyn | what are you singing? | 13:53 | |
mathw | the fourth movement is "Arise, ye Russian People!" and encourages all of Russia to rise up and hack the invading enemies into tiny pieces | ||
stifyn: Prokofiev, Alexander Nevsky | |||
jnthn | Awesome! | ||
mathw | The only thing I don't like about it is the orchestra's part, which I think is a bit detracting from the singing | 13:54 | |
jnthn: in all of Russia no foe shall live! We shall beat them to death! etc. | |||
jnthn | How many references to Vodka does it have? :) | ||
mathw | some of it sung very sweetly and angelic | ||
stifyn | sounds like not as many as to death :-) | ||
mathw | jnthn: none, according to our semi-literal translation | ||
at the end it mentions a festival | |||
but that's only after all the beating to death has been accomplished | 13:55 | ||
jnthn | Well, of course. | ||
Need to celebrate such things. :) | |||
mathw | well they win | ||
that's the story, anyway | |||
jnthn | \o/ | ||
mathw | and even let some of the prisoners go home alive | ||
jnthn | Wow, that's generous. :) | ||
mathw | mmm | 13:56 | |
especially after all the stuff about how no foe shall live | |||
sECuRE | hm, when i do both calls in perl, i do get an UnManagedStruct by getaddrinfo() (that’s correct), but when i pass it to connect(), the code path which checks for address->vtable->base_type == enum_class_UnManagedStruct does not get run | ||
jnthn | Do you put it into a scalar? | 13:58 | |
sECuRE | yes | ||
jnthn | If so, you're likely ending up passing the container containing the UnmanagedStruct. | ||
sECuRE | how would i directly pass it? | ||
jnthn | Look up descalarref | ||
As in, search for usage of it in the codebase | |||
13:58
mtk joined
|
|||
jnthn | May be some in IO.pm | 13:58 | |
sECuRE | yep | 13:59 | |
yes, indeed, that helps | 14:00 | ||
thanks | |||
yay, i can get heise.de using IPv6 \o/ | |||
(in rakudo) | |||
moritz_ | \o/ | 14:03 | |
submit the patch, I'll apply it :-) | |||
sECuRE | cool. let me clean up stuff first and add some error handling | 14:04 | |
btw: the necessary rakudo changes are also merged already :) | |||
moritz_ | you mean parrot changes? | ||
sECuRE | err, yes | ||
moritz_ | yes, I follow the parrot-dev mailing list | 14:05 | |
and #parrot too :-) | |||
sECuRE | alright | ||
hm, in the places where root_new is used i don’t see checks if it’s null or not. is there maybe a reason that root_new can never return null? | |||
moritz_ | just try it with a random name | 14:06 | |
I guess it'll thrown an error instead of returning new | |||
14:06
drbean left
|
|||
sECuRE | yes, indeed | 14:06 | |
14:07
timbunce left
14:08
kaare_ left
14:10
GinoMan_ joined
14:11
GinoMan left,
GinoMan_ left
14:21
skangas_ joined
14:22
skangas left,
skangas_ is now known as skangas
14:23
cognominal left,
nrr left,
am0c left,
cognominal joined
14:24
am0c joined
14:25
nrr joined,
barika left
14:26
barika joined
14:27
cognominal left
14:29
ggoebel left
14:31
cafesofie joined,
cognominal joined
14:34
ddima joined
|
|||
ddima | hi | 14:34 | |
14:35
ggoebel joined
|
|||
takadonet | ddima: hey | 14:37 | |
14:48
felliott left
14:51
kaare_ joined,
kst` joined
|
|||
sECuRE | moritz_: done now. you can find my patch at t.zekjur.net/0001-Adapt-IO-Socket-I...do-A.patch | 14:52 | |
14:52
dukeleto left
14:53
cjk101010 left,
kst left,
rbuels left,
dukeleto joined,
bluescreen left
14:54
dukeleto left,
dukeleto joined
14:55
bluescreen joined
14:57
stifyn left,
stifynsemons left,
bluescreen left
15:00
ggoebel left
15:02
Mowah joined
15:04
mtk left,
mtk joined,
ggoebel joined
15:07
kst` left
15:08
kst` joined,
timbunce joined
15:12
spq1 joined
15:15
timbunce left,
IllvilJa left
15:16
IllvilJa joined
15:19
wtw left
15:25
Psyche^ joined
15:26
Patterner left,
Psyche^ is now known as Patterner
15:28
plobsing left
15:30
stifyn joined,
stifynsemons joined
15:37
plobsing joined
15:47
justatheory joined
15:48
timbunce joined
16:01
MayDaniel left
16:08
icwiener joined
|
|||
pmichaud | good morning, #perl6 | 16:08 | |
masak | morning, pmichaud. | ||
16:09
icwiener left,
icwiener joined
|
|||
pmichaud | lots of joins/quits this morning.... do I feel a tremor in the intertubes? | 16:10 | |
masak | could be the IPcalypse starting early. | 16:11 | |
16:14
uniejo joined
|
|||
jnthn | o/ pmichaud | 16:14 | |
16:14
icwiener_ joined
|
|||
colomon | \o | 16:16 | |
16:17
icwiener left
16:28
kst` left,
icwiener joined
16:29
kst` joined
16:31
timbunce left
16:32
icwiener_ left,
stifyn left,
stifynsemons left
16:33
am0c left
|
|||
jnthn | decommute & | 16:34 | |
16:35
tzhs left,
uniejo left
16:37
JimmyZ joined,
timbunce joined
|
|||
TimToady | /e | 16:39 | |
16:43
icwiener_ joined,
icwiener_ left,
icwiener_ joined
16:46
icwiener left,
pmurias joined
|
|||
pmurias | what's the difference between contextual variables and Perl 5 local style ones? | 16:47 | |
pmichaud | "contextual variables" are now called "dynamic variables", iirc. | ||
pmurias | contextual variables are not shared between threads | ||
16:47
uniejo joined
|
|||
masak | dynamic variables can be, if they're read-only. | 16:48 | |
pmichaud | anyway, dynamic variables are located by looking at lexicals in the dynamic caller frames. I don't think there's any close equivalent in p5. | ||
TimToady | dynamic variables can be shared as long as there's a clear pecking order | 16:49 | |
even if rw | |||
but yes, sharing ro variables is pretty easy :) | |||
pmurias | are dynamic attributes supported? | 16:50 | |
TimToady | p5 locals are really just globals | ||
masak | 'local' variables in p5 are really just package gl... right. | ||
TimToady | we could have p5-style attributes if we ever implement temp | ||
pmurias | i'm reading about "Contextual Programming" and i'm trying to determin what the real difference between a dynamic variable and just setting and resetting a normal variable is | 16:51 | |
masak | there is at least a little code smell inherent in p6 dynamic variables, since these are not namespaced at all. it'd be nice to see a solution for namespacing dynamic variables. | ||
pmurias: url? | |||
TimToady | dynamic var is a lexical, not a global | ||
16:52
cafesofie left
|
|||
pmurias | common-lisp.net/project/closer/contextl.html | 16:53 | |
masak | thank you. | ||
16:53
wooden left
|
|||
pmurias | i have to make a presentation about that tommorrow | 16:54 | |
TimToady | masak: I don't think dynamic variables are useful enough to warrant the baggage of namespacing | ||
dynamic hashes and common prefixes are probably good enough | |||
masak | TimToady: maybe. | ||
TimToady: but I'd be wary every time I used both dynamicals and callbacks. | 16:55 | ||
TimToady | esp if we allow :: in a dynamic name :) | ||
masak | :D | ||
then I'm fine :) | |||
TimToady | we can think about that | ||
might also be useful to target the final default to a package other than GLOBAL | 16:56 | ||
which makes it slightly less smelly, I suspect | |||
std: my $*FOO::BAR = 2; | 16:57 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 121m» | ||
TimToady | heh | ||
flussence | takadonet++ # looks like Text::Tabs is going to be helpful after all | ||
masak | rakudo: my $*FOO::BAR = 42; say $*FOO::BAR | 16:58 | |
p6eval | rakudo 723986: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/2PoIAPndlk» | ||
16:58
envi left
|
|||
masak submits rakudobug | 16:58 | ||
TimToady | not clear that it parsed it correctly though | ||
s/it/std/ | |||
masak | should it error out on FOO:: not being predeclared? | 16:59 | |
16:59
icwiener joined
17:00
JimmyZ left
|
|||
TimToady | there's definitely something wonky in the STD parse of that | 17:00 | |
pmurias | where are dynamic variables specced? | ||
TimToady | nevertheless it can probably be made to work someday | 17:01 | |
17:01
uniejo left
|
|||
TimToady | package globals don't generally care about whether FOO:: exists yet for normal variables | 17:01 | |
masak | TimToady: well, Rakudo parsed it too, since it got to runtime. | ||
TimToady | std: $FOO::bar = 42; | 17:02 | |
p6eval | std 625303c: OUTPUT«ok 00:01 120m» | ||
masak | ok. | ||
pmurias | rakudo: my $*foo = 123;sub foo {my $*foo = 145;bar()};sub bar {say $*foo};foo() | ||
p6eval | rakudo 723986: OUTPUT«145» | ||
TimToady | but the tree from viv looks very strange to me | ||
17:02
icwiener_ left
|
|||
pmurias | rakudo: my $*foo = 123;sub foo {my $*foo = 145;bar()};sub bar {say $*foo};foo();say $*foo; | 17:02 | |
p6eval | rakudo 723986: OUTPUT«145123» | ||
pmurias | rakudo: {my $*foo = 123;sub foo {my $*foo = 145;bar()};}sub bar {say $*foo};foo();say $*foo; | ||
p6eval | rakudo 723986: OUTPUT«===SORRY!===Confused at line 22, near "{my $*foo "» | ||
pmurias | rakudo: {my $*foo = 123;sub foo {my $*foo = 145;bar()}};sub bar {say $*foo};foo();say $*foo; | 17:03 | |
p6eval | rakudo 723986: OUTPUT«Could not find sub &foo in main program body at line 22:/tmp/DKyZ45XZP1» | ||
TimToady | I see two ways to implement it | ||
pmurias | rakudo: sub bar {say $*foo};{my $*foo = 123;sub foo {my $*foo = 145;bar()};foo()} | ||
p6eval | rakudo 723986: OUTPUT«145» | ||
pmurias | is the last example correct? | ||
TimToady | one is by forcing $*FOO::BAR to parse "FOO::BAR" as a string | ||
masak | right. | 17:04 | |
TimToady | the other is to turn $*FOO:: into a shadow package | ||
masak | hm. | ||
TimToady | I think viv is parsing consistent with the latter interpretation | ||
17:04
icwiener_ joined
|
|||
TimToady | if we had shadowed hashes, it might just fall out of that | 17:04 | |
masak | what would be the advantage of the latter approach? | ||
shadowed hashes? | 17:05 | ||
TimToady | if it's not in this hash, fail over to that hash | ||
17:05
icwiener left
|
|||
TimToady | so you get a chain of %*FOO:: symbol tables out to the FOO one | 17:05 | |
masak | rakudo: module Foo {}; my $*Foo::bar = 42; say $*Foo::bar | 17:06 | |
p6eval | rakudo 723986: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/jTBUjIfID7» | ||
TimToady | one problem is that package symbol tables have a slightly different sigil policy, iirc | ||
17:07
plobsing left
|
|||
TimToady | pmurias: yes, it's correct | 17:07 | |
17:08
hudnix joined
17:09
hudnix left,
hudnix joined
|
|||
TimToady | I guess the basic problem is that my %*FOO doesn't know that it's supposed to shadow its ancestor, but maybe we can force it in the :: case | 17:09 | |
17:09
icwiener_ left
17:10
icwiener joined,
felliott joined
|
|||
TimToady | er, $*FOO does lookup in %*FOO:: I mean, and that's what doesn't necessarily know to shadow %CALLER::FOO | 17:10 | |
%CALLER::FOO:: rather | |||
CALLER<%*FOO::> is perhaps clearer | 17:11 | ||
masak | aye. | ||
dalek | kudo: 86f61b9 | (Michael Stapelberg)++ | src/core/IO/Socket/INET.pm: Adapt IO::Socket::INET to the IPv6-supporting rakudo API Signed-off-by: Moritz Lenz [email@hidden.address] |
17:12 | |
masak | moritz_++ | ||
flussence | yay | ||
moritz_ | sECuRE++ # he did all the work | 17:13 | |
masak | \o/ | ||
TimToady | anyway, probably no for 6.0.0.0.0... | ||
*t | |||
masak | agreed. | ||
pmurias | so a dynamic var is a lexical which also looks in the callers scopes if it can't find the var? | 17:14 | |
17:14
kensanata left
|
|||
TimToady | something like that | 17:14 | |
it's a lexical that is declared with a * twigil as part of its name, and mentioning the * twigil in an rvalue does the lookup for the funny name up the dynamic scope | 17:15 | ||
masak | rakudo: my $a = 1; say $a; my $a = 2; say $a | ||
p6eval | rakudo 723986: OUTPUT«===SORRY!===Redeclaration of symbol $a at line 22, near " = 2; say "» | ||
masak | rakudo: my $*a = 1; say $*a; my $*a = 2; say $*a | ||
p6eval | rakudo 723986: OUTPUT«===SORRY!===Redeclaration of symbol $*a at line 22, near " = 2; say "» | ||
pmurias | rakudo: my $*a =1;say $a | 17:16 | |
masak | std: my $*a = 1; say $*a; my $*a = 2; say $*a | ||
p6eval | rakudo 723986: OUTPUT«===SORRY!===Symbol '$a' not predeclared in <anonymous> (/tmp/4aRnH9xNAp:22)» | ||
std 625303c: OUTPUT«Potential difficulties: Useless redeclaration of variable $*a (see line 1) at /tmp/ApN9d13hU4 line 1:------> my $*a = 1; say $*a; my $*a⏏ = 2; say $*aok 00:01 121m» | |||
pmurias | rakudo: my $*a =1;say $*a | ||
p6eval | rakudo 723986: OUTPUT«1» | ||
masak | TimToady: should pmurias' 'say $a' find $*a? | ||
TimToady | no | ||
masak | phew. :) | 17:17 | |
TimToady | Sanity is overrated, but that doesn't mean it's worthless. :) | ||
pmurias | is $*foo derived from the lisp tradition of calling dynamic vars *foo* | ||
? | |||
PerlJam | TimToady: would looking for $*a find an $a in an outer scope? | 17:18 | |
TimToady | no | ||
only in the final global package would it find a $a | |||
PerlJam | excellent | ||
TimToady | it strips the * before the final lookup | ||
17:19
masak left,
impious joined
|
|||
TimToady | I guess that's what I was thinking of earlier, so $*FOO::bar shouldn't have a problem, if package FOO is in GLOBAL | 17:19 | |
17:19
cotto_work2 joined
|
|||
TimToady | (and if we do the failover on not finding it) | 17:20 | |
17:20
cotto_work left
|
|||
TimToady | deleting keys from a shadowed hash is a bit dicey though | 17:20 | |
might need a :deleteall | |||
if :delete defaults to the first hash that contains the key | |||
PerlJam | :obliterate | 17:21 | |
TimToady | shadow hashes are basically a user-view generalization of what lexical scopes already do | 17:22 | |
so maybe hashes can have two different default policies as add ons | |||
1) use this default value | 17:23 | ||
2) use this default hash | |||
PerlJam | except with lexical scopes, you can look up-scope only so many levels with appropriate syntax. How do you do that with shadow hashes? | ||
(I'm not even sure of the utility of this, just trying to stretch the analogy a bit) | 17:24 | ||
TimToady | %hash.defhash.defhash<foo> | 17:26 | |
17:26
masak joined
|
|||
PerlJam | ah. Equally dehuffmanized too :) | 17:27 | |
though with less shouting :) | |||
17:27
rbuels joined
|
|||
sECuRE | moritz_: thanks for merging! | 17:27 | |
moritz_ | sECuRE: thanks for creating the patch | 17:28 | |
17:29
kst` left,
rgrau joined,
kst` joined,
MayDaniel joined
|
|||
sECuRE | moritz_: you can now close #77992 :) | 17:30 | |
17:30
Tedd1 left
|
|||
moritz_ | sECuRE: I'm already on it | 17:31 | |
TimToady | hmm, %hash<foo>:delete would automatically delete from the hash it found 'foo' in | 17:32 | |
since it's a subscript modifier, not a method on %hash | |||
17:32
MayDaniel left
|
|||
diakopter | want: www.newegg.com/Product/Product.aspx...6820148349 | 17:32 | |
TimToady | %hash.alldefhashes»<foo>:delete would do the other thing | ||
or just make people write the loop | 17:33 | ||
pmichaud | have: www.newegg.com/Product/Product.aspx...6820167031 :-P | ||
PerlJam | did you really mean %hash.defhash»<foo>:delete ? | ||
TimToady | that only finds one def hash, and I want the whole pedigree | 17:34 | |
PerlJam | Hmm. | ||
masak is slightly unnerved and thinks that shadowed hashes should be opt-in | |||
TimToady | they would be | ||
at least explicit ones | |||
masak | consider me re-nerved, then. | 17:35 | |
TimToady | but dynamic hashes with :: might be an opt-in | ||
that's what I was saying earlier | |||
masak | *nod* | ||
I got that. | |||
TimToady | just trying to make you namespacehappy | ||
masak | yes, I probably shouldn't complain while you're solving my problems. :P | 17:36 | |
diakopter just got a core-i7-2600 with sata3, and the disk is loud compared to the rest of it. so I want a sata3 and 256GB. eh, maybe the 128GB is enough. | |||
TimToady | and I do think shadow hashes are the right way to go, not lying to ourselves about :: | ||
pmichaud | diakopter: I find I get by just fine on 80gb | ||
diakopter: I have a standard spinning-disk drive for storage | |||
although I'm thinking of replacing that with an ultra-quiet drive | |||
diakopter looks at the sata3 intels | |||
17:37
mberends joined
|
|||
diakopter | just crucial | 17:37 | |
pmichaud | so, I have my OS, home dir, and working file set on the 80gb ssd for speed. Then I keep lesser-used files and archive storage on the 320GB hdd | ||
PerlJam | TimToady: I tend to agree, but I'm not enamored of the names you've used today :) | ||
TimToady | method names? those are certainly negotiable | 17:38 | |
pmichaud | (and I'm thinking of getting a 1TB caviar green drive) | ||
afk for a bit | |||
17:38
Tedd1 joined
|
|||
PerlJam | TimToady: unfortunately, I have nothing to negotiate with at the moment. Just my general dislike. | 17:39 | |
TimToady | the spot where the names show up to the user will be in the declaration with "is", generally: my %foo is default(42) | 17:40 | |
that's probably the right name for the default value | |||
for the other, I dunno, "is shadowing(%OUTER::FOO)" is a bit long | 17:41 | ||
maybe it's huffmanly correct though | 17:42 | ||
PerlJam | that's what I think | ||
pmichaud | huffmanly correct +1 | ||
TimToady | might be there's a better metaphor than "shadow" though | ||
anyway, I should finish backlogging and then work on my talk slides for India | 17:43 | ||
I'm gonna try to import into OOo, btw, since the .odf is just a zip of xmls, and I can reverse engineer the markup I want | 17:44 | ||
and it'll act like a real presenter tool, hopefully | 17:45 | ||
pmichaud | so far I'm not giving many presentations this year, so my need for a presentation tool has lessened :=| | 17:48 | |
but I still want to write one :-) | |||
masak | in Perl 6? | ||
pmichaud | ideally, yes. | ||
I'll use whatever tool works best... but I think it'd be good to push Perl 6 development a teeny bit with it | 17:49 | ||
jnthn home :) | |||
o/ pmichaud | |||
#phasers in...70 mins? | |||
mberends | \o/ +1 | 17:51 | |
jnthn | 71 mins? ;) | ||
17:51
pmurias left
|
|||
mberends | :) | 17:51 | |
pmichaud | I may be late to #phasers | 17:53 | |
dalek | odel: b3bdc96 | (Martin Berends)++ | java/ (13 files): [java] augment FindMethod and Invoke with SpecialFindMethod and SpecialInvoke, still passing 45 NQP tests out of the 299 that dotnet/ does |
17:57 | |
18:01
plobsing joined
|
|||
jnthn | mberends: yay :) | 18:03 | |
18:04
felliott left
|
|||
mberends | jnthn: your recent 6guts post is very encouraging for 6model/java as well :) | 18:08 | |
18:11
felliott joined
|
|||
icwiener | Hi, is there a Perl6 user channel? | 18:14 | |
PerlJam | This is it. | ||
icwiener | Oh. :) | ||
PerlJam | (so far) | ||
masak | we decided to do everything in one channel. | ||
TimToady | s/user/abuser/ | ||
masak | :P | ||
we might decide otherwise as Perl 6 grows, but right now having everything in one place has its advantages. | |||
icwiener | Sounds reasonable. :) | 18:15 | |
TimToady | well, we already have two places, if you count #phasers | ||
masak | also, if you're a Yapsi developer, you're both a Perl 6 user and a Perl 6 dev. :P | 18:16 | |
icwiener | Just a small question. I saw pastebin.com/11K6KW4k on learningperl6.com and am a bit confused. Isn't the line written to the file unchanged and then scrambled afterwards? | 18:17 | |
18:18
dakkar left
|
|||
masak | first off, that's old Perl 6. | 18:18 | |
'for =$input -> $line' is now 'for $input.lines -> $line'. | 18:19 | ||
icwiener | Meh ... :) Times fly by these days. | ||
masak | second, the $line parameter as declared is read-only, so you can't just go s/// on it and expect it to work. | ||
either that code was never tested against an implementation, or it ran against Pugs at some point. | 18:20 | ||
if you do want to modify $line, you should do '-> $line is copy'. | |||
but you'd still need to write it back to the/a file, if that's what you want. | 18:21 | ||
icwiener: does that answer your question? | |||
tadzik | =$input looks like POD :) | ||
masak | long live the death of prefix:<=>! | 18:22 | |
flussence | reminds me of <?=$var?> from somewhere... :) | ||
icwiener | masak: Fully. :) Thanks for the advice. I will try (rakudo just finished compiling) to use it. | ||
masak | icwiener: let us know how it goes. we're eager to fix issues and help with stuff. | ||
icwiener | masak: Are there more up-to-date introductions to the language features? Maybe github.com/perl6/book | 18:23 | |
masak: Sure. :) | |||
PerlJam wonders if merlyn or bdf still have any interest in that book. | 18:25 | ||
the proposal was written a little over 4 years ago | |||
masak | icwiener: yes, that one is up-to-date. if you're willing to take some serious technical lingo, the synopses at perlcabal.org/syn/ are very good as well. | ||
18:26
woosley1 left
|
|||
icwiener | Thanks. :) | 18:26 | |
18:33
jarfhy joined
|
|||
dalek | odel: a6a9a49 | (Martin Berends)++ | java/ (2 files): [java] add definedness and defaultValue arguments to Parameter constructor |
18:33 | |
18:34
cafesofie joined,
Mowah left
|
|||
moritz_ foegot to bump PARROT_REVISION after the v6 patch | 18:38 | ||
18:40
cjk101010 joined
|
|||
moritz_ | could somebody please bump it to RELEASE_3_0_0-235-g102e7e2? | 18:43 | |
18:44
kst` is now known as kst
18:47
impious left
18:49
timbunce left
18:51
rgrau left
18:52
rgrau joined
18:53
icwiener_ joined
18:55
icwiener left
18:56
timbunce joined
|
|||
tadzik | I can :) | 18:56 | |
moritz_ | tadzik: I was faster | 18:57 | |
tadzik | yeah, just pulled :) | ||
moritz_ | tadzik: handed the small off to her mother, and now I have my hands free again :-) | ||
18:57
vmspb joined
|
|||
moritz_ | masak: did you read my blog post with comments on the p6cc solutions and reviews? | 18:58 | |
dalek | kudo: 188755a | moritz++ | build/PARROT_REVISION: bump parrot version to something that can deal with IPv6 |
||
dukeleto hopes to see ipv6 support in the next rakudo dev release | 18:59 | ||
tadzik | :) | ||
moritz_ | dukeleto: it's already in | 19:00 | |
dukeleto: the bump should have been included in the previous commit, I just forgot it | |||
masak | moritz_: no, I'm srsly backlogged on the blogosphere. url? | 19:01 | |
moritz_ | planetsix :-)... I'll get the URL for you | 19:02 | |
masak: perlgeek.de/blog-en/perl-6/thoughts-on-p6cc.html | |||
masak reads voraciously | 19:03 | ||
moritz_: already on the first bullet point, it strikes me that I might want to incorporate some of these things (with attribution) into my review notes. would that be OK? | 19:04 | ||
moritz_ | masak: sure | ||
masak | \o/ | 19:05 | |
"Just strange that he then reinvented subtraction" -- I didn't even think of that! | |||
well, it only goes to show that *conceptually*, colomon didn't think of the Complex numbers as number data types, but just as a container data structure. | 19:06 | ||
could as well have used Pair. | |||
colomon | masak: actually (as I just commented on in moritz_'s blog post) it's more an artifact of how the code was written. | ||
masak | oh, Complex was a late addition? | 19:07 | |
moritz_ | retrospect knows always best | ||
colomon | Switching the points to a Complex type was something like the third different representation I used for them in that script. | ||
masak | moritz_: "hindsight is 20-20" | ||
19:13
icwiener joined
|
|||
colomon | masak: by the way, the quick summary of my version of p2 is that almost the entire thing is attempting to get the result of fox's ($x < ($b[0]-$a[0]) * ($y-$a[1]) / ($b[1]-$a[1]) + $a[0]) carefully. But I admit it's hard for me to explicitly justify my instinct that that expression is just begging for floating point issues. | 19:16 | |
19:16
icwiener_ left
19:20
stkowski joined
|
|||
masak | colomon: I readily confess to not being an expert in computational geometry, so I don't have much preference for either long or short solutions. but I'd be interested in a case where the two algorithms differed in some significant way. | 19:23 | |
colomon | that's the thing. barring the boundary cases, I think they only differ in extreme cases. | 19:24 | |
If you don't care about the boundary and can live with occasional weird results given weird data, fox's solution is brilliant. | 19:25 | ||
and crazily enough ( as you realized) you could make it better by golfing it a bit more! | |||
icwiener | Yay. :) I struggled a bit with the output to a file but after "say $out: $line" and "$out.say $line" I found "$out.say($line)" :) Are parens mandatory there because say is used as a method? | 19:29 | |
colomon | icwiener: you can also say $out.say: $line | 19:30 | |
19:31
tylercurtis joined,
icwiener_ joined
|
|||
icwiener_ | colomon: I think $out.say($line) comes more naturally to me for now. :) | 19:32 | |
icwiener_ hates his roommate who reconnects all the time for being able to download more files from some mega download website. :/ | 19:33 | ||
Anyway, next stop: regexp :) | |||
19:34
icwiener_ left,
daxim left,
icwiener left
19:35
jlaire left
19:37
jarfhy left,
jevin joined
19:38
cafesofie left
19:54
V15170R joined
19:56
hans_ joined,
klunky joined
20:11
MayDaniel joined,
timbunce left
20:16
cdarroch joined,
cdarroch left,
cdarroch joined,
MayDaniel left
20:18
timbunce joined
20:24
coldhead joined
20:25
shi joined
20:29
timbunce left
20:31
cjk101010 left
20:35
timbunce joined
20:44
plainhao left,
_jaldhar left
21:01
timbunce left
21:03
kst left,
kst joined
21:04
fhelmberger left
21:08
timbunce joined,
hans_ left
|
|||
masak | quiet evening. | 21:10 | |
21:11
Kodi joined
|
|||
[Coke] | LALALALALALAICANTHEARYOU | 21:11 | |
tadzik | sleepy evening | ||
Kodi | Locally, I've got ^^ and xor all fixed and spiffed up except for one snag: *-currying. The problem is that in order to turn Parrot Undefs into Perl 6 Falses, I wrap a subroutine call around the PAST node for the infix op, which hides the structure that Action.pm's &whatever_curry expects. But if I were to implement ^^ and xor myself as a subroutine call instead of using the "xor" pasttype, that would destroy short-circuiting. So, | 21:15 | |
anybody know of a good equivalent to the "call" pasttype that doesn't automatically evaluate every child node? | |||
masak | huh. wish I did. | 21:17 | |
21:18
pothos left
21:19
y3llow left
21:20
y3llow joined
21:21
pothos joined
|
|||
Kodi | I guess I could wrap every child node up in a block before passing them to my custom xor, but that sounds pretty kludgey. | 21:21 | |
masak | hey, if it passes the tests... :) | 21:23 | |
21:23
molaf__ left
|
|||
tylercurtis | How are && and || implemented? | 21:23 | |
Kodi | tylercurtis: With special, magical pasttypes. | ||
tylercurtis: The one for xor is deficient only in that it returns a Parrot Undef when it has more than one true argument. | |||
moritz_ | Kodi: a PAST::Block isn't automatically called, afaict | 21:24 | |
so you'd have to promote all statements to blocks or "thunks" | |||
masak | Kodi: sounds like it's the xor pasttype that ought to be fixed, then. | ||
moritz_ | and then call them from infix:<^^> | ||
moritz_ -> sleep | |||
Kodi | moritz_: Right, that's the idea, I think. | ||
PerlJam | Kodi: if nothing else, you'll make a pattern for short circuiting that other people can use :) | 21:25 | |
Kodi | masak: Y'know, I'm thinking you're right. The xor pasttype should probably take an additional special argument meaning "language-specific false value to be returned when we get multiple true arguments". | 21:26 | |
21:26
plobsing left
|
|||
masak | Kodi: why is this a problem only for xor? | 21:26 | |
Kodi: as you yourself said, || also returns one of the operands when given an alternative. | 21:27 | ||
Kodi | masak: Whenever one of the other short-circuiting operators returns a value, that value was one of its arguments. | ||
masak | hm. right. | ||
Kodi | xor is special in that when it returns false, the false value comes from nowhere. | ||
masak | Kodi: if the additional special value is optional, I don't see the harm. | 21:28 | |
Kodi | Unfortunately, I'm not a Parrot developer. | ||
PerlJam | Kodi: surely you can wrap xor in a sub that does: if xor == Undef, return False | ||
or soemthing like that | |||
Kodi | PerlJam: That's exactly what I did, and which led to the Whatever-currying problem. | 21:29 | |
PerlJam | oh. | ||
21:30
felliott left
21:32
rindolf joined
|
|||
rindolf | Hi all. | 21:32 | |
masak | rindolf, hi. | 21:33 | |
rindolf | masak: what's up? | ||
masak | rindolf: I have a belly full of noms and roof over my head. not complaining :) | 21:34 | |
what about you? | |||
rindolf | masak: well, I was finally able to boot my laptop with kernel 2.6.37 . | ||
masak: and I've been working on Lingua::IT::Ita2heb. | |||
Which transliterates Italian to Hebrew. | |||
A friend of mine created a project for it on github and I joined him. | 21:35 | ||
It's not on CPAN yet. | |||
I moosified it. | |||
And defined my first two roles in the process. | |||
roles seem nice. | |||
masak | they are. | 21:36 | |
PerlJam | rindolf: you have to be careful about composition in Moose land sometimes, but generally they are very nice | ||
masak | PerlJam: isn't there some way to make Moose touchy about composition? | 21:37 | |
21:37
felliott joined
|
|||
masak | felliott++! \o/ | 21:37 | |
felliott | masak++!! | 21:38 | |
masak | "Warning. Karma addition cycle detected." | ||
rindolf | masak: why does felliott deserve a ++? | ||
masak | rindolf: he was the only one doing things in RT and in the test suite a couple of days back. | 21:39 | |
rindolf | masak: ah, OK. | ||
felliott++ | |||
masak | it was nice to see the activity roll by, and I feel he deserves karma for it. | ||
pro tip: cause activity in RT and/or spectest suite, and I will give you lots of karma. :) | 21:40 | ||
probably others as well. | |||
21:43
Chemtox joined
21:49
Mowah joined
|
|||
tylercurtis | PerlJam: ooc, what is it about composition in Moose that one must be careful about? | 21:50 | |
21:51
Chemtox left
21:59
Kodi left
22:07
tylercurtis left
|
|||
dalek | p-rx/nom: 227012d | jonathan++ | / (3 files): Start clearing up the grammar migration. Remove the now-disused original protoregex bit. |
22:14 | |
p-rx/nom: 96bf49d | jonathan++ | / (4 files): Remove pre-port cursor code. |
|||
p-rx/nom: ca48590 | jonathan++ | src/Regex/Cursor.pm: Toss initial experimental port of Cursor to NQP. See 6model repo for diakopter++'s work on this, which is blazing the Cursor-in-NQP trail. |
|||
p-rx/nom: 7ef57d5 | jonathan++ | src/Regex/Cursor2.pir: Install the migrated Cursor, so far just installed as Regex::Cursor2, also as Regex::Cursor. |
|||
22:15
MayDaniel joined
22:18
c1sung_ left
22:19
vmspb left
22:20
bacek left
22:24
c1sung joined
22:27
shi left
|
|||
dalek | p-rx/nom: 5cb2f1f | jonathan++ | src/Regex/Cursor2 (2 files): Eliminate Regex::Cursor2 namespace; now just the Cursor2 type object alias installation remains, plus some vestigal naming references. |
22:32 | |
p-rx/nom: 4f57429 | jonathan++ | src/ (3 files): Track down remaining uses of Cursor2 type object and eliminate them. |
|||
p-rx/nom: aa8293f | jonathan++ | src/Regex/Cursor2 (2 files): Eliminate use of Cursor2 in sub IDs. |
|||
22:34
c1sung left,
bacek joined,
c1sung joined,
george8 joined
22:35
george8 left
22:36
estrabd left
22:38
estrabd joined
22:39
noganex_ joined
22:40
shi joined,
snearch joined
22:42
noganex left
22:43
c1sung left
22:44
kaare_ left,
snearch left
22:45
MayDaniel left
|
|||
dalek | p-rx/nom: beeb40a | jonathan++ | src/stage0/ (4 files): Update bootstrap to eliminate usage of Regex::Cursor2 type object alias, so it can finally be removed. |
22:45 | |
p-rx/nom: 40c4ce9 | jonathan++ | src/Regex/Cursor2.pir: Remove installation of Regex::Cursor2. |
|||
p-rx/nom: 5239c81 | jonathan++ | / (6 files): Rename files that had Cursor2 in the name. |
|||
masak | jnthn++ | 22:46 | |
jnthn | Bootstraps. They're like walking on dominos carefully arranged in a circle. | ||
masak | you could say that again. | ||
jnthn | Bootstraps. They're like walking on dominos carefully arranged in a circle. | 22:47 | |
masak | ...and you did. :) | ||
jnthn | Hey, you said I could. :P | ||
dalek | p-rx/nom: 619c67d | jonathan++ | src/stage0/ (4 files): Final bootstrap update to completely eliminate Cursor2's legacy from the source tree. |
22:50 | |
22:50
bacek left,
timbunce left
22:51
felliott left
|
|||
jnthn | Now I can do something interesting... :) | 22:53 | |
22:54
felliott joined
|
|||
masak | std: my Int ($a, $b) | 22:54 | |
p6eval | std 625303c: OUTPUT«ok 00:01 120m» | ||
masak | rakudo: my Int ($a, $b); $b = 3.4; say $b | 22:55 | |
p6eval | rakudo 188755: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 22:/tmp/b5eEvRPLWW» | ||
masak | rakudo: class A { has Int ($.a, $.b) }; say A.new(:b(3.4)).b | ||
p6eval | rakudo 188755: OUTPUT«3.4» | 22:56 | |
jnthn | Somebody should fix objects. :P | ||
masak | jnthn: is it just that attr typechecking is off? | ||
jnthn | masak: ja | ||
masak | I'm pretty sure there's a ticket for that somewhere. | ||
jnthn | Me too. | ||
23:03
kst left
23:04
kst joined
23:15
c1sung joined
23:19
bacek joined
23:21
c1sung left
23:25
dukeleto left,
dukeleto joined
23:27
c1sung joined,
cotto_work2 is now known as cotto_work
|
|||
masak | rakudo: my %h = 1..5 Z <a> xx *; say %h.perl | 23:28 | |
p6eval | rakudo 188755: OUTPUT«{"1" => "a", "2" => "a", "3" => "a", "4" => "a", "5" => "a"}» | ||
masak | rakudo: my %h = 1..5 Z <a> xx *; %h.delete(<2 3 4>); say %h.perl | ||
p6eval | rakudo 188755: OUTPUT«{"1" => "a", "5" => "a"}» | ||
masak | \o/ | ||
23:32
Mowah left
23:34
c1sung left
|
|||
dalek | p-rx/nom: a9206dd | jonathan++ | / (4 files): Add NQPNativeHOW meta-object for native types and native package declarator to go with it. |
23:37 | |
p-rx/nom: 510f09f | jonathan++ | src/ (3 files): Make it possible to give an attribute a type constraint. Currently only the P6opaque REPR pays attention to this. |
|||
p-rx/nom: 21c8f5b | jonathan++ | src/NQP/Actions.pm: Cleanup some leftovers from the 6model migration. |
|||
p-rx/nom: 4683d55 | jonathan++ | src/stage0/ (3 files): Push native into the bootstrap. |
|||
masak | rakudo: sub foo(@a = [1, 2, 3], *@b) {}; foo() | 23:39 | |
p6eval | rakudo 188755: ( no output ) | ||
masak | rakudo: sub foo(@a = [1, 2, 3], *@b) {}; foo(42) | ||
p6eval | rakudo 188755: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead in 'foo' at line 1:/tmp/eJDCjCKYyX in main program body at line 22:/tmp/eJDCjCKYyX» | ||
masak | right. | ||
23:44
shi left
23:46
c1sung joined
|
|||
masak | rakudo: sub foo(@a is copy where { .elems == 0 | 4 }) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive" | 23:46 | |
p6eval | rakudo 188755: OUTPUT«alive» | ||
masak submits rakudobug | |||
jnthn | masak: er. | ||
You're expecting the constraint to get attached to the container? | 23:47 | ||
masak | rakudo: sub foo(@a is copy where { True }) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive" | ||
p6eval | rakudo 188755: OUTPUT«alive» | ||
masak | jnthn: I'm expecting &foo to output something. | ||
jnthn | masak: ...oh. | 23:48 | |
er, yeah, me too. :/ | |||
23:48
Franek joined
|
|||
masak | rakudo: sub foo(@a is copy) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive" | 23:48 | |
p6eval | rakudo 188755: OUTPUT«alive» | ||
masak | huh. no where clause needed. | ||
jnthn | is it the is copy? | ||
masak | otherwise we can't assign. | ||
this feels familiar... | 23:49 | ||
masak czechs | |||
I might have been remembering rt.perl.org/rt3/Ticket/Display.html?id=74430 | |||
jnthn | oh | 23:50 | |
looks related. | |||
masak | yeah. | ||
this goes in too, though. | 23:51 | ||
jnthn | Please add a ref to the other ticket. | ||
masak | sure thing :) | ||
jnthn | rakudo: sub foo(@a) { say PARROT(@a) }; sub bar(@a is copy) { say PARROT(@a) }; foo([1,2]); bar([1,2]) | 23:52 | |
p6eval | rakudo 188755: OUTPUT«ObjectRef->ObjectRef->ArrayArray» | ||
jnthn | FAIL | ||
masak | rakudo: my @a; @a ||= -1, -1, +1, +1; say @a.perl | ||
p6eval | rakudo 188755: OUTPUT«[-1]» | ||
masak | not what I expected, but better than the other one :) | 23:53 | |
is ||= always item assignment? | |||
dalek | p-rx/nom: d5dc5d8 | jonathan++ | / (2 files): Add int, num, str. |
||
p-rx/nom: 1e3ab6a | jonathan++ | src/metamodel/how/NQPNativeHOW.pm: Add int.^name et al. |
|||
jnthn | Not sure off hand. | ||
std: my @a; @a = my $a, my $b; | 23:54 | ||
p6eval | std 625303c: OUTPUT«ok 00:01 122m» | ||
jnthn | std: my @a; @a ||= my $a, my $b; | ||
p6eval | std 625303c: OUTPUT«ok 00:01 122m» | ||
jnthn | oh, hmm | ||
jnthn wanted to make std spit out an unused warning or something :) | |||
masak | not sure STD does sink checks. | ||
jnthn | Yeah...it does *something* but not that. :) | ||
23:56
c1sung left
|
|||
jnthn | masak: See if STD.pm6 around 3326 makes any sense to you :) | 23:56 | |
masak looks | 23:57 | ||
jnthn | There's some condition in there that determines whether it's list or item assignment. | ||
masak | makes a lot of sense. | 23:58 | |
jnthn | Rakudo gets it RONG | ||
token infix_postfix_meta_operator:sym<=> { '=' <O('%item_assignment')> } | 23:59 | ||
Unconditionally item ass. | |||
Not sure how hard it is to port the STD thingy. | |||
23:59
kst left
|
|||
jnthn | Probably not too bad. | 23:59 | |
masak | right. ||= should be item ass., though. |