pugscode.org | sial.org/pbot/perl6 | ?eval "m" ~ "oo" ~ "se" | > reverse (show (scanl (*) 1 [1..] !! 4))
Set by gaal on 19 March 2007.
gaal @tell Limbic~Region Data and Typeable are two datatypes used in haskell reflection, yes; Data is the one allowing generic folds. So for example, to implement the function that looks at a block like { $^a cmp $^b } and infers the set of placeholder variables are {$^a, $^b}, you basically need to write only a function that works on variables, and the generics stuff will sift through a possibly very complex AST node and find those, applying your functi 05:38
lambdabot Consider it noted.
gaal @tell Limbic~Region both you can get default implementations of both typeclasses from GHC, but Typeable's defaults are more likely to DTRT. 05:39
lambdabot Consider it noted.
gaal @tell lumi regarding Hs<=>pugs val bridge, see class (Show a, Typeable a, Ord a) => Boxable at Pugs.Class:36 and various instances from there, eg instance (Show a, Typeable a, Ord a) => Boxable (Maybe a). No Data required. 05:43
lambdabot Consider it noted.
lichtkind moin 09:15
lambdabot lichtkind: You have 1 new message. '/msg lambdabot @messages' to read it.
lichtkind audreyt: thank 09:18
i didnt found re::Engine::PGE where is it? 09:19
moritz lichtkind: in the parrot repos there is a file runtime/parrort/library/PGE.pbc 09:51
lichtkind: maybe it's that
lichtkind: and there is a directory compilers/pge/
lichtkind: sounds even better
lichtkind but you cant use it inside perl5? 09:52
moritz lichtkind: it says "This is a regular expression/rules/grammar engine/parser designed to 09:53
run in Parrot"
lichtkind yeah but re::Engine is normaly a perl5 plugin 09:54
so i thopught re::engine::PGE is for the use in perl
moritz: i know what pge is but when i heard yesterday of re::engine::PGE i was amazed about the possibility maybe i misunderstood something 10:02
ayrnieu ?eval 'm' ~ 'oo' ~ 'se' | > reverse (show (scanl (*) 1 [1..] !! 4)) 10:43
evalbot_r15771 Error: ␤Unexpected ">"
ayrnieu Ah, that is Perl6 and then Haskell. Strange.
gaal two separate moose, folks :) 10:44
?eval 'm' ~ 'oo' ~ 'se'
evalbot_r15771 "moose"
gaal > reverse (show (scanl (*) 1 [1..] !! 4))
lambdabot "42"
ayrnieu ?eval [~] <m oo se>
evalbot_r15771 "moose"
gaal yay, golf
pugscode.org | sial.org/pbot/perl6 | ?eval [~] <m oo se> | > reverse (show (scanl (*) 1 [1..] !! 4)) 10:45
gaal pugscode.org | sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse (show (scanl (*) 1 [1..] !! 4))
gaal -- disambig 10:45
broquaint What's the equivalent of that Haskell code in Perl 6? 11:27
moritz ?eval "42" 11:28
evalbot_r15771 "42"
moritz broquaint: that's it ;)
broquaint > show (scanl (*) 1 [1..] !! 4) 11:33
lambdabot "24"
broquaint Ah, I get it now. 11:34
ayrnieu so, what's the real equivalent of that Haskell code in Perl 6? 11:42
Juerd ayrnieu: say "24"; # ;) 11:43
ayrnieu these non-answers bore me. 11:44
masak ?reval reverse [*] 1..4 11:49
ayrnieu: that's the closest I get
[particle] it's factorial
masak ?eval reverse [*] 1..4
evalbot_r15771 "42"
[particle] 4!
moritz but what's the reverse for? 11:50
it currently reverses only a scalar
masak moritz: string reversal
moritz masak: ok, now I get it ;)
masak both in Perl and Haskell
Debolaz2 en.wikipedia.org/wiki/Wikipedia:Art...udrey_Tang
lambdabot tinyurl.com/yrp267 11:51
masak (but for different reasons)
ayrnieu masak - well, for the same reason, but of course the semantics differ. 11:51
masak ayrnieu: as I understand it, in Haskell a string is a list
while in Perl, reverse does one thing for scalars and another for arrays 11:52
ayrnieu masak - yes, that would be part of the 'semantics' that differ. The reason is still the same.
masak ayrnieu: ok, granted :)
ayrnieu but OK, I'll accept { reverse [*] 1..4 } as a nice golf of that Haskell :-) 11:53
It could be better with a take 4 $ [1..] ; how is that in perl6? In Perl5, that specifically is easy enough to simulate with a tied array. 11:57
gaal broquaint: we don't have lazy lists yet, but once we do: reverse ([\*] 1 .. *)[4] 12:06
broquaint: [*] is fold, [\*] is scan
(on (*))
associtivity and id are defined as traits on the operator 12:07
?eval ([\*] 1 .. 10)[4] 12:08
evalbot_r15771 \120
gaal ?eval ([\*] 1 .. 10)[3]
heh.
evalbot_r15771 \24
broquaint Do/will fold & scan exist as functions? 12:10
gaal fold is spelled "reduce", and exists 12:13
scan.. let me check :)
ah yes
scan is spelled "produce", TimToady++ 12:14
broquaint Groovy.
gaal ? produce &infix<+> 1..4
?eval produce &infix<+> 1..4
evalbot_r15771 Error: ␤Unexpected "1"␤expecting operator, ":" or ","
gaal ?eval produce &infix<+>, 1..4
lichtkind but is it right that MAD will be pluffed into perl?
gaal grrr
evalbot_r15771 Error: Cannot cast into Hash: VRef <Sub:0xb7ae14b4>
gaal brb 12:15
lichtkind i mean perl with little p
moritz ?eval produce {$^a+$^b}, 1..4 12:17
evalbot_r15771 (1, 3, 6, 10)
fglock lichtkind: re::engine is in CPAN: search.cpan.org/search?query=re%3A%3Aengine 12:18
lambdabot Title: The CPAN Search Site - search.cpan.org
lichtkind fglock: i know but i didnt found it there
gaal ?eval produce &infix:<+>, 1..4 # that's more like it 12:25
evalbot_r15771 (1, 3, 6, 10)
fglock lichtkind: avar said he will publish it, after re::engine::Plugin v0.02 is out 12:27
lichtkind will it be out in may? 12:28
avar: do you have schedule for re::engine::PGE ? 12:49
avar why may? 12:56
trying to finish it soonish for the last month:)
I should pack what I have and do a release sometimes soon, still need api polish and docs though:)
*updated docs
fglock avar: do you know there is a place in pugs for work-in-progress, at misc/pX/ 13:00
lichtkind avar: because the article i writing will me out in may and i want to only write about when it will be out :) 13:00
avar: what does re::endine do to perl5 ? 13:01
err
avar: what does re::engine::PGE do to perl5 ?
avar wrap Pugs::Compiler::Rule so you can do 13:03
if ("boobs" =~ /\$<x> = (b[oo|w]bs)/) {
say $&->{x}; # implemented
say $+{x}; # plan on it
}
all the re::engine:: stuff swaps out perl5 regexes for something else
oh, PGE, PGE would wrap the Parrot Grammar Engine, I've only started on PCR - Pugs Compiler Rule 13:05
sial.org/pbot/23656 - # PCR.pm so far 13:06
lambdabot Title: Paste #23656 from Someone at 85.197.228.236
lichtkind avar: so ist re::engine::PCR? 13:09
i know approx what re::engine does 13:10
i just whant to be correct in my article :)
avar: s/ist/its/ 13:13
avar yep 13:14
see package:)
lichtkind: svn.perl.is/svnweb/index.cgi/perl.is/browse/ 13:16
lambdabot Title: browse: /perl.is (Rev: HEAD, via SVN::Web) 13:17
lichtkind avar: thanks wtf is plan9 ? 13:19
avar en.wikipedia.org/wiki/Plan_9_from_Bell_Labs 13:19
lambdabot Title: Plan 9 from Bell Labs - Wikipedia, the free encyclopedia
avar svn.perl.is/svnweb/index.cgi/perl.i...%2Ftrunk/t # best reference of what works atm 13:23
lambdabot Title: browse: /perl.is/re-engine-Plugin/trunk/t (Rev: HEAD, via SVN::Web), tinyurl.com/2fgllp
avar all those tests pass at the moment 13:24
lichtkind avar: so its the regexes from plan9 regex lib ? 13:28
avar lichtkind: yeah 13:35
moritz ?eval class f {has @.f; method foo {return $.f}} my $f=f.new; say $f.foo' 13:47
evalbot_r15771 Error: ␤Unexpected "'"␤expecting term postfix, operator, ":" or ","
moritz on my maschine that compiles and runs (although it should not) 13:48
?eval class f {has @.f; method foo {return $.f}} my $f=f.new; say $f.foo
evalbot_r15771 OUTPUT[␤] Bool::True
masak ?eval class f {has @.f; method foo {return $.f}} my $f=f.new; $f.foo
evalbot_r15771 []
moritz it allows access to $.foo although only @.foo should be available
masak moritz: yeah, seems like a bug 13:49
moritz masak: any idea where an appropriate testcase should be? 13:50
masak moritz: t/oo/attributes?
moritz masak: somwhere there, probably 13:51
masak is currently making an inventory of the pugs test suite
masak so you're kinda asking the right person :) 13:51
'though I'm by no means an expert on it 13:52
moritz maybe t/oo/attributes/instance.t? 13:59
lichtkind avar: thx 14:00
pmurias masak: S12: Because C<$.foo>, C<@.foo>, C<%.foo>, C<&.foo> are just shorthands of 15:02
C<self.foo> with different contexts
?eval class f {has @.f; method foo {return $.f}} my $f=f.new; @f.foo 15:03
evalbot_r15771 Error: No such method in class Array: &foo
pmurias ?eval class f {has @.f;} my $f=f.new; $f.f 15:04
evalbot_r15771 []
pmurias ?eval class f {has @.f; method foo {return @.f}} my $f=f.new; @f.foo
evalbot_r15771 Error: No such method in class Array: &foo
pmurias ?eval class f {has @.f; method foo {return @.f}} my $f=f.new; $f.foo 15:05
evalbot_r15771 []
pmurias (1,2,3)
?eval (1,2,3)
evalbot_r15771 (1, 2, 3)
pmurias ?eval sub {return 1,2,3};f()
evalbot_r15771 Error: No such subroutine: &f
pmurias ?eval sub f {return 1,2,3};f()
evalbot_r15771 (1, 2, 3) 15:06
pmurias my @a;@a
?eval my @a;@a
evalbot_r15771 []
obra We're looking for a new perl6 summarizer. Would anyone here be interested in the fame and fortune that comes with being the person to put a public face on all the work that goes on on Perl 6 each week? 15:31
[particle] *cough* good luck! *cough* 15:32
obra smacks particle
[particle] has ann stopped for good? 15:32
obra ann's finding herself without enough time to do as good a job as she feels the job deserves 15:33
She's going to hang around for a bit to help with an orderly transition.
[particle] you know, i was wondering if there was a way a wiki or obby could allow multiple folks to act as summarizer 15:34
i call it, "cooperation"
obra it'd certainly be interesting
nothingmuch: want to hack on your tools more to make collaborative summarization easyier?
[particle] i was thinking about how spreading out release manager role for parrot has improved things, and thought the summarys could benefit 15:35
obra sure
it makes lots of sense 15:36
obra "With enough hands, all work is shallow" 15:36
gaal kudra++ # great job when she did have time 15:38
[particle] indeed
lichtkind obra i would contribute but defeinitvly have the time to do it alone
[particle] i read every post, and i still find the summaries quite valuable 15:39
Alias__ obra! 15:40
You are totally the person I need to talk to right now
use.perl.org/~Alias/journal/32762
obra Alias__: how can I help?
[particle] wanted to talk to Alias__, but can't remember why
Alias__ Read that, then talk to me about commit bit
lambdabot Title: Journal of Alias (5735)
obra ok. setting up commitbit shouldn't take much work. sorry to hear about your repostorty. have you lost data? 15:41
masak pmurias: ah, now that you mention it, yes
so it's not really an error 15:42
Alias__ obra: Yeah :(
obra: The actual CPAN code is all intact, but I'm still patching together some commercial stuff
I mean, I have enough checkouts spread around they are ok, but I really don't want to lose the history
obra ok. was gonna say. I have a currentish mirror of the cpan code.
...this is where having svk can be a lifesaver ;) 15:43
Alias__ I'm extra careful to always have 4-5 semi-current checkouts
And fairly irregular proper backups
Or should that be fairly regular irregular backups :)
gaal unfairly regular backups? 15:48
Alias__ heh 15:49
Fortunately, MOST of the commercial code moved to DreamHost subversion, since for them having plain text passwords to edit doesn't hurt 15:50
For the CPAN repo though, it demands the automated account management stuff
ew 15:54
One thing I might have lost though, is the master for my codegen system
in fact, I haven't found an intact current checkout yet either 15:55
managed to save the database thank god
avar 15:34:07 <[particle]> you know, i was wondering if there was a way a wiki or obby could allow multiple folks to act as summarizer 16:01
I belive svn should be used for this
host it in the pugs repos?:)
obra avar: yes, though tools may help a lot to prevent duplicated work
avar *nod* 16:02
obra and we need someone to run the show 16:04
Are you interested in trying to speakhead ?
"spearhead"
Alias__ I prefer the term "spadehead" 16:10
Because it means you're the one down in the shit doing something useful before anyone else realises there's actually something happening
And then of course, while others are pouring the concrete, you sit back and lap up the applause :)
fglock re pugs repos: svn.pugscode.org/pugs/docs/summaries/ 16:11
lambdabot Title: Revision 15771: /docs/summaries
tene thorstenl.blogspot.com/2007/01/thls...cript.html 17:26
lambdabot Title: thl: thl's irssi notification script [UPDATED], tinyurl.com/yqvbla 17:27
gaal @tell nothingmuch www.ultratechnology.com/meta2.html 17:59
lambdabot Consider it noted.
pmurias forth seems bizarre to me... 18:15
allbery_b enh
it is certainly "different", but not so much bizarre 18:16
or do you consider postscript bizarre as well?
broquaint I would say ColorForth qualifies as bizarre. 18:19
allbery_b googles and finds himself agreeing 18:20
moritz allbery_b: well, postscript is more "special" than "bizzare" ;-)
broquaint Or should I say, 2color6Forth :) 18:25
Hrm, 3color5Forth
moritz screams out in agony
broquaint That's the ticket.
broquaint Ah no, 5color3Forth it should be according to en.wikipedia.org/wiki/Colorforth 18:26
broquaint gives up
SamB hmm, is colorforth one of the distinguished few languages with multiple sourceplanes? 18:27
broquaint Looks like it.
I imagine it's only a small macro away in perl6 ... 18:28
SamB supposes the sourcefiles are probably not actually stored in multiple planes 18:32
broquaint Doesn't look like it, no.
SamB but that was just a PC joke anyway ;-) 18:33
broquaint watches it whistle over his head
SamB hmm. 18:34
SamB thinks it may have been an incorrect PC joke
moritz hey, we could color-code different contexts in p6 source code 18:37
I mean just as syntax hilighting
tene map -> $n 9$n*2, @list 18:42
TimToady 18:45
tene use Color; class Foo { has $5private; has $10public; has $11publicisrw;
TimToady 's mind is obviously blank...
but i do kinda like the context coloring idea 18:47
especially since with p6 it turns into lazy vs eager coloring 18:48
broquaint If Perl 6 were a colour what colour what it be?
allbery_b octarine :)
tene broquaint: it changes based on what packages you use. 18:49
Alias__ allbery_b, maybe bluer than that though... octamarine? :) 18:50
moritz wonders how hard it would be to teach the vim perl6 syntax file to use different background colors for different contexts 18:51
TimToady I'm sure gaal would say Perl 5 is tan and Perl 6 is brown.
tene Why would gaal say that? 18:52
TimToady because brown is very møøse
tene Ahh. 18:53
[particle] i think perl6 would be grue
grue is the new bleen, you know. 18:54
TimToady would you rather have a cold grue or a cold bleen?
broquaint
.oO( What does syntax-highlighted perl sounds like to synesthesics ... )
18:56
TimToady salty
well, actually, some of 'em might think it's pretty shweet. 18:57
synaesthesia is highly idiosyncratic... 18:58
[particle] perl 6: like pouring sugar on perl 5's wounds
pmurias what is/are synesthesics? 19:01
broquaint en.wikipedia.org/wiki/Synesthesia
lambdabot Title: Synesthesia - Wikipedia, the free encyclopedia
pmurias thanks 19:05
broquaint That should've been "synesthetes", I'd forgotten the appropriate term :/
pmurias how does one write colorForth with a normal editor? 19:07
broquaint I think it can only be done within color 5color3Forth1 presently. 19:10
s/color //
SamB you could translate normalish forth, I think... 19:11
TimToady colorspace as syntax is just about as bad as whitespace as syntax... 19:13
broquaint Possibly a little unfair on the colour blind as well. 19:14
pmurias and the ascii shackled 19:17
SamB TimToady: I'd say it is worse
since it (a) requires editor support and (b) is probably not easy to type 19:18
pmurias (c) it is more expensive to print 19:21
gaal ~/~ given $moose { when :house<7> {...} } ~/~ 19:22
obra ponders colorForth with a colorblindness filter. We could use sigils to denote colors... 19:23
gaal hey, happy equinox everybody! 19:25
moritz moose 19:26
gaal yes 19:27
geoffb BTW, as I recall part of the reason for colorForth (aside from pushing yet more CPU work in the runtime -> compiler -> editor direction) is to get as much conceptually on the screen at once, when limited by Chuck's low vision. Entire enlarged screen was 16 x 16 characters or some such, and he needed to fit a maximum amount of semantics within his editor window 19:53
svnbot6 r15772 | kudra++ | Summary complete
kolibrie kudra++ # summary 19:55
lichtkind kudra++
geoffb kudra++ indeed 19:56
lichtkind audreyt: ping 19:58
tene kudra++ 20:02
tene considers translating perlwm to Perl 6. 20:30
ludan hola 20:47
fglock hola 20:50
riffraff hi 21:33
tene Hi! 21:37
pmurias hi 21:41
offby1 aren't we jolly 21:52