-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by apple-gunkies on 11 November 2005. |
|||
luqui | ?eval sub foo($bar?) { say $bar } foo() | 01:09 | |
evalbot_7938 | bool::true | ||
luqui | ?eval sub foo(?$bar) { say $bar } foo() | 01:10 | |
evalbot_7938 | Error: unexpected "?" expecting formal parameter, ":" or ")" | ||
luqui | sweet | ||
?eval sub foo(:$bar) { say $bar } foo bar => 42 | 01:11 | ||
evalbot_7938 | bar42 bool::true | ||
luqui | ?eval sub foo(:quux($bar)) { say $bar } foo quux => 42 | ||
evalbot_7938 | Error: unexpected "q" expecting space or ")" | ||
svnbot6 | r7939 | Darren_Duncan++ | r811@Darren-Duncans-Computer: darrenduncan | 2005-11-12 17:12:00 -0800 | 01:15 | |
r7939 | Darren_Duncan++ | added new utilty script util/add-test-file.sh that combines 'svn/k add foo' and 'add-svn-props.sh' into one convenient step, good for mass text file adds | |||
Juerd | The postfix ? in signatures is blessed now? | ||
Hurrah! | |||
luqui is rather happy about that too | 01:16 | ||
dduncan | the script is actually add-text-file; the commit message is typod | 01:17 | |
Juerd | I wonder if the + to ! change is official too | ||
dduncan | and it was tested by adding itself | ||
Juerd | Hoping pugs is a good reference, | ||
?eval sub foo (:$bar!) { say $bar } foo() | |||
luqui | yeah, postfix ! for mandatory | ||
evalbot_7939 | Error: No compatible subroutine found: "&foo" | ||
luqui | is blessed :-) | ||
dduncan | I like the postfix ! for mandatory | 01:18 | |
Juerd | Neat! | ||
luqui | ?eval sub foo (:$bar!) { say $bar } foo(bar => 42) | ||
evalbot_7939 | 42 bool::true | ||
Juerd | That's my first, ehm, signature symbol, I think it's called. Do these decorators have a name? | ||
luqui thinks that the "no compatible subroutine found" error must be given a better message | |||
luqui goes off to fix that | |||
dduncan | now, if only saying that would result in 42 ending up in $bar | ||
Juerd | luqui++ # fixing | ||
dduncan | I wonder ... | 01:19 | |
luqui | dduncan, what do you mean? | ||
dduncan | just a minute ... | ||
?eval sub foo (:$bar!) { say $bar } foo('bar' => 42) | |||
evalbot_7939 | 42 bool::true | ||
Juerd | dduncan: Note that the first 42 is the result of "say", the second is that of foo | ||
dduncan | I had a problem with this yesterday, have to debug | 01:20 | |
Juerd | luqui: Can you change the evalbot so that it does something to separate output from return value? The two being next to eachother is often confusing, especially as people use "say" a lot, not expecting the return value to be listed too. | 01:21 | |
Is the bot in the pugs repository, by the way? | |||
theorbtwo | I'm not sure what people's excuse for redundant says. Juerd, yes, somewhere under examples. | ||
Juerd | theorbtwo: "say" is very useful, as it allows you to output anything at any point, without considering call/return stacks. | 01:22 | |
dduncan | the problem I had yesterday concerned "submethod BUILD" having named arguments | ||
Juerd | dduncan: Note that BUILD is called by, not an alias for, new. | ||
dduncan | yes | ||
theorbtwo | Yeah, but it gets used a lot in examples when it's completely redundant... it's probably actually because people are so used to perl -le '...' | 01:23 | |
Juerd | theorbtwo: Possibly. | ||
Still, I think both are useful. | |||
theorbtwo | Absolutely. | ||
Juerd | A little separation would probably solve this. | ||
dduncan | if BUILD is working for other people, I'll try debugging mine now | ||
theorbtwo | It'd be nice if it printed Output: ... Returned: ... | ||
luqui | Juerd, I'll look at it | ||
theorbtwo | (Or Output: ... Died: ...) | ||
?eval die "Foo!" | 01:24 | ||
evalbot_7939 | Error: Foo! | ||
Juerd | theorbtwo: ... I was just typing something very similar. | ||
theorbtwo | Close enough. | ||
Hm, though, I wonder... | |||
?eval say "Output"; die "Error" | |||
evalbot_7939 | Output Error: Error | ||
Juerd | theorbtwo: Still, even a simple separator char would work. And be easier to implement, probably :) | ||
Or something circumfix | |||
Output [[Error: Error]] | 01:25 | ||
Output [[4]] | |||
(Double brackets to avoid confusion with the often used .perl) | |||
luqui | what if I omitted the return value if there was output? | ||
theorbtwo | Nah, sometimes you want to see both. | 01:26 | |
luqui | then maybe you put an extra say there? | ||
Juerd | luqui: I think that the return value can be useful even if it wasn't expected to be. | ||
dduncan | the situation is that, following an invocation of Locale::KeyedText::Message.new( 'msg_key' => 'MYAPP_HELLO' ) ... | ||
Juerd | In my bash shell, I have $? as part of my prompt. | ||
luqui | fair enough | ||
dduncan | spitting out the value of the msg_key property displays both the pair key and value | ||
Juerd | Most of the time, I don't think about it. Sometimes, seeing a non-0 there warns me something was wrong, even though the output was normal. | ||
dduncan | now I'm trying to track down why the pair value wasn't extracted in BUILD | 01:27 | |
Juerd | You've probably noticed this in feather's default $PS1 ;) | ||
dduncan | the signiture is ... submethod BUILD (Str :$msg_key!, Any :%msg_vars? = hash()) | ||
Juerd | dduncan: How does new call BUILD? Does it use *? | 01:28 | |
wolverian | is that = hash() redundant? | ||
dduncan | I use the default new(), and don't declare my own | ||
theorbtwo | Somebody remind me what the : there does? | ||
luqui | ?eval my %foo = hash(a => 1, b => 2); say %foo.keys | ||
evalbot_7939 | Error: Unknown syntactic construct: Syn "named" [Val (VStr "a"),Pos (MkPos "<eval>" 1 21 1 22) (Val (VInt 1))] | ||
luqui | ?eval my %foo = hash('a', 1, 'b', 2); say %foo.keys | ||
evalbot_7939 | ab bool::true | ||
Juerd | (Should it? How does one properly call another sub/method using the same arguments, assuming compatible signatures? Do we have argument lists in variables?) | ||
dduncan | right now, the issue is with the msg_key, a scalar | 01:29 | |
wolverian | Juerd, yeah, we do. | ||
Juerd | theorbtwo: :$foo in a signature means it is a named-only parameter. | ||
theorbtwo: The argument will be in $foo. | |||
theorbtwo: The name is 'foo' | |||
theorbtwo | OK. | 01:30 | |
":" is named, ? or ! is required or optional. | |||
Juerd | theorbtwo: :foo($bar) means it is a named-only parameter; the argument will be in $bar; the name is still 'foo'. | ||
theorbtwo | IWFM. | ||
Juerd | theorbtwo: Yes. | ||
wolverian | Juerd, see 'Argument list binding' in S06 | ||
if that's what you meant. I'm really tired. | |||
good night :) | 01:31 | ||
Juerd | theorbtwo: Positional defaults to mandatory, named to optional. Anything with a specified default value is also automatically optional. | ||
wolverian: Good night. | |||
theorbtwo | I ought to read the changelogs of the S*, if not reread all of the S*es. | 01:32 | |
dduncan | ?eval class Foo; submethod BUILD (:$bar) { say $bar; } Foo.new('bar'=>'baz'); | ||
evalbot_7939 | barbaz Foo.new(("bar" => "baz"),); | ||
Juerd | All mandatory positionals must come before optional positionals, but this should be entirely natural. If not, please experiment with alternatives ;) | ||
dduncan | so, there's the bug | ||
'barbaz' was spit out, not 'baz' | 01:33 | ||
Juerd | dduncan: Write a test. | ||
dduncan | okay | ||
Juerd | And one day, either you will find your test removed or changed, which would mean the bug is on your side, or the bug is on pugs's side, and you will find it fixed :) | 01:34 | |
dduncan | does my code look wrong? | ||
theorbtwo | You might want to comment the test, but don't comment it out. | ||
Juerd | dduncan: I dunno. | 01:35 | |
dduncan: I find the new/BUILD thing unnecessarily complicated. | |||
luqui | yeah | ||
dduncan | I think its designed to make class inheritence easier | 01:36 | |
Juerd fails to see the need for separation. | |||
Or the need for submethods, for that matter... | |||
luqui | but I think it has failed for that | ||
Juerd | This may be my ignorance. | ||
luqui | since usually a subclass wants to control the parameters to the superclass, not the person creating the object | ||
dduncan | one can write a manual new() instead and call bless(), such as if you want the constructor to take positional args, like in perl 5 | ||
Juerd | dduncan: I'm usually more interested in the default (thus implicitly preferred or even recommended) way of doing things than in what is possible. | 01:37 | |
A lot is possible, and certainly enough is | |||
dduncan | I think the advantage of the BUILD approach is that if a subclass doesn't want to know about all the optional args a superclass constructor takes, it doesn't have to | 01:38 | |
Juerd | But the language is not defined by what it can do, but by what it does. | ||
dduncan | various other advantages discussed at length elsewhere | ||
Juerd | Creating a dialect does not make the base language any better :) | ||
dduncan | suffice it to say that using BUILD is fairly standardish now, and what I'm trying to use | ||
luqui thinks it is worth arguing | 01:39 | ||
Juerd doesn't even know which things should go into new and which into BUILD. | |||
dduncan | I do know | ||
Juerd | I've never cared, and the names aren't explaining anything to me. | ||
So I'd have to read documentation. | |||
dduncan | BUILD is what bless() calls | ||
Juerd | Which I haven't done yet. | ||
dduncan | after bless creates an object, BUILD sets its attributes | 01:40 | |
new() is called before bless | |||
Juerd | We still set attributes by executing code? | ||
Why not has $.foo = "initial value"? | |||
luqui | Juerd, that is allowed | ||
just not implemente | |||
d | |||
dduncan | it is possible that you may want to do several things at init time in response to the same input or combination thereof | 01:41 | |
Juerd | And why would attributes not already be available in new? Would they have to be class attributes? | ||
luqui | it turns out that attributes are not available in BUILD | ||
dduncan | object attrs aren't available in new, because the object hasn't been made yet | ||
luqui | defaults are set at the *end* of BUILD | ||
for some stupid reason | |||
Juerd | luqui: That appears counter productive :) | ||
luqui | yep | ||
dduncan | attrs are available in BUILD, to be set | ||
when BUILD is called, you have a new object whose attrs are all undefined, and you set them | 01:42 | ||
luqui | yeah | ||
it needs a rehash | |||
we need to simplify and optimize for common cases | |||
Complex is a good common case | |||
Juerd | dduncan: So what? We have hypothetical variables, all kinds of implicit declaration, and even interesting forms of undef, that already know what class they belong to (think my Dog $fikkie .= new). This should be possible. | ||
dduncan | its like if in perl 5, BUILD is called in this context: sub new { my $obj = bless {}, shift; $obj->BUILD(@_); } ... thereabouts | 01:44 | |
BUILD starts from the point that the hash-replacement is blessed, when one starts to set its attrs | 01:45 | ||
I like this approach because I can then use my invocant as the object even in the constructor, and not just all the other methods or destructor | 01:46 | ||
luqui | we know how it works. *why* is what we're contesting | ||
Juerd | Okay, fine that that is what it is, but I still don't like it or see why it's needed. | ||
dduncan | what do you propose instead ... the perl 5 way? | ||
luqui | I think BUILD is okay | ||
Juerd | luqui: Actually, I didn't know how it works :) | ||
luqui | I don't like that the parameters are forced to be named | ||
I don't like that defaults are set at the end | |||
I've had to work around it once or twice | 01:47 | ||
and I have reasons for those | |||
dduncan | last I checked, defaults were actually set at the start of BUILD, not the end ... but Class::Std sets them at the end for perl 5 folks | ||
Khisanth | change it before it's too late! :) | ||
luqui | but I think it would be more productive to p6l them | ||
Juerd | Wouldn't it make a lot of sense to have new and BUILD have exactly the same signature? | ||
dduncan | at least that's how I read A6 | ||
new() defaults to having the same signiture as BUILD, the same as bless, if you don't declare a new() but you do declare a BUILD ... if you declare a new(), it has what you declare instead | 01:48 | ||
and bless takes only named args | |||
luqui | that would be nice | 01:49 | |
Juerd | I see | 01:50 | |
How does it do that? :) | |||
Is there a syntax to take another sub's signature? | |||
dduncan | if you declare neither, then both default to taking named args matching your public attributes | ||
luqui | Juerd, arg tuple :-) | 01:51 | |
dduncan | er, new() does | ||
Juerd | luqui: What syntax do you imagine in declarations? | ||
luqui | sub new (\$args) { .... $obj.BUILD(*$args) } | ||
dduncan | in my case, I make all my attributes private, and so I have to define explicit args in my constructor | ||
I think | |||
Juerd | Aha, backslash. | ||
wolverian | Juerd, I pointed you at the relevant S06 section :) | ||
Juerd | wolverian: It's almost 3am, I'm in bed, tired, really can't stand any white background :) | 01:52 | |
wolverian: So I'm postponing any serious reading until tomorrow :) | |||
wolverian | excuse accepted! :) now I'm really going to fall asleep, as well. | ||
Juerd | In fact, I was just going to wish you all a good night | ||
Good night :) | |||
dduncan | good night | ||
wolverian | good night! | ||
dduncan | if anyone needs another analogy, BUILD() in perl 6 is what initialize() generically means in any language | 01:54 | |
luqui | the philosophy isn't the problem, it's the details | ||
Juerd | dduncan: Then the name "BUILD" would be wrong, imo. | ||
Does it actually build anything? | |||
Or does it initialize? | 01:55 | ||
But I'm sleeping, really | |||
afk | |||
dduncan | well, "build" is generic enough to include initialize | ||
in the english sense of the word | |||
theorbtwo | [01:38] [theorbtwo(+i)] [4:#perl6(+n)] [Act: 1,5] | 01:57 | |
Sorry. | 01:58 | ||
azuroth | unrelated, but... | ||
anyone think this warning might be causing a segfault? ;-p "/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/../../../libpqxx.so, may conflict with libstdc++.so.5" | 01:59 | ||
or can I make it un-link to stdc++.so.5 ? | 02:00 | ||
luqui | ? | 02:01 | |
no idea | |||
azuroth | I probably ought to be asking in #c++ :-) | ||
luqui | ?eval | 02:28 | |
?eval () | |||
evalbot_7939 | () | ||
svnbot6 | r7940 | luqui++ | Minor spelling/grammatical fixes. | 02:39 | |
r7941 | luqui++ | Made evalbot distinguish output from return value. | |||
luqui | ?eval 42 | 02:48 | |
evalbot_7941 | 42 | ||
luqui | ?eval say "hi"; 42 | ||
evalbot_7941 | OUTPUT[hi ] 42 | ||
luqui | it's ugly, but it'll do | ||
azuroth | ?eval sub foo() { say "blah"; 1;} say "a"; foo(); | 02:49 | |
evalbot_7941 | OUTPUT[a blah ] 1 | ||
azuroth | woot | ||
luqui | do newlines work | 02:51 | |
in irc? | |||
oh, not really | |||
azuroth | they do in jabber :-) | ||
rafl | I'd also prefer using a jabber MUC over IRC. | 02:55 | |
luqui | ?eval "it's a test bot" | 03:04 | |
luquivb | "it\'s a test bot" | ||
evalbot_7941 | "it\'s a test bot" | ||
luqui | ?eval "it's a test bot, seriously" | 03:05 | |
03:05
luquivb is now known as luquivb_2
|
|||
luquivb_2 | "it\'s a test bot, seriously" | 03:05 | |
evalbot_7941 | "it\'s a test bot, seriously" | ||
luqui | good | ||
svnbot6 | r7942 | luqui++ | Lazy nick resetting. | 03:09 | |
luqui | ?eval "\$quotemeta?" | 03:12 | |
evalbot_7941 | "$quotemeta?" | ||
luqui | hmm, that's a bug too | ||
?eval "update yourself!" | 03:13 | ||
03:13
evalbot_7941 is now known as evalbot_7942
|
|||
evalbot_7942 | "update yourself!" | 03:13 | |
luqui | woohoo | ||
azuroth | that's cool | 03:14 | |
dduncan | "update yourself!" | 03:15 | |
?eval "update yourself!" | |||
evalbot_7942 | "update yourself!" | ||
dduncan | oh well, timing not so good | ||
luqui | it just checks to see if it has been updated when you eval something | ||
it updates every five minutes | |||
that was the best I could do without getting into yucky ipc stuff | 03:16 | ||
dduncan | well, it won't break anything, given that it's a string literal | ||
luqui | hmm? | 03:17 | |
dduncan | except that this is an interpolating string, so presumably any interpolation is done first, then if the result is whatever it does whatever | ||
luqui | right | ||
fixing | |||
ugh, this is more difficult than I though | 03:32 | ||
t | |||
eric256_ | ?eval say "hello"; | 03:38 | |
evalbot_7942 | OUTPUT[hello ] bool::true | ||
eric256_ | just wanted to see the new output ;) | ||
Khisanth | where did the extra space come from? | 03:52 | |
azuroth | they're \ns I think | ||
svnbot6 | r7943 | luqui++ | Fixed '$foo'.perl (wasn't properly escaping the $). | 03:58 | |
r7943 | luqui++ | In the process, I blessed and implemented "\d[123]". | |||
luqui | ?eval "\$quotemeta" | 04:06 | |
04:06
evalbot_7942 is now known as evalbot_7943
|
|||
evalbot_7943 | "\$quotemeta" | 04:06 | |
luqui | ?eval "\$quotemeta\{curly\}" | 04:07 | |
evalbot_7943 | "\$quotemeta\{curly}" | ||
luqui | excellent | ||
gaal | autri, hello. a few questions for when you wake up :) | 05:26 | |
first, I was adding smartmatch against closures, but couldn't get literal when { } { } to work -- any idea why adding ruleBlockLiteral as an option to ruleCondPart (or a similar rule intended just for "when" didn't do the trick)? | 05:27 | ||
svnbot6 | r7944 | Darren_Duncan++ | r811@Darren-Duncans-Computer: darrenduncan | 2005-11-12 17:12:00 -0800 | ||
r7944 | Darren_Duncan++ | added new utilty script util/add-test-file.sh that combines 'svn/k add foo' and 'add-svn-props.sh' into one convenient step, good for mass text file adds | |||
r7945 | Darren_Duncan++ | r818@Darren-Duncans-Computer: darrenduncan | 2005-11-12 21:14:34 -0800 | |||
r7945 | Darren_Duncan++ | added new test t/oo/named_parameters_in_BUILD.t about that BUILD() receives declared-named argument values correctly | |||
gaal | second, more genrally, i was looking for ways to increase my Parsec fu by tracing it -- not just add trace calls, but maybe put the whole thing in a debugger. couldn't find one that works though -- any ideas about that? #haskell sady was no help, but perhaps i should poll again. | 05:28 | |
luqui | gaal, re: when, it's possible that we'll disallow that form anyway | 05:30 | |
in favor of when ({ }) { } | |||
dduncan | clkao, it appears that svk again sent the same commit to the pugs main server twice ... this time the pugs commits 7939 and 7944 are actually the same one, which (as with the first such error) involved adding a new file | 05:32 | |
this time, however, I have a partial terminal log that I will nopaste ... | |||
gaal | third, I'm going through TaPL now. I'm very pleased to find I can read the OCaml there. when you started pugs, did you consider OCaml? Without pugs today, I would have assumed OCaml to be more suitable than Haskell -- did you already know about the fancy modern Haskell stuff when you started off, or did you not worry about getting to need any of it? :-) (this last Q I need for the article) | ||
dduncan | that shows what happened from the moment of my second actual commit of the day, named_param... | 05:33 | |
pasteling | "dduncan" at 24.108.164.7 pasted "client-side details of what happened when same commit pushed to pugs mainserver a second time" (44 lines, 2.6K) at sial.org/pbot/14266 | ||
gaal | luqui: ACK. in fact ruleCondPart has a maybeParens in it so that should have worked but doesn't | 05:34 | |
dduncan | seen clkao | 05:36 | |
jabbot | dduncan: clkao was seen 1 days 5 hours 38 minutes 49 seconds ago | ||
gaal | luqui: if you're already here -- do you have an idea for the semantics of has = default? for example: | ||
if there's both a has-default and a BUILD routine, does the default get installed before the routine is called? | 05:37 | ||
if there's a has-default, and a BUILD routine that specifies an optional value for the same attribute, I guess that's a compilation error | 05:38 | ||
..back on the when {} {} thread, of course I want to fix this but it's more important to me in the long shot to have a better understanding of parsec. ideally i'd like an AOPish tool that at runtime can give me a trace of productions tried, like RD_TRACE (I think it is? in P::RD). | 05:42 | ||
or something along the lines of this: www.cs.kent.ac.uk/people/rpg/tatd2/goodFib.pdf | |||
It's pretty darn impressive we've gotten this far without a debugger! haskell++ I suppose | 05:43 | ||
luqui | gaal, unfortunately, it is specced so that the defaults are initialized *after* execution of BUILD | 05:50 | |
there was some reason for this, but it wasn't a very good one :-) | |||
gaal | can't the spec be updated? | 05:52 | |
the case where I say ...new(something => undef) should probably also work (that is, something really should be undefined, not get the default) | 05:53 | ||
dduncan | considering that undef is a legitimate value, perhaps the test as to whether to apply to a default is if the name key 'exists' rather than if its value is 'defined' | 05:56 | |
exists in the argument list | |||
gaal | dduncan: yes, that's the idea. problem is if you apply has-defaults AFTER BUILD, it may be tricky to go back and look at the argument list. | 05:57 | |
dduncan | if that happened, then you could correctly set to undef if defaults are applied after | ||
I don't see why the argument list would have expired ... it should still be around for the has-defaults to look at | |||
since that happens before the bless call returned | 05:58 | ||
gaal | well, i was just pointing out a possible corner case to nail down. it may have been obvious. | 06:00 | |
$work & | |||
dduncan | in any event, I sort of agree that defaults should be applied before BUILD | 06:01 | |
or I'm not actually sure what should happen | |||
for now, I just set all my attributes in BUILD explicitly, whether from arguments or defaults | |||
and don't define defaults in any other place | 06:02 | ||
gaal | well, I also wonder if has $.member = { somecode } should assign a closure or perhaps run the thunk on instantiaition | 07:35 | |
probably it makes more sense for it to be consistent and assign a closure. | 07:36 | ||
Juerd | gaal: Assign a closure, because that's what's written | 11:15 | |
gaal: But wasn't there something like "has $foo will init { ... };"? | 11:16 | ||
12:02
theorbtw1 is now known as theorbtwo
|
|||
gaal | Juerd: where did you see that? | 12:12 | |
masak | gaal: something like that is hinted at search.cpan.org/dist/Perl6-Bible/li...ure_traits | 12:17 | |
gaal | masak: thanks. (and hi :-) | 12:19 | |
"will first" ? | |||
in any case: this was not explicitly for instance data, but rather for my/our vars. | 12:28 | ||
seen brentdax | 12:32 | ||
jabbot | gaal: brentdax was seen 30 days 7 hours 38 minutes 18 seconds ago | ||
gaal | darn | ||
r0nny | yo | 12:34 | |
azuroth | hey | ||
gaal | ho | ||
12:37
lampus_ is now known as lampus
|
|||
Juerd | gaal: I have no idea. | 13:07 | |
qwm | so, when will we see an ISO standard of Perl 6? | 13:08 | |
Juerd | Were old style +$foo named parameters optional or mandatory by default? | 13:12 | |
qwm: Hopefully never, because ISO standards are expensive. | |||
scook0 | Juerd: optional IIRC; mandatory was ++$foo | 13:14 | |
Juerd | Ah, thanks. | 13:15 | |
sub foo ($pma, $pmb, ?$poa, ?$pob, ++$nma, ++$nmb, +$noa, +$nob) { ... } | 13:17 | ||
sub foo ($pma, $pmb, ?$poa, ?$pob, +:$nma, +:$nmb, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, ?$poa, ?$pob, +:$nma, +:$noa, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, $poa?, $pob?, +:$nma, +:$noa, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, $poa?, $pob?, :$nma!, :$noa!, :$noa, :$nob) { ... } | |||
Is that the correct order in which things happened? | |||
p => positional, n => named, m => mandatory, o => optional, a => first, b => second | 13:18 | ||
Ohm, there are some mandatory named arguments mistakenly labelled 'o' | 13:19 | ||
s/Ohm/Oh/ | |||
rafl | is :noa! really named optional a? | ||
Juerd | No, that's one of the mislabeled. | 13:20 | |
sub foo ($pma, $pmb, ?$poa, ?$pob, ++$nma, ++$nmb, +$noa, +$nob) { ... } | |||
sub foo ($pma, $pmb, ?$poa, ?$pob, +:$nma, +:$nmb, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, ?$poa, ?$pob, +:$nma, +:$nma, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, $poa?, $pob?, +:$nma, +:$nma, :$noa, :$nob) { ... } | |||
sub foo ($pma, $pmb, $poa?, $pob?, :$nma!, :$nma!, :$noa, :$nob) { ... } | |||
rafl | OK then. | ||
:$nma! two times for the last three lines? should be :$nmb!, I guess. | 13:21 | ||
Juerd | You're right | ||
I think my IQ was divided by 2 last night. | |||
rafl | What did you do last night? | 13:22 | |
Juerd | Stubbornly not sleep, while being exhausted. | ||
liz6 wonders whether chanting "OM" to Juerd would help ;-) | 13:25 | ||
Juerd | OM? | ||
rafl | Juerd: Unfortunately I did the same. :-) | 13:26 | |
Juerd | As in "het roer om", "Openbaar Ministerie", or something else? | ||
liz6 | en.wikipedia.org/wiki/Aum | ||
Juerd | Ah | ||
Don't think it'd help :) | 13:27 | ||
rafl: Then perhaps your IQ is also half of what it was before. | |||
rafl | Juerd: I already work about two hours to fix a segfault in some perl bindings. You're probably right. :-) | 13:29 | |
Juerd | :) | 13:30 | |
svnbot6 | r7946 | iblech++ | * Changes to accomodate to new (r6582) S02, S03, and S06 in src/, ext/, t/, | 13:38 | |
r7946 | iblech++ | perl5/, docs/ and examples/: | |||
r7946 | iblech++ | * eqv is now spelled ===. | |||
r7946 | iblech++ | * (:who($name), :why($reason)) := ... is now a syntax error, one has to | |||
r7946 | iblech++ | explicitly use :(...) syntax to disambiguate: | |||
r7946 | iblech++ | :(:who($name), :why($reason)) := ... | |||
r7946 | iblech++ | * Fixed many occurances of =:= which actually meant === (but, as in the | |||
r7946 | iblech++ | current Haskell runcore, &infix:<=:=> ::= &infix:<===>, these mistakes went | |||
r7946 | iblech++ | unnoticed). | |||
r7946 | iblech++ | * docs/quickref/op was in iso-8859-1; fixed. | 13:39 | ||
r7946 | iblech++ | * t/oo/type.t is outdated (no current Synopsis speaks about .type and the | |||
r7946 | iblech++ | notion of types and classes etc. is changing currently). | |||
r7947 | iblech++ | * PIL2JS: lib/PIL2JS.pm: Do not write to "deleteme_eval.js" any longer when | |||
r7947 | iblech++ | using JSSM (putter++!). | |||
r7947 | iblech++ | * t/oo/attributes/undeclared_attribute.t: Improved xinming++'s test to | |||
r7947 | iblech++ | also test for binding of undeclared attributes to be illegal. | |||
r7947 | iblech++ | * New t/operators/binding/attributes.t: Tests for binding {public,private} | |||
r7947 | iblech++ | {instance,class} attributes. | |||
r0nny | re | 13:47 | |
Juerd | ===? | 13:48 | |
Oh my! | |||
HELP | |||
(NOOOOOOOOOO!) | |||
liz6 | some equals are more equal than other equals? | 13:50 | |
Juerd | =, ==, === doesn't make the language any clearer. | ||
PHP has this. It sucks. | |||
theorbtwo | That was always true... but = and == is already plenty, thankyouverymuch. | ||
Eeep, I'm an echo. | 13:51 | ||
dakkar | Juerd: JS is even stanger | ||
Juerd | 14I'm an echo... | ||
r0nny | i'd rather have eqv then === | ||
i think eqv is much more readable | 13:52 | ||
Juerd | I dislike eqv too. I think this thing should be a method, not an infix op. | ||
Or maybe not. | |||
r0nny | i tihnk infox op is ok | ||
Juerd | Ah well, at least we don't have to use this often. | ||
dakkar | is 'eqv' pointer-comparison? | 13:53 | |
r0nny | it does what it should do - in a radable way | ||
Juerd | Readable, yes, distinguishable, hardly. | ||
= versus == is doable. | |||
== versus === is much less. | |||
r0nny | syntax-highlighting is needed for sure | ||
Juerd | The language should never depend on syntax highlighting for things to be clear. | 13:54 | |
r0nny | yeah | ||
Juerd | Besides, I doubt any syntax highlighting engine can make anything useful from: | ||
r0nny | but humans tend to see it more clear if the machine hepla a bit with colors | ||
Juerd | /<before foo %bar{/<quux>/}>/ | 13:55 | |
theorbtwo | I think infix op is not only OK but right. If there's no difference between the invocant and the argument, making it a method is confusing. | ||
Juerd | theorbtwo: You're right. | ||
Juerd tends to see $foo infixop $bar as $foo.infixop($bar) though. | 13:56 | ||
theorbtwo | It's not, though. | ||
It's infixop($foo, $bar) | |||
Juerd | (1.+(2)).==(3) | ||
) | |||
theorbtwo | ?eval 1.+(2) | ||
13:56
evalbot_7943 is now known as evalbot_7947
|
|||
evalbot_7947 | 3/1 | 13:56 | |
theorbtwo | OK then. | ||
dakkar | what was that? | 13:57 | |
r0nny | ?eval 1.+(3) | ||
evalbot_7947 | 4/1 | ||
dakkar | ?eval (1).+(3) | ||
r0nny | wtf ? why is the reult 4/1 - it should be 4 | ||
evalbot_7947 | Error: unexpected "." expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dakkar | r0nny: might that be a Rational? | ||
r0nny | hmm | 13:58 | |
theorbtwo | Pugs has several different sort of numbers; that's a rational. Doesn't much matter; as everybody knows 4/1 is 4. | ||
dakkar | And I think it gets parsed as <1.> <+> <(> <3> <)> | ||
r0nny | confusting | ||
theorbtwo | sub{1.+(3)}.perl | ||
?eval sub{1.+(3)}.perl | |||
evalbot_7947 | "sub \{...}" | ||
theorbtwo | Grr. | 13:59 | |
dakkar | the 'decimal dot' should be consumed by the 'number' token | ||
theorbtwo | I keep forgetting it can't do that. | ||
r0nny | usually i expect a integer and not a rational as result of addidion from integers | ||
dakkar | 1. is not an integer ;-) | ||
r0nny | hmm | ||
?eval 1+(3) | |||
evalbot_7947 | 4 | ||
theorbtwo | OK then... | ||
anyway, we're drifting. | |||
r0nny | argh | ||
?eval 1.infix:>>+<<(3) | 14:00 | ||
evalbot_7947 | Error: unexpected "i" or "." expecting digit, "_", exponent, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
theorbtwo | What should "are these the same variable" look like? | ||
?eval 1.infix<+>(3) #, I think... | |||
dakkar | I asked: waht does exaclty 'eqv' do? pointer equality? | ||
evalbot_7947 | Error: No compatible subroutine found: "&infix" | ||
theorbtwo | dakkar: "Are these two things really different names for the same thing?" | ||
r0nny | dakkar: =:= does pointer equal | ||
i trhink i shoud read more | 14:01 | ||
theorbtwo | === is the new name for =:=, I think. | ||
dakkar | argh. so C<a === b> iff the two names refer to the same container | ||
so it's a relation on names, not values, so it cannot be a method, since methods operate on values | |||
theorbtwo | ?eval $a=1; $b=[$a, $a]; $b[0] === $b[1] | 14:02 | |
evalbot_7947 | Error: Undeclared variable: "$a" | ||
theorbtwo | ?eval my $a=1; my $b=[$a, $a]; $b[0] === $b[1] | ||
evalbot_7947 | bool::true | ||
Juerd | dakkar: Methods operate on containers. | ||
dakkar: The container is the invocant | |||
theorbtwo | (The container often falls back^W^Wredispatches to the value, though, if it doesn't handle the method itself.) | 14:03 | |
dakkar | Juerd: ? an object is a value... or am I missing something? C<tie>s operate on containers | ||
Juerd | dakkar: Your terminology is off :) | ||
theorbtwo | ?eval $a=1; $b=[$a, 1]; $b[0] === $b[1] | ||
evalbot_7947 | Error: Undeclared variable: "$a" | ||
theorbtwo | ?eval my $a=1; my $b=[$a, 1]; $b[0] === $b[1] | ||
evalbot_7947 | bool::true | ||
dakkar | ok, where is the "terminology quick-reference"? ;-) | ||
theorbtwo | Blink... is that last result wrong, or is my understanding wrong? | ||
Juerd | dakkar: There are names, containers and values, originally, but Autrijus thought of a new scheme with cells instead of containers. The new one isn't in my head yet. | 14:04 | |
theorbtwo: It is wrong, or === isn't container-equivalency | |||
dakkar | Juerd: oh. I might have looked at a picture, once... | ||
Juerd | dakkar: Anyway, a "value" is the contents of a container. | 14:05 | |
dakkar | ehm... $b=[$a,$a];$b[0]===$b[1] -> true is wrong, too, so | ||
Juerd: yes, and a container is (more or less) a "memory location" | |||
Juerd | dakkar: After $foo = 3, the container named $foo holds the value three. | ||
Operators like + use the value. | |||
dakkar | Juerd: ok | 14:06 | |
Juerd | Normally, when passing an argument, you pass the container, even without "is rw". Some magic is applied to make the container read only in the sub. | ||
dakkar | where is the type annotation stored, though? As I see it, all three levels need some kind of type annotations | 14:07 | |
Juerd | "is copy" makes perl copy your value from one container to another. | ||
dakkar: In the container. | |||
dakkar | but I can't do @foo := $bar, so the names must be typed in some way | 14:08 | |
(or can I?) | |||
Juerd | dakkar: The value has type too, and there can even be two different values in a single container, but that's not something a language user should care about. | ||
dakkar: Sure you can, if $bar is a reference to an array. | |||
It will then make @foo an alias for @$bar. | |||
dakkar | so it has to know that @foo is an array name | ||
Juerd | @. | 14:09 | |
It's easy to think of real arrays and real hashes as references without the $ :) | |||
dakkar | yes, obvious. so we *do* have three levels of type annotation | ||
Juerd | dakkar: Well, sort of. We have more, even. | ||
dakkar | (BTW, this seems to be true of Perl5, too) | 14:10 | |
Juerd | We need more words than "type" | ||
dakkar | yes. must start making them up ;-) | ||
Juerd | Or adjectives. Easier. | 14:11 | |
theorbtwo | typf, typg... | ||
dakkar | lol | ||
Juerd | Variable types, container types, value types. | ||
dakkar | "variable" is a bit overloaded, don't you think? I keep using "name" | ||
theorbtwo | (Fortunately, we can use the shorter term "sigil" for the first one.) | ||
Juerd | A variable doesn't have to have a name. | 14:12 | |
theorbtwo | ...unless I'm confused about the meaning. | ||
Juerd | It can have a name. Or even several. | ||
So "name" as a replacement for "variable" is wrong. | |||
theorbtwo | (Think of the (somewhat abused) perl term "anonymous".) | ||
Juerd | But yes, there may also be name types. | ||
dakkar | Juerd: argh. what is a "variable"? (I'm deeply confused) | ||
I have names ($foo), containers (memory locations), values (thing stored therein) | 14:13 | ||
Juerd | I'm wrong. "variable type" is misleading. | ||
Should indeed be "name type". | |||
dakkar | oh, I'm relieved ;-) | ||
theorbtwo | Juerd: Can you give an example of a name type? | ||
Juerd | theorbtwo: $, @, %, & | ||
theorbtwo: Sigils indicate name type. | |||
dakkar | theorbtwo: the name C<$foo> has scalar name type | 14:14 | |
Juerd | Variable types are arrays, hashes, scalars | ||
theorbtwo | OK. But the name is "$foo", untyped -- the $ is part of the name. | ||
Juerd | Container types are Scalar, Ref, Num, Str, Dog, Cat (containers are scalar things) | ||
theorbtwo: "foo type" != "type". | 14:15 | ||
Disregarding that != is for numbers. | |||
Value type is number, integer, float, string, reference | |||
dakkar | Juerd: "containers are scalar things"? what is the container that @a refers to? | ||
Juerd | dakkar: None. | ||
dakkar: An array is a collection, not a container, in the jargon I'm used to. | |||
theorbtwo | So what's self in @a.foo? | 14:16 | |
dakkar | Juerd: when I tie an array, don't I tie the container? (tie are trasparent to argument passing, are they not?) | ||
Juerd | A collection (aggregate) points to multiple containers | ||
dakkar: I refuse to discuss tie, because it's so extremely complicated in Perl 5, and I don't know the semantics in Perl 6. | |||
dakkar | Juerd: good point | ||
theorbtwo | I don't think there is such a thing in perl 6. | 14:17 | |
dakkar | there was something in autrijus's pictures... | ||
theorbtwo | OTOH, you can do my BTree @foo; | ||
Juerd | theorbtwo: That gives you "my @foo of BTree", i.e. scalars of BTree type, aggregated in a normal array. | ||
dakkar | and it should mean that the containers referred to by the subscripting @foo can olny contain values derived from the BTree value type, right? | 14:18 | |
theorbtwo | Um... are you sure? | ||
Juerd | theorbtwo: Never. | ||
dakkar | lol | ||
r0nny | rafl: does your sixpan stuff have any usable depency solving classes ? | 14:27 | |
Juerd | Fuck. | 14:30 | |
spamd hasn't been running for an hour. | |||
Two hundred spam messages in my inbox. | |||
r0nny | omg | ||
Juerd | Good thing clamd was still running. | ||
r0nny | this many in 1 hour ? | ||
Juerd | Yep. | ||
Numerous duplicates too | |||
r0nny | they should have a death-penalty for spammers | 14:31 | |
Juerd | No. | 14:32 | |
Did you actually think about that before you typed it? | 14:33 | ||
r0nny | not really | ||
theorbtwo | Try doing that in the future. | ||
r0nny | but at least they should cut them from internet for 10 or 20 years | 14:34 | |
Juerd | I disagree. | ||
theorbtwo | So do I. | ||
r0nny | so they should be left cappable of spamming ? | ||
Juerd | People selling drugs via the internet should be punished as drugs dealers. | ||
Because that's what they are. The means of doing so is irrelevant. | |||
This is half of today's spam. | 14:35 | ||
r0nny | hmm | ||
gaal | Juerd: if you use procmail, look at the force-rescan script in one of the manpages | ||
theorbtwo | People fradulantly claiming to deal drugs should be punished as fraudsters. | ||
Juerd | Then, there's the scams, same thing. Scamming is forbidden. | ||
pasteling | "gaal" at 192.117.178.34 pasted "(OT) force-rescan with procmail" (19 lines, 455B) at sial.org/pbot/14270 | ||
r0nny | in some countryed they have desth-penalty for selling hard drugs | 14:36 | |
countryes | |||
theorbtwo | countries. | ||
r0nny | ack | ||
Juerd | If you treat all these things via existing laws, you will end up with commercial spam, legal stuff. This should be allowed via strict guidelines, and punisheb by money fines. | ||
gaal: My server can't take it if I use non-spamd | 14:37 | ||
gaal | you can do that with spamd too i think, assuming the procmail recipe calls spamc. | ||
Juerd | I need qpsmtpd-forkserver because tcpserver spawning things is too much. | ||
r0nny | i think they should disallow main as adversting platform | ||
Juerd | gaal: The problem in question was that spamd died :) | 14:38 | |
r0nny | eh mail | ||
Juerd | r0nny: I disagree. | ||
r0nny | since mail id for comunication, not roasting your beain with the newest ads | ||
gaal | Juerd: and is still dead? that's a problem all right :) | ||
theorbtwo | So do I. | ||
Juerd | r0nny: Direct marketing can be very useful for both seller and target audience. | ||
gaal: No, I re-started it. | |||
r0nny: Marketing and advertisement are communication. | |||
r0nny | i see most of it as roasting peoples brain with untrue stuff | 14:39 | |
Juerd | The problem with spam is that most spam is for illegal goods and activities, or porn related. | ||
But that should be dealt with using non-spam laws. | |||
Sending porn to minors is illegal in many countries. If you cannot verify that someone is an adult, don't send it. | 14:40 | ||
r0nny | yeah | ||
Juerd | If someone is an adult, go ahead, send the porn spam | ||
theorbtwo | "people's brains". You do have a point, r0nnie, but if the problem is the untrue stuff, then make sending untrue stuff illegal, and prosecute for it. | ||
Juerd | Just keep it reasonable. | ||
14:41
lampus_ is now known as lampus
|
|||
Juerd | theorbtwo: Guess what - it already is ;) | 14:41 | |
theorbtwo | Juerd: I'm not sure I like that solution, but only because I like free spam. | ||
Juerd | In most countries. | ||
theorbtwo | Juerd: I'm aware. | ||
Er, s/spam/porn/ | |||
Juerd | Countries without laws are a problem. | ||
r0nny | problem iss most of these spammer asholes are very unreasonalbe - i think for these unreasonable people there should be unreasonable penaltyes | ||
Juerd | theorbtwo: There are many opt-in mailinglists for that. | ||
theorbtwo | Juerd: But if they have to verify your age, they will become non-free. | 14:42 | |
Juerd | r0nny: No, even for unreasonable people, there should be reasonable penalty. | ||
theorbtwo: "Sending to", I meant in the non-american form :) | |||
If someone *requests* it, give it. They should be able to judge for themselves. | 14:43 | ||
If a minor requests porn, by all means give it to them. The minor is at fault here. | |||
r0nny | they dont ask u - its like menthal terror | ||
Juerd | I meant "sending to" in the spam way. Unsollicited mail relating to porn. | ||
That should not be done without verification. | 14:44 | ||
theorbtwo | I rather like the smell of menthol. You meant mental. | ||
Juerd | menthol terror :) | ||
lol. | |||
r0nny | rofl | ||
bad english is allways good for a joke ;P | |||
theorbtwo | Juerd: The problem is that, in theory, a minor is never at fault. r0nny: "always". | ||
theorbtwo sighs. | 14:45 | ||
Juerd | theorbtwo: Still, one shouldn't require providers of non-real-life-interactive erotica to verify age. | ||
theorbtwo | I don't much care for that theory, and in pratice, it doesn't do any good, nor is it very true. | ||
Juerd | theorbtwo: This would be unreasonable, as it indeed destroys free porn. | 14:46 | |
This is unrelated to spam, though :) | |||
Pull and push media should have different rules. | 14:47 | ||
And opt-in is pull | |||
And then there's still an important difference between synchronous and asynchronous. | 14:48 | ||
svnbot6 | r7948 | iblech++ | docs/quickref/data: Outlined the current variable name, container, and cell | ||
r7948 | iblech++ | semantics, as they're implemented in PIL2JS and as they will be implemented in | |||
r7948 | iblech++ | the new runcore and the new PIR compiler. | |||
r7948 | iblech++ | * Note: Do not use the current Haskell runcore for experiments with | |||
r7948 | iblech++ | containers, =:=, ===, etc. In the current runcore, | |||
r7948 | iblech++ | $a = 42; $b = 42; $a =:= $b is true! | |||
r7948 | iblech++ | * Note: Reading t/operators/binding/*, t/operators/identity.t, and | |||
r7948 | iblech++ | t/operators/value_equivalence.t is strongly recommended. | |||
Juerd | Erotica on TV is fine late at night, not just before kiddy bedtime | ||
But sending it by mail would be wrong at any time. | |||
This can also be seen as a broadcast/direct difference. | |||
E-mail isn't a broadcast medium, even though it is used like it. | |||
$a = 42; $b = 42; $a =:= $b is true! | 14:49 | ||
ahh | |||
That explains some stuff :) | |||
r0nny | the problem is they do everything to get it torugh filters | ||
Juerd | Define "they" | 14:50 | |
r0nny | porn and drug spammers | ||
Juerd | The fun thing is that the people who evade filters, are usually doing something illegal and can be punished based on that. | ||
Spam isn't bad by definition. | |||
I get some good spam. | |||
The only reason I run a filter thingy is that most spam is indeed the kind that I don't want. | 14:51 | ||
And that I don't mind not getting the good spam. | |||
dakkar starts to read the documents on name-container-value stuff... | |||
r0nny | last time i got a usefull spam msg was 6 months ago | ||
i think there should be laws, define how to use mail - so all thos damn mails with fake information are very illegal | 14:52 | ||
and it should be threaded like faking documents like a testament or a contact | 14:53 | ||
so the penatyes of this massive abuse the bad spammers do will automagically add up to very high ones | 14:54 | ||
for example there could be a rule all ad-mails must have a valid sig, so the sender can be proven and a note in the subject | 14:55 | ||
theorbtwo | "penalties". I think it should certianly be far lower a penalty then for purgery in a court of law. | 14:56 | |
I'm not real sure if it should be illegal. | |||
Note that giving a false name is not, in general, illegal. | |||
r0nny | fakind data to make users look at it should be illegal | ||
theorbtwo | (In the US, at least.) | ||
r0nny | theorbtwo: why should the penalty for people just making money if casuing financial dammage to others be low ? | 14:57 | |
s/if/of | |||
theorbtwo | r0nny: I couldn't make sense of that sentance. | 14:58 | |
r0nny | actualy bad-spam-technology does huge dammage | ||
i dont see why there should be low penalty on this | |||
theorbtwo | Because it's a fairly minor offese. | 15:00 | |
r0nny | they wont stop if there is low penalty | 15:01 | |
btw - Juerd i rechecked the definition of spam - selective adversting could be usefull for the customer doesnt count as spam | 15:02 | ||
theorbtwo | r0nny: Whose definition? | ||
r0: They'll stop if there's a fairly low penalty, and that penalty is more commonly assessed. | 15:03 | ||
r0nny | theorbtwo: the one on wikipedia | ||
theorbtwo: a low penalty per spam mail is ok - as long, as it adds up - and since the amount is high, the resulting penalty will be, too | 15:04 | ||
theorbtwo | WP is fairly clear that different people define it differently. | ||
Read the whole first paragraph, not just the first sentance. | |||
The thing is that false advertising is illegal, dealing drugs is illegal, sending porn to minors is illegal. | 15:05 | ||
(Not only that, but those are all /criminal/ charges.) | |||
... hm, I shouldn't have parenthisized that -- it's an important point. | 15:06 | ||
r0nny | hmm | ||
theorbtwo | When you do any of those things, the State can charge you. | ||
The federal government fairly recently made sending email with false header information illegal. | 15:07 | ||
en.wikipedia.org/wiki/CAN-SPAM | |||
The problem is not that things aren't illegal. | 15:09 | ||
The problem is that law enforcement does things that they see as more important, and in many cases they are absolutely correct. | 15:10 | ||
I'd much rather have agents working kiddy-porn rings then spammers. | |||
OTOH, I'd rather have them tracking down major phishers then either. | |||
...but phishing is illegal by dint of it being fraud, far more imporant the fake email headers. | 15:11 | ||
wolverian | (in some countries, it's illegal to send advertising at all without prior acceptance from the customer, and that acceptance must be active, not passive ("default").) | 15:49 | |
Juerd | There should be penalties for sending duplicate mail with different message-id's :) | 16:20 | |
i.e. for sending mail and letting the MTA generate a message-id. | |||
theorbtwo | It's easy to set the penalty for that -- drop the message. | 16:22 | |
Juerd | It's expensive to test for it :) | ||
theorbtwo | (Or reject it -- do not bounce, ever.) | ||
Not on the reciving MTA it's not. | |||
Juerd | It means keeping records of previous messages. | ||
Which sucks. | 16:23 | ||
theorbtwo | If there's no message-id, drop. | ||
Juerd | There's usually a message-id generated by the sending MTA. | ||
It should be generated in the client, for identification of duplicate messages. | 16:24 | ||
theorbtwo | You could always md5+sha1 the body, and drop if it matches. You'll have minor problems with hash colissions, but shouldn't have too many. | 16:25 | |
theorbtwo wonders if there are any good hash algos of user-settable length. | |||
Juerd | sha-n | 16:28 | |
theorbtwo | D'oh. | 16:33 | |
svnbot6 | r7949 | autrijus++ | * luqui's \d[] patch eats the trailing space after the bracket; | ||
r7949 | autrijus++ | change "brackets" to "verbatimBrackets" to solve this. | |||
r7949 | autrijus++ | * moreover, fix the old bug of "&foo() &bar()" eating the | |||
r7949 | autrijus++ | whitespace inbetween, due to the same cause. | |||
r7949 | autrijus++ | * test for both in t/syntax/interpolation/strings.t | |||
Juerd | autrijus! :) | 16:34 | |
gaal | autrijus: ping | 17:23 | |
r0nny | re | 18:23 | |
19:42
bc is now known as venk
|
|||
venk | . | 19:46 | |
gaal | Parser.hs change in last patch | 19:57 | |
# rt.openfoundry.org/Foundry/Project/...;rev2=7949 | |||
shouldn't that say "verbatimBrackets" ? | |||
maybeVerbatimBrackets in Lexer.hs is unused. | |||
ah: no that refers to the old bug. | 20:00 | ||
Still, I'm wondering about maybeVerbatimBrackets; why is it there? | |||
svnbot6 | r7950 | gaal++ | when ({ closure }) { ... } - fix tests (they pass now) | 20:23 | |
r7950 | gaal++ | (following luqui's remark on the channel that this is the likely spelling.) | |||
liz6 | ?eval 1^..3 | 23:10 | |
23:10
evalbot_7947 is now known as evalbot_7950
|
|||
evalbot_7950 | (2, 3) | 23:10 | |
liz6 | ?eval 1..^3 | ||
evalbot_7950 | (1, 2) | ||
Juerd | ?eval 1^..^3 | 23:11 | |
evalbot_7950 | (2,) | ||
Juerd | ?eval 0^..^0 | ||
evalbot_7950 | pugs: Prelude.init: empty list | ||
theorbtwo | Anime operators! | ||
Juerd | ?eval 0^..^0; say "foo" | ||
evalbot_7950 | pugs: Prelude.init: empty list | ||
Juerd | Bug. | ||
liz6 | report! | 23:12 | |
;-) | |||
?eval 0..^0 | 23:13 | ||
evalbot_7950 | () | ||
theorbtwo | Create a test. | ||
liz6 | ? eval 0^..0 | ||
?eval 0^..0 | 23:14 | ||
evalbot_7950 | () | ||
liz6 | ?eval 7^..^7 | ||
evalbot_7950 | pugs: Prelude.init: empty list | ||
liz6 | not just for 0... | ||
?eval 7^..^8 | |||
evalbot_7950 | () | 23:15 | |
liz6 | ?eval 7^..^6 | ||
evalbot_7950 | pugs: Prelude.tail: empty list | ||
liz6 | ?eval 5..1 | ||
evalbot_7950 | () | ||
theorbtwo | Somehow, I fail to see the use of ^ed infix:<..>. | ||
liz6 was just going through S03 and noticed N^..^M for the first time | 23:17 | ||
Juerd | I knew it exists, but think it shouldn't. :) | 23:19 | |
theorbtwo: Re the report - will perhaps do later. | |||
liz6 | ?eval 5..1 | 23:20 | |
evalbot_7950 | () | ||
liz6 | isn't that supposed to generate (5,4,3,2,1) ? | ||
theorbtwo | ?eval 5..1:by(-1) | 23:21 | |
evalbot_7950 | Error: unexpected ":" expecting digit, "_", fraction, exponent, term postfix, operator, "does", "but", "is", "^..^", "cmp", "<=>", "^..", "..^", "..", postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Juerd | Though if you feel like copy/pasting for me: ok(eval "0^..^0; 1", "Empty list doesn't die"); | ||
liz6: Unfortunately, no. | |||
liz6: Larry still isn't convinced. | |||
theorbtwo | Anyway, that's supposed to do 5,4,3,2,1. | ||
liz6 | theorbtwo: yes, I remember from the talk at Euro OSCON now... | 23:22 | |
lookin ar S03, "=:=" is now "===", is that right? | 23:23 | ||
clkao | r7rl | ||
Juerd | liz6: Yes | ||
theorbtwo | I think iblech patched to that effect earlier today. | 23:24 | |
liz6 | ?eval $a := $b; if ($a =:= $b} say "yes" | ||
evalbot_7950 | Error: unexpected "i" expecting ";", statements or end of input reserved word | ||
liz6 | ?eval $a := $b; if ($a =:= $b) say "yes" | ||
evalbot_7950 | Error: unexpected "i" expecting ";", statements or end of input reserved word | ||
liz6 | ?eval $a := $b; if ($a =:= $b) {say "yes" } | ||
evalbot_7950 | Error: Undeclared variable: "$b" | ||
liz6 | ?eval $b = 1;$a := $b; if ($a =:= $b) {say "yes" } | 23:25 | |
evalbot_7950 | Error: Undeclared variable: "$b" | ||
xinming | ?eval $.a = 1; | ||
evalbot_7950 | Error: Undeclared variable: "$?SELF" | ||
liz6 | ?eval my $b = 1;my $a := $b; if ($a =:= $b) {say "yes" } | ||
evalbot_7950 | OUTPUT[yes ] bool::true | ||
liz6 | ?eval my $b = 1;my $a := $b; if ($a === $b) {say "yes" } | 23:26 | |
evalbot_7950 | OUTPUT[yes ] bool::true | ||
liz6 | hmmm... can both be right? | ||
luqui | in pugs === and =:= are the same thing | 23:28 | |
but they're not supposed to be | |||
liz6 | ah, ok | 23:29 |