»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released! Set by diakopter on 6 September 2010. |
|||
Tene | pmichaud: do they eq if you you just call .decode() twice? | 00:08 | |
Hmm. I get 1 when I run that. I should update. | 00:09 | ||
00:17
araujo left
00:31
whiteknight left
00:38
shortcircuit left
00:40
shortcircuit joined
|
|||
pmichaud | Tene: I'm running a rakudo against a more recent copy of Parrot (after some string encoding changes) | 00:42 | |
Tene | ahh | 00:43 | |
pmichaud | I get a failure that comes down to the fact that Buf.decode seems to be returning a string that is marked as 'ascii' encoding even though it's obviously unicode | ||
just a sec, I'll update | |||
Tene | spooky | ||
I'm on parrot 48933 | |||
and they're equal | |||
pmichaud | right | ||
I'm on whatever revision is in the nopaste :) | |||
48982 | 00:44 | ||
Tene | oh, right, it's there | ||
Reading comprehension is great. :) | |||
00:45
Guest27047 joined
|
|||
pmichaud | gist.github.com/578339 # same as previous nopaste, showing that encodings are somehow different | 00:45 | |
00:52
QinGW joined
00:55
QinGW1 joined
00:56
QinGW1 left,
QinGW1 joined
00:59
ruoso left,
QinGW left
|
|||
pmichaud | gist.github.com/578359 # somewhere is a bug in 'get_string_as' that is returning the wrong encoding | 01:00 | |
I wonder if the problem is the zero-length string | |||
i.e., perhaps its encoding is being switched to ascii somewhere because it has length zero. | 01:01 | ||
a-ha | |||
I think I now. | |||
*know | |||
yes, bug confirmed. | 01:02 | ||
the encoding isn't being preserved in the packfile. | |||
filed as TT #1791 | 01:12 | ||
01:17
molaf__ joined
01:18
molaf_ left
01:24
Maco_ joined
01:25
Maco_ left
01:35
lichtkind joined
|
|||
lichtkind | is anyone from planetsix here? | 01:35 | |
since use.perl ends please change my feed to blogs.perl.org/users/lichtkind/ tag: "Perl 6" | 01:36 | ||
01:39
Chillance left,
lichtkind left
02:02
masonkramer left
|
|||
dalek | kudo: 4d96c92 | pmichaud++ | src/core/Buf.pm: Change unicode constant string passed to ByteBuffer.get_string_as to work around TT #1791. |
02:04 | |
kudo: c71489b | pmichaud++ | docs/ChangeLog: Merge branch 'master' of github.com:rakudo/rakudo |
|||
02:07
meppl left
02:17
xinming left,
xinming joined
02:40
araujo joined
02:45
LionMadeOfLions joined
03:01
orafu left
03:02
orafu joined
03:10
tylercurtis joined,
Guest27047 left
|
|||
sorear | good * #perl6 | 03:24 | |
03:28
[Coke] left
|
|||
diakopter | sorear: hi | 03:29 | |
03:30
jaldhar joined
03:32
jdv79 joined
|
|||
sorear | shocking | 03:36 | |
diakopter | ? :) | ||
sorear | removing 1 pointer from backtrack state objects = 16% speedup | 03:37 | |
diakopter | int r sting | ||
03:44
patspam left
|
|||
dalek | ecza: 7f531ff | sorear++ | lib/Cursor.cs: Combine klasses and reps into a composite N-stack |
03:45 | |
ecza: 69dcd45 | sorear++ | lib/Cursor.cs: Use a composite list for captures |
|||
03:56
satyavvd joined
04:09
LaVolta joined
04:13
meppl joined
04:15
agentzh joined,
justatheory left
04:16
justatheory joined
04:17
justatheory left
|
|||
TimToady | new entry: rosettacode.org/wiki/Create_a_two-d...ime#Perl_6 | 04:17 | |
sorear is implementing <?foo> as <!!foo> | 04:18 | ||
feels a little silly :) | |||
TimToady | not quite correct under LTM | ||
well, for the matching itself, it's fine | 04:19 | ||
sorear | yeah for the matching itself | ||
TimToady | but <?foo> includes foo in LTM, and <!...> doesn't | ||
nodnoe | |||
*d | |||
sorear | LTM is handled by a different codepath | ||
TimToady | maybe you should implement <!foo> and <??foo>...oh wait... | 04:20 | |
04:43
Aditcr joined,
molaf__ left,
cjk101010 joined
04:50
meppl left
04:55
sftp joined
05:08
envi^home joined
|
|||
dalek | ecza: 65081a4 | sorear++ | / (4 files): Give NState responsibilities for backtrack control |
05:15 | |
ecza: 1083311 | sorear++ | src/RxOp.pm: Implement optimizations for simple cases of ** |
|||
ecza: e698589 | sorear++ | / (3 files): Optimize use of literal strings in lookahead |
|||
05:15
envi^home left,
sftp left
05:19
envi^home joined
05:21
Aditcr left
|
|||
sorear | the LTM engine is *finally* showing up on the profile | 05:25 | |
05:40
gottreu_ joined
05:43
kaare joined,
kaare is now known as Guest68652
05:48
am0c joined
05:57
masak joined
|
|||
masak | oh hai, #perl6! | 05:57 | |
05:57
Cyrus joined
|
|||
sorear | hello masak | 05:58 | |
masak | bon matin. | ||
06:00
JimmyZ joined,
wtw_ joined
06:03
QinGW joined
06:04
QinGW2 joined,
gottreu_ left
06:05
QinGW1 left
06:07
QinGW left
06:10
JimmyZ left
06:24
plobsing left,
uniejo joined
06:38
am0c left
06:40
cmadsen1 joined
06:43
s1n left
06:44
cmadsen left
|
|||
dalek | ecza: 664f420 | sorear++ | / (3 files): Avoid making a cursor uselessly for alternation |
06:45 | |
ecza: 5d21502 | sorear++ | lib/Cursor.cs: Refactor NFA generation |
|||
ecza: d4df43e | sorear++ | lib/Cursor.cs: Implement lazy DFA generation |
|||
masak | sorear: [backlog] I hope that some day I will reach for perl6 for most of my quick-and-dirty file scraping and reporting needs. | 06:47 | |
sorear | 31.4 ms / 6.01MB | 06:48 | |
masak: oh? | |||
masak | I don't know yet if it's a realistic vision, but I still haven't ruled it out. :) | 06:49 | |
TimToady | s/quick-and-dirty file scraping and reporting// | ||
06:50
boggy joined
|
|||
masak | ;) | 06:50 | |
moritz_ | std: s/quick-and-dirty file scraping and reporting// | ||
p6eval | std 32123: OUTPUT«===SORRY!===Unrecognized regex metacharacter - (must be quoted to match literally) at /tmp/oT_snfQ7cN line 1:------> s/quick-⏏and-dirty file scraping and reporting//Couldn't find terminator / at /tmp/oT_snfQ7cN line 1:------> | ||
..s/quick-[… | |||
masak | well, on the higher end I already reach for Perl 6 often enough. | ||
06:50
boggy left
|
|||
masak | moritz_: sometimes we unashamedly use p5 substitutions :) | 06:51 | |
06:51
boggy joined
|
|||
TimToady | I was using sed | 06:51 | |
masak | lol | ||
06:52
Trashlord left
|
|||
sorear | apparently I've was blind when I created this "file of JSON as big as STD", I made it 30 times too big | 06:54 | |
06:54
Trashlord joined
06:56
daxim joined,
s1n joined
|
|||
moritz_ | www.perl.com/pub/2010/09/people-of-...-lenz.html | 06:58 | |
masak | I was just going to post that :) | 07:00 | |
a good read. moritz_++ | |||
moritz_ | thanks | ||
sorear isn't going to make much more of a dent in niecza parsing slowness without gradual types | |||
moritz_ | chromatic++ | ||
sorear | calling all methods all the time as if they could be method foo(*@_ is rw) is rw, hurts | 07:01 | |
moritz_: what is an object pipe? | 07:03 | ||
that sounds fun | |||
moritz_ | sorear: what is used in a feed operator | ||
07:05
azert0x joined
|
|||
dalek | ast: 50a95bb | moritz++ | S03-series/arity-2-or-more.t: [series] unfudge some tests |
07:10 | |
07:15
shade\ joined
07:16
snearch joined
|
|||
sorear | moritz_: Do they have an independant existance? | 07:16 | |
moritz_ | sorear: don't know | 07:17 | |
07:20
meppl joined
|
|||
masak | rakudo: for (1, 2, 3, 4, 5) -> $x, $y { say "$x $y" } | 07:20 | |
p6eval | rakudo c71489: OUTPUT«1 23 4Not enough positional parameters passed; got 1 but expected 2 in <anon> at line 2:/tmp/XJL94D01LS in main program body at line 1» | ||
masak | no more StopIteration. Rakudo++ | 07:21 | |
moritz_ | rakudo: for (1, 2, 3, 4, 5) -> $x, $y? { say "$x $y" } | 07:25 | |
p6eval | rakudo c71489: OUTPUT«1 23 45 Mu()» | ||
moritz_ | rakudo++ | ||
though I'd argue that $y? should default to Any, even though the type constraint is Mu | 07:26 | ||
much like | |||
sorear | moritz_: The stuff on feeds in the spec confuses me | ||
moritz_ | my $x; say $x.WHAT; $x = Mu; say "alive" | ||
rakudo: my $x; say $x.WHAT; $x = Mu; say "alive" | |||
p6eval | rakudo c71489: OUTPUT«Any()alive» | ||
moritz_ | sorear: you're not the first one to be confused by it | ||
afk | |||
masak | rakudo: my @a = (1, 2, 3); @a ,= 4; @a.say; | ||
p6eval | rakudo c71489: OUTPUT«1234» | 07:27 | |
masak | \o/ | ||
07:28
cmadsen1 left,
cmadsen joined
|
|||
pmichaud | moritz++ # people of perl 6 | 07:32 | |
mathw | o/ | 07:33 | |
masak | \o | 07:35 | |
pmichaud | _o_ | ||
mathw | moritz++ | ||
pmichaud wonders if he'll ever be a "People of Perl 6" :-) | 07:36 | ||
mathw | Of course not | ||
daxim | pumpking? | ||
mathw | You're a Lord at least | ||
pmichaud | .oO( Lord of Least? ) :-) |
||
masak | Lord at Least of Perl 6! | 07:37 | |
that's some title! | |||
jnthn | morning, #perl6 | 07:38 | |
pmichaud | jnthn: o/ | ||
masak | jnthn! \o/ | ||
sorear | hello jnthn | ||
I'm done optimizing niecza's regexes for now :) | |||
07:39
PacoLinux left
|
|||
jnthn | This mobile broadband has...quite some latency. :-) | 07:40 | |
mathw | ah mobile | 07:42 | |
the non-future | |||
jnthn | It's fine in one place. | 07:43 | |
But i'm on the train. | |||
tylercurtis is done writing action methods for Bennu for tonight. | |||
jnthn | sorear: So, what next? :-) | ||
tylercurtis | Good night, #perl6. | ||
sorear | random features for a while | 07:44 | |
then I'll need to figure out how to make roles work | |||
which will be ... interesting | |||
mathw | :) | ||
07:44
PacoLinux joined
|
|||
mathw | I'm still kind of trying to figure out what roles are for | 07:44 | |
sorear | I've designed my ClassHOW into a corner; I'm not sure how I can extend it | 07:45 | |
mathw | I think my OO design brain is just programmed for systems which don't have them | ||
So I have no handles to grasp | |||
I've only run into one situation recently where I would have used one (I used C++ multiple inheritance to get a similar effect) | |||
sorear | So I want to steal jnthn++'s ClassHOW | ||
jnthn | Working on it... :-) | 07:46 | |
tylercurtis | phenny: tell TimToady STD's statement_control:if is lovely. Thank you for that. It was a pleasure to write an action method for. | ||
phenny | tylercurtis: I'll pass that on when TimToady is around. | ||
jnthn | ooh, a station. Connection stability! | ||
sjn: You'll be glad to know I'm on my way. :-) | 07:47 | ||
sorear | The latest timing figures are 31.4 seconds for 6,010,001 bytes | ||
JSON::Tiny | |||
jnthn | Whee. | ||
sorear | seems STD uses my ($x, $y, $z) = foo; in quite a few places | 07:48 | |
sorear ponders how that should work in Perl6 | |||
07:48
kjeldahl joined
|
|||
jnthn | It's just list assignment, afaik. | 07:48 | |
pmichaud | I think Rakudo treats it as "Parcel assignment" | ||
jnthn | Pro tip: before feeling shocked how much the coffee is, be sure you're awake enough to differentiate between 15 and 50. | 07:49 | |
pmichaud | i.e., it's the STORE method on Parcel | ||
jnthn | *yawn* | ||
It's kind of a bootstrapping problem though. I needed the coffee to be awake enough. :-) | 07:50 | ||
sorear tries to find the impl of that | |||
jnthn | Probably src/builtins/Parcel.pir or some such | ||
pmichaud | src/builtins/Parcel.pir:207 | ||
pmichaud notes that bootstraps applied properly are an alternative to the coffee :) | 07:51 | ||
sorear | rakudo: my $x = "hi"; my $y = "lo"; ($x, *, *, *, *, $y) = ((0 ... 4),$x); say $y; | 07:53 | |
p6eval | rakudo c71489: OUTPUT«hi» | ||
masak | pmichaud: that's a scary use of "properly"... :) | ||
sorear wonders how this is workign | |||
oh, it's entirely eager | 07:54 | ||
rakudo: my (@x) = (0 ... *); say "alive" | |||
pmichaud | list assignment is eager, yes :-) | ||
p6eval | rakudo c71489: OUTPUT«(timeout)» | ||
jnthn | rakudo: my @x := (0 ... *); say @x[42] | 07:55 | |
p6eval | rakudo c71489: OUTPUT«42» | ||
pmichaud | rakudo: my (@x) = 0..*; # curious | ||
p6eval | rakudo c71489: OUTPUT«(timeout)» | ||
pmichaud | ah, that should probably succeed. | ||
jnthn checks his lazy slide | |||
rakudo: my @fib = 1, 1, *+* ... Inf; say @fib[10]; | 07:56 | ||
pmichaud | I can fix this last case, I suspect. | ||
sorear | Wait wait *what* | ||
p6eval | rakudo c71489: OUTPUT«89» | ||
sorear | How can it possibly succeed and WHY | ||
jnthn | pmichaud: ...so how come that one works? | ||
moritz_ | phenny, tell [Coke] about irclog.perlgeek.de/perl6/2010-09-14#i_2822295 | ||
phenny | moritz_: I'll pass that on when [Coke] is around. | ||
07:57
bacek left
|
|||
jnthn | pmichaud: And can I rely on it doing so? | 07:57 | |
rakudo: my @fib := 1, 1, *+* ... Inf; say @fib[10]; | |||
p6eval | rakudo c71489: ( no output ) | ||
sorear | What should I do with List!fill after niecza starts implementing private methods correctly? | ||
jnthn | And yet that doesn't? Hmm | ||
pmichaud | jnthn: precedence | ||
rakudo still has := as item | |||
jnthn | oh | ||
pmichaud | (I can fix that as soon as I get a stable parrot) | ||
tylercurtis | iirc, the spec says somewhere that list assignment is only mostly eager. It eagerly evaluates anything that's already there, but is lazy about the rest. | 07:58 | |
pmichaud | I'm not sure why the assignment version worked. | ||
jnthn | rakudo: my @fib := (1, 1, *+* ... Inf); say @fib[10]; | ||
tylercurtis didn't think that was the case in Rakudo, though. | |||
p6eval | rakudo c71489: OUTPUT«89» | ||
jnthn | pmichaud: Should it twiddle my example to use binding? | ||
pmichaud | I'd have to see how series got implemented to know why that's working. | ||
jnthn | *I | ||
pmichaud | jnthn: no, I wouldn't expect that. | ||
sorear | tylercurtis: as someone who has hacked on lazy evaluators in the past, I assure you that the spec's notion of "mostly eager" is completely insane | ||
pmichaud | oh, sorry | 07:59 | |
jnthn: yes, you should make your example using binding for now.... the handling of infinite series isn't well spec'd yet. | |||
tylercurtis | sorear: good to know. | ||
jnthn | Twiddled, thanks. | ||
pmichaud | infinite ranges we can handle: | 08:00 | |
rakudo: my @a = 1..*; say @a[10]; | |||
p6eval | rakudo c71489: OUTPUT«11» | ||
08:00
kjeldahl_ joined
|
|||
pmichaud | infinite series... not so much yet. | 08:00 | |
sorear | pmichaud: Why does that make any sense at all? | ||
tylercurtis | rakudo: my @fib = lazy 1, 1, *+* ... *; say @fib[10]; # wonders... | ||
p6eval | rakudo c71489: OUTPUT«Could not find sub &lazy in main program body at line 22:/tmp/3DsI3LZDfp» | ||
pmichaud | sorear: "mostly eager" is allowed to stop evaluating if it knows that the thing it's working on is "infinite" | 08:01 | |
tylercurtis | I'm pretty sure that wouldn't be the right thing even if Rakudo did have &lazy. | ||
08:01
bacek joined
|
|||
pmichaud | so, since the range 1..* can easily determine it's infinite, eager evaluation is allowed to stop there | 08:01 | |
sorear | ah, it's a liberal approximation of finiteness | ||
pmichaud | we don't yet have a clean definition for what might make something like 1...* halt eager evaluation, or a gather/take loop | ||
sorear | that makes much more sense | 08:02 | |
pmichaud | TimToady++ and I have been discussing this here on-and-off over the past couple of weeks | ||
(and yes, there are some spec changes afoot) | |||
sorear | hmm. Why does Parcel!STORE have a cont_rpa: case? | 08:03 | |
Are people supposed to put rpas in Parcels? | |||
pmichaud | in Rakudo, Parcel isa RPA | ||
i.e., Rakudo treats any RPA it encounters like a Parcel | 08:04 | ||
that handles nested parcels on the lhs, iirc | |||
e.g., as in (@foo[3,4,5], $x) = ... | |||
08:05
kjeldahl_ left
|
|||
tylercurtis can't actually understand how exactly "my @foo = 1..*" isn't "my @foo; @foo[0] = 1..*;". | 08:05 | ||
moritz_ | tylercurtis: list assignment is special-cased | ||
tylercurtis | moritz_: in what way? | 08:06 | |
moritz_ | tylercurtis: the right-hand side can be asked if it is a flattening list, as opposed to a single item | ||
pmichaud | I think it's somewhat more accurate to say that item assignment is special-cased :-) | ||
moritz_ | so it can differentiate between (1, 2, 3) and [1, 2, 3] | ||
pmichaud: both are true, I think :-) | 08:07 | ||
sorear | &infix:<=> checks the "list" alloflag on the LHS | ||
tylercurtis | moritz_: Ah. Okay. Is that specced? Or implementation strategy of Rakudo? Or implementation strategy of Rakudo that should become spec? | 08:08 | |
pmichaud | anyway, sleep time here. | ||
jnthn | sleep well | ||
tylercurtis | G'night, pmichaud. | ||
colomon | moritz_: if every case is special, isn't that the same as no cases being special? ;) | ||
o/ | |||
pmichaud | tylercurtis: it's spec'd that item assignment imposes item context on its rhs, and list assignment imposes flattening list on its rhs | 08:09 | |
moritz_ | tylercurtis: not quite sure. pmichaud++ got a grant for writing up much of the rakudo list/iterator implementation into the spec... don't know if that part is covered | ||
colomon: if you look at the code, certainly not :-) | |||
tylercurtis | rakudo: say [1, 2, 3].flat.perl; | ||
p6eval | rakudo c71489: OUTPUT«[1, 2, 3]» | ||
tylercurtis | rakudo: say (1, 2, 3).flat.perl | ||
p6eval | rakudo c71489: OUTPUT«(1, 2, 3)» | ||
sorear | tylercurtis: a lot of the list stuff is specced mostly in tests. | ||
pmichaud | colomon: if every case is special, no case is general :) | ||
moritz_ | tylercurtis: beware of .perl, it is allowed to assume item context | 08:10 | |
08:10
PacoLinux left
|
|||
tylercurtis | rakudo: .say for [1, 2, 3].flat; | 08:10 | |
pmichaud | note that my @a = [1,2,3] is like my @a = flat [1,2,3] and not my @a = [1,2,3].flat | ||
p6eval | rakudo c71489: OUTPUT«123» | ||
sorear | Rakudo and niecza implement alloflags completely differently, but I doubt either one will become spec | ||
tylercurtis | .say for flat [1, 2, 3] | ||
rakudo: .say for flat [1, 2, 3] | |||
p6eval | rakudo c71489: OUTPUT«1 2 3» | ||
tylercurtis | rakudo: .say for flat (1, 2, 3) | 08:11 | |
p6eval | rakudo c71489: OUTPUT«123» | ||
tylercurtis somehow managed to forget about flat context. | |||
Anyway, good night again, #perl6. Except, this time, I'm actually going to bed. | 08:12 | ||
pmichaud | me too. | ||
08:13
tylercurtis left
|
|||
moritz_ | slepp well, the both of you | 08:13 | |
08:16
PacoLinux joined
08:18
Guest68652 is now known as kaare_
|
|||
sorear | rakudo: my ($foo, $, $bar) = (1,2,3); say $foo, $bar; | 08:19 | |
p6eval | rakudo c71489: OUTPUT«13» | ||
sorear | rakudo: say (my ($foo, $, $bar)).perl | ||
p6eval | rakudo c71489: OUTPUT«(Any, Whatever.new(), Any)» | ||
moritz_ | rakudo: my ($foo, $, $bar) = (1,2,3); say callframe().my.keys.perl | ||
p6eval | rakudo c71489: OUTPUT«("\$foo", "\$bar", "\$MAIN", "\$/", "\$_", "__CANDIDATE_LIST__", "\$!")» | ||
dalek | ecza: f52ccae | sorear++ | src/Niecza/Actions.pm: Parse my ($foo, $bar) |
08:28 | |
ecza: aa2541a | sorear++ | src/Niecza/Actions.pm: Parse / < a e i o u > / |
|||
moritz_ | std: / ; / | 08:29 | |
p6eval | std 32123: OUTPUT«===SORRY!===Semicolon must be quoted at /tmp/P74KBkau6c line 1:------> / ;⏏ /Parse failedFAILED 00:01 115m» | ||
08:30
timbunce joined
|
|||
sorear out | 08:33 | ||
08:34
dakkar joined
08:35
wamba joined
08:38
LaVolta left,
jferrero joined
|
|||
masak | rakudo: say callframe().my<__CANDIDATE_LIST__>.perl | 08:39 | |
p6eval | rakudo c71489: OUTPUT«Any» | ||
masak | aww | ||
moritz_ | rakudo: say callframe().my<__CANDIDATE_LIST__>.perl; multi f() { } | ||
p6eval | rakudo c71489: OUTPUT«Any» | ||
moritz_ | rakudo: say callframe().my<__CANDIDATE_LIST__>.PARROT; multi f() { } | 08:40 | |
p6eval | rakudo c71489: OUTPUT«Perl6Scalar->» | ||
08:41
aesop left
|
|||
jnthn | :P | 08:42 | |
Nice try to get a NPMCA :P | |||
moritz_ | rakudo: say callframe().my<__CANDIDATE_LIST__>.Int | 08:43 | |
p6eval | rakudo c71489: OUTPUT«Method 'Int' not found for invocant of class '' in main program body at line 22:/tmp/kn3uswfED1» | ||
moritz_ | jnthn: I was more trying to find out what kind of data it holds | ||
jnthn | It's used in methods for deferal, and in wrapping | ||
08:44
aesop joined
|
|||
jnthn afk for a bit | 08:45 | ||
08:55
snarkyboojum_ is now known as snarkyboojum
09:08
bacek left,
aloha left,
jferrero left
09:09
Raynes left
09:12
Raynes joined
09:20
QinGW joined
09:21
QinGW1 joined
09:22
QinGW2 left
09:24
jferrero joined,
QinGW left
09:27
jferrero left
10:01
jferrero joined
10:07
Mowah joined,
QinGW1 left
10:12
bbkr joined
10:15
araujo left
|
|||
moritz_ | rakudo: say [+] '08:12:23'.split(':') Z* 3600, 60, 1 | 10:24 | |
p6eval | rakudo c71489: OUTPUT«29543» | ||
10:33
snearch left
|
|||
moritz_ | \o/ ASCII art camelia | 10:35 | |
10:36
snearch joined
10:42
goksie joined
10:49
thundergnat left
11:00
tadzik joined
|
|||
tadzik | hello | 11:01 | |
jnthn | o/ | 11:02 | |
11:03
goksie_ joined,
goksie left,
goksie_ is now known as goksie
11:29
snearch left
11:45
masonkramer joined
|
|||
takadonet | morning all | 12:04 | |
masak | \o | 12:05 | |
rakudo: say [+] '08:12:23'.split(':') Z* 60 >>**<< reverse ^3 | 12:06 | ||
p6eval | rakudo c71489: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 179:CORE.setting in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
masak | rakudo: say [+] '08:12:23'.split(':') Z* (60 >>**<< reverse ^3) | 12:07 | |
p6eval | rakudo c71489: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 179:CORE.setting in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
flussence | ^2? | ||
moritz_ | 60 xx 3 | ||
masak | oh | ||
rakudo: say [+] '08:12:23'.split(':') Z* (60 <<**<< reverse ^3) | |||
moritz_ | rakudo: say [+] '08:12:23'.split(':') Z* (60 xx 3 >>**<< reverse ^3) | ||
p6eval | rakudo c71489: OUTPUT«29543» | ||
rakudo c71489: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 179:CORE.setting in 'hyper' at line 211:CORE.setting in main program body at line 1» | |||
moritz_ | rakudo: say [+] '08:12:23'.split(':') Z* ((60 xx 3) >>**<< reverse ^3) | 12:08 | |
p6eval | rakudo c71489: OUTPUT«29543» | ||
masak | rakudo: say [+] '08:12:23'.split(':') Z* 60 <<**<< reverse ^3 | ||
p6eval | rakudo c71489: OUTPUT«29543» | ||
masak | that's very pretty. | ||
moritz_ | say [+] '08:12:23'.split(':') Z* (60 X* reverse ^3) | ||
rakudo: say [+] '08:12:23'.split(':') Z* (60 X* reverse ^3) | 12:09 | ||
p6eval | rakudo c71489: OUTPUT«1680» | ||
masak | rakudo: say [+] '08:12:23'.words Z* 60 X** reverse ^3 | ||
p6eval | rakudo c71489: OUTPUT«28800» | ||
moritz_ | rakudo: say [+] '08:12:23'.split(':') Z* (60 X** reverse ^3) | ||
p6eval | rakudo c71489: OUTPUT«29543» | ||
masak | rakudo: say [+] '08:12:23'.split(':') Z* 60 X** reverse ^3 | ||
12:09
vdrab joined
|
|||
p6eval | rakudo c71489: OUTPUT«29543» | 12:09 | |
moritz_ | std: say [+] '08:12:23'.split(':') Z* 60 X** reverse ^3 | 12:10 | |
p6eval | std 32123: OUTPUT«===SORRY!==="Z*" and "X**" are non-associative and require parens at /tmp/HSg2ATv58K line 1:------> say [+] '08:12:23'.split(':') Z* 60 X** ⏏reverse ^3Check failedFAILED 00:01 117m» | ||
masak submits rakudobug | |||
moritz_ | that's what I thought | ||
12:10
Raynes left
12:12
Raynes joined
12:26
vdrab_ joined
12:27
araujo joined,
plainhao joined,
vdrab left
12:28
vdrab_ is now known as vdrab
12:30
plainhao left,
plainhao joined
12:31
satyavvd left
|
|||
masak | wow, #haskell is unsurpassed in giving me adequate help and unwittingly making me feel stupid at the same time. :) | 12:31 | |
in other news, every monad is an applicative functor. | 12:32 | ||
moritz_ | what is an applicative functor? | 12:33 | |
masak | I don't know yet, but en.wikibooks.org/wiki/Haskell/Appli...e_Functors | ||
12:34
ab5tract joined
|
|||
moritz_ | functors seem to be higher-order functions that apply other functions to data | 12:35 | |
like, map | |||
masak | aye, that sounds familiar. | ||
how does that make all monads applicative functors, though? | 12:36 | ||
flussence | rakudo: sub x { ($^a - $^a % 60) / 60, $^a % 60 }; say x(29543)>>.&x[0,1,3]>>.fmt('%02d').join(':'); # not as nice in the other direction... | ||
p6eval | rakudo c71489: OUTPUT«08:12:23» | ||
masak | flussence++ | 12:37 | |
flussence | :D | ||
masak | someone should write a script that generates one algorithm from the other? | ||
s/\?// | |||
moritz_ | rakudo: say ~((29543, * div 60 ... 0) X% 60) | 12:39 | |
p6eval | rakudo c71489: OUTPUT«23 12 8 0» | ||
masak | ooh | 12:40 | |
moritz_ | rakudo: say ((29543, * div 60 ... 0) X% 60).reverse[1..3]>>.fmt('%02d').join(':') | ||
p6eval | rakudo c71489: OUTPUT«08:12:23» | ||
flussence | div is integer division operator? | 12:42 | |
moritz_ | rakudo: say ((29543, * div 60 ... 0) X% 60)[^3].reverse>>.fmt('%02d').join(':') | ||
zes | |||
p6eval | rakudo c71489: OUTPUT«08:12:23» | ||
moritz_ | yes | ||
masak | weel, yes and no. | ||
moritz_ confused by frequent keyboard layout switch | |||
masak | div is "type-depdendent" division. | ||
moritz_ | is it? | ||
rakudo: say 5 div 2.5 | |||
p6eval | rakudo c71489: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are::(Int $a, Int $b) in main program body at line 22:/tmp/44qiWAasro» | 12:43 | |
masak | which happens to be defined only for Int so far, I think. | ||
moritz_ | mebbe | ||
masak | but for example, equation system solving by dividing a column vector into a matrix could be 'div'. | ||
12:43
am0c^ joined
|
|||
masak | provided some library defined it as such, of course. | 12:44 | |
moritz_ curses at some paper authors who provided conflicting and ambiguous imformation in their paper | 12:45 | ||
12:48
plobsing joined,
vdrab_ joined
12:49
perigrin left
12:50
vdrab left,
vdrab_ is now known as vdrab
|
|||
araujo | good morning | 12:50 | |
12:50
BinGOs left
|
|||
araujo next to add 'if' to his small lang | 12:50 | ||
moritz_ | #perl6 seems to attract lots of people who implement their own languages (or inspires them) :-) | 12:51 | |
araujo | moritz_, perl6 seems a nice language to steal ideas from too | 12:53 | |
araujo hopes TimToady doesn't read this | |||
moritz_ | araujo: I consider it a good sign if people steal from Perl 6. I kinda guess TimToady thinks likewise :-) | 12:55 | |
araujo | >:] | 12:56 | |
12:58
Sec joined
|
|||
masak .oO( It's 2010, and I'm using Perl 6 to write my own blog engine to last me 10 years. I just love living in the future. ) | 12:59 | ||
gfldex | Perl 6: Going to make you rewrite your software since 2010! | 13:02 | |
13:02
Sec is now known as [Sec]
|
|||
moritz_ | masak: do you have a more detailed plan than "a blog system"? if yes, would you share it? | 13:03 | |
araujo | masak, heh | 13:04 | |
masak | absolutely. (1) download all my use.perl posts. (2) transform them into markdown (3) build a minimal static web site generator that transforms Markdown to HTML and puts css etc in the right places. (4) keep hacking on the static web site generator until it's a port of Hakyll. | ||
I'm on (3) now. | |||
doing (2) was an absolut Perl 5 quick-hack joy. it turned unbearable HTML into nice Markdown. and the markdown script has been confirmed to turn the Markdown back into nice HTML :) | 13:06 | ||
moritz_ | so, are you writing a parser now? | ||
masak | no, I'm using the standard Perl 5 implementation. | 13:07 | |
right now I want to get to step (4) as quickly as possible. | |||
so I'm taking shortcuts. | |||
13:07
BinGOs joined
|
|||
masak | will probably end up writing a Markdown parser as part of step (4), though. feels nicer to have an all-Perl 6 solution. | 13:07 | |
and it would be nice to see how Perl 6 parses Markdown. | 13:08 | ||
tadzik | masak: you may want to try sexpcode :0 | ||
:) | |||
I have a basic parser for that | |||
masak | tadzik: I'm pretty sure I prefer to write my posts in Markdown. | ||
but I'm very open towards pooling markup formats into a Pandoc-like project. | 13:09 | ||
tadzik | well, markdown is more like a document-formatting | ||
masak | something that uses a common document model and can convert to and from different formats. | ||
moritz_ should Pod6! Pod6! | |||
masak | that, too. | ||
moritz_ | s/should/shouts/ | ||
baest | ahh markdown, that's why some readme on github has the extension .md :) | 13:11 | |
masak | lots of sites use Markdown nowadays. | ||
it's one of the least insane formats I've ever seen. very few actual quirks. | |||
rakudo: say $*PID | 13:12 | ||
p6eval | rakudo c71489: OUTPUT«12413» | ||
masak | alpha: say $*PID | ||
p6eval | alpha 30e0ed: OUTPUT«Contextual $*PID not found» | ||
masak | on my box 'say $*PID' prints 0 :/ | ||
can anyone else on Darwin confirm this? | |||
moritz_ | that's a surprisingly low PID? | 13:13 | |
masak | too low for my taste... | ||
florz | actually, that's a non-PID ;-) | ||
Juerd | masak: Kill it! :) | ||
masak | 哈哈 | ||
colomon | masak: confirmed | ||
moritz_ | wasn't there some funny behaviour if call kill(0)? | ||
baest | masak: confirmed | ||
masak submits rakudobug | |||
colomon, baest: thanks. you guys rock. | 13:14 | ||
Juerd | moritz_: Yea, it Just Works :) | ||
moritz_ | If pid equals 0, then sig is sent to every process in the process group | ||
of the calling process. | |||
group kill! | |||
13:14
hugme joined,
kaare_ left,
ChanServ sets mode: +v hugme
|
|||
masak | sounds like something a religious sect would do... | 13:14 | |
13:15
Italian_Plumber joined
|
|||
moritz_ wonders if hugme needs a GROUP HUG feature :-) | 13:15 | ||
13:15
jferrero left
|
|||
szbalint | it should have been called the koolaid parameter. | 13:15 | |
masak | Italian_Plumber: every time I see you log in I get this sudden urge to jump on mushrooms and turtles. | ||
13:16
Patterner left
|
|||
masak | ooh! #phasers later tonight! | 13:17 | |
moritz_ | set #phasers to stun! | ||
masak | what about a #cpan6-sketch this week? | ||
Alias_: ping | |||
Italian_Plumber | and save princesses? | 13:18 | |
masak | except she's never in the castle I think she is :/ | 13:19 | |
ETOOMANYDAMNCASTLES | |||
Italian_Plumber | You should never save the princess: www.youtube.com/watch?v=gLZFexXiJsM | 13:20 | |
moritz_ has saved one princess, and is happy now | |||
or maybe she saved me? not sure yet :-) | 13:21 | ||
masak | preferably, a little bit of both :) | 13:22 | |
Italian_Plumber: I watched half of it before realizing I'm at work. :) seems he accidentally saved the wrong princess, though. | 13:23 | ||
moritz_ | probably :-) | ||
masak | impressive what effort must've been put into that video. :) | ||
13:24
Kodi joined,
patspam joined
|
|||
Kodi | my %s is Set = a => 1, b => 2; # This should be allowed, right? | 13:24 | |
Er, I mean something like: my %s is Set = a => True, b => True; | 13:25 | ||
The question is if you then do: %s = c => True. Would that violate immutability? | |||
moritz_ | why should it? | 13:26 | |
hrm, because Set... container types shouldn't be immutable | |||
Kodi | moritz_: I'm inclined to think you should be able to do '%s = c => True' but not '%s<c> = True'. I'm not sure that makes sense, though. | 13:27 | |
moritz_ | Kodi: it kinda makes sense from an implementation point of view. It does not from a user's point of view | 13:28 | |
13:28
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
Kodi | In the same way that if $x holds a Date, you can assign anything you like to $x even though Dates are immutable. Then again, $x itself is never a Date but actually a Scalar, which is mutable. | 13:28 | |
moritz_: It actually turns out to be difficult to implement this way. | |||
What do you think would make sense from the user's point of view? | |||
moritz_ | a mutable version of the type | 13:29 | |
Kodi | moritz_: I.e., KeySet? | ||
moritz_ | Kodi: I'm not too familiar with this zoo of types... but kinda like a Set, only in mutable | 13:30 | |
or not using it as a container type | |||
Kodi | KeySet is supposed to be exactly a mutable Set. | ||
moritz_ | then "yes" | 13:31 | |
Kodi | So do you think S02 is in the wrong when it says you ought to be able to bind %x to a Set? | ||
Or is it that binding would be permissible and assingment not? | 13:32 | ||
moritz_ | no; I think it's perfectly fine, but not what the user typically wants | ||
Kodi | I guess I'm still confused about what kinds of assignment to a '%s is Set' should be allowed. Now I'm thinking: no kind at all; if you wanted assignment you should've used a KeySet. | 13:36 | |
moritz_ | that's probably correct | ||
13:38
satyavvd joined
13:40
BinGOs left
13:41
satyavvd_ joined
13:42
perigrin joined,
sftp joined
13:43
BinGOs joined
|
|||
[Sec] | Is there anything like POE for perl6 already? | 13:43 | |
13:43
satyavvd left,
satyavvd_ is now known as satyavvd
|
|||
tadzik | I don't think so | 13:43 | |
masak | there's just S17. | ||
perlcabal.org/syn/S17.html | |||
moritz_ | TimToady mentioned that event queues could be expressed with feed operators and object pipes somehow - haven't quite understood it though :-) | 13:44 | |
[Sec] | masak: is S17 already working in rakudo-star? :) | 13:48 | |
masak | [Sec]: no. | ||
moritz_ | parrot segfaults if enable threads and clone the interpreter. | 13:49 | |
masak | moritz_: you mentioned object pipes in your interview. what's that? | ||
moritz_ | masak: it's what feed operators use under the hood | ||
[Sec] | ok, thanks. Back to p5 then it is. | ||
masak | oh, so it's in the Monad/Powershell sense, then. | 13:50 | |
moritz_ | right | ||
masak | [Sec]: you're welcome back later, when we've hacked a bit more :) | ||
(or earlier, if you want to help) | |||
[Sec] | i really would like to use it, hope you get more of the spec working soon :) | 13:51 | |
masak | welcome to the club :) | ||
right now we're on the lookout for people who can take what we implement of the spec already, test it to its limits, and give us feedback :) | 13:52 | ||
that way, both the spec and the implementation will improve faster. | |||
*implementations | |||
takadonet | trying to parse a file with 12000 records with my perl 6 grammar..... been 35 mins and still not done yet | 13:53 | |
but it has not crashed yet! | |||
masak | takadonet: you should have a status indicator of some kind :) | ||
takadonet | masak: i should.... all well | 13:54 | |
gottreu | masak, how would those for whom you're on the lookout get involved? | 13:55 | |
or get started I should say perhaps? | |||
takadonet | masak: Do you know a better way of grabbing everything till you see a particular record separator then : <-["//\n"]>+ ? | 13:56 | |
13:56
rgrau_ joined
|
|||
moritz_ | \n doens't work yet in regexes | 13:56 | |
takadonet | .... same to work for me... | 13:57 | |
13:57
Guest23195 joined
13:58
daxim left
|
|||
moritz_ | rakudo: say ?("\n" ~~ /<[\n]>/) | 13:58 | |
p6eval | rakudo c71489: OUTPUT«0» | ||
masak | gottreu: that's a very good question. speaking from experience, I would recommend being driven by curiosity and playfulness. :) | ||
moritz_ | sorry, meant in character classes, not regexes in general | ||
rakudo: say ?("\\" ~~ /<[\n]>/) | |||
p6eval | rakudo c71489: OUTPUT«0» | 13:59 | |
masak | gottreu: if the question is more "where to start?", I have a number of projects that could use a helping hand. | ||
moritz_ | rakudo: say ?("n" ~~ /<[\n]>/) | ||
p6eval | rakudo c71489: OUTPUT«1» | ||
13:59
uniejo left
|
|||
gottreu | masak, such as? | 14:00 | |
masak | gottreu: well, I have a project called 'pun' which could use a bit of reviving. | ||
it's good because it's very limited in scope, and should be simple to get working again. | 14:01 | ||
moritz_ | YOU_ARE_HERE! | ||
14:01
daxim joined
|
|||
masak | the basic idea is to emulate 'perl6 -n' and 'perl6 -p', which don't exist yet. | 14:01 | |
the old version of that project was written before perl6 was installed globally. | |||
so it should actually be *easier* nowadays. | |||
basically, it throws a 'while ($_ = $*IN.get).defined { ... }' block around the provided program. | 14:02 | ||
gottreu: with me so far? | |||
moritz_ | right; relying on a `perl6' executable in $PATH is a good idea nowadays | ||
masak | aye. | ||
moritz_ | and shouldn't it be for lines() { ... } nowadays? | 14:03 | |
gottreu | i'm with you on -p and -n flags, not so with you on Perl6 syntax | ||
masak | gottreu: github.com/masak/pun | ||
14:03
agentzh left
|
|||
masak | gottreu: but you know how -p and -n work in Perl 5? | 14:03 | |
because that's all you need. Perl 6 syntax can be learnt along the way. :) | |||
gottreu | yeah, perl5 one-liners are the majority of my perl programs | 14:04 | |
masak | then you can see the use for something like pun. | ||
14:05
meraxes joined
|
|||
masak | moritz_: YOU_ARE_HERE would be the proper way to do it in Rakudo itself. just provide alternate settings, and you're done. I wouldn't know where to begin making such a thing work, though. | 14:10 | |
tadzik | what is YOU_ARE_HERE by the way? | 14:14 | |
masak | it's a special term that's magically substituted for the user's program. | ||
one finds it at the end of the normal setting, which means that the program runs in the scope of all the goodies in the setting. | 14:15 | ||
the idea is to eventually implement -n and -p with YOU_ARE_HERE insside a readline loop. | |||
er, not readline; $*IN.get | |||
14:19
wtw_ left
|
|||
moritz_ | right; the idea is that -n desugars to for lines() { YOU_ARE_HERE } | 14:26 | |
what I don't know is how to achieve that with a command line switch | |||
masak | feels to me like that goes into the PCT/nqp-rx level of things. | 14:27 | |
which I suspect is part of why it hasn't been implemented long ago. | |||
moritz_ | there are really many reasons: | 14:28 | |
tadzik | there's some nice set of things in /usr/lib/parrot/2.7.0/library/, can they be used in Perl 6 easily, like Perl 5 modules via blizkost? | 14:29 | |
moritz_ | 1) command line parsing is done in a way that's completely opaque to me, somewhere in NQP or PCT or HLL/foo or wherever | ||
2) YOU_ARE_HERE is pretty new too | |||
3) it looks like not quite a small project | |||
14:30
satyavvd left
|
|||
moritz_ | tadzik: they can be used, but usually require a wrapper | 14:30 | |
TimToady | phenny, say something nice to me. | 14:31 | |
phenny | TimToady: 07:46Z <tylercurtis> tell TimToady STD's statement_control:if is lovely. Thank you for that. It was a pleasure to write an action method for. | ||
TimToady | thank you | ||
tadzik | like Digest::MD5 does? | ||
moritz_ | exactly | ||
tadzik | tempting | ||
moritz_ | indeed | ||
tadzik | especially TAP::Harness | 14:32 | |
14:40
Trashlord left
14:44
Trashlord joined
14:49
plobsing left
14:55
vdrab left
|
|||
masak | here's a tweet that is making the rounds today: twitter.com/vdichev/status/24467980734 | 14:59 | |
15:00
ruoso joined
15:03
mberends left
15:05
Kodi left
15:06
icwiener joined
15:13
rgrau_ left
15:14
daemon left
15:17
mberends joined
15:22
risou joined
15:31
araujo left
|
|||
pmichaud | good morning, #perl6 | 15:36 | |
moritz_ | good am, pm | 15:37 | |
15:38
cjk101010 left
|
|||
colomon | \o | 15:38 | |
15:39
xiaolongxia joined
|
|||
masak | gm, pm | 15:40 | |
15:40
wolverian left
|
|||
zby | rakudo: require Foo::Bar | 15:41 | |
p6eval | rakudo c71489: OUTPUT«Can not find sub Foo::Bar in main program body at line 1» | 15:42 | |
pmichaud | require nyi, I think. | ||
moritz_ | and even it were, require now requries an explicit import list | ||
zby | aha - I wanted to check if it is | ||
in the current rakudo | |||
moritz_ | since importing is done into the lexical scope, and that is immutable at runtime | ||
so you'd need to say something like require Foo::Bar <sub $variable>; | 15:43 | ||
which then creates stubs in the lexpad at compile time, and does the actual loading and importing at runtime | |||
zby | rakudo: require Foo::Bar <sub $variable>; | 15:44 | |
p6eval | rakudo c71489: OUTPUT«Can not find sub Foo::Bar in main program body at line 1» | ||
moritz_ | I worked on require but couldn't the argument list to parse | ||
15:44
wolverian joined
|
|||
zby | OK - I just wanted to check if it is implemented now, I am waiting for it before I try to rewrite my mini web framework in P6 :) | 15:45 | |
masak | std: "foo" . "bar" | 15:47 | |
p6eval | std 32123: OUTPUT«===SORRY!===Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/yOgpb6uQjc line 1:------> "foo" . ⏏"bar"Parse failedFAILED 00:01 115m» | ||
masak | rakudo: "foo" . "bar" | ||
p6eval | rakudo c71489: OUTPUT«===SORRY!===Confused at line 22, near "\"foo\" . \"b"» | ||
masak submits LTA rakudobug | 15:48 | ||
zby: does your mini web framework generate static web pages? | |||
zby | no | ||
moritz_ | std: require Foo::Bar 'a', 'b'; | 15:49 | |
p6eval | std 32123: OUTPUT«===SORRY!===Two terms in a row at /tmp/yMY3j__FDO line 1:------> require Foo::Bar ⏏'a', 'b'; expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:02 117m» | ||
masak | then you might want to consider waiting for that reason too. memory/speed/stability issues aren't completely ironed out yet. | ||
moritz_ | std: require Foo::Bar <a b>; | ||
p6eval | std 32123: OUTPUT«===SORRY!===Bogus term at /tmp/m_WG2lcMBj line 1:------> require Foo::Bar <a b>⏏;Undeclared routine: 'b' used at line 1Parse failedFAILED 00:01 117m» | ||
moritz_ | wtf? | 15:50 | |
zby | well - I know it would not be 'production ready' for a long time, but it seems like the first thing to do in P6 | ||
I mean like a nice first thing to do | |||
moritz_ | evalbot rebuild is not yet switched to git :( | 15:51 | |
and rebuilding STD conflicts with the installed STD for niecza and mildew | 15:54 | ||
15:54
zb left
|
|||
masak | zby: I'm building a static page generator as we speak. it's going almost unreasonably well. :) | 15:55 | |
zby | nice - so I guess you have your templating engine done | 15:56 | |
is there a plan for PSGI implementation? | 15:58 | ||
moritz_ | yes; mberends is working on one | 15:59 | |
zby | These are the two prerequisites for my framework, without templating it still can work though, and without PSGI I think I can make it work on bare HTTP::Simple or something | ||
masak | zby: I'm piggybacking a Perl 5 Markdown->HTML converter right now. | 16:00 | |
zby: and for templating I'm using simple variable substitution right now. | |||
moritz_ | there is a working HTML::Template in the web repository | 16:01 | |
masak | zby: there's Hitomi though, which I still think could be really nice. | ||
16:01
zb joined
|
|||
masak | I hope as few people as possible use the HTML::Template module :) | 16:01 | |
moritz_ | why? | ||
masak | because we developed it as a stop-gap solution for November, with the view that it should be replaced by something better eventually. | 16:02 | |
and because I'm personally not sold on the syntax. | |||
moritz_ likes HTML::Template::Compiled for p5 | 16:03 | ||
which is like HTML::Template, but enables more concise syntax, and solves the Unicode issues that H::T has | |||
tinita++ # for HTML::Template::Compiled | |||
zby | what I don't like about HTML::Template is that you need to convert your data into structures that it can swallow | 16:04 | |
moritz_ | what else would you use a controller for? :-) | ||
zby | with TT you just need to prepare the data in any form, you just need it to be complete | 16:05 | |
moritz_ | but that's often not what happens in practise | ||
what people often do is to pass some DBIC objects to the templates | |||
which means that method calls in the template trigger database actions | |||
which goes completely against MVC, and makes proper error handling pretty hard | 16:06 | ||
16:06
araujo joined
|
|||
zby | maybe - but thats their problem | 16:07 | |
moritz_ | well, that's easy to say | ||
zby | I like the fact that I can just provide the data and forget | ||
I don't need to think how it will be used | 16:08 | ||
how it will be iterated in the template | |||
moritz_ | when I tried to produce some websites with Catalyst and TT, I had to walk through all the objects anyway to avoid DB calls from the template | ||
so I could have just as well transformed them into what HTML::Template needs | 16:09 | ||
16:09
ab5tract left
|
|||
zby | maybe I just have not yet been bitten by this - so I use it because it is more convenient | 16:12 | |
16:14
risou left
|
|||
moritz_ | sprixel: say 1 + 2 | 16:15 | |
p6eval | sprixel 32123: OUTPUT«Can't open perl script "sprixel.pl": No such file or directory» | ||
moritz_ | highlight: 3 | ||
p6eval | Please use /msg p6eval 3 | ||
16:16
Holy_Cow joined
16:17
ab5tract joined
16:23
ggoebel joined
16:24
risou joined
|
|||
dalek | albot: 3841f5c | moritz++ | evalbot.pl: update paths, and avoid relative paths |
16:24 | |
ggoebel | phenny: tell sorear where does eval and running the spectest fall in your roadmap for niecza? | 16:25 | |
phenny | ggoebel: yeah, sure, whatever | ||
tadzik | moritz_: why star 2010.07, not 08>? | ||
ggoebel | phenny: tell phenny to be nice :-) | ||
phenny | Hey, I'm not as stupid as Monty you know! | ||
16:26
ggoebel left
|
|||
diakopter | moritz_++ cruft-- | 16:31 | |
(likely dangerous to run on the vps) cruft, I mean :) | 16:32 | ||
though I guess no more dangerous than... never mind. | 16:33 | ||
dalek | kudo: 51e3ff4 | pmichaud++ | src/Perl6/Grammar.pm: Switch infix:<:=> to use list assignment, resolving RT #77462. |
16:35 | |
16:35
standz joined
16:37
svetlins joined,
patspam left
16:38
svetlins left
16:42
M_o_C joined
16:48
cdarroch joined
16:49
cdarroch left,
cdarroch joined,
M_o_C left
|
|||
masak | I wish to call attention to this problem: | 16:49 | |
rakudo: my $a = 42; say "$a</closetag>" | |||
16:49
M_o_C joined
|
|||
p6eval | rakudo c71489: OUTPUT«postcircumfix:<{ }> not defined for type Int() in main program body at line 1» | 16:49 | |
masak | I don't have a proposed solution. it's just annoying. | ||
pmichaud | rakudo: my $a = 42; say "{$a}</closetag>"; | 16:54 | |
diakopter | rakudo: my $a = 42; say "$a\</closetag>" | ||
heh | |||
p6eval | rakudo 51e3ff: OUTPUT«42</closetag>» | ||
rakudo 51e3ff: OUTPUT«postcircumfix:<{ }> not defined for type Int() in main program body at line 1» | |||
diakopter | (mine made the same error) | ||
(which is confusing to me, fwiw) | |||
pmichaud | \ is unspaces | 16:55 | |
tadzik | wklej.org/id/388892/ -- what does he want? | ||
pmichaud | *unspace | ||
diakopter | hm, even in "" I guess | ||
pmichaud | well, when parsing a postfix, yes. | ||
tadzik | it works when I change '(' to ';', why? | ||
pmichaud | tadzik: having a token called 'list' is likely causing the difficulty. | 16:56 | |
tadzik | duh | 16:57 | |
diakopter | also, try changing some of those to rule instead of token? | ||
masak | diakopter: right, unspace. the fact that that fairly obvious fix doesn't work is extra frustrating... | ||
pmichaud | don't need 'rule', since the spaces are being explicitly accounted for. | ||
tadzik | now I changed list to leest, and I get Method '!cursor_names' not found for invocant of class 'List' | 16:58 | |
pmichaud | did you change <list> also? | ||
tadzik | bah, not all of them | ||
diakopter | well, the case of \s between '(' and expr is not accounted for, as well as \s between expr and ')' | 16:59 | |
tadzik | yeah, it's ok now. So, token called list is forbidden intentionally? | ||
pmichaud | since there's already a built-in method 'list' that is used for other things, declaring a token named 'list' ends up overriding it. | ||
tadzik | I see | ||
it's just a class, with just methods | 17:00 | ||
17:00
dakkar left
|
|||
diakopter | tadzik: see my msg above about \s | 17:01 | |
tadzik | diakopter: yeah, I'm considering it | 17:02 | |
17:04
makkksimal joined
17:05
thebird left
17:08
Chillance joined
17:09
daxim left
|
|||
makkksimal | hi. my anyone point me to some documentatio on how to dynamically create classes in perl6? | 17:10 | |
diakopter | eval "" ? | ||
masak | makkksimal: eventually you might be able to do that with just metaclass manipulations. I don't know how possible that is today. | 17:12 | |
makkksimal: the best place to investigate that would be the Rakudo source, since that's how Rakudo does it. | |||
diakopter | masak: oh yeah, anon classes | ||
and then givem a name | 17:13 | ||
moritz_ | rakudo: my $meta_class = 1.HOW; say $meta_class.new_class('Foo').WHAT | ||
p6eval | rakudo 51e3ff: OUTPUT«Foo()» | ||
masak | that's a good idea. | ||
didn't think of that. | |||
diakopter | oh, new_class ? | ||
masak | makkksimal: what diakopter and moritz_ said. | ||
diakopter | what's new_class | ||
is that spec | |||
moritz_ | rakudo: my $meta_class = 1.HOW; my $c = $meta_class.new_class('Foo'); $c.add_method('bla', method { say "in method bla" }); $c.finalize; $c.new.bla | 17:14 | |
p6eval | rakudo 51e3ff: OUTPUT«Method 'add_method' not found for invocant of class '' in main program body at line 22:/tmp/2lkEGXtbB9» | ||
moritz_ | rakudo: my $meta_class = 1.HOW; my $c = $meta_class.new_class('Foo'); $c.^add_method('bla', method { say "in method bla" }); $c.^finalize; $c.new.bla | ||
17:14
justatheory joined
|
|||
p6eval | rakudo 51e3ff: OUTPUT«Method 'finalize' not found for invocant of class 'ClassHOW' in main program body at line 22:/tmp/f4rSppue96» | 17:14 | |
moritz_ | rakudo: my $meta_class = 1.HOW; my $c = $meta_class.new_class('Foo'); $c.^add_method('bla', method { say "in method bla" }); $c.^compose; $c.new.bla | 17:15 | |
p6eval | rakudo 51e3ff: OUTPUT«in method bla» | ||
diakopter | nice. | ||
moritz_ | that's a demonstration of programmatically generating a class, adding a method and calling that method | ||
makkksimal | thanks moritz_ that will help | ||
17:16
justatheory left
17:17
justatheory joined
17:19
hercynium joined
17:24
makkksimal left
|
|||
thepler | is there a method/op on Hash that is similar to Moose::Autobox::Hash->hslice ? | 17:24 | |
that is: "give me a new Hash with a subset of the pairs" ? | 17:25 | ||
moritz_ | (@keys Z=> %hash{@keys}).hash | ||
17:26
makkksimal joined
|
|||
moritz_ | maybe %hash{@keys}:kv also works at some poing | 17:27 | |
*point | |||
thepler | moritz_: cool. I thought of %new = %hash.pairs.grep({ .key eq [|] @keys }) | ||
17:31
makkksimal left
|
|||
thepler was trying to think of a better name than hsilce | 17:31 | ||
masak | rakudo: my %h = c => 3, a => 1, b => 2; .say for %h{sort keys %h} | 17:45 | |
p6eval | rakudo 51e3ff: OUTPUT«123» | ||
masak | \o/ | ||
17:54
goksie left
|
|||
masak | are state variables disallowed outside of a block, or simply equivalent to ordinary lexicals? | 18:00 | |
18:02
makkksimal joined
|
|||
tadzik | rakudo: say "+" ~~ /\w/ # what? | 18:04 | |
p6eval | rakudo 51e3ff: OUTPUT«» | ||
masak | + is not a \w | ||
tadzik | is there a class with \w and symbols like +? | ||
masak | quite possibly. | 18:05 | |
could you be more specific? :) | |||
tadzik | hmm | ||
chars, digits and symbols? | |||
masak | gee, symbols. | ||
diakopter | like, non-whitespace? :) | 18:06 | |
masak | <[ \w + \- * / ]>, perhaps. | ||
tadzik | :F whatever :) | ||
masak | tadzik: look, are you asking the question or not? :) | ||
tadzik | diakopter: more or less, but I'll probably end up with non-whitespace-non-parens | ||
masak | tadzik: if you are, please describe what you mean by chars *and* symbols. | 18:07 | |
18:07
icwiener_ joined,
icwiener left
|
|||
gottreu | wouldn't \S be non-whitespace, or do inverted (or negated?) classes not count? | 18:09 | |
masak | \S would be full of symbols, indeed. | 18:10 | |
including all of \w | |||
hercynium | quick rakudo/ubuntu question: what package(s) should I install to get opengl support? | ||
masak | rakudo: sub foo(Pair @a) {}; foo([]) | 18:11 | |
p6eval | rakudo 51e3ff: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional[Pair] but got Array instead in 'foo' at line 22:/tmp/yR3anIvx_B in main program body at line 22:/tmp/yR3anIvx_B» | ||
hercynium | this is more out of curiosity than to be used :) | ||
gottreu | wouldn't it be full of non-glyphs too? | ||
masak | o.O | ||
masak submits rakudobug | |||
rakudo: say Array ~~ Positional | |||
p6eval | rakudo 51e3ff: OUTPUT«1» | ||
masak | oh, it's the typed array thing. | 18:12 | |
look, can't we make an exception for literal arrays? | |||
I think it would help. | |||
rakudo: sub foo(Pair @a) {}; foo([1 => 2]) | |||
p6eval | rakudo 51e3ff: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional[Pair] but got Array instead in 'foo' at line 22:/tmp/7AyNsFjbKq in main program body at line 22:/tmp/7AyNsFjbKq» | ||
masak | this really looks like it should work... | ||
ingy | /[\s\S]/ is the portable /./s | 18:14 | |
O | |||
HAI! | |||
masak | ingy: yes, but there's absolutely no need for that idiom in Perl 6 :) | ||
ingy | where are all the acemists? | 18:15 | |
hercynium waves to ingy "HAI" | |||
I am an aspiring acmeist, which perhaps, in a meta-sort-of-way... makes me one? | 18:16 | ||
ingy | :D | ||
ingy buggers off to finish a python port | |||
18:24
AndreasX joined
|
|||
hercynium | OK, answered my earlier question: libglut3-dev | 18:30 | |
I'm giving a demo of rakudo * to Boston.PM tonight and I want to have an answer for all the options people may ask about :) | 18:31 | ||
masak | hercynium++ | 18:33 | |
hercynium: you'll get another karma point if you make an OpenGL demo using Rakudo :) | |||
hercynium | well, I will probably yoink some code, just to run it and make people go "ooooooo" | 18:34 | |
18:34
AndreasX left
|
|||
tadzik | after running it with Rakudo, it'd rather be o.. o.. o.. o.. o.. o.... | 18:34 | |
hercynium | but my focus will be on using the repl to show different ways of doing things | ||
tadzik++ | |||
tadzik | bah, writing a lisp compiler is harder than I expected | 18:35 | |
sorear | good * #perl6 | ||
phenny | sorear: 16:25Z <ggoebel> tell sorear where does eval and running the spectest fall in your roadmap for niecza? | ||
tadzik | s/lisp/stupid lispalike/ | ||
18:39
rindolf joined
|
|||
rindolf | Hi all. | 18:39 | |
sorear | phenny: tell ggoebel Nowhere yet | 18:40 | |
phenny | sorear: I'll pass that on when ggoebel is around. | ||
masak | greetings, rindolf. | ||
rindolf | masak: what's up? | ||
masak | rindolf: I'm happy because I'm making a blog engine in Perl 6. :) | ||
rindolf | masak: ah. | ||
masak | rindolf: what's up yourself? | ||
rindolf | masak: I've started to work on a Catalyst-based blog engine. | 18:41 | |
But I've neglected it. | |||
But it's not dead yet. | |||
masak: I've built an .src.rpm of lp_solve-5.5.2.0 for Mandriva. | |||
Now I'd like to put it on the build-system. | |||
masak | ok. | ||
hercynium | also curious: JIT - does it work? I noticed it's not enabled in Configure.pl's output | 18:42 | |
rindolf | I needed it because I'd like to write a solver for www.brainbashers.com/kakurasu.asp | ||
masak | ah. | 18:43 | |
heh. the static page generator sounds cute when it accesses the hard drive. from the sound of it, it makes two blog posts a second. | 18:50 | ||
#phasers in 10? | |||
tadzik | . o O ( trk trk... trk trk... trk trk... trk trk...) | 18:52 | |
masak | yes, like that. | 18:53 | |
rakudo: say "abcde.fgh.ijkl".subst(/ \. .+? $ /, "") | |||
p6eval | rakudo 51e3ff: OUTPUT«abcde» | ||
masak | :( | ||
masak submits rakudobug | |||
oh wait. that's just me being silly. | 18:54 | ||
un-submit. | |||
rakudo: say "abcde.fgh.ijkl".subst(/ \. <-[.]>+ $ /, "") | |||
p6eval | rakudo 51e3ff: OUTPUT«abcde.fgh» | ||
masak | man, does real world code bring out bugs. in Rakudo, and in masak's brain :) | ||
colomon | real world code++ | 18:55 | |
masak | buubot: karma code | ||
buubot | masak: code has karma of -3 | ||
colomon | (busy working on ABC.pm while waiting for a $work download....) | ||
masak | code++ | ||
colomon | #phasers in T-2 min ? | 18:58 | |
19:00
hercynium left
|
|||
masak | now now now | 19:00 | |
be there or be ❏ | 19:01 | ||
19:04
Italian_Plumber left
|
|||
colomon | square and shadowed? | 19:05 | |
masak | right. square AND shadowed. | ||
PerlJam | yes, covert operatives will follow you everywhere. | ||
19:07
tomaw left
|
|||
colomon | rakudo: my $m = "hello world" ~~ /^ .*?[.o.*?] $/; say $m.perl | 19:10 | |
p6eval | rakudo 51e3ff: OUTPUT«Match.new( from => 0, orig => "hello world", to => 11,)» | ||
colomon | ack | 19:11 | |
is it expected that we now need to use @( ) around arrays in a match variable? | |||
19:12
tomaw joined,
icwiener_ left,
ant joined,
makkksimal left
|
|||
ant | ah nuts | 19:12 | |
19:12
ant left,
makkksimal joined
|
|||
moritz_ | colomon: yes | 19:13 | |
mberends | Does tools/test_summary.pl run ok with everyone? All recent checkouts have been complaining that fudge is being called incorrectly (its Usage message appears) | ||
moritz_ | mberends: that means that some test files are missing | ||
pmichaud | I haven't tried tools/test_summary.pl in quite a while | 19:14 | |
19:14
flussence left
|
|||
moritz_ | mberends: is your t/spec/ a git repo? have you run Configure.pl recently? | 19:14 | |
19:14
flussence joined
|
|||
flussence | (I need to rtfm for irssi some time...) | 19:14 | |
mberends | moritz_: yes, just updated a few minutes ago. | ||
moritz_ | mberends: did you rm -rf t/spec/ at some point to allow it to become a git repo? | 19:15 | |
if not, it still tracks the dead pugs svn | |||
colomon | moritz_: is that spec behavior, or a rakudo limitation? | ||
moritz_ | colomon: spec | 19:16 | |
19:16
timbunce left
|
|||
mberends | moritz_: no. thanks for the tip, will re-check everything out :) | 19:16 | |
moritz_ | colomon: otherwise there would be no difference in iterating over the result from (.)**2 and (.)(.) | 19:17 | |
colomon | moritz_++ | ||
19:19
aCiD2 joined
|
|||
aCiD2 | Hey, something returned from MiniDBI is coming back as a Str, but it's from a SERIAL column (so I'd expect an Int back). | 19:19 | |
I'm guessing I'll have to do the cast myself for now, doing +$id gives me a Num though, not an Int | 19:20 | ||
moritz_ | aCiD2: then call the .Int method | ||
rakudo: say "123".Int.What | |||
rakudo: say "123".Int.WHAT | |||
p6eval | rakudo 51e3ff: OUTPUT«Method 'What' not found for invocant of class 'Int' in main program body at line 22:/tmp/92I7GOY0VD» | ||
rakudo 51e3ff: OUTPUT«Int()» | |||
moritz_ | aCiD2: it's a known (and long-standing) bug in Rakudo that numification isn't smart enough | ||
aCiD2 | Ah | ||
19:21
plainhao left
|
|||
colomon | moritz_: not so, that's fixed | 19:21 | |
rakudo: say (+"123").WHAT | |||
p6eval | rakudo 51e3ff: OUTPUT«Num()» | ||
colomon | p6eval way way behind again? | 19:22 | |
wait, wrong bug. | |||
19:23
timbunce joined
|
|||
colomon | sorry, I'm getting confused. | 19:23 | |
p6eval is up to date. | |||
I think +"123" being an Int is on the list of things to be fixed shortly, rather than things just fixed. | |||
rakudo: my @a = 1...3 ; say (+@a).WHAT | 19:24 | ||
p6eval | rakudo 51e3ff: OUTPUT«Int()» | ||
19:24
tomaw left
|
|||
colomon | that's the one that was just fixed. | 19:24 | |
aCiD2 | pastie.org/1158938 does anyone know why the second method call fails (with new-from-row in), but the first works? | 19:25 | |
I'll just get the exact error, but it complains about not received an Assosciative | |||
minal type check failed for parameter '%row'; expected Associative but got MusicBrainz::Entity::Country instead. am I calling it wrong, it seems like the class is being sent where %row should be | 19:26 | ||
19:27
wamba left
19:28
tomaw joined
|
|||
dalek | albot: d43d0a4 | moritz++ | evalbot.pl: more git migration |
19:37 | |
pmichaud | (pastie.org) 503 Service unavailable | 19:38 | |
afk, kid pickup | |||
19:39
p6eval left
19:40
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
moritz_ | rakudo: say "now from git" | 19:40 | |
p6eval | rakudo 51e3ff: OUTPUT«now from git» | ||
masak tries to read the enums spec and the enums spectest at the same time | 19:41 | ||
19:42
alester left
|
|||
dalek | albot: 0526c90 | moritz++ | / (4 files): config file updates |
19:43 | |
19:44
rindolf left,
rindolf joined
|
|||
tadzik | could note be a string method, just like say is? | 19:48 | |
It'd be nice to be able to write @foo.perl.note just like @foo.perl.say | |||
masak | +1 | 19:49 | |
dalek | albot: f488637 | moritz++ | / (3 files): add some more rebuild scripts |
||
masak | tadzik: make a patch, and I will guerilla-apply it. then we'll spec it :) | ||
tadzik | I can write it if everyone likes | ||
PerlJam | tadzik: ask forgiveness rather than permission :) | ||
tadzik | yay, fun! | ||
19:49
yoasif joined
|
|||
tadzik | also I has a working toylisp compiler :) | 19:50 | |
PerlJam | tadzik: (that's a +1 from me, in case it wasn't clear) | ||
masak | more like a meta-+1 | ||
19:51
Sanitoeter joined
20:01
thundergnat joined
|
|||
tadzik | masak: what shall I do with the patch? | 20:02 | |
masak | tadzik: nopaste it, and I'll review it. | ||
ab5tract | ok, so i have an idea for a project, and i think perl6 might be an ideal means of executing it | 20:03 | |
Tene | ab5tract: Oh? What's the idea? | 20:04 | |
ab5tract | are there any existing examples in perl6 for a 'pre-format' parser (a la Markdown)? | ||
a mutable translation layer | |||
tadzik | masak: wklej.org/id/389050/ | ||
masak looks | |||
ab5tract | in other words, a pre-format that can have its rules completely rewritten: its syntax, keywords, and effects of translation are all defined at runtime via config files | 20:05 | |
tadzik | ab5tract: well, I'd say it's just a matter of fanciness of the parser | 20:06 | |
oh, runtime-runtime. But still, yes | |||
20:07
M_o_C left
|
|||
Tene | Existing examples? Not sure. | 20:07 | |
Completely feasible, though. | 20:08 | ||
Depends on how mutable you want the grammar to be. | |||
PerlJam | for some reason I immediatly think of pmwiki :) | 20:09 | |
tadzik | hrm | ||
Perl 6 grammar might be an example | |||
masak | I still think making a script that can reverse a Perl 6 one-liner would be a neat trick. :) it would really help to have easy access to the parse tree, though. | 20:10 | |
someone please make a Perl 6 module that turns a Perl 6 program string into a parse tree! | |||
tadzik | --target=PAST? :) | ||
20:10
lichtkind joined
|
|||
masak | hm. | 20:11 | |
maybe one can work with that, yes. | |||
tadzik | like -MO=Deparse I think | ||
lichtkind | soryy to biother is any planetsix people here? | ||
thundergnat | Hello perl6, | ||
lichtkind | hai thundergnat | ||
tadzik | lichtkind: ywis | ||
hello thundergnat | |||
lichtkind | tadzik: you are? | ||
tadzik | lichtkind: I think so | ||
I mean, my blag is there | 20:12 | ||
lichtkind | no i mean the admin of that site | ||
tadzik | ah | ||
thundergnat | I've been exploring around some of the less explicitly defined areas of the spec and have found a bunch of oddities | ||
lichtkind | my old blog was there too | ||
but since use.perl died i need to get a reset to my new blog | |||
thundergnat | std: my $x; $x &&= 1; say $x; | ||
p6eval | std : OUTPUT«ok 00:01 118m» | ||
thundergnat | rakudo: my $x; $x &&= 1; say $x; | ||
p6eval | rakudo 51e3ff: OUTPUT«No applicable candidates found to dispatch to for 'infix:<&&>'. Available candidates are::(Mu $a, Mu $b) in main program body at line 1» | ||
dalek | kudo: 04ce047 | masak++ | src/core/Mu.pm: [core/Mu] added .note method Contributed by tadzik++ |
20:13 | |
masak submits rakudobug | |||
thundergnat++ | |||
thundergnat | std: my $x; $x ^^= 1; say $x; | ||
p6eval | std : OUTPUT«ok 00:01 118m» | ||
masak | thundergnat: however, that's a runtime error. in general STD won't dig up those. | ||
thundergnat | rakudo: my $x; $x ^^= 1; say $x; | ||
p6eval | rakudo 51e3ff: OUTPUT«Null PMC access in invoke() in main program body at line 1» | ||
masak | whoa there! | ||
lichtkind | sorear: can i get a short chat? | ||
masak submits rakudobug | |||
thundergnat | I 've got a bunch | 20:14 | |
masak | keep going. | ||
thundergnat | rakudo: $x; $x ?&= 1; | ||
p6eval | rakudo 51e3ff: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/iaFRw_ZZj2:22)» | ||
thundergnat | oops | ||
rakudo: my $x; $x ?&= 1; say $x; | |||
p6eval | rakudo 51e3ff: OUTPUT«No applicable candidates found to dispatch to for 'infix:<?&>'. Available candidates are::(Any $a, Any $b) in main program body at line 1» | ||
masak | that one goes into the first one. | 20:15 | |
thundergnat | rakudo: my $x; $x ?|= 1; say $x; | ||
p6eval | rakudo 51e3ff: OUTPUT«No applicable candidates found to dispatch to for 'infix:<?|>'. Available candidates are::(Any $a, Any $b) in main program body at line 1» | ||
masak | and that one too. | ||
thundergnat | rakudo: my $x; $x ?^= 1; say $x; | ||
p6eval | rakudo 51e3ff: OUTPUT«No applicable candidates found to dispatch to for 'infix:<?^>'. Available candidates are::(Any $a, Any $b) in main program body at line 1» | ||
thundergnat | again | ||
masak | aye. | ||
only the Null PMC access is separate so far. | |||
thundergnat | rakudo: my ($x, $y); $x = 5; $x min= $y; say $x; | 20:16 | |
this is ok | |||
p6eval | rakudo 51e3ff: OUTPUT«5» | ||
masak | aye. | ||
thundergnat | but different from: | ||
rakudo: my ($x, $y); $x = 5; $x max= $y; say $x; | |||
p6eval | rakudo 51e3ff: OUTPUT«Any()» | ||
masak submits rakudobug | |||
thundergnat++ | |||
gottreu | [[:graph:]] Any printable character, excluding a space. | ||
thundergnat | spec say undef evaluates to -Inf | ||
masak | aye. | ||
thundergnat | Any interest in a test file for assignment metaops? That's how I found all these. | 20:17 | |
There isn't one in roast. | |||
pmichaud | rakudo: my ($x, $y); $x = 5; say $x max $y; | ||
p6eval | rakudo 51e3ff: OUTPUT«Any()» | ||
pmichaud | rakudo: my ($x, $y); $x = 5; say $x min $y; | ||
p6eval | rakudo 51e3ff: OUTPUT«5» | 20:18 | |
masak | thundergnat: sure, can't hurt. | ||
thundergnat | It will need to be cleaned up a bit. I've got some cruft in there. | ||
metaops.assignment.t gist.github.com/579693 | 20:19 | ||
20:20
hans__ joined
|
|||
thundergnat | it also tests for the short circuiting //=, ||= and &&= | 20:20 | |
all of which fail :-( | 20:21 | ||
(they don't short circuit) | |||
masak | ISTR that's a known deficiency. | 20:22 | |
I think it has something to do with the way metaop babby are formed. | |||
20:22
risou left
|
|||
thundergnat | I may have made some incorrect assumptions/interpretations of STD but I _think_ these are all reasonable test. | 20:23 | |
s | |||
ab5tract | Tene: pretty mutable :) | ||
masak | thundergnat: seems so to me. | 20:24 | |
pmichaud | We're going to need to do a bit of rethinking and refactoring to properly handle short-circuit ops and chained ops. | ||
ab5tract | ive never written a parser before, but perl6 seems like a good fit for it from what i understand of the grammars | ||
pmichaud | and we may need some additional support from the language spec | ||
masak | ab5tract: definitely. | ||
dalek | kudo: f5e67ec | masak++ | src/core/IO.pm: Revert "Refactor slurp($filename) to use Parrot's .readall($filename);" This reverts commit 77a72a31234229635f720f853d59b865342df17a, since trac.parrot.org/parrot/ticket/1749 is now fixed. |
20:25 | |
ab5tract | its not totaly related, but i think someone needs to submit a perl6 solution for this project: www.codequarterly.com/code-challenges/markup/ | ||
not the least because it would provide me a nice example to start working from ;) | |||
20:26
tadzik1 joined
|
|||
ab5tract | masak, any "best examples" of p6 grammar utilization that you might point me too? | 20:26 | |
colomon | thundergnat: looks like a lot of that stuff is already tested? for instance, acking on **= shows tests in S03-operators/assign.t, S03-operators/autovivification.t, and S06-operator-overloading/workout.t | ||
20:26
tadzik left
|
|||
colomon | ab5tract: agreed! | 20:27 | |
masak | ab5tract: probably the book. | ||
colomon | ab5tract: I've been keeping that stuff open in a Chrome window on my laptop since I first saw it appear. | ||
masak | ab5tract: there's a chapter on parsin JSON in there. | ||
ab5tract | colomon, you mean the code quarterly thing? | ||
colomon | ab5tract: yes. | ||
Tene | ab5tract: perl6advent.wordpress.com/2009/12/2...d-actions/ isn't a bad place to start, and I think that the example there has been imported into the book | ||
colomon | thundergnat: though you seem to be a lot more systematic! | 20:28 | |
masak | ab5tract: github.com/perl6/book/blob/master/s...ammars.pod | ||
ab5tract | masak, oh yes, i remember that now. a json parser in half a page of code or so | ||
colomon | ab5tract: it feels like a perfect challenge for p6 | ||
masak | aye :) | ||
thundergnat | colomon: probably some overlap. I was just including all assigment metaops for my own edification | ||
tadzik1 | Tene: it hasn't been yet | ||
tadzik1 ashamed | |||
20:28
tadzik1 is now known as tadzik
|
|||
thundergnat | I may have missed a few, but I think I got most allowed by spec. | 20:29 | |
masak | thundergnat: thanks for the reports. it's all filed away in RT now. | ||
thundergnat | The spec is a little vague and hand-wavey about the whole assignment metaop thing. :-) IMO | 20:30 | |
masak | I'm sure suggestions for clarifications are welcome. | 20:31 | |
thundergnat: do you have a commit bit? | |||
thundergnat | no | ||
masak | someone give thundergnat commit bit to perl6? | 20:32 | |
masak doesn't know how | |||
thundergnat | I'm kind of a git newbie... | ||
masak | who isn't? :P | ||
thundergnat | newbie git? hur hur | ||
20:33
shortcircuit left,
drake1 joined
|
|||
masak | thundergnat: allow me to heartily recommend www.newartisans.com/2008/04/git-fro...om-up.html | 20:33 | |
thundergnat: I've read it something like three times. | |||
following along and doing the examples on the command line helped me a lot. | |||
thundergnat | masak: thanks, I'll take a look at it. | ||
20:34
bacek joined
|
|||
wolverian | what's my best bet for parsing xml with rakudo* at the moment? | 20:34 | |
drake1 | hello, I just wrote a new stdio for super IPC www.gangsterfreak.com/file:stdio_test . Maybe perl6 can use it in the new I/O system | ||
wolverian | (the file is small, so speed is no concern, but I would prefer correctness over hacks. :) | ||
ab5tract | Tene, masak thanks for the pointers | ||
Tene | wolverian: probably use a perl 5 library. I don't know of any native Perl 6 support for XML yet. | ||
wolverian | Tene: I haven't used perl 5 libraries from rakudo yet. how do I do that? | 20:35 | |
Tene | wolverian: I haven't kept up to date on that at all. I saw someone using GTK through Perl 5 earlier, though. | ||
tadzik | I'm afraid Perl 6 XML does not work, while Blizkost can't run anything from Perl 5 | ||
20:36
aloha joined
|
|||
tadzik | tjs.azalayah.net/ser.html -- XML seems not to be working | 20:36 | |
wolverian | blizkost is the perl5 bridge? but it does not work? :) | ||
tadzik | wolverian: it doesn't always work | ||
sadly :( | |||
wolverian | okay. | ||
Tene | a very simple XML parser would be pretty easy to hack out, and would work for many small documents. | 20:37 | |
masak | there have been several XML parsers written over the past few years. at least one sits in the ecosystem. | ||
Tene | but that's not what you want. | ||
tadzik | Maybe it's time to fix the existing one before * | ||
masak | people seem to love writing XML parsers with Perl 6 grammars :) | ||
wolverian | masak: I saw the one I assume tadzik linked to -- it doesn't build. | ||
masak | yes, it's probably bitrotted. | ||
tadzik | somebody was looking for a small project to help, no? | 20:38 | |
like pun | |||
20:39
rindolf left
20:40
rindolf joined
|
|||
masak | aye. | 20:42 | |
20:42
Ross joined
|
|||
masak | it was gottreu++ who asked. | 20:43 | |
20:45
hercynium joined,
whiteknight joined
20:47
Ross left
20:50
hans__ left
20:51
Ross joined
20:55
molaf joined
21:03
rindolf left
|
|||
drake1 | well, it's the perfect capability to execute C objects when you don't want to try to keep up. Im off for now. bye | 21:03 | |
21:03
drake1 left
|
|||
gottreu | tadzik, possibly. | 21:04 | |
tadzik | gottreu: you may want to take a look at this XML parser. Even if you'll have to come here for help in half a cases, that'd still be huge help | 21:05 | |
masak decides he really likes "somefilename".&open(:w) | 21:08 | ||
very chic. very Ruby :) | |||
also, 'given "somefilename".&open(:w) { .say("this"); .say("that"); .close }' | 21:11 | ||
masak considers writing to PerlVogue :) | |||
gottreu | tadzik, to which XML parser does _this_ refer? | ||
tadzik | gottreu: the one on modules.perl6.org I guess | 21:12 | |
masak: been reading stackoverflow, didn't you? :P) | |||
masak | tadzik: no, why? :) | ||
did someone use that trick there? | |||
tadzik | yep :) | ||
masak | dang, I thought I was first... | ||
tadzik | and some people on reddit said "well, I must say I like the Perl example..." | 21:13 | |
gottreu | I bet smalltalk was firstier. | ||
masak | prolly. | ||
tadzik | masak: stackoverflow.com/questions/3538156...27#3539727 | 21:14 | |
masak | yes, clearly fishing for Ruby votes :) | 21:15 | |
gottreu | from that link "Perl actually makes me sad. No language ever needs a keyword 'given'. What next, 'beholdeth' or 'insomuchas'" What kind of person considers 'given' to be archaic or rarely used? | 21:16 | |
tadzik | exactly the kind of persons you shouldn't care about :) | 21:17 | |
I always say so to myself | |||
gottreu | no no! emotional investment will reap great rewards! | 21:18 | |
actually i think REXX have given/when | |||
flussence | given is like JS' let, but useful | 21:19 | |
(I think they've actually deprecated let now due to its uselessness) | 21:20 | ||
21:20
ruoso left
|
|||
flussence | (or was it "with"?) | 21:20 | |
oh, it was. | 21:21 | ||
masak | 'with', yes. | ||
flussence | let is something to do with iterating. | ||
masak | I've always liked 'given', so I don't care much if others dislike it. | ||
people will always be skeptical to things they haven't tasted before. | |||
tadzik | yeah | 21:22 | |
OH NOES WHY NOT JUST SWITCH-CASE | |||
masak | and there's actually a reason. | ||
flussence | "given" is grammatically loose enough to allow it to be used for more than one thing :) | 21:23 | |
sbp | I like how you "switched case" to ask that question | ||
masak | or many reasons, even. | ||
sbp++ # groan | |||
tadzik | "given something do something" sounds better than "switch something case something" | ||
sbp: nice pun :) | |||
PerlJam | But computers don't care how it sounds? Why should programmers? ;) | ||
masak | tadzik: yes -- A04 says that control structures are usually verb-y. except switch/case which is named after what it is, not what it does. | 21:24 | |
it's a bit like naming a looping construct 'loop'. oh wait. | 21:25 | ||
bad example :P | |||
tadzik | :) | ||
masak | it's like having constructs called 'for-loop' and 'goto-statement'. it looks a bit silly. | 21:26 | |
and it reads not-as-well. | |||
21:28
mantovan1 joined,
mantovani left
|
|||
PerlJam | yeah, I think "loop" should be renamed. It should definitely be called "iterate" instead. :) | 21:29 | |
21:31
Guest23195 left,
hercynium left
|
|||
Tene | do-stuff-many-times { ... } | 21:32 | |
masak | "loop" is alright. it's a verb too. I was just being silly. | ||
Tene | Speaking of naming conventions, there's always www.smbc-comics.com/index.php?db=co...1169#comic | 21:33 | |
masak | heh. | ||
21:35
timbunce left
21:36
z-b joined,
zb left,
cls_bsd left
21:37
cls_bsd joined
|
|||
flussence | I guess if someone doesn't like the current names, they can make their own control structures up anyway | 21:37 | |
rakudo: sub don't(&a) { return Mu }; don't { loop {} }; say 'alive' | 21:39 | ||
p6eval | rakudo f5e67e: OUTPUT«alive» | ||
masak | \o/ | 21:40 | |
21:41
timbunce joined
|
|||
diakopter | wow. they ain't kidding. firefox4 beats chrome7 greatly on mozilla's new benchmark "kraken" | 21:41 | |
sjohnson | hi dudes | 21:42 | |
masak | hi sjohnson | 21:44 | |
sjohnson | :] | ||
#perl6, the happiest place on earth | |||
araujo | :) | 21:46 | |
dalek | odel: 7e480bb | mberends++ | java/ (16 files): [java] add Runtime/Ops.java, add ThreadContext into all Representations |
||
21:47
Mowah left
|
|||
masak | sjohnson: well, "rakudo" *does* mean "paradise"... | 21:48 | |
I just pushed the enums patch. | 21:53 | ||
it's not perfect, but it gave a clean spectest run, and we can bicker over details later :) | |||
at least now it's in Rakudo. again. | |||
masak zzz | |||
21:53
vdrab joined
|
|||
sjohnson | see ya masak | 21:54 | |
masak | 'night | ||
21:54
masak left
|
|||
lichtkind | bye masak | 21:54 | |
tadzik | well, I'll go to | 21:55 | |
g'night | |||
21:55
tadzik left
21:56
thowe joined
|
|||
thowe | hello | 21:56 | |
lichtkind | hi thowe | ||
21:56
aCiD2 left
|
|||
thowe | I may not know where to look, but I am wondering if there is a PostgreSQL lib and a CGI lib yet for Perl6? I need to write the IPv6 version of a tool we use at work and I thought I might do it in Perl6 instead of RUby... | 21:57 | |
21:57
nadim left,
nadim joined
|
|||
dalek | kudo: 5ac20e0 | masak++ | src/glue/enum.pm: [src/glue/enum.pm] return the right things enum Foo <a b c>; Previously, requesting Foo yielded an EnumMap, whereas it now yields an object of some kind whose .enums method returns an EnumMap. Similarly, requesting b yielded an Int, whereas now it returns an object that responds to a number of methods, as per S12. |
21:57 | |
lichtkind | thowe: great but you know perl 6 compilers are still slow | ||
flussence | there's MiniDBD::Pg in Star | 21:58 | |
thowe | this doesn't need a lot of speed, and it will be around for a while. | ||
lichtkind | thowe: look for proto the current central ctation for perl 6 modules | ||
thowe | proto? | ||
OK.. | |||
here?? modules.perl6.org/ | 21:59 | ||
lichtkind | modules.perl6.org/ | ||
thowe | :) | ||
lichtkind | yes | ||
thowe | Cool. THis should be something simple for me to get some real practice in with... | 22:00 | |
I may have to port my ip class library, but bit shifting can't be that different than most languages, right? | |||
lichtkind | you mean take a value out of an array? | 22:01 | |
the p6 shift is not that different to the p5 shift | |||
only now also usable as method | 22:02 | ||
thowe | er no, I mean bitwise operators | ||
22:02
envi^home left
|
|||
lichtkind | ah | 22:02 | |
its +< and +> | |||
not << and >> anymore | |||
because its numeric context | 22:03 | ||
and + dtands for that context | |||
the rest is es expected | |||
thowe | Oh. Where are docs for those? | ||
lichtkind | we have synopses | ||
and the taplets i write | |||
all linked from perl6.org | |||
syn are the specs | 22:04 | ||
thowe | I should probably look through that PDF book some more... | ||
lichtkind | yes its really a book | ||
if you just want to look up ops and method names tablets are propably | |||
better | |||
but there is not much text | |||
if you really want to learn why book would be better now | 22:05 | ||
22:05
Ross left
|
|||
thowe | For some reason, even though it's different than my past experience, I really see Parrot and Perl6 being part of my future projects... I've waited months for the feeling to wear off and it hasn't yet. | 22:06 | |
lichtkind | :) | 22:07 | |
flussence | The bit operators are in perlcabal.org/syn/S03.html#Multipli...precedence if you want a quick overview | ||
lichtkind | someone who listens to intuiition :) | ||
thowe | It's actually a little weird. My thoughts keep coming back to it like an old girlfriend you never got to say goodbye to... Even thought I don't know this one very well. | ||
lichtkind | :) | 22:08 | |
thowe | OK, now I'm talking weird, but it sticks with me, so I will run with it. | ||
lichtkind | yor defineivly weird enough, welcome on board :) | ||
thowe | plus you guys are so nice... | ||
flussence | rakudo: my $a = 5; $a +<= 2; say $a; # wondering how many of these ops can be stuck together | ||
p6eval | rakudo f5e67e: OUTPUT«20» | ||
flussence | yay | ||
rakudo: my $a = <2 3 4>; $a>>.+<= 2; say $a; | 22:09 | ||
p6eval | rakudo f5e67e: OUTPUT«===SORRY!===Confused at line 22, near "$a>>.+<= 2"» | ||
flussence | didn't expect that one to work really | ||
rakudo: my $a = <2 3 4>; $a>>+<=>> 2; say $a; | 22:10 | ||
p6eval | rakudo f5e67e: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in <anon> at line 204:CORE.setting in 'hyper' at line 1 in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
flussence | hmm | ||
22:11
Holy_Cow left
|
|||
flussence | Oh, right | 22:11 | |
rakudo: my $a = <2 3 4>; $a<<+<=<< 2; say $a; | |||
p6eval | rakudo f5e67e: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in <anon> at line 204:CORE.setting in 'hyper' at line 1 in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
22:12
rgrau_ joined
|
|||
flussence | rakudo: my @a = <2 3 4>; say ~(@a >>+<>> 2); # blech | 22:14 | |
p6eval | rakudo f5e67e: OUTPUT«8 12 16» | ||
22:15
araujo left
|
|||
flussence | rakudo: my @array = (3,8,2,9,3,8); @array >>+=>> 42; say ~@array; | 22:17 | |
p6eval | rakudo f5e67e: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in <anon> at line 204:CORE.setting in 'hyper' at line 1 in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
flussence | that's straight from S03... | ||
22:20
patspam joined,
vdrab_ joined
22:21
awwaiid joined
22:22
vdrab left
22:24
vdrab_ left
22:25
vdrab joined,
ab5tract left
22:32
azert0x left,
timbunce left
22:41
Italian_Plumber joined
22:43
lamstyle left
22:50
dju left
|
|||
dalek | odel: 06ef074 | mberends++ | java/runtime/ (3 files): [java] add Metamodel/Representations/P6list |
22:50 | |
22:51
awwaiid left
23:00
dju joined
23:03
dju left
23:04
dju joined
23:05
alksentrs joined
23:06
awwaiid joined
23:10
plobsing joined
23:36
jferrero joined
23:38
thundergnat left,
hercynium joined
23:44
meppl left
23:45
masonkramer left,
masonkramer joined
|
|||
jnthn had a lovely evening in Oslo with Unix/Perl folks. :-) | 23:45 | ||
mberends | nice :) | 23:48 | |
pmichaud | I'm about to do the same, but in Allen, TX. | 23:49 | |
bbl | |||
23:50
supernovus joined
|
|||
jnthn | pmichaud: enjoy | 23:52 | |
jnthn got Mousaka, beer and apple-y liquuer stuff tonight too :-) | 23:53 | ||
23:56
literal left,
s1n_mini joined
|
|||
hercynium | so, we're beginning our demo of Rakudo * here @ Boston.pm! | 23:57 | |
thowe has to go home | |||
23:57
thowe left
|
|||
jnthn | hercynium: :-) | 23:58 | |
hercynium: Hav fun | |||
jnthn gets some sleep - didn't get much last night :-) | |||
o/ | |||
23:58
literal joined
|
|||
hercynium | oh, BTW, does anybody know of any openGL code I can show off? | 23:59 | |
I thouhgt there was something on masak's journal but I can't find it right now |