|
pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by TimToady on 25 January 2008. |
|||
|
00:00
Psyche^ joined,
Psyche^ is now known as Patterner
00:17
felipe joined
00:22
cls_bsd left
00:30
cls_bsd joined
00:32
r0bby joined
00:38
cmarcelo left
00:43
japhb left
01:11
armagad left
|
|||
| pmichaud | TimToady: in regexes, is a colon followed by a word character always considered a modifier? | 01:14 | |
| i.e., / \d+:abc / parses as / [\d+] :abc / and not / [\d+:] abc / | 01:15 | ||
| (I think I asked this once before and got that answer, but want to reconfirm before committing to code.) | |||
|
01:16
BinGOs_ joined
01:20
BinGOs_ left,
felipe left,
ting left,
diakopter left,
BinGOs left,
pravus left,
Gothmog_ left,
yath left
01:21
BinGOs_ joined,
felipe joined,
BinGOs joined,
pravus joined,
ting joined,
diakopter joined,
Gothmog_ joined,
yath joined,
[particle1 joined
|
|||
| pmichaud | oops, that's a bad example, since +: is a token | 01:23 | |
| so... | |||
| <xyz>:i / parses as / [<xyz>] :i / and not / [<xyz>:] i / ? | |||
|
01:28
japhb joined
01:31
Ched- left
01:36
fredlaforge joined
01:37
BinGOs left
02:57
cotto left,
cotto joined
03:17
Psyche^ joined
03:24
wknight8111 left
03:26
justatheory left
03:33
Patterner left,
Psyche^ is now known as Patterner
03:35
justatheory joined
03:59
eternaleye left
04:32
armagad joined
04:41
alanhaggai left
04:45
nipotan is now known as nipotaway
04:46
Psyche^ joined
04:50
Eevee_ joined
04:52
Eevee left
04:57
Patterner left,
Psyche^ is now known as Patterner
04:58
alester_ joined
05:01
eternaleye joined
05:02
fredlaforge left
05:04
`nipra joined
|
|||
| syle | this perl6 stuff gonna be good? or is c/c++ still gonna beat the shit out of it for eventloop performance and such? | 05:05 | |
|
05:29
alanhaggai joined
05:30
[particle1 left
05:34
alanhaggai_ joined
|
|||
| spinclad | definitely good. i also note that your two questions are unrelated. | 05:37 | |
|
05:37
meppl joined
|
|||
| TimToady | pmichaud: that's correct | 05:43 | |
|
05:51
alanhaggai left
06:23
masak joined
06:32
carl_masak joined,
carl_masak left
06:34
masak left,
masak joined
06:44
zamolxes_ joined,
zamolxes left
06:51
alester_ left
06:53
BinGOs_ is now known as BinGOs
|
|||
| syle | give control over freeing memory, i can't stress this enough | 06:54 | |
| i cannot build a big app without that control | 06:55 | ||
| masak | syle: well, the general trend goes towards abstracting away memory management in programming languages | ||
| syle | i understand this , but that is for simple applications under 5 thousand lines of code | 06:56 | |
| masak | I understand that your argument is that need of control is related to code size | 06:57 | |
| not sure I agree | |||
| just as optimization has been successively delegated to compilers, memory management has been successively delegated to GCs | |||
| syle | i understand free it self is expensive, but if i set my own counters to free memory after so much memory allocation, is it so much to ask? | 06:58 | |
|
06:58
elmex joined
|
|||
| masak | however, since you have very fine control over your VM (Parrot), you should most likely be able to reach into it and do such things | 06:58 | |
| ...I think | |||
| syle | thats a cop out, write the free routine and make everyone happy | 06:59 | |
| masak | but we're not quite there yet where anyone can guarantee that | ||
| syle: can you explain how your request would not affect everyone else | 07:00 | ||
| more specifically, people who do not want to care about memory management | |||
| syle | people do CARE about memory management in big applications, are you saying perl6 should be some little scripting language incompentent of being used in big applications? | 07:01 | |
| masak | no | ||
| I'm saying that many successful programming languages where people do in fact write big applications do not allow manual freeing | 07:02 | ||
| moritz_ | syle: they only care because existing garbage collecters aren't good enough (like perl5s ref counting) | ||
| syle | on moritz statement yes thats a big factor because of alot of c modules being loaded could keep references and become problematic if the reference has been weakened or not | 07:03 | |
| regardless perl loads alot of c modules etc, and if some asshole c author keeps a reference, we need better control to free that memory | 07:04 | ||
| masak | syle: what happens to the reference? | 07:05 | |
| moritz_ | that's the wrong approach. If there is a reference left, it could segfault | ||
| the right approach is to make C extensions much easier and safer | 07:06 | ||
| masak | aye | ||
| syle | well for example, eventlib allows you to remove events, but not destroy them | ||
| moritz_ | so that it's very unlikely that something like this happens | ||
| Perl 6 won't fix buggy C software for you | |||
| it simply can't do that | |||
| masak | syle: it's like this: if the Perl 6 design team said "ok, we'll add it" in reply to every request for features, Perl 6 would be a mess. | 07:07 | |
| I'm saying your feature request would mess up Perl 6 a little | |||
| moritz_ | I'd say that if it turns out to be needed, somebody will write a module that does it | 07:08 | |
| syle | omg, look, you malloc so much memory for a hash, allow someone to call free on that exact structure, that is not alot to ask | ||
| masak | at least until you show me how you can introduce it without also introducing segfaults, and worries for people who don't want to care | ||
|
07:08
iblechbot joined
|
|||
| masak | syle: sounds to me you just want Perl 6 to be C, period. | 07:08 | |
| get over it | |||
| syle | in a sense yes | ||
| i want it to be better | |||
| after using hashes , honestly who wants to be stuck using just arrays and scalars | 07:09 | ||
| masak | de gustibus not est disputandum -- you think it would be better, 99% of Perl programmers would hate it | ||
| syle | well i;d have to ask you what do 99% of perl programmers in your opinion use it for? | 07:10 | |
| masak | Perl? | ||
| most things, I guess | |||
| including large stuff | |||
| syle | cgi, tcp , server apps, client apps, what? | ||
| masak | sure | ||
| moritz_ | many many CGI and reporting applications | 07:11 | |
| GUI stuff | |||
| everything. | |||
| I even read about prototyping scanner drivers with perl the other day ;) | |||
| syle | i want perl6 to compete with being able to write a tcp server that can compete with c | ||
| masak | I disagree with the idea that lack of `free()` would prevent one from writing large-scale applications | ||
| syle | otherwise its useless | ||
| masak | as moritz_ says, at least wait until you've tried a good GC along with Perl | 07:12 | |
| you'd be surprised | |||
| syle | good GC i heard new one is up on google summer of code | ||
| moritz_ | syle: most people are quite happy with writing applications in perl that are twice as slow as the C equivalent, but take 1/10 of the time to develop | 07:13 | |
| masak | yes | ||
| syle | so thats a big maybe right | ||
| masak | syle: it always is with planned code | ||
| Java/JVM has developed quite a bit over the years with regards to its GC | |||
| syle | moritz: i agree completely, but fuk if it was somewhat close to c at 1/10th of the code, you;d dominate the market wouldn;t you | ||
| masak | syle: that's not a sensible argument | 07:14 | |
| moritz_ | syle: at least the part of the world that doesn't hate sigils ;-) | ||
| masak | no-one argues that Perl should be unlike C just for the sake of it | ||
| it's just unlike C where it's more like Perl :) | 07:15 | ||
| moritz_ | and nobody argues that it should be fast | ||
| syle | well with processors getting faster, and becomming dual core etc, as long as you can compile it i guess in longrun it will survive is the consensus then right | ||
| moritz_ | but most people think that speed shouldn't be top priority these days | ||
| masak | however, parallel constructs might be a big win | ||
| gotta use those cores | 07:16 | ||
| syle | well with async applications , non blocking sockets for example, we are creating more demand on the cpu that memory than ever before | ||
| s/that/than | 07:17 | ||
| masak | syle: exactly. so forget about your `free()` request :) | ||
|
07:18
justatheory left
|
|||
| syle | however if processors reach a point which i suspect that it becomes overly fast and memory stays as expensive as it is, then can run less perl on one box | 07:18 | |
| i realize with new 8 core cpus, that cpu will become less of an issue, but i have not seen memory drop in price | 07:19 | ||
| but regardless there is still issue of i could run the same app with 10 times more threads in c than with perl | 07:20 | ||
| i am a strong beleiver perl6 with compete with c, and we in the 20th century can stop using languages with shitty structures | 07:21 | ||
| moritz_ | you're speaking about your bad experiences with Perl 5 | ||
| Perl 6 has taken great care not to fall into the same trap | |||
| like much less global variables (so that threads stay light weight) | |||
| syle | perl 5.10 remove the byte code, that pissed me off | 07:22 | |
| moritz_ | byte code? | ||
| what do you mean? | |||
| masak | syle: it's sort of a central assumption in Perl that references cannot dangle. that's why they're _references_, not pointers. if you don't solve that, Perl programmers will simply not be interested. | ||
| moritz_ | it still uses byte code | ||
| syle | perl -MO=Bytecode,-H,-oa.out blah.pm | 07:23 | |
| moritz_ | well, nobody was able and willing to maintain that | ||
| and fix it | |||
| if you want it badly, you can get it in shape | |||
| and if you maintain it, I'm sure people will use it | 07:24 | ||
| syle | ohhh christ, don;t put that on me, i;m already writing an app in perl5 thats over 7 thousand lines and not done yet | ||
| moritz_ | but you can't expect volunteers to do exactly what you want | ||
| ah, then don't complain | |||
| masak | syle: think of it! if you get control of the bytecode, you can add your own `free()`! :) | 07:25 | |
| syle | lol well with parrot i think i can probably export my own free routines anyways | ||
| i would just like to see it apart of core | |||
| moritz_ | core is totally overrated | 07:26 | |
| in Perl 6 core will be just the things that you need to install new modules | |||
| masak | yeah, core is so 1990 | ||
| Perl 6 is more of a micro-core | |||
| syle | ok so standard has changed, usually you have core tree and devel tree | 07:27 | |
| masak | not sure if that's the same nomenclature | 07:28 | |
| moritz_ | devel/maint and core/non-core are orthogonal concepts | 07:29 | |
|
07:32
Lorn left
|
|||
| syle | Typical anti-egalitarian view | 07:32 | |
| masak | huh? | 07:33 | |
| in what sense? | |||
|
07:38
Lorn joined
|
|||
| eternaleye | syle: devel/maint is stability/testedness index, core/non-core is essentiality index | 07:40 | |
| AFAIU, it's only in core if it's needed to install things that aren't in core | |||
| masak | however, someone who has different opinions on what should be core is wont to call the division 'anti-egalitarian' | 07:41 | |
|
07:42
masak left
|
|||
| syle | why wouldn't they? | 07:44 | |
| devel/maint is a means to an end regardless | 07:47 | ||
|
07:53
yewenbin joined
|
|||
| syle | and while everyone struggles to remember their comp sci debate classes, i;m just stating a free routine would be nice in case new author of GC routine doesn't work out well | 07:53 | |
|
07:54
Schwern joined
07:55
Lorn_ joined
|
|||
| eternaleye | syle: GC engines are modular and pluggable, feel free to implement one which hooks into the code being executed with free() routines invoking collection | 08:01 | |
|
08:03
masak joined
08:08
Lorn left
08:25
Lorn joined
08:35
meppl left
08:36
Ched- joined
08:38
Lorn_ left
08:51
pmurias joined
08:54
cls_bsd left
|
|||
| pmurias | syle: what exactly do you want to be avalible, do you want to force the gc to do garbadge collection or do you want to create dangling pointers and enjoy segfaults | 08:56 | |
| ? | 08:57 | ||
| the perl5 style reference counting dosn't have to eat much more memory than c style manual memory allocation, you just can't avoid having a reference counter on most objects | 08:59 | ||
| so doing manual memory allocation would help on the small scale only | 09:04 | ||
| masak | just the opposite of what syle wanted it for | 09:09 | |
|
09:16
cls_bsd joined
09:20
alanhaggai joined
09:35
agentz1 left
09:36
alanhaggai_ left,
agentzh joined
09:42
buu left,
buu joined
10:00
penk joined
10:17
pmurias left
10:20
yewenbin left
10:53
pbuetow joined
11:24
cls_bsd left
11:25
chacha_chaudhry joined
11:26
chacha_chaudhry left
12:03
araujo left
12:06
cls_bsd joined
12:12
riffraff joined
12:16
syle left
12:20
pmurias joined
12:21
rff joined
12:29
riffraff left
12:35
iblechbot left
12:47
bockmabe_ left,
bocksp left
12:54
agentzh left
13:08
meppl joined
13:11
agentzh joined
13:21
iblechbot joined
|
|||
| moritz_ | class Foo { my $a }; class Foo is also { say $a }; # is that allowed? | 13:35 | |
| I mean is "my $a" scoped to the block or to the class? | 13:36 | ||
|
13:38
eternaleye left
|
|||
| pmichaud | my is scoped to the block. | 13:39 | |
| to scope to the class, use 'our' | |||
| er. | |||
| hmmm. actually, would need our $a in both cases. | 13:40 | ||
| that's my guess, anyway. | |||
| moritz_ | but then it's not a private variable anymore | ||
| our $!a; ? | 13:41 | ||
| pmichaud | probably | ||
| from S12: our %!cache is rw; # generates no public accessor | 13:42 | ||
| moritz_ | ah, cool | ||
| it would be really useful if I could search the synopsis with queries like <siglil>'!'<identifier>, where <sigil> takes its definitioin from STD.pm ;-) | 13:43 | ||
| pmichaud | I just did a search of S12 for ' our ' | 13:44 | |
| yes, you're correct, it would be cool. Someday it will even be possible :-) | |||
| when we have the p6-version of 'ack', certainly :-) | |||
| moritz_ | aye | ||
| pmichaud | afk # appointment | 13:46 | |
|
13:47
rff left
13:53
cmarcelo joined
14:07
TJCRI joined,
cls_bsd left
14:13
cls_bsd joined,
chris2 joined
14:17
riffraff joined
14:35
rdice joined
14:36
Ched- left
14:37
Ched- joined
14:38
Ched- left,
Ched- joined
14:49
cls_bsd left
14:57
kanru joined
15:10
cls_bsd joined
15:14
yewenbin joined
|
|||
| pugs_svnbot | r20390 | moritz++ | [t/spec] changed 'use v6-alpha;' to 'use v6;' | 15:14 | |
| diff: dev.pugscode.org/changeset/20390 | |||
| lambdabot | Title: Changeset 20390 - Pugs - Trac | ||
|
15:15
cosimo left
|
|||
| pmurias | moritz_: is use v6-alpha incorrect? | 15:21 | |
| moritz_ | pmurias: v6-alpha is the perl 6 syntax as we have it today | 15:22 | |
| pmurias: but the test suite should test Perl 6.0.0 | |||
| pmurias: so there's nothing wrong with using it, but it doesn't belong into the test suite | |||
| [particle] | v6-alpha is not legal perl 6 anymore | 15:23 | |
| moritz_ | was it removed from S02? | ||
|
15:23
cosimo joined
|
|||
| moritz_ | it's still in S01 | 15:24 | |
| (not S02, sorry) | |||
| and S11 says The use v6-alpha line also serves as the Perl 5 incantation to switch to Perl 6 parsing. In Perl 5 this actually ends up calling the v6.pm module with a -alpha argument, for insane-but-useful reasons. | 15:25 | ||
| pmurias | it is specced in in S11:369 | ||
| [particle] | ah, hrmm, it is still specced. | ||
| i thought that had been changed, sorry. | 15:26 | ||
|
15:33
araujo joined
15:39
jjore is now known as zz_jjore,
zz_jjore is now known as jjore
|
|||
| moritz_ | is this valid syntax? my %h{'a' .. 'z'} = (1..26); | 15:40 | |
| it's in S29-hash/exists.t, but it looks suspicious to me | |||
| (and rakudo chokes on it) | |||
|
15:40
meppl left
|
|||
| [particle] | i believe it's valid, but rakudo and list assignment are not friends yet | 15:41 | |
| moritz_ | in perl 5 you can't do things like that | ||
|
15:47
[particle1 joined
15:51
cjfields joined
15:55
IllvilJa left
15:59
iblechbot left
16:01
plaqnet joined
|
|||
| masak | moritz_: you can't? why not? | 16:04 | |
| moritz_ | masak: because you first have to declare the container (%h) and then assign ( @h{'a' ... 'z'}) | 16:05 | |
| [particle] | @$_[...] = (...) for \my %h; | 16:07 | |
| lambdabot | Unknown command, try @list | ||
| [particle] | errands & | ||
| masak | moritz_: ah, you declare it too. missed that. | 16:09 | |
|
16:11
cls_bsd left
16:12
masak left
16:22
iblechbot joined,
riffraff left
16:25
syle joined
16:29
cls_bsd joined
16:37
riffraff joined
16:42
nipotaway is now known as nipotan
16:46
eternaleye joined,
justatheory joined
16:49
nnunley left
16:57
eternaleye left
16:59
IllvilJa joined
|
|||
| pmichaud | (v6-alpha) TimToady has remarked in the past that "use v6-alpha;" is going away. I'm guessing he either changed his mind or that the synopses haven't been changed to reflect that yet. | 17:02 | |
|
17:05
rff joined
|
|||
| [particle] | i think the syns are out of date. | 17:05 | |
| unless you still want them frozen :P | |||
| pmichaud | uhhhhhh.... NO. :-P | 17:06 | |
|
17:06
eternaleye joined
17:07
lisppaste3 left
17:08
rff left,
eternaleye left
17:09
eternaleye joined
17:11
riffraff left
|
|||
| pmurias | how much of Perl 6 remains to be speced? | 17:12 | |
|
17:12
yewenbin left
|
|||
| moritz_ | the second 80%? | 17:12 | |
| most of I/O and concurrency is unspecced | 17:13 | ||
| iirc there's no formal definition of the hierarchy of the builtin types | |||
| pmurias | & | 17:15 | |
|
17:18
eternaleye left,
eternaleye joined
17:21
cls_bsd left
17:22
cls_bsd joined,
lisppaste3 joined
|
|||
| TimToady | that won't be legal, but you'll hopefully be able to say (my %h){'a'..'z'} = 1..26 | 17:27 | |
| v6-alpha is going away slowly. :) | 17:28 | ||
| [particle] | ah, i had the (accent) on the wrong (syllable). | 17:29 | |
| TimToady: thank you for bringing even more cool, grey weather to seattle. | 17:33 | ||
| TimToady | you must be confusing Mountain View with San Francisco... | 17:34 | |
| Mountain View tends to be short of cool, grey weather, so that's why I'm going to Tokyo, to fetch some more back home... | 17:35 | ||
|
17:36
penk left
|
|||
| TimToady | unfortunately Seattle has bribed the prevailing westerlies to blow a little from the south as well, so you're taking more than your fair share of Tokyo weather from us down south | 17:37 | |
| [particle] | i blow and i blow, but the westerlies still prevail :( | ||
| i miss nepal. at least there, if you didn't like the weather, you had three options | 17:39 | ||
| 1) walk uphill, 2) walk downhill, 3) wait. | |||
| TimToady | well, you could hang-glide downhill, or, depending on the weather, uphill as well | 17:40 | |
| [particle] | :) | 17:41 | |
| TimToady | oh, wait, there's no air there--nevermind... | ||
| how do they have weather without air, I wonder... | |||
| [particle] | ask the old man with enormous wings for a lift | ||
|
17:45
ispy_ joined
|
|||
| pugs_svnbot | r20391 | moritz++ | [t/spec] split illegal declaration+initialzation of a hash | 18:06 | |
| diff: dev.pugscode.org/changeset/20391 | |||
| lambdabot | Title: Changeset 20391 - Pugs - Trac | ||
| [particle] | moritz++ | 18:09 | |
| moritz_: have any tuits to add #?rakudo decls to t/spec to make our parsefails less visible? | |||
| moritz_ | [particle]: I'm currently going through the parsefails... | 18:10 | |
| [particle]: and I first search for syntax errors, and clear them | 18:11 | ||
| [particle]: when I'm done with that I'll take a look at remaining parsefails | |||
| but it's a tedious business atm | 18:12 | ||
| [particle] | indeed, it is | 18:14 | |
| you're starting in s29-hash? | 18:15 | ||
| moritz_ | not really, that was a coincidence | ||
| [particle] | okay. | ||
| moritz_ | but for now I'll look at various S29-* stuff | ||
| [particle] | just don't want to step on your toes | ||
| moritz_ | allright | 18:16 | |
| [particle] | it should be easy enough to skip most of S29-list, as i bet most of it is due to lack of list context | ||
| something like #?rakudo emit skip_rest 'no list context' | |||
| however, you'll still need #?rakudo 999999 skip 'parsefail' | 18:17 | ||
| ...or somesuch, because code in fudge's emit declaration happens *after* parrot parses | 18:18 | ||
| moritz_ | @array.delete doesn't seem to work | ||
| lambdabot | Unknown command, try @list | ||
| moritz_ | but that's not a parse failure, at least ;) | ||
| [particle] | what's @array.WHAT ? | ||
| moritz_ | List | 18:19 | |
| which might be the problem | |||
| [particle] | hrmm, src/classes/List.pir contains a 'delete' method | ||
| moritz_ | it dies with Could not invoke non-existent sub undef | 18:20 | |
| so I won't fudge the test because it fails legitimately | |||
| [particle] | yes, that's legit | 18:21 | |
| that's a rakudobug | |||
| moritz_ | what's the status of calling 'pop @list' instead of [email@hidden.address] | 18:23 | |
| I mean in general for those methods that can also be called as sub | |||
| s | |||
| they seem to cause quite many failures | 18:24 | ||
| [particle] | eventually we'll have a role that handles the exporting | ||
| currently, we have sub wrappers that call the method | |||
| it's possible some of those wrappers are missing | |||
| eg: | 18:25 | ||
| .sub delete :multi('List') | |||
| .param pmc list | |||
| .param pmc indices :slurpy | |||
| .return list.'delete'(indices :flat) | |||
| .end | |||
| pugs_svnbot | r20392 | moritz++ | [spec] S29-array/splice.t: qw(..) is normally <...> now | 18:30 | |
| diff: dev.pugscode.org/changeset/20392 | |||
| lambdabot | Title: Changeset 20392 - Pugs - Trac | ||
|
18:35
revdiablo left
|
|||
| pugs_svnbot | r20393 | moritz++ | [spec] fudged S29-hash/delete.t | 18:39 | |
| diff: dev.pugscode.org/changeset/20393 | |||
| lambdabot | Title: Changeset 20393 - Pugs - Trac | ||
|
18:43
dduncan joined
18:44
tobeya joined
18:47
cjfields left
18:52
meppl joined
18:59
Ched- left
|
|||
| pmurias | would it be possible to pass additional parameters using the perl5 stack in such a way that they won't end up in @_? | 19:07 | |
|
19:07
cjfields joined
|
|||
| moritz_ | you could use global var instead of the stack | 19:09 | |
| pmurias | figured a way how do what i want withought bring the perl5 stack/xs into the picture | ||
| moritz_: what i won't is to pass named params seperatly from @_ | 19:12 | ||
| * want | |||
| in a way that subs which don't support them will ignore them | |||
|
19:14
alanhaggai_ joined
|
|||
| moritz_ | pmurias: you could try some evil hackery with a global hash that is indexed by the current sub name, or caller or something like that | 19:14 | |
| [particle] | and use attributes to specify which subs use the global? | 19:15 | |
| course, that's not thread-friendly | |||
| (the global) | |||
|
19:17
dduncan left
|
|||
| pmurias | pugs: sub foo($b) {say $b;} | 19:17 | |
| exp_evalbot | RESULT[\sub :($b) "$_" := "Scalar" #<Scalar:0xb72c7e98>⤠"&?ROUTINE" := "Sub" #<Sub:0xb6604cec>⤠"&?BLOCK" := "Sub" #<Sub:0xb6604cec>⤠"$b" := "Scalar" #<Scalar:0xb72c6b7c> {"&foo" := "Sub" #<Sub:0xb7210f70>, "$_" := "Scalar" #<Scalar:0xb7270d00>⤠| ||
| .. ... | |||
| pmurias | pugs: sub foo($b) {say $b;}; foo(b=>3) | ||
| exp_evalbot | OUTPUT[3ā¤] | ||
| pmurias | pugs: sub foo($b) {say $b;}; foo(b=>3,c=>5) | ||
| exp_evalbot | OUTPUT[*** No compatible multi variant found: "&foo"⤠at /tmp/J8yASCGu1v line 1, column 24 - line 2, column 1ā¤] | 19:18 | |
| [particle] | rakudo: sub foo($b) {say $b}; | ||
| exp_evalbot | RESULT[Method 'perl' not found for invocant of class 'Closure'ā¤current instr.: '_block10' pc 35 (EVAL_12:16)ā¤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)ā¤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/HLLCompiler.pir:587)ā¤called from Sub | ||
| ..'parrot;PCT::HLLCompiler;command_line' pc 1246 (... | |||
| pmurias | pugs: sub foo {}; foo(b=>3,c=>5) | ||
| exp_evalbot | OUTPUT[*** Named argument found where no matched parameter expected: ("b",Ann (Pos (MkPos "/tmp/Sld6Xsf8DD" 1 20 1 21)) (Val (VInt 3)))⤠at /tmp/Sld6Xsf8DD line 1, column 13 - line 2, column 1ā¤] | ||
| [particle] | heh. that's exp_evalbot getting carried away | ||
| rakudo: sub foo($b) {say $b}; 1 | 19:19 | ||
| exp_evalbot | RESULT[1] | ||
| [particle] | rakudo: sub foo($b) {say $b}; foo(b => 3) | ||
| exp_evalbot | OUTPUT[too many named arguments - 'b' not expectedā¤current instr.: 'foo' pc 38 (EVAL_12:21)ā¤called from Sub '_block10' pc 32 (EVAL_12:15)ā¤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)ā¤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 | ||
| ..(src/PCT/HLLCompiler.pir:587)ā¤called from Sub 'parrot;PCT::HLLCom... | |||
| [particle] | rakudo: sub foo(:$b) {say $b}; foo(b => 3) | ||
| exp_evalbot | OUTPUT[3ā¤] | ||
| pmurias | [particle]: re thread safety, are perl threads used much? | 19:21 | |
| moritz_ | pmurias: most people try to avoid them wherever possible ;) | ||
|
19:22
alanhaggai left
|
|||
| pmurias | re passing of named parameters separately, i was trying to do a stupid thing, no wander it has to be done very hackishly | 19:23 | |
| * wonder | 19:24 | ||
| pmurias hates the fact that his spelling suffers horribly when he uses irc :( | |||
|
19:53
Ched- joined
20:03
plaqnet left
20:11
barney joined,
wknight8111 joined
20:21
alanhaggai_ is now known as alanhaggai
20:43
pmurias left
|
|||
| moritz_ | rakudo: class A { has $.a; has $.b; }; my $x = A.new(a => 1, b => 2); say $x.a; say $x.b | 20:46 | |
| exp_evalbot | OUTPUT[1ā¤ā¤] | ||
| moritz_ | b0rked | 20:47 | |
| [particle] | yes, i think rakudo only handles the first Pair | ||
| not certain though | 20:48 | ||
| rakudo: class A { has $.a; has $.b; }; my $x = A.new(b => 2, a => 1); say $x.a; say $x.b | |||
| exp_evalbot | OUTPUT[ā¤2ā¤] | ||
| [particle] | so it seems. | ||
| moritz_ | should I write a small bug report? | 20:49 | |
| [particle] | sure | 20:50 | |
|
21:06
cjfields left
21:08
ispy_ left
21:09
eternaleye left
21:11
alanhaggai left
21:12
eternaleye joined
21:15
Schwern left,
barney left
|
|||
| moritz_ | in NQP this is an error if $<foo> isn't a list: for $<foo> { ... } | 21:16 | |
| is there an easy workaround? | |||
|
21:17
cjfields joined
21:19
TJCRI left
|
|||
| cjfields | I saw the same Pair problem the other day (only accepting the first Pair) | 21:21 | |
| rakudo: class A { has $.a; has $.b; }; my $x = A.new(:a(1), :b(2)); say $x.a; say $x.b | 21:22 | ||
| exp_evalbot | OUTPUT[1ā¤2ā¤] | ||
| cjfields | class A { has $.a; has $.b; }; my $x = A.new(a => 1, b => 2); say $x.a; say $x.b | ||
| rakudo: class A { has $.a; has $.b; }; my $x = A.new(a => 1, b => 2); say $x.a; say $x.b | |||
| exp_evalbot | OUTPUT[1ā¤ā¤] | ||
| moritz_ | cjfields: I submitted a bug report for rakudo | ||
| cjfields: but good to know that colon pairs work | 21:23 | ||
| or whatever their name is ;) | |||
| cjfields | pugs: class A { has $.a; has $.b; }; my $x = A.new(a => 1, b => 2); say $x.a; say $x.b | ||
| exp_evalbot | OUTPUT[1ā¤2ā¤] | ||
| cjfields | well, pugs gets it right, but I guess that's no longer maintained :( | 21:24 | |
| moritz_: thanks for submitting that! | |||
|
21:27
rdice left
21:28
chris2 left
21:29
klle joined
21:41
cjfields left
21:43
mncharity joined
|
|||
| meppl | good night | 21:50 | |
| moritz_ | good night ;) | 21:51 | |
| meppl | ;) | ||
|
21:54
meppl left
21:59
sscaffidi left
|
|||
| mncharity | pugs: \(4:5,6) | 22:07 | |
| exp_evalbot | RESULT[CaptMeth {c_invocant = IFinite 4, c_feeds = [:MkFeed {f_positionals = [:IFinite 5,IFinite 6:], f_nameds = fromList []}:]}] | ||
| mncharity | rakudo: \(4:5,6) | 22:08 | |
| exp_evalbot | OUTPUT[Syntax error at line 1, near "\\(4:5,6)"ā¤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)ā¤called from Sub 'parrot;Perl6::Grammar;TOP' pc 11308 (src/gen_grammar.pir:249)ā¤called from Sub 'parrot;PCT::HLLCompiler;parse' pc 564 | ||
| ..(src/PCT/HLLCompiler.pir:348)ā¤called from Sub 'parrot;PCT::HLLCompiler;compile... | |||
| moritz_ | what's 4:5 supposed to be? | ||
| mncharity | i was wondering that. but now think it's an invocant of 4, and extra positional args of 5 and 6. | ||
| moritz_ | not very intuitive | 22:09 | |
| we had the discussion what $obj.math:{block} means | 22:10 | ||
| and it turned out to be parsed as $obj.meth :{block} | |||
| so why would a capture be parsed differently? | |||
|
22:10
lambdabot left
22:11
lambdabot joined
|
|||
| mncharity | moritz_: a Capture is a generalized right hand side, and : as a comma-like thing to separate invocant from other args matches the generalized left hand side Signature's similar use for parameters. | 22:13 | |
| sub foo($a: $b) { ... } | |||
| I might not even have been puzzled by it if it had been spaced as \(4: 5, 6) ;) | 22:14 | ||
| moritz_ | ok, it can't be parsed as \(4 :5, 6) because that's not valid perl 6, right? | 22:16 | |
| pugs: print perl \(4 :5, 6) | |||
| exp_evalbot | OUTPUT[CaptMeth {c_invocant = IFinite 4, c_feeds = [:MkFeed {f_positionals = [:IFinite 5,IFinite 6:], f_nameds = fromList []}:]}] | ||
| mncharity | TimToady: (1) <capture> uses EXPR which doesn't seem to match '4:5'. should there be a token infix:sym<:> ( --> Comma) ? | ||
| re ':5,6', looking... | 22:24 | ||
|
22:24
justatheory left,
justatheory joined
22:25
iblechbot left
|
|||
| mncharity | re ':5,6', right, doesn't look like it's a valid parse. | 22:26 | |
| moritz_ | anyway, I'm off to bed | 22:27 | |
|
22:27
PerlPilot joined
|
|||
| moritz_ | g'night | 22:27 | |
|
22:27
Juerd_ joined
|
|||
| mncharity | oh, wait. \(4 :5, 6) is valid. it's (:5,6) which looks like not. | 22:27 | |
|
22:27
wolv joined
|
|||
| mncharity | good night :) | 22:27 | |
|
22:27
wolverian left
22:28
wolv is now known as wolverian
|
|||
| mncharity | wolv: you're... shorter | 22:28 | |
| ah, back | |||
|
22:28
dalek left
|
|||
| mncharity | :) | 22:28 | |
|
22:28
pmichaud left,
PerlJam left
|
|||
| mncharity checks if multi f() {} is valid... (ie, no 'sub') | 22:32 | ||
| yep | 22:33 | ||
| TimToady: (2) plurality_declarator:multi doesn't parse 'multi foo() {}' (ie, implicit 'sub'). | 22:35 | ||
|
22:38
Juerd left
22:44
elmex left
22:45
syle left
22:47
eternaleye left
|
|||
| mncharity | oh, that was happy. have parsefail, check STD.pm, notice changes, apply changes, parsefail gone. :) | 22:57 | |
| Tene | nice | ||
|
22:58
PerlPilot left,
wolverian left
22:59
Juerd_ left
23:00
pugs_svnbot left
|
|||
| mncharity | TimToady: (3) regex_def doesn't seem to handle adverbial modifiers? 'token f :P5 {a}' | 23:02 | |
|
23:20
[particle2 joined
23:21
eternaleye joined
|
|||
| mncharity | TimToady: (4) fatarrow has a lhs of ident, but STD.pm in several places (and a kp6 test) says 'foo'=>... . ie, lhs string. ?? | 23:26 | |
|
23:31
cognominal_ left
23:35
pbuetow left
23:37
[particle1 left
|
|||
| mncharity | low-key happiness. if (4) is fudged, STD_red accepts kp6's t/kp6/*.t . | 23:38 | |
| pugs t/ acceptance is still a mess. | 23:39 | ||
| acceptance does _not_ imply the parse is correct, or the tree returned is healthy. it simply means "didn't choke on it". | 23:40 | ||
|
23:40
wolverian joined
23:44
Juerd joined,
PerlJam joined
|
|||
| mncharity | Are the =kwid ... =cut pod comments in pugs t/ now all obsolete/invalid? | 23:48 | |
|
23:48
armagad left
|
|||
| mncharity | TimToady: (5) lots of pugs t/ tests use a =kwid...=cut construct, which STD doesn't understand. depreciated? invalid? | 23:50 | |
|
23:51
cjfields joined
|
|||
| obra | =kwid was ingy's attempt a first cut of pod6 | 23:52 | |
| as I understand it, it's been superceded by damian's pod6 spec | 23:53 | ||
|
23:53
cjfields_ joined,
cjfields left
|
|||
| mncharity | thanks obra | 23:55 | |
| obra | nnn | 23:56 | |
| np | 23:57 | ||
| I can't find the conversation I had with particle last week, but I believe current is: | |||
| =begin pod | |||
| I don't know if a global search and replace is Right or Wrong | |||