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:01 mncharity joined 00:14 jhorwitz_ left
mncharity vixey: a CL backend for elf would be delightful. I'd be happy to help you get set up. 00:17
And to answer any questions you might have. :) 00:18
00:28 stevan_ left 00:42 japhb left 00:45 stevan_ joined, stevan_ left 00:46 stevan_ joined 00:52 pbuetow left 00:57 kanru left 01:06 cls_bsd left 01:11 japhb joined 01:27 Ched left, Ched joined
mncharity stumbles wearily out of a forest of not-pretty trees, and stares in bemusement at successful self-compilation. 01:29
Anyone know what we currently have as ways to run the t/ tests? The old make smoke stuff tended to require pugs to be built, always odd, and now problematic. Any suggestions? 01:33
Could just use 5.10's prove... but it is missing some nice stats, and isn't as pretty as smoke. 01:34
pugs_svnbot r20413 | putter++ | [elf] Elf (elf_f) now self-compiles successfully on the new STD_red. 01:43
r20413 | putter++ | Added a ELF_STD_RED_RUN parser override to elf_e and elf_f.
01:44 alester_ joined 01:47 fridim_ left
mncharity wolverian: A while back you mentioned a Moose compiler. Could you glance at elf_f to see if it might help startup speed? svn.pugscode.org/pugs/misc/elf/elf_f It takes me almost 4 cpu seconds to do ./elf_f --help . Performance running t/ is dominated by this startup cost. 01:47
The 3+ seconds are all spent in moose land. 01:48
vixey mncharity, How do you build elf_f?
mncharity elf_f_src/README has the recipe 01:49
basically just elf_f -x -o elf_f Elf.pm
vixey that line gives me some problem
It's says, Can't locate autobox.pm in @INC
I don't actually have autobox.pm 01:50
mncharity Need CPAN's autobox module.
vixey oh ok
mncharity Also... Class::Multimethods Moose Moose::Autobox 01:51
hmm, though I'm not sure we are really still using Moose::Autobox
wolverian mncharity, should help, if it doesn't break in glorious ways... see MooseX::Compile
stevan_ might be able to provide more information 01:52
mncharity oh, and Perl6::Say. sigh.
wolverian: nifty. will look. 800x4sec of motivation. :) 01:53
thanks
wolverian it might require one class per file 01:55
mncharity eeep
wolverian quite :)
mncharity pictures hundreds of files... eeep
hmm, ok, that was exaggerated. there are barely over a hundred. in IRx1_Nodes and Prelude. regex will had another order 10. 01:57
vixey: re autobox, I've been mulling over creating an autobox mutant. It would be nice to have a variant which dispatches separately on STRING, INTEGER, FLOAT, rather than folding them together as SCALAR. 02:00
02:03 alester_ left 02:05 lisppaste3 left
mncharity eh, probably want custom reporting anyway... sigh. let's see... 02:11
vixey: how goes?
vixey trying to build elf_f is getting an error from elf_e, ../elf_e_src/STD_red/match.rb:121:in `+': can't convert Fixnum into String (TypeError) 02:13
do you have to build elf_c, then d and so o ? 02:14
mncharity no. in fact, you should be able to use the second half of the README which just uses elf_f, without elf_e. 02:17
still, that's odd
what is your ruby --version ? 02:18
vixey ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
mncharity ah. you really want 1.9. details in misc/STD_red/README
vixey elf/misc is actually empty here
mncharity top level pugs misc/ 02:19
vixey oh sorry
mncharity np. not documented ;) 02:20
02:20 justatheory left 02:22 lisppaste3 joined 02:36 alester_ joined
vixey mncharity: If I try running ../elf_f -x -o ../elf_f1 Elf.pm now with ruby 1.9.0, any idea why this going wrong? /pugs/misc/STD_red/prelude.rb:401:in `scan': target of repeat operator is not specified: /\.=/ (RegexpError) 02:51
02:51 rindolf joined 02:59 Eevee joined
mncharity vixey: hmm... 03:00
vixey: you've svn up'ed recently? elf_f working is something which has only happened in the last hour or few. 03:01
r20413
vixey yeah I'm up to date 03:03
03:03 Limbic_Region left
mncharity :/ looking... 03:04
ruby --version ? 03:05
vixey ruby 1.9.0 (2008-05-13 revision 16399) [i686-darwin9.2.0] 03:06
mncharity hmm... I'm running ruby 1.9.0 (2007-12-25 revision 14709) [x86_64-linux], the first 1.9.0 release. I don't think there's been another release(?), so that's 1.9 HEAD? 03:08
vixey I just got the svn repo compiled and install that
mncharity how difficult would it be to try r14709? www.ruby-lang.org/en/news/2007/12/2...-released/ 03:10
lambdabot Title: Ruby 1.9.0 Released
mncharity my experience with 1.9 HEAD over the last, err, year+, is that it's kind of iffy.
which probably belongs in the STD_red/README... 03:11
oh, that should have been vixey++ 03:13
pugs_svnbot r20414 | putter++ | [STD_red] README: Add link and greater detail, to the suggestion of which ruby version to use.
eternaleye perl6: my @array; print @array.WHAT 03:15
exp_evalbot kp6: OUTPUT[Array]
..pugs: OUTPUT[Array]
..rakudo: OUTPUT[List]
03:17 wknight8111 left
mncharity vixey: thanks for helping shake down the "getting started with elf" path. the only person other than myself which I know of having pursued it has been pmurias. 03:18
vixey it's ok :)
I hope it can work, I'm just compiling ruby now
mncharity :) 03:19
vixey success! 03:23
mncharity ! :) 03:24
for repeated self-compilation, note STD_red's STD_RED_CACHEDIR environment variable. ./STD_red_run --help . 03:26
I'd be interested in hearing how long a self-compilation takes you. pmurias and I were seeing very different times. 03:27
btw, perl --version ?
vixey v
v5.8.8
rindolf Hi all. 03:28
Hi vixey
vixey hey rindolf 03:29
rindolf vixey: sup? 03:30
vixey rindolf: I'm listening to Don Quixote now, how's it going? 03:31
rindolf vixey: I'm fine.
vixey: writing some emails.
And trying to see why @perl.org does not like me.
mncharity re v5.8.8, ah, ok. I'm v5.10.0. Not sure if it will be an issue or not. 03:32
mncharity pictures a "Santa's elf" tilling at windmills... on a reindeer... 03:33
04:11 alester_ left 04:25 peepsalot joined 04:32 Psyche^ joined 04:48 Patterner left, Psyche^ is now known as Patterner 04:55 Alias_ joined 05:16 araujo left 05:17 meppl joined 05:19 justatheory joined 05:25 eternaleye left 05:31 justatheory_ joined 05:32 justatheory left 05:36 IllvilJa left 06:00 penk joined 06:01 justatheory_ left
pugs_svnbot r20415 | putter++ | [elf_f] Kludged a Test.pm. run-tests script created. Bare blocks are now emitted, and hash vs block differentiation improved (but still a kludge). 06:05
06:11 mncharity left 06:28 pmurias joined 07:11 Jan_ left 07:15 cosimo joined 07:25 masak joined
moritz_ @tell mncharity I have problems building elf_f: ../elf_e -x -o ../elf_f0 Elf.pm results in '../elf_e_src/STD_red/prelude.rb:441:in `require': no such file to load -- readline (LoadError)' - any ideas? 07:58
lambdabot Consider it noted.
08:03 meppl left 08:41 IllvilJa joined 08:42 pmurias left 09:06 wknight8111 joined 09:07 chris2 joined 09:14 iblechbot joined 09:32 wknight8111 left 09:38 valkyrie- left 10:04 Alias_ is now known as adamkennedy 10:21 iblechbot left 10:34 chris2 left 10:35 IllvilJa left 10:55 rindolf left 11:43 wknight8111 joined
pugs_svnbot r20416 | clkao++ | bump version for cpan reindex. 12:04
12:16 ispy_ joined 12:41 ruoso joined 12:52 pbuetow joined 12:55 eternaleye joined 13:01 cmarcelo joined 13:11 nnunley joined 13:12 nnunley left 13:15 cjfields joined
cjfields pugs: class Foo { has $.x; method boo { say $.x } }; class Bar is Foo { method set($v) { $.x = $v } }; my Foo $u .= new(x => 5); $u.boo; $u= Bar.new(Foo{ x => 12 }); $u.boo; $u.set(9); $u.boo; 13:16
exp_evalbot OUTPUT[5␤*** Must only use named arguments to new() constructor␤ Be sure to use bareword keys.␤ at /tmp/n0wxXZkBl4 line 1, column 132-159␤]
cjfields rakudo: class Foo { has $.x; method boo { say $.x } }; class Bar is Foo { method set($v) { $.x = $v } }; my Foo $u .= new(x => 5); $u.boo; $u= Bar.new(Foo{ x => 12 }); $u.boo; $u.set(9); $u.boo;
exp_evalbot OUTPUT[5␤Type check failed␤current instr.: 'die' pc 7364 (src/gen_builtins.pir:5066)␤called from Sub '!TYPECHECKEDASSIGN' pc 7480 (src/gen_builtins.pir:5206)␤called from Sub '_block10' pc 167 (EVAL_12:51)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)␤called
..from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 106...
moritz_ cjfields: I think WHENCE closures aren't implemented yet 13:17
cjfields: and I couldn't find a test for them anywhere
if you feel like, go ahead and write one
cjfields This is a test script Jonathan had running with Rakudo at one point 13:18
of course, not as a one-liner
I need to test the one-line version using parrot r27447 13:19
moritz_ if it's a test script, check it into the pugs repo somewhere below t/
so it won't get lost
cjfields moritz_: I don't have a commit bit. We need to wrangle all of Jonathan's Rakudo examples together at some point 13:21
moritz_ cjfields: want a commit bit? 13:22
cjfields Sure!
moritz_ /msg (or just tell) me your email address and desired nick 13:23
[particle] please add new tests to t/spec, if you can 13:24
cjfields will do! 13:25
moritz_ cjfields: email is on its way. If it doesn't arrive within 5 minutes, please scream ;) 13:26
13:27 alanhaggai joined
cjfields Got it. I'll add the test to t/spec as soon as I can (gotta catch the bus, be back soon) 13:27
13:28 cjfields left 13:31 eternaleye left 13:35 nnunley joined 13:42 rdice joined 13:45 jan_ joined
moritz_ @tell Juerd I updated feather's openssl libs, but it still needs to regen host keys, see lists.debian.org/debian-security-an...00152.html 14:09
lambdabot Consider it noted.
14:17 ruoso left 14:25 jan_ left 14:26 ruoso joined 14:30 ispy_ left 14:32 ludan joined 14:35 ruoso left 14:38 IllvilJa joined 14:41 cjfields joined 14:42 justatheory joined 14:46 hidenowt joined 14:47 hidenowt left 14:49 ispy_ joined 14:56 masak left, meteorjay joined 15:07 mj41_ left
Juerd Feather has new SSH keys: rsa => 44:88:fb:48:cb:79:72:da:67:bd:18:4f:84:d9:2a:cf, dsa => cf:8c:46:ff:41:f5:b5:e0:07:73:3d:6b:30:7c:2f:56 15:12
lambdabot Juerd: You have 1 new message. '/msg lambdabot @messages' to read it.
Juerd @messages
lambdabot moritz_ said 1h 3m 33s ago: I updated feather's openssl libs, but it still needs to regen host keys, see lists.debian.org/debian-security-an...00152.html
Juerd Right
moritz++ # fast 15:13
15:15 wknight8111 left 15:18 peepsalot left 15:22 jhorwitz joined 15:23 lidden joined 15:24 TJCRI joined 15:34 peepsalot joined 15:37 alanhaggai left 15:40 wknight8111 joined 15:54 jan_ joined 16:03 ludan left 16:12 armagad joined 16:14 silug joined 16:17 iblechbot joined 16:25 meppl joined
pugs_svnbot r20417 | cjfields++ | test for init. parent attributes (from Jonathan and dakkar) 16:30
moritz_ cjfields: please use the scripts in util/ to set the svn properties of added files 16:32
16:33 wknight8111 left 16:34 meppl left 16:36 meppl joined, valkyrie-- joined
pugs_svnbot r20418 | moritz++ | [t] set some svn attributes 16:39
r20419 | cjfields++ | fix test to return value
cjfields moritz_: thanks (beat me to it)
moritz_ cjfields: np, there were (and are still) quite some files with missing attributes 16:40
moritz_ now does a find t/ -type f -name '*.t' | xargs ./util/add-svn-props.sh and hopes it's not an extraordinarily stupid thing to do 16:42
pugs_svnbot r20420 | moritz++ | set svn properties on all .t files below t/ 16:45
r20420 | moritz++ | find t/ -type -f name '*.t' | xargs ./util/add-svn-props.sh
r20420 | moritz++ | I hope this is sane :/
moritz_ cjfields: in that test file you don't compare the desired values in all tests 16:46
$u= Bar.new(Foo{ x => 12 });
is($u.boo, 'set parent attribute');
should probably be is($u.boo, 12, ...);
same for the third test 16:47
16:51 ruoso joined
spinclad cjfields: now you're an author, please add yourself to AUTHORS, as per tradition :) 16:55
(traditional first commit to test your commit bit) 16:56
pugs_svnbot r20421 | moritz++ | [spec] fixed expected values in parent_attributes.t 16:57
cjfields moritz_: you are correct; the test fails with rakudo (passed until recent commits( so I didn't catch that 16:59
moritz_ is too impatient today, sorry for that
cjfields s'okay, stepped away from the desk a bit so missed that 17:01
pugs_svnbot r20422 | cjfields++ | added me 17:03
cjfields spinclad: done 17:04
I need to update the test docs with something more meaningful, will do momentarily 17:05
17:05 eternaleye joined 17:12 fridim_ joined 17:16 dalek left
pugs_svnbot r20423 | cjfields++ | update docs (could merge these with other tests in the future) 17:16
17:19 dalek joined, dalek left, dalek joined 17:27 peepsalot left 17:28 peepsalot joined 17:44 pmurias joined
pmurias @tell mncharity elf_f dosn't correctly compile itself perl elf_f -I elf_e_src -x elf_e_src/Elf.pm -o elf_f2, the resulting file has syntax errors 17:46
lambdabot Consider it noted.
17:48 ruoso left 17:52 mncharity joined
pmurias swimming& 17:55
mncharity pmurias: hi 17:56
pmurias: re elf_f, the problem was that -I.
17:57 adamkennedy left
moritz_ mncharity: did you get my @tell from earlier today? 17:57
mncharity oh, wait. your objective is to compile elf_e with elf_f and call it elf_f2 ? /me confuzed 17:58
moritz_: just got it. thought pmurias might still be here but on way out so responded to that first.
let's see...
ruby --version of the ruby the #! line of STD_red_run invokes? 17:59
moritz_ ruby 1.8.6 (2008-03-03 patchlevel 114) [i486-linux] 18:01
18:01 araujo joined
moritz_ dammit, it doesn't use the ruby 1.9 in $PATH 18:01
mncharity elf_e is using it's own elf_e_src/STD_red/STD_red_run at this point. fyi. so 18:02
if you edited misc/STD_red/STD_red_run's #! /bin/env ruby , you will also have to tweak that one. 18:03
#!/usr/bin/env ruby rather
hmm. now that ruby 1.9 is "strongly recommended", STD_red_run should check for it... 18:04
moritz_ mncharity: now I changed both to /usr/bin/ruby1.9 and still get the same error 18:05
mncharity s/strongly recommended/only supported/ the utf handling killed 1.8. 18:07
re same error,
ruby --version ?
moritz_ ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
mncharity ruby -e 'require "readline"' ? 18:09
moritz_ e:1:in `require': no such file to load -- readline (LoadError) from -e:1:in `<main>'
moritz_ tries installing libreadline-ruby1.9 18:10
mncharity hmm. why would ruby on a linux box not have been compiled with readline. /me googles...
moritz_ because it's a separate module?
mncharity at least in 1.8, it's part of stdlib. ruby-doc.org/stdlib/libdoc/readline...index.html in ruby-doc.org/stdlib/ (all thought with an unfortunate lack of documentation). 18:13
lambdabot Title: readline: Ruby Standard Library Documentation
18:14 pmurias left
moritz_ it works now, with libreadline-ruby1.9 installed 18:15
mncharity ah, ok. what os? I'll add a note to README. 18:16
moritz_ Debian
mncharity ok. thanks!
moritz_ testing aka "Lenny"
moritz_ just did the ../elf_f2 -e 'say 3' 18:17
mncharity :) elf_f2 should be identical to elf_f. it's just part of the "are we at a self-compilation fixed point" check. 18:18
moritz_ mncharity: if you could somehow improve the startup time it might be worth adding an elf: target for evalbot ;)
mncharity :) yeah. in elf_e, I was often using elf_e_nomoose, which doesn't have the startup time issue. dropped it to simplify getting elf_f working. now that it is... need to do something. the latency is a pain. 18:21
moritz_ mncharity: where is the output format of run-tests documented?
mncharity what's your time elf_f --help ?
moritz_ I did a time ../elf_f2 -e 'say 3'
real 0m3.478s
mncharity the "way too late night hack" of run-tests isn't documented at all. thought I'd look at it again today, now that it's run once. 18:22
ok. about the same as me. the diff between --help and -e 'say 3' is ~0. all time spent in Moose init. 18:23
I'm likely doing some things wrong (repeatedly unfreeze/freezing classes).
though more limited than elf_e and elf_f, elf_e_nomoose can be used for timing comparison. 18:24
-/X means the parse worked. C/d means Compile failed (using "saw the test plan line" as a proxy for this), and d_ied (non-zero exist status). 18:26
-/X worked/didn't
*non-zero exist status after seening the plan line.
moritz_: what is the debian package name for 1.9? 18:28
moritz_ mncharity: ruby1.9
mncharity thanks 18:31
pugs_svnbot r20424 | putter++ | [elf] elf_f_src/run-tests.result added.
mncharity woo hoo 1% :)
18:39 araujo left
pugs_svnbot r20425 | putter++ | [STD_red_run] Ruby 1.8 is no longer supported. Now checks for 1.9. 18:46
r20425 | putter++ | README: Added Debian install guidance.
r20425 | putter++ | STD_red_run: Load yaml.rb only if needed. Marked it depreciated in --help.
r20425 | putter++ | moritz_++
18:47 araujo joined 19:06 rindolf joined 19:20 rindolf left
mncharity pmurias: If the objective was to compile elf_e with elf_f, that would be ./elf_f -I elf_d_src -I elf_e_src -x elf_e_src/Elf.pm -o elf_xx. If the objective was to self compile elf_f, that would be ./elf_f -I elf_f_src -x elf_f_src/Elf.pm -o elf_xx . 19:22
command lines would obviously be shorter in their respective _src directories, where the implicit -I . would serve. elf_e uses a couple of files from elf_d, thus elf_e's -I elf_d_src. If that's an issue, they would be easily copied. There's a list in elf/README under elf_e "Linkage". 19:24
cd elf_e_src; ../elf_f -I ../elf_d_src -I . -x Elf.pm -o ../elf_xx #well, not much shorter. and cd elf_f_src; ../elf_f -x Elf.pm -o ../elf_xx 19:26
hmm, looks like that -I ordering is different than perl's. fixing... 19:29
19:29 dalek left
Eevee is perl 6 intended to treat everything as utf-8 by default? I recall reading this somewhere in the docs years ago but it seems to have been delegated to a TBD syn15 19:29
19:29 dalek joined
Juerd Eevee: Depends on your defintion of "everything" 19:29
19:30 wknight8111 joined
Juerd Eevee: Reading files will probably default to reading raw bytes unless you indicate that these raw bytes represent text, in which case utf-8 would probably be a sane default indeed. 19:30
Eevee source code, variable names, constants, input, output, grandma's cake recipe, whatever
moritz_ Eevee: there will be some options to specify the encoding I think 19:31
mncharity ruby uses magic comments. eh.
Eevee Juerd: isn't that a bit backwards from what we have now? binmode and all
mncharity re source files, yes, my impression is utf-8 is the default. 19:32
19:32 pmurias joined
mncharity hi pmurias 19:32
Juerd Eevee: Well, yes and no.
Eevee: Perl 5 does not have types, so it has a single string form, instead of properly separated text and binary forms
pmurias mncharity: hi 19:33
Juerd Eevee: The default read mode in Perl 5 is a mixture of text and binary. The string you end up with can either be used as a byte string, in which bytes are just bytes, or as a text string (Perl will assumed the byte string was latin1 encoded)
pmurias typed the command from my head instead of the bash history (which suffers from screen)
mncharity ahhh 19:34
Juerd Eevee: "binmode" has a double function too: while it was originally there to specifically indicate that a file was *binary*, it can now also be used to indicate that it reperesents *text*...
Eevee: So it's kind of hard to answer that question.
Eevee: Mostly, it's a rather different philosophy towards data.
Eevee Juerd: *semantically* I have always taken a defaultly opened filehandle to be saying "this is latin-1 text, more or less, unless you treat it like it's not", and (original) binmode to mean "just bytes, period" 19:35
Juerd Eevee: Yes, that's the way Windows users will see it.
Eevee: As a Linux user, however, I never used binmode until encodings came around. So in my mind it is associated with text, and the default was raw. 19:36
mncharity I'm not sure what to do about elf's -I a -I b having the opposite @INC order as p5's. perl can collect them all and reverse them before unshifting them onto @INC, because it's only going to accept a single -e/file. I strongly wish to avoid that limitation, so an "each -I x means @INC.unshift x" makes sense... but is unquestionably going to burn people. :/
Juerd Eevee: You should note, though, that it's the string type that is text/binary hybrid, not the file reading itself. 19:37
Eevee so
mncharity maybe collect until the next -e/file, and reverse+unshift them then...
Eevee could the default be to just have my Str @lines = =$fh; give me utf-8 lines, and my Bin (or Blob or Binary or whatever) @bytes = =$fh; give bytes? 19:38
Juerd Almost. 19:39
Not "give" but "make interpreted as"
pmurias mncharity: svk pulling fixed the problem, no trying with nomoose 19:40
Juerd It's likely that binary containers and binary streams will have a property indicating the character encoding for text that has to be coerced into this binary string.
And that will probably default to UTF-8.
This said, I hope you will get a nice warning if you try to read a text file without indicating that it is a text file.
mncharity perl6: my $a = [3,4,5]; say $a 19:43
exp_evalbot kp6: OUTPUT[3 4 5␤] 19:44
..pugs: OUTPUT[3 4 5␤]
..rakudo: OUTPUT[345␤]
Eevee would really rather have it the other way; utf8-compatible text has to be the most common type of file opened directly by perl code. binary files are probably largely handled by modules anyway (GD, im, etc)
pmurias just hopes latin-1 won't be the default for anything 19:45
Juerd Eevee: Perhaps indeed the default mode should be text. 19:46
Eevee: Good point there.
Eevee: In any case, the default should be EITHER text OR binary, no magic or heuristics. 19:47
moritz_ right
Eevee yes
moritz_ perhaps it should be test, and encoding is detected by BOM and locales
Eevee hm, locale might be fair 19:49
pugs_svnbot r20426 | putter++ | [elf] elf_f -I ordering now more closely resembles perl's. pmurias++
r20426 | putter++ | ./elf_f -I a -I b -e 3 -I c -I d -e 'say @*INC.flatten' #=> cdab.
Eevee well. then I wonder about people writing perl 6 programs that read e.g. configuration files.. which will spectacularly break for anyone in another country 19:51
of course the opposite happens if perl 6 assumes utf-8 all the time and someone tries to open a shift-jis text file
well, that sucks
19:53 gbacon joined
Juerd moritz_: BOM is heuristics. 19:54
moritz_: There's no certainty with BOMs. Maybe the FE FF was really 2 iso8859 characters...
moritz_: So no BOM detection please :) 19:55
Eevee BOMs don't seem to be quite ubiquitous anyway
mncharity perl6: my $a = [3,4,5]; my $b = [6,$a,7]; say $a;
exp_evalbot kp6: OUTPUT[3 4 5␤] 19:56
..pugs: OUTPUT[3 4 5␤]
..rakudo: OUTPUT[345␤]
Juerd Quite the contrary :)
mncharity doh
moritz_ Juerd: how many real world texts do you know that are iso8859-* coded and start with what looks like a BOM?
pmurias mncharity: i didn't do anything to deserve the karma ;)
mncharity perl6: my $a = [3,4,5]; my $b = [6,$a,7]; say $b;
exp_evalbot kp6: OUTPUT[6 3 4 5 7␤]
..pugs: OUTPUT[6 3 4 5 7␤]
..rakudo: OUTPUT[63457␤]
Juerd moritz_: That's irrelevant.
moritz_: I don't want files to be read with detected encoding, ever.
moritz_: An exception can be made only for source code, because then you can still die if it turns out to be invalid data.
moritz_ Juerd: fact is that out-of-band signalling is too enerving for too many people
Juerd But once you're past compile time, please, no guessing! 19:57
moritz_: Other fact is that in-band signalling for this does not exist!
pugs_svnbot r20427 | pmurias++ | [elf_f]
r20427 | pmurias++ | added back the _nomoose variant
mncharity pmurias: re karma, if you hadn't asked the question, the issue would not have been noticed and resolved. seemed sufficient. ;)
Juerd moritz_: A byte order mark is to indicate the byte order, not to indicate the encoding.
moritz_: That is: if you use UTF-16 (UCS-2), the byte order mark is relevant.
moritz_: Don't read "encoding mark" when it isn't that. 19:58
Eevee perl6: my $a = { foo => 42 }; my $b = [1, $a, 2]; say $b;
exp_evalbot kp6: OUTPUT[1 foo 42 2␤]
..pugs: OUTPUT[1 foo 42␤ 2␤]
..rakudo: OUTPUT[1_block152␤]
Eevee well. at least _block15 is a little less intimidating than HASH(0x3484a6) 19:59
moritz_ Juerd: but if *know* that something is UTF-16 then you already had some meta information, meaning that you could have transported the byte order information just as well
Juerd moritz_: Yes.
moritz_: But some unicode consortium thingy thought UTF-16 would be used for small strings with no metadata. And it is, by Microsoft, but they don't use BOMS either. 20:00
pmurias mncharity: elf now does it differently than perl6 20:01
* perl5
moritz_ Juerd: the more I learn about all that charset and encoding stuff the more I begin to hate it ;) 20:02
pmurias mncharity: karma is sort of arbitrary, so it's ok
moritz_ Juerd: and I learn about more and more methods that they are not applicable where I thought they would, without learning good alternatives ;) 20:03
mncharity pmurias: "elf now does it differently than perl6", perl6? 20:04
ah, perl5
re differently, for command lines which are valid in both, -I behaves the same in both, no?
pmurias perl elf_e_nomoose -I a -I b -I c -e 'say @*INC.join(" ")'
versus 20:05
perl -I a -I b -I c -e 'print join(" ",@INC),"\n"'
Juerd moritz_: Well, if there's anything to hate, then it's the way the English speaking world has dealt with the issue so far: by ignoring it altogether.
mncharity looking...
pmurias sorry
Juerd moritz_: And since that community has invented most of the basic computer stuff, the problems are pretty thorough.
pmurias my mistake
Eevee 127 extra high-ascii characters and we used them for drawing box art
granted, it was pretty cool box art.. 20:06
mncharity ah, np
moritz_ Juerd: they're not the only ones. Quite many Germans think that ASCII = Latin 1 and everything should work with that
Juerd moritz_: As for learning methods that you thought would be applicable: you're trying to solve the problems that history created, thinking they CAN BE SOLVED. Most can't. A simple (yet thorough) redesign is required, including the way you think :)
Eevee someone should probably write down whatever comes out of these discussions so they have a chance of affecting anything :P
Juerd moritz_: Well, maybe it's the latin1 speaking countries then :)
The Dutch are equally guilty indeed. 20:07
moritz_: There are only a few (very few) basic principles that one has to learn
moritz_ Juerd: I tried to think of some systems that could solve the problem thoroughly, and I always ended in great complexity
Juerd 1. Text and binary are different kinds of string
2. They're incompatible and can NEVER be mixed
3. They can be converted: text can be expressed as binary with an /encoding/ 20:08
4. The encoding must be signalled out of band, or set in stone.
5. No binary string can ever represent text without an encoding
That's it.
moritz_ agreed
Juerd But people try:
moritz_ but 4. allone is quite tough
Juerd a. To "detect" the encoding
b. To "signal" the encoding IN BAND 20:09
c. To mix text and binary, because they think character == byte
d. To mix text and binary, because they think there's a default way to convert that's suitable for every purpose
And they're wrong...
moritz_: 4 more or less implies the rest, yes. 20:10
moritz_ problem is that a utility as simple as 'cat' can break all of your system
unless *every* string on your whole system is either assumed to be binary or of a fixed encoding 20:11
Juerd Yes.
That's part of the thoroughness of the problem.
"Text files" have no metadata that says which encoding it is. 20:12
moritz_ and most unix file systems don't have a handy way for out-of-band signalling
Juerd HTTP in common practice is a good example of how good and bad design meet.
Good design: HTTP has a Content-Type header with a charset attribute
Bad design: there's no way we can store these things on disk, in unix
So web servers do a lot of guessing, and let you manually hack in the values in the config 20:13
moritz_ Good design: it is *specced* that all HTTP headers themselfes are sent in ASCII
Eevee maybe when filesystems with arbitrary metadata catch on a bit more
Juerd Yes, that too is good design. That's the "set in stone" part, which is needed for arbitrary encoding signalling of course :)
20:13 schmalbe joined
Juerd Eevee: It doesn't have to be arbitrary. Really, people want to solve way too many problems at once. 20:14
moritz_ Eevee: it's a chicken-and-egg problem. You don't invest time in making a file system store meta data if you have no good way to use it
Juerd Only one part of metadata that is really important, is missing in common filesystems: content type (with charset)
That's ALL
Simply because we're used to using binary files with in-file metadata for everything.
moritz_ Eevee: for example if you can't add that metadata to a stream, 'cat' will still break even if the file system knows the encoding
Juerd We just need to know how to interpret the in-file metadata... 20:15
Eevee well, arbitrary or not; just saying arbitrary because people may want to add some other tag without patching every fs under the sun
moritz_: well, damn
pmurias Juerd: why not use a file attributes?
pugs_svnbot r20428 | putter++ | [elf_f] Inlined the Perl6::Say implementation, and tweaked it to flatten ARRAYs. So 'say @*INC' works.
Juerd moritz_: Using "cat" that way is bad, though. It doesn't feel bad because we're so used to it, but it is.
pmurias: I don't know what you mean.
moritz_ another issue is system calls - they are nearly all binary 20:16
Juerd Yes
moritz_ but you don't think of, say file names, as binary data
20:16 icwiener joined
Juerd Pervasive replacement is required 20:16
moritz_ you want to *read* file names
Eevee Juerd: if you can't flag the content type of a stream, all pipelines are potentially broken
not just cat
Juerd Or re-consideration of the meaning of a nullbyte :)
US-ASCII\0/etc/passwd\0
:)
pmurias it's possible to attach bits of that to files in linux (maybe with some sort of extension) never needed it myself 20:17
mncharity for some value of "works". Looks like pugs/kp6 and rakudo/Perl6::Say differ on whether it should be join(" ") or join(""). elf wen't with the latter.
Juerd Eevee: Yes, but pipelines are for *content*. That's okay. Some *other* means, *out of band* indeed, can be created
Eevee: export PIPE_ENCODING=UTF-8 and the problem is fixed.
You then only need programs to look at this variable.
mncharity say() should be rewritten in p6 soon anyway.
Juerd In fact, s/PIPE/CONTENT/
pmurias Juerd: en.wikipedia.org/wiki/Extended_file...utes#Linux
Juerd pmurias: I'll read that later. Thank you. 20:18
Eevee hm, true
mncharity bbiab &
20:19 rindolf joined, jhorwitz left
Juerd Eevee: This can work for one important reason: Unix utilities are often designed to do one thing well. 20:20
Eevee: Which often means they won't open two completely independent streams, where one should have a different encoding than the other.
Eevee: Except when the utility is built for specifically that purpose, in which case it becomes very acceptable to use command line arguments instead.
.oO( iconv )
20:23 sscaffidi left 20:24 icwiener_ joined 20:27 Lorn joined
kolibrie mncharity: S02 says: array interpolation, the elements are separated by a space 20:28
20:28 pmurias left
kolibrie mncharity: a list of pairs will interpolate with a tab between the key and value, and a newline after the pair 20:28
20:37 justatheory left, justatheory joined 20:38 icwiener left 20:41 mj41 joined
spinclad kolibrie: but C<say @*INC> isn't interpolating per se? 20:46
nor C<say @b>
perl6: my @a = [1,2,3]; say "@a" 20:47
exp_evalbot kp6: OUTPUT[@a␤]
..pugs: OUTPUT[@a␤]
..rakudo: OUTPUT[@a␤]
Eevee haha
consistent at least
spinclad perl6: my @a = [1,2,3]; say "{@a}"
exp_evalbot kp6: OUTPUT[{@a}␤]
..pugs: OUTPUT[1 2 3␤]
..rakudo: OUTPUT[{@a}␤]
spinclad pugs++ at least 20:48
moritz_ perl6: my @a = [1, 2, 3]; say "@a[]"
exp_evalbot kp6: OUTPUT[1 2 3␤]
..pugs: OUTPUT[1 2 3␤]
..rakudo: OUTPUT[@a[]␤]
moritz_ kp6 does this one right as well
spinclad oop, right, pugs--, kp6++
Eevee hm
moritz_ spinclad: why?
Eevee rakudo: my $a = 1; my $b = [2]; say "$a | {$a} | $b | {$b}"; 20:49
exp_evalbot OUTPUT[1 | {1} | 2 | {2}␤]
moritz_ "{@a}" *should* interpolate, you know
pugs++
because {...} is an interpolating closure
and @array[] and %hash{} should also interpolate
spinclad ESHORTOFCOFFEE
Eevee how often does evalbot update, out of curiosity?/
spinclad kp6: half marks 20:50
exp_evalbot r20428: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bd4c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824bd4c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
moritz_ Eevee: I'm looking right now, don't know it off-hand 20:51
0-59/3 * * * * cd pugs && /usr/bin/svn up >> /home/evalenv/pugs.log 2>&1 20:52
0 * * * * sh /home/evalenv/build-parrot.sh >> ~/parrot.log 2>&1
but I'm at loss which scripts actually *rebuilds* pugs, parrot and rakudo
pugs: say %?PUGS_VERSION 20:53
exp_evalbot OUTPUT[*** Undeclared variable: ("%?PUGS_VERSION",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb689db84>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb68a6bc8>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb689d020>,
..pe_flags = MkEntryFlags {ef_isContext = False}, ...
moritz_ pugs: say $?PUGS_VERSION
exp_evalbot OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r18093)␤]
20:55 ispy_ left 20:57 TJCRI left
moritz_ rakudo: sub foo { say $^b, ' ', $^a }; foo(1, 2); 20:57
exp_evalbot OUTPUT[2 1␤]
moritz_ that's a feature from 2008-05-11 04:23:21 +0200
Tene++ btw ;)
Eevee: sorry, can't find the info. Never investigate a running system ;) 20:58
Eevee oh well
I will take this to mean "frequently"
caret-vars pull from the argument list in alphabetical order right 20:59
moritz_ daily or better
Eevee (can't wait to see what sort of tangled messes people make from that)
moritz_ Eevee: perl *always* allows gives you enough rope to shoot into your own foot ;) 21:00
Eevee that is some heavily-starched rope
moritz_ ;) 21:01
Eevee at least this is more the "obvious sane usage but be an ass if you want" type of rope rather than "let's tell everyone to create global things that are sorta like variables" rope (p5 filehandles..) 21:03
kolibrie spinclad: yeah, I do not remember the spec mentioning specifics of pretty-printing variables that are not being interpolated in a string 21:10
Eevee imo it shouldn't be any different 21:11
especially now that arrays aren't flattened 21:12
kolibrie kolibrie: that is my thought, as well 21:13
Eevee actually. I wonder if say() should act like python's print and add spaces between its arguments 21:14
if it doesn't already
perl6: say 1, 2;
exp_evalbot kp6: OUTPUT[12␤]
..pugs: OUTPUT[12␤]
..rakudo: OUTPUT[12␤]
moritz_ Eevee: nooo, that's what join() is for ;) 21:17
21:17 rindolf left
Eevee the point of say() in the first place is that \n is the common case :P 21:20
is there still a top-level join, or just a list method? (or a string method, but that's terrible and guido should feel very bad)
moritz_ there is @list.join($delim) and join($delim, @list) 21:22
Eevee hm 21:23
perl6: say [1, 2, 3].join(','), "\t", (1, 2, 3).join(',');
exp_evalbot kp6: OUTPUT[1,2,3 1,2,3␤]
..pugs: OUTPUT[1,2,3 1,2,3␤]
..rakudo: OUTPUT[1,2,3 1,2,3␤]
Eevee oh wow, I didn't think the latter would work 21:24
21:25 syle joined 21:26 Lunchy joined 21:28 schmalbe left 21:30 cmarcelo left 21:37 ludan joined 21:39 dduncan joined 21:41 lisppaste3 left
dduncan question - what is a good generic word/term to use to refer to operations where you are one-way mapping a larger domain of values to a smaller domain of values, for the purpose of doing soft comparisons of 2 values where you want some hard differences to be treated like they were identical ... 21:43
mainly I'm thinking of text strings here ...
moritz_ dduncan: hashing?
dduncan so specific examples of the operations are case folding to upper or lower ...
or trimming spaces
21:43 icwiener_ left
dduncan or removing accents 21:43
moritz_ canonicalize? 21:44
canonize?
Eevee fuzzing? consistent..izing?
moritz_ whatever
Eevee oh
dduncan I thought of using the term 'fold' or 'degrade', but I'm not sure if that's best
Eevee that's much better than making up words
moritz_ bring into a canonical form
dduncan maybe canonical might work?
moritz_ it's the best word I've found for it
pugs_svnbot r20429 | putter++ | [elf_f] 'use lib "x";' support.
moritz_ I used to calculate canonical forms of sudokus to be able to compare them 21:45
dduncan the context I'm asking in is that I'm creating a namespace in my Muldis D programming language to group together the casefolding and trimming etc functions, and I was wondering what to call the namespace ...
maybe Canonical or some such is it? 21:46
21:46 rdice left
moritz_ Canonical or ComparisonFolding 21:46
21:47 cjfields left
moritz_ although I like "frobbing" much better than "folding" ;) 21:47
dduncan the rational for grouping such things is that the language's equality test operator always matches exactly, so eg different case means unequal ... but people often want to compare things with ignoring eg spaces or case or accents
21:47 Juerd joined
dduncan so then to do soft matching, one would not compare the originals, but the result of using these functions 21:47
moritz_ ... or in a certain unicode normalization
ah, "normalization" is another good word 21:48
dduncan eg in some SQL dialects where you have to say upper(foo) = upper(bar) ... I don't support foo=bar matching different cases
I thought of Normalization too
moritz_ canonical sounds a bit mathematics-like and not very intuitive
dduncan but wasn't sure if that would confuse some concepts, eg unicode normalization form, which is an implementation detail, or normalizing tables 21:49
this all said, its not like I can't just pick something now and change it later, so "good enough" is good enough for today
moritz_ right, especiall the normalization forms might be a souce of confusion
dduncan also, rounding a number is a form of normalization too, but this namespace is specific to character strings 21:50
anyway, thanks for your help
I think I'll try Folding for now, and maybe change it later 21:51
that should at least evoke the case-change subset of the namespace 21:52
or Canonical or Normalize ... I can always document what I'm actually talking about 21:53
any votes between those then?
Eevee guess I'd vote for canonical[ize]?
dduncan okay
moritz_ votes against Normalize 21:55
can't decide between the other two
dduncan okay
narrows it down
21:55 lisppaste3 joined
dduncan as an update (I'm also talking on the dbix-class list), its looking like 'fold' is a better term, more specific ... also I was pointed to www.symbian.com/developer/techlib/v...guide.html 22:09
lambdabot Title: Folding and collation (comparing strings) in Descriptor concepts, tinyurl.com/6pgzdq
pmichaud dduncan: the traditional term is "folding" 22:12
as in "case folding"
that's what Unicode uses, anyway.
dduncan yes, folding 22:16
22:17 ludan left
meppl good night 22:31
22:32 meppl left 22:33 cls_bsd joined 22:40 eternaleye left
mncharity kolibrie: btw, re interpolation, thanks 22:51
pugs_svnbot r20430 | putter++ | [elf_f] Tolerate seeing pointy blocks. <a b c> is no longer a string.
mncharity pmurias: thanks for elf_f_nomoose. run-tests needs to be tweaked to run different elfen. I'm tempted to rename elf_f_nomoose elf_f_faster or some such. 22:53
end of hacking day for me. good night all &
22:53 mncharity left
moritz_ good night 22:54
23:17 cjfields joined 23:19 eternaleye joined 23:24 rafl joined 23:30 cjfields_ joined
Tene Eevee: yes, caret vars are alpha-sorted in rakudo, and colon-vars work too 23:31
23:32 cjfields_ left
Tene perl6: sub f { say $^b, $^a }; f(1,2) 23:32
exp_evalbot kp6: OUTPUT[␤]
..pugs: OUTPUT[*** Undeclared variable: ("$^b",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb67b6d40>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb67bb480>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb67b8238>,
..pe_flags = MkEntryFlags {ef_isContext = False}, pe_store = ...
..rakudo: OUTPUT[21␤]
Eevee awesome, rakudo++
Tene perl6: sub f { say $:b, $:a }; f( :a(1), :b(2) ) 23:33
exp_evalbot kp6: OUTPUT[error in Block at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Sub.pm line 362, <> line 1.␤*** Syntax Error in sub '': missing closing curly bracket ␤]
..pugs: OUTPUT[*** ␤ Unexpected ":b"␤ expecting "::"␤ at /tmp/rL4EuS8ffC line 1, column 14␤]
..rakudo: OUTPUT[21␤]
Tene also @_ and %_ 23:34
23:34 armagad left 23:36 fridim_ left 23:46 cjfields left 23:50 cmarcelo joined