pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ | ~330 days 'til Xmas
Set by mncharity on 25 January 2009.
TimToady std: [R!===] 1,2 00:00
p6eval std 25114: OUTPUT«can't create lex/STD/prefix_circumfix_meta_operator__S_081reduce_03.store: Permission denied at Cursor.pm line 534␤00:02 33m␤»
s1n pmichaud: decide on a vcs yet? 00:13
pugs_svn r25115 | lwall++ | [STD] more infix whackage to fix non-HASH error, simplify some of the cases 00:20
TimToady std: [R!===] 1,2 00:22
p6eval std 25114: OUTPUT«00:02 35m␤»
TimToady std: $a X+ $b
p6eval std 25114: OUTPUT«Not a HASH reference at STD.pm line 12278.␤00:02 33m␤» 00:23
TimToady well, gotta wait again...
[particle] *yawns* 00:25
(with squeaky-clean teeth)
shinobi-cl the perl6 wiki at wikia.com now has 47 articles! Some good, some not so good :) All worth a look 00:37
pugs_svn r25116 | lwall++ | [STD] prev patch was malformed...
TimToady std: $a X+ $b 00:45
p6eval std 25116: OUTPUT«00:02 33m␤»
TimToady std: $a X>>+<< $b
p6eval std 25116: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/oqJjcUHUGW line 1:␤------> $a X>>+<< $b␤ expecting any of:␤ infix␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ terminator␤00:02 33m␤» 00:46
TimToady wait again...sigh
mtnviewmark by the by --- I got STD.pm to all work on Macintosh... if that is why you're executing here 00:47
diakopter s1n: yeah... see github.com/rakudo/rakudo
moritz_: how to update p6eval to rebuild rakudo from git? 00:48
(not to mention parrot from the new subversion) 00:49
TimToady std: $a X>>+<< $b 00:57
p6eval std 25116: OUTPUT«00:02 33m␤»
TimToady std: $a X«[+]»X $b 00:58
p6eval std 25116: OUTPUT«00:02 33m␤»
TimToady std: $a RX«[XR/]»= $b 00:59
p6eval std 25116: OUTPUT«00:02 34m␤» 01:00
diakopter TimToady: /me asks to ask about try5... what is it? 01:01
TimToady something ancient to run STD--dunno if it even still works 01:04
diakopter ohh... ok.
TimToady I just use tryfile or viv mostly these days
diakopter is there a way to feed the parser only a bit of input at a time from another prog? 01:05
that is, can the parser digest a 'partial' bit of syntax? 01:06
and return the tree
(created thus far)
(esp. if the parser is still inside some node(s)) 01:07
frew can anyone tell my why this perl5 is wrong: perl -E "$frew //= 'frew'" 01:10
I've never been able to get //= to work
(note: this is 5.10)
diakopter frew: works for me? 01:13
frew weird 01:14
diakopter what's your error message?
frew I get: can't modify pattern match (m//) in scalar assignment at -e line 1
but I am typing perl -E
diakopter what about perl -v
frew v5.10.0 01:15
diakopter frew: which shell/OS
TimToady you can call the .parse method, but that doesn't let you continue a compilation unit
frew: probably the shell is interpolating $frew
frew zsh
mmm
good call
ubuntu
diakopter frew: works for me (on windows/cmd.exe!)
frew backslashing the $ gives no errors
[particle]1 or using single quotes
frew yep 01:16
thanks friends!
diakopter TimToady: any suggestions for creating callbacks/hooks? 01:17
TimToady viv demonstrates one way to get callbacks at reduction points 01:17
diakopter or, setting 'breakpoints' or something
TimToady all right, finally back to 100% passing for make testt 01:29
TimToady feel free to break STD :) 01:29
you'll note, btw, that it uses considerably less memory now 01:30
diakopter TimToady: if you're available/willing/eager, a walkthrough of viv?
or just more POD?
or comments?
:)
TimToady well, have to leave for an airplane shortly, but basically $::ACTIONS tells what package to call methods in, and the AUTOLOAD is what gets the callback. you can ignore everything else, more or less 01:32
TimToady just cp tryfile, set $::ACTIONS, and you'll get callbacks 01:33
what you do with 'em is up to you
diakopter TimToady: thanks :) safe travels
TimToady or use viv as a base, to get something more like AST 01:34
with nodes blessed by type 01:35
diakopter whither reduction points?
TimToady end of any rule, implicitly, plus any explicit {*} point 01:36
grep for REDUCE in any of the pmc files to see the mechanism
diakopter so when the parser reaches a {*} it assumes its current hypothesis parse is correct..? 01:37
TimToady it doesn't really assume anything much yet
if your reduction actions have side effects outside the match tree, then you could have problems if it backtracks 01:38
pugs_svn r25117 | frew++ | [t] added named arg tests for join
TimToady viv pretty much keeps the AST as element '' of the current match node though
diakopter thinks ** 01:40
frew the is export in a method sig is what makes a method become a function right?
diakopter TimToady: what's next on viv's plate 01:41
TimToady was gonna write a gimme5 replacement
diakopter emit_p5 01:42
TimToady nod
diakopter just for STD, or truly vi->v
TimToady for anything coreish that we want for a bootstrap 01:43
diakopter ohh
TimToady so eventually Cursor.pm maybe
which is why it's currently .pmc :)
frew rakudo: my @f = 1,2,3; join(',', @f); 01:44
p6eval rakudo 36153: RESULT«"1,2,3"»
diakopter so, the bootstrapped will be vivi? or vivivi? ;)
TimToady vivaldi maybe :) 01:46
TimToady but if one of the other implementations starts running STD.pm correctly, it would be unnecessary 01:47
diakopter tinkers with lli(.exe) 01:50
thinking about toying an llvm front-end
frew Hey guys, sorry to ask again, but I don't want to miss some tests, the is export in a method sig is what makes a method become a function right?
and without the "is export" I don't need to add the named arg test to the function? 01:51
TimToady unless someone defines the function separately. the is export is merely a way to alias a function sig to a method body 01:57
frew ok, so like, for example, join is not listed as is export, but I still need to add the named arg test to that right? 01:58
TimToady yes 02:01
frew alright 02:02
pugs_svn r25118 | frew++ | [t] added named arg tests for reverse 02:05
TimToady afk & 02:17
s1n diakopter: is rakudo still in the parrot repo? i relocated and it's still there... 02:38
diakopter s1n: I presume someone will remove 'perl6' at some point... 02:54
but regardless, I think pmichaud renamed it 'rakudo' anyway
s1n the configure step doesn't work since pmichaud changed the language to rakudo 02:56
diakopter which configure step
s1n there's only 1 heh
still looks for and makes the makefile in parrot/languages/perl6 02:57
i don't know enough about parrot build tools to know how to better sever that link
diakopter Configure.pl ? and where did you get it
s1n out of the rakudo github 02:58
diakopter oh ok; just checking.
s1n i'd have to move that checkout within the languages folder
diakopter your rakudo github repo is in languages/ as 'rakudo', right?
s1n it is now 02:59
it wasn't before, i was overly optimistic about the move
diakopter s1n: ah... I would suspect it will/should remain as 'rakudo' 03:00
PerlJam eventually rakudo's configure script will be smart enough to find an installed parrot or download a parrot, etc. and ask the user which parrot they want to use. 03:02
s1n PerlJam: yeah i know eventually it should be self-hoisting almost, but i'm wanting to play with it now :)
alester I do believe I'm going to try some rakudo.org updating 03:40
pugs_svn r25119 | frew++ | [t] added named arg tests for Lists, exists, and abs 03:56
s1n pmichaud: ping 04:28
pugs_svn r25120 | s1n++ | [spec] added a test for empty enums 05:01
s1n std: class A is also { method foo() { say "OH HAI" } }; my $t = A.new; $t.foo(); 05:07
p6eval std 25120: OUTPUT«00:04 34m␤»
mtnviewmark std: $a !% $b 05:50
p6eval std 25120: OUTPUT«00:02 33m␤» 05:51
mtnviewmark std: $a !* $b
p6eval std 25120: OUTPUT«############# PARSE FAILED #############␤Only boolean infix operators may be negated at /tmp/6ZH6SqlSzw line 1:␤------> $a !* $b␤00:02 33m␤»
mtnviewmark hmmmm.....
wonders how % got to be boolean infix!
araujo I bet we should blame TimToady 05:53
:-P
mtnviewmark I noticed that he updated the S03 to point out that !% was allowed 05:54
but I didn't see how it was in STD.pm
oh! 05:59
token infix:sym<%> ( --> Multiplicative)
{ <sym> <?{ $<O><returns> = 'Bool'; }> } # Allow !% operator
special cased -- but lying about the return type of %
fie- now I'm back to having to indicate which metaops can apply to which other ops... 06:00
mtnviewmark std: $a R<= $b 06:17
p6eval std 25120: OUTPUT«00:02 33m␤»
mtnviewmark std: $a R== $b
p6eval std 25120: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/IPvOnNSdJs line 1:␤------> $a R== $b␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ infix_prefix_meta_operator␤ standard stopper␤ statement modifier
..loop␤ terminator␤00:0...
Tene So, what's the motivation for this "reverse a binary op" metaop? 06:23
mtnviewmark so that you can pass just an operator to sort to get a sort in the other order
sort &[cmp] (3, 1, 4, 5, 9) 06:24
sort &[Rcmp] (3, 1, 4, 5, 9)
std: 'a' Rp5=> 'b' 06:25
p6eval std 25120: OUTPUT«00:02 33m␤»
mtnviewmark std: 'a' R=> 'b'
p6eval std 25120: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/9LRXxFCP5d line 1:␤------> 'a' R=> 'b'␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ infix_prefix_meta_operator␤ standard stopper␤ statement modifier
..loop␤ terminator␤00...
mtnviewmark okay - that's pretty silly! 06:26
there is a restriction that R can't apply to operators that start with '='
mind you -- R==, R=:=, R=== and such aren't really useful
std: $a R:= $b 06:27
p6eval std 25120: OUTPUT«00:02 33m␤»
mtnviewmark okay, so the restriction on = is silly
std: [&&] ($a, $b, $c) 06:50
p6eval std 25120: OUTPUT«00:02 35m␤»
mtnviewmark std: [=] ($a, $b, $c)
p6eval std 25120: OUTPUT«00:02 35m␤»
TimToady the restriction on = was not to prevent those operators from working, but to stop infix from parsing a shorter op followed by an assignop =, which it was doing for some reason. 06:57
but it looks like the fix is buggy
mtnviewmark oh - hello! 06:58
just about to send a bunch of thoughts
there - sent
is that also why you couldn't just defined infix:sym<!%>, rather than fudge it's return type decl 06:59
(and where *did* the idea for !% come from?)
TimToady I just got tired of seeing $x % 3 == 0 forever and ever 07:03
and in theory, since any value can be treated as a boolean, we can afford to relax the constraint a bit 07:04
esp now that we don't do LTM on complete metaops
mtnviewmark it is a little sad that !% reads as "not-mod"
TimToady yes, but you can think of it as no-remainder 07:05
mtnviewmark so, let's see.... $a !* $b means ($a == 0) | ($b == 0)
mtnviewmark and $a !+ $b means ($a == - $b) 07:05
TimToady yes, well, it's not clear how much of that we want to encourage either :) 07:06
mtnviewmark is % defined as remainder or as modulo?
Avada modulo
mtnviewmark perl: say -1 % 5
TimToady but rather than marking operators with "returns Bool" and such, I think we can mark them for whether they respond to a given metaop, like :assign 07:07
so those ops would be :not or some such
mtnviewmark :assign :negate :reduce
TimToady negate has a problem
mtnviewmark :assignable :negatable :reducable
TimToady still a problem, since -$x is a negation too
mtnviewmark perl6: say -1 % 5 07:08
p6eval pugs, rakudo 36153: OUTPUT«4␤»
..elf 25120: OUTPUT«Undefined subroutine &GLOBAL::infix__37 called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
mtnviewmark oh - did the perl5 bot notice that pugs and rakudo gave the same output and coalesced them? 07:09
TimToady *nod*
mtnviewmark cool!
TimToady well, sometimes I wish it would just line them all up better though, but this is fewer irc lines anyway 07:10
mtnviewmark but we are only defining the adverbs that describe the characteristics of operators --- so that -$x is a negation has nothing to do with the concept here 07:10
mtnviewmark :assign-form :negate-form :invert-form :reduce-form 07:11
pugs_svn r25121 | lwall++ | [S19] more comments
r25122 | lwall++ | [S02] random clarifications 07:12
mtnviewmark or :workswithmeta<assign invert reduce>
though I suppose that could be just
:metable<asign invert reduce>
TimToady :meta<R ! =>
mtnviewmark there ya go 07:13
TimToady but how do you spell hyper?
mtnviewmark well - some meta ops seem like they can always apply to EVERYTHING
since they aren't really about the op, but about how to use the op 07:14
cross and hyper seem like that
(though I don't understand how X of an assignment op could work...)
TimToady yeah, and X= unfortunately parses the wrong way 07:15
mtnviewmark ($a, $b, $c) X[*=] (3, 5, 7)
TimToady [X]= is potentially useful though
mtnviewmark yes - that I understand
I'm just wondering if the above is the same as 07:16
($a, $b, $c) »* 105
TimToady probably
mtnviewmark but returning some odd matrix
TimToady well, it's definitely enough rope to shoot everyone in the room's foot 07:18
mtnviewmark for that matter why put restrictions on R or ! at all? If you can get it through the parser, then why not?
for example, if !op means "apply the op, then interpret the result in Boolean context, and then invert" -- 07:19
let it work on everything
Rop seems similarly reasonably unencumberable (is that a word?) 07:20
TimToady though people may get into trouble with 1,2,3 R= @foo
mtnviewmark [cmp], does, admittedly, seem not very useful... but
not to mention $a [[*=]=]= 7 07:21
TimToady well, cmp isn't associative, and we currently disallow it
mtnviewmark does [op] imply left to right order?
if so, then while odd, [cmp] would have a clear meaning 07:22
TimToady and since $a cmp $b cmp $c would blow up, so should [cmp], seems like
mtnviewmark hmmmm... which leads me to realize that Xff probably is actually not workable at all -- though legal at present 07:23
or... [ff]
TimToady all the thunky ones are a bit problematic
mtnviewmark well, okay, so if you do something like :meta<R ! => and such 07:24
then you just need to decide if you need to declare crossable and hyperable too
TimToady maybe it'd be better to mark the ones that don't work
mtnviewmark :nometa<=> 07:25
:nometa<!>
TimToady on the presumed innocent principle
mtnviewmark ah - and that would incline user defined operators to be meta'able
mtnviewmark has no idea how to write that in English! 07:26
TimToady well, most would be anyway, if they equiv an existing operator prec
mtnviewmark or the "presumed meta'able" priniciple
"presumed meatball" principle?
I like :nometa ! 07:27
the full set would be:
:nometa<= ! R X [] «»>
I suppose that isn't going to work for prefix and postfix hyper -- given how they are parsed.... 07:28
TimToady mostly I want to be able to catch common errors and tell the user what they really meant to do...
I'm not too worried about unary metas 07:29
mtnviewmark no - they are just free loops!
fruitloops! 07:30
TimToady well, they cost one character at least
mtnviewmark okay - see - now you can see that it is late and I'm puncy.... time for bed
TimToady I actually just arrive in Seattle...
TimToady *arrived 07:30
mtnviewmark I'm sorry - late flight!
TimToady we got in 20 min early, and then parked in the taxiway for 25 :/ 07:31
mtnviewmark funny scheduler, bizarre pipeline management 07:31
TimToady well 'night
mtnviewmark night!
pugs_svn r25123 | lwall++ | [STD] remove fossil that targeted -= 07:54
dduncan what's with the NFG / Normal Form G mentioned in the latest p6l post? I don't see any mention of that in unicode.org/reports/tr15/ ... did you mean NFC? 08:53
is it possible for all realistic combinations of diacritics and base letters to be represented by a single Unicode codepoint, including all language-dependent graphemes? 08:55
I thought NFC sort of did one codepoint per grapheme but there were a few exceptions ... I could be wrong on that point
mberends masak: mibbit.com++ 11:28
masak mberends: yes, I should have told you earlier. :) 11:38
mberends: I'm here for 10 more minutes, then I'm off to town.
mberends ah, 5 world minutes == 10 masak minutes 11:43
Matt-W well nobody was talking... 11:45
mberends I'm @work, and sneaking some #perl6 time now and then ;) masak's Druid installation instructions work well on Debian: github.com/masak/druid/ 11:56
moritz_ re 13:59
mberends Does anyone feel like trying some new Perl 6 code and giving your feedback? 14:02
pugs_svn r25124 | moritz++ | [t] delete rest of p6regex, richard++ 14:11
moritz_ mberends: yes, in a few minutes (or hours) 14:12
finanalyst moritz_: continuing discussion about t/examples/* I suggest moving them to the perl6 wiki as problems to be solved by those who want to get involved. 14:17
Then the t/examples/ directory can be cleaned out - psychologically good to see 14:18
moritz_ finanalyst: ok, approved 14:19
mberends There is a prototype 'perldoc' etc compatible with latest Rakudo, no known bitrot. I'm eager to get feedback. See the 'Try it out' in github.com/eric256/perl6-examples/b...d/Makefile 14:20
moritz_ I presume Rakudo hasn't moved out of the nest yet? 14:23
mberends the whole nest moved to github, with Rakudo inside ;) 14:24
afaict
moritz_ no, parrot moved to parrot.org, but stayed svn 14:25
(at least that's what parrot.org says) 14:26
mberends is this the master or a slave? github.com/rakudo/rakudo/tree/master 14:28
PerlJam moritz_: rakudo flew the coup and got a new name. 14:30
Well, it got the old name, but not in parrot 14:31
moritz_ so how do I build rakudo now? check it out in languages/rakudo of the parrot source tree?
PerlJam moritz_: yes. I don't know if it builds right off though. The last time I checked it was still in flux. 14:32
mberends: with git there are only peers :) 14:33
moritz_ well, but there can be a master-peer by convention ;-)
PerlJam github is the master-peer by convention then :) 14:35
mberends PerlJam: thanks. Is there then a git -> svn converter populating languages/perl6 at svn.parrot.org ? 14:40
PerlJam dunno. I haven't looked at languages/perl6 since the switch. 14:43
(I'd doubt it though)
ruoso Hello! 15:09
rindolf Hi ruoso 15:24
ruoso hi rindolf
Matt-W hello
pugs_svn r25125 | azawawi++ | [S:H:P6] version 0.039 includes the fast STD lwall++ along with perl6.vim 16:29
TimToady well, it's still not the "fast STD", but it's less slow... 17:24
moritz_ 22min on my machine to parse t/spec/
[particle]1 what was it before, moritz? 17:25
moritz_ [particle]: half an eternity :/ 17:25
aka "don't remember too well"
but I guess it was around 30 or 40 minutes 17:26
TimToady 26 minutes to do all of t/ 17:26
(here)
[particle]: checked in some more comments on S19
and made some conjectural emendations, see the diff 17:27
[particle] saw them, very nice, thanks!
rakudo_svn r36141 | fperrad++ | [codingstd] fix copyright for Makefiles 17:32
r36145 | pmichaud++ | [rakudo]: spectest-progress.csv update: 298 files, 6609 passing, 0 failing
r36149 | fperrad++ | [codingstd] fix coda of Makefiles
pmichaud I need to go review the latest STD changes now 17:33
well, not "now", but sometime soon. :-)
[particle] gets 362 failing spectests :( 17:34
moritz_ string branch fallout?
[particle] i wonder what broke...
pmichaud okay, time for lunch, then to finish up the details of the repository move. 17:35
TimToady if you make the second X in the old XopX optional, we can change the tests to Xop at some point 17:36
or I can just go ahead and break 'em all
[particle] break em 17:37
it's more important imo that the tests match the spec
pmichaud we should be able to fix the X meta pretty quickly in rakudo. 17:38
TimToady k 17:39
[particle] nopaste? 17:39
pastebot?
feh.
moritz_ see topic
[particle] wonders how to do that with pidgin... 17:40
moritz_ type /topic ?
(without the question mark ;)
[particle] for some reason, i thought that didn't work with this client, but indeed it does :)
#perl6 isn't listed at sial :( 17:41
moritz_ it used to be
[particle] failing rakudo spectests: sial.org/pbot/34801 17:42
pmichaud afk, lunch, errands 17:43
moritz_ pmichaud: could you please point rakudo's post-receive hook to timtowtdi.org:3333/ , then we should get IRC feeds here (no hurry though)
pmichaud moritz_: done. 17:46
moritz_ pmichaud: thanks
now we just need a push to test it ;)
pmichaud README is a good candidate :-)
moritz_ I don't have commit access I believe :( 17:47
pmichaud yes, you do.
moritz_ ok
pmichaud assuming your github id is "moritz"
moritz_ it is ;)
(what a coincidence)
pmichaud afk # bank, lunch, errands 17:48
moritz_ can anybody tell me how I can push changes to github? :/ 17:50
pugs_svn r25126 | lwall++ | [cross-metaop.t] change XopX to Xop 17:52
ruoso .oO( farewall $a XXX $b ) 17:52
pugs_svn r25127 | lwall++ | [STD] emit useful error on XopX 17:53
TimToady there's still XXX 17:58
and XXXX and XXXXX
Tene_ moritz_: git push 17:59
TimToady and RXRXRX
mtnviewmark right - but you probably want to shield your face when enter those places.... :-)
TimToady add a few more metaops and we could have XERXES
moritz_ Tene_: not that simple 18:00
Tene_ moritz_: explain?
moritz_ Tene_: seems I first have to set up some remotes 18:01
Tene_ moritz_: if you cloned from the url that you can push back to, you shouldn't have to do anything.
moritz_ Tene_: and where do I get that URL?
TimToady std: $a X*X $b 18:02
Tene_ moritz_: on the project page of the project you want to commit to
p6eval std 25127: OUTPUT«############# PARSE FAILED #############␤Old form of XopX found at /tmp/TJQj2OCTxT line 1:␤------> $a X*X $b␤00:02 33m␤»
TimToady std: $a XXXXXXXXXXXX $b
p6eval std 25127: OUTPUT«00:02 33m␤» 18:03
TimToady for when you're feeling very cross
mtnviewmark glaces at his chart that now needs fixing up
moritz_ Tene_: that says warning: remote HEAD refers to nonexistent ref, unable to checkout" on cloning
Tene_ eh?
TimToady hmm, some metops distribute vertically, and some metaops distribute horizontally, chartwise 18:04
Tene_ moritz_: I'll look at it in a bit. I'm late to get to work right now.
mtnviewmark families are vertical, types are horizontal -- with the exception that I put prefix/postfix hyper alongside,not under the four infix hypers 18:05
TimToady just thinking about which ones are transparent to precedence 18:06
mtnviewmark and they align with their forced, or most likely, precedence levels
TimToady those are horizontal 18:06
whereas ones that force precedence are more like normal operators
mtnviewmark The new chart has a symbol to indicate which meta ops take in the precendence and assoc of the underlying op
but I still put R and ! above the "intended" or rather "common" uses of it 18:07
really, I would have liked to put hyper ops over the math section --- but no room
there being so many hyper ops
TimToady maybe <[]> arrows on the box to indicate sideways mobility?
just an idea 18:08
mtnviewmark or "comic quotes" - that indicate an object is in motion... :-)
moritz_ damn, that git bot doesn't work 18:09
TimToady tail wagging lines :)
mtnviewmark btw, I might be induced to take up the Unicode synopsis challenge.... Unicode is one of my specialities!
but.. I'm disturbed by the loose use of terms in PDD28 - in particular, NFG isn't really a normal form of Unicode - it is a method of dynamically generating new character sets (per sting!) with their own encodings.... 18:11
for example "An NFG string is a sequence of signed 32-bit Unicode codepoints." is not sensical: there are no 32-bit Unicode codepoints!
TimToady it's normal inside :) 18:12
mtnviewmark sure - it is a "normal form" just not of Unicode!
don't get me wrong, I find the whole construction clever and useful
TimToady quasi-Unicode then
we can write the p6 synopsis differently
mtnviewmark just if I were to write it up, I'd be more rigorous about use of terms like codepoint and Unicode and encoding
TimToady that's cool
we invented NFG because there wasn't a standard term for it :) 18:13
originally I imagined a per-process table, not per string
mtnviewmark I do worry that NFG is well defined enough... there might be strings in Unicode that may be difficult to decide what to do under NFG
well - I would think that aspect would be, well, implementation dependent, yes? 18:14
TimToady well, we're not trying for language-dependent graphemes
mtnviewmark (oh, "that aspect" meant per-process vs. per-string vs. per-virtual machine, etc...) 18:15
TimToady per domain of some sort
just needs a well-defined boundary
and probably a DOS strategy
mtnviewmark (btw I spent a lot of time last Spring developing Unicode guidelines for my company. There is a huge internal doc on it, and this small, but fun, external doc: wiki.secondlife.com/wiki/Unicode_In_5_Minutes ) 18:16
was NFG to be based on NFC or NFKC compositions? It isn't clear 18:17
TimToady NFC, I think 18:19
if there's an NFC char, you always use it
s/char/codepoint 18:20
negative codepoints reserved for non-NFC mappable
mtnviewmark so, NFG wouldn't unify the Angstrom symbol with the A and small ring character
makes sense - just isn't spelled out in pdd28 - it leaves it unclear 18:21
TimToady don't want to lose that kind of information
mtnviewmark silly misclick.... 18:21
TimToady we specifically are not worried about round-tripping strings that are inconsistenly NFC/NFDish 18:24
you can always work at the codepoints level pragmatically if that's what you want 18:25
but by default we're really only concerned with preserving meaning to the user 18:26
mtnviewmark can you? If you work with a string at the grapheme level, and the revert to looking at codepoints, won't it be the case that the string will have been normalized in the process of generating the NFG form
TimToady not if you get ahold of the string before it became "no f*ing good"
code that wants to roundtrip at that level needs to control its inputs and outputs 18:27
mtnviewmark right - so conceptually, accessing a string in NFG form is mutating
TimToady depends on which definition of string you're using 18:28
mtnviewmark sure- if you want to keep the codepoint sequence in tact, DON'T access the graphemes
TimToady we can do the NFG transformation either eagerly or lazily
I think parrot chooses lazy for unicode in general
I guess the assumption is that lazy transformaion of some other character set to unicode is not supposed to be lossy, so should throw an exception 18:29
I'm more inclined to tell open to turn the input into NFG by default as soon as read in, but that's an implementation detail, at least until the exceptions start flying 18:30
the only exception NFC->NFG might throw that I can see is "I think you're trying to DOS my translation table, so forget it." 18:31
but given this is unicode we're talking about, I'm sure there will be other strange cases :) 18:32