pugscode.org | temporary feather address: perl6.wall.org | sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse (show (scanl (*) 1 [1..] !! 4))
Set by allbery_b on 24 March 2007.
rindolf Hi all. 02:32
thorat hello
rindolf Hi thorat
thorat: what is your claim to fame?
thorat uh, none 02:33
and you? ;) 02:34
rindolf thorat: www.shlomifish.org/
lambdabot Title: Shlomi Fish' Homepage
rindolf thorat: that contains links to everything.
thorat: do you have a Pugs commit bit? 02:35
lambdabot: hi.
lambdabot is impolite.
thorat nope 02:36
how big is it now?
pugs that is?
I'll take a look and see if I can cruft it up a little bit ;) 02:37
rindolf thorat: there's a lot of code there. 02:38
They are in over r10K
thorat yes, and Haskell
that means 1000K of equivalent C right? 02:39
rindolf 15446
thorat: who knows.
But maybe.
Of course, Haskell has some implementation problems.
ghc can only be compiled by a recent version of itself.
thorat well I've managed to compile it; and there are nightly's as well 02:40
if you really need the bleeding edge
rindolf I know. 02:42
thorat and 6.6 is installed on my debian
rindolf But I also found Haskell impractical in many respects.
Some algorithms cannot be implemented in it well.
thorat: I have 6.6 here on MDV Cooker too.
thorat the stateful ones I guess
rindolf thorat: yeah.
thorat the imperative ones that is 02:43
rindolf Or ones that use array.
I got you.
thorat I've not used Haskell at all, but read a lot about it; lot's of papers
lots
rindolf thorat: I wrote stuff in Haskell. 02:44
thorat I'm like that; I read a lot about programming but don't really program much outside of work
rindolf Nothing too serious, but stilll.
thorat: what do you do at work?
thorat at the moment, I'm writing Perl; but I'm mostly at school this winter 02:45
before that I was programming Pocket PC
win32 api programming in C++
rindolf Heh. 02:46
Yes, I remember the Win32 API programming.
I once programmed a clock for it for the Technion. 02:47
Got 99% at that course.
thorat ok
thorat just googled Technion
yes, it's more fun than MFC IMO 02:48
it's a functional API, really 02:49
rindolf thorat: www.shlomifish.org/philosophy/compu...-technion/ 02:50
lambdabot Title: My opinion on the Technion, tinyurl.com/28lpby
pasteling "dustpyle_x2" at 209.169.127.17 pasted "trying to print '#' in front of each line of a file" (8 lines, 121B) at sial.org/pbot/23909 03:35
Tene hacks on a perl6 framework similar to SeaSide. 05:59
Patterner is SeaSide that good? 06:07
Tene Dunno, but I looked at some slides and read some articles, and there are some interesting ideas there.
I'm fighting between "build good infrastructure up front that can be re-used and add it to svn" and "hack something barely decent together so that you can start playing with the fun parts right away" 06:08
Patterner what is better for your karma? :) 06:10
jisom more commits 06:12
Tene Huh. This is weird. 06:15
use URI::Escape;
*** Not a keyed value: VInt 0 at Prelude.pm line 671, column 18-25
Patterner it's a sign! switch to ruby! 06:16
Aankhen`` BLASPHEMY 06:17
Patterner fights with wx-0.71 in the mean time
Aankhen`` BURN THE BLASPHEMER
Aankhen`` 80,6990476e.net) Quit 06:26
80,6990476[22:53:37] <kerlnel200> mattmcc?
O_O
That's not right.
Aankhen`` What is a "basal" class? 06:34
The sentence is from S09: But anyone (including the main application) can request that any class stay open or basal, and the class closer/finalizer must honor that.
Aankhen`` ?eval my @foo = <a b c d e>; say "@foo[]" 06:51
evalbot_r15808 OUTPUT[a b c d e␤] Bool::True
Tene Hmm. URI uses a blessed string, it looks like. 06:54
Can't quite figure out how to do that in pugs. 07:01
gaal Tene: I encountered that .kv-but-really-mmd-related problem a few weeks ago too 07:04
iirc the dispatcher enters the pair multi for some reason 07:05
I don't know why :-(
Aankhen`` waveth at gaal. 07:15
"Unicode horizontal whitespace is counted as whitespace, but it's better not to use thin spaces where they will make adjoining tokens look like a single token." # I smell... obfuscation! =) 07:18
gaal hey Aankhen``! :) 07:19
Aankhen`` :-D
Hacked anything interesting lately?
gaal not really
Aankhen`` Awww. 07:20
Ah well, there's plenty of time. =)
I've been re-reading synopses. Still not grokking multislices though. :-(
gaal Aankhen``: re that thought, there was the proposal of Acme::Oneliner that encodes any program *really* in one line
Aankhen`` I suppose it would help if I weren't half-asleep.
Heh, that would be fun.
gaal with zero-width whitespace
Aankhen`` Yowza. 07:21
gaal essentially, the file size encodes the program.
because you turn the program into a unary number, and prepend "use Acme::Oneliner;" to it. :-)
Aankhen`` Zero-width space as in U+200B?
gaal yeah 07:22
Aankhen`` LOL.
That would be so evil.
I'd forgotten that character even exists.
gaal you can compress this; there are three other zero-width chars.
Aankhen`` Heh. 07:23
gaal that's okay, it's hard to lose it among all those widful characters
Aankhen`` nods.
I thought hair spaces were about as thin as it gets.
Sorry if hair spaces don't actually exist... like I said, I'm half asleep, so I might be imagining things. 8-| 07:24
gaal otters have about 1k hairs in 1 sq. mm, so hairthin can be pretty thin. 07:25
Aankhen`` o_O
Scary thought.
Hmm, no wonder animators have such a hard time with hair.
Tene So do I keep hacking on trying to implement a blessed string, or do I give up and re-implement URI.pm while translating to p6? 07:26
Aankhen`` "re-implement URI.pm while translating to p6" == "port URI.pm to Perl 6"?
gaal blessed string? I think you want a role that "does" Str...? 07:27
but MO isn't totally landed yet so it prolly won't work completely.
Tene Yeah, p5 URI is a blessed string, and the methods modify $$self 07:28
gaal
.oO( p5 does not have blessable strings, it has blessable scalars )
Tene Hmm. I misunderstand, I suppose.
gaal let me look at the source... 07:29
Tene in _init
my $self = bless \$str, $class;
gaal okay, that's a scalar that happens to contain a string 07:30
you bless the container, not the string
Tene Ahh. I misunderstood. 07:31
gaal well, the reference to the container, anyway
Tene nodnod
I don't think I quite know enough to implement this correctly in the most useful way. 07:32
gaal then implement this incorrectly in a still somewhat useful way
and people will make it correct and more useful :)
Tene 'kay 07:33
gaal or shall I say, more correct
[ot, but hilarious] web.archive.org/web/20051119041610/...il_illegal 07:37
lambdabot Title: Making junk mail illegal, tinyurl.com/2arrx2
Tene Heh.
Aankhen`` LOL. 07:39
Tene Heh. That's funny. 07:40
Aankhen`` Is a tertiary sigil a thigil? 08:17
# just musing.
moritz nothingmuch: ping 11:09
anyway... 11:10
@tell nothingmuch on perlcabal.org/~nothingmuch/harrorth/doc/02.kwid there is a dead link, the one to the forth tutorial (moved to somewhere under www.jforth.org/ but I can't reach that page)
lambdabot Consider it noted.
DarkWolf84 why there is no anything for the references at the synposises 11:45
moritz DarkWolf84: hm? the synopsys _are_ the specs - and anything that is not mentioned stays the same as in perl 5 11:46
DarkWolf84 ok
lichtkind does anybody knoe here when larry was employed by JPL? 13:50
svnbot6 r15809 | kudra++ | Ready to publish 14:01
xerox lichtkind: is that the Jet Propulsion Lab? 14:04
pasteling "evalbot_r15808" at 194.145.200.126 pasted "Pugs build failure" (325 lines, 18.4K) at sial.org/pbot/23912 14:07
lichtkind xerox: jes 14:10
lichtkind TimToady: ping? 14:35
moritz can anybody tell me what the difference between "regex" and "token" is? 15:14
lichtkind moritz: token are much simpler
simpler rules 15:15
moritz lichtkind: I mean the p6 keywords
lichtkind thats what im talking about
in rules you can be made out of rules
moritz but that's not a semantic difference 15:16
lichtkind token are smallest parts per def
moritz so tokens my not consist of other tokens/rules?
lichtkind yes
thats one differenc
e
they also have smaller possibilities in syntax
moritz lichtkind++ #thanks ;)
lichtkind gerne 15:17
moritz wow, Germany is winning in all competitions of the Table Tennis European Championship
(and probably nobody takes notice ;)
lichtkind moritz: and nobody believed it enyway 15:18
moritz currently teaches his (p5) offline CMS to do syntax hilighting 15:22
moose
lichtkind moritz cool maybe i could use that well 15:23
moritz lichtkind: svn co casella.verplant.org/svn/moritz/mowyw/
lichtkind: the idea is to pipe anything in [[[syntax perl6]]]$perl6_code_here[[[endsyntax]]] through Text::VimColor 15:24
lichtkind thats no solution for me 15:25
by
spinclad moritz: see S05. C< token { ... } > is just short for C< regex :ratchet { ... } >, so it never backtracks at that level. otherwise equivalent. 16:07
moritz spinclad: thanks 16:08
gaal spinclad: hey! :) 17:13
DarkWolf84 how to check the type of object 17:59
luqui ?eval "foo".type 18:00
no evalbot
evalbot_r15809 Error: No such method in class Str: &type 18:00
luqui ?eval "foo".ref
evalbot_r15809 Error: No such method in class Str: &ref
luqui hmm
?eval "foo".class
evalbot_r15809 Error: No such method in class Str: &class
moritz ?eval "foo".WHAT
evalbot_r15809 ::Str
luqui ahh, the mm stuff
moritz ?eval print "foo is a string" if "foo".WHAT eq "Str"; 18:01
evalbot_r15809 OUTPUT[foo is a string] Bool::True
moritz wants a generate $foo.WHY that returns 42 ;-) 18:02
s/generate/general/
DarkWolf84 :)
that will be interesting idea :P 18:03
thank u btw
moritz and propably p6 has a rather easy way to implement such a feature in p6 itself 18:04
DarkWolf84: what for?
gaal $romans.WHEREFORE_REJOICE_WHAT_CONQUEST_BRINGS_HE_HOME
DarkWolf84 i forgot the method 18:04
gaal you just need a multi in * for that.
DarkWolf84 btw my version says only type not ::type 18:06
?eval my $a=2; say $a.WHAT; 18:07
evalbot_r15809 OUTPUT[Int␤] Bool::True
moritz DarkWolf84: the '::' only comes out in the interactive version, eg if you don't use it, 18:08
?eval 2.WHAT
evalbot_r15809 ::Int
moritz ?eval ~2.WHAT 18:09
evalbot_r15809 "Int"
DarkWolf84 that is from evalbot
moritz ~ forces string context, so the "::" disappears
DarkWolf84: if you run pugs interactively you will see the "::" as well
DarkWolf84 hm :: only appeares in constant context 18:11
?eval 2.WHAT; my $a=2; say $a.WHAT; 18:13
evalbot_r15809 OUTPUT[Int␤] Bool::True
DarkWolf84 ?eval say 2.WHAT; my $a=2; say $a.WHAT;
evalbot_r15809 OUTPUT[Int␤Int␤] Bool::True
DarkWolf84 ?eval say 2.WHAT;
evalbot_r15809 OUTPUT[Int␤] Bool::True
DarkWolf84 ?eval say 2.WHAT.perl; 18:14
evalbot_r15809 OUTPUT[::Int␤] Bool::True
DarkWolf84 i got it
Leibsle !seen lichtkind 20:28
Aankhen`` lichtkind was last seen being eaten by Aankhen``, that was 4hrs ago. 20:29
moritz Leibsle: I saw lichtkind leaving #perl6 roughly 5 hours ago
Leibsle moritz, thanks :)
i was still in frankfurt to that time 20:30
moritz Leibsle: and if you want a bot to answer, use @ instead of ! ;-)
Leibsle: so where are you now?
Leibsle ah, good tip
i am now back to Reutlingen
240 km more southern
moritz ok ;)
Leibsle :P 20:31
moritz #perl6 is full of bots, sometimes you don't know which to ask 20:31
Leibsle nods and smiles
but i like bots if they are peaceful 20:32
Aankhen`` brings his warmongering bot in to start a fight with Leibsle. 20:33
Leibsle :-/
war = 'not good'; 20:34
Aankhen`` Can't modify constant item in scalar assignment
Leibsle eval: $war = 'not good';
buubot Leibsle: not good
Leibsle see. buubot said so 20:34
svnbot6 r15810 | Jedai++ | t/examples/99problems/problem90.t more perlish, problem91.t pass his test 20:51
moritz Jedai++ # really more perlish, though a bit longer iirc ;-) 20:54
Jedai Well in fact I already changed the code in my last commit to use this method 20:56
this time I just made minor changes
I don't know if my first change was really a good idea
moritz Jedai: my original implementation was in C, so it was not perlish at all - just fast in C ;-) 20:57
Jedai it cut the execution time by at least a factor three
Everything is fast in C !
moritz not quite, if you scale it to the $n-Queen's Problem ;) 20:58
Jedai See problem91.t for an algorithm who ought to be fast (it's not even backtracking) but is slowed down by implementation issues
(I guess all those objects aren't so light...) 20:59
moritz: Yeah, the new code should scale better I think
even in C
moritz would be an interesting comparison - afaict there are more array operations and less backtracking involved... 21:01
I guess as long as all arrays fit into the cache it's faster ;)
Jedai Yeah, and then slower if it doesn't 21:02
for sure !! :D
Well on my computer for the 8-Queen's Problem it went from 1'40" to 20' so I changed it, maybe I should have put both method in. I lack experience in this field (contributing an Open Source project) 21:06
What do you think ?
moritz Jedai: no, it's fine... the best method wins ;) 21:07
Jedai: and the old one still lives in the SVN repository - if somebody really cares ;-)
Aankhen`` ?eval <<:a(1) :!b>> 22:03
evalbot_r15810 (":a(1)", ":!b") 22:03
Aankhen`` ?eval <<:a(1) :b(2)>> 22:04
evalbot_r15810 (":a(1)", ":b(2)")
Aankhen`` ?eval «a b c d»
evalbot_r15810 ("a", "b", "c", "d")
Aankhen`` ?eval «:a(1) :!b c d»
evalbot_r15810 (":a(1)", ":!b", "c", "d") 22:05
Aankhen`` Poop.
Jedai What shoul it do ? 22:14
s/shoul/should/
Aankhen`` Jedai: :!b is supposed to be equivalent to a => 0 in P5. 22:15
Er.
b => 0.
Not a => 0.
Aankhen`` ?eval "\c[NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE]" 22:30
evalbot_r15810 "⊯"
moritz evalbot_r15810: that's a good answer ;) 22:32
Jedai ?eval :!b 23:02
evalbot_r15810 ("b" => Bool::False)
Jedai Aanhen`` : But doesn't << >> turn everything but variables into strings ? 23:03
?eval $a = "o"; <<a $a b>>
evalbot_r15810 ("a", "o", "b")
Juerd IIRC, it even splits variables if they're not quoted
?eval $a = "o o"; <<f $a>>
evalbot_r15810 ("f", "o", "o")
Juerd ?eval $a = "o o"; <<f "$a">> 23:04
evalbot_r15810 ("f", "o o")
Juerd Just like shells do.
Jedai Cool (but confusing)
Juerd Not confusing once you know it :)
And since many of us use shells all the time, we'll probably as a community learn the semantics quickly :)
Jedai I guess you can think of it as a 2-step process, like the regex interpolation in Perl5 23:05
Juerd Don't remind me of that. 23:06
Because it reminds me of /$foo/ in Perl 6 being /"$foo"/ rather than /<$foo>/ 23:07
So that's a slight inconsistency between // and <<>>
Jedai The regex interpolation in Perl6 is much better off like IMHO 23:13
Since that's what most people expect when they first encounter it in Perl5 23:14
Juerd I doubt both the reasoning and the validity 23:17
Aankhen`` Oh, I guess I misunderstood the angles. 23:20
Thanks. :-)
Jedai My experience with Perl newbies (which aren't always that bright anyway) seems to suggest so. But I never taught Perl formally, so I guess you might know better.
Aankhen`` Error: Range operation compromised due to sorting of delta after gamma. Burst into flames? (y/y) 23:22
dduncan question, what is the MANIFEST.SKIP entry to match any file containing parenthesis? a line with just \( doesn't seem to work 23:24
Jedai Is there a way to write a lazy iterator in Pugs actually, to get the same behaviour as filehandles ? 23:25
moritz Pugs is turing complete... *duck* ;-) 23:28
Aankhen`` ?eval Pair.does(Str) 23:29
evalbot_r15810 Bool::False
Jedai Well I can write a lazy iterator, you're right in this sense, don't duck ! ;) But at a syntaxical level I wondered if I could use it in a for like a "=filehandle" 23:30
Jedai ?eval ~:a 23:37
evalbot_r15810 "a\t1"
moritz ?eval "foo bar" ~~ m/<ident><ws><ident>/ 23:55
evalbot_r15810 *** Cannot parse regex: <ident><ws><ident>␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
moritz what's the error? 23:56
and is it intended that $<ident> is undef (instead of, eg an array of match object)? 23:57