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.
00:10 Chillance left 00:12 FurnaceBoy left
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.
00:20 yahooooo2 left 00:23 yahooooo joined
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
00:35 eternaleye joined
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
01:29 Ched- joined
rakudo_svn r28290 | jhorwitz++ | implement 'slurp' and 'close' builtins 01:30
01:31 [particle] joined
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
01:34 cjfields joined 01:36 BinGOs joined 01:47 bacek_ joined 01:57 cjfields left
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
02:49 penk joined
Auzon elf: sub postfix:<!> ($a) {my $t = 1; $t *= $a-- while $a;}; my $f = 5; say $f! 02:57
02:57 p6eval joined
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!
03:06 p6eval left
Auzon mhm. 03:06
03:07 p6eval joined 03:18 Limbic_Region left
diakopter om_ 03:59
03:59 thestarslookdown joined
diakopter this packrat+lrecursion algorithm is unbelievably fast compared to naive recdescent 04:00
04:13 mncharity joined
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
05:15 p6eval left
mncharity even better. :/ 05:15
05:15 p6eval joined
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.
05:20 Ched- left
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 &
05:24 mncharity left 05:35 pmichaud joined 05:43 PerlPilot joined 05:47 Ingmar joined, hcchien_ joined 05:49 [1]Maghnus joined, qmole_ joined 05:52 alc joined
pugs_svnbot r20785 | lwall++ | [STD5] could misparse circumfix:<( )> as signature 05:52
05:56 bbkr__ joined
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
06:05 thestarslookdown left 06:15 Psyche^ joined 06:16 Maghnus left, [1]Maghnus is now known as Maghnus 06:21 jiing joined 06:31 Psyche^ is now known as Patterner
pugs_svnbot r20787 | lwall++ | [STD5] improved infix coercions in sublanguages such as Regex 06:59
07:12 cognominal_ joined 07:27 iblechbot joined 07:39 Maghnus left 07:40 Maghnus joined 07:44 hcchien_ is now known as hcchien 07:48 Jedai joined 08:00 cognominal_ left 08:08 IllvilJa joined 08:38 [1]Maghnus joined 08:39 [1]Maghnus is now known as _Maghnus 08:47 alanhaggai joined 08:49 elmex joined 08:52 bacek_ left 08:55 Maghnus left 08:57 _Maghnus is now known as Maghnus 09:15 wknight8111 joined 09:33 alanhaggai_ joined 09:47 alanhaggai left 09:49 alanhaggai_ is now known as alanhaggai 10:03 penk left 10:19 [particle] left 10:33 wknight8111 left 10:53 alc left 10:59 cosimo joined 11:01 cognominal_ joined 11:12 wknight8111 joined 11:45 wknight8111 left 11:49 mjk joined 11:57 alanhaggai_ joined 11:59 alc joined 12:03 bacek_ joined 12:11 alanhaggai left 12:14 iblechbot left 12:19 bacek__ joined
pugs_svnbot r20788 | diakopter++ | [yap6] more tracing... 12:28
12:31 wknight8111 joined 12:37 chris2 joined 12:41 bacek_ left 12:43 pmurias joined, bacek__ left 12:49 Lunchy joined 12:54 cmarcelo joined 12:57 Auzon1 joined 13:01 drbean joined 13:06 iblechbot joined 13:11 jhorwitz joined 13:21 b_jonas joined 13:22 IllvilJa left 13:27 Jedai left 13:29 icwiener joined
pmurias yap6: use v6;1 13:32
lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
13:32 Lunchy left
p6eval yap6 r20788 No output (you need to produce output to STDOUT) 13:32
13:32 Lunchy joined 13:33 Lunchy left
moritz_ yap6: 1+2 13:34
13:34 Jedai joined
moritz_ sh: line 1: 13793 CPU time limit exceeded 13:35
p6eval yap6 r20788 No output (you need to produce output to STDOUT)
13:35 Lunchy joined 13:40 BinGOs left, BinGOs joined 13:42 alanhaggai__ joined, Lunchy left, Lunchy joined
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
13:44 Lunchy left
b_jonas oh, wrong channel then 13:44
13:44 Lunchy joined
b_jonas sorry 13:44
13:44 fullermd joined
moritz_ wasn't it mncharity or pmurias having problems with non-ascii identifiers? 13:44
13:44 BinGOs left
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
13:45 BinGOs joined
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
13:48 xinming joined, mjk left
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
13:56 alanhaggai_ left
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
14:02 eternaleye_ joined 14:03 eternaleye left
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
14:42 sri_work joined 14:46 Auzon1 is now known as Auzon 14:48 jan joined, mofino joined 14:55 Jedai left 15:02 Jedai joined 15:04 alanhaggai__ left 15:08 lumi left, lumi joined 15:09 meppl joined 15:12 smtms joined 15:13 lumi left 15:15 lumi joined 15:19 lumi left 15:23 bacek joined 15:26 lumi joined 15:30 lumi left 15:31 lumi joined 15:32 rdice joined 15:54 chris2 left 15:58 eternaleye_ left 16:04 alc left 16:07 cj joined
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
17:06 lumi left 17:07 lumi joined
pmurias & 17:15
20:04 ilogger2 joined 20:11 FurnaceBoy joined
pmurias b_jonas: $*ARGS 20:18
20:20 simcop2387 joined 20:23 Entonian_ joined
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
20:36 eternaleye_ joined
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
21:03 wknight8111 joined
b_jonas pmurias: depends on what degree of support 21:04
pmurias shower& 21:07
21:13 donaldh joined
pmurias b_jonas: i'm more concered at which point it would become required 21:24
s/required/nessesary/ 21:25
* necessary 21:26
21:28 Entonian_ left
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
21:40 armagad joined 21:42 donaldh left
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
21:48 FurnaceBoy left 21:50 wknight8111 left 21:53 xdg joined
pmurias g'night 21:56
b_jonas night 21:57
22:18 xdg left, xdg joined 23:19 sri_work joined 23:28 Limbic_Region joined