pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
Juerd toons.gotblah.com/archive/wulffmorg...-00:01.gif 00:14
lambdabot tinyurl.com/5c2nnj 00:15
rakudo_svn r28287 | pmichaud++ | [rakudo]: 00:16
r28287 | pmichaud++ | * Add missing pir_coda and pod closing to Range.pir.
mncharity elf: sub infix:<☺>($a,$b){$a+$b};say 3☺4 00:24
p6eval OUTPUT[Invalid separator character '<' in attribute list at (eval 14) line 3, near "sub infix:"␤syntax error at (eval 14) line 3, near "sub infix:"␤ at ./elf_f_faster line 4496␤]
mncharity oh, right... svn up... 00:25
rakudo_svn r28288 | pmichaud++ | [rakudo]: 00:29
r28288 | pmichaud++ | * remove obsolete "compiler_directive" rule from grammar
pugs_svnbot r20778 | putter++ | [elf] A first cut at encoding routine names. And "infix:<+>" now normalized in IR to "infix:+". 00:35
pugs_svnbot r20778 | putter++ | Saying infix:<+> no longer crashes elf. So foofix routines can now be declared in the prelude... but they won't actually be called yet. 00:35
r20778 | putter++ | multi infix:<qwe>(Int $a,$b){$a+$b}; multi infix:<qwe>(Str $a,$b){13}; say 3 qwe 4; say "x" qwe 4; # now behaves non-bogusly (but this is atypical)
mncharity elf: sub infix:<☺>($a,$b){$a+$b};say 3☺4 00:37
p6eval OUTPUT[7␤]
mncharity 00:38
prefix wont work though, because category prec/assoc defaults are kludged. :/ 00:39
perl6: sub β(){3}; say β(); 00:46
p6eval kp6 r20778: OUTPUT[syntax error at position 4, line 1 column 4:␤sub β(){3}; say β()␤ ^ HERE␤]
..pugs: OUTPUT[3␤]
..rakudo r28289: OUTPUT[Statement not terminated properly at line 1, near "\x{ce}\x{b2}
..elf r20778: OUTPUT[Parse error in: /tmp/7PRxssuogt␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: sub β(){3}; say β();␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:98:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_red/std.rb:210:in `_UNIT'␤ ./../STD_red/STD_red_run:108:in `main'␤ ./...
mncharity not funding audrey was such a bungle. :/ 00:47
good night all & 00:48
pugs_svnbot r20779 | lwall++ | [STD] faststopper now does very fast reject when we've already tested for stoppers 00:56
r20779 | lwall++ | [Cursor5] re-enable auto-:: on recursive lexer definitions so we can parse assertions :)
diakopter TimToady: I don't understand all the commenting? 01:16
TimToady that's okay--neither do I... 01:28
rakudo_svn r28290 | jhorwitz++ | implement 'slurp' and 'close' builtins 01:30
TimToady oh, you mean, why did I comment out a bunch of obsolescent methods? 01:31
diakopter oh; they're obsolescent 01:32
TimToady they need to be rewritten into mixin form
they would currently blow up in any case since they depend on things that are already gone
pmichaud (utf8/icu): PGE can handle unicode just fine. It's Parrot that has troubles (more) 02:31
Currently Parrot stores unicode strings in utf8, which is very bad for indexed access. Computing the length of a string isn't expensive, but moving to character #n (repeatedly) can be very expensive. 02:32
The solution is to store strings in a fixed-width encoding, such as ucs2. But right now Parrot requires ICU to do that, and not every platform has ICU available. 02:34
pmichaud has an idea. 02:41
Auzon elf: sub postfix:<!> ($a) {my $t = 1; $t *= $a-- while $a;}; my $f = 5; say $f! 02:57
pugs_svnbot r20780 | lwall++ | [STD] strip out all the bogus $STOP stuff 03:06
Auzon elf: say hi
p6eval OUTPUT[Undefined subroutine &GLOBAL::hi called at (eval 14) line 3.␤ at ./elf_f_faster line 4515␤]
Auzon elf: say "hi"
p6eval OUTPUT[hi␤]
Auzon elf: sub postfix:<!> ($a) {my $t = 1; $t *= $a-- while $a;}; my $f = 5; say $f!
Auzon mhm. 03:06
diakopter om_ 03:59
diakopter this packrat+lrecursion algorithm is unbelievably fast compared to naive recdescent 04:00
rakudo_svn r28294 | pmichaud++ | [rakudo]: 04:38
r28294 | pmichaud++ | * Fix pod in Range.pir.
pugs_svnbot r20781 | lwall++ | [Cursor5] extra parens blow up LTM
diakopter TimToady: is gimme STD suitable for the evalbot? 04:40
that didn't come out right
rakudo_svn r28298 | pmichaud++ | [rakudo]: 04:44
r28298 | pmichaud++ | * Default reading program source as utf8.
r28298 | pmichaud++ | * Use HLLCompiler's transcode option to try to down-transcode
r28298 | pmichaud++ | the utf8 source to iso-8859-1 before compiling it. If that
r28298 | pmichaud++ | succeeds, we get a speed win; if not, then at least the program
r28298 | pmichaud++ | will still execute (modulo any exceptions due to unavailable ICU).
pmichaud rakudo: say 'hi'; 04:45
p6eval rakudo r28297 OUTPUT[hi␤]
pmichaud waits for r28298. 04:46
Auzon If it's just a Rakudo change, it should be done by now 04:48
Parrot changes fire on the hour
rakudo: say 1
p6eval rakudo r28298 OUTPUT[1␤]
pmichaud it's a parrot change also. 04:49
although perhaps not for what is needed here.
rakudo: sub ä(){3}; say ä();
p6eval rakudo r28298 OUTPUT[Malformed UTF-8 string␤current instr.: 'parrot;PCT::HLLCompiler;evalfiles' pc -5054 ((unknown file):-1)␤
pmichaud I wonder if that's due to lack of a parrot update, my irssi client, or evalbot. 04:50
Auzon I'd guess parrot and then evalbot
pmichaud $ cat x 04:51
sub ä(){3}; say ä();
$ ./parrot perl6.pbc x
3
Auzon the ä looked fine here, and evalbot outputs and receives Unicode fine from what I've seen
diakopter evalbot control reparrot
Auzon Nice try ;)
pmichaud I think I can wait the 10 mins. :-)
Auzon I'll start it now ;) 04:53
pugs_svnbot r20782 | putter++ | [STD_red] Use unicode for all \w. So names can now be unicode.
Auzon is impatient
TimToady diakopter: STD5 couldn't give you much beyond did/didn't parse currently 04:59
pmichaud rakudo: sub ä(){3}; say ä(); 05:00
p6eval rakudo r28298 OUTPUT[Malformed UTF-8 string␤current instr.: 'parrot;PCT::HLLCompiler;evalfiles' pc -5054 ((unknown file):-1)␤
mncharity @tell pmurias re 'use v5', just saw your note in TODO. 'is p5' isn't actually a deviation. it could be called 'is implementation_primitive', but that's ugly. They are the equivalent of pugs's Prim.hs. 'use v5' is a very different beast. In general, one can't 'use SomeLanguage;' without being able to parse and compile that language to p6 IR. not going to see 'use v5' rsn.
lambdabot Consider it noted.
mncharity pmurias: though might do something related, a p5 with api into the p6 runtime, like... 05:01
svn.pugscode.org/pugs/misc/old_pugs...un/ApiX.pm 05:03
lambdabot tinyurl.com/58tgrv
mncharity use P5xs6; ? ;)
rakudo_svn r28299 | pmichaud++ | [rakudo]: 05:07
r28299 | pmichaud++ | * Allow uppercase hex characters in \x... escapes.
r28299 | pmichaud++ | * S02-literals/hex_chars.t passes.
pugs_svnbot r20783 | pmichaud++ | * Remove #?rakudo skip from S02-literals/hex_chars.t . 05:08
pmichaud rakudo: sub ä(){3}; say ä(); 05:14
p6eval rakudo r28299 OUTPUT[Malformed UTF-8 string␤current instr.: 'parrot;PCT::HLLCompiler;evalfiles' pc -5054 ((unknown file):-1)␤
pmichaud grr.
pugs_svnbot r20784 | putter++ | [elf] Emitted p5 is now 'use utf8'. But encode_function_name() is still doing bytewise ord() - not clear why. And quotemeta() is mutilating utf8 characters in strings.
r20784 | putter++ | Added STRING length methods. Added eval_dies_ok() to Test.pm.
mncharity elf: sub ä(){3}; say ä(); 05:15
mncharity even better. :/ 05:15
pmichaud well, unicode sub names work in rakudo -- for some reason evalbot isn't able to send it to rakudo properly. 05:15
rakudo_svn r28300 | pmichaud++ | [rakudo]: 05:17
r28300 | pmichaud++ | * Mark S02-literals/hex_chars.t as #pure.
mncharity sigh. so unicode sub names work in elf... but unicode strings are now rather broken. looks a lot like things aren't honoring 'use utf8'. something for another day. 05:21
have to start running rakudo against some of the simpler elf files at some point. 05:24
g'night &
pugs_svnbot r20785 | lwall++ | [STD5] could misparse circumfix:<( )> as signature 05:52
pugs_svnbot r20786 | putter++ | [elf] Better STRING codes() and graphs() copied from misc/old_pugs_perl5_backend/PIL-Run/lib/PIL/Run/PrimP5.pm. 05:58
pugs_svnbot r20787 | lwall++ | [STD5] improved infix coercions in sublanguages such as Regex 06:59
pugs_svnbot r20788 | diakopter++ | [yap6] more tracing... 12:28
pmurias yap6: use v6;1 13:32
lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
p6eval yap6 r20788 No output (you need to produce output to STDOUT) 13:32
moritz_ yap6: 1+2 13:34
moritz_ sh: line 1: 13793 CPU time limit exceeded 13:35
p6eval yap6 r20788 No output (you need to produce output to STDOUT)
pmichaud rakudo: sub é() { 3 }; say é(); 13:43
p6eval rakudo r28321 OUTPUT[Malformed UTF-8 string␤current instr.: 'parrot;PCT::HLLCompiler;evalfiles' pc -5054 ((unknown file):-1)␤
pmichaud oh well, just checking.
b_jonas pmichaud: try 'use encoding "utf8";'
pmichaud b_jonas: hmmm?
b_jonas and read all the caveats at the pod of encoding
pmichaud: if you want to use non-ascii identifiers
pmichaud b_jonas: Perl 6 is unicode by default. 13:44
b_jonas oh, wrong channel then 13:44
b_jonas sorry 13:44
moritz_ wasn't it mncharity or pmurias having problems with non-ascii identifiers? 13:44
moritz_ b_jonas: is there any advantage over 'use utf8;'? 13:44
pmichaud I don't recall. I know that rakudo handles non-ascii identifiers now, but I can't seem to get it to work with evalbot. 13:45
b_jonas moritz_: I think there is, but I don't get all that stuff
b_jonas I think there are still some parts not really nicely done 13:45
moritz_ b_jonas: I mostly remember that 'use encoding ..'; kills threat safety ;)
b_jonas yeah,
I don't know why though 13:46
I mean, there could at least be some mode that doesn't do all of its functions
just the unicode identifiers and the auto-decoded literals
and the io layers 13:47
not the other magic
but is thread safe
I mean, the whole combination doesn't even make sense
b_jonas just because you write the program in some encoding, why would it assume by default that it's connected to std handles that are encoded that way/ 13:48
moritz_ missing orthogonality 13:53
pmurias moritz_: mncharity had problems with non-ascii identifiers 13:58
b_jonas: it should be possible to change perl5 default assumption to unicode 14:00
b_jonas which assumption (out of the three)? 14:01
because the identifier thing can probably changed without much side effects
the only problem may be that some very non-perl files may not be detected as syntax error as early 14:02
but the other two can't be changed so easily
pmurias b_jonas: i should be able to guarantine to perl that my script will never find an iso-8859-1 file 14:04
diakopter anyone: in Perl 6 is there a way to break a quoted region (with something like unspace or a comment) without terminating the quoted region with its normal quote terminator and ~ with the next region.... sort of a universal halt-interpolation signal... if it doesn't exist already, I think it would be a good idea to add - such a thing might also be useful for signifying the end of "sub-language" regions. of course, such a thing ...
... would need an escaped version as well
pmurias * guarantee 14:05
b_jonas pmurias: iso-8859-1 sources are ok, for they are usually either ascii-only or quickly flagged as a syntax error at the first non-ascii place
anyway, that's not a problem
but I don't think you can change the other two default assumptions 14:06
(even if perl6 wants to do that to one of them)
pmurias is it possible to compile a non iso-8859-1 supporting perl?
pmichaud diakopter: \q[...] 14:07
also \qq[...], \qw[...], etc.
b_jonas diakopter: I think you may be able to do interpolation (like brace interpolation) for that 14:09
like, you could say "foo${\'' }bar" like that 14:10
but I'm not sure if that's what you want exactly
diakopter thanks 14:34
pmurias all elf users: please upgrade your autobox ;) 16:25
pugs_svnbot r20789 | pmurias++ | [elf] changed autobox->type to autobox::universal::type to work with the newest autobox
pmurias TimToady++ #inventing patch(1) so i can freeze my changes to the working copy cleanly and work on several things at once 16:31
Auzon elf: say 1 16:36
p6eval OUTPUT[1␤]
b_jonas funnily, if we had infinite disk space, memory, and computing power, we'd need only diff3, not patch
pmurias b_jonas: is there a way of checking if some non-utf8 input leaks in into the perl interpreter? 16:46
b_jonas pmurias: no 16:47
and why "leaks"?
I still don't think you should assume utf-8 as a default for everything automatically
not in something like perl that you want to use for so many things 16:48
pmurias i'm trying to add unicode support to elf 16:49
well fix unicode support to elf
and i want to make sure everything is properly marked as utf-8 16:50
b_jonas: what other encodings should be default?
unless the default is ascii and everything else causes an exception (i'm ok with that) 16:51
b_jonas well, I myself like how that works in perl5: the default is that strings are treated as byte strings, as the encoding is unknown 16:53
and for program code, only ascii is accepted
and STDIN etc and argv and envp and other such input is also byte strings by default
pmurias b_jonas: dosn't iso-8859-1 creap in somewhere?
according perlunifaq perl uses that encoding to convert binary string to text strings by default if forced to 16:55
b_jonas pmurias: iso-8859-1 creeps in the part I don't like 16:56
namely that when you use byte strings where you should use char strings in perl5, they get decoded as 8859-1
and this includes when you catenate a byte string with a char string
this is mostly a bad thing, because you are supposed to separate the two, 16:57
but it's also convenient in like catenating ascii constants or stringified numbers to char strings
in the converse case, if you use a char string where a byte string is expected (like if you print to a filehandle without encoding layer), it's encoded as utf-8 16:58
pmurias it would be better to warn/die if a non-ascii char is found then use 8859-1 16:59
b_jonas that's similar to the other case in that it's usually wrong, but is also sometimes convenient because you can e.g. numify/oct/hex a string etc
well, there are some warnings
but not for all cases
for the same reason as why it's convenient 17:00
there's also a module that makes most of these automatic conversions an error
perl6 will work completely differently though I think
pmurias b_jonas: what's that module? 17:03
pmurias & 17:15
pmurias b_jonas: $*ARGS 20:18
pmurias b_jonas: ARGV in perl5 works fine with use encoding "utf8" 20:26
how do i mark a string as utf8
?
b_jonas pmurias: Encoding::decode 20:27
pmurias b_jonas: thanks 20:32
pmurias is support for non-utf8 encodings a big issue? 20:39
pugs_svnbot r20792 | pmurias++ | [elf] unicode support
Auzon rakudo: say Int.WHAT 20:41
p6eval rakudo r28330 OUTPUT[Int␤]
Auzon rakudo: say Int."WHAT"
p6eval rakudo r28330 OUTPUT[Int␤]
Auzon rakudo: class Foo {method WHAT {'correct'}}; say Foo.new.WHAT; say Foo.new."WHAT"; 20:42
p6eval rakudo r28330 OUTPUT[correct␤correct␤]
Auzon hn
hm
first one should be Foo
pmurias perl6: say "ąęóćżźł" 20:43
p6eval kp6 r20792: OUTPUT[ÄÄóÄżźÅ␤]
..pugs: OUTPUT[ÄÄóÄżźÅ␤]
..rakudo r28330: OUTPUT[ÄÄóÄżźÅ␤]
..elf r20792: OUTPUT[ÄÄóÄżźÅ␤]
Auzon evalbot might be responsible for some issues with Unicode
b_jonas pmurias: depends on what degree of support 21:04
pmurias shower& 21:07
pmurias b_jonas: i'm more concered at which point it would become required 21:24
s/required/nessesary/ 21:25
* necessary 21:26
b_jonas pmurias: (starting to copy rant I typed to the wrong channel) 21:35
(support of other encodings) 21:36
basically, if you only want to do operations that don't requrie much knowledge about the characters, like reading, printing, concatenation, etc, then it's easy
for that, you just need a new datatype that tags byte strings with their encodings.
and upgrade them to char strings (maybe with the old encoding still saved) if you want to do anything else
but for anything more complicated like matching \w against it etc, you'd probably need to upgrade to char strings
(which are internally represented as the language's choice of a single encoding on which they implement every operation,
this encoding is utf-8 for perl5, iirc utf-16 or utf-32 for java, etc)
because it's just took too many developper time to implement every operation for every encoding
though I guess the way perl6/parrot is extensible,
(realized it's the wrong channel at that point) 21:37
people could later write modules that fully support strings in easier encodings
which are namely the other four of utf8,utf16le,utf16be,utf32le,utf16be than what perl6 will support natively and encodings where one byte stands for one char statelessly 21:38
or even not full support, just better support that still upgradest to perl6 core char strings when it has to do something complicated
wknight8111 nice rant 21:44
b_jonas wknight8111: and they didn't interrupt me that it's on the wrong channel
even thoguh I started it by addressing someone (I didn't copy that here) 21:45
that's what crazy in it
pmurias b_jonas: what was the other channel?
b_jonas #haskell-blah
Auzon :O
Nice rant indeed
Auzon wonders what the Haskell people thought 21:46
pmurias g'night 21:56
b_jonas night 21:57