»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
jnthn (repr_defined ain't a method, just an "operation" that tells us if the repr thinks the thing is undefined) 00:00
(which differentiates type objects from non-type objects)
lue rakudo: say ":a<b>" ~~ /<colonpair>/ 00:01
p6eval rakudo : OUTPUT«Method 'colonpair' not found for invocant of class 'Cursor'␤ in <anon> at line 22:/tmp/614lJyGazv␤ in 'Cool::match' at line 2509:CORE.setting␤ in 'Regex::ACCEPTS' at line 6016:CORE.setting␤ in main program body at line 22:/tmp/614lJyGazv␤»
jnthn lue: In theory, /<Perl6::Grammar::colonpair>/. In practice, pmichaud++ didn't get around to implementing that yet.
lue curse you, NYI! 00:02
sorear ummm... I don't think so 00:03
Perl6::Grammar::colonpair is going to be using a lot of other rules
which a bare Cursor won't have
it should be / [ :lang(Perl6::Grammar) <colonpair> ] /
lue rakudo: say ":a<b>" ~~ / [ :lang(Perl6::Grammar) <colonpair> ] / 00:05
p6eval rakudo : OUTPUT«===SORRY!===␤Confused at line 22, near "say \":a<b>"␤» 00:06
lue
.oO(Every time I tackle grammar, all roads lead to the inability to use regexes from other grammars.)
00:10
00:12 oha left
lue rakudo: say ":a<b>" ~~ / { Perl6::Grammar.colonpair } / 00:15
p6eval rakudo : OUTPUT«␤»
sorear trying to mix and match regexes between grammars is a job for Dr. Frankenstein 00:16
00:19 takadonet joined
takadonet yo 00:19
00:29 orafu left 00:30 orafu joined 00:33 masak joined
masak just came back in to say this: 00:33
tadzik++! # ttjjss.wordpress.com/2010/11/27/gra...p-further/
diakopter masak: wb!
masak tadzik: that is the coolest blog posts I've read in a long time.
s/posts/post/ 00:34
jnthn scurries off to read it now rather than saving it for later :)
masak tadzik: also, you rock.
jnthn Wow 00:35
tadzik++
masak tadzik: though you shouldn't return 200 on a 404 error :P
tadzik: also, if 'token e404 { }' works in Rakudo, then that's a bug. 00:36
rakudo: grammar G { token e404 { } }; say "alive"
p6eval rakudo : OUTPUT«alive␤»
masak submits rakudobug
dalek ecza: f2ae111 | sorear++ | / (5 files):
Do Hash.kv et al eagerly
00:37
sorear disappointingly small speedup
down to 58s
masak that's, hm about 1.5%? 00:38
sorear 59.7 to 58.2, so a bit more, but I don't think my measurements are reliable past the 1. 00:39
00:40 BinGOs_ joined 00:41 `26 left
jnthn std: grammar G { token e404 { } }; say "alive" 00:41
00:42 diakopte1 joined
masak STD.mp6 is 195kB in size, so you're doing 3.4kB/s. that's pretty impressive. 00:42
00:42 baest joined, Juerd_ joined
diakopte1 augh; lag/netsplit 00:42
00:42 gabiruh_ joined, kolibrie joined 00:43 pmichaud_ joined, cls_bsd_ joined
sorear back in June I set what I thought was a very modest goal 00:43
00:43 Maddingue joined, BinGOs left
sorear go 10 times faster than viv-STD 00:43
that works out to 15s on this hardware
00:43 TiMBuS joined, ch3ck left 00:45 y3llow left
takadonet has anyone have experience using submethod BUILD? 00:46
00:46 jdv79 left, jdv79_ joined, sbp left, Maddingu1 left, kfo left, gabiruh left, kolibrie_ left, Juerd left, phenny left, stepnem left
p6eval std a194beb: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/IZ1JDGbhhc line 1:␤------> grammar G { token e404 { ⏏} }; say "alive"␤ expecting quantifier␤Parse failed␤FAILED 00:01 119m␤» 00:46
00:46 allbery_b left, tylerni7 left
masak how fast is viv-STD? 2kB/s? 00:46
00:46 ch3ck joined, Juerd_ is now known as Juerd, tylerni7 joined, tylerni7 left, tylerni7 joined
masak takadonet: yes. 00:46
sorear masak: 1.3 kb/s then
00:46 phenny joined, __rnddim__ joined
masak sorear: oh, ok. so you're already more than twice as fast. 00:46
00:46 kfo joined, diakopter left
__rnddim__ apparently I'm not the only one that got the boot. 00:46
masak sorear: just a 5x speedup left ;)
00:46 Trashlord left, lue left, __rnddim__ is now known as lue
masak __rnddim__: there seems to be some kind of net upheaval going on. 00:46
00:46 eviltwin_b joined
lue that's better :) 00:46
00:46 `26 joined, `26 left, `26 joined, y3llow joined
takadonet masak: Having trouble where attributes are not being set when I add a submethod BUILD which only has one say statement in it 00:46
lue
.oO( I had to ghost my own nickname, things were so messed up :/ )
masak takadonet: known issue. want the RT ticket number?
takadonet masak: sure
masak looks
takadonet: rt.perl.org/rt3/Ticket/Display.html?id=68498 00:47
takadonet: as you see, it's been reported thrice so far. 00:48
00:48 tobij joined
takadonet masak: ya! 00:48
well damn it
00:50 Chillance left
lue iz blaggin' 00:54
dalek osystem: 11dc16f | takadonet++ | projects.list:
Added new project
00:57
masak Tree::Simple? 00:58
masak get curious
takadonet search.cpan.org/~stevan/Tree-Simple.../Simple.pm 00:59
not done commenting out perl 5 code so not building yet
00:59 Trashlord joined
masak takadonet: I think you forgot to change the path in that copy-paste, though. it points to your Text-Tabs-Wrap project. 00:59
takadonet however got a good chuck of the test passing 01:00
...
!!!
01:01 Trashlord left
dalek osystem: d066132 | takadonet++ | projects.list:
wrong git link
01:01
takadonet thanks masak
masak no prob
01:06 bartolin_ joined
takadonet rakudo: class E {has $.x; has $.y; method new($x) { self.bless(*,x=>$x); self.y = self.WHERE } }; E.new(5) 01:06
p6eval rakudo : OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!y␤ in 'E::new' at line 22:/tmp/Mdjt2wElZt␤ in main program body at line 22:/tmp/Mdjt2wElZt␤»
takadonet waits for the P6 gods to solve his problem 01:07
masak takadonet: you're mixing up levels, I fear.
takadonet: the 'self' in .new still points to the type object.
takadonet: you need to realize that a .new method isn't anything magical. 01:08
01:08 starcoder left, tylerni7 left, tylerni7 joined, tylerni7 left, tylerni7 joined
masak takadonet: if the .bless statement isn't last in the method, you need to save the result in a variable, and then modify the attributes on it before returning it. 01:08
lue blag toast! rdstar.wordpress.com/2010/11/28/al...%E5%9C%9F/
masak takadonet: but I'm not saying that's particularly good style.
01:09 starcoder joined
takadonet masak: what would be a good style then? 01:09
masak starcoder: where were you... ah, I already made that joke.
takadonet: initializing the object in the BUILD submethod.
takadonet masak: which cannot get default values right now... 01:11
masak takadonet: so what? :) work around it. we all do.
lue rakudo: say ":a<b>" ~~ Perl6::Grammar.colonpair
p6eval rakudo : OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Perl6;Grammar'␤ in main program body at line 22:/tmp/kRj2d5ODKh␤»
masak especially since the alternative (coming back in 2025 when Perl 6 is perfect) is so time-consuming. 01:12
takadonet masak: i know but just want to get it right the first time with less amount of hacks as possible
masak: there been lots of improving in the last few months
i'm really starting to enjoy porting modules over
masak takadonet: which is words, adding a comment and a workaround to something mostly correct, or using something known to be non-idiomatic Perl 6?
takadonet thinking of doing a 'hit list' 01:13
masak s/words/worse/
lue rakudo: say eval("a => b") ~~ Pair
p6eval rakudo : OUTPUT«0␤»
masak wow, I don't make eggcorns often.
lue: 'b' needs to be quoted.
lue yeah. 01:14
rakudo: say "a => 1" ~~ /{eval($_) ~~ Pair}/ # forgive me for I know it's wrong. I must be going insane. 01:15
p6eval rakudo : OUTPUT«␤»
jnthn Mmm...eggcorns sound potentially tasty
jnthn figgers it's time for sleep
masak lue: you gain nothing from putting it in a regex like that. 01:16
jnthn: eggcorns.lascribe.net/
jnthn: good night.
wow. "youthanism". 01:17
lue rakudo: say ":a<b>" ~~ /{Pair}/ # please, rakudo, please work.
p6eval rakudo : OUTPUT«␤»
masak I have no trouble seeing how reading that page often enough could have a corrupting influence.
jnthn masak: oh, cool
masak lue: your misuse of features makes me want to rebuke you. 01:18
jnthn sleep &
masak lue: please realize why what you're writing not only doesn't work, but can't possibly.
takadonet can you have multi submethod BUILD?
masak takadonet: sure!
takadonet hmmm probably something dumb on my part
masak takadonet: it's just a normal submethod. 01:19
takadonet: recall that dispatch works differently on named parameters.
the details are in S06.
takadonet this would be positional based parameters
masak in BUILD? 01:20
er... why?
takadonet brb
lue sorry, I'm just trying to find ways to make matching to the colonpair rule work. 01:22
masak lue: experimenting in crazy ways should, of course, be encouraged. but it's painful to see you try things out in ways that obviously won't work.
programming is not the result of haphazardly mixing together language features. :) 01:23
Tene "Katahdin is a programming language where the syntax and semantics are mutable at runtime." -- www.chrisseaton.com/katahdin/
lue shows you how little I know. Everything above (until the moment it ran of course) seemed like it might possibly in some small way have a chance at working. :) 01:24
masak Tene: brought up by diakopter++ in June 2008, and by mncharity three months prior :) 01:25
lue: would you like me to explain why not?
Tene It's insufficiently interesting for me to look into in depth right now, but I thought it might be for someone else here.
01:26 takadonet left, justatheory left
lue I think I see why. Even typing them up, I realized they're a convoluted way of doing what I want. Of course I don't know the technical details. 01:27
masak the first was just a Useless Use of Regex.
Tene rakudo: say Perl6::Grammar.parse(':a<b>', :rule<colonpair>);
p6eval rakudo : OUTPUT«:a<b>␤»
masak the second was... belief in magic.
Tene++
lue: there you go, then. 01:28
lue (did you see my blag toast above? It might explain the method to my madness.)
masak lue: I started reading it, yes. I'll finish now. 01:29
lue I guess my grammar'll have to match to any text and sort it out later in the code. Blerg.
Tene lue: You *should* be able to use <Perl6::Grammar::colonpair>, but that's NYI
masak Tene: but sorear said in the backlog that that's not true. 01:30
Tene reads backlog.
lue I remember a bit back some people saying <A::B::C> was a Bad Idea™.
masak rakudo: grammar G { rule TOP { \=begin code (.*) <?{ Perl6::Grammar.parse($0, :rule<colonpair>) }> } }; say so G.parse(q[=begin code :allow<R> ]) 01:33
p6eval rakudo : OUTPUT«Bool::True␤»
masak lue: that should be enough for your purposes.
lue: you need, of course, to be a bit careful with the (.*)
Tene 17:03 < sorear> it should be / [ :lang(Perl6::Grammar) <colonpair> ] / -- If that would be able to work, why couldn't <Perl6::Grammar::colonpair> compile to the same thing?
masak Tene: for one thing, because the <colonpair> rule isn't our-scoped. 01:34
lue So I should've used $0 instead of $_ in regexes.
masak Tene: using :: like that in grammars seems Wrong after the alpha->ng refactor.
lue: well, no, that's not all you should have done.
lue: but I use $0 here to talk about the (.*) 01:35
Tene re 'grammar dispatching - a step further', while grammars do work for that, that's exactly the place that you'd ideally use a declarative sublanguage. 01:37
Foo { dispatch /^ '/api/' (\S*)/ { given $/[0].Str { ... } } } 01:38
masak Tene: please please back that up with pretty code in a blog post! <3
Tene or whatever
masak doesn't matter if it doesn't run in Rakudo today. 01:39
it'd be a nice goal to aspire towards.
Tene masak: I'm not really blogging these days... Lemme see what I can put together, though.
masak a gist works, too. 01:40
Tene And then some other enterprising person could blog about it.
But where could we find someone that bloggy?
masak I'm sure there are people willing to pick up such a challenge. 01:41
lue would the line regex config { (\H+) <?{ Perl6::Grammar.parse($0, :rule<colonpair) }> } work as well?
masak lue: think so. 01:42
lue oh! pretend there's a >
masak lue: but \H matches vertical whitespace. better \S
Tene masak: whitespace can occur in a colonpair 01:43
:foo< bar >
masak that's true too.
Tene :foo('foo bar baz')
etc
masak it's basically a Text::Balanced problem, then.
lue that's probably why it's not working. [because I'm using it inside a regex as so: regex extraconfig{ \= [\h+ <config>]+ } ] 01:44
masak lue: how's the TDD bit going? 01:45
lue good, I think. The tests I've written are great so far, I'm stuck on the "making those tests pass" part of the cycle :) 01:46
masak which test in particular? 01:47
Tene rakudo: eval(":foo(\n'bar'\n)").WHAT
p6eval rakudo : ( no output )
Tene rakudo: eval(":foo(\n'bar'\n)").WHAT.say
p6eval rakudo : OUTPUT«Pair()␤» 01:48
Tene So, even newlines can be there
masak Tene: though not in Pod.
(I think)
huh, maybe they can.
maybe that just falls out of the way the <colonpair> subrule works. 01:49
but I've seen no indication that they should in S26.
lue excuse me, I think I miswrote the test in question. .oO(TDD for TDD?)
masak that's normal too. 01:51
Tene masak: Well, there's always loldispatch-style, which I wrote ages ago
masak but it's more important to have a test than to get it right the first time.
Tene Doesn't quite fill exactly the same niche, but close
masak Tene: yeah.
01:52 colomon joined
lue <colonpair> doesn't give me the various pieces of the actual colonpair, does it? (i.e. doesn't give me the 'a' and 'b' in :a<b> seperately) 01:52
01:53 shachaf joined
Tene lue: It certainly does. 01:54
masak rakudo: Perl6::Grammar.parse(':a<b>', :rule<colonpair>); say $/.perl
p6eval rakudo : OUTPUT«Any␤»
masak :(
Tene rakudo: my $m = Perl6::Grammar.parse(':a<b>', :rule<colonpair>); say $m<key>; say $m<value>;
p6eval rakudo : OUTPUT«Null PMC access in invoke()␤ in main program body at line 1␤»
masak grr
Tene rakudo: my $m = Perl6::Grammar.parse(':a<b>', :rule<colonpair>); say $m<key>; say $m<value>;
p6eval rakudo : OUTPUT«Null PMC access in invoke()␤ in main program body at line 1␤»
masak surely submitted already.
Tene o.O
lue nooo! [actually, it's been forever since I've seen a null PMC] 01:55
Tene rakudo: say Perl6::Grammar.parse(':a<b>', :rule<colonpair>);
p6eval rakudo : OUTPUT«:a<b>␤»
Tene rakudo: say Perl6::Grammar.parse(':a<b>', :rule<colonpair>).WHAT;
p6eval rakudo : OUTPUT«Regex::Match()␤»
masak there you go.
Tene rakudo: my $m = Perl6::Grammar.parse(':a<b>', :rule<colonpair>); say $m.WHAT
p6eval rakudo : OUTPUT«Regex::Match()␤»
masak not a Perl 6 object.
it's from nqp-rx.
Tene Rakudo should not fail that badly with non-native objects. 01:56
masak full ACK
add it to my ever-growing list of "Rakudo should"s :P
Tene But, well, that just gets back into why I stopped contributing, so I'll shut up about it. 01:57
masak I've heard that bitching about open source is the second-best way to contribute. :P
01:58 gbacon left
Tene Oh, weird, the colonpair rule doesn't set match variables, but contextuals instead. 01:58
lue (for the record, mberends's parser matches config options manually)
masak lue++ # looking at prior code
lue I now must experiment with something new I've found... 01:59
perl6: say "<A>" ~~ / <.lt> <alpha> <.gt> /
Tene lue: By my reading of Grammar.pm, you'll have to eval it to get a pair object.
p6eval rakudo : OUTPUT«Method 'lt' not found for invocant of class 'Cursor'␤ in <anon> at line 22:/tmp/uwvczL4ddt␤ in 'Cool::match' at line 2509:CORE.setting␤ in 'Regex::ACCEPTS' at line 6016:CORE.setting␤ in main program body at line 22:/tmp/uwvczL4ddt␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
lue
.oO(curse you alpha-era code! .oO(I need to find the SHAKING FIST IN AIR unicode codepoint))
02:00
I would write it manually, I just would like to know: how many brackets can you use in pair notation? 02:01
masak lue: () <> «» {} []
lue: but I'd suggest supporting only the first two, as a start. 02:02
maybe even only <>
lue rakudo: say eval(":a「b」") ~~ Pair; 02:03
p6eval rakudo : OUTPUT«0␤»
Tene lue: arbitrary quotes aren't supported there.
lue I must be missing something, because matching a set of brackets in a regex when supporting multiple bracket sets is very annoying (to me at least). 02:05
(eg. making sure :a(hai> won't match)
masak lue: there are several examples already for how to do this with Perl 6 grammars. 02:06
lue: but do not try to overextend your grasp. start with <>.
02:09 gbacon joined
lue Alright. Something about having to do way more complicated things due to broken features irks me terribly though :) . 02:14
masak do like the rest of us do.
live with it. :) 02:19
or improve it.
lue
.oO(should I brave nqp-rx again? Can't see why not.)
02:21
masak unless you prefer passing tests to yak shaving, of course. 02:22
02:25 ch3ck left
Tene grammar Foo { rule lol { ... }; rule bracketed { '<' ~ '>' <lol> | '(' ~ ')' <lol> | ... } } 02:26
Is the standard way of handling it, approximately. 02:27
alternately: my %index = ( '<' => '>', '(' => ')' ); grammar ... rule foo { (<[<(]>) ... (.) <?{ $2 eq %index{$1} }> } } 02:29
approximately
If you really want just a single alternative
The advantage of the first one is that you can do different things based on the brackets
An even nicer option is to use protoregexes, but I don't recommend them often, because I don't have a good understanding of the situations where people like them or not. 02:30
02:31 whiteknight joined
masak sleeps 02:32
diakopte1 'nite
02:32 masak left, diakopte1 is now known as diakopter
lue is there a Patron Saint of Working Features I can pray to? Maybe next time I come here it'll magically work like I want. 02:34
afk
02:42 stepnem joined 03:25 whiteknight left 03:33 _twitch left, envi joined
dalek odel: 61d214a | diakopter++ | dotnet/ (2 files):
[dotnet] more progress on regex prologue/epilogue & backtracking trampoline
03:44
diakopter ××× ××× 03:46
^ drunk with triple vision 03:49
04:02 petdance joined 04:15 takadonet joined
takadonet hey all 04:15
04:38 eviltwin_b is now known as allbery_b 04:39 gbacon left 04:48 cotto joined 05:37 `26 left 05:46 plobsing left 05:48 plobsing joined
takadonet soo quiet 05:52
TimToady is home 05:57
05:59 Chillance joined
takadonet is there a way to create an alias for a method ? 06:01
TimToady with .^add_method, perhaps 06:02
takadonet could work 06:05
sorear wb TimToady 06:15
06:33 petdance left 06:39 risou left 07:06 takadonet left 07:09 risou joined 07:14 redicaps joined 07:27 risou left 08:01 redicaps left 08:08 _kaare joined 08:24 BinGOs_ is now known as BinGOs 08:25 BinGOs left, BinGOs joined, risou joined 08:38 _kaare left 09:42 nonamime joined, nonamime left 09:51 risou left 09:57 Eevee_ joined, mj41_ joined 09:58 tobij_ joined, _ilbot2 left, _ilbot2 joined, ChanServ sets mode: +v _ilbot2, maluco joined, bartolin joined, huf_ joined 10:00 frodwith_ joined 10:01 betterworld joined, lamstyle left, Eevee left, tobij left, bartolin_ left, __rnddim__ joined, maluco_ left, huf left, frodwith left, mj41 left 10:02 mj41_ is now known as mj41, y3llow left 10:03 y3llow joined 10:05 lamstyle joined, wamba joined 10:06 cognominal__ joined 10:07 lue left, cognominal_ left, betterwo1ld left 10:08 tobij_ left, tobij joined, starcoder left 10:12 starcoder joined
MindosCheng Rakudo passes all the tests on my machine. 10:18
10:19 jhuni left 10:38 palik joined 10:40 nymacro joined 10:41 oha joined 10:45 Chillance left 10:47 sbp joined 10:55 nym joined 10:58 nymacro left
dalek ecza: e05e201 | sorear++ | / (2 files):
More direct implementation of Array.LISTSTORE
11:14
ecza: f72990f | sorear++ | v6/tryfile:
More direct implementation of Hash.LISTSTORE
sorear now 56.2s. Making progress... VERY slow progress :/
sorear -> sleep
11:40 MayDaniel joined, _kaare joined 12:07 palik left 12:09 Woodi left 12:15 oha left 12:16 oha joined 12:44 tobij is now known as churchill 12:58 MayDaniel left 13:06 whiteknight joined 13:07 iopluy joined 13:10 _twitch joined 13:28 alc joined
cosimo_ how can I refer to an object attribute through a variable? 13:33
tadzik what do you mean? 13:34
cosimo_ like this: method foo { my $attr = 'bar'; return $!$attr; }
which should return $!bar, but doesn't work
tadzik does it even parse? 13:37
$!$attr? 13:38
cosimo_ no exactly, it doesn't
tadzik can't you just return $!bar?
cosimo_ the example is a bit stupid 13:39
13:39 icwiener joined
tadzik What do you want to achieve? 13:39
13:41 Patterner left
tadzik bbl 13:41
13:51 Chillance joined 13:52 Psyche^ joined, Psyche^ is now known as Patterner 14:15 isBEKaml joined
cosimo_ what does this error mean? 14:17
"Type objects are abstract and have no attributes, but you tried to access $!debug"
arnsholt I think you tried to access an attribute in a type object 14:19
cosimo_ I'm trying to call a static method, Facter.debug() 14:21
and this method tries to access $!debug
14:21 nothingmuch_ joined
arnsholt $!debug is an instance member. I don't think you can access that from a static method 14:22
cosimo_ arnsholt: there is no way around this? 14:28
arnsholt If you need to access an instance member, the method has to be an instance method 14:30
Tene cosimo_: What would "around this" even mean? What would you want "access a member of an instance without using an instance" to even mean? If you mean for it to be an instance member, than access it on an instance. If you mean for the function to be purely static, then don't access instance members in it. 14:32
14:33 icwiener left
cosimo_ Tene: i'm trying to port an application from ruby, where apparently this distinction doesn't exist (???) 14:35
Tene cosimo_: in ruby, you have four types of variables: global, lexical, instance, and class.
If the ruby code used a class variable, then do the same in Perl: our $debug; 14:36
14:36 MayDaniel joined
cosimo_ Tene: I think this is where my ruby ignorance shines :) 14:37
Tene: so, '@@something' is a static variable then? 14:38
Tene cosimo_: Yes, iirc.
cosimo_ aha!
Tene and @something is instance
cosimo_ that clarifies everything
Tene iirc
cosimo_ i'll translate static variables to 'our $xxx' then 14:40
sorry, I realize I'm being lousy, but I'm learning a lot on the way :) Thanks 14:41
Tene Oh, no worries. 14:43
I'm just emphasizing that you need to understand what you actually want before asking someone else for it. :) 14:44
cosimo_ agreed :) 14:46
isBEKaml rakudo: say qw<alpha beta gamma delta>; # say strips spaces out of qw? 14:49
p6eval rakudo : OUTPUT«alphabetagammadelta␤»
Tene isBEKaml: no... 14:50
isBEKaml rakudo: say q<alpha beta gamma delta>;
p6eval rakudo : OUTPUT«alpha beta gamma delta␤»
arnsholt isBEKaml: That's just the default stringification of a list, IIRC
Tene rakudo: my @a = <alpha beta gamma delta>; say @a[0]; say @a[1]; # I see no spaces here that &say could be stripping
arnsholt (Or whatever kind of object qw// constructs these days, I can't remember)
p6eval rakudo : OUTPUT«alpha␤beta␤»
Tene isBEKaml: qw<...> is the same as ('alpha', 'beta', 'gamma', 'delta') 14:51
isBEKaml rakudo: my @a = <alpha beta gamma delta>; @a.say;
p6eval rakudo : OUTPUT«alphabetagammadelta␤»
Tene rakudo: my @a = <alpha beta gamma delta>; say @a.perl;
isBEKaml Tene: Ah, I see now.
p6eval rakudo : OUTPUT«["alpha", "beta", "gamma", "delta"]␤»
Tene See? 14:52
isBEKaml as arnsholt said, that's just the default behaviour. okay. 14:53
14:56 risou joined 14:57 masak joined
masak oh hai, #perl6! 14:57
arnsholt Greetinks!
isBEKaml hi, masak! 14:58
masak I'm only staying on for about an hour. going to work a bit on the Web.pm tests.
isBEKaml masak: I tried to watch your YAPC::EU presentation (perl6 appetizers) on presentingperl.com. Unfortunately, it had no audio. :( 14:59
masak isBEKaml: yeah, I know. :/ 15:00
Tene morning masak
masak ISTR it only showed me, too. not the slides.
jnthn o/ masak
isBEKaml masak: yeah, the cam focussed only on the presenters not the slides. Same with other talks too. :/ 15:01
masak I'm not sure how well the talk would have worked that way anyway. 15:02
isBEKaml silent movie, anyone? :D
masak isBEKaml: if you want, I can put up the slides source.
isBEKaml masak: if that requires inkscape or something similar, I can't build them here. :(
can you just upload the pdf or something? 15:03
masak no, it's Pod6.
isBEKaml yeah, sure.
masak thing is, the PDF became very big due to a tactical mistake with repeated images.
but the slide source should be informative.
isBEKaml sure, I can take it, then. :) 15:04
masak isBEKaml: gist.github.com/718999
oh my, gist interpreted it as actual Pod. 15:05
I'd better massage it down to Pod5-ish, then.
isBEKaml masak: no worries, I cloned it. 15:06
masak++
masak almost done here.
there: gist.github.com/718999 15:07
15:08 dual left
isBEKaml thanks. 15:09
masak std: my $path; $path ~~ s[\.pm6?$][];
p6eval std a194beb: OUTPUT«===SORRY!===␤Missing assignment operator at /tmp/S1pCJ8XubF line 1:␤------> my $path; $path ~~ s[\.pm6?$]⏏[];␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ quantifier␤Parse failed␤FAILED 00:01 124m␤»
masak std: my $path; $path ~~ s[\.pm6?$] = "";
p6eval std a194beb: OUTPUT«ok 00:01 123m␤»
masak changes that, too
moritz_++ 15:10
isBEKaml btw, I just noticed it now. where's the version number rakudo's evalbot output?
rakudo: say 42;
p6eval rakudo : OUTPUT«42␤»
masak o.O 15:11
Tene jnthn: ping 15:15
jnthn: trying to look into 6model, and running into problems building anything. 'make' and try.sh in dotnet/compiler/ both seem to want dotnet/runtime/bin/Debug/RakudoRuntime.dll, which doesn't seem to be checked in, and I don't see anything that would build that. 15:17
jnthn Tene: Ah...I thought the Makefile handled that now, but I guess the runtime still needs building independently. 15:20
Tene: Go to the runtime directory and do:
xbuild Rakudo.Net.sln
That should give you the dlls.
*dll 15:21
I told masak++ how to do this recently and then forgot to write it down somewhere... 15:22
Tene Hmm. That helped. Now it's trying to invoke csc, which I seem to not have. 15:26
jnthn Alias csc to gmcs 15:27
.oO( Need a build/config thingummy... )
Tene also msbuild->xbuild
jnthn *nod*
Tene Also had to adjust \ -> / on one rule.
15:30 nym left 15:31 Trashlord joined
dalek odel: e3d0423 | tene++ | dotnet/compiler/Makefile:
Fix slashes in dotnet makefile
15:33
Tene Okay, first commit to 6model :)
Tene Yay, crash! 15:35
It fails with some kind of wine problem... o.O 15:38
jnthn wtf. 15:42
wine?
We...don't even depend on anything graphical. :S
Tene it brings up gui crash reports for me, and something about not being able to find wineboot.exe 15:44
jnthn :S
Tene Lemme just remove all the wine packages and try again.
jnthn OK 15:45
phew, your makefile twiddle didn't break anything on Windows :)
Tene jnthn: I saw that the other makefile rules were similar 15:46
jnthn: Ah, it has something to do with trying to directly execute the mono-generated win32 executable
[sweeks@sweeks-laptop compiler]$ file RakudoOutput.exe
RakudoOutput.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly
try.sh runs that directly
seems to pass tests if I replace that with 'mono ./RakudoOutput.exe' 15:47
jnthn oh, nice :) 15:48
OK, so...close :)
Tene I don't know enough about wine to know how or when that should or shouldn't work :)
jnthn I'm still confused how wine got invovled... 15:49
Tene jnthn: wine must have registered some sort of handler for all win32 executables
flussence kernel executable format interpreter thingy?
you can tell the kernel to do that, same way it figures out the #! line when it sees it... 15:50
flussence looks it up
jnthn Tene: Ah...and then it gets confused when it sees it's .Net bytecode file...
Tene jnthn: more likely, my wine install was screwed up.
Or, maybe that too. 15:51
I certainly didn't have the windows version of mono installed anywhere wine could have seen it.
flussence oh, here we go
/proc/sys/fs/binfmt_misc does all the magic stuff of "open .exe files in wine without asking" 15:52
Tene jnthn: try.sh is for non-windows only, yes? Should I refer to 'mono' there, or is there a more-agnostic way of saying that?
flussence: www.mono-project.com/Guide:Running_...ux_only.29
jnthn Tene: Yes, I think try.sh is only used for non-Windows. 15:54
The try.bat is there for Windows folks.
dalek odel: 35d6ffe | tene++ | dotnet/compiler/try.sh:
Use mono directly in try.sh for dotnet
15:55
Tene All tests successful. 15:56
Files=42, Tests=286, 548 wallclock secs ( 0.24 usr 0.06 sys + 536.67 cusr 15.34 csys = 552.31 CPU)
Result: PASS
jnthn \o/ 15:58
bbiab 16:00
Tene LHF.txt is disappointingly short. 16:01
16:02 colomon left
isBEKaml masak: I'm still looking at your slides. great stuff! (another win, helps me recall syntax. :D) 16:05
masak isBEKaml: glad to help. 16:06
isBEKaml: I wasn't overly pleased with the presentation, for various reasons. so I'm especially glad to know that the material is useful to someone now. :) 16:07
isBEKaml I got a question, though. In your section, "Multi methods as recipe for success", you use given-when to smartmatch against types/classes for branching into actions.
masak yes?
oh!
yes, it stops one step short, doesn't it? 16:08
might be because the previous section took that step.
Replace if statements with multis with more precise signatures.
isBEKaml is there a way to do something like say, method foo(Type sometype) and let that type handle the branching accordingly? I could define same methods in those classes, ofcourse. callsame?
masak you're looking for 'multi method'.
isBEKaml and, that too. :)
masak see the last example in the previous section. 16:09
isBEKaml No. a single method. branches to the specific class for the method implementation.
masak now I'm no longer sure what you mean.
jnthn Tene: It used to be longer but diakopter++ kept picking the fruit. :P
Tene heh 16:10
jnthn Tene: Let me put some new stuff in.
isBEKaml alright, this goes some way... :S
Tene I'm having trouble actually finding the implementation of NQPAttribute, although I see mentions of it in several places.
masak isBEKaml: feel free to fill in with concrete details, and I might catch on.
isBEKaml class A { method bar { ..} } class B { method bar { .. } } class C { method foo(Type T) { T.bar } ?
16:11 dual joined
masak right. that's runtime polymorphism. 16:11
jnthn Tene: Alas, that LHF is, it turns out, done...
isBEKaml the type T is very generic. the method implementation has to be looked up.
masak works out of the box.
as long as A ~~ T and B ~~ T.
jnthn Tene: But didn't get removed from the file when committed, it seems. :(
NQPAttribute is implemented internally, inside KnowHOWBootstrapper.cs. 16:12
Tene jnthn: despite not containing that string anywhere in that file?
masak rakudo: class T {}; class A is T { method bar { say "A" } }; class B is T { method bar { say "B" } }; sub foo(T $thing) { $thing.bar }; foo($_) for A.new, B.new
p6eval rakudo : OUTPUT«A␤B␤»
jnthn Tene: Oh, wait...I was thinking of KnowHOWAttribute 16:13
Tene: NQPAttribute's source is in common/NQP/NQPSetting.pm
Tene Ah.
isBEKaml masak: ah, you answered the question! (pychic masak!)
duh, psychic* 16:14
masak isBEKaml: I have the benefit of having tread most of these paths at least once, looking for bugs. :) 16:16
isBEKaml masak: now what would happen if I were to insert a role? Classes override roles, right?
or is it the other way?
masak isBEKaml: imagine that roles don't exist at runtime.
isBEKaml: that is, they "melt into" the classes they participate in. 16:17
isBEKaml: the only way you can tell they're still there is by smartmatching against them.
isBEKaml masak: smartmatching against them? the roles themselves? 16:18
masak yes.
isBEKaml: the Big Advantage of roles over multiple inheritance is that roles complain if you try to compose two roles with the same method longnames.
rakudo: role A { method foo {} }; role B { method foo {} }; class C does A does B {}
p6eval rakudo : OUTPUT«===SORRY!===␤Method 'foo' collides and a resolution must be provided by the class␤»
isBEKaml masak: that is, classes and roles cannot have the same method?
masak oh, sure they can. 16:19
rakudo: role A { method foo {} }; class C does A { method foo {} }
p6eval rakudo : ( no output )
masak rakudo: role A { method foo {} }; class C does A { method foo {} }; say "alive"
p6eval rakudo : OUTPUT«alive␤»
masak isBEKaml: that's how the role-method conflict is resolved, in fact.
isBEKaml rakudo: role A { method foo { say "role" }; class B does A { method foo { say "class: " }; }; B.new.foo;
p6eval rakudo : OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
16:20 risou left, `26 joined, `26 left, `26 joined
masak isBEKaml: the rule there is: methods declared in the class take precedence over methods declared in the role. 16:20
isBEKaml rakudo: role A { method foo { say "role" }; };class B does A { method foo { say "class: " }; }; B.new.foo;
masak isBEKaml: it's an "I know what I'm doing" rule.
p6eval rakudo : OUTPUT«class: ␤»
16:20 risou joined
masak isBEKaml: the collision detection is only meant to prevent *unknowing* collisions. 16:21
16:22 colomon joined
isBEKaml rakudo: class T { method foo { say "T" }; }; role F { method foo { say "ROLE" }; }; class A is T does F { method foo { say "A" }; }; class B is T { method foo { say "B" }; }; sub bar(T $ff) {$ff.foo }; bar($_) for A.new,B.new; 16:22
masak afk &
p6eval rakudo : OUTPUT«A␤B␤»
16:22 masak left
isBEKaml rakudo: class T { method foo { say "T" }; }; role F { method foo { say "ROLE" }; }; class A is T does F { }; class B is T { method foo { say "B" }; }; sub bar(T $ff) {$ff.foo }; bar($_) for A.new,B.new; 16:23
p6eval rakudo : OUTPUT«ROLE␤B␤»
isBEKaml masak++
16:27 ch3ck joined, PacoLinux left, icwiener joined 16:29 PacoLinux_ joined, PacoLinux_ is now known as PacoLinux
dalek odel: 31726b5 | jonathan++ | dotnet/LHF.txt:
[dotnet] Update LHF; remove done task, and add a few more ideas. (Got some more to write up soonish too...)
16:31
colomon Advent! 16:32
16:37 alc left 16:48 ilogger2 joined, ChanServ sets mode: +v ilogger2 17:10 MayDaniel joined 17:19 lidden joined 17:20 JodaZ joined
lidden With this month rakudo* I get "Could not load oplib `perl6_ops'" unless I run perl6 from within the rakudo dir. It used to work. Did I do someting wrong when I compiled it? 17:22
Ignore me, I am stupid. 17:28
JodaZ wtf are junctions 17:34
its a set or list with a any,all or one flag set ? 17:38
lidden Things that have more than one value at a time "my $foo = any(1,2,3,4); say 'Yo' if $foo == 3;'" will print "Yo".
JodaZ seems useless 17:40
17:41 justatheory joined
JodaZ i hope conversion from set and list to junction is efficient >_> 17:41
lidden Not at all useless. If you want to know if an array has a value you can do "if any(@foo) == $x { # do stuff", and other useful constructs 17:42
JodaZ yeah, but if you want efficiency with those fries you want to have foo as a hash anyways
17:45 MayDaniel left
flussence Junctions autothread. 17:52
colomon or at least, junctions are allowed to autothread 17:53
JodaZ all(1,2,3) == all(2,1,3) ? 17:54
flussence rakudo: say all(1,2,3) == all(2,1,3)
colomon rakudo: say all(1,2,3) == all(2,1,3)
p6eval rakudo : OUTPUT«all(all(Bool::False, Bool::True), all(Bool::True, Bool::False), all(Bool::False, Bool::True))␤» 17:55
flussence hah :)
JodaZ say what
colomon you beat me to it.
flussence rakudo: say all(1,2,3) === all(2,1,3) #?
p6eval rakudo : OUTPUT«Bool::False␤»
JodaZ wtf
flussence doesn't know if/what the correct op is OTTOMH 17:56
JodaZ it should be true, right ?
flussence for some specific comparison operator that tests junction equality, yes 17:57
17:58 mavrc joined
JodaZ rakudo: any(1,2) == any(1,3) 18:00
p6eval rakudo : ( no output )
JodaZ rakudo: say any(1,2) == any(1,3)
p6eval rakudo : OUTPUT«any(any(Bool::True, Bool::False), any(Bool::False))␤»
JodaZ rakudo: say (any(1,2) == any(1,3)) == Bool::True 18:01
p6eval rakudo : OUTPUT«any(any(Bool::True, Bool::False), any(Bool::False))␤»
JodaZ rakudo: if(any(1,2) == any(1,3)){say 1}
p6eval rakudo : OUTPUT«===SORRY!===␤Missing block at line 22, near ""␤»
JodaZ rakudo: if(any(1,2) == any(1,3)){say 1;}
p6eval rakudo : OUTPUT«===SORRY!===␤Missing block at line 22, near ""␤»
flussence rakudo: if any(1,2) == any(1,3) {say 1} 18:04
p6eval rakudo : OUTPUT«1␤»
JodaZ uh le why 18:05
why does it not work with ()
rakudo: if all(1,2) == all(2,1) {say 1} 18:06
p6eval rakudo : ( no output )
flussence ()s are meaningless after an if, so they were removed.
JodaZ not optional but enforced ? 18:07
flussence that probably should've worked, actually 18:09
lidden There must be a space between the ) and the { to disambigue with a hash. 18:10
18:17 colomon joined
colomon Just to back-explain all(1,2,3) == all(2,1,3) (now that I'm home) -- 18:20
it's autothreading both sides.
so you're getting something like all(1 == 2, 1 == 1, 1 == 3), all(2 == 2, 2 == 1, 2 == 3), etc 18:21
JodaZ why ordered ?
colomon it's not ordered in any meaningful sense
(it might be ordered as a side-effect of the current implement of it in Rakudo, mind you.) 18:22
JodaZ sounds fun 18:23
so how to do an actually autothreaded set comparison ?
colomon 1) Implement threading in Parrot. 18:24
2) Implement autothreading in Rakudo.
JodaZ in theoray
colomon do what we just did.
JodaZ we just did what 18:25
18:25 drake1 joined
colomon oh, you mean comparing the contents of two junctions? 18:25
JodaZ contents of two something 18:26
drake1 if you say: my $/ = \1; in perl6, will $/ be seen as a temporary / local / dynamic scope record size mode? 18:27
colomon JodaZ: unfortunately, I don't know. let me research...
JodaZ the point is with autothreading 18:28
well, with syntax allowing for autothreading
colomon JodaZ: As far as I know, anything you do with junctions is allowed to autothread. 18:29
but I don't know how to compare two junctions to see if they are "equal".
JodaZ set(all()) == set(all()) would do it but that wouldn't be junctions then 18:30
colomon I have mostly avoided Junctions, other than the handy quick uses.
rakudo: say Set.new(2, 1, 3) == Set.new(1, 2, 3)
p6eval rakudo : OUTPUT«Bool::True␤»
colomon rakudo: say Set.new(2, 1, 3) == Set.new(1, 2, 5) 18:31
p6eval rakudo : OUTPUT«Bool::True␤»
colomon yeah, that doesn't actually do it.
JodaZ say what
colomon In Rakudo, Set doesn't have a == operator
so it's equivalent to saying +Set.new(2, 1, 3) == +Set.new(1, 2, 5) 18:32
which is comparing the size of the sets (ie, both 3 here)
JodaZ wow, that sucks
colomon I don't know if Set is intended to have == or not. The spec is very vague in this area. 18:33
as, implemented, there is a Set.equal method that compares the contents of two sets.
jnthn I suspect == on sets checks number of items it contains, just like with arrays. 18:34
drake1 is it true that in Perl6 you can protype a function interface to make implicit references of given arguments like pointers in C?
JodaZ -_- if == does not mean equal, what
jnthn == means *numeric* equal.
Use eqv for snapshot equality semantics.
JodaZ rakudo: say Set.new(2,1,3) eqv Set.new(1,2,3) 18:35
p6eval rakudo : OUTPUT«Bool::False␤»
JodaZ sadpanda
colomon In Rakudo, sSet doesn't have operator eqv either.
JodaZ rakudo: say Set.new(2,1,3).equals(Set.new(1,2,3))
p6eval rakudo : OUTPUT«Method 'equals' not found for invocant of class 'Set'␤ in main program body at line 22:/tmp/v5DXGw8HNo␤» 18:36
jnthn colomon: Oh. I'm guessing that's 'cus nobody implemented it though?
JodaZ !
jnthn colomon: Rather than it not being meant to have one?
JodaZ rakudo: say Set.new(2,1,3).equal(Set.new(1,2,3))
p6eval rakudo : OUTPUT«Bool::True␤»
colomon jnthn: dunno, as far as I can see the spec doesn't tell you anything useful here.
jnthn heh :)
JodaZ someone add == as alias for equal ?
colomon JodaZ: at a first approximation, that's not a good idea 18:37
JodaZ why
jnthn I told you why already.
colomon because .equal is not numeric equal, which is what == is
jnthn 19:47 < jnthn> == means *numeric* equal.
drake1 similar to cmp\nje
jnthn It numifies both sides, and numifying containers gives you the number of things in them. 18:38
colomon Set.equal uses === internally
(as implemented)
jnthn Set eqv Set otoh probably could be implemented to call equal
JodaZ rakudo: say Set.new(2,1,3) === Set.new(1,2,3)
p6eval rakudo : OUTPUT«Bool::False␤»
JodaZ >_>
jnthn rakudo: say [1,2,3] === [1,2,3]; say [1,2,3] eqv [1,2,3] 18:39
p6eval rakudo : OUTPUT«Bool::False␤Bool::True␤»
jnthn Anyway, it seems that what is missing is Set eqv Set multi candidate. 18:40
JodaZ === checks if its the same object ?
jnthn JodaZ: Yes.
JodaZ: Through value types (e.g. numbers, strings) will come out true also.
JodaZ hmm, a operators implementation lies in the left hand value ?
and there only ?
jnthn No
They're multi-dispatch
JodaZ X == Y does what
drake1 in Rakudo, can you do ($a,$b,$c) = @_; and only assign a, b and c with references into the array, or do you have to use index numbers in such a case?
colomon JodaZ: X == Y converts both sides to a number and compares them 18:41
JodaZ colomon, why
flussence multi sub infix:<==>(X $x, Y $y) { ... }
jnthn See github.com/rakudo/rakudo/blob/mast...erators.pm
JodaZ i mean do you need numerical equality that often ?
colomon JodaZ: because == is numeric comparison
flussence numbers and strings are pretty common, yes. 18:42
JodaZ x ?? t !! f
is that ternary ?
jnthn Ye
s
JodaZ flussence, but how common is it that you need to convert something implicitly to number and then compare that against something else converted to a number implicitly ? 18:43
drake1 in sh it's: test "$A" = "$B" , but then 0001 and 1 is not equal 18:45
flussence depends on the application... but doing numeric comparison for some types and something completely different for others with the same operator isn't very obvious
jnthn JodaZ: Consider when you read in a bunch of numbers from a file somewhere.
JodaZ: You end up reading them as a string. In Perl, you don't have to go and explicitly say "oh, and make this a number". 18:46
JodaZ it won't even warn ?
jnthn JodaZ: It'll warn if there's some kind of undefiend value. 18:47
rakudo: say +"abc" # no warning here though
p6eval rakudo : OUTPUT«0␤»
jnthn If parsing you'll tend to know what you have though. 18:48
rakudo: say [+] "1,2,3,4".comb(/\d+/) 18:49
p6eval rakudo : OUTPUT«10␤»
jnthn Like there. You get a list of strings all matching the given regex. The fact that the + operator numifies both sides (just like the == one) means that this "just works"
flussence .u ≍ 18:50
phenny U+224D EQUIVALENT TO (≍)
JodaZ rakudo: print "1lol" == "2lol"
p6eval rakudo : OUTPUT«Bool::False»
JodaZ rakudo: print "1lol" == "1lol"
p6eval rakudo : OUTPUT«Bool::True»
jnthn In a language where + was overloaded to do string concat too, for example, that'd simply not be possible.
JodaZ rakudo: print "1lol" == "1wtf"
p6eval rakudo : OUTPUT«Bool::True»
flussence rakudo: our multi sub infix:<≍>(Set $a, Set $b) { $a.equal($b) }; say Set.new(1, 3, 5) ≍ Set.new(1,5,3)
p6eval rakudo : OUTPUT«Bool::True␤»
jnthn There'd need to be an explicit "numify first"
flussence problem solved!
jnthn flussence: :) 18:51
JodaZ rakudo: print "1lol" + "1wtf"
p6eval rakudo : OUTPUT«2»
JodaZ and the argument for this over doing it exactly the other way arround ? 18:52
18:52 TypeNameHere____ joined
drake1 can Rakudo use custom relational object operators? 18:53
jnthn JodaZ: You can read a program and understand what semantics to expect from an operator without having to worry about tracking down the types of the operands.
drake1 eg. $obj1 > $obj2 could have a property method for use in relational expressions 18:54
what was meant by: $string > $strin2 was actually implicit length comparison, since each string object use the `length' method for the relational property. 18:57
jnthn drake1: At the moment you'd add multi candidates for the new types, but there's nothing to stop you doing anything like that in a module. 19:03
drake1 without explicitly calling the relational method? 19:04
jnthn our multi sub infix:<< > >>($a where .can('relational_prop'), $b where .can('relational_prop') { $a.relational_prop > $b.relational_prop }
Or you were thinking it just returns the name rather than the value?
In which case
JodaZ what kind of name is rakudo star anyways, is it racist of me for imagining a japanese person try to pronounce "rock star" everytime i read it ?
jnthn our multi sub infix:<< > >>($a where .can('relational_prop'), $b where .can('relational_prop') { $a."$a.relational_prop()" > $b."$b.relational_prop()" } 19:05
drake1 /me cracks up giggling
jnthn JodaZ: Given rakudo is a Japanese word, I suspect the Japanese can pronounce it just fine. :P
diakopter JodaZ: Maybe it's 1st-language-ist 19:06
drake1 in C you would have to say: relate(string1) > relate(string2) or something crazy like that
diakopter JodaZ: but as jnthn mentioned, the irony is that the pun's on you
colomon jnthn: what is =:= 19:07
flussence bind-equality? 19:08
jnthn Yes, pretty much what flussence said. :-)
colomon p6 periodic table says container equality
jnthn It only makes sense on reference type-y things.
colomon out of date?
jnthn Well, it's now how I'd explain it. 19:09
colomon sorry, container "identity"
drake1 if expr `how great $a` '<' `how great $b`; then echo very; fi 19:10
jnthn colomon: That's better.
colomon: Also from S03:
There is also an identity test, C<=:=>, which tests whether two names
are bound to the same underlying variable. C<$x =:= $y> would return
true in the above example.
jnthn afk for a bit, food 19:12
19:15 Chillance joined
sorear good * #perl6 19:24
colomon o/ 19:27
19:27 hercynium_ joined 19:28 lamstyle joined
drake1 in Perl6 would you have to say: $old_win = file1.win; file1.win = $win; ... file1.win = $old_win; to save the recordsize of the caller? No. Of course not. File1 would have a local win property and not conflict with other open files. 19:38
sorear win?
drake1 the record size used by filex.read 19:39
I don't know the actual property in Rakudo 19:40
it's because Perl6 / Rakudo variety of PSF.pm and vcfed in on the Future Directions and Perl5 the original version, has the $/ global or local record size variable 19:41
local $/ should set a temporary $/ for subsequent calls 19:42
same with local signals etc. 19:44
in other words, when a file handle object is used in place of the original file handle, local $/ won't make a difference 19:51
might be: fp.putc(c); in place of putc(c,fp); I don't know. 19:59
hopefully it's easy in Perl6 to subclass a Nix, and keep the old semantics 20:02
colomon jnthn: any further thoughts on nqp-rx nomnom? 20:06
20:07 jhuni joined 20:21 jasonmay_ joined, icwiener joined, betterwo1ld joined 20:22 nadim_ joined, JodaZ left, JodaZ joined, hercynium_ left, mavrc left, literal left, mikehh joined, literal joined, hercynium_ joined, xinming joined 20:23 chitragupt joined 20:27 dju joined 20:30 dju left 20:31 dju joined
sorear drake1: you're not making any sense 20:35
drake1 I got the answer. You don't have to make it 20:36
sorear perl6: my $f = sub { say "Hi" }; $f($f = sub { say "Two" }); # What should this do?
p6eval rakudo : OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in <anon> at line 22:/tmp/EFUMcg3fA5␤ in main program body at line 22:/tmp/EFUMcg3fA5␤»
..pugs: OUTPUT«Hi␤»
sorear perl6: my $f = sub ($) { say "Hi" }; $f($f = sub { say "Two" }); # What should this do?
p6eval rakudo : OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in <anon> at line 22:/tmp/ri1_hjB2tq␤ in main program body at line 22:/tmp/ri1_hjB2tq␤» 20:37
..pugs: OUTPUT«*** ␤ Unexpected "$f"␤ expecting "=", formal parameter, ")", context, ":" or "("␤ at /tmp/ILeAnZZZ8Q line 1, column 4␤»
sorear perl6: my $f = sub ($x) { say "Hi" }; $f($f = sub ($x) { say "Two" }); # What should this do?
p6eval pugs: OUTPUT«Hi␤»
..rakudo : OUTPUT«Two␤»
wolverian lexically speaking, pugs's behaviour seems more correct 20:42
sorear niecz: my $f = sub ($x) { say "Hi" }; $f($f = sub ($x) { say "Two" }); 20:43
niecza: my $f = sub ($x) { say "Hi" }; $f($f = sub ($x) { say "Two" });
p6eval niecza f72990f: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/3iCmgVXczN line 1:␤------> my $f = sub (⏏$x) { say "Hi" }; $f($f = sub ($x) { say␤Hi␤»
sorear more correct perhaps
20:43 mavrc joined
sorear but correctness isn't all I'm going for 20:44
jnthn nqp: my $f := sub ($x) { say "Hi" }; $f($f := sub ($x) { say "Two" });
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 2358 (src/Regex/Cursor.pir:232)␤»
jnthn nqp: my $f := sub ($x) { say("Hi") }; $f($f := sub ($x) { say("Two"( }); 20:45
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 2358 (src/Regex/Cursor.pir:232)␤»
jnthn nqp: my $f := sub ($x) { say("Hi") }; $f($f := sub ($x) { say("Two") });
p6eval nqp: OUTPUT«Hi␤»
jnthn nqpnet: my $f := sub ($x) { say("Hi") }; $f($f := sub ($x) { say("Two") });
p6eval nqpnet: OUTPUT«error:imcc:No such file or directory␤ in file 'compile.pir' line 3␤error CS0006: cannot find metadata file `RakudoRuntime.dll'␤Compilation failed: 1 error(s), 0 warnings␤Cannot open assembly 'RakudoOutput.exe': No such file or directory.␤»
jnthn awww
diakopter: ^^
diakopter yah
jnthn Anyway, I suspect nqpnet agrees with niecza
Since I think it looks up the callee then evaluates the args. 20:46
sorear The problem is that niecza often has to spill the callee
I think there would be a substantial code size reduction if the callee was allowed to be evaluated last
jnthn Callee evaluated last is fine by me. 20:47
I think.
I mean, it's the last thing that's needed
sorear Or evaluated first, but not fetched from the variable until the last moment (which is what Rakudo seems to do)
drake1 is that a spaghetti declaration?
jnthn Either way, need to get it one way or the other...don't really want nqp-rx and nqpclr having different semantics. 20:48
diakopter nqpnet: my $f := sub ($x) { say("Hi") }; $f($f := sub ($x) { say("Two") })
p6eval nqpnet: OUTPUT«Hi␤»
diakopter nqp: my $f := sub ($x) { say("Hi") }; $f($f := sub ($x) { say("Two") })
p6eval nqp: OUTPUT«Hi␤»
jnthn oh
They are the same.
diakopter it's ok; it's still NQ 20:49
hm... ForeverNQ
""
drake1 in C99 there is a rule that simply forbids the change of objects in an expression by the expression itself
20:49 s0v joined
drake1 by the notion of a sequence point 20:52
array[i] = ( i = 5 ) +2 would result in undefined behavior or something like that 20:55
might be illegal activity in Perl under strict 21:01
diakopter ergh 21:11
21:19 s0v left 21:20 s0v joined 21:21 sji joined
sji hi all! 21:21
sorear hi 21:22
21:26 s0v left, s0v joined
dalek odel: 2c78f1b | jonathan++ | / (3 files):
[dotnet] When dying due to method not found, die a little more informatively.
21:43
drake1 perl6: my ($a, $b, $c) = (1, 2, 3); say "$c"
p6eval pugs, rakudo : OUTPUT«3␤»
21:44 abcchen joined 21:47 abcchen left
drake1 does Parrot x86 SSE use streaming extension for stuff like: my ($a, $b, $c) = (2.3*9,4.2*8,3.3*7) ? 21:49
that could execute a matrix operation with floats in a single core? 21:50
might be prepared for the task since perl is extensive user of list context operations 21:52
21:55 s0v left
lue ohai o/ 21:57
colomon \o 21:58
drake1 /- 22:07
fopen("im\an\ms\nerd.com","+r"); 22:16
oops
22:16 risou joined, risou left
plobsing drake1: parrot doesn't generate x86 instructions directly (it is currently a bytecode *interpreter*) and therefore cannot make use of x86 SSE directly. 22:17
22:17 risou joined 22:18 justatheory left
plobsing drake1: for further questions regarding parrot, I suggest you try #parrot on irc.parrot.org. 22:18
drake1 plobsing: the who is responsible for the CPU stream?
ok. thanks
22:18 hercynium_ is now known as hercynium 22:19 hercynium left, hercynium joined
hercynium if it hasn't been mentioned, this amused me greatly: www.chrisseaton.com/katahdin/ 22:19
"A programming language where the syntax and semantics are mutable at runtime"
22:20 mavrc left
hercynium is actually quite pleased to see more languages with such functionality! 22:20
diakopter that person sent mail to p6l a while back
hercynium oh? 22:21
diakopter iirc
22:22 s0v joined
drake1 echo grammar9 > opt;make self; exec self 22:23
22:24 risou left, risou joined 22:26 ch3ck3r joined
drake1 how many integers is the exec string? j/k. Bye 22:27
22:28 drake1 left
diakopter ok....... 22:28
22:31 lidden left
diakopter Tene: ping 22:38
Tene diakopter: I'm here.
diakopter Tene: are you looking at that LHF task? 22:39
(Configure.pl)
or even just the Makefile?
I need to add another dependency or two
Tene diakopter: Not right now, no.
22:42 am0c joined 22:48 s0v left, s0v joined
jnthn sleep & 22:50
22:51 s0v left 22:52 s0v joined 22:55 s0v left, s0v joined, s0v left, s0v joined 23:03 masak joined
masak ahojte! 23:03
23:04 s0v left 23:06 Ikarus joined
diakopter i 23:11
masak hercynium: incidentally, Tene mentioned that link yesterday. 23:12
hercynium: and it's been mentioned twice before that in 2008 :)
hercynium :)
hah, old news then!
masak yes, but still relevant, I guess.
hercynium I think so.
masak I saw in the backlog that diakopter planned to steal the op precedence generator from that implementation. dunno if that ever happened. 23:13
dalek odel: 8709bf4 | diakopter++ | common/NQP/NQPSetting.pm:
[dotnet] add .Num and .Int to knowhow Any in NQPSetting
odel: bb485d4 | diakopter++ | / (3 files):
Merge branch 'master' of [email@hidden.address]
hercynium turns out one of my co-orkers at my new job is a bigger parsing geek than I am
dalek odel: 05d65c9 | diakopter++ | common/NQP/NQPSetting.pm:
[dotnet] fix last commit
odel: 93d2c4b | diakopter++ | common/NQP/P6Objects.pm:
[dotnet] incremental progress in Cursor
diakopter hee
hercynium runs from the dalek
diakopter masak: I'm [entirely not] surprised I'd entirely forgotten about that 23:14
masak heh.
diakopter (thanks for the reminder; we mice makes lots o' plans)
wait, there are parsing geeks in this world? 23:15
masak diakopter: I'm amazed you're even asking that question.
hercynium you don't have to make a production out of it! 23:16
23:17 risou left
masak for @parsing-geeks { .make-production } 23:18
by the way, more people are welcome to volunteer as Advent Calendar authors. :) 23:23
the more, the merrier.
23:24 Chillance left
lue that reminds me, has anyone suggested a post on grammar yet? 23:24
masak we had a pretty good one last year...
suggest you look at that and see if there's anything you'd like to add.
diakopter agrees 23:25
masak cosimo_++ # github.com/cosimo/perl6-facter
rakudo: my Bool $a = 1; say $a 23:26
p6eval rakudo : OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/4EvDLiOZOZ␤»
masak if Bool were a real enum type, would the above work?
cosimo_: should you really copyright ported code to the original author? 23:27
lue is looking, cursing this computer 23:28
were you referring to day 24? 23:30
masak no, earlier than that. 23:31
Tene++ wrote it. I can get it for you.
perl6advent.wordpress.com/2009/12/2...d-actions/
lue looking at post 23:32
masak this one also mentions grammars: perl6advent.wordpress.com/2009/12/1...gex-story/
Tene masak: looking at that post recently, I feel like it didn't cover the basics of grammar usage anywhere near well enough, and was much too short. 23:33
It really should walk through explaining building up a grammar to match an example, interactive repl usage to pull pieces out, etc. 23:34
masak maybe a post on the basics of Perl 6 regex syntax and semantics would be well received.
Tene It wouldn't be bad broken into two parts, sure.
masak there's your two posts. now it's just a question of someone signing up on that list. 23:35
lue Writing an advent post sounds like fun, I'm just stuck on what to write about :)
masak something you like and know reasonably well. 23:37
plobsing t/spec/S03-metaops/reverse.t is hanging for me with latest rakudo/parrot 23:50
rakudo: (10 R... 1, 3)[42]
p6eval rakudo : ( no output )
plobsing rakudo: say (10 R... 1, 3)[42]
p6eval rakudo : OUTPUT«85␤»
masak seems to hang here too. 23:51
not even printing the plan line here. 23:52
plobsing my theory - the upper bound on R... isn't being respected leading to an infinite list
masak 1, 3 ... 10 *shouldn't* terminate. 23:53
but if it's indexed with .[42], that shouldn't matter.
ah, alpha. I had completely forgotten about your unmatched ability to give error messages without file and line number. :) 23:56
jnthn++
just having something that works better than that is a real relief.
Tene: oh!
Tene: here's another reason for not porting Web from alpha to ng yet. 23:57
Tene: I'm restoring the test suite to its former glory today.
doing a port from alpha to ng with a less-than-100%-restored test suite would be... unwise.
23:58 bbkr joined
lue are the .pod files in the perl6advent-2010 folder in POD (Perl 5) or Pod (Perl 6) ? 23:59
masak likely the former.