»ö« 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! Set by sorear on 4 February 2011. |
|||
pmurias | you need installed clisp with configure quicklisp | 00:00 | |
sorear | with -Bclisp? | ||
pmurias | yes | ||
sorear | what's quicklisp? | ||
dalek | ecza: cf9e0a4 | sorear++ | src/ (2 files): Remove some gimme5 cruft from this STD too |
00:04 | |
sorear | rakudo: say ( 1 ).WHAT | ||
00:04
shi joined
|
|||
pmurias | sorear: cpanm for lisp | 00:04 | |
p6eval | rakudo : OUTPUT«Int()» | ||
sorear | rakudo: say ( 1, ).WHAT | ||
p6eval | rakudo : OUTPUT«Parcel()» | ||
pmurias | www.quicklisp.org/beta/ | ||
quicklisp allows loading lisp modules with (ql:load "module") which automatically fetches from the internet/and installs that module | 00:05 | ||
sorear: quicklisp is required for installing the json library | 00:11 | ||
sorear | pmurias: how helpful was the use of json? | 00:14 | |
pmurias: you've talked in the past about moving to a binary format | 00:16 | ||
00:16
awwaiid joined
|
|||
sorear | I am considering this | 00:16 | |
00:19
bluescreen left
|
|||
pmurias | the use of json was a major annoyance | 00:21 | |
i had to unpack the arrays buy hand | |||
* by | |||
hmm, sbcl seems to be faster the the mono backend on "while $a < 1000000 {$a = $a + 1} | 00:24 | ||
i'll investigate it tommorow | |||
s/the/then | |||
sorear: what do you want to move to? | 00:25 | ||
sleep& | 00:30 | ||
00:30
pmurias left
00:32
Sarten-X left
|
|||
TimToady | sorear: 'is unary is defequiv' is sort of the opposite of a fossil; it's more like info hung out there for the use of macros someday | 00:34 | |
but it might be the wrong place to hang the info anyway | |||
they are fossils in the sense that they were put there a long time ago | |||
back before STD could even be executed | 00:35 | ||
00:35
bluescreen joined
00:48
felliott left
00:54
felliott joined
00:55
lakshman joined
|
|||
lakshman | Is there an expert in perl 6 datastructures? | 00:56 | |
TimToady | depends on whether you're mad about them :) | 00:58 | |
lakshman | mad about them? | 00:59 | |
TimToady | a number of people understand S09 pretty well, but nobody's implemented it all yet | ||
I guess I don't know what you're actually asking | |||
they could use a champion, if that's what you're asking | 01:00 | ||
but there are a number of people who can answer questions about the design | 01:01 | ||
01:01
qiyong joined
|
|||
TimToady | lakshman: do you have a more specific question? | 01:03 | |
lakshman | no I need to come up with specific questions i'll get back to you | ||
Thanks | |||
TimToady | no problem | ||
01:04
coldhead joined
01:14
Sarten-X joined
01:21
lakshman left
01:24
felliott_ joined,
felliott left
01:25
felliott_ is now known as felliott
01:27
shi left
01:32
jaldhar_ joined
01:34
icwiener left
01:38
gdey left
01:44
gdey joined
|
|||
sjohnson | hmm, new vim with blowfish encryption for text files is kind of handy | 01:50 | |
01:55
gdey left
02:01
noganex_ joined
02:03
Chillance left
02:04
noganex left
02:08
jaldhar_ left
02:12
Sarten-X left
02:17
risou joined,
kanishka joined
02:18
Sarten-X joined
02:19
risou left
02:42
stkowski left
02:45
bluescreen left
02:50
whiteknight left
02:52
justatheory left
02:54
minimalist joined
02:57
nadim left
03:16
cdarroch left
03:21
lue joined
|
|||
sorear | phenny: tell pmurias Half the reason I picked JSON was to make life easier for people like you. Let's discuss what you could have used later. | 03:23 | |
phenny | sorear: I'll pass that on when pmurias is around. | ||
sorear | TimToady: ok. | 03:24 | |
03:24
lakshman joined
|
|||
sorear | wb lakshman | 03:24 | |
03:24
agentzh joined
|
|||
sorear | TimToady: I'll make niecza ignore those traits, then. | 03:24 | |
or maybe they could be transformed into something readable at runtime | 03:25 | ||
lue | I'm not dead yet, zebras! | 03:26 | |
03:29
jferrero left
03:36
ryan__ joined
03:46
dukeleto left
03:47
dukeleto joined
03:59
Trashlord left
04:03
Trashlord joined
04:04
HarryS left
04:23
Su-Shee_ joined
04:26
Su-Shee left
04:27
BaggioKwok joined
04:29
BaggioKwok left
04:33
stifynsemons joined
04:36
Sarten-X left
|
|||
stifynsemons | how does one invoke a subroutine indirectly, as in &{"test"} from perl5? | 04:37 | |
04:37
kanishka left
|
|||
sorear | I guess it would be something like callframe.my.{'&test'}.() | 04:38 | |
sub test has to be declared 'is dynamic' for this to work | |||
TimToady | well, ::("test")() ought to work | ||
sorear | generally speaking Perl 6 doesn't swing that way | ||
TimToady | but I doubt rakudo does that yet | ||
sorear | subs are pretty hidden | 04:39 | |
TimToady: why not ::('&test')() ? | |||
TimToady | all symbolic refs are syntactically distinguished from hard refs | ||
sorear | wouldn't ::("test") be referencing a typename? | ||
TimToady | yeah, probably wants the & | ||
stifynsemons | Indirect name lookups not implemented yet :-( | ||
04:39
jaldhar_ joined
|
|||
stifynsemons | thanks though | 04:40 | |
sorear | the Perl 6 Way doesn't use indirect name lookups very often | ||
it's one of those things we support more for supporting 5->6 than actually being important | 04:41 | ||
stifynsemons | so if I want to map a user supplied string into a function name, how would I do that the Perl 6 way? | ||
sorear | is it important that the user be able to run any Perl 6 function? | ||
including stuff like CORE::tan and CORE::exit? | 04:42 | ||
stifynsemons | not any perl6 function in general; normally I add a prefix which restricts this. | ||
sorear | it's better form to use an explicit hash for that sort of thing | ||
stifynsemons | I could implement it I suppose as a set of anonymous subroutines stored in a hash table, I think. | ||
I can appreciate that. | 04:43 | ||
sorear | they don't have to be anonymous | ||
sub foo { ... }; sub bar { ... }; my %hash = :&bar, :&foo; | |||
stifynsemons | oh, that's not much different that what I intended that way ... since I don't have to assign the sub definitions directly to the hash table. | 04:44 | |
thanks | |||
04:44
Sarten-X joined
|
|||
stifynsemons | that seems to work well | 04:45 | |
TimToady | pugs: sub foo { say "yup" }; ::("foo")() | 04:46 | |
p6eval | pugs: ( no output ) | ||
TimToady | pugs: sub foo { say "yup" }; MY::{'foo'}() | 04:48 | |
p6eval | pugs: OUTPUT«***  Unexpected "MY" expecting ";", Doc block, block declaration, declaration, construct or expression at /tmp/rFEs7rPRrg line 1, column 24» | ||
dalek | ecza: bec0cd5 | sorear++ | lib/Builtins.cs: Abstract map logic away from simple batching |
05:00 | |
05:12
minimalist left
|
|||
sorear | rakudo: say ~(1,2 Z+ 10,20,30,40) | 05:14 | |
p6eval | rakudo : OUTPUT«11 22» | ||
sorear | rakudo: say ~(1,2 Z 10,20,30,40) | ||
p6eval | rakudo : OUTPUT«1 10 2 20» | ||
sorear | TimToady: correct? | ||
TimToady | yes | 05:18 | |
05:21
kanishka joined
05:47
ryan__ left
05:55
takadonet joined
|
|||
takadonet | yo | 05:55 | |
05:56
takadonet left,
takadonet joined
|
|||
takadonet | try this again... | 05:57 | |
sorear | hi takadonet | ||
takadonet | sorear: how are u sir? | ||
sorear | I hear you do BioPerl6 | ||
ryan__ was looking for gsoc stuff earlier | |||
takadonet | for doing work on bioperl6? | 05:58 | |
sorear | possibly | 05:59 | |
takadonet | Pyrimidine would be the man to discuss that | ||
aka github.com/cjfields | 06:00 | ||
he also the pumpkin of perl 5 version of bioperl | |||
what library (on linux) do you need so you can view previous commands enter when in the interactive mode? | 06:02 | ||
i always forgot | |||
forget* | 06:03 | ||
arnsholt | readline | 06:04 | |
06:05
stifynsemons left
|
|||
takadonet | arnsholt: thx | 06:05 | |
06:07
felliott left
06:19
takadonet left
06:22
fhelmberger joined
06:29
satyavvd joined
|
|||
sorear | TimToady: What should 1,2 Z> 1,2 Z> 1,2 do? | 06:46 | |
06:46
Trashlord left
06:47
woosley joined
06:48
cxreg2 is now known as cxreg
06:49
kanishka left
06:52
Trashlord joined
06:53
kanishka joined
|
|||
TimToady | I'd think it should return (1>1>1), (2>2>2) | 06:53 | |
False,False, in other words | 06:54 | ||
sorear | I wonder if Z needs to be sensitive to precedence for that to work | ||
dalek | ecza: b86e304 | sorear++ | lib/Builtins.cs: Streamline flattening process for map |
06:55 | |
ecza: f3b81bb | sorear++ | / (5 files): Implement Z, Zop, X, Xop |
|||
TimToady | Z is always a list infix in precedence, but it does need to be sensitive to chaining semantics, I expect | 06:56 | |
sorear -> sleep | 06:59 | ||
07:13
nadim joined
07:15
envi joined
|
|||
coldhead | congratulations on the looming nuptials, TimToady | 07:43 | |
07:45
Mowah joined
07:58
hudnix left,
hudnix joined
|
|||
dalek | ast: 051af06 | moritz++ | S0 (3 files): some rakudo unfudges, mostly related to infix orelse |
08:07 | |
moritz_ | good morning | ||
tadzik | o/ | 08:19 | |
08:23
jaldhar_ left,
_jaldhar_ joined
08:34
agentzh left
08:42
agentzh joined
09:00
kst left
09:03
protorom joined
09:04
wiseguyxp_ left
09:13
Sarten-X left,
kanishka left,
satyavvd_ joined
09:15
satyavvd left
09:21
Sarten-X joined
09:28
Su-Shee_ is now known as Su-Shee
09:35
REPLeffect left
09:37
REPLeffect joined
09:44
lue left,
lue joined
09:46
woosley1 joined
09:47
woosley left,
cjk101011 joined
09:52
Chillance joined
10:01
satyavvd_ left
10:02
woosley1 left
10:22
_jaldhar_ left,
_jaldhar_ joined
10:23
peters_mops left
10:29
_jaldhar_ left,
_jaldhar_ joined
|
|||
moritz_ | rakudo: say 1 !+ 3 | 10:35 | |
p6eval | rakudo : OUTPUT«===SORRY!===Can't negate + because it is not iffy enough at line 22, near " 3"» | ||
10:44
coldhead left
|
|||
dalek | kudo: f4ec358 | moritz++ | docs/ChangeLog: [docs] update ChangeLog |
10:49 | |
10:59
Sarten-X left
11:01
pmurias joined
11:07
Sarten-X joined
11:15
whiteknight joined
11:35
colbseton joined
11:39
colbseton left
11:42
Trashlord left
11:52
masak joined
|
|||
masak | привет, zebras. | 11:52 | |
11:54
agentzh left
12:01
MayDaniel joined
|
|||
masak has been wrapping his head around the SOLID principles lately | 12:03 | ||
they're mostly what I expected them to be, except the Open/closed principle, which didn't make any sense whatsoever until it suddenly did. | 12:04 | ||
it's also interesting/valuable to discover places in well-designed libraries where these principles are broken, sometimes deliberately as a tradeoff. | 12:08 | ||
12:09
shi joined
12:27
MayDaniel left
12:33
colbseton joined
12:51
BinGOs left
12:53
pmurias left,
edenc left,
perigrin left,
perigrin joined
12:54
edenc joined
12:55
BinGOs joined
|
|||
masak | if C is a class fairly far down in an inheritance hierarchy, and it has an (overridden) method .foo, will the PRE blocks in the .foo methods of C's base class(es) also trigger when C.foo is called? | 12:57 | |
is the answer different if .foo is a multi method? | |||
& | |||
jnthn | Sleep. I got it. \o/ | 13:02 | |
13:02
Trashlord joined
13:12
felliott joined
13:17
orafu left
13:19
_jaldhar_ left,
_jaldhar_ joined
13:21
protorom left
13:25
drbean left
|
|||
moritz_ | congratulations jnthn. I'm jealous :-) | 13:35 | |
jnthn | moritz_: Aww. Sorry. | ||
hugme: hug moritz_ | |||
hugme hugs moritz_ | |||
13:49
MayDaniel joined
|
|||
colomon remembers rocking a very small baby at 2am, reading a Gene Wolfe paperback in a strange sleepless haze. | 14:05 | ||
Now-a-days, however... well, last night I was rocking a much larger toddler, and reading Lois McMaster Bujold on my Droid. | 14:06 | ||
14:08
kanishka joined
14:16
hudnix left
|
|||
jnthn | ooh, bacek++ has added the write barriers to nqp \o/ | 14:20 | |
moritz_ | and the parrot folks have temporarily unmerged the gen_gc branch | 14:22 | |
jnthn | oh. | ||
moritz_ | because it had troubles to build on some platforms | ||
jnthn | Aww. | ||
OK. | |||
colomon | write barriers? | 14:23 | |
moritz_ | and performance regressions in register access | 14:25 | |
14:28
vmspb joined
14:30
satyavvd joined
|
|||
jnthn | colomon: Triggers some GC action when an object is written to and before some allocation happens. | 14:31 | |
s/allocatin/something that may trigger a GC run/ | |||
14:36
satyavvd left
|
|||
masak | a write barrier is a GC trigger? | 14:37 | |
gee, sounded more like it would be some sort of barrier against writing... :) | |||
jnthn | masak: It's not a trigger as such | 14:38 | |
masak: It's more to do with generation management, so the next run doesn't eat stuff it shouldn't. | |||
masak | ah, ok. | ||
jnthn | masak: If an object in one generation comes to point to things in other generations, that needs some special handling on the next GC run. | ||
iiuc, anyway ;) | |||
masak | it has a ring of truthiness to it... | 14:39 | |
now, what about my PRE/POST question above? | |||
what's the relation between a method in a derived class, its (top-level) PRE/POST blocks, and methods in more base classes and their (top-level) PRE/POST blocks. | 14:40 | ||
s/\./?/ | |||
jnthn | masak: AFAIK none at the moment. (more) | ||
14:41
xinming_ left
|
|||
jnthn | masak: I'm not sure we should go in the direction of enforcing that they're always run up/down the hierarchy. It may be very Liskov-ish, but we aren't so Liskov-ish to always give the methods in a parent class a chance to run either. | 14:42 | |
14:42
xinming joined
|
|||
jnthn | Further, if the invariants relate to arguments passed to the method, how does a PRE/POST block in a method in a parent class make sense if it's never invoked? | 14:42 | |
masak | yes, that's what I'm fishing for. | ||
but S04:1459 says "call all the appropriate per-method C<PRE> phasers", which makes it sound like there's a chain of PRE phasers. | 14:43 | ||
jnthn | Oh. :/ | ||
I'm not sure that makes sense - or is practical. | |||
masak | there might be, even for one method, of course, but there's no real need to divide things into several PRE phasers. | ||
no, I don't think it ultimately does make sense. | |||
jnthn | Right. | ||
My feeling is that we'll have the meta-programming capabilities to let people who want Beta-style OO where you always call the least derived method and it chooses how to delegate to more derived ones. | 14:44 | ||
masak | just consider .foo($a) in Parent and .foo($b, $c) in Child -- how would PRE be able to run in Parent if Child.foo was called? | ||
jnthn | s/who want/implement/ | ||
masak | jnthn: that sounds a little like proto methods. | ||
jnthn | Well, not quite. A bit broader: it sounds like dispatchers. | 14:45 | |
moritz_ | I think only PRE phasers from the candidate list should be considered | ||
ie those that could be reached with nextsame() | |||
masak | that makes a bit more sense. | ||
jnthn | Apart from instead of the list you're iterating over being most to least derived, it's the other way. | 14:46 | |
masak | *nod* | ||
jnthn | moritz_: Doing nextsame() into a method (note, *not* multi - that's different) can fail. | ||
e.g. if I have a method m($a) { } in a parent class and a method m($a, $b) { nextsame() } in its child, that *will* fail. | 14:47 | ||
For multis though, you'd not get that situation. | |||
Of course, hopefully people will pay attention to Liskov and never put themselves into such a situation. :) | |||
masak feels he has not completely encompassed the problem space yet | 14:48 | ||
jnthn | I don't particularly want to make method single-dispatch more complex for the sake of encouraging people to do bad OO. | ||
masak | it makes a lot of sense that people who dabble with PRE/POST would be Liskov-aware. | ||
moritz_ | what about class A { method x($y) { my $k = $y ** 2; PRE { $k <= 10 } }} ; class B is A { method x($y) { ... } } | ||
does it have to run the parent method up to the point where PRE can be evaluated? | 14:49 | ||
masak | moritz_: uhm. | ||
moritz_: PRE blocks are run before the method body. | |||
says so in S04. | |||
jnthn | masak: That's only half the truth. | ||
masak | that's why they're called PRE :) | ||
jnthn | masak: The method callframe surely needs to exist. | ||
But before the "main" body, yes. | |||
masak | that's what i meant :) | ||
jnthn | OK :) | ||
That PRE would work albeit with a warning, I guess. :) | 14:50 | ||
rakudo: say Any <= 10 | |||
p6eval | rakudo : OUTPUT«Use of uninitialized value in numeric context in <anon> at line 22:/tmp/vQPJ_UVjZ_Bool::True» | ||
jnthn | :) | ||
14:50
risou joined
|
|||
jnthn | I guess the rule is "PRE should only care about attributes and arguments" | 14:51 | |
masak | PRE runs after INIT, but before ENTER. so there's no really good way to assign to $k each time. | 14:53 | |
but the assignment might as well be done inside the PRE block (the declaration still being before/outside it). problem solved. | 14:54 | ||
moritz_ | INIT my $x = $y * $y; | ||
jnthn | Don't that run, like, one, ever? :) | 14:55 | |
masak | yes. | ||
jnthn | *Won't | ||
*once | |||
...can't type. :) | |||
masak | so it doesn't quite cut it. | ||
14:57
risou left
14:58
kanishka1 joined,
kanishka1 left
14:59
kanishka1 joined
15:00
kanishka left
|
|||
masak | hm, if I implement ENTER blocks in Yapsi, it'll be easier to do named subs... | 15:12 | |
moritz_ | why is that? | 15:13 | |
masak | because I plan (at least initially) to let 'sub foo { ... }' be sugar for 'my &foo;', 'ENTER { &foo := { ... } }' | 15:16 | |
15:17
icwiener joined
|
|||
masak | yapsi: say 42 | 15:17 | |
p6eval | yapsi: OUTPUT«===SORRY!===Unable to find module 'Yapsi' in the @*INC directories.(@*INC contains: lib /home/p6eval/.perl6/lib /home/p6eval/p1/lib/parrot/3.0.0-devel/languages/perl6/lib .)» | ||
moritz_ | so... a sub doesn't have a body until it's called? | 15:25 | |
moritz_ confused | |||
oh wait, ENTER from the outer scope | |||
masak | aye. | ||
maybe there's a "Liskov dialect" or Perl 6, accessible through a pragma, wherein DBC is possible, and methods are required to override with the same signature. that would make PRE/POST blocks along the inheritance chain much more feasible. | 15:26 | ||
jnthn | masak: lisklass Foo { ... } # :-) | 15:27 | |
masak | but they're slightly odd creatures. if there's a parameter $x, and the PRE block of Parent.foo mentions $x, we expect it to bind to the $x of Child.foo when it is called. | ||
jnthn | Eww. :) | ||
masak | very anti-lexical of them. | ||
moritz_ | I think we need to signature-bind to all the parent methods where PRE blocks are run | 15:28 | |
masak | yes, probably. that would solve that. | 15:29 | |
jnthn | phenny: tell pmichaud when you get chance, please take a look over github.com/rakudo/rakudo/blob/nom/...P.markdown - it's my work plan for the nom branch. kplzthx | ||
phenny | jnthn: I'll pass that on when pmichaud is around. | ||
masak | markdown \o/ | 15:30 | |
jnthn | ETOOLAZYTOPOD :) | ||
masak | well, Github highlights both, IIRC. | 15:31 | |
jnthn | Right. :) | ||
15:31
hudnix joined
|
|||
jnthn | But the difference between what I have to type to hae a text file and a markdown file is...tiny. :) | 15:31 | |
So there's kinda no reason not to do it. | |||
15:32
stifynsemons joined
15:34
stifynsemons left
15:36
Sarten-X left
15:44
Sarten-X joined
|
|||
masak | right. it's Structure for Free. | 15:46 | |
dalek | p: c8ce669 | jnthn++ | src/pmc/nqpmultisig.pmc: Fix a mark bug that saw some people get segfaults in multi-method dispatch situations. |
15:49 | |
masak | I have a heisentest here: a Perl 6 program that Yapsi should run but happily runs on the command line. when I copy+paste it as a test, Yapsi refuses to compile it (as it should). | 15:52 | |
15:52
dukeleto left
|
|||
masak | I find myself wanting a test to fail. :) | 15:53 | |
15:53
dukeleto joined
|
|||
moritz_ | is there a "not" missing in your previous statement? | 15:53 | |
"should run but happily runs" | |||
masak | right. "that Yapsi shoudn't compile" | ||
fwiw, the program is 'my $a = 1; { say $a; my $a = 2; say $a }' | 15:54 | ||
std: my $a = 1; { say $a; my $a = 2; say $a } | |||
p6eval | std 625303c: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as OUTER::<$a> before you can unambiguously declare a new '$a' in this scope at /tmp/7qHlmTzxbR line 1:------> my | ||
..$a… | |||
15:55
Sarten-X left
|
|||
jnthn | I can't remember who reported the nqp multi dispatch test segfault, but the patch I just commited above should fix it. | 15:56 | |
walk & | 15:58 | ||
dalek | p: 5ed3fad | jnthn++ | src/metamodel/reprs/P6str.c: Fix an issue in the P6str repr spotted by sorear++. |
16:00 | |
16:03
Sarten-X joined
16:04
Sarten-X left
16:05
vmspb left
|
|||
masak | ah. the heisentest turned out to be due to state bleedover between runs. | 16:11 | |
testers take note: a test showing that something fails isn't much worth on its own, since there are so many orthogonal ways something can fail. :) | |||
arnsholt | Indeed. State behaving in funny ways makes for interesting debugging of tests | 16:12 | |
masak | I have a few globals in Yapsi. one of them is the culprit here. | 16:13 | |
arnsholt | I've had some fun (fsv. of fun) debugging backtracking shenanigans in Parrotlog =) | ||
16:13
wooden left
16:15
qiyong left,
Patterner left
16:16
cognominal left
16:17
Psyche^ joined,
Psyche^ is now known as Patterner,
ryan_ joined
|
|||
masak | yay! changed the global into a private attribute on the ::Actions class, and that brought out the failing test! \o/ | 16:18 | |
if that isn't a victory for narrow scopes, I don't know what is. | 16:19 | ||
16:19
HarryS joined
|
|||
arnsholt | Absolutely | 16:21 | |
16:23
Sarten-X joined
|
|||
jnthn | back :) | 16:34 | |
16:35
stifynsemons joined
16:36
whiteknight left
16:37
cognominal joined
16:39
stifynsemons left
16:52
plobsing left,
stifynsemons joined
16:56
stifynsemons left
17:14
plobsing joined
|
|||
dalek | psi: 639e391 | masak++ | lib/Yapsi.pm: [Yapsi] narrowed the scope of %vars Instead of a lexical inside ::Actions, it is now a private attribute. This makes a lot more sense, because the variable should be reset with each new parse anyway. |
17:15 | |
masak | std: unless a {} | 17:17 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Function 'a' needs parens to avoid gobbling block at /tmp/XQXOz5gt1Q line 1:------> unless a⏏ {}Missing block (apparently gobbled by 'a') at /tmp/XQXOz5gt1Q line 1:------> unless a {}⏏<EOL> expecting any | ||
..of… | |||
sorear | good * #perl6 | 17:30 | |
masak | sorear! \o/ | 17:32 | |
diakopter | * * * | ||
jnthn | It's not * here | ||
oh, wait.. | |||
masak | { $_ * $_ } | ||
jnthn | :) | ||
diakopter | std: * * * | ||
masak | oh wait, { $^a * $^b } | ||
p6eval | std 625303c: OUTPUT«ok 00:01 119m» | ||
masak | { $_ * $_ } was the old sugaring... | ||
*desugaring | 17:33 | ||
17:38
dual left
|
|||
masak | std: my @a = 1, => 2 | 17:38 | |
p6eval | std 625303c: OUTPUT«===SORRY!===Preceding context expects a term, but found infix => instead at /tmp/atbVfl3TGD line 1:------> my @a = 1, ⏏=> 2Parse failedFAILED 00:01 122m» | ||
masak | rakudo: my @a = 1, => 2 | ||
p6eval | rakudo : OUTPUT«===SORRY!===Method 'returns' not found for invocant of class 'Undef'» | ||
masak submits LTA rakudobug | |||
dalek | psi: b62dada | masak++ | t/compiler.t: [t] two new tests One fails. |
17:42 | |
psi: 97dea43 | masak++ | t/compiler.t: [t/compiler.t] checked error message on failure Just knowing that something fails isn't very informative. It turns out we were sometimes failing for the wrong reasons. This commit is more discerning about the actual failure. |
|||
17:44
dual joined
17:45
MayDaniel left
17:51
justatheory joined
17:54
MayDaniel joined
17:56
kanishka1 left,
kanishka joined
|
|||
TimToady | is anyone here currently using rakudo on Mac? What's the best way to install? | 17:59 | |
17:59
MayDaniel left
|
|||
jnthn | TimToady: I think layla++ asked that recently...I *think* the answer was that there wasn't any packages around, so best was just to build it from source. | 18:00 | |
jnthn is failing ot use the ir clog search... | 18:02 | ||
TimToady | thanks, we'll do that | 18:04 | |
jnthn | TimToady: irclog.perlgeek.de/perl6/2011-02-01#i_3242639 | ||
masak | yes, build from source. | 18:13 | |
18:14
kaare_ joined
|
|||
masak | Mac OS X is basically BSD with pretty graphics. ;) | 18:14 | |
tadzik | isn't that Darwin? | 18:20 | |
arnsholt | Darwin and BSD userspace, IIRC | 18:24 | |
And I use Rakudo on OS X. I build from source | 18:25 | ||
18:25
kanishka left
|
|||
colomon | I use Rakudo on OS X, built from source. | 18:28 | |
Someone was working on building package distribution recently, though. | 18:29 | ||
18:29
pmurias joined
|
|||
pmurias | sorear: hi | 18:30 | |
phenny | pmurias: 03:23Z <sorear> tell pmurias Half the reason I picked JSON was to make life easier for people like you. Let's discuss what you could have used later. | ||
18:44
kaini joined
18:45
kaini left
18:50
kaini joined
18:56
jvv joined
|
|||
sorear | pmurias: hi | 19:00 | |
lue | good morning zebras! o/ | 19:11 | |
tadzik | hey lue! | 19:13 | |
masak | lue \o | ||
sorear | hi lue | 19:14 | |
lue is so close to beating TeX and friends with several forms of aquatic life. | 19:23 | ||
tadzik | ...why can we have 61 seconds? | 19:24 | |
lue | I think I asked before, and I believe it has to do with leap seconds. | 19:25 | |
tadzik | perlcabal.org/syn/S32/Temporal.html#line_72 | ||
19:25
wiseguyxp_ joined
|
|||
sorear | tadzik: leap seconds are added to the end of existing minutes | 19:26 | |
tadzik: the Earth rotates on its axis once every 86400.xxxxx seconds | |||
tadzik | I see | ||
sorear | we divide the sidereal day into 24 hours with 60 minutes each | ||
TimToady | they should just put some big weights in some towers so they can adjust the rotation rate to match the atomic clock | 19:27 | |
sorear | most minutes have 60 seconds, but to keep UT1 synchronized with the Sun we add 1 second to a minute occasionally | ||
erm, the solar day | 19:28 | ||
the sidereal day only has 1436 minutes... | |||
lue | TimToady: or giant rockets. | ||
TimToady | or more likely (meaning not likely at all) pump a great amount of water to/from reservoirs on the equator | ||
sorear | because the Earth rotates on its axis every 1436 minutes, but the Earth is also revolving around the Sun | 19:29 | |
TimToady | we should do something about the year length too | ||
sorear | every 366 rotations of the Earth, we see the Sun rise 365 times because 1 of them was cancelled out by yearly motion | ||
TimToady | you can get it back by traveling around the world in the right direction | 19:30 | |
sorear | I wonder if we could cancel out global warming by cleverly manipulating the Milankovitch cycles | ||
lue | .oO(Or perhaps open a hole in the atmosphere that's always on the Dark Side™ of the Earth, to let all the heat out) |
19:33 | |
pmurias | re what to replace json with something with a structure and existing implementations would be preferable | ||
sorear: why do you want to replace json? (in what ways does the replacement have to be better) | 19:34 | ||
sorear | pmurias: you said json made your work harder | ||
the main reason I picked json was to make implementing backends (readers in genral) *easier* | |||
so obviously something is very wrong | |||
pmurias | common lisp doesn't have pattern matching | 19:35 | |
19:35
shi left
|
|||
pmurias | so unpacking arrays had to be worked around | 19:35 | |
sorear | what could you have dealt with easier? | 19:36 | |
19:38
envi left
|
|||
pmurias | i'm not sure i don't have much experience with different serialisation formats | 19:40 | |
in the end i just converted json into sexpressions and copied out parts of docs/nam.pod | 19:41 | ||
19:48
molaf joined
|
|||
masak | I should probably attack serialization soon in Yapsi. I'm getting to the point where I need static lexpads and BEGIN to work. | 19:50 | |
19:51
cjk101011 left
|
|||
dalek | ecza: 311ba52 | sorear++ | / (2 files): Reorganize and combine TODO lists |
20:04 | |
20:04
rgrau joined
20:08
felliott left
20:10
Tedd1 left,
wiseguyxp_ left
20:19
stifynsemons joined
20:24
felliott joined
20:28
felliott left
20:29
stifynsemons left
|
|||
masak | that's a nice read. EASY, MEDIUM, HARD, NASTY. | 20:36 | |
I'm surprised to see &eval and BEGIN both fall under NASTY. | 20:37 | ||
tadzik | I like how this looks like „that's easy. Do it” | ||
20:37
zby_home_ joined
|
|||
sorear | masak: NASTY means basically "I don't understand this well enough to even start" | 20:38 | |
the other three are mostly broken down by time required | 20:39 | ||
EASYs will take me less than an hour if I'm in a proper flow state | |||
moritz_ | masak: I guess both BEGIN and eval carry context between run- and compile time | ||
which makes it hard | |||
sorear | exactly | ||
jnthn considers BEGIN decidedly hard and scary | 20:40 | ||
sorear | eval is probably the easier of the two, since it doesn't depend on the immediate metamodel and doesn't require general serialization | ||
20:41
stifynsemons joined,
colbseton left
|
|||
jnthn | sorear: I don't consider eval at all easy, but I think it's a lot less hassle to do right than BEGIN is. | 20:42 | |
moritz_ | an approximation of eval is much better than nothing. | 20:44 | |
jnthn | True. Rakudo had an eval that couldn't see outer lexicals for many months. | ||
moritz_ | and it was enough to pass quite some spectests | ||
jnthn | Right. | 20:45 | |
sorear | I could do *that* right now | 20:46 | |
sorear adds to agenda | 20:47 | ||
moritz_ | sorear: that would be enough for eval_{lives,dies}_ok | ||
which evalutes in context of Test.pm anyway, not in the context of the test file | 20:48 | ||
sorear: another TODO: MAIN subs | 20:53 | ||
niecza: say %*ENV<PATH> | 20:54 | ||
masak | moritz_, sorear: thanks for explanations about why BEGIN and &eval are nasty. what you say matches what I've been thinking about them so far for Yapsi. | ||
p6eval | niecza v2-42-g311ba52: OUTPUT«» | ||
moritz_ | perl6: print %*ENV<PATH> | 20:55 | |
p6eval | niecza v2-42-g311ba52: ( no output ) | ||
..rakudo : OUTPUT«/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games» | |||
..pugs: OUTPUT«*** Can't modify constant item: VUndef at /tmp/q2nhWB6tGn line 1, column 7 - line 2, column 1 /tmp/q2nhWB6tGn line 1, column 7 - line 2, column 1» | |||
moritz_ | another TODO | ||
masak | ...already in there. | 20:56 | |
moritz_ | in the issue tracker? | ||
sorear: I want run() ... and preferably not in SAFE.setting, but in a FULL.setting or so :-) | 21:00 | ||
sorear | right. FULL is spelled CORE for now | 21:04 | |
I'm not 100% happy with this factoring | |||
niecza: say ?(slurp "/etc/passwd") | 21:05 | ||
p6eval | niecza v2-42-g311ba52: OUTPUT«===SORRY!===Undeclared routine: 'slurp' used at line Any()1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2) at /home/p6eval/niecza/src/STD.pm6 line 1148 (STD P6.comp_unit @ 73) at | 21:06 | |
../home/p6eval/niecz… | |||
sorear | goodie, p6eval is using it | ||
stifynsemons | Another newbie question: my %g; %g<gamma>.[].push(5) doesn't auto-vivify hash element gamma. So I have to use my %g; %g<gamma>=[]; %g<gamma>.[].push(5). Is there a simpler syntax? | ||
moritz_ | sorear: so how do I run neicza with CORE instead SAFE | 21:07 | |
sorear | moritz_: don't pass --safe to the executable | ||
stifynsemons: I suspect push %g<gamma>, 5 should work | |||
stifynsemons: generally you shouldn't use .[].; that overload exists for the sake of string interpolation | 21:08 | ||
moritz_ | what's wrong with .[] ? | ||
stifynsemons | push %g<gamma>, 5 doesn't work in 201101 rakudo star | 21:09 | |
sorear | moritz_: it's a no-op, except when it's not | ||
(%g<gamma> //= []).push(5) will definitely work | 21:10 | ||
masak | rakudo: my %g; push $g<gamme>, 5; say %g.perl | ||
sorear | but is rather on the ugly side | ||
p6eval | rakudo : OUTPUT«===SORRY!===Symbol '$g' not predeclared in <anonymous> (/tmp/yn4U_mE8fT:22)» | ||
masak | rakudo: my %g; push %g<gamme>, 5; say %g.perl | ||
p6eval | rakudo : OUTPUT«Method '!fill' not found for invocant of class '' in 'List::push' at line 2881:CORE.setting in main program body at line 22:/tmp/l0BsSJw77w» | ||
moritz_ | I'm pretty sure both the sub and method form should work | ||
masak is surprised the spectests wouldn't pick something like that up. | |||
masak submits rakudobug | 21:11 | ||
stifynsemons++ | |||
moritz_ | masak: there are tests for that. They are just fudged :-) | ||
stifynsemons | thanks | ||
ok, for now, I'll just %<gamma>.[].push(5) for now :-) | |||
masak | moritz_: right, but ISTR this *used* to work. have they been fudged recently? | ||
stifynsemons: leave comments with the RT ticket number in; that way, you'll remember to improve the code when the bug is fixed. | 21:12 | ||
sorear | in my family, "fudge" is considered a low-tier swear word. Makes reading about spectests a little amusing. :) | ||
moritz_ | rakudo: my %h; %h<a>[0] = 3; say %h.perl | ||
p6eval | rakudo : OUTPUT«{"a" => [3]}» | ||
moritz_ | masak: I remember *that* working | ||
I didn't fudge any autoviv tests lately | 21:13 | ||
alpha: my %a; push %a<b>, 3; say %a.perl | 21:14 | ||
p6eval | alpha : OUTPUT«No applicable candidates found to dispatch to for 'push'in Main (file <unknown>, line <unknown>)» | ||
moritz_ -> sleep | 21:15 | ||
masak | 'night, moritz_. dream of excellent autovivification. | ||
lue | I am beginning the beating process on XeLaTeX, albeit only in my head :) . afk. | 21:19 | |
sorear | TimToady: ping. | 21:21 | |
TimToady: suppose I have a given statement with 256 whens, each labelled when 0, when 1, ... when 255; obviously this should be a jump table | 21:22 | ||
TimToady: suppose further that the 63 case ends with $_ = 195; proceed; | |||
TimToady: what should happen? does it make sense to use the jump table here? how? | |||
TimToady: what if it were $_ = 16; proceed; ? | |||
masak | interested question: is there a nice Perl or Unix tool that would allow me to start two processes and have the output of one fed as input to the other? I'm asking for p4. | 21:23 | |
sorear | masak: man 1 sh | ||
sh -c 'program1 | program2' | |||
masak | ok, I was unclear. | 21:24 | |
they reciprocally feed input to each other. | |||
they are "talking" to each other. | |||
I might need to do some minimal processing in the middle, too. at least to get things started. | |||
sorear | you're asking for deadlocks if you do that because of buffering semantics | ||
masak | yes, I gathered as much from reading 'perldoc -f pipe'. | 21:25 | |
sorear | there is an easyish way though | ||
masak | I don't need it to be fast, just reliable. | ||
best idea I have so far is to re-run things lots of time, each time a little further. | 21:26 | ||
that's risky if there's randomness involved, which there might be. | |||
sorear | mkfifo $TMP; <$TMP a | b >$TMP | ||
21:28
dukeleto left,
dukeleto joined
|
|||
masak | hm... | 21:28 | |
with additional piping, that might fly. | 21:30 | ||
sorear++ | |||
21:42
y3llow_ joined,
pothos_ joined,
plobsing left
21:43
y3llow left
21:44
y3llow_ is now known as y3llow,
pothos left,
pothos_ is now known as pothos
|
|||
stifynsemons | I noticed that there is implicit whitespace in a grammar like: grammar E { rule TOP { ^[ <a> <b> ]$} token a { a } token b { b} } | 21:59 | |
so that E.parse("a b") matches but E.parse("ab") doesn't. | |||
sorear | that's because you used "rule" | 22:00 | |
stifynsemons | is this the way it is supposed to be? I couldn't tell from the synopsis. | ||
sorear | if you had used token TOP, there'd be no issue | ||
stifynsemons | so if a rule includes a token, it puts space between them? | ||
sorear | it's even simpler than that | 22:01 | |
every " " in a rule becomes <.ws> | |||
stifynsemons | oh, that is simple | ||
masak | and <.ws> *requires* whitespace between \w things. | ||
stifynsemons | that's even what I want :-) | ||
masak | ...due to the way we most often want identifiers to work in languages. | 22:02 | |
stifynsemons | I assume that multiple spaces maps to a single <.ws> as well | ||
masak | yes. | 22:03 | |
22:10
coldhead joined,
plobsing joined
22:11
HaraldJoerg joined
|
|||
sorear | well, it does, but that's just an optimization | 22:12 | |
<.ws> is defined such that <.ws><.ws> === <.ws> | |||
don't try <.ws>+ though; that will hang | |||
22:20
aindilis left
|
|||
masak | trying to pipe two p4 algorithms together is the most confusing thing I've attempted in a long, long time. | 22:25 | |
diakopter | <.ws>+ should probably be fixed not to hang.. | 22:28 | |
masak | +1 | ||
sorear | -1 | ||
22:29
plobsing left
|
|||
masak | *all* quantified empty things should be fixed not to hang. | 22:29 | |
that's what Perl 5 does. | |||
diakopter | how about a warning then | ||
sorear | deliberately introducing inconsistencies into a programming language to make one edge case nicer is never a good idea | ||
masak: ? | 22:30 | ||
masak | <.ws>+ is a special case of [<something-that-matches-empty-string>]+ | ||
sorear | if you can make this sound consistant, I'll support t | ||
mm | |||
masak | it's just good customer service not to hang in that case. | ||
it can be easily detected, and it's never what the user wants. | |||
sorear | given "" ~~ /<ws>+/; what is +$<ws> ? | 22:32 | |
given "" ~~ /<ws>?/; what is +$<ws> ? | |||
masak | in fact, a Thompson engine will *have* to address this case, since it's founded on having to progress one character with each iteration. | ||
and LTM, while not exactly a Thompson engine, expresses the same kinds of sentiment. | 22:33 | ||
sorear | niecza's LTM Thompson engine does handle this case | 22:35 | |
22:35
kfo joined
|
|||
sorear | I still like the idea of doing logic programming using regexes that never match anything | 22:35 | |
masak | it's working! \o/ \o/ \o/ | 22:38 | |
sorear++ | |||
sorear | what did I do? | ||
masak | I had a bit of a problem with flushing, but ++$| solved that. | ||
sorear: you gave the clue about a named FIFO. | |||
sorear: man, you should see this. the algorithms are actually playing each other. | |||
22:39
kfo_ left
|
|||
jnthn | Wow! | 22:39 | |
masak | now I just need to do a harness script that does all-against-all over a range of "board" sizes. and collects statistics. | 22:40 | |
jnthn | That'll heat the CPU some. Good job it's winter. :-) | 22:41 | |
masak | :) | ||
sorear | clearly, the next step is genetic algorithms. | 22:44 | |
with a simulated tournament for fitness ranking | |||
masak | look! gist.github.com/824207 | 22:45 | |
sorear: it would be, if p4 wasn't a solved problem. :) | |||
Tene | masak: depends on what metric you're measuring fitness by ;) | 22:47 | |
least cpu time used to win, perhaps? | 22:48 | ||
masak | ooh | ||
still, not even that's too hard when one knows the answer. | |||
would be more interesting, I think, with an intractable problem. | 22:49 | ||
Tene | Yes, rather. | ||
22:53
Trashlord left
22:54
Trashlord joined
|
|||
pmurias | masak: we can't reliably determin if a regex matches an empty string | 22:56 | |
masak | at runtime, we can. | 22:57 | |
and that's what matters. | |||
pmurias | in some cases we can in others not | ||
masak | "am I in a quantifier? will the next iteration take me exactly nowhere? exit loop." | ||
pmurias | and what do we do succed/fail? | 22:58 | |
22:58
bacek left
|
|||
masak | I don't understand the question. the quantifier succeeds. | 22:58 | |
pmurias | no it doesn't | ||
masak | I see. | ||
Tene | it... doesn't? | 22:59 | |
22:59
JodaZ left
|
|||
Tene | Why not? | 22:59 | |
pmurias | because it doesn't terminate | ||
Tene | a* should match the empty string successfully. | ||
22:59
bacek joined
|
|||
pmurias | (a*)* would hang | 22:59 | |
pmurias thinks | 23:00 | ||
masak | exactly the (a*)* case is used as an example with the Thompson engine. | 23:01 | |
pmurias | (a*)* works in Perl 5 | ||
masak | the general situation is 'a quantifier with something that (as a default) matches the empty string). | ||
s/\)./'./ | |||
23:03
autark joined,
kjeldahl left
|
|||
pmurias | we could define the quantifers that way that they stop when the thing doesn't match anything | 23:03 | |
masak | I now have the harness playing every algorithm against every algorithm, for game sizes between 6 and 20. :) | ||
pmurias: yes, that's what I'm saying. | 23:04 | ||
'night, #perl6. | 23:06 | ||
23:06
masak left
|
|||
colomon | masak++ | 23:08 | |
though 20 is nothing.... | |||
23:11
HaraldJoerg left
|
|||
colomon thinks his algorithm should do pretty well until about 60 or so (barring bugs that slipped through testing, of course). | 23:14 | ||
23:16
autark left
23:19
HaraldJoerg joined
23:24
plobsing joined
23:25
HaraldJoerg left
|
|||
dalek | p: d6338b2 | jnthn++ | src/NQP/Actions.pm: Toss 'is pirflags' and add 'is vtable'. Calls method on the meta-object, though none implement it yet. Eventually this allows overriding of some Parrot v-table methods again when using 6model, which we'll need for other Parrot bits to interop with languages using 6model. |
23:29 | |
p: a022547 | jnthn++ | t/nqp/52-vtable.t: Update test file to use is parrot_vtable rather than is pirflags. Still doesn't pass again yet, though. |
|||
23:30
drbean joined
|
|||
sorear | jnthn: how long until it will be possible to have other parrot languages using 6model objects? | 23:31 | |
jnthn | sorear: Well, in a sense, they already could, if they're prepared to use the new nqp already. | 23:32 | |
23:32
MayDaniel joined
|
|||
jnthn | sorear: I think the main blocker is probably documentation and examples of doing stuff other than what NQP does with it. | 23:32 | |
sorear | will it eventually be possible to use new objects without nqp code? | 23:33 | |
jnthn | Yeah. | ||
The weaving at the moment is one of developer (e.g. my ;)) convenience than need. | 23:34 | ||
sorear | Dedenting heredocs turns out to be less trivial than I thought. | ||
jnthn | You can already do everything in PIR with 6model that you can do from NQP, so any other languaes that can generate such PIR should do just fine. And since doing most things with 6model is method calls anyway...it shouldn't be so bad. | 23:35 | |
sorear | perl6: my $x = 1; say "$x".WHAT | ||
p6eval | pugs: OUTPUT«Str» | ||
..rakudo : OUTPUT«Str()» | |||
..niecza v2-42-g311ba52: OUTPUT«» | |||
sorear | niecza: my $x = 1; say "$x".typename | ||
p6eval | niecza v2-42-g311ba52: OUTPUT«Num» | ||
jnthn | o.O | 23:36 | |
23:36
shi joined
|
|||
sorear | jnthn: niecza treats "$x" as just $x | 23:36 | |
jnthn | Ah :) | ||
sorear | wondering if maybe it... shouldn't | 23:37 | |
otoh, "foo" really shouldn't call &infix:<~> | |||
stifynsemons | how does one delete hash keys? | 23:40 | |
TimToady | by spec, %hash<key>:delete, but that's not in rakudo yet | 23:43 | |
sorear | %hash{"key"}:delete | ||
TimToady | %hash.delete('key') in rakudo | ||
sorear | TimToady: is the latter spec? does niecza need to support it? | ||
jnthn knows why we have the %hash<key>:delete, but his brane still refuses to find it attractive... | |||
stifynsemons | thanks | 23:44 | |
TimToady | sorear: no, not spec | 23:47 | |
jnthn | The adverb way will be the only one? :( | 23:48 | |
TimToady | please tell me how .delete(Str) can possibly be a degenerate case of a multidimensional list of slices | 23:51 | |
jnthn | Hmm. I guess I'm not arguing for keeping .delete(Str) really...I've just never really managed to like the :delete approach. | ||
Maybe it feels too end-weighty. | 23:52 | ||
Maybe I'll get used to it with time. | |||
TimToady | delete is supposed to return the deleted elements exactly as if it were subscripted anyway | ||
sorear | FWIW, niecza has a .delete-key which is used by postcircumfix:<{ }> | ||
jnthn | Just one of those rare-ish cases where something in Perl 6 grates a bit. It may just be me. | ||
TimToady | I don't mind internal methods | ||
sorear | although it's slightly misnamed now that it accepts slices (or at least its sister at-key does) | 23:53 | |
TimToady: did you see my question about jumptables in the backlog? | 23:59 |