»ö« 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. |
|||
00:05
nif left
00:16
nif joined
00:24
lichtkind left
00:29
[particle] joined
00:31
wolfman2000 joined
00:36
replore_ joined,
havenn left
00:44
plobsing joined
00:48
whiteknight left
00:51
xinming joined,
vlixes joined
00:53
xinming_ left
00:56
lichtkind joined
01:01
lichtkind left
01:11
jaldhar joined
01:12
scott___ joined
01:15
tokuhirom left
01:16
tokuhirom joined
01:21
tokuhirom left
01:29
liuchong joined
01:39
vlixes left
01:44
wooden joined,
wooden left,
wooden joined
01:46
nif left
01:52
retupmoca joined
01:54
xinming left
01:56
xinming joined
|
|||
moritz | Juerd: nope, seems back to normal | 01:57 | |
02:18
orafu left,
orafu joined
02:27
thelazydeveloper left
02:51
xinming_ joined,
fgomez joined,
fgomez left,
fgomez joined
02:53
xinming left
03:12
sunnavy joined
03:39
replore_ left
03:41
replore_ joined
03:54
skids joined
04:44
SHODAN left,
SHODAN joined
04:52
farber7 joined
04:55
sudokode left,
DarthGandalf left,
DarthGandalf joined
|
|||
farber7 | Hello I have a few questions about rooting the MotoActv, if I go for a run with it do I need to bring my phone as well to keep them linked for apps and internet. ? I know it notifies you of text messages but how close will my phone need to be. I have a iPhone 4 now but I had the droid razor and would go back to it but its way to big to take on runs with me. | 04:56 | |
04:58
lestrrat left
|
|||
farber7 | Also if I got the watch and made it work how I needed with heart rate monitor and all can I have help rooting it I will pay for it to be rooted if I cannot do it. I have about 10 other people on my team who will do the same thing if possibel | 04:58 | |
04:59
lestrrat joined
05:04
xinming_ left
05:06
alvis` joined
05:08
NamelessTee joined
|
|||
bonsaikitten | farber7: I think you're not in the right place | 05:08 | |
05:09
birdwindupbird joined
05:11
scott___ left
05:12
lestrrat left
05:13
lestrrat joined
05:14
havenn joined
05:15
sudokode joined
05:21
alvis` left
05:23
sftp left
05:24
spaceships left
05:25
alvis joined
05:26
farber7 left
05:28
replore_ left
05:31
havenn left
|
|||
moritz | good morning | 05:36 | |
05:56
havenn joined
05:57
havenn left
05:58
NamelessTee left
06:02
havenn joined
06:07
birdwindupbird left
06:19
jferrero left
06:27
xinming joined
06:33
jferrero joined
|
|||
jnthn | morninä | 06:35 | |
geekosaur | בוקר טוב | 06:38 | |
(...whatever font my client substituted there is hideous) | |||
06:44
tarch joined
|
|||
cosimo | morgen | 06:47 | |
shachaf | geekosaur: You're allbery_b?! | 06:55 | |
moritz | \o cosimo | ||
cosimo: LWP::Simple works again on newest Rakudo :-) | |||
06:56
thou left
|
|||
jnthn wonders if cosimo will be at the Oslo hackathon | 06:57 | ||
06:58
birdwindupbird joined
|
|||
cosimo | moritz: that's great to hear | 07:00 | |
jnthn: i'll try to show up, however my mum is flying to Oslo on saturday morning :) | 07:01 | ||
geekosaur | shachaf, yes | 07:03 | |
shachaf | geekosaur: I thought you had disappeared forever or something. | ||
07:09
fhelmberger joined
07:20
havenn left
07:22
fglock_ joined
07:31
havenn joined
07:32
nwc10 joined
07:41
havenn left,
havenn joined
|
|||
tadzik | hello there | 07:46 | |
07:49
havenn left
07:50
pomysl left
07:51
havenn joined,
pomysl joined,
pomysl left,
pomysl joined
07:52
havenn left
07:53
havenn joined
07:55
havenn left
08:13
pomysl left,
pomysl joined,
pomysl left,
pomysl joined
|
|||
masak | morning, #perl6. | 08:14 | |
arnsholt | o/ | 08:15 | |
moritz | \o | 08:18 | |
masak .oO( I said hello, and all they did was raise arms ) | |||
:P | |||
moritz | as long as they don't fire... :-) | 08:19 | |
tadzik | :P | ||
hello hello | |||
08:19
pomysl left
|
|||
masak | it's great to be back. my offline acquaintances are silly too, but not like you guys. :) | 08:20 | |
08:21
pomysl joined,
pomysl left,
pomysl joined
|
|||
arnsholt | I'm still working on my first cup of coffee, so I'm still not quite verbal yet =) | 08:21 | |
Also, too many still-s | |||
08:25
pomysl left
08:26
pomysl joined,
pomysl left,
pomysl joined
08:32
pomysl_ joined
08:33
pomysl left
08:37
pomysl joined,
pomysl left,
pomysl joined
|
|||
masak | re blogs.perl.org/users/shlomi_fish/20...-been.html -- I think Shlomi was funnier back when we tried to fork Perl 6 and make his own. | 08:37 | |
s/we/he/ | |||
08:39
pomysl_ left
|
|||
masak | ah, it's still online: www.shlomifish.org/rindolf/rindolf-spec/ | 08:42 | |
moritz | well, funniness wears off after a while | 08:43 | |
masak | I think it's a somewhat interesting thought experiment -- what if the Perl 6 transition had been more on the order of Python 3k? | ||
moritz | probably like kurila | 08:44 | |
masak | url? | ||
moritz | ie an interesting experiment that doesn't really take off | ||
masak: github.com/ggoossen/kurila#readme | 08:45 | ||
08:45
bbkr joined
|
|||
masak | I think Perl 6, much like Esperanto, survives a lot on its clear vision. | 08:48 | |
i.e. a better something. | |||
moritz | so, what's the "something"? | 08:50 | |
"everything"? :-) | |||
masak | fsvo "something", yes ;) | 08:57 | |
actually, I think we're whirlpooling on the "something". | |||
by the end of the process we'll jump out and say "a-ha! Perl 6 is finished, and this is the kind of something it's a better one of!" :P | 08:58 | ||
moritz | I hope it won't come out as "better PHP" or "better awk" :-) | 09:00 | |
masak | well, it'll be that too. but yeah, I'd be surprized if we landed on only that :P | 09:05 | |
09:07
havenn joined
09:09
havenn left
|
|||
moritz | masak: btw have you seen gist.github.com/2346494 ? | 09:10 | |
masak | I hadn't. nice. | 09:14 | |
s/Gas/Vapor/ :) | |||
moritz | :-) | 09:15 | |
masak | also, that's a narrower definition of "slushy" than I've been using. | ||
masak checks his own definition in a blog post | |||
"Slushy is good; it means that we have some backing from implementations, but the spec and the implementations don't quite agree yet." | 09:16 | ||
to me "slushy" is not about stability so much as "we know that we're at least a little bit right, but we suspect things are still a bit wrong, too". | |||
moritz | that's a better phrasing, yes | 09:17 | |
masak | I guess we're saying the same thing, though. | ||
the numbering for the phases confuses the heck out of me. | 09:18 | ||
I think both because it feels inverted (solid things are colder, no?) and because the numbers don't tell me anything. I think you need something spatial rather than numbers. something progress-bar-like. | |||
moritz | oh right, non-physicsts think that high temperature values are hotter | 09:19 | |
masak | :P | ||
09:20
TESTKEYz joined
|
|||
masak | but maybe this is "raw source" and it could be rendered as HTML. | 09:20 | |
fwiw, I think this should go up alongside the compiler comparison thingy. | |||
moritz | if you do statistical physics, you usually use 1/KT as the "temperature" | ||
maybe think of it as Moh's scale instead of temperature | 09:21 | ||
:-) | |||
anyway, I don't have a problem with renumbering | |||
masak | heh, sludgy minerals. | 09:22 | |
moritz | or maybe use letters, if we can find two terms for "solid" and "slushy" that don't start with the same letter | ||
masak | if the letters sort "right" lexicographically, it's fine. | ||
moritz | re showing it on perl6.org, I wanted to get some more feedback first | 09:23 | |
masak | you're looking for that sweet spot of a model that's both simple and intuitive. | ||
moritz | because partially that rating is *very* subjective | ||
09:24
havenn joined
|
|||
masak | it is? maybe it has an inherent fuzziness of one point on the scale... | 09:24 | |
09:26
havenn left
|
|||
moritz | some random observations so far: | 09:26 | |
S02 and S03 have a lot more subheadings than S04 | 09:27 | ||
masak | maybe you could re-use the PSA scale from A01? "Accepted", "a few Buts", "major Caveats", "Rejected" | ||
moritz | they also have (or hopefully had) a lot more crackpot stuff than S04 (and, I suspect, S05) | ||
masak | I think diakopter++ went and added lots of subheadings to S02 at one point. | ||
moritz | right | 09:28 | |
masak | S05 has its fair share of crackpot stuff ;) | ||
moritz | it has? | ||
masak .oO( three kinds of <?after > ) | |||
moritz | I'm not too deep into it | ||
masak .oO( say hello to the ~~ operator in regexes ) | 09:29 | ||
moritz | ah well, some possibly unimplementable builtins are harmless compared to some of the parsing stuff I've deleted from S02 and S03 | 09:30 | |
masak .oO( Conjecture: we don't know how crazy the <*abc> syntax actually is, so some bits of it might be physically impossible ) | |||
moritz | masak: <*abc> is on a sound theoretical foundation | ||
masak | aye. | 09:31 | |
moritz | masak: it allows only a regular language, so you can simulate it as a DFA that accepts in every possible state | ||
masak | yes, I know. | ||
moritz | (but still carries on as far as it can) | ||
so I don't expect much in the "physically impossible" department | 09:32 | ||
masak | right. the conjecture in question just says "could get expensive". | ||
moritz | std: /<*a||b>/ | 09:33 | |
p6eval | std 1ad3292: OUTPUT«ok 00:00 41m» | ||
moritz | masak: I'm more concerned about it being expensive in terms of compiler writer hours :-) | 09:34 | |
masak | luckily, the feature as such is not on a critical path of any kind. | ||
it's more of a "nice syntactic sugar" thing. | |||
moritz | more like "nice sugar" | 09:35 | |
it's not as if you could easily get the same functionality if you were willing to use ugly syntax | |||
masak | you could. S05 gives examples. | ||
moritz | well, but that requires you to spell out the regex. Which is much harder if some part of it is user input. | 09:36 | |
masak | &eval | ||
:) | |||
r: my $rx = ''; for 'xyz'.comb.reverse { $rx = "[$_ $rx]?" }; say $rx | 09:39 | ||
p6eval | rakudo 3bd91f: OUTPUT«[x [y [z ]?]?]?» | ||
masak | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say $rx | ||
p6eval | rakudo 3bd91f: OUTPUT«[x [y z?]?]?» | ||
moritz | ok, you have won :-) | ||
masak | \o/ | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xy' ~~ /<?{ $rx }/ | 09:40 | |
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===regex assertion not terminated by angle bracket at line 1, near "/"» | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xy' ~~ /<?{ $rx }>/ | ||
p6eval | rakudo 3bd91f: OUTPUT«True» | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'x' ~~ /<?{ $rx }>/ | ||
p6eval | rakudo 3bd91f: OUTPUT«True» | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyza' ~~ /<?{ $rx }>/ | ||
p6eval | rakudo 3bd91f: OUTPUT«True» | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyza' ~~ /^<?{ $rx }>$/ | ||
p6eval | rakudo 3bd91f: OUTPUT«False» | ||
moritz | r: my $rx = ''; for 'xyz'.comb.reverse { $rx = $rx ?? "[$_ $rx]?" !! "$_?" }; say so 'xyz' ~~ /^<?{ $rx }>$/ | ||
p6eval | rakudo 3bd91f: OUTPUT«False» | ||
masak | mischivous idea: we could prototype an implementation by just throwing in this kind of code :P | 09:41 | |
moritz | I just thought about that | ||
but unfortunately it's not that easy | |||
masak | dang. :/ | ||
well, could always prototype it in a module for the time being. | |||
moritz | consider <* [xyz | a ] b > | ||
that shouldn't match xyb | 09:42 | ||
but if you just recursively apply your transformation to all literals, it would match | |||
masak | right. | ||
OH BTW. after thinking some more about how best to create a unity matrix in S09-enabled Perl 6. | 09:48 | ||
09:49
TESTKEYz left
|
|||
masak | I decided I was on far too many high horses at the same time, grinding far too many theoretical axes. | 09:49 | |
moritz | use matrix; my @m = unity(5); # for a 5x5 unity matrix | 09:50 | |
masak | how about 'sub I($n) { my Num @matrix[$n][$n]; @matrix[$_][$_] = 1 for ^$n; return @matrix }'? :) | ||
moritz: sure, that's the API. I'm talking about the implementation. | |||
moritz | CHECK failed: assignment to @matrix[...][...] will never work. Type constraint: Num. Got: Int | 09:51 | |
masak | er, s/Num/Real/, perhaps. | ||
I meant Numeric but wrote Num. | |||
that seems to happen to me (and others) a lot. :) | |||
if 'my Numeric @matrix[$n][$n]' works, then I'll take that. | |||
hm. I just realized I wrote [$n][$n] instead of [$n;$n]. | 09:52 | ||
does S09 explicitly support the former form? | |||
moritz | masak: that's kinda cute. But for "real" linear algebra applications you probably want some sparsish matrix types | ||
masak | sure. | ||
but I consider that a representation, not a part of the algorithm. | 09:53 | ||
moritz | masak: in fact, all serious linear algebra libs that I know have separate (upper triangle, lower triangle, diagnoal matrix, sparse matrix, dense matrix) types | ||
masak | *nod* | ||
and that's fine. | |||
anyway, I realized I was out in APL-land or FP land looking for nice ways to create a unity matrix. | 09:54 | ||
moritz | well, the two are related. If you know that the matrix always stays diagonal, it gives you an easier API | ||
masak | but it should probably just be the above. | ||
moritz | use Matrix; my @a := diagonal(1 xx $n); | ||
masak | oh, troo. | ||
as long as it upgrades seamlessly, that's probably the cutest implementation possible. | |||
moritz++ | |||
sub unity($n) { diagonal 1 xx $n } | 09:55 | ||
moritz | seamlessly, yes. Not sure if it should implicitly though | ||
though there should be coercions available | 09:56 | ||
masak | if the matrices are immutable, it's not much of a problem. | ||
then we can Liskov freely and happily. | |||
moritz | after all, my @a = 1, 2, 3; coerces the RHS to array | ||
likewise if we allow my @a as DenseMatrix; @a = unity(5) to coerce, we should be fine | 09:57 | ||
which makes me think we maybe should have a MutableMatrix vs. ImmutableMatrix distinction like Array/List and Hash/EnumMap | 09:58 | ||
09:58
brrt joined
|
|||
masak still thinks the Array/List distinction will forever confuse newcomers, and that the name "EnumMap" is too narrow/wide | 09:59 | ||
moritz knew that masak's next line would be about the "EnumMap" name | |||
but then you also have to complain about Pair/Enum | 10:00 | ||
:-) | |||
masak | maybe I will... :) | ||
masak eyes his collection of sledgehammers | |||
moritz is glad he's not the only one complaining | 10:01 | ||
on this occasion I'd also like to note that the multiple uses of the smartmatch operator block us from having $str ~~ m:g/.../ working | |||
(because if m:g/../ returns a list, it desugars to do { my $_ := $str; (m:g/.../).ACCEPTS($_) } | 10:03 | ||
and sine List.ACCEPTS already has a perfectly valid meaning that doesn't work in this case, we have a problem) | |||
s/sine/since/ | 10:08 | ||
10:11
GlitchMr joined
10:17
mucker joined
|
|||
moritz | I'd like to try a constrained writing exercise in Perl 6 one day. Something along the lines of "write a short, text based game that doesn't use the letter 'e' in its source code" or so | 10:24 | |
maybe something less drastic for a start :-) | |||
10:24
envi_ left
|
|||
jnthn | "e" is great because then your code can't just use eval(...decode stuff...) too :) | 10:26 | |
10:26
daxim joined
|
|||
moritz | it *can* use ::('&' ~ 'd'.succ ~ 'val').($stuff) :-) | 10:29 | |
jnthn | right :)_ | ||
Can't use "." would be painful :) | |||
moritz | oh yes | ||
jnthn | Can't use parens would make people learn the precedence table :P | ||
moritz | I wonder how far you can get without curlies | 10:30 | |
all your blocks written as whatever-curried expressions... :-) | |||
jnthn | ooh :D | ||
moritz | without 'e' you can't declare methods | 10:31 | |
classes, attributes and subs would be fine though | |||
jnthn | You can add code objects via the MOP...but BEGIN and CHECK are out for doing it :P | 10:32 | |
moritz | but 'constant' forces compile time evaluation too | ||
jnthn | Unless capital E is OK :) | ||
ooh, yes! | |||
moritz | you see, we already get creative just by thinking about the problem, without even doing anything in it | 10:33 | |
jnthn | nom: class A { constant = A.HOW."add_m{'d'.succ | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2» | ||
jnthn | gah | ||
nom: class A { constant = A.HOW."add_m{'d'.succ}thod"(A, 'foo', sub ($slf) { say 42 }); }; A.foo | 10:34 | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===invoke() not implemented in class 'Undef'» | ||
10:34
fsergot joined
|
|||
jnthn | Hm :) | 10:34 | |
We may also find bugs :P | |||
nom: class A { constant x = A.HOW."add_m{'d'.succ}thod"(A, 'foo', sub ($slf) { say 42 }); }; A.foo | |||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===invoke() not implemented in class 'Undef'» | ||
jnthn | wtf | 10:35 | |
jnthn gotta teach stuff, will leave masak to golf and file rakudobug :P | |||
fsergot | hi #perl6 o/ | 10:36 | |
tadzik | hey fsergot | 10:39 | |
10:40
NamelessTee joined
10:43
bluescreen10 left
10:50
PZt left
|
|||
gfldex | masak: i believe the following is asking for your attention: rosettacode.org/wiki/Assertions#Perl_6 | 10:51 | |
10:52
PZt joined
10:55
tarch left
|
|||
masak | gfldex: nah, that's a textual macro. :) | 11:01 | |
gfldex | should it be? | 11:02 | |
masak | also, the one who wrote that thinkgs that "non-hygienic" means "textual". | ||
well, textual macros fall above AST macros on the power spectrum. | |||
which means, as usual, that you should use them sparingly, only if you can't use the things below on the scale. | |||
here I kinda feel an AST macro would've been nicer, actually. | 11:03 | ||
but then, the specifics of how to pass an expression into an AST macro are not necessarily nailed down. | |||
11:05
brrt left
|
|||
gfldex | so this is for later | 11:06 | |
masak | I guess Pugs has textual macros. | 11:07 | |
pugs: macro foo($x) { "$x; $x" }; foo('say "OH HAI"') | 11:08 | ||
p6eval | pugs: OUTPUT«OH HAIOH HAI» | ||
11:08
benabik left
|
|||
masak | pugs: say "runtime"; macro foo($x) { say "compile time"; "$x; $x" }; foo('say "OH HAI"') | 11:08 | |
p6eval | pugs: OUTPUT«compile timeruntimeOH HAIOH HAI» | ||
masak | \o/ | ||
11:09
thelazydeveloper joined
|
|||
tadzik | do we have textual macros too? | 11:10 | |
masak | "we" as in Rakudo? no. | 11:11 | |
tadzik | yes, I meant Rakudo | ||
masak | you'll have to find someone crazier than me to implement textual macros. :) | ||
tadzik | :P | ||
masak | there's a fundamental impossibility in there somewhere. strings are immutable, and yet textual macros literally change the source code being parsed. | 11:12 | |
which is problematic, because all the cursors prior to the macro application refer to the old source code, and suddenly there's a new source code. | |||
AST macros are much easier, because ASTs are meant to be transformed in varous fun ways. that's why we have a middle end. | 11:13 | ||
11:15
spider-mario joined
11:18
lestrrat left
11:19
lestrrat joined
11:20
pernatiy joined
|
|||
fsergot | Which file is responsible for running perl6's scripts? | 11:25 | |
masak | heh, Perl 6 discussion on #perl-help :) | ||
fsergot | In nqp, right? | 11:26 | |
Oh, found. :) | 11:27 | ||
moritz | masak: if we want to implement the :rw regex modifier at some point, we need to reference variables and not values in cursors and match objects | 11:30 | |
11:31
root____1 joined
|
|||
masak | yeah. | 11:31 | |
jnthn | $!orig already does hold the original thingy fwiw | 11:32 | |
root____1 | hi. i'm trying to read up on perl6.. and there's one thing that i can't really figure out: does Perl 6 support DSLs, similar to Ruby or something else? | 11:35 | |
11:35
root____1 is now known as poladark
|
|||
moritz | well, (nearly) every language supports DSLs in the ruby sense (that is, normal code looking cute if you give the subroutines and methods cute names) | 11:36 | |
Perl 6 also allows you to extend the syntax in lexical scopes, for example by introducing new operators | 11:37 | ||
masak | poladark: you can pass a block to a sub, and have that sub dynamically declare some stuff, such that your DSL only works inside the block. | ||
poladark | i really loved hacking Rebol and i got kind of addicted to DSLs there | ||
moritz | there's also support for macros, but it's not quite there yet, being worked on | ||
jnthn | rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 10! | 11:38 | |
p6eval | rakudo 3bd91f: OUTPUT«3628800» | ||
poladark | i *suppose* Rebol syntax is just a giant DSL engine | ||
masak | poladark: then you can write stuff like 'recipe { ingredients onion => 1, milk => 2dl; ... }' | ||
moritz | poladark: I don't know much about Rebol, but I do know that the term "DSL" is overloaded and highly ambigous | 11:39 | |
masak | I think there's a useful core to the DSL concept. you can find it around Martin Fowler and his writings. | ||
but there's a lot of hot air around that core. | |||
poladark | my experience learning perl regex properly convinced me of how having domain-specific languages for solving particular problems well has value | 11:42 | |
moritz | yes, but regexes are a very different beast of DSLs as what ruby folks mean when they say "DSL" | 11:43 | |
arnsholt | And what the Lispers mean when they say is a third thing, I think | 11:44 | |
moritz | ie it's really a different language within a quoting construct | ||
11:44
tokuhirom joined
11:45
snearch joined
11:46
bluescreen10 joined
|
|||
masak | moritz: regexes are an "external DSL", according to the terminology. recipe/ingredients using well-named subs is an "internal DSL". | 11:46 | |
I'm not keen on the terminology, mostly because it glorifies internal DSLs a bit much. but it seems pretty established. | 11:47 | ||
moritz | masak: is there a term for something inbetween? like, well-named subs plus custom operators? | ||
masak | don't think so. but in Perl 6 it's all the same :) | 11:48 | |
jnthn | How about we call it, "using your language's features appropriately"? :) | ||
masak | in masak.org/carl/yapc-russia-2011-ath...g/talk.pdf I prefer the distinction "growing language inwards"/"growing language outwards". | ||
so, anything nested in something else is a language that grows inwards into some other language. | 11:49 | ||
11:49
NamelessTee left
|
|||
masak | whereas various prepropressing or compiling is growing a language outwards. | 11:49 | |
moritz | .oO( does that mean that SQL is cancer? ) |
||
11:49
simcop2387 left
11:50
simcop2387 joined
|
|||
masak | when you compare Perl's regex support (syntax-wise) to Python's or PHP's, you can see that Perl groks "inner languages" at a wholly different level than Python or PHP. | 11:50 | |
11:51
fgomez left
|
|||
poladark | that's what initially confused me about Ruby DSLs too. i thought "wow, i can make my own database query or text processing language like SQL or Regex now!" | 11:51 | |
turns out it wasn't as impressive as that | |||
but it works reasonably well for some things like Puppet | |||
tadzik | do you know Dancer/Sinatra? | 11:52 | |
masak | DSLs do have a place. they're not just toys. but it's prudent not to let the hype and enthusiasm carry the baby out on a tidal wave of bathwater. ;) | 11:53 | |
poladark | i only heard of Sinatra. never used it. | 11:54 | |
masak | I've landed on a view where I consider myself the most productive and happy when I create little "internal APIs" for myself inside of an application. basically build the syntactic abstractions I need, as I need them. | ||
it's extremely liberating to keep in mind that the programming language basically lets you do *anything* to make the solution more easy to express. | |||
poladark | over the years, i've fallen in love with the way different programming techniques are good at certain problems. i'd really love it if there was one language that was flexible enough to contain the possibility of using all of them when coding | 11:55 | |
masak | welcome to #perl6 :) | ||
tadzik | :) | ||
poladark | :O | 11:56 | |
tadzik | I always thought Sinatra/Dancer/Bailador is pretty much what DSL is supposed to look like | ||
masak | it's a good example, I think, of a well-balanced internal DSL. | ||
your domain is HTTP verbs. so you get them as subroutines. | 11:57 | ||
11:57
benabik joined
|
|||
poladark | once in a while, i'm really pissed off because i think "i could do this in a row of code with Forth!" | 12:00 | |
but i'm not sure if a ruby-like DSL would allow me to create a Forth "dialect". | 12:01 | ||
[Coke] | I remember back in the day when a DSL was a standalone thing. I worked with a one off language to generate medical billing app/reports aeons ago. | 12:05 | |
masak | well, you'd need a dedicated parser and interpreter for something like a Forth sublanguage. | 12:06 | |
but under the final vision of Perl 6, it should definitely be possible. | |||
poladark | :) | ||
moritz | well, Perl 6 does make parsing easy | ||
tadzik | aye | 12:07 | |
gfldex | i'm quite sure it will work with a version prior to Final Perl 6 | ||
masak | poladark: if you want to experiment with it in limited forms now, I recommend looking into parsing with grammars. | ||
moritz | though simple DSLs are already easy to parse. Like, splitting on newlines and blanks | ||
masak | p6: say "testing a simple Forth lexer.words.perl | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Confusedat /tmp/cVUxgd6vFk:1» | ||
..niecza v15-6-gefda208: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/OmaKL9jVJj line 1:------> say⏏ "testing a simple Forth lexer.words.perConfused at… | |||
..pugs: OUTPUT«***  Unexpected end of input expecting block, "\\", variable name or "\"" at /tmp/1x5N5nh6h3 line 2, column 1» | |||
masak | p6: say "testing a simple Forth lexer".words.perl | ||
p6eval | niecza v15-6-gefda208: OUTPUT«["testing", "a", "simple", "Forth", "lexer"].list» | ||
..rakudo 3bd91f: OUTPUT«("testing", "a", "simple", "Forth", "lexer").list» | |||
..pugs: OUTPUT«*** No such method in class Str: "&words" at /tmp/SnmpTj4GQN line 1, column 5 - line 2, column 1» | 12:08 | ||
12:08
brrt joined
|
|||
masak adds .words to the Pugs LHF TODO | 12:08 | ||
tadzik | hmm, there could be a bot for this | ||
.LHF pugs .words | |||
or such | |||
random idea, maybe useless :) | 12:09 | ||
moritz | we've already discussed integrating p6eval with ticket submission and test creation | ||
but I guess we were reaching too high | |||
so not much has happened | 12:10 | ||
tadzik | probably the cost outweights the benefits | ||
[Coke] | open pugs issue #LHF Str.words | ||
moritz | tadzik: well, it was hard to find a user interface that was both powerful and easy to use | 12:11 | |
masak | [Coke]++ # github.com/perl6/Pugs.hs/commit/25...8fe9912103 | 12:12 | |
what a delightfully simple patch. | |||
moritz | there's some pretty neat DSL around that patch :-) | 12:13 | |
[Coke] | masak: sadly, it got me that one test file, but not much else. (I need to ratched down autounfudge's pugs a little bit more, as a lot of the stuff we've skipped is hanging when we try to unfudge it.) | 12:15 | |
masak | I think the "feeling" around DSL (and the reason for much of the hype) is "whoa, I can make my code look more like the solution space than like code!" | ||
[Coke] | there's probably some manually unfudging to do, though. | ||
moritz | masak: which is also the drive behind data driven programming | 12:17 | |
masak | aye. | 12:18 | |
it's also some of the drive behind employing a top-down approach to coding. | 12:19 | ||
12:19
envi_ joined
|
|||
masak | use API -> defined API -> implement underpinnings of API. | 12:19 | |
define* | |||
repeat until you hit the metal :) | 12:20 | ||
spider-mario | I’ve read that Perl 6 was expected to have faster implementations than Perl 5 thanks to optional typing and all that, | 12:23 | |
do you think we’ll get there one day? | |||
moritz | maybe | 12:24 | |
rakudo already benefits from gradual typing | |||
but it still has to make up lots of ground | |||
it's probably too early to tell | |||
spider-mario | probably | ||
still, the tendency is encouraging. :) | 12:25 | ||
masak | I think we'll land in a place where Rakudo (say) will be slower for most things, faster for some specific things, but fast enough for it not to matter because you'd generally want the things Perl 6 has over Perl 5. | ||
flussence | the numeric stuff is getting lots of optimisation lately but I find anything using regex to still be painfully slow :/ | ||
spider-mario | rakudo’s startup time already has nothing to do with that of its 2012.02 star release. | 12:26 | |
12:26
user joined
|
|||
tadzik | in what way? | 12:26 | |
spider-mario | a good way | ||
a very good way | |||
12:27
user left
|
|||
tadzik | perl6 -e 1 0.24s user 0.14s system 81% cpu 0.459 total | 12:27 | |
not bad indeed | |||
dalek | ast: a84fe9b | coke++ | S (3 files): pugs unfudge (so) |
||
tadzik | used to be about 0.5 seconds iirc | ||
spider-mario | (sorry, some of my sentences may seem awkward) | ||
(I’m not always comfortable with English) | |||
tadzik: with * 2012.02, a hello world took 3 seconds to execute on my machine | |||
now, about 0.3s | 12:28 | ||
[Coke] | \o/ | ||
spider-mario | (maybe 0.5 actually) | ||
(but still!) | |||
[Coke] | I assume that's due to jnthn++'s bs branch? | 12:29 | |
flussence | cold start on a netbook: 0m1.593s | ||
moritz | flussence: and warm start? | ||
spider-mario | it seems so | ||
masak | [Coke]: aye. | ||
tadzik | spider-mario: oooh | ||
oh, Star was before bs? | |||
flussence | warm start... 1.319. I thought it'd be faster | ||
spider-mario | Star, cold: 2,95s user 0,17s system 64% cpu 4,811 total | 12:30 | |
masak | [Coke]: at GPW, I was demo-ing some Rakudo stuff in the space before my talk, and was surprised, live, at the improved startup time. | ||
spider-mario | Star, warm: 2,97s user 0,17s system 98% cpu 3,189 total | ||
git, cold: 0,47s user 0,14s system 65% cpu 0,930 total | |||
git, warm: 0,46s user 0,15s system 97% cpu 0,620 total | |||
masak | a six-fold speedup. | ||
that's significant. | |||
spider-mario | it is, it makes rakudo much more usable | ||
moritz | now I just wish we could have have module loading | 12:32 | |
masak | it makes it usable sooner :P | ||
moritz | s:2nd/have/fast/ | ||
which probably requires working precompilation | |||
masak | well, really fast compilation wouldn't be so bad either. | 12:33 | |
people will start to feel the pain for slow compiles as application sizes scale up. | 12:34 | ||
s/for/of/ | |||
moritz | aye | ||
[Coke] | p6: use Test; ok(any(1|0), "how many tests?") | ||
p6eval | niecza v15-6-gefda208: OUTPUT«ok 1 - how many tests?» | ||
..rakudo 3bd91f: OUTPUT«===SORRY!===Twigil-Variable constants not yet implemented. Sorry. at lib/Test.pm6:3» | |||
..pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode at /tmp/kAdBVcKtTv line 1, column 1» | |||
moritz | [Coke]: 1 | 12:35 | |
[Coke]: test functions shouldn't autothread | |||
masak | did we spec that? | ||
[Coke] | moritz: was trying to demonstrate that pugs authothreads. | ||
*autothreads | |||
locally I get: | |||
ok 1 - how many tests? | |||
not ok 2 - how many tests? | |||
masak | we did spec that. | 12:36 | |
[Coke] | masak: there's a pugsbug ferya. | ||
12:36
fgomez joined
|
|||
moritz | masak: where? | 12:36 | |
masak submits pugsbug | |||
moritz: github.com/perl6/specs/blob/master...esting.pod | |||
[Coke] | makes it somewhat hard to fudge tests properly. I end up skipping everything with ajunction. | ||
masak | lots of Mu in the signatures. | ||
moritz | masak: ah, right | ||
it was even me who specced it :-) | 12:37 | ||
12:38
tyatpi left
|
|||
[Coke] | masak: pugs might need Mu before that's possible. | 12:38 | |
moritz | [Coke]: you can probably write Object until then | 12:39 | |
12:39
frank59 joined
|
|||
masak | frank59: hi! | 12:39 | |
12:41
frank59 left
|
|||
masak | bye. | 12:44 | |
12:44
_ilbot left
12:45
_ilbot joined,
bluescreen10 left
12:46
bluescreen10 joined,
mucker left
12:53
tyatpi joined
12:54
JimmyZ joined
|
|||
masak | a long detailed list of the mistakes of PHP: me.veekun.com/blog/2012/04/09/php-a...ad-design/ | 12:54 | |
tadzik | I wonder why would one spend so much time writing down the downsides of a language | ||
masak | perhaps interesting for language designers. also slightly depressing reading. :) | ||
tadzik | I laughed at "foo" == TRUE, "foo" == 0, 0 != TRUE :) | ||
flussence | that one about long numeric strings is new to me... | 12:55 | |
(and scary) | 12:56 | ||
masak | tadzik: yeah, because having more than one equality operator would just confuse people ;) | ||
brrt | i work in php and it is bad enough without snobs like you pointing it out :-p | ||
anyway | 12:57 | ||
tadzik | masak: yeah, better bury the fundamental logic :) | ||
brrt | what would it take for coercive type definitions to work in rakudo | ||
tadzik | Spock will not approve | ||
(would?) | |||
brrt | they work? | ||
12:58
havenn joined
|
|||
brrt | p6: my Num(Cool) $x = "2390"; say $x.WHAT; | 12:58 | |
p6eval | pugs: OUTPUT«***  Unexpected ")" expecting word character, "|", ":", "*" or parameter name at /tmp/Y421SmPwiD line 1, column 12» | ||
..niecza v15-6-gefda208: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Str, needed Num or subtype at /tmp/6mhhKddrhv line 0 (mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3843 (… | |||
..rakudo 3bd91f: OUTPUT«===SORRY!===Confusedat /tmp/MTe0Kmsg9j:1» | |||
brrt | as per S02: my Num(Cool) $x = prompt "Gimme a number"; | ||
masak | brrt: NYI. | 12:59 | |
rakudo: sub foo($x as Num) { $x }; say foo("2390").WHAT | |||
p6eval | rakudo 3bd91f: OUTPUT«Str()» | ||
masak | huh. | ||
b: sub foo($x as Num) { $x }; say foo("2390").WHAT | |||
p6eval | b 922500: OUTPUT«Num()» | ||
brrt | masak: i reckoned, so what would it take to implement it? | 13:00 | |
masak | jnthn or pmichaud :) | ||
brrt | :-) and if I where to offer my services, where should I look | ||
masak | seems to me it would affect both Grammar.pm and Actions.pm | 13:04 | |
you might want to dig up how Rakudo Beijing did its conversion in sub signatures. | |||
...but I fear this might be a non-trivial patch, especially considering that the question "how first-class are these things?" never really got a satisfactory answer, if I recall correctly. :/ | 13:05 | ||
i.e. can you declare an attribute to be 'Num(Cool)'? (probably yes). can you instantiate a parametric role with they type 'Num(Cool)'? (no frickin' idea) | 13:06 | ||
the type* | |||
13:08
tarch joined
13:10
tokuhirom left
13:11
tokuhirom joined
|
|||
brrt | hmm... okay | 13:11 | |
masak | I want the 'Num(Cool)' syntax too. but it'll be non-trivial to get it in place, I think. | 13:13 | |
PerlJam | that rant on PHP oddly leads me to somewhat of an opposite conclusion than the author. | 13:14 | |
(not that PHP isn't braindamaged, but that this is partly what makes it successful :) | |||
masak: the *syntax* is easy, it's the semantics that are non-trivial :-) | 13:15 | ||
13:15
tokuhirom left
|
|||
jnthn | Coercion types are non-trivial because they need to be first class | 13:16 | |
Which likely means CoercionHOW | |||
And diddling how type checks are handled and stuff. | |||
It goes deep... | |||
masak | yeah. we haven't explored how deep yet. | 13:17 | |
13:17
thelazydeveloper left
|
|||
jnthn | It mostly needs me to get some design tuits to explore it, but mostly those are tied up in other things. | 13:17 | |
masak | maybe we should start by implementing it on a small scale -- for example, forbidding Role[Num(Cool)] | ||
jnthn | Like, QST | ||
masak | QAST! | ||
\o/ | |||
jnthn | *QAST | ||
masak | \o/ | 13:18 | |
jnthn | masak: Why would be forbid that? :) | ||
s/be/we | |||
masak | jnthn: to make it easier to implement a first cut of it. | ||
jnthn | masak: Your "make it easier" sounds like "do it innevitably wrong so we have to rip out a bad implementation later". | ||
masak | but maybe it'll all be so unified that it doesn't much matter... | ||
jnthn | And given the places that it'll touch, I really, really don't fancy that approach. :) | 13:19 | |
[Coke] | jnthn: ... I'm confused. doesn't that describe the last 11 years pretty well? | ||
[Coke] ducks. | |||
jnthn | [Coke]: :P | ||
masak | jnthn: no, I was just thinking there might be unintended consequences lurking, and we could shield ourselves from some of the corner cases by putting up limits. but feel free to ignore it if it doesn't sound like a good idea. :) | ||
13:19
thelazydeveloper joined
|
|||
[Coke] | hugme: hug jnthn | 13:20 | |
hugme hugs jnthn | |||
[Coke] | hugme: kick jnthn | ||
13:20
bluescreen10 left
|
|||
PerlJam | masak: seems like you'd want to find the unintended consequences right away so that you can fix the design | 13:20 | |
(which might mean "forbid this construct" :-) | |||
[Coke] | hugme: hug hugs | 13:21 | |
hugme hugs hugs | |||
tadzik | hugme: hug pugs | ||
hugme hugs pugs; tadzik++ | |||
tadzik | tee-hee | ||
jnthn would be a little bothered if we had to forbid that case. | |||
PerlJam | in any case, finding them sooner means that we don't put in something that sort of works and then people rely on it before we find out it's really broken | ||
jnthn | Mostly because Str(Mu) is the default kash hey type | 13:22 | |
...hash key! | |||
.oO( wtf... ) |
|||
tadzik | kash, hey | ||
13:22
fsergot left
|
|||
masak | oh? not Str(Any)? | 13:24 | |
so junctions won't autothread in a hash lookup? | |||
jnthn | Oh, good question... | 13:25 | |
I think postcircumfix is where the autothreading happens, though. | |||
masak | p6: my %h = foo => 0, bar => 0, baz => 1; say "OH HAI" if %h{"foo" | "bar" | "baz"}; say "!" | ||
p6eval | pugs: OUTPUT«!» | ||
..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«OH HAI!» | |||
masak | oh, ok. | 13:26 | |
spider-mario | p6: (1 .. 5)».say | ||
p6eval | pugs: OUTPUT«23451» | ||
..niecza v15-6-gefda208: OUTPUT«12345» | |||
..rakudo 3bd91f: OUTPUT«14532» | |||
brrt | seriously, how does pugs come up with that? | 13:27 | |
masak | it rotates it one step. | 13:28 | |
all of those are "correct", though. you don't get promised execution ordering with » | |||
spider-mario | p: (1 .. 10)».say | 13:29 | |
p6eval | pugs: OUTPUT«12345689107» | ||
spider-mario | 7 | ||
:D | |||
r: (1 .. 10)».say | |||
p6eval | rakudo 3bd91f: OUTPUT«28610593417» | ||
arnsholt | brrt: IIRC, pugs intentionally does it out of order to keep the end-user "honest" | ||
That is, not rely on ordered execution =) | |||
jnthn | Rakudo the same, fwiw | ||
PerlJam | pugs++ rakudo++ | 13:30 | |
spider-mario | rakudo really shuffles them | ||
brrt | i see | ||
spider-mario | (or does it actually do multithreading?) | ||
[Coke] | p: (1..1)».say | ||
p6eval | pugs: OUTPUT«1» | ||
[Coke] | #HA. | ||
jnthn | Rakudo doesn't multithread yet, no | ||
arnsholt | [Coke]: Nice one! ^_^ | 13:31 | |
brrt | p6: (1..1)>>.say | ||
p6eval | pugs, rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«1» | ||
13:32
birdwind1pbird joined
13:35
bluescreen10 joined
13:36
fsergot joined
|
|||
colomon | n: (1 .. 10)».say | 13:38 | |
p6eval | niecza v15-6-gefda208: OUTPUT«12345678910» | ||
13:39
JimmyZ left
|
|||
colomon | :( | 13:40 | |
[Coke] | colomon: pugs is starting to catch up with niecza. | 13:46 | |
colomon: up to 40%! | |||
colomon | pugs++ | ||
felher | Hey folks: I have a segfault on my machine when doing 'echo -e "~Date.new\n" | nom' with latest nom. Is that known? (the same happens if i type it directly into the repl, fwiw) | 13:47 | |
[Coke] | hey, I'm trying to troll you over here. | ||
nom: ~Date.new | |||
p6eval | rakudo 3bd91f: OUTPUT«Cannot unbox a type object as a native int in any <anon> at src/gen/BOOTSTRAP.pm:97 in sub sprintf at src/gen/CORE.setting:1949 in method Str at src/gen/CORE.setting:9453 in method Stringy at src/gen/CORE.setting:674 in sub prefix:<~> at src/gen/CORE.sett… | ||
moritz doesn't get a segfault either | 13:48 | ||
felher gets a segfault in the nom repl if he types "~Date.newn^D" | |||
strange :) | 13:49 | ||
gfldex | no segfault here on cygwin | ||
13:50
fgomez left
|
|||
jnthn | Can one of you that segfautls possibly gdb/bt it? | 13:51 | |
moritz | oh right, I get one at REPL exit too | ||
jnthn | REPL...exit?! | ||
moritz | aye | ||
in nqp_op_info_table | 13:52 | ||
jnthn: gist.github.com/2351524 | |||
[Coke] | some non sixian return value? | ||
moritz | I wonder if Date.new() should the same as Date.today() | 13:53 | |
or if it should die with "Which date do you want?" | 13:54 | ||
jnthn | That segfault is quite odd - it's not even dying in an op itself... | ||
nom: Date.new('blind') | |||
p6eval | rakudo 3bd91f: OUTPUT«Invalid Date string; please use the format "yyyy-mm-dd" in method new at src/gen/CORE.setting:9397 in block <anon> at /tmp/Spzu5eSx2P:1» | ||
moritz | (or just return some random date, just to mess with people a little) | ||
jnthn | aww | ||
masak | moritz: epoch date? :) | 13:55 | |
it's the zero of dates. | |||
[Coke] | TimToady's birthday. | ||
masak | :) | ||
felher | +1 for the random date solution :D | ||
masak | Mayan end-of-the-world date. | ||
felher | Oh, thats a good one too :) | ||
moritz | or maybe the birth year of Perl 6 | 13:56 | |
masak | founding of Republic of Austria. | ||
moritz | always the next Christmas :-) | ||
brrt | +1 for next christmas | ||
flussence | next christmas, unless the VM's version is >= 6.0, in which case return last christmas :) | ||
masak | "Last Christmas, I gave you Perl 6..." | 13:57 | |
jnthn | "...and the very next day, you segfaulted it..." | ||
[Coke] | mmhehehe. | 13:58 | |
fsergot | :D | ||
[Coke] | nice little Wham! reference. | ||
13:59
liuchong left,
PacoAir joined
|
|||
brrt | the day the bikeshed was built | 14:00 | |
gfldex | n: my @a = 1..5; my @b = 'a'..'e'; my %h = @a Z=> @b; | ||
p6eval | niecza v15-6-gefda208: OUTPUT«Potential difficulties: %h is declared but not used at /tmp/u3Ww_ItoJH line 1:------> my @a = 1..5; my @b = 'a'..'e'; my ⏏%h = @a Z=> @b;» | 14:01 | |
gfldex | n: my @a = 1..5; my @b = 'a'..'e'; my %h = @a Z=> @b; say %h.perl; | ||
p6eval | niecza v15-6-gefda208: OUTPUT«{"1" => "a", "2" => "b", "3" => "c", "4" => "d", "5" => "e"}.hash» | ||
masak | "This year, to save me from tears, I'll just pass a continuation." | ||
gfldex | should that really be "1" ? | ||
moritz | brrt: did you mean: the day the /green/ bikeshed was built? :-) | ||
masak | I heard it was blue. | ||
14:02
NamelessTee joined
|
|||
masak | gfldex: hashes are Str-keyed by default. | 14:02 | |
brrt | basically, it should be green | ||
i'm synesthic, e is a green letter | |||
perl is a green word | 14:03 | ||
its bikeshed is green | |||
(which is really stupid, really, now i think of it) | |||
moritz | brrt: how does perl6.org look and sound for a synesthic? | ||
brrt | not green enough :-p | 14:04 | |
masak | like a symphony of pastel vibrations. | ||
brrt | the pastel makes it doable, really | 14:06 | |
dalek | kudo/nom: b8fdbea | moritz++ | src/core/Temporal.pm: Date.new should not die with LTA error |
||
14:07
havenn left
|
|||
spider-mario | “The functional parts of PHP are designed like C” | 14:07 | |
procedural*? | |||
masak | I thought PHP was all procedural. | ||
maybe it's "functional" as in "it works"? | 14:08 | ||
spider-mario | the rest of the sentence is “but the objectional (ho ho) parts are designed like Java” | ||
14:08
mucker joined
|
|||
brrt | maybe the writer isn't natively english | 14:08 | |
moritz | there's a part of the world that says "functional" when they mean they write and call functions. | ||
masak | yeah, some people like to distinguish procedural and OO, and call the former "functional". mostly non-FP people :) | 14:10 | |
gfldex | PHP got cloasures that don't relly work. That might be the functional part. | ||
masak | to me, distinguishing procedural and OO in the first place is a bit of a stretch... :) | ||
moritz | masak: then you haven't written nearly enough QuickBasic | 14:11 | |
14:11
havenn joined
|
|||
moritz | or any other language without objects and nothing-like-objects | 14:11 | |
spider-mario | gfldex : C doesn’t have it. | ||
brrt | masak: try squeak | ||
masak | I have written quite enough of QuickBasic. I know what you mean, but I still think OO is a subset of procedural, not distinct from it. | ||
gfldex | spider-mario: that might be the reason why then dont work :) | 14:12 | |
spider-mario | :D | ||
masak | brrt: yeah, squeak looks attractive. | ||
moritz | uhm, to me OO is an addition to procedural | ||
masak | confirm segfault on Rakudo HEAD with '~Date.new' on REPL followed by Ctrl+D. | ||
masak submits rakudobug | |||
brrt | the thing about OO... in theory, not in practice | ||
spider-mario | to me, it’s a parallel concept and can be applied to functional programming as well | ||
cf. OCaml and Scala | 14:13 | ||
brrt | is that you have this 'network' of objects | ||
moritz | masak: HEAD~1 | ||
brrt | and pushing one object causes some kind of 'wave' of messages | ||
and that does work | |||
and that works very well, but it requires a lot of world to set up | |||
moritz | masak: b8fdbeaa avoids the segfault, but it's no real fix | ||
brrt | because many people don't do that, their networks are simple | ||
spider-mario | oh, it reminds me of that saying that Erlang has great support for OOP. :d | ||
it’s kind of true. | 14:14 | ||
brrt | and then, it really is procedural | ||
masak | moritz: ok, that goes in the ticket as well. | ||
moritz: do you know a way to cause the segfault after that commit went in? | |||
spider-mario | erlang’s por | ||
oops | |||
erlang’s processes can be seen as objects | |||
moritz | # | 14:15 | |
masak | brrt: I think I have never worked in an OO project that does that idealized network thing. | ||
brrt neither | |||
spider-mario | erlang projects do | ||
masak | brrt: it tends to be just a little bit of runtype polymorphism here and there. | ||
spider-mario | :D | ||
moritz | masak: no :/ | ||
except by reverting it | |||
masak | moritz: any guess at the underlying cause? | ||
moritz | "programming error" | ||
brrt | masak: i know :-) | 14:16 | |
14:16
bluescreen10 left
|
|||
brrt | especially in scripting / web development, where big-world-setup is inpractical | 14:16 | |
masak | the most interesting thing I heard about last year was CQRS. it wraps some ordinary things inside-out in an interesting way. | 14:17 | |
tadzik | moritz: ooc, why 24-12 for Date.new()? | 14:18 | |
masak | tadzik: that's Christmas in Germany. | 14:19 | |
tadzik: also, I've never seen that date format. | |||
dd-MM | |||
is it a Polish thing? | |||
tadzik | I don't think it's a format of any sort, but it's precisly the information I wanted to pass :) | 14:20 | |
moritz | tadzik: feel free to change to the 25th if that is more christmassy to you | ||
tadzik | :) 24 is fine | ||
masak | tadzik: I found ISO 8601, and I never looked back. 2012-12-24. | ||
to me, 25th is Christmas in the US and the UK, and 24th is Christmas in Sweden. | 14:21 | ||
spider-mario | I don’t understand the need for the special case | 14:22 | |
brrt | 25th (and 26th) in the netherlands, although the 'church event' - the 'kerst mis' is on the 24th | ||
spider-mario | if I call it on 2012/12/26, I get a Date that represents 2013/12/24? | 14:23 | |
why? | |||
oh, ok | |||
sorry. | |||
masak | spider-mario: "next Christmas" | ||
spider-mario | I just got it. :D | ||
brrt | also, cqrs is interesting | 14:24 | |
spider-mario | I’m wondering whether I should rebuild rakudo just to get that constructor. | ||
my current rakudo is HEAD^ | 14:25 | ||
(on nom) | |||
14:30
bluescreen10 joined
|
|||
masak | I'd be thankful if someone could extract Date from src/core of HEAD~1, reproduce the error, and golf it down to something minimal. | 14:30 | |
my bet is it involves native attributes somehow. | |||
fsergot | r: my Str $s; $s.chars; | ||
p6eval | rakudo 3bd91f: OUTPUT«use of uninitialized value of type Str in string context» | ||
fsergot | It should print line number, shouldn't it? | ||
masak | this is your chance to catch a segfault! | ||
14:31
tyatpi_ joined
|
|||
fsergot | ;:) | 14:31 | |
14:31
tyatpi left,
Trashlord joined
|
|||
spider-mario | masak : paste.pocoo.org/show/zOfIYY9ZjS5rN1ITYTVm/ | 14:31 | |
14:32
sw joined
|
|||
tadzik | fsergot: I wish it would, yeah | 14:32 | |
14:33
sw left
|
|||
masak | spider-mario: yes, and that's now rt.perl.org/rt3/Ticket/Display.html?id=112376 | 14:33 | |
fsergot | perl6 test.p6 | ||
use of uninitialized value of type Str in string context | |||
0 | |||
tadzik: it doesn't. :) | |||
masak | spider-mario: but... what is it in the Date class that causes the segfault? | 14:34 | |
14:34
REPLeffect left
|
|||
tadzik | yeah, I know. I have few of those warnings in Panda and I wasn't able to track them down | 14:34 | |
spider-mario | oh | ||
fsergot | tadzik: is there any possibility to change this? :) | ||
tadzik | of course there is. Turing completeness, parallel universes and all this :P | 14:35 | |
frankly, I don't know | |||
it seems to come from Mu.pm, which uses warn() | 14:36 | ||
I don't see why warn() would not print a line number | |||
r: warn "foobar" | |||
p6eval | rakudo 3bd91f: OUTPUT«foobar» | ||
tadzik | gah | ||
masak | arguably it should. | 14:37 | |
if you just want to print to $*STRERR, use 'note'. | |||
tadzik | sure | ||
but I think precisely about the "use of uninitialized value" warning | 14:38 | ||
14:38
birdwind1pbird left
|
|||
fsergot | Can I find somewhere the list of all built-in variables? :) | 14:39 | |
jnthn | Note it's $*ERR | 14:41 | |
fsergot: iirc S28 | |||
masak | oh right. | ||
fsergot | jnthn++ thanks | 14:42 | |
Maybe in this error message variable name should be printed? It'll let us track line down easier? :) | 14:49 | ||
Or this is a bad idea? :) | |||
is this* | |||
tadzik | I think it does that for some variables | 14:50 | |
fsergot | It does it only if we use uninitialized variable, not value. | ||
Or i'm wrong? :) | 14:51 | ||
tadzik | well, that's expected :) | ||
see github.com/rakudo/rakudo/blob/nom/...Mu.pm#L137 | |||
it depends on nqp::iscont() | |||
fsergot | I see. :) | ||
tadzik | ...whatever it is | 14:52 | |
jnthn | nom: my $a; say $a | ||
p6eval | rakudo 3bd91f: OUTPUT«Any()» | ||
jnthn | nom: my $a; say +$a | ||
p6eval | rakudo 3bd91f: OUTPUT«use of uninitialized variable $a of type Any in numeric context0» | ||
masak | niecza: warn "foo" | ||
p6eval | niecza v15-6-gefda208: OUTPUT«foo at /home/p6eval/niecza/lib/CORE.setting line 1226 (warn @ 3)  at /tmp/pzJMHodAjo line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3842 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3843 (module-CORE @ 65)  at /hom… | ||
fsergot | I thought We can add printing variable name in value context too. | 14:53 | |
tadzik | why doesn't warn print a line number anyway> | ||
14:54
brrt left
14:55
sisar joined
14:57
brrt joined
14:59
thou joined
|
|||
moritz | because nobody has implemented it | 15:01 | |
15:01
poladark left
|
|||
masak | because the source code doesn't say to print a line number. | 15:01 | |
tadzik | :) | 15:02 | |
I thought there's maybe a specced reason | 15:03 | ||
masak | nope. S32/Basics talks about warn, but not how its output is supposed to look. | 15:06 | |
tadzik | I see | 15:07 | |
15:08
REPLeffect joined
|
|||
tadzik | r: gist.github.com/2352043 | 15:10 | |
p6eval | rakudo 3bd91f: OUTPUT«foobar at line 5» | ||
moritz | yes, but that's the wrong approach | 15:11 | |
it's rather that the code that catches the exception should introspect the backtrace | |||
tadzik | probably, yes | 15:12 | |
what catches warns? | 15:13 | ||
moritz | good question | 15:16 | |
r: return | 15:17 | ||
p6eval | rakudo 3bd91f: OUTPUT«Attempt to return outside of any Routine in block <anon> at src/gen/CORE.setting:340 in block <anon> at /tmp/FBoK_sKATj:1» | ||
jnthn | It's configured in Exceptions.pm iirc | ||
15:17
snearch left
|
|||
moritz | probably sub print_control | 15:17 | |
tadzik | yeah | 15:18 | |
Exception.pm#102 | |||
tadzik is testing a patch | 15:19 | ||
15:20
pomysl left
|
|||
moritz | fwiw the "proper" approach is to reuse method nice() from class Backtrace | 15:20 | |
needs a wee bit of refactoring, but I can do that | |||
and then simply take the first line for warnings, and all lines for errors | 15:21 | ||
15:21
pomysl joined,
pomysl left,
pomysl joined
|
|||
tadzik | want to do it? | 15:22 | |
dalek | kudo/nom: 32c674e | moritz++ | src/core/Backtrace.pm: Backtrace.nice can now produce single lines |
15:24 | |
moritz | tadzik: you can now use .nice(:oneline) to get the line to append to the warning | 15:25 | |
tadzik | I shall, thanks moritz++ | ||
moritz | r: sub f() { }; say &f.get_namespace.get_name | 15:27 | |
p6eval | rakudo 3bd91f: OUTPUT«Method 'get_namespace' not found for invocant of class 'Sub' in block <anon> at /tmp/J7A_vQcVxZ:1» | ||
15:32
wolfman2000 left
|
|||
moritz | jnthn: the .get_namespace thing on the parrot subs that Perl 6 Code objects wrap just gives 'perl6' | 15:33 | |
jnthn | sure | ||
moritz | jnthn: is there any way to get the Perl 6 level package name (for backtraces)? | ||
jnthn | we dont' use Parrot nanespaces | ||
moritz: Not without storing it in the code objects. | 15:34 | ||
Which is doable. | |||
And easy. Edit BOOTSTRAP.pm and add an extra field at the end of Routine | 15:35 | ||
Then in create_code_object if it's a Routine (already a conditonal for that in there somewhere) then nqp::bindattr that field to $*PACKAGE | |||
Then a method in Routine to introspect it | |||
moritz | sounds really doable :-) | ||
jnthn | It should be easy. :) | 15:36 | |
15:36
havenn left
|
|||
jnthn | s/field/attribute/ # in .Net terminology mode today due to teaching :) | 15:36 | |
moritz | it's OK, I understood you :-) | ||
15:36
havenn joined
15:37
tyatpi_ left
|
|||
moritz isn't quite monoglot | 15:37 | ||
jnthn | Well, the mistake is worse in the opposite direction | 15:38 | |
moritz | what's an attribute in .Net? | ||
jnthn | (The term "attribute" means something very different in .Net, and I've confused people terribly.) | ||
It's compile-time meta-data added to a declaration of soem kind. | |||
Think traits, but less powerful :) | 15:39 | ||
moritz | :-) | ||
masak | those are called "annotations" in most languages, I think. | ||
moritz | r: { ... } | 15:41 | |
p6eval | rakudo 3bd91f: ( no output ) | ||
jnthn | masak: In Java and...which other ones? :) | 15:42 | |
moritz | jnthn: I don't see a fleg that tells us if something is a routine | 15:43 | |
just $is_dispatcher | |||
jnthn | moritz: no no, it's not a flag, ti's the type | ||
moritz: I think an if block in create_code_object looks for it. | 15:44 | ||
moritz | jnthn: how do I type-check this early in the bootstrap? .HOW.isa ? | ||
jnthn | if nqp::istype($code, $routine_type) { | 15:45 | |
lien 718 | |||
moritz | ah, ok | ||
thanks | |||
jnthn | sorry, I forgot create_code_object was broken out into parts now | ||
moritz | not a problem | 15:46 | |
I figured it must have been the bigger one :-) | |||
jnthn | Well, maybe a problem with my memory given I only did the refactor within the last month or so :) | 15:47 | |
moritz | Argentinia might have flushed a few buffers :-9 | ||
15:47
Psyche^ joined
15:50
tyatpi_ joined
15:51
Patterner left,
Psyche^ is now known as Patterner
15:52
vlixes joined
|
|||
timotimo | can i refer to a classes "things" with the :: syntax somehow? | 15:54 | |
masak | you mean "Foo" and "Bar" in Foo::Bar? | 15:55 | |
TimToady | only if you need indirect lookup of the name, then you can use ::(), but otherwise stuff is in the metaobject | 15:56 | |
unless explicitly declared 'our' | |||
masak | ah, I misunderstood the question. TimToady++ | ||
TimToady | so I agree with masak++, what are you really asking? | ||
moritz | $ ./perl6 -e 'class A { sub f { }; say &f.package} ' | ||
A() | |||
timotimo | OK. i'm reading an article about php weirdnesses and one thing he mentions is that he knows of no language that has ClassName::something for static access | ||
moritz | \o/ | ||
PerlJam thought he was asking about attributes | |||
timotimo | i thought maybe perl6 has something vaguely similar | ||
masak | yes, it turns out A::foo is only visible if the sub foo in A was given 'our' scoping. | 15:57 | |
moritz | timotimo: well, both Perl 5 and Perl 6 have $ClassName::OurVariable | ||
which is somewhat similar, I assume | |||
masak | r: class A { our &x }; A::x = 42; say A::x | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = instead at line 1, near " 42; say A"» | ||
masak | r: class A { our $x }; A::x = 42; say A::x | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = instead at line 1, near " 42; say A"» | ||
TimToady | but then, technically, we wouldn't say the sub is in the class, but in the classs's package | ||
moritz | masak: A::x is a listop | 15:58 | |
masak | oh, of course. | ||
15:58
PacoAir left
|
|||
masak | r: class A { our $x }; $A::x = 42; say $A::x | 15:58 | |
p6eval | rakudo 3bd91f: OUTPUT«42» | ||
masak | \o/ | ||
TimToady | classes can have subs, but then they're called methods | ||
masak | what? no. | ||
timotimo | "Object attributes are $obj->foo, but class attributes are $obj::foo. I’m not aware of another language that does this or how it’s useful." - so it's like "our" variables in perl5 and 6? | 15:59 | |
masak | classes can have subs, but then the classes are acting more like packages than like classes :) | ||
jnthn | The class doesn't really "have it" either, if you mean the meta-object :) | ||
TimToady | you are talking about the syntax, I'm talking about the semantics | ||
masak | r: class A { our sub foo { say "OH HAI" }; method foo { say "OH HAI again!" } }; A::foo; A.new.foo | ||
p6eval | rakudo 3bd91f: OUTPUT«OH HAIOH HAI again!» | ||
masak | TimToady: no, I'm talking about what hook the sub hangs itself on. | ||
the A::foo thing is because classes are packages, and packages share their 'our'-y things. | 16:00 | ||
TimToady | well, that's what I said, it's in the class's package, not the class | ||
the class's package isn't part of the class, from an OO point of view | 16:01 | ||
masak | ok. it sounded like you were saying that whenever a class has a sub, that's a method, which is wildly wrong. | ||
TimToady | I'm using the metaobject as the boundary of the actual class here | ||
and when you poke a sub into it, it's a method | |||
masak | but yeah, the class's "class" aspect can't have subs in that sense, I guess. only the class's "package" aspect can. | ||
and if you don't 'our' the sub, it's the class's "block" aspect that gets the sub :) | 16:02 | ||
TimToady | methods are just subs that are "mislocated" from some other scope into the metaobject | ||
16:02
birdwindupbird left
|
|||
jnthn -> hotel, bbl | 16:02 | ||
tadzik | hm, Backtrace.new($ex) segfaults Rakudo for some reason | ||
PerlJam | masak: is that aspect oriented programming? ;) | ||
16:03
brrt left
|
|||
masak | PerlJam: more like role deconstruction of OO in Perl 6 ;) | 16:03 | |
16:03
Ingis joined
|
|||
masak => grocery_store => home | 16:05 | ||
16:06
IngisKahn left
16:07
Ting_ joined
|
|||
Ting_ | ls | 16:07 | |
sjohnson | ls -l | ||
Ting_ | ls -lh | ||
16:07
havenn left
|
|||
PerlJam | total 0 | 16:07 | |
tadzik | :P | 16:08 | |
16:09
Ting_ left
|
|||
tadzik | clearly he didn't find what he was looking for | 16:10 | |
dalek | kudo/nom: edfd0f2 | moritz++ | src/Perl6/World.pm: [World] avoid a lookup for which we already have a variable |
16:12 | |
kudo/nom: 8144a04 | moritz++ | src/ (3 files): implement Routine.package |
|||
16:12
plobsing left
|
|||
TimToady | moritz: under the OKness proposal, irclog.perlgeek.de/perl6/2012-04-10#i_5421023 would return something like OK[list], which would not rerun the .ACCEPTS since the OK bit is already considered success; ironing out smartmatching is the main point of that proposal, but people keep getting distracted by the less important bits of the proposal | 16:13 | |
16:14
plobsing joined
|
|||
tadzik | gist.github.com/2352529 makes rakudo segfault, if anyone wants to take a look | 16:15 | |
16:15
envi_ left
|
|||
moritz | tadzik: probably related to $ex being a parrot exception, not a Perl 6 type | 16:16 | |
tadzik | oh, must be, yes | ||
moritz | tadzik: try EXCEPTION($ex) instead | ||
tadzik | yeah, everything uses nqp::atkey | ||
tadzik tries | 16:17 | ||
moritz | or even more efficient | ||
spider-mario | moritz: since $rtype is just an alias for $routine_type and is only used in the line below its definition, we might as well get rid of it, might we not? | ||
(or am I missing something?) | |||
moritz | Bactrace.new($ex.backtrace, 2) | 16:18 | |
spider-mario | (I’m talking about github.com/rakudo/rakudo/commit/edfd0f216f ) | ||
16:18
envi_ joined
|
|||
tadzik | well, this way we miss the whole point of reusing nice(), no? | 16:18 | |
moritz | or maybe Bactrace.new($ex.backtrace, 0).nice | 16:19 | |
or maybe Bactrace.new($ex.backtrace, 0).nice(:oneline) | |||
thing is, if you wrap the parrot exception in an Exception, then the first thing that Backtrace.new does is unwrap it to get at its .backtrace | |||
tadzik | right | 16:20 | |
moritz | spider-mario: you're right | ||
16:20
nwc10 left
|
|||
moritz | hey, people actually read my patches. | 16:20 | |
that's both awesome and scary :-) | 16:21 | ||
spider-mario | :D | ||
dalek | kudo/nom: 72e8fe8 | moritz++ | src/Perl6/World.pm: [World] further cleanup by spider-mario++ |
||
16:23
jaffa4 joined
16:26
envi_ left
16:27
envi_ joined
16:34
envi_ left
16:38
havenn joined
16:43
envi_ joined
16:44
s1n left
16:54
xinming left
16:55
xinming joined
16:56
apejens left
16:57
fsergot left
|
|||
moritz | $ ./perl6 -e 'sub f() { warn "foo" }; f' | 16:57 | |
foo in sub f at -e:1 | |||
16:58
s1n joined
|
|||
masak home | 16:59 | ||
17:00
pernatiy left
|
|||
moritz | $ ./perl6 -e 'sub f() { +Any }; f' | 17:00 | |
use of uninitialized value of type Any in numeric context in method Numeric at src/gen/CORE.setting:650 | |||
17:00
sftp joined
|
|||
moritz | these are not the line numbers you are looking for :/ | 17:00 | |
jaffa4 | what is perl6? | 17:03 | |
17:03
s1n left
|
|||
TimToady | perl6 is what. | 17:03 | |
jaffa4 | WHat is executed under the hood of perl6? | 17:04 | |
moritz | rakudo | ||
jaffa4 | perl6:say <1 2 3> | ||
PerlJam | niecza | ||
moritz | pugs | ||
jaffa4 | perl6: say <1 2 3> | ||
p6eval | pugs: OUTPUT«123» | ||
..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«1 2 3» | |||
jaffa4 | all of them | 17:05 | |
TimToady | but not when someone sez: $ ./perl6 -e ... | ||
which is why moritz++ said rakudo | |||
17:05
PacoAir joined
|
|||
benabik ponders installing a perl6 script that calls all three. | 17:06 | ||
TimToady | of course, ./perl6 depends on which directory you're in | ||
masak | jaffa4: if you look far enough down, it's all just electrons in circuits executing. but that can't be what you're asking. what is your question -- I mean, what kind of answer do you expect to get? | ||
jaffa4 | that answer you happened to give, taht kind of answer. | ||
benabik | Rakudo is the only project that I know being arrogant enough of building an executable simply named perl6. ;-) | 17:07 | |
17:07
fsergot joined
|
|||
PerlJam | benabik: hubris is one of the 3 virtues | 17:07 | |
TimToady | well, Perl builds one called "perl" :) | ||
masak | jaffa4: much of Rakudo and Niecza runs Perl 6 under the hood. | ||
TimToady | but I guess it's not arrogant enough to build one called "perl6" either... | 17:08 | |
moritz | benabik: not arrogance; hysterical raisins | ||
TimToady | Rakudo and Niecza runs much of Perl 6 under the hood. | ||
benabik | moritz: Stupid raisins. Have to pick them out of food all the time, now they're in my compilers? ;-) | ||
PerlJam | .oO( Where is this "hood" anyway? ) |
||
masak | I don't get the hangup people have with the name of the 'perl6' executable. there are several implementations of Ruby. at least one has an executable called 'ruby'. people expect this. | 17:09 | |
benabik: well, they *are* hysterical, so no wonder they get in everywhere. | |||
TimToady | I think when there are multiple of a particular program in your path, it should just pick one randomly and run it | ||
masak | PerlJam: the "hood" is the part of the executable that keeps memory from leaking out into the rest of the system. | 17:10 | |
it's a technical term. | |||
TimToady | I thought that was the bonnet... | ||
masak | no, the bonnet keeps away the bees. | ||
moritz | which botnet? | ||
TimToady | otnet, oviously | 17:11 | |
moritz | 17:12 | ||
mm | |||
17:15
fsergot left
|
|||
masak | twitter.com/sixthformpoet/status/18...0331586562 -- autopun, or just regular pun? or both? | 17:17 | |
17:17
s1n joined
|
|||
PerlJam | heh | 17:17 | |
jnthn v hotele :) | |||
pmichaud | commit b8fdbea (Date.new) is cute :) | 17:18 | |
jnthn | pmichaud! \o/ | ||
masak | this one definitely is an autopun, though: twitter.com/sixthformpoet/status/18...8033349634 | ||
pmichaud | good afternoon, #perl6 | ||
17:19
sisar left
17:24
s1n left
|
|||
pmichaud reads backscroll | 17:25 | ||
(php language rant): I read all of that and the author doesn't really have a conclusion? Sheesh. | 17:26 | ||
17:27
Chillance joined
17:28
fsergot joined
|
|||
jnthn | .oO( was pmichaud's comment a meta-rant? ) |
17:34 | |
pmichaud | Yes. | 17:35 | |
I wonder if Backtrace.nice(:$oneline) should instead have an argument indicating the number of lines wanted | 17:38 | ||
instead of choosing between "1" and "all" | 17:39 | ||
17:41
s1n joined
|
|||
jnthn | I can imagine cases where something could only want the first n lines. | 17:42 | |
PerlJam | making a parameter for the number of lines is less special-casey and results in a net increase in functionality | 17:45 | |
17:45
s1n left
|
|||
mucker | TimToady: Curious doubt. Allowing ' as a legal character in a variable name, was that a linguistic decission ? -- $foo's_bar indicating possesion | 17:46 | |
17:46
sisar joined
|
|||
pmichaud | mucker: also things like $L'Hopital | 17:47 | |
mucker | :) | ||
pmichaud | or even $L'Hôpital | ||
daxim | well, isn::t that cute… | 17:48 | |
PerlJam | mucker: the answer to your question is definitely "yes" :) | 17:49 | |
17:49
fhelmberger left
|
|||
spider-mario | btw (regarding the “perl6” executable name), | 17:49 | |
S01 says that Perl 6 code should include a v6 header, | |||
what is the preferred one? | |||
I use #!/usr/bin/env perl6 | |||
currently. | |||
pmichaud | "use v6;" is the canonical one, I think. | 17:50 | |
spider-mario | ok, thanks. | ||
17:50
brrt joined
|
|||
spider-mario | it does have the advantage of producing a useful error message in perl 5. | 17:51 | |
TimToady | mucker: yes, it was primarily a decision from traditional word-based orthography | 17:53 | |
PerlJam | at least until someone breaks it with a v6 module on CPAN | ||
mucker | TimToady: love that feature. I find my self using lots of variables names implying possession of some sort. | 17:54 | |
TimToady | unfortunately it won't allaw things like 'twas | ||
*allow | |||
17:54
lichtkind joined
|
|||
TimToady | or Charles' | 17:55 | |
but then, I always write Charles's anyway | |||
TimToady wonders if there are any 0-width letters in Unicode... | 17:56 | ||
spider-mario | · | ||
oops | |||
ah, letter? | |||
17:57
envi_ left
|
|||
PerlJam | my $_'twas-the-night-before-Christmas; _ is almost invisible sometimes | 17:57 | |
spider-mario | (I’m not sure “ ” is actually supposed to have a null width but it does on my machine) | ||
jnthn | .u | ||
phenny | U+202F NARROW NO-BREAK SPACE ( ) | ||
spider-mario | we french-speaking people call it « espace insécable fine » | 17:58 | |
17:58
envi_ joined
|
|||
TimToady | perl6: my $ʹtwas = 'the night before Christmas'; say $ʹtwas | 17:59 | |
p6eval | pugs, rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«the night before Christmas» | ||
PerlJam | well then | ||
TimToady | perl6: constant ʹtwas = 42; say ʹtwas | ||
p6eval | pugs: OUTPUT«***  Unexpected "=" expecting ":" or "(" at /tmp/zQ9wrugMqh line 1, column 16» | ||
..rakudo 3bd91f, niecza v15-6-gefda208: OUTPUT«42» | |||
18:01
s1n joined
|
|||
mucker | The spec says atleast one alphabet must be preceding ' :) perlcabal.org/syn/S02.html#Apostrophe_separator | 18:01 | |
TimToady | yes, but I wasn't using ', but ʹ | 18:02 | |
.u ʹ | |||
phenny | U+02B9 MODIFIER LETTER PRIME (ʹ) | ||
spider-mario | .u ’ | ||
phenny | U+2019 RIGHT SINGLE QUOTATION MARK (’) | ||
TimToady | which is officially a letter | ||
spider-mario | r: constant ’ = 42; say ’ | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Missing initializer on constant declarationat /tmp/C3EJ1bsyeF:1» | ||
spider-mario | r: constant ’x = 42; say ’x | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Missing initializer on constant declarationat /tmp/LxlR5r1QiZ:1» | ||
mucker | oo .. okay | ||
TimToady | r: constant ʹ = 42; say ʹ | 18:03 | |
p6eval | rakudo 3bd91f: OUTPUT«42» | ||
TimToady | n: my \ʹ = 42; say ʹ | ||
p6eval | niecza v15-6-gefda208: OUTPUT«42» | ||
TimToady | r: my \ʹ = 42; say ʹ | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Malformed myat /tmp/uJSI_Smad9:1» | ||
TimToady | r: my \a = 42; say a | 18:04 | |
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Malformed myat /tmp/rC2cylvC8G:1» | ||
jnthn | Ah, i still need to add that syntax. | ||
TimToady | r: my (\a) = 42; say a | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Malformed parameterat /tmp/vka_kHZy2x:1» | ||
jnthn | ETOOMUCHTODO | ||
pmichaud | TimToady++ seems to use it often :) | ||
TimToady | I want a story for people who have an irrational dislike for sigils | 18:05 | |
18:05
vlixes left
|
|||
pmichaud | TimToady: you mean a story other than "Your dislike of sigils is irrational?" ;-) | 18:05 | |
TimToady | a TMTOWTDIish story | ||
PerlJam | the story seems to be "your dislike of sigils is well-founded" so far ;) | 18:06 | |
pmichaud | r: say <$ @ % &> ~~ Rational | ||
p6eval | rakudo 3bd91f: OUTPUT«False» | ||
spider-mario | :D | ||
pmichaud | r: say <$ @ % &>.any ~~ Rational | ||
p6eval | rakudo 3bd91f: OUTPUT«False» | ||
TimToady | though the function in rosettacode.org/wiki/Runge-Kutta_method#Perl_6 reads rather nicely with the sigilless forms | 18:07 | |
mikemol discovers he doesn't have whatever font is necessary for 𝛿 | 18:08 | ||
TimToady | .u 1D6FF | 18:10 | |
phenny | TimToady: Sorry, no results for '1D6FF'. | ||
TimToady | .u U+1D6FF | 18:11 | |
phenny | TimToady: Sorry, no results | ||
TimToady | hmm | ||
daxim | www.fileformat.info/info/unicode/ch...upport.htm | ||
out of that list, I recommend the Code200x tribe of fonts. | 18:12 | ||
TimToady | well, firefox seems to get it fine on my machine | ||
18:12
birdwindupbird joined
|
|||
TimToady | part of the reason that function works well though is that the italic delta functions visually as a mock sigil | 18:13 | |
which is kind of how mathematicians use them | |||
18:13
plobsing left
|
|||
TimToady | n: my \dy₃ = 42; | 18:17 | |
p6eval | niecza v15-6-gefda208: OUTPUT«===SORRY!===Term definition requires an initializer at /tmp/lERpq5rHLH line 1:------> my \dy⏏₃ = 42;Confused at /tmp/lERpq5rHLH line 1:------> my \dy⏏₃ = 42;Parse failed»… | ||
TimToady | but I couldn't get it to work with subscripts, for some reason that is probably my own fault... | ||
mikemol | FWIW, my setup atm is Chrome on Win7. | 18:18 | |
18:19
envi_ left
|
|||
TimToady | n: say so '₃' ~~ /\w/ | 18:19 | |
p6eval | niecza v15-6-gefda208: OUTPUT«False» | ||
TimToady | that's the problem | ||
eval: say 'troo' if '₃' =~ /\w/ | 18:20 | ||
buubot_backup | TimToady: ERROR: syntax error at (eval 20) line 1, near "say 'troo'" | ||
TimToady | eval: print 'troo' if '₃' =~ /\w/ | ||
buubot_backup | TimToady: No output. | ||
18:21
envi_ joined
|
|||
TimToady | hmm | 18:21 | |
eval: use utf8; print 'troo' if '₃' =~ /\w/ | |||
buubot_backup | TimToady: No output. | ||
TimToady | eval: use utf8; print 'troo' if '₃' =~ /\w/u | ||
buubot_backup | TimToady: No output. | ||
lichtkind | TimToady: i just dont know how to describe $*COMPILING and $*DEBUGGING | ||
PerlJam would have thought subscripts would be used with some combining sequence to "attach" them to letters and thus they'd match w | 18:22 | ||
TimToady | those are placeholders for Perl 5 varialbes, and we probably have no idea what they actually do in Perl 6 | ||
funny, subscript three matches \w in my local p5 | |||
eval: use utf8; print ord '₃' | 18:23 | ||
buubot_backup | TimToady: 83231 | ||
TimToady | well, if they've gone and redefined superscripts and subscripts, maybe we should consider whether they should be allowed specially at the ends of identifiers | 18:28 | |
lichtkind | allright so i dont add them in the index | 18:29 | |
18:29
lichtkind left
|
|||
TimToady | (perhaps along with the real prime character, not the fake modifier letter) | 18:29 | |
.u ′″‴⁗ | 18:30 | ||
phenny | TimToady: U+2032 U+2033 U+2034 U+2057 | ||
sorear | good * #perl6 | ||
TimToady | howdy doody | ||
TimToady still thinks it's a bit odd that super/subscript chars can't match w though | 18:32 | ||
18:33
LylePerl left
|
|||
TimToady | now someone else should point out that y₁ should mean y[0], and someone else should point out that y₀ should mean that... | 18:34 | |
18:36
pernatiy joined,
sisar left
|
|||
au | neither ⑦ nor ⒎ nor ㍟ match \w, either... seems a character is only considered a digit when it's denoting a number. | 18:38 | |
spider-mario | r: '⑦' ~~ /\d/ | 18:39 | |
p6eval | rakudo 3bd91f: ( no output ) | ||
spider-mario | r: say '⑦' ~~ /\d/ | ||
p6eval | rakudo 3bd91f: OUTPUT«#<failed match>» | ||
18:40
lichtkind joined
|
|||
spider-mario | r: '⑦'.perl.say | 18:40 | |
p6eval | rakudo 3bd91f: OUTPUT«"⑦"» | ||
sorear | .u ⑦ | ||
phenny | U+2466 CIRCLED DIGIT SEVEN (⑦) | ||
sorear | .u ₁₀ | ||
phenny | U+2081 SUBSCRIPT ONE (₁) | ||
U+2080 SUBSCRIPT ZERO (₀) | |||
spider-mario | r: '⑦'.comb.perl.say | ||
p6eval | rakudo 3bd91f: OUTPUT«("⑦",).list» | ||
spider-mario | good. :) | ||
r: '⑦'.chars.say | 18:41 | ||
p6eval | rakudo 3bd91f: OUTPUT«1» | ||
sorear | au!! long time no see | ||
au | indeed! how's things? | ||
18:41
envi_ left
18:43
daxim left
18:44
GlitchMr left
|
|||
masak | au! \o/ | 18:45 | |
18:45
fglock left
|
|||
au | /o | 18:45 | |
sorear | au: ok | ||
au: lack of tuits, though :| | 18:46 | ||
18:46
envi_ joined
|
|||
au | *nod* | 18:46 | |
18:47
s1n left
|
|||
au | . o O ( The good thing about reinventing tuits is that you can get a round one ) | 18:48 | |
18:49
estrabd left
19:02
s1n joined
|
|||
prammer | anyone interested in presenting at strange loop? thestrangeloop.com/sessions-page/c...sentations | 19:02 | |
pmichaud | I'm always interested in presenting. :) | 19:06 | |
prammer | I'd love to see more perl (5 or 6) at strange loop. I'm biased though since St. Louis is local for me. | 19:09 | |
19:09
mucker left
|
|||
pmichaud | I think I'll submit a talk. | 19:09 | |
Not sure what I'll talk about yet -- but I'll look at last year's program and figure out something useful | |||
Perhaps a talk about Perl 6 examples from rosettacode.org | 19:10 | ||
prammer | Anything perl 6 related I suspect would be a good fit. | ||
pmichaud | looks like the conference is code-heavy | ||
mikemol | I'll put together an updated local mirror copy for whoever needs it. | 19:11 | |
mikemol is getting used to that. | |||
pmichaud | mikemol++ | ||
prammer | Yes. A lot of JVM languages, typically. | ||
Matt Follett gave a Perl 6 talk, in 2010 iirc | |||
brrt wonders whether he is the only person who doesn't like jquery | 19:12 | ||
mikemol | brrt: No. But my reasons aren't syntactic or semantic. | ||
brrt | interesting conference though | 19:13 | |
masak | brrt: well, the thing about jQuery is that it shouldn't have been necessary. JavaScript's role has changed a lot over the years. | ||
19:14
plobsing joined
|
|||
brrt | .. i guess. i just see such messes made with jquery | 19:14 | |
19:17
fglock_ left
|
|||
mikemol | I don't care for it, because I once frequented a Wordpress-based blog that required over forty page requests to load, and at least six of them were different versions of jQuery... | 19:19 | |
masak | r: macro redirect($code) { quasi { sub say(*@args) { say "Something else" }; {{{$code}}}(); } }; redirect { say "Hello world"; } # no, {{{}}} is not implemented yet. just gonna try and golf this NPMCA... | ||
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/Mce8a2QGgP:1» | ||
mikemol | It's like a static-linking problem with symbol collisions. | ||
masak | r: macro r($c) { quasi { sub say(*@) {}; {{{$c}}}(); } }; r { say "!" } | 19:20 | |
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/fWt3K5gDaR:1» | ||
masak | r: macro r($c) { quasi { sub say(*@) {}; {{{$c}}}(); } }; r 42 | ||
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/uaXbPAiZLP:1» | ||
masak | r: macro r($c) { quasi { sub say(*@) {}; {$c}(); } }; r 42 | ||
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/5p668VUDIs:1» | ||
masak | r: macro r($c) { quasi { sub say(*@) {}; {}(); } }; r 42 | 19:21 | |
p6eval | rakudo 3bd91f: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'Hash' in <anon> at src/gen/BOOTSTRAP.pm:812 in any <anon> at src/gen/BOOTSTRAP.pm:808 in <anon> at /tmp/AGNxfdDvIJ:1 in block <anon> at /tmp/AGNxfdDvIJ:1» | ||
masak | r: macro r($c) { quasi { sub say(*@) {}; {;}(); } }; r 42 | ||
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/QoErNGV9SU:1» | ||
masak | r: macro r { quasi { {;}() } }; r | ||
p6eval | rakudo 3bd91f: OUTPUT«Null PMC access in get_pmc_keyed_str() in block <anon> at /tmp/SC_GjpL3kR:1» | ||
masak | r: macro r { quasi { Nil } }; r | ||
p6eval | rakudo 3bd91f: ( no output ) | ||
lichtkind | TimToady: was it right to delet $*ARCH and should i add $*XKERNEL? | ||
masak | inneresting. | ||
r: say {;}() | |||
p6eval | rakudo 3bd91f: OUTPUT«Nil» | ||
masak | r: say Nil.WHICH; say Nil.WHICH | ||
p6eval | rakudo 3bd91f: OUTPUT«NilNil» | ||
masak | r: say {;}().WHICH; say Nil.WHICH | 19:22 | |
p6eval | rakudo 3bd91f: OUTPUT«NilNil» | ||
lichtkind | jnthn: i have real problems | 19:31 | |
even if adding simple things i got runtime hackles | |||
masak | lichtkind: what did you write, what result did you get, and what were your expectations? | 19:35 | |
be precise. | |||
lichtkind | i just added my $KERNEL = 4; and i get runtime error evenif my program is ";" | ||
masak | added... to what? | 19:36 | |
anyone else seeing the 12th test (which is TODO'd) in t/spec/S32-list/uniq.rakudo pass? | 19:37 | ||
dalek | ast: 110d111 | masak++ | S06-macros/macros-d1.t: [S06-macros/macros-d1.t] added Null PMC access test discovered by samlh++ |
19:44 | |
19:45
brrt left
|
|||
[Coke] | brrt: I love jquery. but I'm comparing my love to raw javascript. | 19:49 | |
(messes with jquery) ... that sound slike the common argument against p5. ;) | |||
r: my $KERNEL = 4; | 19:50 | ||
p6eval | rakudo 3bd91f: ( no output ) | ||
[Coke] | nope, WMF. | ||
er, WFM. | |||
tadzik | masak: yes | 19:52 | |
masak | so, it turns out the condition in github.com/rakudo/rakudo/blob/nom/...s.pm#L3080 is never true. | 19:53 | |
it looks reasonable. any idea why it doesn't work as advertized? | 19:54 | ||
[Coke] | that is a very long file | ||
19:54
colomon left
|
|||
[Coke] | are you sure that $nil_class is actually finding that symbol? | 19:55 | |
masak | no. | ||
not sure that's the proper check either. | 19:56 | ||
pmichaud | does find_symbol find any currently in-scope symbol, or only those that are in the bootstrap? | 19:58 | |
I'm guessing it finds any currently in-scope symbol | 20:00 | ||
masak | hm, sometimes it's :scope('lexical') and sometimes :scope('lexical_6model') | ||
PerlJam | What's $*W ? | 20:01 | |
masak | the world. | ||
pmichaud | I'm guessing it's "world" or somesuch | ||
PerlJam | ah | ||
[Coke] | .u 20DD | ||
phenny | U+20DD COMBINING ENCLOSING CIRCLE (⃝) | ||
flussence | .oO( doesn't look all that enclosing to me... ) |
||
pmichaud | looks like the circles that I find in the windmills of my.... encoding | ||
[Coke] | enofont? | ||
pmichaud | I see the circle okay in my font, but it's offset to the left of the parens | 20:02 | |
[Coke] was trying to figure out how to get a unicode checkmark in a combining circle. | |||
I see, basically: []() | |||
flussence | .u 2713 20dd | ||
phenny | flussence: Sorry, no results for '2713 20dd'. | ||
flussence | bah | ||
r: say "\x[2713]\x[20dd]" | |||
p6eval | rakudo 3bd91f: OUTPUT«✓⃝» | ||
flussence | :/ | ||
it's enclosing the wrong thing... | |||
flussence decides urxvt just sucks at unicode | 20:03 | ||
tadzik | wfm | ||
felher | Hey folks. Suppose i have a class A::B::MyClass and a class A::B::SecondClass. Is it possible to create a module A::B::ALL that exports those classes? So that i could write something like: "use A::B::ALL; SecondClass.new()". | ||
PerlJam | masak: I'd think they should all be lexical_6model (unless there are really 2 Nils, but that makes my brain hurt) | ||
flussence | it displays around the « on my screen, maybe there's a font mismatch there... oh well, not that important | 20:04 | |
au | .u 24E5 | ||
phenny | U+24E5 CIRCLED LATIN SMALL LETTER V (ⓥ) | ||
flussence | felher: I had that exact problem a while back. It's specced (use :EXPORT) but it doesn't work in anything | ||
masak | all of mine are lexical_6model, but that code is never reached. | ||
pmichaud | afaik, there's only one Nil | 20:05 | |
src/core/Nil.pm | |||
tadzik | moritz: (warnings), yeah, same results here; seems that it's all trickier than it seems to be. Or maybe just 'is hidden-from-backtrace' for all those subs will do? | ||
.Numeric etc | |||
20:05
s1n left
|
|||
felher | flussence++: thanks for the answer :) | 20:05 | |
masak | let's see. Nil isn't mentioned in BOOTSTRAP.pm. | 20:07 | |
pmichaud | right, it's just a normal type object | 20:08 | |
masak | Actions.pm only mentions it as PAST nodes ordinarily. I might be the only one in there trying to fetch it from a lexical environment. | ||
pmichaud | it is a lexical class | ||
my class Nil is Iterator { | |||
masak | right, but isn't src/core "too late" for Actions.pm? | 20:09 | |
I mean, Actions.pm is nqp... | |||
and src/core is Perl 6... | |||
masak tries to make the levels fit together in his head | |||
src/core isn't even compiled at the time Actions.pm is being compiled! | 20:10 | ||
pmichaud | no, but it is at the time when Actions.pm is being run | ||
(except when compiling src/core itself) | |||
20:11
havenn left
|
|||
masak | so Actions.pm can pull type names from src/core? just checking. | 20:11 | |
r: say Nil ~~ Nil | 20:12 | ||
p6eval | rakudo 3bd91f: OUTPUT«True» | ||
masak | r: say {;}() ~~ Nil | ||
p6eval | rakudo 3bd91f: OUTPUT«True» | ||
PerlJam asserts that both PAST::Var.new(:name('Nil'), :scope('lexical_6model')) and PAST::Var.new( :name('Nil'), :scope('lexical') ) can not both be simultaneously correct | |||
masak | r: say nqp::istype(Nil, Nil) | ||
p6eval | rakudo 3bd91f: OUTPUT«Method 'gist' not found for invocant of class 'Integer' in sub say at src/gen/CORE.setting:6258 in block <anon> at /tmp/vZLARDUYVe:1» | ||
pmichaud | r: say nqp::p6box_i(nqp::istype(Nil, Nil)) | ||
p6eval | rakudo 3bd91f: OUTPUT«1» | ||
masak | ok, so outside of Actions.pm it works... | 20:13 | |
masak drops it for now | 20:14 | ||
pmichaud | PerlJam: I don't know what's up with the :scope('lexical') in Actions.pm | 20:15 | |
I wonder if it's fossil | |||
PerlJam | I'd wager so | ||
TimToady | .oO(there is no bootstrapping problem in computer science that cannot be solved by adding another level of bootstrap...) |
20:16 | |
pmichaud | I find 13 instances of :scope('lexical') or :scope<lexical> in src/Perl6 | 20:17 | |
PerlJam | .oO(... or by being crushed under the heels of the boot that was strapped) |
||
pmichaud | it's entirely possible that :scope('lexical') works for lexical lookups in common cases | 20:18 | |
although it might not be as efficient as 'lexical_6model' or might fail in certain instances | |||
pmichaud tries s/lexical/lexical_6model/ to see what happens | 20:19 | ||
tadzik | loliblogged! ttjjss.wordpress.com/2012/04/10/pla...n-in-oslo/ | 20:20 | |
20:21
s1n joined
|
|||
masak | \o/ tadzik++ | 20:22 | |
20:22
havenn joined
|
|||
masak | tadzik: if you put energy at bringing Hitomi back to relevance, I'm willing to chip in with additional tuits. | 20:22 | |
PerlJam | tadzik++ | ||
pmichaud | lol! "Whatever but Cool" | 20:23 | |
masak | I have a vague feeling my main focus at the Oslo hackathon will be QAST/macros, though. | ||
tadzik | masak: that sounds like a plan | ||
yet I really want to refactor Bailador, before or during, not after | |||
(for the reasons I stated) | |||
masak | pmichaud: yeah, tadzik got the best blog name. someone inadvertently suggested it to him :P | ||
tadzik | shush! | ||
PerlJam | tadzik: is bailador a dancer port or really just a dancer-a-like for perl 6 heavily inspired by dancer? | ||
masak | tadzik: also, remember our highly secret but very exciting project. I've already done a few tentative commits on it. | 20:24 | |
tadzik | PerlJam: it's really a Dancer lookalike, but I've started digging into Dancer2 source code recently and been trying to make it something closer to a real Dancer port | ||
arnsholt | tadzik: Sounds cool. I've been pondering various things along similar lines as well, so starting to really look forwards to the Hackathon now! | ||
tadzik | masak: sure thing | ||
pmichaud | I haven't decided what I'll focus on in Oslo. I was thinking of working a bit on the Perl 6 module universe | ||
jaffa4 | What is Dancer 2? | ||
tadzik | Dancer 2 is a rewrite of Dancer :) | 20:25 | |
jaffa4 | and Dancer? | ||
pmichaud | I was also thinking of looking at zavolaj-like things a bit | ||
tadzik | Dancer is perldancer.org/ a nice web framework for Perl | ||
PerlJam | jaffa4: Dancer is a web framework inspired by Sinatra | ||
arnsholt | (My recent interest in Zavolaj being prerequisitely related to my web musings) | ||
spider-mario | I like Mojolicious | 20:26 | |
pmichaud | although maybe I'll just focus on closing RT tickets and providing suggestions/guidance/distractions to others :) | ||
PerlJam | Dancer 2 has the advantage that mst is helping with the rewrite | ||
masak | pmichaud: yay \o/ | ||
20:26
uvtc joined
|
|||
pmichaud | I'll definitely help out with QAST if folks are working on that. | 20:27 | |
PerlJam | pmichaud: Rakudo profiling tools would be nice too :) | ||
tadzik | I have an affection for Dancer. It showed me that web development doesn't have to be a horrible torture :) | ||
pmichaud | oh, I can do those. I had a start on some profiling stuff in nqp that was never finished. | ||
uvtc | Hi #perl6. Was just going to install Rakudo * on a newly-reinstalled OS (Lubuntu). Looking at the R* readme, it says that I need to have subversion installed ... I think that's there for Parrot ... but isn't parrot on github now? | 20:28 | |
tadzik | or nqp profiling. I would love to see some compilation speed improvements | ||
uvtc: what version of R* is taht? | |||
PerlJam | tadzik: me too | ||
pmichaud | uvtc: that's.... surprising | ||
uvtc | 2012.02 | ||
tadzik | oh gosh, one so needs to fix that README :) | 20:29 | |
tadzik looks | |||
uvtc: certainly you don't need svn for anyting these days | |||
pmichaud | pmichaud@kiwi:~/p6/star/rakudo-2012.01$ ack -i -a subversion | ||
docs/announce/2009-04:58: spectests, instead of obtaining checkout copies via Subversion. | |||
CREDITS:9: description (D), subversion username (U) and snail-mail | 20:30 | ||
pmichaud@kiwi:~/p6/star/rakudo-2012.01$ | |||
ohwait | |||
spider-mario | mojolicio.us/perldoc/Mojolicious/Gu...Guidelines | ||
“Code should be written with a Perl6 port in mind.” | |||
\o/ | |||
pmichaud | wrong repo | ||
tadzik | yesh | ||
masak | spider-mario: whatever the heck that means :P | ||
uvtc | The readme also says that I should have libreadline5-dev, but libreadline-dev pulls in ... lessee ... libreadline6-dev. If that's ok, perhaps the readme could be amended there as well. | ||
spider-mario | sure :D | ||
tadzik | __sri++ has stated an interest in a Perl 6 port for some time now. Last time I checked he was missing docs | ||
PerlJam | maybe someone should put that "rule" to the test and try to port mojo to Perl 6 | 20:32 | |
:-) | |||
masak | we should write docs with __sri++ in mind :) | ||
PerlJam | though, I think sri is the right person for that task | ||
pmichaud | uvtc: I'm guessing we should remove the 'subversion' requirement | ||
I'm not sure what libreadline library should be requested now | 20:33 | ||
dalek | ar: 789872f | tadzik++ | skel/README: Remove unnecessary dependencies from README, uvtc++ |
||
uvtc | I'll try just libreadline-dev, get libreadline6-dev, and see how that works. | ||
Oooh, thanks, dalek. | |||
tadzik | I'm having libreadline6-dev installed and it works fine | 20:34 | |
(debian) | |||
uvtc | tadzik, great. | ||
Argh, gotta go. Will check back later. | |||
masak | o/ | ||
tadzik | thanks for noticing! | ||
uvtc | :) | ||
20:34
uvtc left
|
|||
felher | Is there a nice way to write 'my Str $string = "long string that doesn't get into one line"'? Maybe some kind of quoting form that melts a newline and following whitespaces into one space, so that one could nicely align those strings? I now about heredocs, but i think they require an extra line, which is no problem for large strings, but not so nice for strings that fit into two lines. :) | 20:38 | |
masak | felher: <<'EOT'.subst("\n", " ", :g); | 20:39 | |
er. q:to/EOT/ :) | |||
PerlJam | felher: There's also ye old standby: my Str $string = "line one " ~ "line two " ~ "line three"; | ||
masak | felher: more generally, there are many times when heredocs "almost" do what I want, and I just make a final transformation to make them fit nicely. | 20:40 | |
flussence | std: @(q:to/EOT/).join # would be nice if this works :) EOT | ||
p6eval | std 1ad3292: OUTPUT«ok 00:00 41m» | ||
20:40
birdwindupbird left
|
|||
masak | felher: like in Perl 5 where indentation is always significant. I just remove it afterwards. sometimes with a custom sub. | 20:40 | |
[Coke] | S02 has "the .perl method"/"the .pretty method" ... should it not also have "the .gist method" ? | 20:41 | |
masak | flussence: you can do .lines>>.join | ||
[Coke] | (and do we really need all threde? | ||
masak | er, .lines.join | ||
[Coke] | *three | ||
[Coke] hates twiddling strings at runtime! inefficient! | |||
masak | pfah. premature optimization. | 20:42 | |
[Coke] | hey, is perljam's example optimized at compile time? | ||
masak | [Coke]: I can see "do we really need all N" about a lot of things in the spec these days :/ | ||
felher | PerlJam: this is what i currently have. The problem is that if i add a word i can't let my editor re-indent it, because it then moves the '"' on the next line :) | ||
masak | [Coke]: ideally, yes. | ||
[Coke] | masak: there is such a thing as pessimistic optimization. :P | ||
er, what is the opposite of premature... hurm. | 20:43 | ||
PerlJam | cotto: "belated" | ||
er, [Coke] | |||
[Coke] | overdue? | ||
PerlJam | "over the hill" | 20:44 | |
masak | tardy. | ||
[Coke] | so you are. | ||
PerlJam | [Coke]: there are no hills here :) | ||
[Coke] | <van halen>I don't FEEL tardy</van halen> | ||
fsergot | Good night #perl6 o/ | ||
felher | masak: two things: first: i hoped there is already something for this, as i find me having that problem quite often. Second: Doesn't EOT have to be on a extra line? :) | ||
masak | 'branocm | ||
'branoc, fsergocie | 20:45 | ||
pmichaud | I can vouch for PerlJam's statement -- definitely no hills in CRP | ||
flussence | ... S02:3739 :) | ||
[Coke] | PerlJam: I remember it well, you're right. highway onramps are the biggest hills. | ||
pmichaud | HOU is hilly compared to CRP, fwiw :) | ||
20:45
tarch left
|
|||
masak | felher: just because you find yourself having a problem often doesn't mean it deserves a feature that's almost but not quite like heredocs :) I don't understand the second question. | 20:45 | |
[Coke] | I disbelieve you, but only because houston is so flat to begin with! | 20:46 | |
the end of the heredoc is a line by itself, yes. | |||
masak | right. is that a problem? | ||
[Coke] | it is verbose. I'd go with perljam's explicit ~ for now and eventually the compiler will optimize it away. | 20:47 | |
pmichaud | there's always q(...) | ||
masak | consider [~] | ||
20:48
fsergot left
|
|||
masak | r: say [~] "This is a ", 'string in several ', q[parts.] | 20:48 | |
p6eval | rakudo 3bd91f: OUTPUT«This is a string in several parts.» | ||
pmichaud | rakudo: my $str = q(( This is a string that includes a ) closing paren )); say $str | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2» | ||
pmichaud | oops | ||
moritz | q() is a function call | ||
masak | q() is a sub call. | ||
pmichaud | rakudo: my $str = q{{ This is a string that includes a } closing brace }}; say $str | ||
p6eval | rakudo 3bd91f: OUTPUT« This is a string that includes a } closing brace » | ||
pmichaud | yes, I know -- been doing too much p5 lately | ||
masak | :) | 20:49 | |
[Coke] | lichtkind: I wonder if you'd be better off moving the tablets into a github repo. | ||
pmichaud | and with q{} you can pick your closing delimiter also | ||
masak | +1 | ||
PerlJam | Still ... a quoting construct that would turn interstitial whitespace into a single space char seems like it would be useful. | ||
[Coke] | e.g.: www.perlfoundation.org/perl6/index....ics_tablet has a bunch of small typos and fixes that I'd be happy to give you a pull request for. | ||
pmichaud | my $str = q{{ This is a string }}.cleanup | ||
masak | PerlJam: .subst(/\s+/, ' ', :g) | ||
PerlJam | masak: yeah, but implicit :) | 20:50 | |
masak | I'm all for utility methods and stuff, but really. | ||
come on. define it in your code and move on in life ;) | |||
pmichaud | well, I'm not sure of the NYI status of .indent | ||
PerlJam | masak: are you saying that would be *too magical* for Perl 6? ;) | ||
pmichaud | otherwise I'd recommend it :) | ||
[Coke] | (e.g. "embedd", "I many lines" "it's own") | ||
masak | PerlJam: I'm saying I think the use case is very weak. | ||
pmichaud | anyway, I always find q{{{ ... }}} to be a reasonable long quoting mechanism | 20:51 | |
masak | PerlJam: I'd include primes and fib sequences ten times before .cleanup | ||
[Coke] | indent is implemented in rakudo & niecza, no? | ||
I swear I stole it from one for 'tother. | |||
masak | not in nom. | ||
moritz | not in nom | ||
PerlJam | [Coke]: was. | ||
masak | moritz: stop doing that! :P | ||
[Coke] | ah, so it's only in niecza now! MUAHAHAHA. | ||
moritz | masak: you're creepy :-) | ||
masak | it's that obvious? :/ | 20:52 | |
pmichaud | I wasn't seriously suggesting ".cleanup" as a builtin | ||
I was simply suggesting it as a place holder for "whatever sort of cleaning up you wish to do" | |||
PerlJam | masak: primes and fibonacci works for me too ;) | ||
pmichaud | .indent isn't in nom because .... ? | 20:53 | |
masak | PerlJam: just saying I can see the use case for them. not for "oh hey sometimes I want to collapse spaces, why isn't that in core?" | ||
moritz blug: perlgeek.de/blog-en/perl-6/2012-hac...tions.html | |||
lichtkind | [Coke]: why? | ||
felher | masak: right. Thats no reason. But if i have a problem quite often the possibility that there is already a solution for it is higher than for problems i encounter just once. So i thought it might be a good idea to ask. Sure there is no problem with the methods available. But i find all of them kinda ugly. Its just about aesthetics :) | 20:54 | |
Defining a own quoting form would be a nice solution to me :) | |||
masak | felher: my_fixup(q:to/EOT); # there. pretty. | 20:55 | |
er, but syntactically correct. | |||
PerlJam | I wonder how many of these "little things" are missing from Perl 6? Seems like their absence contributes to the barrier to entry. | 20:56 | |
felher | yeah, there is nothing wrong with that solution. I just don't like a third line after a two-line string :) | 20:57 | |
masak | I think lack of docs contributes to the barrier to entry. lack of noise outside the echo chamber contributes to the barrier to entry. lagging superstitions about the status of Perl 6 contribute to the barrier of entry. | ||
I don't think the lack of a .cleanup method contributes to the barrier to entry. | 20:58 | ||
pmichaud | 20:52 <pmichaud> I wasn't seriously suggesting ".cleanup" as a builtin | ||
masak | felher: make the stopper a dot. you'll hardly notice it :) | ||
pmichaud | (oops, sorry for double-paste) | ||
masak | pmichaud: I'm intentionally using your silly name because I think the idea is silly. | ||
PerlJam | masak: no, not that ... I was thinking about q:to/EOT/ | ||
moritz | pmichaud: sheesh, you think people will lsiten to you? :-) | ||
pmichaud | moritz: not anymore. :-) | 20:59 | |
PerlJam | masak: and .indent | ||
masak: and all of the other "little things" | |||
pmichaud | For a two-line string constant, I'd just use ~ | 21:00 | |
my $str = "first line' | |||
~ "second line"; | |||
PerlJam | sure lack of docs is a problem, but if Perl follows the least surprise principle, then they can discover many things on their own (if they are implementeD) | ||
[Coke] | lichtkind: as I said, for ease of maintenance/patches. in any case, there are the three issues I found in a quick glance. | 21:01 | |
felher | masak: i think it will be possible one day to define own quoting-operators (maybe through macros? :) ) that handles that stuff? Until then i may very well use your solution. Thanks :) | ||
masak | PerlJam: if you mean that it's surprising/disappointing to discover that things are NYI, then yes, I think you have a point. | ||
21:01
djanatyn left
|
|||
masak | we should implement stuff as fast as we can to avoid disappointment. | 21:01 | |
PerlJam | masak: no just any things; simple, common, every-day things. | ||
s/no/not/ | |||
benabik | Does $foo.&bar.baz mean bar($foo).baz ? | 21:02 | |
masak | felher: probably quotes will be extensible in various ways, yes. it's just a slang, after all. | ||
lichtkind | [Coke]: what hinders you to edit? | ||
masak | benabik: yes. | ||
PerlJam | It wouldn't surprise or disappoint most people if junctions didn't really exist because, for most programmers, the whole idea is outside the realm of their experience anyway. But the lack of heredocs freaks them out. | ||
[Coke] | lichtkind: personal dislike of that wiki software. | ||
PerlJam | (for instnace) | 21:03 | |
pmichaud | is it SocialText? If so, same here. | ||
[Coke] | pmichaud: aye. | ||
benabik | Thanks, moritz++ | ||
21:03
havenn left
|
|||
moritz | huh? what have I done? | 21:04 | |
[Coke] | lichtkind: so, certainly don't feel like I'm applying pressure. I just don't find it easy to help you the way things are now. (but I have many other things to devote my time to, so that's ok.) | ||
pmichaud | SocialText (or at least that installation of it) has always been too slow for me, among other annoyances. | ||
lichtkind | [Coke]: yes socialtext sucks but i rather use better wiki that github | ||
masak | moritz: stealing my karma! >:( :P | ||
benabik | moritz: 1) been generally useful, 2) have a name close enough to masak++ that I don't pay attention when I autocomplete | ||
lichtkind | [Coke]: so jsut tellme the errors i can change it | ||
[Coke] | lichtkind: I just did. | 21:05 | |
pmichaud | lichtkind: it might be better off not as a wiki, but as a set of files that can be cloned, edited, and changes merged | ||
lichtkind | [Coke]: i requested several times tha something better should be installed | ||
moritz | well, sometimes you have take action yourself | ||
pmichaud | it might naturally fit in the perl6 repo, for example. | ||
lichtkind | pmichaud: maybe but where put it nonline? | 21:06 | |
pmichaud | s/repo/account | ||
moritz | lichtkind: tables.perl6.org? | ||
masak | I think more people here would pay attention to changes/commits if it were on github. | ||
pmichaud | lichtkind: perhaps something like we do for the features page | ||
or perl6.org | |||
both of which are maintained on github | |||
PerlJam | masak: I know I would | ||
[Coke] | lichtkind: irclog.perlgeek.de/perl6/2012-04-10#i_5424740 - there are the errors. | ||
masak | PerlJam: me too. | ||
moritz | lichtkind: if there is a simple-ish script that generates HTML, we can throw it into a directory or subdomain of perl6.org | ||
pmichaud | github also supports some sort of markdown rendering of files | 21:07 | |
(probably not sophisticated enough for this... but maybe) | |||
lichtkind | moritz: even handwriting html does less pain than now because then i would have clear rules how to handle special character | ||
moritz | lichtkind: well, then it would be even easier to stick them into perl6.org | 21:08 | |
21:08
PacoAir left
|
|||
lichtkind | moritz can you init tablets.perl6.org? | 21:09 | |
jaffa4 | Is there an advent calendar each year? | ||
lichtkind | yes | ||
PerlJam | jaffa4: so far | ||
dalek | kudo/nom: 4bacf1a | moritz++ | src/core/Exception.pm: add line numbers for warnings does not yet do the right things for warnings thrown from inside the setting, but warn() calls should be fine |
||
moritz | lichtkind: yes, I can | ||
pmichaud | lichtkind: take a look at perl6.org/about/ to get some ideas about how it's done for the perl6.org site | ||
(the box that says "Contributing to perl6.org") | |||
moritz | lichtkind: give me a repo with .html files and I'll set it up, along with a cron job that updates it once per hour or so | ||
pmichaud | I'm sure that once sometihng is started in github, you'll get lots of people submitting patches | 21:10 | |
tadzik | moritz++ | ||
pmichaud | (that's what happened with the features page, for example) | ||
lichtkind | mostly i prefer bitbuckte, has it to be github? | ||
moritz | doesn't have to be, but all our stuff is there already | 21:11 | |
so if you want people to contribute easily, github is the way to go | |||
[Coke] | I think it if it's git, that's fine, though - nice thing about not under the perl6 umbrella is that he can maintain editorial control, if that's important. | ||
PerlJam | lichtkind: git bitbucket or hg? | ||
what Coke said | 21:12 | ||
[Coke] | if it's git bitbucket, we could probably make the github one a mirror, no? | ||
moritz | aye | ||
[Coke] | and then I can fork from there, and /i/ win, anyway. ;) | 21:13 | |
lichtkind | non github is ok | ||
i hust try to start a new project under perl 6 | |||
moritz | only admins can do that | 21:14 | |
wait a sec | |||
lichtkind | but i always thought its easier for other to partisipate with a wiki | ||
PerlJam | lichtkind: not necessarily. | ||
lichtkind | "tablets" not tables | ||
21:14
plobsing left
|
|||
PerlJam | lichtkind: we're programmers; we like to hack code :) | 21:14 | |
lichtkind | it was for normal people | ||
[Coke] | exactly! none of us is that. | ||
PerlJam | heh | ||
moritz | lichtkind: github.com/perl6/tablets | ||
pmichaud | since in the Perl 6 world most things are in some sort of git repository (compiler source, document specifications, book text, examples, Perl 6 modules, etc.) -- it seems natural to expect that most people involved in Perl 6 programming in any form will end up with some familiarity with git | 21:16 | |
and by Perl 6 programming I also include "writing Perl 6 programs" | |||
21:16
Araq joined
|
|||
pmichaud | not just the language implementors/designers | 21:16 | |
moritz | well, p5 has a very similar trend | 21:17 | |
pmichaud | yes, that too. | ||
PerlJam | lichtkind: were you hoping for a shared knowledge base built from people's experiences trying to use Perl 6 ? | ||
[Coke] realizes he's got some spare time coming up and wonders what he can do on p6. | |||
moritz | all the "big" modules (DBIx::Class, Moose, etc) are in git | ||
benabik | github also makes it to edit these things "in place". They added simple editing capabilities to the site. | ||
[Coke] | mmm. if you squint, github IS a wiki. | ||
pmichaud | we certainly use it like one for specs / websites / book | 21:18 | |
moritz | lichtkind: I accidentally added you to the 'nqp' team on github. Don't worry about it, no harm done :-) | ||
lichtkind | moritz: you will regret that :) | 21:19 | |
pmichaud | moritz: did you see my comment above about :oneline versus something more generalized? or did you reject it already? | ||
moritz | lichtkind: je ne regrette rien :-) | ||
benabik | (cd nqp; git push origin :master) | ||
moritz | pmichaud: yes, I#ve seen it | ||
pmichaud: thing is, I want it to be a bit smarter when :oneline is passed | 21:20 | ||
lichtkind | haha | ||
moritz | pmichaud: well, not smarter, more aggressive in search for user code | ||
benabik | That will, of course, fail because it rejects non-fast-forward pushes. :-) | ||
pmichaud | okay. could key that off of $lines == 1, but I don't have a strong opinion | ||
lichtkind | moritz: i have my own sorta tutorial which waist for some updates and translation should it be also in a repo? | ||
but its other wise finished | 21:21 | ||
PerlJam | moritz: for smartness, let the user pass a custom formatter (with a reasonable default one that you provide too) | ||
moritz | pmichaud: in a multi line backtrace, it often makes sense to include setting functions. Not if we only ever print a single line | ||
PerlJam: well, that's always possible, this is just a default formatter | |||
21:22
lichtkind_ joined
|
|||
pmichaud | as I said, I don't have a strong opinion; :oneline just looks a bit smelly to me | 21:22 | |
moritz | pmichaud: we might make the two things (no of lines and setting fucntions) orthogonal at some point. Or not, we'll see | ||
jaffa4 | Are there records in Perl6 now? | ||
moritz | pmichaud: but a better name wouldn't be amiss | ||
jaffa4 | Are there records/structs in Perl6 now? | ||
moritz | jaffa4: we certainly set records in terms of development time :-) | ||
[Coke] | jaffa4: there are classes and hashes. | 21:23 | |
PerlJam | jaffa4: do you mean "packed data structures"? | ||
jaffa4 | on change in this respect | ||
benabik wonders how hard it would be to do something like ruby's OpenStruct | |||
jaffa4 | yes, something like that | ||
lichtkind_ | moritz: allright we can worrylater about the tutorial | 21:24 | |
moritz | lichtkind_: in general, putting stuff into repos is good :-) | ||
pmichaud | jaffa4: perlcabal.org/syn/S09.html#Compact_structs | ||
NYI, but part of the spec | |||
moritz | lichtkind_: you can also start repos as your own user, and we can then fork them into the perl6 organization | ||
21:25
lichtkind left,
lichtkind_ is now known as lichtkind,
lichtkind left
|
|||
dalek | kudo/nom: fa2d53c | moritz++ | / (2 files): first shot at bringing Str.indent back |
21:25 | |
21:26
lichtkind joined
|
|||
pmichaud | moritz++ moritz++ | 21:26 | |
dalek | ast: 7051d3a | moritz++ | S32-str/indent.t: fudge and correct indent.t |
||
21:26
bluescreen10 left
|
|||
moritz | ok, there's one new regression in there, which I don't have the energy to track down now | 21:26 | |
OTOH we can now properly test for warnings | |||
with CONTROL { default { pass('we got a warning') } } | |||
lichtkind | since i use github ff crashes all the time | ||
Araq | interesting so apparently perl6 has everything that C has too | 21:27 | |
moritz | wow. Complain to the Mozilla folks. | ||
Araq: no pointer arithmetic | |||
Araq: no inline assembler | |||
pmichaud | There will be modules. | ||
:-) | |||
Araq | what? no inline assembler? that's a strange omission | 21:28 | |
PerlJam | Araq: yet. | ||
pmichaud | We do have Q:PIR { ... } :-P | 21:29 | |
Araq | somehow against the pilosophy of perl6, isn't it? | ||
moritz | well, rakudo has Q:PIR { } | ||
[Coke] | can you write C# in niecza? | ||
or haskell in pugs? | |||
21:30
lichtkind_ joined
|
|||
moritz | I think you can write C# in niecza (with that CgOp thing) | 21:31 | |
not sure if that works outside the setting though | |||
21:32
lichtkind left
21:34
jaffa4 left
21:35
lichtkind_ left
21:36
tokuhirom joined
21:40
lichtkind joined
|
|||
lichtkind | shit crashed fifth time and tkom made 24h reset | 21:40 | |
i could shit bullets | |||
[Coke]: sorry i could not find there any problems under this link | |||
[Coke] | "embedd" is not a word. | 21:42 | |
"I many lines" is not meaningful. maybe you meant "If" instead of "I" | 21:43 | ||
"it's own" is grammatically incorrect, it should be "its own" (it's == a contraction of it is; its == belonging to it) | 21:44 | ||
those are the 3 issues found in a quick glance. | |||
(doesn't address any issues of style, or coverage of the source material, or whether it's useful from a teaching perspective, etc.) | 21:45 | ||
lichtkind | ah all right | 21:46 | |
just a min | |||
21:48
lichtkind left
21:49
lichtkind joined
|
|||
lichtkind | that was srash number 7 i could nuke github out of orbit | 21:49 | |
[Coke] | lichtkind: what version of FF are you running? | ||
(on what platform, and how much memory?) | |||
lichtkind | 11 and newest ubuntu | 21:50 | |
benabik has never found Firefox to be the most stable of browsers, although he hears it's gotten better. | |||
21:51
lichtkind left
|
|||
jnthn back from beer :) | 21:52 | ||
21:52
colomon joined
|
|||
pmichaud | newest ubuntu == 11.10 or 12.04 ? | 21:52 | |
I'm running 11.10, my firefox is firefox 10 | |||
jnthn | My word, I go for 3 pints and you guys generate HOW much backlog? :) | 21:53 | |
pmichaud | jnthn: We could stop. | ||
jnthn | No, it's fine :P | ||
I may just leave it until tomorrow while @student are doing exercises to catch up :) | 21:54 | ||
[Coke] | jnthn: drink more beer, an all'll be well. | ||
21:54
lichtkind joined
|
|||
lichtkind | allright 3 crashes later i have another problem | 21:54 | |
i did the first steps like proposed on github | 21:55 | ||
21:55
Araq left
|
|||
lichtkind | but now he wants some [email@hidden.address] pwd | 21:55 | |
wtf | |||
jnthn | [Coke]: I'd love to have, but I am teaching tomorrow, so should be vaguely responsible. :) | 21:56 | |
pmichaud: You're curious to look at Zavolaj? Nice :) | |||
pmichaud: It's not the epic hack the version for ng was :) | |||
benabik | lichtkind: I would guess that that's the identification for your SSH key. | ||
lichtkind | benabik: where i can change that? | 21:57 | |
jnthn | pmichaud: In Oslo I'd like to go through some of the list code with you. | ||
pmichaud: I feel I'm missing some things in there. | |||
benabik | lichtkind: Change the key associated with github, or change the ident of the key? | ||
lichtkind: The latter is `ssh-keygen -c -C "new ident" -f keyfile | 21:58 | ||
lichtkind: The former is github.com/settings/ssh | |||
jnthn | re perlcabal.org/syn/S09.html#Compact_structs I'd say that the CStruct REPR partially implements this stuff :) | 22:00 | |
lichtkind | thank you very much | ||
benabik: WHERE FIND THE KEYFILE? | 22:01 | ||
sorry | |||
benabik | lichtkind: It is usually in ~/.ssh and is one of identity, id_dsa, or id_rsa | 22:02 | |
lichtkind | i look | ||
[Coke]: all 3 things fixed | 22:08 | ||
pmichaud | jnthn: (review list code) aye, no problem | ||
I may try to get the .munch fix in place first -- that may resolve quite a few issues | 22:09 | ||
tadzik | good night #perl6 | ||
lichtkind | good night tadzik | ||
how can i so git push -u origin master and explicitly tell the pwd for that command | 22:11 | ||
22:11
vlixes joined
22:13
plobsing joined
|
|||
jnthn | pmichaud: Wouldn't surprise me if we can knock qbootstrap's remaning blockers out between us with a bit of time on it too | 22:17 | |
pmichaud | jnthn: I suspect that depends on qregex improvements; I'm not sure I'll have a lot of tuits for it before the hackathon, and it's hairy enough that doing much *at* the hackathon is not a good use of my time | 22:18 | |
i.e., if I'm focused on qregex, I'm not really available for much else | |||
jnthn | pmichaud: mark_commit | ||
pmichaud: and protoregexes incorporating other protoregexes into their NFA | |||
pmichaud | yes, that's still in my head. don't we also need the ltm stuff too? | ||
jnthn | pmichaud: Those are the two big ones I know of. | 22:19 | |
pmichaud | right. those are a little hairy. | ||
22:19
alester joined,
vlkv joined
|
|||
jnthn | Yeah, because the naive solution explodes as soon as you hit recursion. | 22:19 | |
pmichaud | mark_commit is less so, but getting the nfa stuff completely integrated in takes a bit of work | ||
22:19
vlkv left
|
|||
jnthn | pmichaud: What do you mean by "completely integrated in"? | 22:19 | |
pmichaud | afaik, qregex doesn't have any ltm semantics at the moment | 22:20 | |
jnthn | pmichaud: It does. | ||
nom: grammar Foo { proto TOP { * }; rule TOP { \w+ }; rule TOP { ab } }; say Foo.parse('abc') | 22:21 | ||
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'» | ||
22:21
alester left,
alester joined
|
|||
jnthn | nom: grammar Foo { proto token TOP { * }; rule TOP { \w+ }; rule TOP { ab } }; say Foo.parse('abc') | 22:21 | |
p6eval | rakudo 3bd91f: OUTPUT«===SORRY!===Method 'match' not found for invocant of class 'String'» | ||
jnthn | huh... | ||
oh, duh :) | 22:23 | ||
pmichaud | wouldn't it need to be something like proto token abc { * }; rule abc:<w> { \w+ }; rule abc:<ab> { abc }; | ||
? | |||
jnthn | nom: grammar Foo { proto TOP { <...> }; token TOP { \w+ }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; Foo.parse('abc') | 22:24 | |
p6eval | rakudo 3bd91f: ( no output ) | ||
jnthn | nom: grammar Foo { proto TOP { <...> }; token TOP { \w+ }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; say Foo.parse('abc') | ||
p6eval | rakudo 3bd91f: OUTPUT«=> <abc>» | ||
jnthn | Right. | ||
That is using the NFA. | |||
The qregex branch is also using the NFA engine for such things. | |||
pmichaud | okay, so you've extended it beyond where I left off then | ||
jnthn | gha | ||
the *qbootstrap* branch | |||
Yes, I've done quite a bit of stuff. | |||
pmichaud | okay | ||
checking: | 22:25 | ||
jnthn | Also the qbootstrap branch contains a dumb port of the NFA runner to C that runs 15 times faster than the PIR version. | ||
er | |||
s/PIR/NQP/ | 22:26 | ||
pmichaud | nom: grammar Foo { token TOP { <abc> }; proto abc { <...> }; token abc:<www> { \w+ }; token abc:<ab> { ab }; }; say Foo.parse('abc'); | ||
p6eval | rakudo 3bd91f: OUTPUT«Method 'abc' not found for invocant of class 'Foo' in regex TOP at /tmp/jsVMkgq9c1:1 in method parse at src/gen/CORE.setting:8415 in block <anon> at /tmp/jsVMkgq9c1:1» | ||
jnthn | Needs to be proto token | 22:27 | |
or proto regex | |||
pmichaud | nom: grammar Foo { token TOP { <abc> }; proto regex abc { <...> }; token abc:<www> { \w+ }; token abc:<ab> { ab }; }; say Foo.parse('abc'); | ||
p6eval | rakudo 3bd91f: OUTPUT«#<failed match>» | ||
jnthn | proto abc { <...> } is a subroutine. | ||
pmichaud | the version you had seemed to have an extra TOP rule | ||
proto TOP { <...> }; token TOP { \w+ }; # error | 22:28 | ||
jnthn | oh | ||
nom: grammar Foo { proto token TOP { <...> }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; Foo.parse('abc') | |||
p6eval | rakudo 3bd91f: ( no output ) | 22:29 | |
jnthn | nom: grammar Foo { proto token TOP { <...> }; token TOP:sym<w> { \w+ }; token TOP:sym<ab> { ab } }; say Foo.parse('abc') | ||
p6eval | rakudo 3bd91f: OUTPUT«=> <abc>» | ||
jnthn | That's what I meant. | ||
pmichaud | so why does mine faile? | ||
*fail? | |||
oh, no sym | |||
nom: grammar Foo { token TOP { <abc> }; proto regex abc { <...> }; token abc:sym<www> { \w+ }; token abc:sym<ab> { ab }; }; say Foo.parse('abc'); | |||
p6eval | rakudo 3bd91f: OUTPUT«=> <abc> abc => <abc>» | ||
pmichaud | okay | ||
jnthn | Anyway, it's using the NFA engine. | ||
I got that in place months ago. | 22:30 | ||
pmichaud | okay | ||
jnthn | Alternations don't use it yet | ||
That is, standalone ones | |||
diakopter++ patched the NFA builder to support quantifiers. | |||
pmichaud | so, does it use the nfa engine for subrules? | ||
jnthn | Yeah | ||
You implemented merge_subrule | |||
It does as much as that. | 22:31 | ||
But merge_subrule doesn't consider subrules that are in turn protoregexes. | |||
Well, put better | |||
protoregexes don't have an NFA. | |||
pmichaud | ah | ||
protoregexes get an NFA that are the alternation of all of the candidates | |||
jnthn | Makes sense. Though NYI. :) | ||
Also, I already implemented caching of the computed NFA. | 22:32 | ||
pmichaud | all you have to do is look up the NFAs for each candidate and add them as an alternation | ||
lichtkind | benabik: i got Comments are only supported for RSA1 keys. | ||
pmichaud | the caching is per-grammar, yes? | ||
jnthn | Yes. | ||
It's done in the meta-object | |||
lichtkind | but there are no comments | ||
jnthn | So if you were to do a mixin (like we should for derived grammars) then it'd recompute things on demand. | ||
pmichaud: fwiw, you may want to build qbootstrap and just look through the test failures. | 22:33 | ||
pmichaud | ummm, that part doesn't make sense to me | ||
22:34
lichtkind_ joined
|
|||
jnthn | pmichaud: stage1 builds a stage2 using qregex, so when you "make test" you're testing an NQP that uses qregex for parsing. | 22:34 | |
pmichaud: Maybe I explained badly then. | |||
22:34
gv joined
|
|||
pmichaud | jnthn: this is in qbootstrap branch, yes? | 22:34 | |
benabik | lichtkind: Then perhaps I was wrong? | ||
jnthn | All I mean is, if you have an instance of a grammar and you mix in to it, then that's a type change, and it will not share the cache with the original class. Which means the new tokens will be considered. | ||
pmichaud: Yes, what I just said about the stage twiddles is only true of qbootstrap branch | 22:35 | ||
pmichaud | okay | ||
jnthn | pmichaud: Also I created a temporary QHLL | ||
This contains things like EXPR updated for QRegex. | |||
pmichaud | how divergent is qbootstrap from master ? | ||
jnthn | Not crazily. | ||
I updated it recently | 22:36 | ||
It incorporates the last major set of NQP changes (the bs stuff) | |||
So it's basically some qregex fixes + QHLL + Makefile changes for the most part. | |||
And the C port of the NFA runner, because performance is hosed otherwise. :) | |||
lichtkind_ | has here anyone a clue why git brings up wxperl.info which is in no config | 22:37 | |
pmichaud | I'm a little surprised by that -- the tests I did with the NFA runner earlier weren't too bad. | ||
but I'm fine with a C port. | |||
jnthn | pmichaud: It was nomming 50% of runtime when I used the profiler on it. | ||
pmichaud: that is, when parsing NQP code. | |||
22:37
lichtkind left
|
|||
pmichaud | okay | 22:37 | |
22:37
lichtkind_ is now known as lichtkind
|
|||
jnthn | pmichaud: When I ported it to C in a naive "just get it done" way, that dropped to 3% | 22:38 | |
pmichaud | well, I was mainly comparing to the nqp-rx form of protoregex | ||
jnthn | That is to say, we can do better. | ||
pmichaud | not to what the fastest form would be | ||
jnthn | But it was a big enough improvement that I left it there. :) | ||
22:38
miso2217 joined
|
|||
pmichaud | well, I'm fine with a C port :) | 22:38 | |
jnthn | pmichaud: qbootstrap still runs a little slower than master. | ||
pmichaud: I'm not entirely sure why yet. | |||
22:38
spider-mario left
|
|||
pmichaud | lack of transitive nfas, probably | 22:38 | |
jnthn | That could well be it. | 22:39 | |
pmichaud | master (nqp-rx) has transitive protoregexes | ||
22:39
spider-mario joined
|
|||
jnthn | aha | 22:39 | |
Another part is that the builtins are written in NQP | |||
22:39
miso2217 left
|
|||
jnthn | Not PIR | 22:39 | |
benabik | lichtkind: What command are you running when it asks for it? | ||
jnthn | *but* that'll get better post-QAST. | ||
pmichaud | okay | 22:40 | |
(more coming) | |||
the approach I had been taking was not to create a separate branch, but rather create a new NQP compiler (NQPQ) that would use qregex for its regexes, and get it to bootstrap | |||
i.e., do it within a branch instead of separate branches | |||
I'm fine with throwing NQPQ away - it wasn't heavily patched over NQP | 22:41 | ||
jnthn | pmichaud: Oh, NQPQ still exists | ||
pmichaud: But just doing it in stage 2 is not enough. | |||
pmichaud | I suspect NQPQ is way out of date though | ||
jnthn | In qbootstrap it is up to date (more) | 22:42 | |
pmichaud | and I'm not planning to just do it in stage2 -- the intent was to use NQPQ to close the loop | ||
jnthn | It's just that qbootstrap builds now in stage1 *and* stage2. | ||
And stage2 adds in QHLL | |||
So if you "make bootstrap" the final output of this lot, you should close the loop that way. | |||
I guess we have the same goal but reached different conclusions on how to do it... :) | |||
pmichaud | yes, and I'm way confused about the status of any of the pieces. | 22:43 | |
I'm not really able to keep all of the branches/threads straight in my head | |||
jnthn | pmichaud: I suggest build qbootstrap, make test, glance over the Makefile. :) | ||
pmichaud does a 'git diff qbootstrap master' | 22:44 | ||
jnthn | pmichaud: I have the disadvantage of not having been the designer of qregex and the bootstrap system, so largely I've just tried to make the best sense of it I could and do what felt sane. I'm not going to be in the slightest surprised if I've done it differently to how you'd initially envisioned. OTOH, I *think* the path I've led it down so far can work out. | 22:45 | |
pmichaud | I'm sure it can work out. I don't know how quickly *I* can make it work out. | ||
jnthn | pmichaud: That's fine. We have both of us. :) | 22:46 | |
pmichaud | okay, well let me try to make sense of this -- a few q's | ||
does NQPQ have any role in the qbootstrap building process? | |||
jnthn | Yes | 22:47 | |
Well, if you mena what I think you do. :) | |||
pmichaud | I mean: is it compiled at any point in the build chain | ||
jnthn | stage0 = the PIR files. No qregex, no NQPQ, no QHLL. Nothing new. | ||
stage 1 = old HLL, QAST, QRegex, NQPQ | |||
stage 2 = QHLL, QAST, QRegex, NQPQ | |||
(because you can't meaningfully try a updated HLL until you have your grammars being compiled with QRegex) | 22:48 | ||
so NQPQ is in stage 1 and stage 2 | |||
pmichaud | okay, so the qbootstrap Makefile basically takes what was the NQPQ target in master and makes it the primary target | ||
jnthn | Correct | ||
In fact, the NQP directory itself is perhaps redundant and unused in qbootstrap now | 22:49 | ||
pmichaud | right, that's what I was trying to articulate next. Good. | ||
You're comfortable that NQPQ is not too far diverged from NQP, then? | |||
jnthn | I spent two hours at the weekend undiverging them. I'm very comfortable. :) | 22:50 | |
pmichaud | and you undiverged them in the qbootstrap branch | ||
? | |||
jnthn | Correct. | ||
pmichaud | checking. | ||
22:51
NamelessTee left
|
|||
pmichaud | okay, I just did a recursive diff -- I'm comfortable with that also. | 22:51 | |
jnthn | \o/ | ||
pmichaud | there are some differences but none extensive (unrelated to QRegex stuff) | 22:52 | |
so, in qbootstrap, stage0 builds NQP from the .pir files | 22:53 | ||
stage1 then uses that NQP to build QRegex, QAST, HLL, and NQPQ | |||
jnthn | right | ||
pmichaud | stage2 then builds QHLL, QAST, QRegex, and NQPQ using ... ? | ||
NQPQ? | |||
jnthn | Note nqpq actually ends up in nqp.exe | ||
stage2 builds everything using stage1 | 22:54 | ||
pmichaud | okay | ||
jnthn | er, the clarify | ||
we build an nqp.pbc at each stage | |||
pmichaud | right | ||
jnthn | in stage1 and stage2 it's just that NQP::* come from src/nqpq | ||
22:54
spider-mario left
|
|||
pmichaud | okay, I got it. | 22:54 | |
jnthn | And stage2 adds QHLL | ||
I did my best shot at porting EXPR and friends. | 22:55 | ||
pmichaud | QHLL is an adaptation of HLL? | ||
jnthn | Yeah | ||
In fact | |||
22:55
whiteknight joined
|
|||
jnthn | I *think* only Grammar has changes | 22:55 | |
pmichaud | so, in the qbootstrap branch, src/HLL/ and src/NQP/ are basically unused | ||
jnthn | Certainly only Grammar has substantive changes. | ||
wrong (more) | |||
src/HLL/ is still used for *stage1* | 22:56 | ||
pmichaud | oh, src/HLL.... right | ||
22:56
havenn joined
|
|||
jnthn | Yeah, it has to come in one stage later. | 22:56 | |
pmichaud | got it. makes sense. | ||
jnthn | That is a big part of why qbootstrap looks the way it does in terms of how I have got stage1 and stage2 in the Makefile. | ||
pmichaud | okay | ||
given that you have protoregexes working in QRegex, at least non-transitively, the rest ought to be fairly straightforward | 22:57 | ||
jnthn | At first I thought I could get away with just doing stuff in stage2. Alas, no :) | ||
pmichaud: Oh, I think with transitive NFA + mark commit fixes, we'll be able to count the number of failing files in t/nqp on the fingers of one hand. :) | |||
pmichaud | I think I may be able to close the loop on qbootstrap prior to oslo | ||
then the question becomes, how much of qregex is missing to be able to compile src/Perl6/Grammar.pm | 22:58 | ||
jnthn | Yeah, that I didn't yet look into. | ||
pmichaud | that's the other piece that scares me a bit | 22:59 | |
let me check my calendar a sec | |||
jnthn | I'm not scared about making it compile. | ||
I'm much more scared the impact that having real LTM will have on it. :) | |||
pmichaud | oh, that part doesn't bother me too much. :) | 23:00 | |
so, since we're each scared about different things, perhaps none of them are truly scary :) | |||
(or both of them are) | |||
have to check calendar with $wife | 23:01 | ||
jnthn | ok | 23:02 | |
pmichaud | ....who went to the store :-/ | ||
jnthn also has to sleep soon | |||
Well | |||
Attempt to | |||
pmichaud | here's my tentative plan | ||
jnthn listens | 23:03 | ||
pmichaud | tomorrow I'm basically without tuits -- we'll be at chemo all day tomorrow | ||
thursday I have a bit of work for $otherjob, plus household stuff | |||
so, I may dive into things a bit on Thu or Fri | |||
iiuc, my Sat is completely clear. So assuming energy/tuit supply is still good, I'll plan to spend Sat closing the qbootstrap loop and getting protoregexes to do transitive ltm | 23:04 | ||
jnthn | I suspect the tran ltm is a prereq for closing the loop :) | 23:05 | |
Anyway, +1, and here's hoping :) | |||
pmichaud | I suspect not, if nqpq is already able to build itself | ||
jnthn | I'll be around on Saturday and contactable somewhat on Thu/Fri. | ||
pmichaud | in that sense, the loop is already closed, I think. | ||
jnthn | My tuit supply this week is unusually low...just result of having been away from $dayjob on vacation and having some backlog there. :) | 23:06 | |
After this week things are normal again. | |||
pmichaud | the problem isn't closing the loop, it's more that the result doesn't have all of the features needed to build rakudo | ||
(or run all of the things that rakudo expects) | |||
jnthn | That could well be an issue, yeah. | ||
pmichaud | if nqpq builds itself, it's "bootstrapped" | ||
jnthn | Well, remember Rakudo already uses QRegex for userland regexes. | 23:07 | |
So it's only really src/Perl6/Grammar.pm that we have to worry much over. | |||
pmichaud | right, I'm mainly concerned with Perl6/Grammar and Perl6/Actions stuff | ||
jnthn | I don't see Actions being a big deal. | ||
Grammar a bit more so. | |||
pmichaud | I don't either, unless it's depending on the old Match objects somehow. | ||
[Coke] is excited for the perl6 weekend! | 23:08 | ||
jnthn | OK, my class tomorrow will be thankful if I sleep now, so I probably should. :) | ||
pmichaud | because when we switch to a qregex-based parser, the parse nodes are different from what nqp-rx was producing | ||
(but obviously not too different, if nqpq compiles itself) | 23:09 | ||
jnthn | Yes, that is true. | ||
pmichaud | anyway, I'll prioritize some tuits towards qbootstrap over the next few days, if I have any | ||
jnthn | OK, nice :) | ||
jnthn would be really happy if we get qbootstrap landed in the next couple of weeks. | 23:10 | ||
pmichaud | I don't know if we'll want to switch for the 2012.04 release | ||
jnthn | Me either. | ||
pmichaud | I guess we see how this weekend goes. | ||
jnthn | But if we've a branch ready to merge right after it...that's fine too :) | ||
pmichaud | yeah, that works also. | ||
okay, sleep well. nice work on qbootstrap -- I'm not as scared as I was | |||
jnthn | qbootstrap gets rid of 1 out of our 2 major PIR dependencies. :) | ||
pmichaud | the other being PAST/QAST? | 23:11 | |
jnthn | Correct. | ||
:) | |||
pmichaud | that one ought to be a lot less difficult to fix | ||
jnthn | Yeah. It's do PAST but with better native type handling and some other twiddles. :) | ||
And in NQP, not PIR. :) | |||
pmichaud | right | ||
and fix some of the other buglets | |||
jnthn | yeah | ||
pmichaud | then the hard part becomes converting Rakudo to not use PAST :-) | 23:12 | |
jnthn | I think Oslo will be a good chance for us to sync our ideas. :) | ||
We can potentially do that picemeal (more) | |||
Since you made QAST/PAST nestable in each other. :) | |||
pmichaud | that's a bit ugly (my fault!) but yes, we can go that route :) | ||
23:13
benabik left
|
|||
jnthn | masak++ is also very keen for QAST because then QAST nodes are 6model objects which means they will serialize which means quasi interpolation can work with precompilation :) | 23:13 | |
Well, and AST macros generally :) | 23:14 | ||
pmichaud | yes, I hadn't realized that particular part | ||
definitely another motivation for the switch | |||
jnthn | :) | ||
Yeah, lots to be excited about. :) | |||
pmichaud | to some extent I'd also like to make sure we think of qast nodes in terms of eventual nqp:: nodes | ||
e.g., nqp::list, nqp::hash, nqp::if, and the like | 23:15 | ||
jnthn | ah | ||
pmichaud | but that's likely another stage down the road | ||
jnthn | I'm a bit bothered about excessive conflation there | ||
pmichaud | if you just think of nqp::* translating directly to ast nodes, it makes sense | ||
jnthn | e.g. I'd rather we have a prefix like qast:: for QAST nodes and another one (nqp:: or vm::) for VM op abstraction | 23:16 | |
pmichaud | instead of translating to opcodes | ||
jnthn | The current nqp:: opcode handling is problematic because it happesn too soon | ||
The optimizer, for example, should see the abstract, untranslated op. | |||
pmichaud | I'd be fine with vm:: for vm opcodes | ||
jnthn | And only at the PAST -> backend stage would end trnaslation to the PIR-land or CLR-land or whatever take place. | 23:17 | |
OK, I'm not likely to argue over naming. I'm mostly bothered about being able to write a portable optimizer. :) | |||
And ease of writing other backends. :) | |||
pmichaud | anyway, I'm fine with that -- I just like having the nqp::op(...) functional style of getting to the ast | ||
jnthn | I may arge that wants to be qast::if(...) to be really clear | 23:18 | |
but nqp:: can work too | |||
It's just if it's AST nodes, qast:: implies that better. | |||
pmichaud | I'm fine if it's ast:: or similar | ||
jnthn | Yes, or ast:: :) | ||
pmichaud | we can figure out the needed distinction as we get to it. | ||
nqp:: can be the conflated one where we move things around until we know what we ultimately want :) | |||
jnthn | true :) | 23:19 | |
pmichaud | (at which point nqp:: probably goes away) | ||
okay, I have to prepare for evening's activities. See you later | |||
jnthn | yeah, sleep... :) | 23:20 | |
o/ | |||
masak | good night jnthn, #perl6 | 23:22 | |
lichtkind | o/ | ||
whats a good ssh server? | 23:24 | ||
Tene | lichtkind: openssh | 23:27 | |
lichtkind | i mean server url | 23:29 | |
excuse me for not being clear | |||
Tene | I'm very curious about what you're looking for, now. You're looking for an open, public access shell host? | 23:30 | |
23:30
Chillance left
|
|||
lichtkind | Tene: i just want to set my config properly | 23:31 | |
im totally lost now | |||
[Coke] | do you mean "how do I setup ssh locally for use with github"? | 23:33 | |
r: gist 3 | |||
p6eval | rakudo 3bd91f: ( no output ) | ||
23:34
nif joined
|
|||
[Coke] | r say gist 3 | 23:34 | |
r: say gist 3 #bother | |||
p6eval | rakudo 3bd91f: OUTPUT«3» | ||
[Coke] | n:say gist 3 | ||
n: say gist 3 | |||
p6eval | niecza v15-6-gefda208: OUTPUT«3» | ||
lichtkind | [Coke]: yes | ||
[Coke]: funnily it forked for commits to spec | 23:35 | ||
but now im master | |||
and things turned ugly | |||
[Coke] | lichtkind: help.github.com/linux-set-up-git/ has initial setup instructions. if you need something other than that, asking specific questions helps. | ||
like "I run this command and get <foo> but I expect <bar>". | 23:36 | ||
p: say ~3 | |||
p6eval | pugs: OUTPUT«3» | ||
23:36
betterworld left
|
|||
[Coke] | moritz: if I rebuild pugs now, will it work? | 23:39 | |
(not ready to do it yet) | |||
p: say gist 3 | 23:40 | ||
p6eval | pugs: OUTPUT«*** No such subroutine: "&gist" at /tmp/QluWJTy33n line 1, column 5 - line 2, column 1» | ||
[Coke] | question: for spec tests that compare a .WHAT.gist to a literal string (e.g. "Hash") that are not explicitly testing .gist, can those be changed to compare to Hash.gist ? | 23:46 | |
because the literal is Hash(), and pugs is giving "Hash" | 23:47 | ||
... eh. nevermind. | |||
23:49
Liutox008 joined
|
|||
[Coke] | eh. I WILL change it, but mainly because S02-types/hash.t is inconsistent about it. | 23:49 | |
23:49
frankaa112 joined
|