svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by avar on 16 November 2006.
[particle] perlers aren't used to dimensions greater than one 00:00
TimToady having one level of auto-list-interpolation also fits in well with the notion that Perl likes interpolative solutions 00:01
people grok "Answer = $answer\n" a lot better than "Answer = " ~ $answer ~ "\n" 00:02
[particle] which is why we now have $?LINE etc 00:03
TimToady P6 is supposed to be more like Perl than P5. :) 00:04
(in the good ways...) 00:05
00:05 statico joined
[particle] p6 is definitely trending in the interpolative direction 00:06
putter re learning monads, one approach is to learn arrows first. they are a later generalization of monads, and at least to me, make far more sense. then one can work backward to understanding the more limited and twisted monads. ;)
www.cs.chalmers.se/~rjmh/afp-arrows.pdf www.haskell.org/arrows/ etc 00:07
00:11 [particle] joined
Ziggy6 pugs has a lexer? 00:13
found it, Lexer.hs :D 00:14
[particle] not many languages without lexers exist 00:15
written latin almost qualifies
putter Ziggy6: also Parser/* 00:16
[particle] GALLIAESTOMNISDIVISAINPARTESTRES
Ziggy6 i guess it's too hard to learn monads, parsec and to try to understand the complex pugs parser at the same time :)
allbery_b has monads and parsec down, but the lexer has defeated him 00:19
putter the parser can certainly be skimmed. one can get a feel for it's structure without yet knowing enough to write or modify bits... 00:20
allbery_b specifically, trying to fix "- f" being parsed as filetest operator "-f" without breaking everything else
00:21 bonesss joined
allbery_b couple of us tried to attack it last weekend, managed to break things in such a way that the test suite went into an infinite loop :/ 00:21
TimToady languages with mandatory endings tend to be self clocking 00:23
provided the endings can usually be disambiguated from the roots 00:24
kanji vs okurigana works that way too
allbery_b <-- learning Hebrew. suffixes and prefixes can *usually* be unambiguously removed from the roots... but not always 00:25
[particle] there are always irregular forms to gum up the works
allbery_b not to mention the incredible is-it-a-vowel-or-a-consonant-here? vav 00:27
putter [particle]: re "YOUONLYNEEDVOWELSORSPACESBUTNOTBOTH", "Y NLY ND VWLS R SPCS BT NT BTH". my fuzzy impression is ancient greek went back and forth a bit. 00:29
though the human reader may do an entirely separate pass at the first in order to "tokenize" it... 00:30
or read aloud and use language auditory word recognition 00:31
allbery_b took 'em a while to all agree to appropriate otherwise unused phoenician/aramaic letters for vowels :) it's not like the ancient Greeks were particularly unified
00:31 marcususesthis joined
luqui @pl \a -> (>>= b a) 00:33
lambdabot (=<<) . b
[particle] nope, plenty of city/states
allbery_b interesting that it parsed that, I think it's illegal (need parens around (>>=) to use it as a prefix op) 00:34
@pl \a -> b >>= a
lambdabot (b >>=)
allbery_b @pl \a -> (>>=) b a 00:35
lambdabot (b >>=)
allbery_b aha
@unpl (=<<) . b
lambdabot (\ d g -> g >>= (b d))
allbery_b ah, right 00:36
duh
luqui didn't know about unpl
allbery_b @. redo unpl (=<<) . b 00:41
lambdabot (\ d g -> do { a <- g; (b d) a})
luqui what's that? 00:49
expands even more?
(that's a great learning tool though) 00:50
allbery_b redo converts >>= form back to do form; . is composition (it's a haskell lambdabot, of *course* it does composition...) 01:00
01:00 lyokato joined
allbery_b sadly, only in prefix form 01:01
01:07 b00t joined
putter random musing (as I continue to try to picture how all the pieces we have could be variously assembled to get us nearer to xmas)... 01:13
pil2run is our best backend after pugs itself. its jsperl5 allows it to 01:14
use p5. a r5r (p5 regexs with <rules>) exists. the redsix p5 grammar is written in r5r. 01:15
err, that's "a r5r implementation exists for p5".
redsix was passing not quite 20% of tests, but the grammar was ripped/derived/kludged from the pugs one, so it should be not horribly incomplete. 01:17
01:18 miyagawa joined
putter though it has flaws, such as not integrating ast generation with parsing, so arity-based parse decisions don't work. 01:18
so anyway, one random thought is one might translate the redsix grammar and opp from ruby to p5, combine it with Regexp::Engine::Reentrant (or some such), and give jsper an alternate front end. one which, unlike pugs/pil1, could provide object info. 01:20
s/object info/class declarations./
pil2js already heavily uses p6 and oo. it just can't get oo info through the pugs/pil1 parser bottleneck. this way it could. 01:21
and p5 could be rewritten as p6, providing a bootstrap. much of what is currently js code could also be rewritten as p6. 01:22
01:32 bonesss joined 01:50 Mk150 joined 01:54 Mk150 is now known as L0v31n 01:57 marcususesthis joined 01:59 Ziggy6 left, Ziggy6 joined 02:13 theorbtwo joined 02:17 buetow joined
svnbot6 r15140 | putter++ | project_planning/TALK - added "redsix on PIL2JS". Feedback encouraged. 02:32
02:33 bonesss joined
Ziggy6 ?eval use v5; print "hello" 02:34
evalbot_r15139 1.0
02:35 mako132_ joined
putter Does anyone know approximately when pil2js stopped working? I'd like to svn back to then and run a pil2js smoke. tnx. 02:40
Else I'll just start walking back through the releases. 02:41
wolverian binary search is better than linear :) 02:42
putter unless one expects a small k :) 02:43
Ziggy6 hmm, strange, when i try the same thing in my pugs build, i get "Undefined subroutine &main:: called." 02:47
putter no, you're right. also essential is the implicit context that for this I don't really care just when it broke. since pil2js is rather stable (aka wedged waiting for pugs oo ast), any version pre breakage would be fine. releases tend to be less broken than random, so any release from last year should serve.
Ziggy6: me too. let's see... 02:49
allbery_b same here. r15101 fwiw 02:50
putter only two t/perl5/ smoke failures - modify_*
odd 02:51
Ziggy6 perl5 embedding is supposed to be fully functional? 02:52
putter for some value of "fully"
bbiab 02:53
allbery_b interesting. it's the use that triggers the error 02:58
luqui ?eval use v5; my %h = (a => 1); $h{a}
02:58 evalbot_r15139 is now known as evalbot_r15140
evalbot_r15140 1 02:58
luqui neat
02:58 dduncan joined
allbery_b wonders what's up that it works in evalbot 03:00
huh. the tests don't test for this case 03:02
03:06 scw joined
allbery_b pugs -e 'use v5;' fails, pugs -e '{use v5;}' fails, pugs -e 'sub foo ($x) {use v5;} foo(0)' succeeds 03:14
03:14 marcusus1sthis joined
allbery_b pugs -e 'eval "use v5;"' succeeds, likely explaining evalbot (and also the test suite) 03:17
03:25 nekokak joined, Tene joined
Ziggy6 should I add a test? 03:29
allbery_b probably a good idea 03:30
03:30 nipra joined
putter about to commit one... 03:33
actually, you know... 03:35
'use v5' simply isn't implemented. all the eval is doing is hiding that from us. and the bug is that pugs -e 'sub foo ($x) {use v5;} foo(0)' compiles. no? 03:38
./perl5/modify_* is what tests 'use v5', and that's failing. 03:39
so no new test needed. 03:40
allbery_b hm, yep, use v5 doesn't actually work 03:44
Ziggy6 well, then mp6 won't run on pugs 03:46
putter mp6? isn't the idea to try kp6? ie, use pugs instead of, or in addition to, mp6, in supporting kp6 development. 03:50
svnbot6 r15141 | putter++ | TALK - putter argues with himself about "redsix on PIL2JS". Other participants welcome.
Ziggy6 they have almost the same runtime 03:51
putter ah. try replacing "use v5; ..." with "eval('...,:lang<perl5>)"? 03:52
allbery_b actually, I did. 03:53
./pugs -e 'eval "my \@a = (1, 2); print \$a[0]", :lang<perl5>' # empty string output 03:54
I might be doing somethng else silly though
putter allbery_b: sorry, "try replacing" was regards kp6 :) 03:55
allbery_b fails with <> quotes too
ah
but I think this demonstrates that perl5 mode doesn't quite DTRT
putter looks like the last line of output disappears if it doesn't end in a newline. 04:03
?eval eval(q/print "a\nb\n";/,:lang<perl5>)
04:03 evalbot_r15140 is now known as evalbot_r15141
evalbot_r15141 1.0 04:03
allbery_b ah, yes, there it is 04:04
oh, and use v5; works in eval with that 04:05
so use v5 works, but something's wrong at the very beginning of a file (or -e). but beginning of an eval works. 04:06
putter really...?
Ziggy6 ?eval 1; use v5; print "test";
evalbot_r15141 OUTPUT[test] Bool::True
Ziggy6 nice
hmm 04:07
?eval 1; use v5; my %h = (a => 'b') print ${a};
evalbot_r15141 Error: ā¤Unexpected "print"ā¤expecting operator or ","
Ziggy6 ?eval 1; use v5; my %h = (a => 'b'); print $h{a};
allbery_b mress:10028 Z$ ./pugs -e 'eval <use 5; my @a = (1, 2); print $a[1], "\n">;'
2
evalbot_r15141 Error: No compatible subroutine found: "&a"
allbery_b (I presume that v6 does the v6 thing with sigils) 04:08
Ziggy6 ?eval 1; use v5; my %h = (a => 'b'); print $h{'a'};
evalbot_r15141 OUTPUT[] Bool::True
putter thinks 'use v5' is a noop for p6 (unintentional), and a noop for p5 (intentional).
allbery_b if I remove the "use 5" I get an empty string as output (v6 mode variable parsing) 04:09
it may ntot be fully implemented, maybe, but it's doing *something* 04:10
Ziggy6 ?eval use v5; my %h = (a => 'b'); print $h{'a'};
evalbot_r15141 1.0 04:11
Ziggy6 odd
putter (evalbot may have p5 embedding disabled for security...) 04:12
end of day for me 04:15
anyone: any feedback on redsix on pil2js proposal welcome.
&
04:26 b00t joined 05:03 justatheory joined 05:07 jamhed joined 05:14 Aankhen`` joined 05:24 miyagawa joined 05:40 stevan_ joined 05:48 miyagawa joined 06:15 BooK_ joined 06:33 jdv79 joined 06:40 marcususesthis joined 06:44 jdv79_ joined, GabrielVieira joined 06:53 leed joined 07:04 Southen joined
svnbot6 r15142 | szabgab++ | optionally generate index.html by smartlinks.pl 07:06
07:13 marmic joined 07:34 xinming joined 07:38 marcususesthis joined 07:44 bons joined, spo0nman joined 07:45 iblechbot joined 07:46 devogon joined 08:01 luqui left 08:21 Aankh|Clone joined 08:25 drrho joined 08:31 bons is now known as bons_away 09:21 andara joined 09:29 elmex joined 09:31 xinming joined 10:20 sri_ joined 10:22 ruoso joined, Aankh|Clone is now known as Aankhen`` 10:23 cmarcelo joined 10:24 Aankh|Clone joined 10:25 xinming joined 10:30 c6rbon_ joined 11:05 iblechbot joined, theorbtwo joined 11:07 kanru joined 11:14 dduncan left 11:18 devogon_ joined 11:42 meppl joined 12:11 explorer joined 12:16 chris2 joined 12:41 BooK joined 12:48 nipra joined 13:04 iblechbot joined 13:15 baest joined 13:23 baest joined 13:25 Odin- joined 13:39 Ziggy6 left 13:54 buetow joined, penk joined 14:09 stevan_ is now known as stevan, devogon joined 14:17 gour joined
ingy gour: it's been dead in here for some hours 14:18
gour ingy: well, i'll ask anyway ;)
ingy but it usually wakes up in bursts...
yeah
gour audreyt: are haskell bindings for yaml available somewhere? 14:19
[particle] wikipedia says yes 14:20
look for HsSyck iirc
gaal gour: svn.pugscode.org/pugs/third-party/HsSyck/ 14:23
lambdabot Title: Revision 15142: /third-party/HsSyck
gour thanks, i just got it
long live yaml ;) 14:24
[particle] death to yaml! long live syck!
gaal gour: you may also find this useful: svn.pugscode.org/pugs/src/DrIFT/YAML.hs 14:26
and an example usage -- binding Perl 6 to HsSyck -- at svn.pugscode.org/pugs/src/Pugs/Prim/Yaml.hs 14:27
gour is a bit confused with syck vs. yaml :-(
[particle] syck is an easier to parse subset of yaml 14:28
gour where is some syck spec available? 14:29
[particle] look at yaml.org 14:33
gour [particle]: i saw that and dl-ed yaml spec, but what is missing in syck? 14:36
[particle] actually, maybe it's not a subset anymore, based on the stuff i'm reading now 14:37
it is much faster
oh, here: whytheluckystiff.net/syck/ 14:38
lambdabot Title: ( Syck ): YAML for Ruby, Python, PHP and OCaml
[particle] look at the Progress Meter section
14:38 bonesss joined
gour [particle]: thanks a lot. this one is very helpful 14:39
14:54 gour left
gaal hmm? syck's a library that parses and emits yaml. 14:57
it's written in c and has bindings for lots of moose
14:58 vel joined
gaal you may have been thinking of JSON, [particle] 14:58
[particle] no, syck doesn't support all yaml
see the link i just posted -- however it's much more complete than the last time i looked 14:59
gaal yeah, but near enough
[particle] indeed
gaal it's not subset in the sense that it's a well defined intentional part of yaml
[particle] death to yaml! long live syck!
15:14 pdcawley joined 15:26 GabrielVieira2 joined 15:47 Ziggy6 joined 15:48 Ziggy6 left, Ziggy6 joined 16:05 L0v31n joined 16:08 TimToady joined 16:10 weinig is now known as weinig|away 16:18 buetow left 16:20 nipra joined 16:30 Limbic_Region joined 16:42 L0v31n joined 16:44 weinig|away is now known as weinig 16:47 nipra joined 16:52 VanilleBert joined 17:10 kanru joined 17:42 elmex joined 18:01 xinming_ joined
xinming_ misses audreyt. >_< Can anyone tell me if audreyt is busy with work? <-- Sorry If I resend the message. :-) 18:02
18:04 nanonyme joined 18:08 nipra joined 18:16 bernhard joined 18:35 bernhard joined, nipra joined, nanonyme joined, xinming_ joined, elmex joined, kanru joined, VanilleBert joined, L0v31n joined, TimToady joined, Ziggy6 joined, pdcawley joined, vel joined, bonesss joined, devogon joined, penk joined, Odin- joined, baest joined, iblechbot joined, BooK joined, chris2 joined, explorer joined, meppl joined, theorbtwo joined, ruoso joined, sri_ joined, spo0nman joined, marmic joined, Southen joined, jdv79_ joined, miyagawa joined, stevan joined, Tene joined, nekokak joined, scw joined, [particle] joined, statico joined, Patterner joined, ingy joined, pjcj joined, lambdabot joined, neonse joined, avar joined, cognominal joined, spinclad joined, lisppaste3 joined, ofer0 joined, rafl joined, DebolazX joined, cdfh_ joined, araujo joined, SamB joined, rashakil joined, ashelyb_ joined, awwaiid joined, jrigby joined, mdiep joined, mako132 joined, Debolaz2 joined, diotalevi joined, mj41 joined, stef_ joined, drbean joined, mr_ank joined, weinig joined, Teratogen joined, prism joined, Khisanth joined, silug joined, ayrnieu joined, cls_bsd joined, spoop joined, jabbot joined, idiotmax joined, evalbot_r15141 joined, svnbot6 joined, Lorn joined, jiing_ joined, jql joined, Yappo joined, PerlJam joined, Juerd joined, wolverian joined, lumi joined, yves joined, takesako__ joined, Grrrr joined, takanori joined, sonorous joined, perlbot joined, glasser joined, buubot joined, pasteling joined, nnunley joined, broquaint joined, LCamel_ joined, Gothmog_ joined, audreyt joined, hcchien joined, jamessan joined, knewt joined, Steve_p joined, dvorak joined, gaal joined, gugod joined, rgs joined, Maddingu1 joined, arguile joined, zgh joined, felipe joined, SCalimlim joined, mtve joined, Eidolos joined, tcliou joined, jrockway joined, masak joined, jiing joined, buu joined, kcwu joined, GeJ joined, cj joined, kolibrie joined, revdiablo joined, greenail_ joined, nipotaway joined, clkao joined, obra joined, orafu joined, nothingmuch joined, Caelum joined, Shabble joined, TreyHarris joined 18:50 nferraz joined
nferraz hello! 18:56
anybody here working with perl6 in perl5?
ofer0 hey
kolibrie nferraz: I'm doing a bunch of grammar stuff under v6.pm 19:00
19:01 VanilleBert left
nferraz cool 19:03
I was trying a simple map... 19:04
since it didn't work as I expected, I built a small test case...
pasteling "nferraz" at 194.65.5.240 pasted "map.t (test case)" (22 lines, 325B) at sial.org/pbot/22634 19:09
19:18 pdcawley joined 19:20 jferrero joined 19:29 weinig is now known as weinig|away 19:38 neonse left 19:42 ashleyb joined 19:48 justatheory joined 19:55 nferraz left 20:03 nipra joined 20:09 neonse joined 20:11 Schwern joined 20:24 kanru_ joined
audreyt TimToady: S04:93 has this form -- is it archaic? 20:38
constant Num PI { 3 }
I thought we removed block-init from "has" 20:39
seems strange to only allow it for constant decl
TimToady seems somewhat archaic 20:44
but the block-init of has was '= { 3 }'
I think the idea was more that you could put either a block or an = on any declaration. 20:45
audreyt my $x { 123 };
TimToady but in the case of a sub, it doesn't autocall.
20:45 DHGE joined
TimToady but I think that was before we had state = FIRST semantics 20:45
20:46 cdfh joined
audreyt right. pseudoassign seems to obsolete this form 20:46
TimToady and it conflicts with hash decl now.
audreyt yup.
TimToady so it's dead
any feelings on recent design changes? 20:47
audreyt autotokening etc makes sense. 20:48
a two-level list context seems a little bit bizzare.
what happens when you have multislices composed from multislices 20:49
and you use them in smooth (linear list) context?
does it flatten all the way recursively?
TimToady As far as they're captures, I think.
which is one level for ordinary list return, two for mappish things 20:50
audreyt no, what I mean is (probably not Capture related)
@@multislice := map { $_, map { $_ * $^moose}, 1..5 }, 1..3 20:51
does it flatten to 1,2,3,4,5,2,4,6,8,10, ... ?
TimToady I believe the inner map is flatted by that list context by default
unless you chunky it inside 20:52
audreyt ok, so mlist context doesn't propagate
gaal mooses
stevan moves quickly away from gaal and covers his nose 20:53
audreyt @@multislice := map { $_, $_ * 10 }, 1..3
@@multislice.perl # ( (1, 10) ; (2, 20) ; (3, 30) )
[particle] thinks stevan should cover his own nose
audreyt correct? 20:54
and there's currently no easy way to make three-dimensional literal?
TimToady sec... 20:55
sorry, sitting in a tire store getting a tire repaired... 20:56
using GoogleWiFi that Mountain View provides, yay 20:57
audreyt cool
TimToady um, isn't (1,2;3,4;5,6) 3-D?
@foo[1,2; 3,4; 5,6]
lambdabot Unknown command, try @list 20:58
audreyt well, in arglists it's 2d...
it's 3d when dereferencing
yay inconsistency
TimToady well, my tire's done, so I need to wander on down the road... 20:59
audreyt k
TimToady thanks
pocketa, pocketa, pocketa &
audreyt maybe we call it a Matrix containing 3 derefs.
3d-slices
which is really just a matrix with 3 rows 21:00
audreyt ponders "matrix context"
in which case 21:02
sub f (*@_) { ... flattens into Seq ... }
sub f (*@@_) { ... nonflattens into Matrix ... }
21:02 bonesss joined 21:16 autark_ joined 21:29 shayx joined, Schwern joined 21:32 stevan_ joined 21:37 penk joined 21:45 devogon_ joined 21:59 justatheory joined 22:15 miyagawa joined 22:35 dduncan joined
bonesss is away: banho 22:44
audreyt miyagawa: JSON::syck now raises proper exception when passed circular refs 23:05
23:05 Psyche^ joined
miyagawa audreyt: great 23:05
audreyt also I finally effected the license change to MIT
which is iirc okay with you, I hope 23:06
miyagawa sure
audreyt also finally structures like 23:07
[ $unicode_string, $some_raw_octets ]
can be dumped fine in YAML::Syck
(the raw octets gets !binary typed and base64 encoded)
(with $YAML::Syck::ImplicitBinary)
but sadly JSON::Syck has no bytebuffer support 23:08
so we're still stuck with either/or there
23:08 devogon__ joined
miyagawa ah 23:08
audreyt limitation of json spec
miyagawa hmm
audreyt no support for x'001234ff' literals
miyagawa 1) dump both as UTF-8
2) dump bytes as UTF-8 and unicode string as \uXXX? 23:09
audreyt uhm
problem is that json has no \xff form
miyagawa yeah 23:10
audreyt so you can't tell \uff from \xff
so it's mostly moot :/
miyagawa I remember that the spec suggests all bytes should be in UTF-8
audreyt that I think is what we currently do
bbiab 23:11
bonesss is back (gone 00:33:43) 23:18
23:21 Psyche^ is now known as Patterner 23:36 buetow joined