Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
stevan putter: mm 2.0 is still in progress 00:13
but it is meant to be a simplified version of mm 1.0
and it expects a smaller set of "things" to "just be there" 00:14
gantrixx a submethod is just a method that doesn't get inherited? correct? 00:16
stevan gantrixx: yes, for the most part
it is best used for infastructural methods
gantrixx hmmm...then perhaps I've discovered an error
could I paste something for you? 00:17
putter back...
stevan sure
gantrixx: FWIW I think submethod is just an alias for method right now
gantrixx I think so too
stevan gantrixx: I doubt we will have proper submethods until the metamodel is in
pasteling "gantrixx" at 24.251.41.77 pasted "$kangaroo.move() should be undefined" (38 lines, 682B) at sial.org/pbot/12649 00:18
gantrixx it seems to inherit the submethod
so perhaps this isn't implemented yet
stevan gantrixx: yes, i think am pretty sure 'submethod' is just an alias for 'method' 00:19
gantrixx ok, I won't worry about it then
or should I notify someone of this?
putter fglock_: yes it does (seem to make sense). though I'm fuzzy brained just now.
stevan gantrixx: check in t/oo/ if you see tests which check this and are labeled :todo 00:20
if not, please write some tests :)
putter stevan: the mob cries out for a mm to bang on. actually, if the external api is stable, any mm will do...
stevan putter: I am planning on keeping the same external API 00:21
the class 'Foo' => { ... } stuff that is
it will basically be a "macro" layer over the mm 2.0
but that is just the p5 version 00:22
autrijus needs to make the haskell version work, my haskell skills are non-existant
putter ok... hmm... 00:24
bbiab 00:25
stevan putter: I started documenting the p6 facing API for the metamodel in the docs/ dir, but current $work.load() is keeping me away from finishing it 00:26
gantrixx I have a question about the $?VARS 01:00
stevan gantrixx: ask away
gantrixx how would you use $?SUBNAME
meaning which subname an I in 01:01
stevan gantrixx: the best place to look is in t/magicals actually
putter stevan: ok. thanks. 01:04
stevan putter: believe me, I would rather do Pugs than $work right now 01:05
putter ;)
fglock_ putter: what's going on? 01:06
putter has to obtain $work rsn
fglock_: err, laundry, about to grab some dinner, ... 01:07
It's been quiet.
fglock_ I'm planning to work on the 'Sub' object
putter awesome.
fglock_ and find out a way to call it from p5
gantrixx On thing that would be very helpful for debugging is if you had some way of printing out an objects attributes and methods and from where, if other than self, that they are inherited from 01:08
putter feel free to bypass ApiX if it's getting in your way.
stevan fglock_: I have some basic stuff in the metamodel 1.0 you might want to look at
fglock_: t/80_Code.t I think is the file
gantrixx is this something that I might find in a synopses, epock, or campfire folklore?
stevan gantrixx: hopefully someone will implement something like that. The Metamodel will make doing it fairly trivial actually 01:09
fglock_ sure - thanks
gantrixx - there is a 'meta' method, that offers a lot of methods like that
gantrixx please point me in the right direction 01:10
what is a meta method?
fglock_ things like $thing.meta.name - returns the object class name
stevan gantrixx: see "Introspection" in the Synopsis 12 for small glimpse
fglock_ stevan - is meta defined in the metamodel, or the runtime should supply it? 01:11
stevan fglock_: I was pondering this issue while walking my dog tonight actually :) 01:12
fglock_ has just walked the dog 01:13
stevan the MM 1.0 makes a mess of this actually, but originally just added a meta method to the base Object
however, in MM 2.0, we have merged MetaClass and Class into one
and my current thought process has been do something like this: 01:14
$FooClass->class_method()
$iFoo->instance_method()
$FooClass->META::meta_method()
$iFoo->META::meta_method()
META:: is a pseudo package like SUPER:: basically 01:15
but I am not sure of the soundness of that approach
putter originally read/thought stevan had just been talking with his dog about meta. also plausible, but somewhat odder... 01:16
stevan has a very smart dog, in fact he design the metamodel... shhh dont tell
fglock_ about using uppercase - is .fetch() supposed to be written .FETCH() (in Array,Scalar)? 01:17
stevan fglock_: I am not sure, I assume FETCH since that is what tie() used 01:18
fglock_ the original p6 syntax was $obj.meta.meta_method - changing it to $obj.META::meta_method() doesn't change things much 01:19
it sure makes sense
gantrixx is this $obj.meta.getmethods() stuff supposed to work now or is it on the todo list? 01:20
fglock_ Where are p6 subroutine names going to be stored? (and variable names) 01:21
gantrixx: I think the meta API was not implemented yet 01:22
stevan fglock_: meta.meta_method() can also just be a sugared form of META::meta_method() too 01:23
gantrixx: no .meta methods will work yet
fglock_ are you planning to support pads in MM2? for local classes, etc 01:24
stevan fglock_: I could, my current focus on mm2.0 is to just clean things up 01:25
leo__ stevan: you need a smart and good looking dog like archimedes: nonseum.at/verein/archi.jpg 01:26
stevan and make it (I hope) easier to integrate into the runtimes
stevan ponders a canine hack-a-thon :) 01:27
leo__ # we got 3
putter scholarly looking dog. :) 01:35
fglock_ stevan: you wrote everything already :)
stevan fglock_: but re-writes are so much fun ;)
putter a quick dinner. bbl & 01:36
stevan actually wrote about 8-9 different metamodel prototypes before the one which eventually became 1.0
leo__ putter: well, his name is Archimedes
putter_ leo__: lol # re Archimedes 02:31
was he so named as a pup, or more recently? 02:32
hmm, Bundle::Perl6 looks out of date... 02:36
fglock_ ping 03:06
svnbot6 r6404 | fglock++ | * perl5/ Code
r6404 | fglock++ | - refactored Code.pm from stevan's MetaModel t/80_Code.t
r6404 | fglock++ | - 'Code', 'Sub', 'MultiSub', 'Block' are now Perl6 classes
putter_ autrijus: re rt.openfoundry.org, fyi pugs/ pugs/browse/ and pugs/rss/ are all identical (and still back at 6384). I also got a "could not write to (directory?)" error page when I first loaded it. fyi. 03:09
autrijus fixed. 03:31
putter_ :)
putter_ is reading PIL2JS...
autrijus I hope you like the new foundry ui :)
putter_ nicely cleaner. more Tufte. but when urls go i18n, then I wont be able to determine what links do by looking at the url... ;) 03:33
autrijus :D 03:34
putter_ awww, its back to english. I was kind of enjoying the international flavor of the log being in chinese... 03:35
(there's just no pleasing some customers;) 03:38
fglock_ putter: ping 03:44
putter_ pong.
fglock_ I've got a Code class 03:45
it passes some tests already
putter_ (ust wondering how to do exceptional control flow if p5 code can call methods directly...) 03:46
nifty! :)
once it can do say(), it can be swapped into pil-run... :)
fglock_ multi subs should work soon - I'm slowly getting used to MM 03:47
putter_ so the named sub stuff is implementing a namespace? 03:48
oh, thats the test file. never mind. 03:49
svnbot6 r6405 | fglock++ | * perl5/ Code - passes a few tests
fglock_ I'm using stevan's idea of placing the names into a hash 03:50
there could be some kind of export control
there is the need to do name scopes too 03:51
putter_ could you walk me through it? you have a p5 sub say { print @_,"\n"; }. How does one create a Sub, and then call it?
hmm, can it do *@slurpyarray params? 03:53
fglock_ see t/code.t - that's almost plainly stevan's code, that I translated to p6-ish
putter_ ahh. 03:54
fglock_ you will - but the current code doesn't know about that yet
(that's 1h worth of coding)
the good news is that stevan's code was written with native data in mind - so it should play well with p5 data 03:56
putter_ !:)
fglock_ must sleep now & 04:00
putter_ me too. good night &
luqui too
putter_ ;)
luqui hello and good night
putter_ good night luqui. 04:01
fglock_ good night all
putter_ I'm tempted to try faking slurpyness in the PrimX, but I suspect <,> will break. perhaps wait for mm slurpies. 04:02
now I'm hungry. #slurpies.
good night fglock_.
fglock_: ? 04:15
ok 2 - The object isa Code
Can't call method "params" on an undefined value at lib/Perl6/Code.pm line 119.
end of day. good night all &
rmr hello everyone :-) 06:39
is there anyone in here??? 06:43
jql any*one* or anyone *helpful*?
rmr any one with a helping attitude :-) 06:44
Supaplex calls kill(getpid(),SIGSLEEP); 06:45
jql hah
jql has an attitude
rmr gud 06:46
xinming luqui: you there please? 09:22
luqui: There is a correction need to do to the Synopsis.
nothingmuch xinming: mail corrections to [email@hidden.address] as unified diff 09:47
xinming nothingmuch: Ok, thanks. 09:49
nothingmuch xinming: anyone can fix synopses, but unlike the pugs repo you need someone with commit access (@Larry, leo__, chip, pmichaud) to svn.perl.org 09:51
only they can apply
xinming nothingmuch: :-) But luqui seemed did the change to Synopsis. ;-) 09:54
nothingmuch xinming: luqui is a member of @Larry 09:55
pdcawley_ looks at some of the discussions of symbolic lookups and hopes that $::('string with spaces') is going to be as legal in Perl 6 as its equivalent is in Perl 6. And hopes further that Larry's right that $::('foo') will check both lexical and dynamic scopes. 10:01
nothingmuch $::('foo') should be just like $foo 10:02
so "me too"
pdcawley_ ?eval my $foo = 10; $::('foo')
evalbotzy \10
nothingmuch huraaaa
pdcawley_ ?eval my $foo = 10; $foo
evalbotzy \10
pdcawley_ Weird... isn't that a reference? 10:03
nothingmuch i'm not sure
pdcawley_ ?eval 10
evalbotzy 10
nothingmuch ?eval my $foo = 10; $foo.ref
evalbotzy ::Int
nothingmuch ?eval my $foo = 10; $foo + 5
evalbotzy 15
nothingmuch ?eval my $foo = 10; $::('foo') + 5
evalbotzy 15
pdcawley_ I rather think that's odd...
nothingmuch i'm guessing that pugs passes the container in case it's 'is rw'
pdcawley_ ?eval my $foo = 10; 5 + $foo
evalbotzy 15
nothingmuch and + binds the container's value to another container 10:04
and returns a value
pdcawley_ Anyone got a running pugs to check on?
nothingmuch in short '$foo' can mean either container or value
pdcawley_ I think you're probably right.
nothingmuch while '$foo + 5' is just value
so I wouldn't fret over it, but I can check (not at work though, later)
lhooq pdcawley_: I think it's just an evalbot issue 10:06
pdcawley_ Yeah. Sounds plausible. 10:07
lhooq pdcawley_: evalbot doesn't properly "print" the evaluated result. it sorts of "dump" it
pdcawley_ grins, "I don't need the details"
lhooq :-)
memo to self: don't try to be helpful unless someone cries "HELP!" 10:11
nothingmuch 10.perl 10:14
?eval 10.perl
evalbotzy '10'
nothingmuch ?eval my $foo; $foo.perl
evalbotzy '\\undef'
nothingmuch ?eval my $foo = 10; $foo.perl
evalbotzy '\\10'
nothingmuch that's what it does
evalbot simply calls .perl on a thing
and $foo.perl is a container, not a value
you can say 'my $foo = 10; my $str = $foo.perl; my $bar := eval $str; $bar + 5' 10:15
?eval my $foo = 10; my $str = $foo.perl; my $bar := eval $str; $bar + 5
evalbotzy 15
nothingmuch ?eval my $foo = 10; my $str = 10.perl; my $bar := eval $str; $bar + 5
evalbotzy 15
nothingmuch it behaves the same
but vice versa it won't work 10:16
not thaat I can describe it in perl because perl does away with such pointless details =)
essentially - a reference is something you can write to
$foo is a symbol that contains a reference that contains a value
10 is a value
$foo.perl dumps the reference and the value, 10.perl dumps the value
cleared up? 10:17
xinming {n,m} <n,m> # assert repeat count 10:21
so, will this still work?
<n, m>
QtPlatypus <n, m>
xinming {n, m} changed into **{'n', 'm'}
How about <n,m>?
Is it still working?
wolverian I thought it's **{n..m} now
Juerd It is n..m indeed now
wolverian Juerd, thanks. :) 10:22
Juerd x**{n,m} will actually mean [x**{n}|x**{m}]
wolverian that's logical.
Juerd (Stupid syntax!)
wolverian heh. :)
Juerd I really HATE **{}
I can live with **, I can live with {} 10:23
xinming Juerd: you should tell @larry. :-)
Juerd Not with a 4 character regex op.
xinming: I have.
Larry's very indifferent to what the community thinks whenever the community mostly agrees.
\d**5 should be easy to make work 10:24
xinming Juerd: well, You might believe that Larry has done right thing on perl 5? :-)
Juerd And then () for grouping and {} for closures is all fine by me.
xinming s/might/have to/
Juerd xinming: Not really
xinming: It works.
Perl 6 can be close to perfection but in some areas imperfection is chosen as the standard.
xinming Juerd: hmm, well, the truth must be proved. :-) 10:26
Juerd I, for one, am disgusted by some of the "you should avoid this, so we're making it very ugly" ideology
Yes, in TEXT, you should indeed try to avoid **{}, but in all those other strings, it's a very important feature that is used a lot. 10:27
xinming Juerd: well, I believe that @Larry thought more than us on perl 6 language design. ;-)
Juerd Don't think I'll write \d**{3} if Ican write \d\d\d
xinming: I believe that, but I think that that is no guarantee for success.
QtPlatypus Though it starts to become a factor with your dealing withs omething like **{20}
Juerd In fact, the more he thinks about things that were already set in stone before, the more the design suffers. 10:28
QtPlatypus Juerd: Your speeking like when I got my proposeal to have "eval" as an option to q
rejected
xinming Juerd: hmm, well, I hope he would think more...
Juerd: @Larry might cosidered that there might be some special case... 10:29
Juerd And then there are a few inconsistencies that I think are stupid to leave in.
xinming: Not really. 10:30
(By the way, what is this Larry is God thing? He's incredibly smart, but makes mistakes too.)
xinming Juerd: I don't think @Larry is God, But at least, He can do a much better design than we could. that's all. 10:31
Juerd Yes, the basis for the design is his strength 10:32
The fuckups are in details.
xinming ?eval "stirng".pos 10:33
evalbotzy Error: No compatible subroutine found: "&pos"
Juerd ?eval "abcdef".length
evalbotzy Error: No compatible subroutine found: "&length"
Juerd That's so gonna bite me
But length gone is in fact a very good idea :) 10:34
xinming ?eval "lsd;kjfsdfj".bytes; 10:35
evalbotzy 11
xinming :-)
QtPlatypus ?eval "\x{78}".bytes 10:38
evalbotzy 4
QtPlatypus ?eval "\x{78}".chars
evalbotzy 4
QtPlatypus ?eval "\x78".chars
evalbotzy 1
QtPlatypus ?eval "\x78".bytes
evalbotzy 1
QtPlatypus Bytes lies. 10:39
f0rth ?eval "喵".bytes 10:59
evalbotzy *** unexpected "(" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input at -e line 11, column 4
xinming ?eval "ä½ ".codes; 11:02
evalbotzy 1
xinming ?eval "ä½ ".bytes;
evalbotzy 1
xinming lies to us...
?eval "ä½ ".chars;
evalbotzy 1
xinming ?eval "你儽".chars;
evalbotzy 2 11:03
xinming ?eval "你儽".bytes;
evalbotzy 2
xinming It seems that utf-8 support for pugs isn't so well.
f0rth ?eval "ä½ ".bytes 11:04
evalbotzy 1
f0rth ?eval "ę±Ŗę±Ŗ".bytes
evalbotzy 2
QtPlatypus nods "Hopefully that will be fixxed when we have raw strings" 11:06
xinming by the way, Insn't there any function which will "open" a file? :-S 11:11
It seems that my $stream is from($fh); will slurp file into a scalar. and my @stream is from($fh) will slurp file into a @arry.
hmm, 11:12
might be worng.
vkon are there special reasons why pugs version at "feather.perl6.nl" now is 6378, and not 6405? 12:39
xinming vkon: Because that is not the default resiponsory for pugs. 12:40
vkon: try this. svn.openfoundry.org/pugs/ 12:41
maybe not the "official".
kolibrie vkon: I think Juerd was out-of-town for a bit
vkon ... a build is automated... but I think it could not be built for some reasons (make do not finishes cleanly?) 12:43
?eval say $?PUGS_VERSION
evalbotzy Perl6 User's Golfing System, version 6.2.9, August 3, 2005 (r6378) bool::true
vkon When I compiled last few times, there were error messages but executable was seemingly fine... anyone with similar experience? 12:44
xinming ?eval $?PUGS_VERSION 12:55
evalbotzy \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6378)'
evalpugs \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6405)'
xinming hmm...
vkon xinming: how did you do that? 12:57
xinming vkon: what? 12:58
vkon: Do mean mean the run th ebot?
vkon acme__: two different eval ... yes, run the bot? 12:59
xinming vkon: well, they are 2 different bot.
one is from me, and another is from someone else here.
vkon ?eval $?PUGS_VERSION 13:00
evalbotzy \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6378)'
scook0 ?eval say "Hello, vkon!"
evalbotzy Hello, vkon! bool::true
vkon but there was another one evalpugs... ok, nevermind...
ods15 ?eval 'a' 13:01
evalbotzy 'a'
xinming vkon: that's "my" bot. :-)
ods15 ?eval a
evalbotzy Error: No compatible subroutine found: "&a"
xinming ?eval "string".pos;
evalbotzy Error: No compatible subroutine found: "&pos"
ods15 ?eval "a"
evalbotzy 'a'
ods15 ?eval "$?PUGS_VERSION"
evalbotzy 'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6378)'
ods15 ?eval $?PUGS_VERSION 13:02
evalbotzy \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6378)'
ods15 that's a bug
xinming ?eval my $a =5; "$a".say;
evalbotzy 5 bool::true
nothingmuch hola ods15
ods15 i think
nothingmuch: is that a bug?
xinming Odin-: which one?
nothingmuch ods15: no
scook0 just a quirk of evalbot
ods15 why the different behavior
nothingmuch becase $?PUGS_VERSION is not a value, it's a variable
ods15 scook0: well a bug in evalbot is still a bug :)
nothingmuch scook0: i disagree 13:03
?eval my $foo = 10; $foo.perl
ods15 ?eval my $a = 'a'; $a
evalbotzy '\\10'
\'a'
nothingmuch ?eval my $foo = 10; ($foo).perl
evalbotzy '\\10'
nothingmuch ?eval my $foo = 10; ($foo + 0).perl
evalbotzy '10'
nothingmuch see the diff?
ods15 wtf is .perl ?
nothingmuch ods15: dump it as perl code
evalbot calls .perl on it's return value
ods15 ah
nothingmuch s/return value/reduced expression/;
since $?PUGS_VERSION is a container, it is dumped as a reference (a reference is the value that is a container) 13:04
ods15 and, ohhhhhhhhhhhh, that make's sense
\ as in back refernce
nothingmuch yep;
ods15 \ "string"
nothingmuch ?eval my $foo; \$foo;
evalbotzy \undef
nothingmuch ?eval my $foo; \$foo
evalbotzy \undef
ods15 as opposed to just "string" which is a value
nothingmuch uh, oops
yes
ods15 ok neat
nothingmuch see, '$foo' the expression may be bound to something else, as rw 13:05
?eval my $foo = 10; $bar := $foo; $bar = 1; ($foo + 0)
evalbotzy Error: Undeclared variable: "$bar"
nothingmuch ?eval my $foo = 10; my $bar := $foo; $bar = 1; ($foo + 0)
evalbotzy 1
nothingmuch ?eval my $foo = 10; my $bar := ($foo + 0); $bar = 1; ($foo + 0)
evalbotzy Error: Can't modify constant item: VInt 10
nothingmuch imagine that instead of '$bar := <expr>' i said '<expr>.perl' and it makes sense 13:06
ods15 whats := 13:07
nothingmuch ods15: runtime binding
ods15 like C++'s '&' ?
nothingmuch i doubt it
don't think in terms of pointers
ods15 no, not pointer
nothingmuch address of?
or a different &?
ods15 'int & a = b;' a and b are now the same variable
nothingmuch ahb
yes
xinming ods15: many things in perl are in different state...
nothingmuch i didn't know about that
ods15 nothingmuch: niether did i till i saw it... 13:08
QtPlatypus Like perl5's *foo = *bar
ods15 perl5 had '*' ??
nothingmuch ods15: := means 'assign the container to the symbol', while = means 'assign the value in the container to the container'
ods15 nothingmuch: yes i got it :)
nothingmuch there's also ::= which is compile time binding
which behaves more like a macro 13:09
ods15 difference?
nothingmuch my $bar ::= $foo; # from now on any instance of '$bar' can be compiled to a lookup for '$foo'
QtPlatypus ods15: Yes, it mean varable glob.
scook0 ::= would work for things that /have/ to be known at compile-time
ods15 as opposed?
scook0 (and presumably more efficient)
nothingmuch := is just an assignment on the container, instead of the value 13:10
ods15 ::= just sounds more limited (and faster?) version of :=
nothingmuch you can't use something that isn't known at compile time on the right side of ::=
ods15 yup
nothingmuch exactly... it's a safety feature
nothingmuch tries to figure out who the fuck is messing up his character encodings
ods15 speaking of which, how is perl5 with multilang crap 13:11
hey, nothingmuch, you're grey again! just noticed
nothingmuch ods15: every strings is implicitly unicode, unless the 'use bytes' pragma
ods15: i'm at work now
ods15 ah
perl6* i meant
nothingmuch perl 6 is much more spunky 13:12
a str is low level data (chars or bytes, or whatever)
a Str is several
you have characters, symbols, graphemes
and bytes
all accessible by stating your preference or explicitly saying which one you're using
the canonical representation is unicode
the internal representation doesn't matter
ods15 btw try not to make same mistake as hurd and other big stuff.. overdesigning and making something "perfect" only leads to it never being released or buggy 13:13
nothingmuch encodings can be converted when moving strings in and out of the process (into a handle, etc)
ods15: this has already been designed by the unicode folks
ods15 how well can i do low level crap with perl6?
nothingmuch all Perl 6 is giving is a portable API into unicode strings
my str $bytes;
ods15 i dunno, some kind of special ram access, sockets, write()'s, etc. 13:14
nothingmuch my int @array; # packed array, just like a C array but with bounds checking
special ram access - runtime dependant
sockets - you have system calls
but probably wrapped as abstracted handles
see also search.cpan.org/search?query=IO%3A%...&n=100
ods15 heh
nothingmuch mostly IO::Hanlde and it's deriviatives
system calls in perl 5 are structured around STDIO 13:15
where buffered write is 'write' and "real" write is called "syswrite", for example
doh
the only function this doesn't apply to is actually 'write'
don't use write, use 'print' 13:16
ods15 that's useless for low level stuff :)
nothingmuch but read, open, etc
ods15 (i.e., stuff with nuls)
nothingmuch no it isn't
perl is null safe
syswrite(STDOUT, "\0"); # works
ods15: assume makes an ass out of u and me
QtPlatypus BTW has anyone given any thoughts to my question about lazy IO conflicts? 13:17
nothingmuch QtPlatypus: dated when?
ods15 syswrite yes, and but you said to use 'print'
16:16:01 <nothingmuch> don't use write, use 'print'
16:16:14 <ods15> that's useless for low level stuff :)
nothingmuch print "\0"; # works
ods15 print "\0hello world"; prints what?
?eval say "\0hello world";
nothingmuch ā€¢ [syeeda:~] nothingmuch % perl -e 'print "\0hello"' | od -c
0000000 \0 h e l l o
ods15: evalbot has limited opcodes and prolly won't allow it 13:18
ods15 looks around for evalbot
heh
nothingmuch plus IRC is probably blocking it
ods15 heh what's up with your prompt
nothingmuch my prompt has a little round bullet char
which is red if $? is != 0
and green otherwise
it's the same char you get when you type into password boxes 13:19
ods15 why are there so many hex dumping tools on linux :)
1 is enough...
xxd, od, hexdump... heh
nothingmuch i only use od nowadays
od -x and od -c
mostly od -c
ods15 nothingmuch: heh i have a bit more
16:19) ods15@linux15:~ $ false
Error 1|16:19) ods15@linux15:~ $ true
16:19) ods15@linux15:~ $
nothingmuch ods15: same principal, only ansi colors 13:20
xinming what does <?ws> mean?
for rule...
nothingmuch xinming: IIRC noncapturing whitespace or something
ods15 ya mine actually says the number :) which sh btw
psh?
nothingmuch ods15: bash
ods15 ah
zsh rox
nothingmuch ods15: so i've heard 13:22
i'm interested in recursive globs
but "if it ain't broke don't fix it"
and my setup is far from broke
ods15 yeah i love it's tab completion.. what i like about tab completion is that i can learn a program while typing out it's command... 13:23
whats recursive globs?
nothingmuch in zsh you can say 'echo some_dir/**'
and it recurses all the children of some_dir
like find
ods15 ah those
well you can do that in bash too actually
ls /*/*
nothingmuch but not recursively? 13:24
ods15 zsh is kinda more interesting, you can do '/home//.kde<tab>' and it will fill in '/home/ods15'
16:24) ods15@linux15:~ $ echo mdf/**
mdf/DriveD mdf/Encoding Tools mdf/FlashFXP mdf/My Download Files mdf/kazaa mdf/mirc mdf/noise Folder mdf/oldhd mdf/shows
.. not at all recursive...
nothingmuch well, stuff like that is not worth the learning curve and the loss of the fact that i overcame the bash learning curve
oh, i thought it was really recursive 13:25
bummer
ods15 yeah i've never seen the need for that '//' feature
but i like other zsh features
i like that it shows me the options BELOW the line, not dump em and make a new prompt
nothingmuch in bash i fluently type for loops, nested backticks, pipelines, subshells and so forth without thinking... every time i'm on tcsh it takes me 3-4 tries for each complex command to realize why it's not working
so relearning something right now is not a good idea 13:26
xinming $_.pos = 0;
s:c{ (<?ident>) = (\N+) $$}{$1 => $2} for 1..4;
what does this do for sure? :-S
ods15 i like that i can do bla/<tab><tab> and it will just fill in the first option, VERY useful with hebrew filenames
xinming Synopsis doesn't cover the example in detail. T_T
nothingmuch <?ident> is "identifier", probably "\b.*?\b" or something like that
ods15 heh zsh is fully bash compliant
scook0 xinming: reading S05?
xinming scook0: yes 13:27
nothingmuch for the weird prompts and bash completion and all that too?
ods15 you can do ln -sf /bin/sh /bin/zsh , and end up with (slightly) faster ./configure scripts
nothingmuch no bourne shell, bourne again shell
ods15 zsh's prompt is completely different from bash's..
nothingmuch c'est un otre chose
ods15 PS1 is nothing like it, took me quite a while to redesign mine when i switched 13:28
nothingmuch $PS1 function callbacks and all that?
scook0 xinming: the important point is the `for 1..4`
nothingmuch see, that's what I don't want to go through right now
scook0 everything else is just details of the example
ods15 yes, but you talked about pipelines and for loops, they are identical in zsh
scook0 it's showing what the :x() modifier does
xinming scook0: I know that, for (1, 2, 3, 4) { }
scook0 xinming: It just means that the substitution happens four times 13:29
instead of one
xinming s:c{ (<?ident>) = (\N+) $$}{$1 => $2}
ods15 and yes i use em fluently too
nothingmuch Sogudi is soo nice... i have 's 05' aliased for synopsis 05, 'pd Moose' raise search.cpan.org/perldoc?Moose, 'cpan' do a regular search, wp for wikipedia, c2 for c2.com/wiki
ods15 i have a lot of aliases for 'common' stuff
nothingmuch ods15: csh vs. bash is apples vs. oranges
right now I have stuff working, and i'm used
ods15 dunno about csh, iirc it sucks 13:30
nothingmuch zsh is like an orange with slightly more flavour, i guess
xinming scook0: hmm, So, could you please give me an exampel?
ods15 zsh is exatly the same regarding those piplines :)
nothingmuch csh does suck, it sucks major ass
ods15: right, but the small difference is not worth it
because most of what I do already works
ods15 L for '|less', G is for '|grep', P is for '|perl -pe' :)
nothingmuch my env is "good enough"
ods15 W is for '|wc -l'
nothingmuch i don't work like that... i type fast enough that things get "programmed"
ods15 so i can type nice stuff like 'ls W' :) 13:31
i don't type that fast, and i like it cause it's kind of easier to read
nothingmuch i would just as well do 'ls | wc -l
ods15 reaching for | is annoying
nothingmuch fairynuff
scook0 xinming: (my $str = 'xxxx') ~~ s/x/y; # yxxx
xinming: (my $str = 'xxxx') ~~ s:x(3)/x/y; # yyyx
ods15 i basically have A LOT of aliases..
nothingmuch envisions a *nix keyboard where there are two space bar like keys, and one is |
ods15 16:31) ods15@linux15:~ $ alias W
53
nothingmuch i've got 8 by that measure 13:32
lhooq scook0: s/x/y/
nothingmuch all are very big
ods15 a lot of em are mplayer related
scook0 lhooq: aye, typo
ods15 i have about 8 different aliases for running mplayer is different ways
nothingmuch for example grep with a bunch of --excludes, gnucash launches an x server, 'cvg' is
ods15 (full screen in framebuffer, not full screen in framebuffer, in X, using vidix, etc.)
xinming scook0: Oh, thanks. :-) 13:33
nothingmuch prove with Devel::Cover and open to browser
QtPlatypus July 30 subject: Lazyness and IO groups.google.com.au/group/perl.per...hl=en&
scook0 xinming: I think you got distracted by all the other crazy stuff :)
nothingmuch ods15: what's the diff between vidix and xv?
lhooq scook0: shouldn't s:x(3)/x/y/ return "xxyx"?
nothingmuch QtPlatypus: the main solution that I see @Larry have come up with is "*shrug*" so far
ods15 vidix is direct connection to hardware, hence being hardware specific and needing root privledges (or a special patch to the kernel) 13:34
nothingmuch nothing substantial
ods15 Xv is Xvideo extention to X...
scook0 lhooq: that would be s:nth(3)/x/y/
lhooq scook0: right, thankyou
ods15 you can even use Xv over network (i've done it...)
nothingmuch ods15: vidix ~~ dri but for 2d?
scook0 (or s:3rd/x/y/)
ods15 not sure what dri is
QtPlatypus nothingmuch: Oh dea.
dear
scook0 (or even s:3nd/x/y/) :)
nothingmuch QtPlatypus: IMHO laziness should be explicit, but then again my humble opinion is always warnocked
'=' is hufffmanized enough for laziness 13:35
annything 'is pure' can be auto lazified
lhooq scook0: but not s:3th/x/y/ :-)
QtPlatypus IO is inherently unlazy.
scook0 lhooq: that would work too
nothingmuch and any place where there is affinity between left and right side, WRT laziness (both sides want laziness) it is taken
ods15 if your X's XV is working, vidix will be marginally faster if at all (it has the tiny advantage of not going through TCP and X's API. but that's it)
QtPlatypus IO is inherently inpure I mean.
nothingmuch as for your post, i'd expect only the first article to be read 13:36
lhooq scook0: so 'nd', 'th' and 'rd' are completely interchangeable?
ods15 but, vidix's beauty is that it works even when not in X :) as in, even from VGA console!
nothingmuch but the rest is read later
ods15: ah, that's good to know
scook0 lhooq: right, the idea is so that non-english speakers don't have to be pedantic
lhooq scook0: I thought only 'nd' was allowed on any number
nothingmuch i used to use the vesa output driver, but it was clunky
scook0 lhooq: oh, maybe
(could be) 13:37
ods15 you quality will not be amazing though :( vidix looks AMAZING on fbdev though
xinming scook0: I am not distracted... But Just a bit confusing... :-) however, I will go on. ;-)
ods15 you might want to retry vesa, it's been completely seperated now and is now an extrnal lib and tools
nothingmuch QtPlatypus: what you should do for that example is instead of lazily reading $news, say '**<$news>' for now
or '<$news>' without it
and drop the for
ods15 (in cvs just like a few days ago, see mplayerhq.hu news)
scook0 lhooq: S05 implies that they are interchangeable
lhooq scook0: yes, just seen 13:38
nothingmuch my @artical <== grep { True .. /^.$/ } <$news>; # currently lazy
my @artical <== grep { True .. /^.$/ } **<$news>; # currently strict
my @artical <== grep { True .. /^.$/ } =<$news>; # explicitly lazy
** is explicitly, btw
scook0 goes to get some sleep
nothingmuch ods15: no reason to nowadays
ods15 btw - that's MY monitor - mplayerhq.hu/homepage/images/shot-cvidix-02.jpg
nothingmuch i've laptop screen is much better than TV
and widescreen too
ods15 that's vidix on framebuffer, coolest/pretiest thing i've ever seen
QtPlatypus nothingmuch: When you said "strict" you mean "eager"? 13:39
ods15 ah, yes, your laptop is awesom.. what do you use, xv or some native macos thing?
nothingmuch QtPlatypus: yes, they're the same
QtPlatypus Great
ods15 quartz, that was it
nothingmuch ods15: 'quartz' is the mplayer default output, which gets sent to what they call 'quartz extreme'
which is basicsally "the windowing system compiled for your GPU"
ods15 they = mac?
nothingmuch yeah
ods15 heh 13:40
nothingmuch ars technica had a nice article, let me find it
arstechnica.com/reviews/os/macosx-10.4.ars/14
ods15 does xv work on mac?
it should if mac is X compliant... (it is, right?) 13:41
nothingmuch ods15: there is an X11 server shipped
it is on top of quartz
but it doesn't have xv
not that I care
ods15 oh
nothingmuch you can run X11 separately
ods15 you mean, the native screen is not X?
nothingmuch and then it might support XV, i have no idea (look at GNU darwin)
no, it's something completely different
it's a vector based system
based on a subset of PDF
ods15 lol 13:42
gnu darwin?
isnt darwin the (propiatery) mac kernel?
nothingmuch no
darwin is opensource
the kernel is freebsd + mach + some other stuff
MacOSX is darwin + propietry drivers + windowing system, libraries, UI, and bundled software 13:43
ods15 only the ui is closeD?
nothingmuch gnu darwin uses X11 (i guess, never used it)
yep
ods15 mac os x is freebsd style?
whats darwin?
nothingmuch darwin is: NextSTEP userland (gnu + bsd, leaning towards GNU)
with the XNU kernel which is mostly a port of freebsd for POSIX stuff
and mach microkernel for hardware stuff and IPC 13:44
ods15 i thought darwin was the mac kernel...
nothingmuch no, darwin is the opensource operating system that macosx is built on top of
ods15 oh. close enough.
coreutils etc.?
nothingmuch not really
kernel = %3 of code, maybe 13:45
=P
developer.apple.com/darwin/
think of darwin as 'GNU/Linux' 13:46
and of xnu (the darwin kernel) as linux
and of MacOSX as 'GNU/Linux/KDE'
or something like that
ods15 ah
nothingmuch only closed source
(the KDE part)
ods15 so, umm, darwin exists regardless of macosx? 13:47
nothingmuch yes
every osx isa darwin
but not the other way
there's also some more opensource stuff: safari, the osx browser is based on KDE's KHTML engine
ods15 mac has been using gnu darwin for while now? 13:48
nothingmuch the quicktime streaming server is available for darwin, if i recall correctly
svnbot6 r6406 | fglock++ | * perl5/ Code - pass all tests
nothingmuch no, apple develops darwin
ods15 isn't khtml lgpl?
nothingmuch gnu darwin is a distribution of darwin, with linux-ish semantics (x11, kde, etc)
i don't know, it might be
but apple's webkit/safari are opensource
QtPlatypus ods15: Darwin is under the BSD licence iirc.
nothingmuch and they contribute back to KHTML (mostly speed improvements)
ods15 ah, when you want the open part of mac on your system... is it portable (cpu-wise)?
nothingmuch ods15: yes, it runs on x86 and ppc 13:49
ods15 khtml is lgpl i'm pretty sure, how can mac be using it then
oh, i just noticed what you said, more open source stuff
nothingmuch it's even designed for portability... Mach-O (the moral equiv of ELF) supports multi arch binaries
lgp is permissive
lgpl
you can use lgpl code in propietry code, you simply can't claim it's yours 13:50
you can link to it and whatnot
ods15 not so permissive that you can take it and close it :) i thought that's what you meant...
btw, i realized something weird.. can you take a gpl library, make a lgpl "library" which is nothing but a ton of function call wrappers, and then make a closed source program that links against that against that? 13:51
nothingmuch on the server front, OSX server has lots of opensource stuff with a propietry mangament gui... ldap, samba, bind, postfix, cyrus imap
ods15: no, you're not allowed to link GPL code with closed code
ods15 heh 13:52
mac just about is the best of both worlds, it's funny that regarding popularity, they are actually LOOSING in both worlds...
probably cause of over expensive
nothingmuch ods15: not so... OSX is the most deployed UNIX platform in the world =) 13:53
ods15 really?
nothingmuch it is not growing as fast as linux nowadays though
yup, more than all of them combined
israel is not representative
ods15 i think linux is more popular.. including servers that is?
nothingmuch but given the fact taht since OSX came out apple has quadrupled it's market share or so...
ods15: no 13:54
ods15: osx + osx server is more than the sum of all linux workstations, pcs, laptops, servers, hpux, aix, sun, etc
but that's not saying much... windows is more than those combined too
ods15 hehe
no seriously, in servers and such, macosx is more popular than linux?
i find that odd 13:55
nothingmuch anyway, if linux distros ever get as "just working" as OSX i'll switch without losing a breath
no, osx server is not more popular than linux servers
ods15 i thought linux is 2nd place regarding servers
nothingmuch but osx PCs are muich more than linux servers and PCs
ods15 oh.. that kinda makes sense
nothingmuch osx server is a lan type thingy, like a windows PDC
there's no real advantage in using it for a webserver, or something like that
ods15 it's REALLY sad that windows is 1st place regarding SERVERS
nothingmuch but as a file/directory server it's pretty decent 13:56
ods15: well, the battle is doomed for microsoft
ods15 ?
nothingmuch because whether or not they're winning right now, linux is getting better and cheaper
at a constant rate
and at some point enough effort will be invested, and this effort isn't lost very easily
ods15 you obviously haven't seen what's going on in israeli uni's and army :(
nothingmuch that's not my argument 13:57
in the next 30 years microsoft will write and trash N OSs
linux based OSs will write and trash M > N os distributions
ods15 everyone i know here won't touch linux with a 2km pole
nothingmuch but linux based ones will have much more to copy and steal from
and eventually enough good code will be preserved that you have things that are stable, fast, and just work 13:58
because it doesn't cost anything to steal this knowlege
interest *is* mounting and there are more and more developers
ods15 i think i have an ear infection :(
QtPlatypus nothingmuch: But it does cost to steal the code.
ods15 nothingmuch: btw, regarding last statement, just bout all developers i know are "in love" with C# 13:59
nothingmuch QtPlatypus: it costs O(1) to steal the code, in programmer time
it costs O(N) to steal the code when you pay licensing fees
and I don't mean for the developers, I mean for the developers and the community
linux's price/benefit ratio is getting better, microsoft one's may, but it'll have to stop improving at some point, or they will go bankrupt 14:00
brb
ods15 heh
cya
nothingmuch back 14:01
anyway, my point is - linux will not get worse 14:02
ods15 fast
nothingmuch if it does it'll be forked (xfree anyone?)
where it is 'linux the kernel', or 'distro x'
look at what ubuntu did to debian in terms of idiot usability
all the knowlege they acquired is open and accessible 14:03
ods15 i've actually seen quite a few aspects where linux is getting worse, not better :( can't think of any off top of my head
nothingmuch gentoo can steal their fixes
but not what they did wrong
and vice versa
ods15 forking is part of the problem
nothingmuch microsoft doesn't have that because there is a schism between the customer and the programmer
ods15 the developer has to deal with so much crap regarding portability it's insane
nothingmuch ods15: don't think over a 5 year scale
ods15 its driving developers away
nothingmuch i'm talking about 20-30 years from now 14:04
ods15 hmm
hard to think that far
nothingmuch i claim that linux has the ability to progress faster than microsoft, and to accelerate this progression faster than microsoft
and that opensource in general is more scalable
on a world wide basis
QtPlatypus nothingmuch: Appart from emacs, and BSD has there been any majour projects that have forked?
ods15 by then all earth could be blown to bits by some atomic rocket :P
nothingmuch QtPlatypus: xfree/xorg forked for licensing issues 14:05
ods15 QtPlatypus: X
nothingmuch ubuntu span off debian
ods15 mplayer-mplayerxp, though it's not that big :P
nothingmuch gentoo "forked" the other distros but started over again
but they all have the same packages and usability, just slightly different
knowlege about what is the right and best thing is accumilating, even if no one can really say what it is
CaptainMorgan what's better, perl or php ? and what is perl, specificly, used for? 14:06
nothingmuch CaptainMorgan: perl is better for everything than any other language in the world
and it's used to make sushi
ods15 he he he
COFFEE you fool
nothingmuch by automating the sushi maker peripheral
CaptainMorgan I can't grasp php, in the limited time I have.. and no one in its channel is caring :)
ods15 slaps nothingmuch over the head
"you sound like a damn fool when you say it wrong!"
CaptainMorgan damn, thought it was used to make rum
nothingmuch CaptainMorgan: you can't learn a programming language in the time that it takes to get a response on a channel 14:07
what's your real dillema?
ods15: coffee is trivial to make
sushi, OTOH has mary varieties, and is quite a task
ods15 tell that to proffessional coffee makers
QtPlatypus CaptainMorgan: You most likely wish to ask in the #perl channel. #perl6 is a totally unrelated thing.
ods15 ones that make an art out of it
nothingmuch ods15: tell that to professional sushi chefs
" " 14:08
CaptainMorgan i need a page done before school in sept. probably the only page that that'll ever give me the mos trouble, feeback. I have 98% of it done, validation is where Im hurting
ods15 btw, name that quote
nothingmuch ods15: Dave
ods15 you really otta know it
CaptainMorgan everything works and functions smoothly, except validation
ods15 was that his name? damn i can't even remember
no, it wasn't dave...
nothingmuch CaptainMorgan: well, in that case you ought to reinsall "validation"
ods15: i didn't say it was, i said it is
i named the quote dave 14:09
CaptainMorgan resintall?
nothingmuch CaptainMorgan: i'm not serious
CaptainMorgan :)
nothingmuch you have to give us more info than that
ods15 nothingmuch: lol
17:06:50 <ods15> "you sound like a damn fool when you say it wrong!" - where is this quote from
17:06:42 * ods15 slaps nothingmuch over the head
including that part
nothingmuch i don't know
ods15 bah, shame on you
BIFF!
nothingmuch biff? 14:10
whihch biff?
ods15 the old one, slapping the young one
from bttf
CaptainMorgan Id like to know, aftering hitting submt after leaving the fields blank, does he make the error highlighting work: jeffhowden.com/code/css/forms/
nothingmuch CaptainMorgan: please describe: a. what you want to get, b. what you have, c. how you want to get there
QtPlatypus nods to nothingmuch "Point taken"
ods15 "so why don't you make like a tree, and get out of here" *slap* "'leave' you idiot! make like a tree, and 'leave'! you sound like a damn fool when you say it wrong"
CaptainMorgan i wish for a similar highlighting error effect 14:11
nothingmuch CaptainMorgan: by making a <div> and writing an <img> in there
and styling it
but it has nothing to do with either perl or php
CaptainMorgan k, i realize im not givin enough enough
info
nothingmuch ods15: bttf?
ods15 yes!
nothingmuch what is bttf?
ods15 you obviously don't know your movie/tv basics :( 14:12
back to the future
CaptainMorgan one page, for html, and php. then I source to another php for the form action
nothingmuch ah, i've never seen it
CaptainMorgan: that is not saying much more than how your files are organized
CaptainMorgan layout and highlighting is all designed, it's gettiting to fucntion
nothingmuch i need to know:
what is the data
ods15 shame on you
nothingmuch what is the structure
what is the flow of logic
what decisions your php is making
QtPlatypus CaptainMorgan: I strongly suggest that you ask in a PHP or a web authoring channal.
nothingmuch then I can helpl you
CaptainMorgan QT: for days now 14:13
nothingmuch CaptainMorgan: you need to post some code which isn't working, or describe exactly what you have and ask us how we would transform it (e.g., ask for advice)
QtPlatypus CaptainMorgan: Then perhaps your not asking the right questions.
CaptainMorgan Ive tried rearranging everything about the logic... put the validation at the top, the middle, bottom, split.
nothingmuch but not "how do i do this?"
because all we can say is "like that"
CaptainMorgan: that's nonsensical
xinming hmm, ^^ $$ and ^ $ a bit confusing, any example?
nothingmuch data goes in
it gets verified 14:14
html goes out
CaptainMorgan understood, but where do you want me to post code?
it's a big chunk
nothingmuch CaptainMorgan: i don't want you to post your code right now, it won't help
for future reference:
perlbot: nopaste?
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
CaptainMorgan perbot!!!
nothingmuch CaptainMorgan: do you grasp the way data moves around the application?
CaptainMorgan sure
nothingmuch the html form describes to the browser how to display things 14:15
CaptainMorgan yep
xinming "xyz\nabcdefg\nabc" will the /^^.+/ match the full string? including \n?
nothingmuch the submit button makes the browser send the data over to where the form told it to send it
the php script runs
the data is looked at
and decisions about the data are made
after which there is output
CaptainMorgan hold up, ill get the code.. perlbot, don't know where that page has been for the last week.. thank you
nothingmuch and the html you print out is what the browser will show the user 14:16
CaptainMorgan understand all that nm.. albeit, not proficiently, but alright
nothingmuch validation has nothing to do with the way the form is displayed
but if you validate the data
and then based on the results of the validatioon print HTML for the situation
for example, on failure, HTML that says "pleas re-enter your password" when the validation failed because there was no passworod, is logical
validation on the top, bottom, or split across the file, magically adding HTML that makes things colorful and snazzy is not logical 14:17
pasteling "CaptainMorgan" at 68.170.154.214 pasted "//Validation Code // Create an" (27 lines, 1.2K) at sial.org/pbot/12660
CaptainMorgan awesome..
nothingmuch CaptainMorgan: wherever you copied that from, it doesn't matter
what you need to understand is what do you have before this chunk of code runs 14:18
and what you expect to have after this chunk of code runs
do you know *exactly* what those will be?
CaptainMorgan where it says insert processing code here
nothingmuch no
CaptainMorgan yea, before it - everything runs smoothly, and I understand it
i wrote it
nothingmuch CaptainMorgan: okay, so explain what is before it 14:19
and explain what you want to get out of it
xinming hmm, anyone here would explain ^^ $$ and ^ $ for me please? :-S 14:21
CaptainMorgan well, at the very top is variable setting. then, i have a few functions.. some of which call to the above variables. This page is sourced from the main form page. I used if and else, switch for radio button and email processing.. now, Ive tried splitting up this code that I pasted is so many ways around the main code so many times Ive lost count
nothingmuch xinming: ^ means "begining of string"
$ means "end of string"
^^ means "begining of line"
xinming nothingmuch: Ok, clear enough... ;-) 14:22
nothingmuch as opposed to perl 5, where "^" meant begining of line, except when you used the /s switch, when it meant begining of string
kgftr|konobi \A and \Z were the perl5 equivalents
PerlJam nothingmuch: "meant"? Already referring to perl5 in the past tense? ;-)
xinming nothingmuch: I know what does /s and /m do, But as I read Synopsis, It sometimes refer to string and sometimes refer the line...
nothingmuch PerlJam: heh... sorry =)
\a and \Z, no? 14:23
or \A and \z
xinming ^^ and $$ match line beginnings and endings. (The /m modifier is gone.) They are both zero-width assertions. $$ matches before any \n (logical newline), and also at the end of the string if the final character was not a \n. ^^ always matches the beginning of the string and after any \n that is not the final character in the string.
PerlJam nothingmuch: \A and \z match at the beginning and end of string respectively in perl5
nothingmuch what's the lowercase then?
kgftr|konobi one will include newline, the other won't
nothingmuch \A Match only at beginning of string 14:24
\Z Match only at end of string, or before newline at the end
\z Match only at end of string
right
PerlJam \a ? That's the bell (alarm)
nothingmuch ^ = \A
$ = \z
xinming that's what I confused about...
nothingmuch ^^ = ^ without /s
$$ = $ without /s
kgftr|konobi nothingmuch: not in m!!gms mode
Juerd In Perl 5, $ is \Z, not \z
kgftr|konobi in perl 5 $ is $ 14:25
*slap*
PerlJam heh
nothingmuch isn't \Z like /$/m ?
kgftr|konobi yup
Juerd No, /$/ without /m is like /\Z/ with or without /m
nothingmuch okay, so is perl 6's $ is not /$/s or not?
ah
kgftr|konobi but $ in perl5 always refers to line NOT string
Juerd Perl 6's $ is Perl 5's \z
nothingmuch almost always uses /s because it's too confusing 14:26
Juerd kgftr|konobi: Depends on whose explanation you use. If you use mine, then yes. But Damian disagrees.
nothingmuch CaptainMorgan: do you understand what needs to happen for it to work, and what the validation code is doing?
Juerd nothingmuch: /s does absolutely nothing to anchors.
nothingmuch: /s only makes . include \n
nothingmuch Juerd: right
kgftr|konobi i had a lovely regex with lookahead, negative lookahead, positive lookbehind and /gms all rolled in one recently 14:27
nothingmuch in which case ^.*$ means 'the whole string'
Juerd nothingmuch: Only because * is greedy.
kgftr|konobi well.. /m changes the anchors
pasteling "nothingmuch" at 212.143.92.226 pasted "/m vs /s" (5 lines, 197B) at sial.org/pbot/12663 14:28
nothingmuch i think you're wrong, Juerd 14:29
but not completely wrong
Juerd I'm right.
nothingmuch because $ is not \z
then I'm misunderstanding
howcome the first one doesn't match 'foo'?
i'm using .*? not .* 14:30
CaptainMorgan validation is taking given values and testing them against already set values to determine elibility? and notfiying and preventing some typos, or attempts
Juerd Because it needs (?=\n)?\z
eh
nothingmuch CaptainMorgan: what do you make of the notification?
Juerd Because it needs (?=\n?\z)
Which is what $ is, if there is no /m
nothingmuch oh, okayh 14:31
i see...
in that case /s sanifies . for me
CaptainMorgan sorry, notification?
nothingmuch so that I can use $ like I mean
which is chomping \z
Juerd Just don't for a second think that /s does anything to $.
nothingmuch CaptainMorgan: you used that verb, "... and notifying..."
CaptainMorgan is there a bot for other channels too?
nothingmuch Juerd: thanks
Juerd It's the greediness of * combined with the \n matching of . that does what you want.
CaptainMorgan well, allerting the user to mistakes 14:32
PerlJam Juerd: /s was mnemonically a poor choice (as was the description of "treat RE as a single line")
nothingmuch CaptainMorgan: yes, how does it do that?
Juerd PerlJam: Agreed.
nothingmuch PerlJam: yeah, i think that's where my feeling came from
either way, i almost never use /m
kgftr|konobi $foo = "foo\nnoo\nboo\nloo"; $foo =~ s/^o(?!\z)$/e/gms;
nothingmuch and I always feared that // is a bit like //m
and I guess that was moot 14:33
Juerd nothingmuch: Perhaps strengthened by that // is m// :)
CaptainMorgan direction, an what I stated above - testing. but after it's done, it stays along a set path, whichever written
Juerd Not m//m though
nothingmuch Juerd no
the fact that '$' did not match end of strings sometimes when used in conjunction with .
feroz Hello
Juerd In any case, /s is not in any way related to /m
nothingmuch that made me use it in a cargo cultish way
use /s
14:34 autark is now known as jp-autark
Juerd nothingmuch: Why did you live with this fear? There's more than enough documentation available that explains these simple thruths 14:34
nothingmuch it made me think that since . is not matching \n, it's only logical that $ will match
Juerd truths
nothingmuch Juerd: i read that early on in my perl life
and i only realized now that I was wrong
and it didn't stop me =)
because almost always I mean //s, or there's no \n in the string
and if I use //m, then I know what it's doing 14:35
PerlJam nothingmuch: There is a reason that . matches *anything* in perl6 :-)
Juerd I particularly like the /^$/ test because it saves me a chomp. This is bad laziness.
PerlJam I sometimes wish that perl5 had gone that route too
Juerd PerlJam: In Perl 5 terms, Perl 6 always has /sx
I like \N
It's so universally correct that it's almost wrong again :) 14:36
PerlJam the consistency between \x and \X as anti-\x is great though
nothingmuch HTML::Element is silly 14:49
it escapes the xml, without knowing the target encoding
which causes great breakge and misery
feroz Hmm, needed some help 14:51
How would you execute two non-interupt able code at the same time on a perl script? 14:52
nothingmuch feroz: which version of perl? 14:55
svnbot6 r6407 | fglock++ | * perl5/ Code - created hooks for signature type-checking
nothingmuch what do you mean by non interruptable?
feroz perl5
Hmm first is a function listenin to a socket
nothingmuch $SIG{$_} = "IGNORE" for qw/HUP ALRM INT/; if (fork) { process one } { process two } 14:56
feroz second is a timer
nothingmuch sounds like a job for four argument select()
and sounds like a question for #perl, not #perl6
feroz Oops, sorry 14:57
Thx again nothingmuch. 15:07
nothingmuch feroz: sure thing
feroz: you can also use threads, but that will likely have disappointing results
Juerd 16:50 < nothingmuch> HTML::Element is silly
nothingmuch or if the socket and the recurring sub don't have to happen in the same process, you can fork
Juerd nothingmuch: All such modules were designed without the encoding/charset awareness that we have today
nothingmuch and have one process read, and the other process sleep
Juerd nothingmuch: Let's hope Perl 6 can change all this in a somewhat uniform way 15:08
nothingmuch Juerd: the problem is that it's 50%/50% - it makes an attempt to handle charsets, but it does it wrong
*HTML::Element::_xml_escape = sub { }; # did the trick
so no sweat
anybody got a quick snippet to escape all vertical whitespace into \n and such? 15:09
Juerd can't parse it 15:11
nothingmuch i'm printing strings to a log
and I want to make sure they're sanified
escaping delimiters, and newlines, I guess 15:12
Juerd Needs it be fully human readable?
nothingmuch yes
Juerd Needs it be one line?
nothingmuch yes
Juerd Consider quoted printable 15:13
nothingmuch String::Escape seems useful
but the documentation is a bit ambiguous
i guess I should just try it =) 15:14
Juerd And file a bug report
nothingmuch a bug report? what for?
String::Escape::qprintable is good 15:15
thanks for the magic phrase, Juerd 15:16
Juerd A bug report for the ambiguous documentation
svnbot6 r6408 | fglock++ | * perl5/ Code
r6408 | fglock++ | - Param 'type' is a closure, allowing the use of 'subtype'
r6408 | fglock++ | - New methods: .arity, .name
Juerd Which magic?
nothingmuch ah 15:17
the string "quoted printable"
Juerd I see
Stuff like that a programmer should just know :)
nothingmuch as for the bug report - i think it's nitpicking, it's mostly because i'm unfamiliar with the vocab
Juerd You're experienced with Perl. If you don't understand documentation, the documentation must be wrong. 15:18
nothingmuch and the fact that it's hard to document that stuff unambiguously
Juerd It's also hard to write bug free code
nothingmuch Juerd: have a quick look at the docs, if you think they are unclear, i will make a patch
Juerd But does that refrain you from reporting bugs?
I don't have the time atm
nothingmuch well, I don't like submitting bugs that are just complaints, if I can fix them 15:19
so if i'll submit a bug for this, i'll submit a docpatch too
Juerd And I'm from before the patches-welcome era
nothingmuch but I don't know if one is really in order
Juerd I don't feel sorry for sending patchless reports, and don't think others should 15:20
In fact, I have yet to accept any patch unmodified myself.
nothingmuch ride is leaving, ciao
Juerd Bye
nothingmuch thanks again!
Juerd Yw 15:21
xinming It's just plain cool, that's why. Oh, and Perl 6 then magically 15:29
runs inside every vaguely recent web browser.
anyone here can tell me what does this mean? 15:30
will perl 6 be converted into JavaScript? :-S
luqui xinming, yes
Juerd Yes, PIL2JS works so well that Parrot won't be used :)
xinming luqui: hmm, do you mean the source code? 15:31
luqui no, Perl 6 will be *compiled* to javascript
just as you can compile Perl 5 to bytecode
javascript is just a very funny looking bytecode :-)
xinming luqui: hmm, But I ever thought, Java and JavaScript is quite different thing 15:32
luqui yes they are
who ever said anything about java?
look at PIL2JS in the pugs rep
repository
luqui is off to school 15:33
luqui &
xinming `/ <before pattern> / # was /(?=pattern)/` What does this mean please? 16:03
found in S05
hmm, I found the answer. :-) 16:05
svnbot6 r6409 | fglock++ | * perl5/ Code 17:08
r6409 | fglock++ | - refactored internal classes
r6409 | fglock++ | - Added 'default' parameter hook
r6409 | fglock++ | - Added required/optional parameters
xinming ?eval ?100
evalbotzy bool::true
xinming ?eval +100
evalbotzy 100
xinming ?eval my $t = 100; $t ~~ m,100,; 17:09
evalbotzy pugs: src/events.c:270: init_events_first: Assertion `rc == 0' failed.
xinming ?eval my $t = 100; $t ~~ m/100/
evalbotzy pugs: src/events.c:270: init_events_first: Assertion `rc == 0' failed.
17:13 Maddingue__ is now known as Maddingue
kolibrie xinming: that might be an evalbot problem, those expressions work for me in command-line pugs 17:14
xinming kolibrie: by the way, can I add a + before m/.../ ? just like +m/.../ 17:18
I wish it to be forced into numeric context
kolibrie xinming: I'm pretty hazy with the syntax there, but that doesn't sound right 17:23
xinming: you want the number of matches it finds for that string?
xinming kolibrie: hold on 17:24
In numeric context it evaluates to the number of matches: 17:25
yes, But, the example just shows on += not +
So, If we wish to change the context, can we use +m/.../ 17:26
kolibrie I think another example (not shown) would be:
$match_count += $string ~~ m/pattern/;
oh, maybe the :g is required 17:27
to find all the matches
xinming kolibrie: hmm, Ok, how do about this example? 17:29
my $t = "this is a string"; "The result of match { $t ~~ m/is/ }".say ; 17:31
svnbot6 r6410 | fglock++ | * perl5/ Code
r6410 | fglock++ | - Added 'slurpy' parameter
r6410 | fglock++ | - Compatible with Perl 5 scalar/list context
xinming kolibrie: so, How do we force the context of "$t ~~ m/is/" ?
maybe scalar, maybe bool. 17:32
kolibrie xinming: I'm guessing that you put a '+' in front of $t
xinming: but maybe not
xinming kolibrie: in fact, If the default match string is $_, so we can use $_ = $t; and then {m/is/} 17:33
hmm, I am not sure...
Synopsis doesn't cover much.
kolibrie you might need to capture the match object in a variable, and put a + in front of that 17:34
true, the synopsis is kind of light when it comes to rules
and, not up-to-date, either
xinming kolibrie: Ok, I think I got the "exactly" answer... :-) 17:36
we can use +$t.match( / / ) 17:37
;-)
PerlJam What are you trying to do? 17:40
xinming PerlJam: force the context for the match result...
$match_count += m:g/pattern/; 17:41
# In numeric context it evaluates to the number of matches:
But the problem is out, It use += here, Some times, we might not need to pass value to a $var.
so, If we can use +m,/.../
PerlJam yes, you should be able to do that. 17:42
(assuming you meant +m:g/.../ again) 17:43
xinming # In string context it evaluates to $0, the entire matched string:
print %hash{"{$text ~~ /<?ident>/}"};
# or equivalently:
$text ~~ /<?ident>/ && print %hash{~$/};
PerlJam: Thanks for your clarification. 17:44
hmm, I wonder, for the second example...
Why It will default pass to %hash?
PerlJam And I believe that it isn't "g" anymore, but rather "e" for "every" (or something like that)
xinming as the key name "~$/" 17:45
or, every %hash will get the pair ( ~$/ => "$matched" ) ?
will it act like multi sub here? 17:46
bbl, go to shit... :-)
hmm, so anyone would help? 17:54
xinming goes to restart gnome... 17:58
rm-r hi, how can i initialize the size of a vector? (declaring it is big x) 18:39
Khisanth checks the channel name 18:41
what sort of vectors are you talking about? :)
rm-r hum arrays sorry 18:42
@array
ods15 deletes rm-r 18:43
or unlinks
whatever
rm-r ?
ods15 <somebody> how do you delete an entire directory in unix? * rm-rf doesn't know...
rm-r eheh :) 18:44
ods15 search for that in bash.org :P
xinming what's [ ] used for in rule? 18:48
hmm, Syn Says it's non-capturing. 18:49
what does it mean please?
s/non-capturing/non-capturing group/
Juerd Perl 6's [] is Perl 5's (?:) 18:51
kolibrie xinming: so you can say m/[this|that]/, without 'this' or 'that' being trapped in $0, $1 18:53
xinming kolibrie: It will still match, but don't capture the match, right? 18:54
kolibrie correct, it just doesn't get added to the match object under $0, $1, etc.
xinming ;-) 18:55
# In string context it evaluates to $0, the entire matched string:
print %hash{"{$text ~~ /<?ident>/}"};
# or equivalently:
$text ~~ /<?ident>/ && print %hash{~$/};
how about this example?
will ~$/ inserted into "every" %hash ( %a, %b, %c... etc ) in the current block? 18:56
I thought It's a bit like multi sub, But I really don't know if I am right. 18:57
kolibrie no, %hash is an ordinary hash that was defined previously
in this example, we are pulling out a value from the hash based on what matched 18:58
in the rule
and $0 isn't the entire matched string any more
rgs quick question... isnt "while =$fh" supposed to populate $_ ? 18:59
xinming kolibrie: hmm, I think I need to think more.
rgs: =$fh just do `$_ = $fh[$itator]` 19:00
rgs xinming: and why don't I see a value in $_ when doing while =$fh { say } ? 19:02
xinming rgs: because the by default, `while =$fh` will automatically pass one "piece" into $_ 19:04
?eval my @ary = (1, 2, 3, 4); while =@ary { $_.say };
evalbotzy Error: Can't use readline() or getc() in safemode.
xinming ?eval my @ary = (1, 2, 3, 4); while @ary { $_.say };
oops.
evalbotzy perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6 perl6
xinming ....
is it a bug? 19:05
?eval my @ary = (1, 2, 3, 4); while @ary { say };
evalbotzy
xinming rgs: hold on please.
ods15 xinming: FOR
rgs you're welcome.
ods15 fool
xinming oops
for...
?eval my @ary = (1, 2, 3, 4); for @ary { say };
evalbotzy undef 19:06
xinming ?eval my @ary = (1, 2, 3, 4); for @ary { $_.say };
evalbotzy 1 2 3 4 undef
PerlJam yeah, just remember to use "for" where you would have used "while" in perl5 and you'll do good.
ods15 PerlJam: uh, it was for() in 5 too\
that code was wrong in 5 too, infinite loop
xinming ?eval my @ary = (1, 2, 3, 4); for @ary -> $_ { $_.say }; 19:07
evalbotzy 1 2 3 4 undef
xinming ?eval my @ary = (1, 2, 3, 4); for @ary { say };
evalbotzy undef
ods15 the undef thing aint right though
PerlJam ods15: The primary iterator in perl 5 was <> and it was almost always used with "while". This changes in perl 6
xinming why doesn't say default use $_ ?
ods15: yes, that's what I normally do in perl 5.
ods15 PerlJam: thats wrong though... you used while with <>, which DOES make sense, but you use for with @arr 19:08
xinming rgs: Sorry, you can use while =$fh here. must use for
ods15 <> and @arraretotally different here
PerlJam ods15: sure, but this started with unary =
ods15 <> and @arr are totally different here
xinming rgs: I remember wrong... maybe carelessly maybe foolishly... God knows...
ods15 ?
for(<>) doesnt make any sense 19:09
xinming ($key, $val) = @$result; will this be the same as ( $key, $val ) = @{$result} ? 19:10
ods15 ohhhhhhh, the undef is the result of the whole expression :)
PerlJam rgs was asking about the perl6 equivalent to perl5's while (<$fh>) { ... } and asked why while =$fh { ... } didn't work. The answer is to use "for" in perl6 where you would have said "while" in perl5
ods15 ?eval my @ary = (1, 2, 3, 4); for @ary { say }; 5
evalbotzy 5
ods15 ?eval my @ary = (1, 2, 3, 4); for @ary { say $_ }; 5
evalbotzy 1 2 3 4 5
ods15 :)
?eval my @ary = (1, 2, 3, 4); for @ary { print }; 5
evalbotzy 5
xinming say and print won't take $_ anymore, It's a bug. 19:11
rgs ok thanks, I now remember that damian mentioned that for =$fh ought to be lazy
is it actually lazy in pugs BTW ?
xinming well, maybe...
ods15 ?eval my @ary = (1, 2, 3, 4); for @ary { print $_ }; 5
evalbotzy 12345
ods15 heh
xinming ($key, $val) = @$result; will this be the same as ( $key, $val ) = @{$result} in perl 5 please?? 19:12
:-S 19:13
ods15 night
xinming Odin-: night.
ods15: night.
ods15 errrrr not Odin-
xinming ods15: well, wrong completion.
??? 19:16
-lilo/Wallops- "I lift this clavicle to worlds without ... 19:17
who is he? a server?
nothingmuch evening 19:19
xinming: you must be a robot
fglock hi nothingmuch
nothingmuch hi ho
damnit, work network is down 19:20
oh wait, that's just safari
xinming nothingmuch: ??? 19:22
...
nothingmuch xinming: whenever I come here you are awake
and you're in a different time zone
and I sleep 5 hours a night
xinming nothingmuch: well, I am not a robot... 19:23
Khisanth so you say! 19:25
xinming nothingmuch: Now, I didn't get work, So, I can do what I like to do, Just like learning stuff or such... In the past 2 years, I wasted tooo much time, I like computing, But I addict myself to play warcraft III, Now, I know, If I go on with Warcraft III, I might become another Death-Knight... :-) 19:26
nothingmuch xinming: =)
19:34 autrijus_ is now known as autrijus
xinming by the way, `my( $s, $t ); $s = "$t"; $t = "xyz"; print $s;` in perl 5, it will give a warn because it's $t is undef, how about perl 6? 19:37
It's said in perl 6, the list is lazy, will the Scalar be "lazy" ?
arcady perl 6 should complain about that too, I think 19:40
xinming arcady: hmm, In fact, I wonder, why perl 6 make "all" things lazy. :-)
s/why/why not/
arcady well, you can say that scalars are already lazy 19:42
you don't have to define them until you actually use them
xinming arcady: But, This example shows, It might be lazy, But not actuall lazy... 19:44
my( $s, $t ); $s = "t now is: $t"; $t = "xyz"; print $s;
In perl 5, If you wish to do in this structure, you have to do eval '$s' before print. 19:45
I mean the "xyz"
PerlJam you'll need similar trickery for perl 6 19:46
xinming PerlJam: But, I wonder if the @Larry could consider make "scalar" lazy. just as @ary; 19:47
PerlJam not by default. That would be too surprising.
xinming I think this feature won't waste not much CPU circle, and even, I didn't see any side effect to make "scalar" lazy. 19:48
Limbic_Region If made a general rule - I think it would have to also be left to run time for validation 19:49
which isn't a desireable thing IMO
things like tied variables would cause havoc if you tried to do them at compile time
xinming Limbic_Region: So, You mean, The make the scalar lazy will made chaos? 19:50
Limbic_Region: hmm, How about @ary? :-)
I think, we might need to add a attribute... my $scalar is lazy; 19:51
Limbic_Region xinming - I mean identifying with all scalars being lazy will be chaos if you don't defer to checking until runtime
and IMO, defering to run time is not good for speed
but that is just my opinion
I don't know much about this stuff and could be out in left field 19:52
xinming Limbic_Region: hmm, I will ask in p6l. :-)
fglock putter: ping 19:55
svnbot6 r6411 | fglock++ | * perl5/ Code - bugfix - MultiSub wasn't checking parameter signature
fglock in 'sub x returns Int {...}' - is it a runtime error if the sub doesn't return an Int? 19:58
Limbic_Region fglock I think only if whatever does get returns doesn't have a :coercable thingy that allows it to be coerced into an Int 20:00
and that may even be compile time
if you want to force it to complain even if it is coercable you have a couple of options 20:01
the first is to create a package that has the coerceable bits turned off
so that you can do it on a variable by variable basis 20:02
the second is to use a pragma (that I believe autrijus might have already implemented) that says all variables at a given scope can't be cast
if you need more specific implementation details - see autrijus and/or the list
Limbic_Region was only midly interested when he discussed it with autrijus 20:03
fglock so 'returns Int' is a no-op by default
Limbic_Region I don't think so
I think it is a hint
that says how a return variable needs to be cast that isn't already an Int 20:04
if you want, I can check the log to find the conversation with autrijus and myself? 20:05
fglock so it's kind of a caller context (almost)
no rush - I've got plenty to do before I really need to know :) 20:06
xinming # An interpolated array: 20:12
/ @cmds /
Limbic_Region fglock - I have found the most recent conversation - though I have raised it several times
colabti.de/irclogger/irclogger_log/...9,Tue#l981
xinming what will this interpolated exactly?
@cmds = ( "str", "string" )
Limbic_Region the conversation started with "IIRC, @larry - or perhaps even $larry has ruled that if you type the parameters of a sub and" ....
xinming will it become / str|string / ? 20:13
Khisanth yeah ...
fglock thanks 20:14
Limbic_Region walang anuman 20:15
xinming hmm, anyone here would clarify my question? 20:17
fglock salamat
Limbic_Region xinming - you have IMO too questions 20:18
the first is lazy initialization
and the second is lazy interpolation
s/too/two/ 20:19
xinming Limbic_Region: Sorry for my questions... But In Synopsis, I really can't get clear answer to catch perl 6 grammar...
Limbic_Region ok - I am confused 20:20
with regards to the lazy scalar
xinming @cmds = ( "str", "string" ); / @cmds /; and what will `/ @cmds /` do?
Limbic_Region it sounds like you are saying....
oh nevermind
we are talking about two different things 20:21
I have no idea about your @cmds question
but WRT to your lazy scalar - I think you picked a bad example
I say that because interpolation fetches values and I think you don't want that 20:22
for instance my ($foo, $bar, $blah, $asdf);
$bar = $foo + 12;
$blah = $bar - 17; 20:23
$asdf = $blah * 2;
$foo = 42;
print $bar;
in a lazy initialization - that doesn't pose any problems
because nothing needs to absolutely have a value until print of $bar
but (at least in p5 speak) $bar = "$foo is great"; 20:24
PerlJam xinming: @cmds = ( "str", "string" ); / @cmds /; is equivalent to / [str | string] /
Limbic_Region would require interpolation to be lazy too
xinming PerlJam: thanks.
Limbic_Region since that would NORMALLY fetch the current value of $foo, create a copy, and stick the copy in a new variable 20:25
anyway - I don't like it but as long as I can ignore it without paying any performance penalties I don't mind you having it
fglock autrijus: ping 20:38
masak seen autrijus 20:48
jabbot masak: autrijus was seen 17 hours 14 minutes 4 seconds ago
leo__ recently on #parrot (MESZ) 21:44 * autrijus waves and sleeps & 20:49
fglock hi leo 20:50
leo__ hi fglock
fglock is there somebody working on the Parrot p6 runtime? 20:51
leo__ dunno, but it's currently stalled - wating for merging branches/leo-ctx5 and for new lexical specs
even waiting 20:52
PerlJam leo__: so ... when is the merge going to happen? 20:55
leo__ hmm - I think I hear that question a lot - last answer was <@Nicholas> I think I can answer that - "ask chip" 20:57
I hope that it's in the next release though 20:58
PerlJam leo__: oh, so you've done all you're going to do, it's strictly up to chip to code review and make it so? 20:59
leo__ yes, so it looks to me
nothingmuch hmm 21:05
fglock just checking, the plus sign in 'sub x ( +$x ) {...}' means that the argument must be named? 'x( x=>1 )' 21:09
iblech Hi :) 21:11
fglock: Right.
fglock thanks
iblech Reading your Perl6::Code currently, BTW
fglock yes? 21:12
iblech Nothing specifically, only FYI
nothingmuch ugh 21:13
where does S" store whatever it reads from the buffer
yuck
fglock currently working in the TODO list
S" ?
nothingmuch fglock: forth 21:14
: hello s" FOO " ;
: opens a new word, writes header
s" is immediate, reads from input buffer until char = '"'
the problem is that 'here' is currently the word being compiled
so you need to jump around it, i guess
fglock I think that during a ':' it is not immediate (?) 21:16
nothingmuch fglock: immediate means only one thing =)
stevan fglock++ # Perl6::Code :) 21:17
hola naddamucho 21:18
nothingmuch hola
fglock boa tarde
nothingmuch so someone got around to it, eh?
nothingmuch ducks
stevan :)
nothingmuch: yes, apparently you waited long enough
fglock: I had been asking nothingmuch to do Perl6::Code since the hackathon 21:19
fglock :)
nothingmuch fglock: wanna see my def of S" ? 21:20
it passes the tests
nothingmuch writes tests and runs them against gforth
when they start passing I run them on my own forth 21:21
when they start running again i'm done
fglock I wrote a forth compiler - mmm 20 yr ago I think
nothingmuch i was born just a little before that 21:22
almost 2 months
fglock in 6502 assembler
nothingmuch i'm writing it in perl 5 =) 21:23
svnbot6 r6412 | iblech++ | * Usual svn props and EOLs at EOFs.
r6412 | iblech++ | * PIL2JS: PIL::Params: Accomodate for latest ruling:
r6412 | iblech++ | sub foo (*@xs) {...}
r6412 | iblech++ | foo(xs => [1,2,3]); # @xs contains (xs => [1,2,3]) now
fglock nothingmuch: forth was 30x faster than basic 21:27
nothingmuch fglock: it's that many times cooler too
fglock because it could do inlining
nothingmuch fglock: some of the fun I want to have is to write a generic stack machine optimizer in haskell 21:28
i would mostly like to do inlining and then peephole based stack op removal 21:29
and since all my primitives will be defined as input and output conditions 21:30
then for example stuff like '10 DUP +' will be compiled as an operation that does in place addition of the TOS
then, when the stack operations are minimized, the TOS is entirely cached in the register space 21:31
and side effect free reorganization of code is supposed to help reduce spills
fglock cool 21:32
leo__ nothingmuch: $parrot-src/ languages/forth/ needs a maintainer I presume - wanto to jump in?
nothingmuch ofcourse, it's all just in theory
justatheory removes it
nothingmuch leo__: i dunno parrot, and I'm not maintaining this either (i did some today, i did some yesterday, but before that a month went by)
if I ever get around to learning parrot i'll take it 21:33
leo__ parrot's forth is still PASM based, which makes it a bit harder ;-)
fglock reads about positionals x named x slurpy 21:47
iblech xinming: You have mail :) 21:50
xinming iblech: ??? 21:51
iblech xinming: I've replied to your p6l question ("Can a scalar be "lazy"?)
xinming iblech: lol, thanks. :-) 21:52
iblech: I just now write a test for pugs.
iblech xinming: cool :)
xinming fun().another have to be the same as fun.another
I don't know if it's fixed.
in old pugs, they won't do the same thing 21:53
iblech Right.
This bug may be related to a similar bug putter has written a test for yesterday or so
See t/pugsbugs/attribute_of_return_value.t 21:54
xinming iblech: thanks 21:55
fglock in the current spec, if there is a Pair in the arg list, is it always seen as a name/value (before a slurp)? 21:56
iblech fglock: Right. But luqui wants to change that 21:57
fglock and you can have positionals after the Pair, or is it an error? 21:58
iblech No, that's fine
At least I've always thought that just until you asked that question :) 21:59
fglock :)
iblech foo(bar => "baz", 42); # does this look weird?
fglock I think it is ok. but foo( bar=>"baz", 42, other => "option" ) is weird 22:00
42 is position zero?
leo__ iblech: yes weird and suboptimal as foo("baz", 42); will do the same 22:01
(if bar is positional)
iblech fglock, leo__: Right. 22:02
Hm..
fglock so 42 may be position 0 or 1, depending whether bar is +$bar or not?
xinming ?eval multi ab { ... }
evalbotzy undef
iblech fglock: I think so.
leo__ imho there are by far too many ambiguous possibilities in p6 call syntax, especially when it's related to Pairs 22:04
explicitely named args are ok, a slurpy (or argument) hash is ok too, but what does a permutation of these? 22:08
and there is of course my $p = (a => 5); foo(x => $p, $p); ... 22:10
fglock goes home &
iblech I basically agree with you, leo__ 22:11
Your last example would pass the Pair (a => 5) as first positional to &foo
And $x would be (the same pair) (a => 5) 22:12
xinming ?eval my $t = 100; $t.undef;
evalbotzy Error: No compatible subroutine found: "&undef"
iblech xinming: "undef $foo" is spelled "undefine $foo" in Perl 6
leo__ I think that would vastly depend on foo, if it declares named, optionals or slurpy hashes
xinming ?eval my $t = 100; $t.undefine;
evalbotzy undef
xinming iblech: thanks. :-)
geoffb reappears after unburying himself from $real_life (for at least a little while) 22:13
How goes the war, gents (and ladies, if any)?
iblech leo__: Oh, right. I assumed sub foo($doesnt_matter, $x)
leo__ iblech: and it foo happens to take a Pair as first arg all is different still
iblech leo__: Right...
leo__ thinks that this is an undocumentable and unimplemtable mess 22:14
(and I'm not alone with these toughts ;-) 22:15
svnbot6 r6413 | yiyihu++ | Add a test for testing calling the method ( or multi sub ) of a returned object. 22:28
r6413 | yiyihu++ | eg: $obj.sub1.sub2 should be the same as $obj.sub1().sub2() ;
xinming iblech: Thanks for your suggestion, Perl is really the language TMTOWD :-) 22:30
uhhh... TMTOWTDO... ? 22:31
iblech xinming: np :)
xinming: TIMTOWTDI
xinming: err, no, forget what I said
xinming: forget again, TIMTOWTDI is correct. Just was surprised that Google lists only 9000 pages containing TIMTOWTDI 22:32
leo__ iblech: strange, maybe because google is using python? 22:33
xinming iblech: hmm, IMO, your question on Proxy, I think, If there is no STORE method supplied, the default action might be simply return the value...
iblech leo__: :D
xinming leo__: why do you think Google use python? :-) 22:34
iblech xinming: STORE is called for assignment -- I doubt that simply returning whatever .FETCH returns is the correct behaviour
leo__ I heard it
iblech xinming: Other than that, assignments always return the RHS, I asked this once
xinming iblech: sorry, I might simply pass the value to it, sorry, got a bit sleepy... @_@ 22:35
SamB you sure it isn't TMOWTDI?
iblech SamB: TMOWTDI has only 44 pages
leo__ tmtowtdi 28,000 22:36
SamB er, TMTOWTDI
xinming Results 1 - 100 of about 8,720 for timtowtdi. (0.33 seconds)
iblech leo__: You must be correct.
SamB I don't know what happened to that T
xinming iblech: what's rhs anyway... :-S 22:37
luqui I think the camel writes it TMTOWTDI, but I've seen TIMTOWTDI on mailing lists more 22:38
iblech xinming: Right Hand Side, i.e. the $bar in $foo = $bar
xinming iblech: just like lvalue = rvalue. :-)
leo__ well TOOWTDI (Pythons motto) - 1020 results on google ;-) 22:44
SamB that is Python's motto? 22:45
leo__ one of em, yes
SamB I know they try for TOGWTDI
leo__ TOGWTDI - did not match any documents 22:46
Juerd I'm starting to believe that at least one out of every ten times I drive the motorway N3 some time around midnight, something happens that requires me to call the emergency number. 22:47
xinming "There's Only One Way To Do It"
...
Juerd I've seen all kinds of dangerous people there, but the guy today beats them all
Some --probably drunk-- guy was crossing the motorway. Repeatedly. 22:48
xinming python and perl are both started with "p" But go to the really different "direction"
Juerd It's incredibly stupid to have exactly one way to do something. 22:49
It's also incredibly stupid to have multiple best ways to do something.
xinming Juerd: well, Only paranoia survive. ;-)
s/paranoia/paranoias/
Juerd The best solution is to have multiple ways to do something, of which one is the clear and unarguable better choice.
Unfortunately, this is hardly possible, and for practical reasons, we always have to choose between the extremes. 22:50
xinming Juerd: hmm, In fact, The better choices come from more choices.
Juerd Not always 22:51
leo__ yep and of course there is a lot of 'there's no way to do it' except with ugly incompatible hacks
xinming Juerd: at least, Hope Python won't choose the worst to apply the motto, There's Only One Way To Do It
leo__ and the 'one way' isn't true either
Juerd I personally like being able to write either foo if bar, bar and foo, if foo { bar }
But I do reckognise that this makes Perl unacceptable to many. 22:52
xinming Juerd: most people don't like $ @ and %...
Juerd: because they thought this is confusing...
Juerd xinming: I find them ugly but useful
And that describes Perl entirely
xinming Juerd: I prefer the useful.
leo__ use nosigils; # soon at your CPAN6
Juerd It's very ugly, Perl. 22:53
But that's not a *problem*
xinming Juerd: hmm, In fact, I think Perl 6 won't be so ugly... :-)
Juerd: I hate perl 5's OO design. for a method, You have to do my $obj = shift; in every sub. 22:54
Juerd: and also for use strict; use warnings;
Juerd Perl 6 will be less ugly. 22:55
Not unugly
I almost never use shift for shifting @_
my ($self, $foo, $bar) = @_ works best for me
And $obj doesn't work for me. It has to be either $self or $this for me to fully realize you're writing a method. 22:56
xinming Juerd: I wonder why @Larry wish to keep parens away as best as he can.
Juerd I wonder what you mean by that.
xinming hmm, You see, if( ) { } elsif () { } 22:57
But in perl 6, larry make the design which can ignore the parens for if
And even for sub calls. 22:58
a = a();
a $par; = a( $par );
Juerd It's not that the parens become *optional* as such
They're just no longer part of the syntax
You can still use parens, but then they are normal disambiguating grouping parens, and not special syntax for the statement:if 22:59
xinming that makes think of if that @Larry hate the parens.
s/hate/hates/
Juerd Everybody should hate unnecessary brackets.
{ } can't go away for many reasons, but () could go away easily.
For the same reason I find it weird that \d**{5} still isn't \d**5 23:00
xinming Juerd: Maybe @larry want it for more clear with 1..num
Juerd (For the simplest of cases, that is. I'm not arguing for \d**EXPR because that's hard. But for the simple int and int..int, exceptions can and should be made.) 23:01
xinming maybe 1..Inf
Juerd: Maybe he think, that no one write rules every day, So He chose **{} :-)
Juerd Oh come on... ucfirst He? 23:02
That's none(@Larry), fyi.
xinming typo 23:04
Juerd And regarding "there's probably a good reason for this". Perhaps there is. I'd like to know it, and until I do know the good reason, I'm not assuming there is one, if I think the design can be improved further. 23:05
And there are of course times at which the "good reason" isn't all that good.
xinming Juerd: Only time will improve. :-) As the design can be changed. 23:06
Juerd: at least, Perl 6 hasn't been released yet.
xinming go to write test for slurpy %hash and then go sleep. 23:11
Juerd Good night 23:15