Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
svnbot r6955 | putter++ | pugs: To find runjs/pugsjs/crude_repl, first check if it is in a known relative location (perl5/...), then use PATH. A kludge, but it seems plausible for now. 00:03
putter fglock_: so, I'm running a smoke with the real Test.pm. make test-perl5 now also works. so we'll see where we are. 00:06
ulimit -S -v 750000 and export PUGS_HACK_TIMEOUT=1000 are still a good idea when running make smoke-perl5 00:07
oh, it is nice to just be able to say ./pugs -B perl5 t/01-sanity/07-isa.t 00:09
00:10 chibiryuu`gone` is now known as chibiryuu
putter fglock_: so this problem still exists: "foo".isa("Str"), but not $x="foo"; $x.isa("Str") what's the right thing? 00:11
fglock_ $x isa Scalar 00:12
I'll check ... 00:13
ok, it's fixable - Scalar.pm line 232 00:14
putter having $x.isa("WhatsInTheScalar") seems more likely to be the right thing. perhaps $x.isa("Scalar") in addition?
ah, ok, looking
or did you want to do it? 00:15
fglock_ if the cell is empty, return ::CLASS, else return .fetch.isa()
looking... 00:16
putter empty is defined(cell->fetch) ?
fglock_ defined _('$:cell')->fetch 00:17
putter same thing i assume for ->does(). what else? 00:18
fglock_ ref ? (not sure)
no, ok - all other methods are ok, they are handled by AUTOLOAD 00:19
svnbot r6956 | iblech++ | * t/builtins/math/sqrt.t: s/is/is_approx/
r6956 | iblech++ | * t/builtins/strings/split.t: s/\$todo/:todo($todo)/ (same change as was needed
r6956 | iblech++ | for Test.pm in r6938)
r6956 | iblech++ | * util/smokeserv/smokeserv-server.pl: Prevent division by zero errors.
putter ok, so I have 00:20
'isa' => sub {
shift; my $tmp = _('$:cell')->fetch;
defined $tmp ? $tmp->isa(@_) : ::next_METHOD();
},
and obviously some tabs to crush.
fglock_ if param eq 'Scalar', return true 00:21
maybe
putter makes sense. true as in Bool->new? 00:22
00:23 Supaplex is now known as DeathWoIf, DeathWoIf is now known as Supaplex
fglock_ it should autobox, so it doesn't matter much 00:23
putter k
fglock_ but I usually return boxed
there should be a ruling for this 00:24
putter I now have
'isa' => sub {
my($cls)=@_;
return 1 if $cls eq 'Scalar';
my $tmp = _('$:cell')->fetch;
defined $tmp ? $tmp->isa($cls) : ::next_METHOD();
},
fglock_ nice 00:25
putter should 'Scalar' be something more inheritance sensitive?
or perhaps not to worry at this point. ok, testing...
fglock_ it should, but it takes more knowledge of mm :) 00:26
putter btw, the next question will be .ref returns Str-0.0.1-cpan:FGLOCK which ne "Str"...
k
fglock_ try using the {name} key instead of {identifier} 00:27
putter nope, deep recursion in Perl6::Method::do, normal and metaclass dispatch
k
fglock_ maybe don't use ::next_METHOD(); return 0 instead ? (not sure where the loop is) 00:29
putter ok
is it "Bit" or "Bool"? test says Bool, .ref says Bit.
fglock_ Bool is an enum, Bit is the Class (?) 00:30
putter ? 00:31
still deep recursion.
fglock_ looking up
putter the .ref fix did fix one of the 07-ref.t tests though! :)
fglock_ we will need stevan's help, I think 00:32
putter ok 00:33
fglock_ hi luqui 00:36
luqui hi fglock_
fglock_ can you help here - is 'Bit' a class, and 'Bool' a type, or enum, or something else? 00:37
luqui er
I should check on that
Larry never wanted a Bool class, or at least bool constants, so that people wouldn't do:
if $flag == true {...} 00:38
but it seems that he is out of that mindset now
luqui would p6l
it
fglock_ thanks 00:39
luqui oh wait
look at A12 under Enums
(3/4 of the way down) 00:40
where presumably s/is// 00:41
putter fglock_: my($self,$cls)=@_; rather than my($cls)=@_; ;)
stevan_ fglock_: $a_class->meta->name() should work 00:42
re: something you asked a llong time ago 00:43
putter yes. it didnt back then at least.
stevan_ putter: hmmm, maybe I need to see the context
fglock_ stevan: ok - I was just helping putter with that :) 00:44
putter: which test was using Bool? 00:45
putter 07-ref.t used ?1 as a test value. 00:46
svnbot r6957 | stevan++ | Perl6::MetaModel 2.0 -
r6957 | stevan++ | * $?PACKAGE is now bound for both package subs as well as
r6957 | stevan++ | all different kinds of methods
r6957 | stevan++ | - added a test for this too
putter but the name stuff, aka .ref, now works. thanks! 00:47
stevan_ putter: ok :)
sorry about MM 1.0 guys,.. it has issues
putter np
stevan_ I have a question about the package implementation 00:48
I would appreciate input/opinions/comments
I am thinking about implementing some form of "my" and "our" into the Package meta object 00:49
so that "my" values wont be accesible from outside the package
but our values will
but I am not sure if this makes sense to do
fglock_ S02 talks about "Bit", but all tests use "Bool" - strange 00:50
stevan_ or if I should just implement a name -> value namespace bindings
thoughts, comments, suggestions welcome :)
fglock_ stevan_: we do need some way to do lexicals 00:51
svnbot r6958 | putter++ | PIL-Run: 07-isa.t passes. 07-ref.t almost passes (Bit ne Bool). fglock++
stevan_ fglock_: but wont the Pad deal with them? 00:52
fglock_ do you plan to use a hash, or p5 namespace?
obra is anyone blogging pugs in autrijus absence?
stevan_ fglock_: for now a hash,. this keeps the MM more portable
obra: nope
nothingmuch nothingmuch.woobling.org/compilatio...relude.pdf 00:53
it's huge
fglock_ do you think it can be extended to make instance local variables? (closures?)
nothingmuch and for a 3 line program
stevan_ fglock_: you mean class C { has $.foo } or class C { my $.foo } 00:54
fglock_ putter: we could make Bit eq Bool temporarily, until we find out
nothingmuch fglock_: please comment 00:55
putter: please look at it too
putter oh, no need. better to live with the test failing, a reminder that there is an issue
nothingmuch: ok, sec
fglock_ stevan_: if you can make both work, all our problems are solved
nothingmuch in the omnigraffle version i can make the layers go away
and it looks like a cute animation
does anybody want the original to play with? 00:56
putter pilrun currently has a first cut at lexical support. just uses p5 lexicals.
fglock_ how about making variable lookup an object method? (hope this make sense)
nothingmuch the only problem is that occasionally i forget about layers and things get mixed up
putter also temp()s
stevan_ fglock_: class C { my $.foo } is just a private class attribute
fglock_: currently all Packages have a FETCH and STORE method
which allows variabile lookup
I think that is what you want 00:57
fglock_ nothingmuch: ok
nothingmuch i need to sleep
but first, some annotations
in the example &infix:<*> has a reference implementation that isn't used
stevan_ putter: not sure if temp() and state() are related to packages as much as they are related to blocks
nothingmuch &say has a reference implementation that uses &print
the runtime doesn't provide &say but it does provide &print 00:58
&print has to be implemented by the native code because it does IO which is runtime dependant
&infix:<-> has no reference implementation
putter stevan_: right
nothingmuch the compilation process see that no eval is being made, hence no new code can ever be introduced by any of the cod that can be run
no symbol table assignments are made either
Khisanth subtraction is not implemented?
nothingmuch Khisanth: it is not implemented in the perl 6 prelude 00:59
&infix:<*> is implemented as multi sub &infix:<*> (Int $x, Int $y) { [+] $x xx $y }
fglock_ stevan_: I'll take a look - I have to find out what I want exactly :)
nothingmuch since a native alternative is provided &infix:<+> and &infix:<xx> are omitted from the picture
stevan_ fglock_: the $::Package meta object is in lib/genesis.pl 01:00
nothingmuch anyway, since no runtime symbol table assignments are made either, all subroutines are statically resolved
Khisanth ah so there is infix:<+>
stevan_ and there are some tests for it in t/23_Package.t
nothingmuch including hard jumps to the native code
Khisanth: not in the compiled output
since it isn't needed
putter stevan_: a straight n->v seems a good first step.
stevan_ putter: that is what I currently have
along with a special case for subs 01:01
nothingmuch WRT hard jumps - this is the extent of what is possible... this could just put in the correct opcode
putter even if one were to do my/our, one would need a back door for reflection/development
stevan_ when you add a sub to a package it wraps the sub to bind $?PACKAGE
putter: I suppose block level my/our and package level my/our can eventually be merged 01:02
if they seems to be too redundant
putter nothingmuch: I'm sorry, I'm not multi-thread enabled at the moment. I will backlock and look at url...
nothingmuch okay
i'm adding the annotation to the file 01:03
putter stevan_: one thing to keep in mind, maybe, if it doesnt distract you... ok, never mind. optimize for one thing at a time. for now, mm completeness/correctness. 01:04
stevan_ putter: distract me.. please
putter ;) 01:05
stevan_ my ADD can handle it :)
putter I was thinking that we might end up with a hybrid scheme, where a pilrun package is a p5 package (fast) and an associated Package object (complete). 01:06
stevan_ putter: yes, I have been thinking about ways to optimized the metamodel
currently when I profile the code,.. the majority of time is spent in dispatch() 01:07
so I have been thinking about how to use p5 pacakges to optimize that away
putter but better to get Packages working first, and then worry about adding hooks 01:08
fglock_ btw, you can use unboxed things most of the time, and only use objects where needed
stevan_ putter: basic packages are up in mm2
s/up/working/
putter :)
stevan_ ok, well I have to run,.. movie time at stevan's house
putter enjoy. thanks for your help 01:09
nothingmuch updated
fglock_ eats home make waffle cones :)
putter fglock_: yes, once you get to them they will be fast, but if that takes 5 method calls... :)
fglock_ s/make/made/ 01:10
putter that makes 3 people now suggesting I have dinner. hmm...
stevan_ putter: go eat # thats 4 01:11
putter nothingmuch: my web broser doesnt like your pdf url. blank page. 01:12
fglock_ I got a blank page too - I thought it was my computer's fault
putter ;)
nothingmuch putter: i'll export one with an opaque background 01:13
try now 01:14
does it work? 01:15
fglock_ my browser just died - loading again
putter nothingmuch: not in the default engine (ggv?) but its fine in gv. 01:17
fglock_: anything you wanted to get done this evening before I sign off? 01:18
nothingmuch goody
fglock_ I'm ok, thanks :)
go eat something 01:19
putter wow
nothingmuch: the simplest thing might be to start a backend and prototype it. either cloning p5, js, or starting a new one. for a dynamic language, its really just a file or two of code. 01:21
other than that, I plead insufficient active braincells to make any useful observations. I'll leave it up - maybe later. 01:22
nothingmuch ugh, adamk is pissing me off
putter ok, end of day.
fglock_: thanks for all your work. it was key.
nothingmuch putter: i'll try to have a go at it
putter and fun
fglock_ thank you - good night 01:23
putter nothingmuch: sound like a plan. each new backend so far adds additional perspective on the whole problem
nothingmuch yah
putter good night &
nothingmuch ciao!
fglock_ nothingmuch: this poor computer can't open it - I'll try later 01:26
nothingmuch fglock_: i can export anything else you might like
png, jpeg, eps
nothingmuch flames adamk
fglock_ jpeg please!
nothingmuch visio, svg 01:27
wow... the file is 10x bigger as jpeg
nothingmuch.woobling.org/compilatio...relude.jpg
and half as readable
nothingmuch likes vector graphics
dduncan files like that would be better as a png than as a jpeg 01:28
svnbot r6959 | Darren_Duncan++ | /ext/Locale-KeyedText : resynced with Perl 5 version 1.6.1; rewrapped any POD in KeyedText.pm to 75 chars that was wrapped to 80 chars
nothingmuch dduncan: good point... /me exports another
although with all those shadows it'll probably make a mess of the pallettes 01:29
dduncan not really
PNG supports millions of colors natively
so no pallets
nothingmuch visio and png uploaded
i thought it compressed them like gif
dduncan even then, each color of shadow adds, what, 10 distinct colors?
no
nothingmuch good to know =)
dduncan while PNG is a replacement for GIF, its better 01:30
they are both lossless, and work best with images having large swatches of the same color
nothingmuch just s/\.\w+?$/\.(png,jpg,pdf,vdx)/
dduncan such as graphics you draw, or export from vector
nothingmuch yeah, that much i know, and I expected the large swatches of same color thing to relate to huffman coding of the color pallettes and the fact that they are indexed like in GIF
dduncan by contrast, JPEG is best for areas that are not full of flat colors and are entirely gradiant-like, such as photographs 01:31
nothingmuch how does PNG compress stuff?
dduncan not sure, but it isn't patented
nothingmuch heh, i ijust got a bug report: "You _really_ _really_ need to do some comprehensive testing on this to verify that it actually behaves the way it is expected to"
dduncan PNG was created partly as a way to get around the patent fees for using GIF
nothingmuch it uses zlib, right?
dduncan also, it is superior in that it supports millions of colors
nothingmuch as opposed to lzw?
dduncan I don't know
I do know that PNG supports multiple compression methods 01:32
so does TIFF
fglock_ I can read it now
dduncan generally speaking, PNG is the current 'standard' for non-photo graphics on the web 01:33
I think another advantage of PNG is that it embeds gamma information, so they display correctly regardless of the gamma of your computer ... or at least the info is there so your comp knows how it *should* look 01:34
nothingmuch heh
dduncan by contrasts, GIFs created on a Mac could look too light or dark under Windows, and the reverse likewise 01:35
since they have different default gamma settings
I could be wrong about those details, but the P stands for 'Portable' 01:36
so it must be thinking of those things
fglock_ nothingmuch: the picture helps a lot. 01:39
nothingmuch chromatic: backlog-ping
fglock_ going to make the dinner & 01:43
dudley nothingmuch: can you upload the .graffle? 01:45
nothingmuch sure
i need to zip it first, right?
dudley I don't know, do you?
nothingmuch let's find out
dudley I guess if it's a bundle. But sometimes they're bundles and sometimes a flat file. 01:46
nothingmuch it looks like XML
have fun
(it's up)
dudley thanks
nothingmuch uploads yet another UNIVERSAL::isa 01:47
dudley: did it work? 01:52
dudley Yeah, thanks!
nothingmuch okay, then my work is done for today... off to bed 01:53
(btw, it was made with the version 4 beta) 01:54
dudley nothingmuch++ #pretty pictures 01:56
Khisanth slaps pugs 02:56
putter fglock: array's are down again: 03:06
p5ugs> @a=(3,4) 03:07
(3, 4, undef ... 3, 4, undef)
&
luqui ?eval my @a = (1,2,3); say +<<3 @a 5>> 04:31
evalbot_6959 Error: unexpected "@" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
luqui ?eval my @a = (1,2,3); say +<<3 @a[] 5>>
evalbot_6959 Error: unexpected "@" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
luqui ?eval my @a = (1,2,3);
evalbot_6959 [1, 2, 3]
luqui ?eval my @a = (1,2,3); say + <<3 @a[] 5>>
evalbot_6959 5 bool::true
luqui ?eval my @a = (1,2,3); say + <<3 "@a[]" 5>>
evalbot_6959 5 bool::true
luqui bzzzt wrong
QtPlatypus ?eval my @a = (1,2,3); say <<3 "@a[]" 5>> 04:34
evalbot_6959 3"123"5 bool::true
QtPlatypus ?eval my @a = (1,2,3); say join "+",<<3 "@a[]" 5>>
evalbot_6959 3+"1+2+3"+5 bool::true
QtPlatypus Now that is damn weard
luqui it is? 04:35
it seems just like naive qw interpolation to me
?eval my $x = "hello world"; say join "+", <<foo $x bar>> 04:38
evalbot_6959 foo+hello+world+bar bool::true
luqui ?eval my $x = "hello world"; say join "+", <<foo "$x" bar>>
evalbot_6959 foo+"hello+world"+bar bool::true
luqui looks like it just does interpolates then splits on whitespace
QtPlatypus nods. 04:39
05:38 ods15_ is now known as ods15
nothingmuch autrijus: ping 06:21
svnbot r6960 | Darren_Duncan++ | /ext/Locale-KeyedText : resync with Perl 5 version ... mainly fixing POD bugs 06:28
nothingmuch thinks that his pretty graph should be made into a 3 t-shirt series 06:41
where 3 people ought to wear them together and stand side by siude
ods15 hya nothingmuch 08:28
nothingmuch hi h 08:43
o
want to see another pretty graph?
"nothingmuch.woobling.org/compilatio...elude.ext" =~ s/ext/choose_one(qw(graffle vdx pdf png jjpg))/e; 08:44
Aankhen`` You are using outdated syntax, m'friend. 08:45
nothingmuch yes, I am 08:46
sorry =(
Aankhen`` "nothingmuch.woobling.org/compilatio...elude.ext" ~~ s/ext$/{ <graffle vdx pdf png jjpg>.pick() }/;
nothingmuch Aankhen``++ 08:47
Aankhen`` :-D
I <3 Perl 6.
nothingmuch oh, s/jjpg/jpg/;
Aankhen`` Ah, I wondered about that. 08:48
nothingmuch Aankhen``: any feedback?
Aankhen`` One sec.
GeJ nothingmuch: yup... count 4 t-shirts series, not 3 :) 08:49
nothingmuch is satisfied with the fact that the compiled stage is theoretically compactable to very small and very efficient byte code especially for one liner type stuff
GeJ: heh =)
Aankhen`` Whoa... that's a large image. o_O 08:50
nothingmuch yeah, and for a small program, too 08:51
Aankhen`` nothingmuch++ # dot's shum g00d work
nothingmuch hopes to implement the example on top of pil-run 08:52
and then letting the user annotate multi &postfix:<!> to use a perl 5 version
so that you can get "native speeds" ;-)
i guess it should look like &postfix:<!><Int $x>.add_native(:runtime<PIL-RUN>, :body("sub fact { my $n = shift; return 1; if ($n < 1); $n * fact($n -1) }")); 08:54
&postfix:<!><0>.add_native(:runtime<PIL-RUN>, &postfix:<!><Int $x>.native(:runtime<PIL-RUN>)); 08:55
that way you can flatten multis
then I'd like to add a verifyability mechanism
that has a cryptographic digest on the call chain
each function has a digest that is basically it's body + the digest of all it's called functions 08:56
that way you can provide a native version that builds on top of a junction of hashes
anyway, bbiab 08:57
okay 09:35
i have a nice plan
nothingmuch writes it down
blam 10:15
yet another p6l warnock candidate 10:16
spinclad shouldn't the return 1; if ... above be return 1 if ... ?
nothingmuch yes, sorry 10:17
i hope it's correct in the p6l message =)
spinclad and doesn't the compiled stage need the 0! = 1 clause? 10:19
nothingmuch that's provided by multi &postfix:<!> (0) { 1 }
spinclad yes it is, but i don't see that in the compiled stage area. doesn't it need to be copied in? 10:21
nothingmuch wait
oh, right
i'll fix it
spinclad (i saw the other multi def there) 10:22
anyway neither of these obscure your point 10:23
nothingmuch updating... exporting and pushing to web 10:24
updated 10:25
what do you think in general? 10:26
spinclad (looking)
integral wow, that's some diagram! 10:27
nothingmuch: the hasing idea is very innovative
*hashing 10:28
nothingmuch likes it when the practical and the theoritcal complement each other gracefully
spinclad it's large for an image but just large enough for its content, which i'd call sensible, straightforward, and well expressed. 10:31
nothingmuch didn't plan for it to get so big so fast =) 10:32
it's only 3 lines of code after all...
Juerd nothingmuch: What did you use to create this? It's pretty.
spinclad i don't see anything off track
nothingmuch Juerd: the (free) beta version of omigraffle 4 prof
i really like it
you create the trees by typing into an outline
enter creates a new item 10:33
tab makes it a child of it's predecessor sibling
shif tab makes a node an uncle of it's former self
it only slightly breaks when you add manual links (like the symbol resolution and binding arrows), and then ask it to lay out the tree gain
wolverian "its" 10:34
spinclad so it's easy to make parse tree type diagrams
nothingmuch spinclad: very
wolverian: sorry... i never get this right =(
spinclad which of course get large fast
nothingmuch i think the big heap in this example is the reference implementations inside the prelude 10:35
spinclad can you shrink nodes to fit their text? i see they're all one size, which keeps the diagram bigger. likewise the black frames add up 10:37
nothingmuch i'll have a go
but not now... got to do other stuff
i'll check the graffle into svn 10:38
that way someone else can also fix it if they have time
is docs/notes a good place?
and what's a good file name? 10:39
spinclad certainly in docs/, and notes sounds good
nothingmuch anyone for a file name? 10:41
spinclad something like ...overridable-prelude... ?
nothingmuch i think that's a bit too specific.. 10:42
since it applies to the runtime system in general\
(more details in p6l)
spinclad right
nothingmuch maybe for now i should just keep the stupid name 10:43
that's backwards compatible to my URL
spinclad i also didn't get what was specifically circular about the prelude...
nothingmuch the fact that operations are defined in terms of each other 10:44
and that the runtime needs to allow the circularity to be broken by providing a root set of primitives to run a program
and from then on everything can be filled using the reference implementations
the runtime authors can implement whatever fits most easily to their language of choice
thus giving a fast kick start for new backends 10:45
spinclad so ... a redundant basis of definitions
nothingmuch yes
with undefinable things such as File::open set to '{ ... }'
that also allows pure perl 6 code to be compiled to pure languages without the mess of emulating IO =) 10:46
and can also be the basis for safe compartments - only use native alternatives which are marked as safe 10:47
since the prelude can't reach out of the safe compartment without native code, and native code for the bad features isn't made available this should be easy to implement safelyu 10:48
spinclad i think your diagram isn't large enough to show what you mean by circularity, but it shows the structure of overriding definitions well enough
nothingmuch yeah.. i didn't have a good enough example
but this can be clarified in the email
spinclad right
nothingmuch i'll do that now
btw - for all who are interested this thread spawned off of the lexical overidding of buiiltin multis thread 10:49
spinclad: do you have a good example for a circular def? i'm not finding one 10:51
spinclad ponders
two things that could either be defined in terms of the other... 10:52
svnbot r6961 | iblech++ | pugs: 10:54
r6961 | iblech++ | * s/FindBin::Bin/FindBin::RealBin/ so the script works when symlinks are used
r6961 | iblech++ | (on my system, /usr/bin/pugs is a symlink to /home/.../pugs).
r6961 | iblech++ | * Not only allow "-B JS", but "-BJS" as well.
r6962 | nothingmuch++ | add the omnigraffle (beta 4) file for the circular prelude diagram
spinclad you can define <+> and <-> in terms of a zero-sum constraint <sum=0>(*@_), or vice versa. 10:55
wolverian * and / are also somewhat circular
nothingmuch zero sum constraint? 10:56
spinclad <sum=0>(<+>($x,$y), $x, $y)
<sum=0>(<->$x, $x)
these define <+> and <-> 10:57
nothingmuch ah
but they require a smarter language than perl 6 is, WRT to equivelence-is-declaration-is-definition
nothingmuch wonders why he keeps saying "WRT to" 10:58
i think i parsed it into "With RespecT" and then the to comes in
spinclad right, this is more some sort of constraint syntax. 10:59
conversely, <sum=0>(*@x) == ([+] @x == 0) 11:00
anyway, that's an old hobby horse of mine that i've played with from way back 11:01
but is likely not the example you're looking for here 11:02
(and i made a mistake: first define <->, 11:03
then <sum=0>(<-><+>($x,$y), $x, $y) or similar other constraints) 11:04
nothingmuch i have an idiotic example
define - and + in terms of each other, and in terms of INC and DEC
spinclad should work... 11:05
nothingmuch is going to implement this on his forth system =)
spinclad -x = 0-x; x+y = x-(-y) 11:07
(neg and plus from minus)
nothingmuch too late
spinclad or minus from neg and plus
nothingmuch the problem is that the circularity only starts really popping up for more complex constructs 11:09
the forth systme i'm writing tries to be very circular
i'll generalize it to make it really circular
with an orthogonal trapdoor instead of an explicit, DAG one 11:10
spinclad the metamodel fits too
nothingmuch yeah, I mentioned it 11:11
spinclad object ->,<- class
nothingmuch especially WRT to the speed vs. effort tradeoff
essentially the runtime only has to implement gnosis (right?)
and the ref implementation can take over from there
this also promotes metered optimization - you provide a native alternative only for the things you know are slow based on profiling 11:12
then you can spend your time implementing hot ops instead of everything
or even make runtime tradeoffs between exactly which native versions of ops you are using 11:13
(via use optimize)
like 'use optimize :math<integral>'
this will make a big effort to make all integer math fast, at the expense of complexity in other opcodes
but it should pay off if you're crunching numbers 11:14
anyway, i'm getting carried away. I better implement it
spinclad the ref implementation is just the final knot; the runtime supplies an on-ramp into it to bootstrap 11:16
optimizing an infinite time into finite 11:17
(not to be sneezed at!)
nothingmuch =)
that's a nice definition
but also opening the door to impure functions, which can only be stubs in the prelude
e.g. IO
nothingmuch dubs perl 6 runtimes collectively as "dirty finitizing frobber thingies" 11:18
pasteling "nothingmuch" at 212.143.92.226 pasted "weird messages during smoke" (7 lines, 1K) at sial.org/pbot/13071 11:20
nothingmuch oi, i copied from screen... sorry
why is it running perl at all? and why isn't it using the same $^X that ran Makefile.PL? 11:21
spinclad well, thank you for the talk; breakfast calls (and then bed) 11:22
nothingmuch heh
thank you just the same =)
spinclad glad to take part 11:23
&
nothingmuch putter: ping 11:58
svnbot r6963 | iblech++ | * Usual svn props. 12:04
r6963 | iblech++ | * ChangeLog: Added initial unsorted section about the changes in PIL2JS.
nothingmuch hi kolibrie 12:13
kolibrie good morning nothingmuch
nothingmuch ponders a nice forth hack 12:25
when you have a return stack overflow, the stack is saved to heap, and it's root element is a fake caller which will restore the return stack 12:26
it's like swap space for your function calls 12:27
rafl did some disconnected commits using svk commit --direct. How do I get them into the online repository now I'm back online? 12:54
nothingmuch svk push --verbatim 12:56
i think
rafl Cannot find the path which '' copied from.
dudley svk push --verbatim only works on a branch, I think. 13:03
svk sync, maybe? 13:05
rafl That gives me no headrev at /usr/share/perl5/SVN/Mirror/Ra.pm line 159. 13:06
dudley that just exhausted my entire fount of svk knowledge... 13:12
did you ask on #svk? 13:15
obra er. why were you doing commit --direct? 13:16
and not, say on a local branch?
nothingmuch oh, i see 13:18
in the script wrapper version of pugs (and anywhere really) /usr/bin/perl should never be used 13:19
instead the value $^X as seen by Makefile.PL should be used
can anyone fix this? 13:20
rafl obra: Because I'm new to svk and that was the only way that I could get working without having much documentation installed. 13:24
obra rafl: svk help intro 13:26
rafl Great, thanks. 13:32
nothingmuch holla robkinyon 13:38
obra rafl: before you started, did you type "svk help" ever? or "svk" with no options? 13:39
did you _see_ the output of 'svk help'? (Not a blame question, but a question of whether making that prose better will help)
rafl obra: Yes. I also read the help for various commands, but I missed help intro.
obra ok.
I'm rewriting that page now :)
nothingmuch tries to find a suitable mini language to implement the bytecode folding stuff with 13:40
obra rafl: is this better? paste.husk.org/4110 13:42
rafl obra: Yes, but it still doesn't prevent people not to read it. Maybe svk should refuse to do anything before svk help intro was called ;-) 13:43
obra uh.. :) 13:44
rafl (No, please don't do that!) 13:45
obra I wouldn't
rafl obra: Something that speeds up initial syncs would be cool, though. It takes several hoursfor some of my projects at work. 13:48
obra that depends a lot on the svn side, sadly 13:49
but there's work being done
rafl Cool. 13:55
14:10 meppl is now known as _meppl_ 14:11 _meppl_ is now known as meppl
svnbot r6964 | fglock++ | * perl5/Array - another stringification fix; 14:59
r6964 | fglock++ | - Tied-to-native arrays can do push/pop/shift/unshift
nothingmuch is implementing a PIL like dynamically scoped AST compiler and interpreter in perl 5 as a proof-of-concept for the circular prelude crap 15:10
(no linker)
PerlJam nothingmuch++ (but you're a crazy person ;-) 15:13
nothingmuch it's coming out very nicely so far 15:14
PerlJam When I read your email I thought, "Well, that's obvious. I wonder why no one thought of it before?" The answer I gave myself was "someone probably did think of it but no one wanted to do the work" 15:18
nothingmuch hmm 15:22
it seems like the easy way out for me
is there a module that can display the diff of two deep structures? 15:24
i'd like something a bit more graphical than Test::Deep, which only displays one difference at a time
rafl Maybe Data::Diff? 15:26
nothingmuch i am having trouble with it 15:27
it's documentation is conflicting
rafl UTSL ;-)
nothingmuch is in work less mode 15:28
it also doesn't rpetty print
rafl Huh, what's up with feather? 15:34
Ah, now it's up again. 15:44
Any haskell people around that may help me with a small hack? I don't know haskell very well. 16:03
I do args <- getArgs
Then I want to check args if it contails '--dbp-builder'
If yes, I want to put the argument following --dbp-builder (delimited by whitespaces or '=') into a variable. 16:04
How to do that?
pdcawley posts the summary. 16:19
svnbot r6965 | fglock++ | * perl5 backend - a lazy_lists.t test is skipped, instead of commented out 16:41
r6965 | fglock++ | Hash - reading an empty key was causing a warning
nothingmuch continues work on the PILish thingy 16:52
Supaplex continues to work on a snack 16:54
Juerd Heh, let's set a hostname on that. 17:03
(Apparently, reverse dns has finally been taken care of)
svnbot r6966 | fglock++ | * perl5 backend - fixed '(1,2,3,3,4).uniq' 17:06
r6967 | fglock++ | * perl5 backend - fixed (-Inf..0) and (-Inf..Inf) 17:11
r6968 | fglock++ | * perl5 backend - fixed @a[1,2].delete 17:30
r6968 | fglock++ | - @a[1].delete doesn't work, but @a[1,].delete does
r6969 | fglock++ | * perl5 backend - updated Array TODO 17:36
r6970 | stevan++ | Perl6::MetaModel 2.0 -
r6970 | stevan++ | * more picture updates, mostly just making it look nicer :)
r6970 | stevan++ | - exported version is now a JPEG instead of PNG
fglock what is the fixity of Y (zip) in: '@a Y @b Y @c' ? 17:48
infix doesn't work - (@a Y @b) Y @c is wrong 17:49
autrijus it's listfix. 17:50
infix with "list" associativity
compare chainfix
$a < $b < $c
which is infix with "chain" associativity
fglock is it supported by Pugs? I can't find out the syntax, sorry 17:51
autrijus infix:<Y> is assoc<list> 17:52
fglock thanks! 17:53
autrijus np :)
GeJ autrijus: how's autrijus.org?
autrijus actually I don't know if "is assoc" is supported or parsed in full. the internals does support it
GeJ: forever gone 17:54
unless sleuthkit is more powerful than I imagined; but not going to have time to recover it in the next month anyway
fglock oops - no, it doesn't work yet :(
GeJ can you still get your emails? I seen yesterday that linimon set all your ports to ports@ since the mails were bouncing. 17:55
( well, I can imagine that this is prolly your least priority for the time being... :) )
autrijus GeJ: I can now, today. but truth be told I don't have problem with ports@ for the next few months
fglock: ah right, it's because traits that takes params isn't parsed yet 17:56
GeJ that's what I was thinking
autrijus it's rather unfortunate to coincide HD burnout with brain burnout
I'm recovering well though, perhaps because of the coincidence
GeJ "brain burnout"? got sick? 17:57
autrijus er no, just too many things going at once, all with notable urgency
so my brain just refused to move -- it's strange like that 17:58
fglock knows that feeling :)
GeJ nods 17:59
I had a friend who extented the concept of "context switching", scheduling and nice(1) to Real Life(tm) 18:00
autrijus it's a nice metaphor but breaks easily if stretched
GeJ He could let the phone ringing for 30 minutes without picking it up until he was done with his current task
rafl Does anyone know another application than cabal that uses System.Console.GetOpt? 18:01
GeJ the side-effect was that the manager was getting crazy mad when he wanted an answer.
autrijus rafl: er, openafp? :) svn.openfoundry.org/openafp/afpdump.hs 18:02
stevan hey autrijus :) 18:04
svnbot r6971 | fglock++ | * perl5 backend - added a commented out "is assoc<list>" TODO to PrimP6 zip operators
autrijus stevan: hi :) 18:05
rafl autrijus: Ups. That was meant to go to #haskell. :-)
autrijus rafl: nevertheless, the "getOpts" in svn.openfoundry.org/openafp/afpdump.hs should get you going 18:07
stevan autrijus: if you have a moment, could you please comment on the latest MM picutre (svn.openfoundry.org/pugs/perl5/Perl...model.jpg) 18:09
autrijus ok. I'm currently in parrotsketch weekly meeting (#parrotsketch on irc.perl.org) 18:13
stevan ah,.. ok,.. take your time no rush
I am trying to recruit nothingmuch to do a MM->Haskell port
autrijus but it looks obviously correct.
oh btw. singleton methods.
stevan ? 18:14
autrijus how would that fit in MM, or not at all?
s/singleton/per-object/
you know, the rubyish thing of adding methods to specific objects
stevan hmmm
the simplest thing would be to create an anon class, and rebless
but I will look closer at ruby and see 18:15
rafl autrijus: Yes, looks nice. 18:16
autrijus stevan: I've been reading Ruby on Ruby 18:19
svnbot r6972 | fglock++ | * perl5 backend - delete() should cover all cases now
autrijus stevan: intertwingly.net/slides/2005/fosssl/keynote.html
svnbot r6973 | autrijus++ | * run the 'pugs' script through perltidy. 18:25
autrijus ponders how to install perl5/ stuff. 18:36
stevan: how does "class" and "meta" differ? 18:38
in your jpg
does "meta" means "a class implemented as a primitive"?
stevan autrijus: meta just means "not user level" 18:39
one circle is an instance 18:40
2 circles a class
I needed a name for 3 circles
meta was all I could think of
autrijus but user still get to access ::Module no?
stevan uhm
maybe
autrijus under the "everything is open unless explicitly closed" doctrine
stevan $Larry[0] did not seem to think users need access to $::Package and (i assume) $::Module 18:41
I am all for it myself :)
autrijus sure they don't need to :)
but iirc it's harder to hide it from them, not easier
stevan yes
open is good :)
I guess 3 circles means "dont touch me unless you know what you are doing" 18:42
::Class.add_method('new' => method { "I am NEW" });
that will break *everything* 18:43
unless they do
::Class.add_method('new' => method { "I am NEW".say; next METHOD });
which will just be really annoying :) 18:44
autrijus I thought a simple "next" would work here :)
stevan uhm, maybe,.. next METHOD is more explicit though 18:46
next is used in other contexts too right
for loops, etc
per-object methods,.. like this: onestepback.org/articles/usingruby/...leton.html
nothingmuch i have a chicken and egg problem 18:48
stevan nothingmuch: I thought you were a vegetarian
nothingmuch sub even ($n) { odd($n -1) }
Khisanth thought you had a chicken leg problem
nothingmuch sub odd ($n) { even ($n - 1) }
sub even (0) { 1 }; 18:49
sub odd (0) { 0 };
how do i compute a digest for these
stevan nothingmuch: yes, that is a classic mutually recursive predicate
nothingmuch exactly
stevan one of my favorite examples in my ML book
nothingmuch i need to compute the digest of &odd such that if &even changes &odd changes too 18:50
so naively I traverse the PIL body of &even
and digest that + the digest of &odd
stevan IMO , it should be sub even (0) { Bool::true } sub off (0) { Bool::false }
nothingmuch right
but nevermind that
=)
i think i know 18:51
stevan but the digest of &odd requires the digest of &even
nothingmuch right
i'll digest the bodies without the calls, and traverse the call tree to invalidate later
then i'll make the digest a two pass process
stevan autrijus: care to give you opinion on whether package level my/our variables should be handled in ::Package? 18:52
nothingmuch autrijus: did you see the pretty picture from earlier today? 18:53
18:55 GeJ_ is now known as GeJ
autrijus nothingmuch: no. url? 18:55
stevan: no it's just a big implicit block. 18:56
nothingmuch p6l post,
stevan autrijus: but shouldn't ::Package be providing access to the variables init?
nothingmuch waits for safari to come back from swap
stevan s/init/in it/
nothingmuch "nothingmuch.woobling.org/compilatio..._prelude." . any(<pdf vdx graffle png jpg>).pick; 18:57
uh, ~ not .
autrijus: i'm implementing a mini language AST
which supports static global symbols, and dynamically scoped symbols
autrijus stevan: how is a package my different from a closure my?
nothingmuch as well as this form of circular breaking
i think i'm about 70% done 18:58
stevan autrijus: it is not really,..
I suppose I am wondering if I should mediate access to the package's stash or not
autrijus stevan: my point is mostly that all "my" is just hoisted to top of a closure
stevan: and package provides an implicit closure
file too
stevan: our() however is indeed alias to package stash, and package should provide a stash 18:59
stevan autrijus: currently I have a %:namespace as a member of ::Package 19:00
will that be enough?
and a FETCH and STORE to get at things inside %:namespace
autrijus sure, that sounds exactly like what it's needed
curiously with this scheme, nested namespaces as p6 mandates is easier than the global flat namespace in p5 19:01
stevan and FETCH and STORE for ::Class perform meta-model operations in certain circumstances
autrijus: yup,.. ::FooPackage->FETCH('::Bar') returns the ::BarPackage object
autrijus praises sanity 19:02
stevan so I should just not worry about my/our distinctions for Packages
autrijus my() is not pkg's biz 19:03
stevan however, what about class C { my $.bar }
autrijus our() is just a my() that aliases to stash
stevan private class attributes
autrijus it turns out it has the same semantic as (my $bar).
stevan or should I just punt on that
well the class needs to know about it though
svnbot r6974 | fglock++ | * perl5 backend - @a[1].delete works
autrijus ::C := class.new(sub { my $.bar ... })
stevan but I suppose we can just let the closure deal 19:04
yup
thats what I was thinking
autrijus I think if you want semantic sugar, the compiler need to gen it for you
not at the mm level.
stevan checks that off his TODO list :)
autrijus :))
stevan ok,... now everything is clear for Roles
I just need Larry to answer my p6l questions, but those are edge cases anyway 19:05
svnbot r6975 | fglock++ | * perl5 backend - fixed Scalar, Array, hash undefine() 19:10
justatheory s/??::/??!!/ ???? 19:11
Is !! dead, then?
justatheory is reading the summary
autrijus !! was never alive -- it was at best undead 19:13
or rather "ephemeral"
nothingmuch autrijus: comments so far?
justatheory I liked !!
my $bool = !!$arg;
autrijus justatheory: it's now spelt ? 19:14
my $bool = ?$arg;
justatheory Oh. Huh.
Okay, I can dig that. :-)
autrijus my $bool = true $arg;
# sad but true
justatheory ick
I'll use ?$arg
autrijus my $bool = $arg as Bool;
fglock re Val.hs - type Bit=Bool, Num=Double - is this official?
autrijus # timtowtdi
justatheory my $bool = $arg.bool;
19:15 typester is now known as sleepster_
autrijus fglock: Bit=Bool is official, Num=Double is I think official too 19:15
fglock ok
what needs to be done WRT next Pugs release? 19:29
nothingmuch bah
compiling is hard 19:30
autrijus fglock: triaging tests 19:31
fglock: mark tests as TODO, write up changelog for pilrun
stevan autrijus: so do you think I should do away with %:class_attributes field in ::Class? 19:33
just let the package namespace handle it
autrijus I think it makes a lot of sense. 19:34
stevan I do too
autrijus if the class object holds instance data of its own, that's fine
no need to invent a limbo storage
stevan I am currently punting on autogenerated accesors
but I think they would be the only item 19:35
s/item/issue/
autrijus autogen accessor is the macro layer
stevan yes
autrijus i.e. helper layer
ingy hola
autrijus greetings ingy-san!
nothingmuch ingy - i want to commit my patches to Test::Base
stevan I am picturing a macro which uses class reflection to build a Role which implements the accessors
ingy hello autrijus-san
nothingmuch++
stevan heyya ingy
autrijus stevan: that sounds like exactly thE righT thinG tO dO. 19:36
ingy anyone here use spidermonkey much?
hi stevan
stevan autrijus: that was we get Object.does(Object) for free (sorta)
nothingmuch ingy: iblech is probably your best shot
autrijus ingy: iblech I think may speak spidermonkey in his dreams
ingy what is the global object in server side js?
stevan ingy: I think putter may have also fiddled with it too
Object.prototype IIRC 19:37
ur,.. actually maybe not,... what do you mean by "global object"
ingy like the equivalent of window
stevan hmmm depends on the execution env 19:38
ingy `window` contains the global object in Clientside js
autrijus as does a "var foo" no?
stevan I dont know if there there is a default equivalent
ingy there has to be I think
where does `var foo;` define to? 19:39
stevan that should be a global
ingy um, exactly
so where do globals go?
stevan var window;
window.something = "Ingy wants window"; 19:40
are you trying to access the global?
nothingmuch thinks autrijus put him on ignore
autrijus is tempted to do the "global variables are the bane of purity" rant
nothingmuch: no, that's not it, I'm in the parrotsketch meeting, and I've been staring at your picture for a long while
nothingmuch ah
autrijus: the p6l mail tries to put it in bullets, rationalizing everything 19:41
ingy stevan: 19:43
> cat t.js
#!/usr/bin/js
var foo = {};
print(foo);
nothingmuch woo! infinite loop!
ingy so what object is foo a property of?
stevan ingy: no idea
ingy and how can I access that object?
bummer
stevan you are looking for the JS equiv of main:: I htink 19:44
ingy: you might try #jsan over on irc.perl.org 19:46
nothingmuch irc.perl.org?
stevan yeah I think
autrijus er no
it's on freenode
stevan doh,.. yeah freenode
sorry
autrijus for the same reason why #perl6 is on freenode :)
nothingmuch what reason is that? 19:47
stevan cause this is where the cool kids hang out :)
autrijus nothingmuch: less inbreeding
Juerd What are the risks of inbreeding? 19:48
nothingmuch royalty
stevan :D
autrijus arrogant ignorance
Juerd If Perl 6 is to be the next version of Perl, don't we need the expertise of the people who know Perl 5?
stevan slopped brows, deep set eyes,.. banjo playing
autrijus er, sure, ans we got plenty of such people here :) 19:49
Juerd autrijus: Sometimes I do wonder about that
autrijus it's not like freenode doesn't have a #perl
Juerd Although I really don't know if people here know anything about Perl 5 internals
But that they're not discussed in Perl 6 context, ever, worries me 19:50
Supaplex it's not perl 5.1, it's perl 6. new rules. out with the arthritic crams, in with the free design 19:51
crams/cramps/
autrijus Juerd: mostly it's because we are not actively using XS yet in pilrun
as such XS doesn't sound like terribly relevant
Juerd I see
Supaplex: Perl 5.1 was ages ago. 19:52
autrijus itym 5+i
Juerd By the way, just for the record: I think Perl is a bad name for Perl 6.
In case people have missed previous rants :)
autrijus I know. :)
nothingmuch i vote for "Absynthe"
nothingmuch missed it
autrijus but how else are we going to say it's compatible with CPAN modules?
maybe we'll call the language CPAN! 19:53
Juerd autrijus: By doing so.
stevan How about "red shiney thing with a big snake wrapped around it sitting on top of a camel being ridden by a giant lambda"
Juerd autrijus: Or "pugs" - then we don't have to get used to another shell command :)
stevan: No snakes.
stevan Juerd: why not?
nothingmuch stevan: in that case we must have a skull
Juerd Python
autrijus Juerd: pugs is not a bad name. :) 19:54
stevan Juerd: exactly,.. whats wrong with Python,.. we are already using ideas from it in Perl 6
Juerd autrijus: Uhhuh
stevan as much as we are using Ruby ideas
Juerd stevan: Using ideas from it does not make me like it
stevan (red shiney thing)
nothingmuch: why the skull? 19:55
Juerd stevan: Java
;)
nothingmuch heh
nothingmuch was thinking more like 80s metal bands logos
stevan ok,.. so the lambda riding the camel can have a skull atop it's "head" 19:56
stevan breaks out the sketchbook ...
nothingmuch since they usually had snakes and skulls and blood and a naked chick
we need those too
and some kind of corny flag
stevan naked chicks and programming dont usually go together
nothingmuch and our own font with umlauts in the wrong places
Juerd stevan: Except with PHP
stevan and a reaper,.. someone needs a reaper 19:57
nothingmuch stevan: it's bound to be a seller
then we can write perl poetry about suicide
stevan
nothingmuch yes, I agree
stevan say "sadness" or die
or rather: "sadness".say or die 19:58
19:58 Supaplex is now known as I-I
stevan to be more perl6-ish about it 19:58
19:58 I-I is now known as Supaplex
nothingmuch kill 0, $pid && exit; # a very grappy guns and roses song 19:58
close STDERR; # yet another crappy guns and roses song
Supaplex ? 19:59
nothingmuch i don't know metaphors for november rain in perl, but this is suitable for a haiku
the first is live and let die, and the second is don't cry
stevan open JUNGLE "fun_n_games.txt"; # another one too
live and let die is a Paul McCartney song,..and James Bond theme 20:00
nothingmuch this reminds me of my first post to perlmonks.... *nostalgia*
stevan: guns and roses made a crappy version then... it's still crappy
stevan yes
the McCartney version was not much better,.. bad song in general IMO 20:01
autrijus waves and goes to sleep at 4am again
stevan nite boss :) 20:02
nothingmuch ciao
autrijus stevan: I'll need to deboss myself pretty soon :)
stevan boss emeritus 20:03
fglock I did some ChangeLog stuff... committing
autrijus nothingmuch: my brain is filled with ineffable questions by looking at your pics and docs
stevan autrijus: BTW - if you want/need help with the journal,.. just ask,..I am sure we can all pitch in
autrijus nothingmuch: I think perl5 prototype would work
nothingmuch autrijus: the perl 5 prototype is 80% working
autrijus stevan: oh hm, how would you like to do that? 20:04
svnbot r6976 | fglock++ | * ChangeLog - PIL-Run, perl5 runtime
autrijus stevan: docs/journal/ ?
pasteling "nothingmuch" at 82.81.247.180 pasted "80% of PILish thingy" (587 lines, 9.4K) at sial.org/pbot/13074
stevan autrijus: I will aggrigate from various sources for you
nothingmuch currently it does an infinite loop WRT thunking and &control_structure:<if>
autrijus stevan: mm sounds like a lovely idea
stevan docs/journal sounds good to me
check it daily :) 20:05
autrijus right
and import from it to ChangeLog much more easily
stevan it is the least I can do since I cannot help with $work
autrijus $work is fortunately pausing in 7 days
unfortunately that means lots of workload.
stevan you should probably sleep during that 7 days too 20:06
autrijus that sounds also like a good idea.
autrijus goes to do exactly that *wave*
Juerd Good night 20:07
nothingmuch ciao
autrijus nothingmuch: do get the pilish thing committed somewhere in perl5/ if you got the chance... 20:10
(or is it already?)
nothingmuch not yet
ingy oh duh!! 20:13
the global object is in (of course) `this` !!!
ingy is proud to have figured that out herself
nothingmuch ingy++ 20:14
;-)
ingy autrijus: in js the global object is basically the symbol table. 20:19
this makes js much more fractal than perl
nothingmuch ow do you spell ternary
ingy ternary
:p 20:20
but "how" is spelled with a leading `h`
nothingmuch: hang in there. you'll get it one day! 20:21
nothingmuch kicks ingy
ingy :D
nothingmuch ugh.... it is broken! sub stub { map { ("$_", Thunk->new(Stub->new($_))) } @_ 20:22
svnbot r6977 | fglock++ | * ChangeLog - perl5 backend update 20:46
r6978 | fglock++ | * perl5/Array - removed a debugging warning
r6979 | rafl++ | r8341@ata: rafl | 2005-09-12 22:55:03 +0200 20:58
r6979 | rafl++ | * Modified debian/control to build-depend on hs-plugins.
r6980 | rafl++ | r8342@ata: rafl | 2005-09-12 22:55:53 +0200
r6980 | rafl++ | * Use absolute interpreter path in Locale::KeyedText.
r6981 | rafl++ | r8343@ata: rafl | 2005-09-12 22:56:46 +0200
r6981 | rafl++ | * Added Debian lintian-override for Locale::KeyedText.
r6982 | fglock++ | * ChangeLog - more changes
stevan fglock++ # changelogging :) 20:59
fglock anyone with experience on building Pugs in Windows with MingW? I did it once, but I'm getting make errors now 21:01
nothingmuch HOLY CRAP! 21:09
fglock perl 5 backend does factorial! 'sub fat ($x) { if ( $x == 1 ) { $x } else { $x * fat($x-1) } }' 21:15
fglock tries to build an infinite list of factorials 21:18
stevan fglock: nice 21:22
fglock: would you mind helping with autrijus's journal? 21:23
fglock sure!
stevan basically I am thinking we make a docs/journal folder
we can either do a file per-day
or a single file
but each active subproject should summarize on a daily basis (assuming there is something to summarize) 21:24
fglock how about naming 2005-09-12.kwid files (is it kwid?)
stevan I am not sure how he posts it
Changelog-style kwid should work though 21:25
I will write up a template tonight
then we can just cp tempalte.kwid 2005-09-12.kwid for each day 21:26
iblechbot_: if you are listening,.. I would like to get a summary from you too
and putter of course :)
and anyone else who is poking around here as well
I will keep tabs on the commit log to catch any strays as well 21:27
fglock how about starting Pugs journal? this way autrijus can keep his personal journal. OTOH, how about just using the existing kwiki? 21:29
infinite list factorial works! 21:30
sub fat ($x) { if ($x == Inf) { $x } else { if ( $x == 1 ) { $x } else { fat( $x-1) * $x } } }
my @a = (1..Inf).map:{ fat($_) }
(1, 2, 6 ... Inf)
stevan fglock: well autrijus's journal is where people are used to going for Pugs info, and eventually he will be back to Pugs development
rafl stevan: stevan Why don't you commit docs/journal/* first, so everyone can add his bits himself.
stevan rafl: yup, thats what I am thinking 21:31
fglock ok
stevan fglock: it is just that right now autrijus is pretty busy with $work, and then with HW failure
so $time is at a premium for him
this will just help to make his life easier 21:32
fglock mm - it only works without 'my'
svnbot r6983 | stevan++ | Perl6::MetaModel 2.0 - 21:33
r6983 | stevan++ | * removing %:class_attributes since they are now just package variables
fglock @autrijus journal :) 21:36
stevan :)
svnbot r6984 | stevan++ | docs/journal/* (everyone give autrijus a hand, tell us what you have done) 21:51
r6984 | stevan++ | - added a template.kwid to be used as a basis for the daily journals
r6984 | stevan++ | - added a 2005-09-12.kwid for todays changes, please add to this
r6984 | stevan++ | NOTE:
r6984 | stevan++ | If your subproject is not listed, please add it, the list is based
r6984 | stevan++ | on what I know is going on, and by no means meant to be comprehensive
r6985 | stevan++ | whoops forgot the date
stevan fglock, rafl: please journal away 21:52
fglock found yet another Array bug :(
stevan I am not sure the best layout, I just did it prose style, but bulleted lists is fine too 21:53
I was never much of a blogger,.. so this is new to me :)
rafl stevan: How detailed should be journaled? 21:54
stevan rafl: as detailed as you like
I assume autrijus will edit things a bit before posting 21:55
rafl: at this point this is a new thing.. I am not sure the "best way" yet
rafl stevan: Is tere a reason for the lines not being wrapped around?
stevan rafl: cause my text editor did it for me :) 21:56
sorry
they should be wrapped
my bad
rafl does it.
stevan thanks rafl :) 21:57
fglock just did my first journal entry :) 21:58
obra is there a planet.pugs?
stevan obra: I dont think so
obra pity 21:59
stevan obra: you mean something to aggrigate all the pugs stuff? 22:00
stevan is not familiar with the planet.* stuff
Juerd obra: There's a Perl 6 planet 22:01
IIRC
obra: Or, there used to be, on planetsix.perl.org
obra Juerd: yeah, I wrote that.
integral there is: planet.parrotcode.org and planet6.perl.org
Juerd Oh
obra whose blogs should be on planetsix?
svnbot r6986 | fglock++ | * journal - added infinite fat() example
obra I can get people up there if the ysend me mail
Juerd obra: Why would you want a pugs specific one? Most Perl 6 development is somehow relevant to Pugs, and vice versa. 22:02
stevan goes to get chinese food &
obra Juerd: I wouldn't. I was asking if there was one 22:03
but I'm happy to get pugs peoples blogs on planetsix
Juerd I misinterpreted the 'pity' then
obra if there were a planetpugs, I wouldn't have to do any work ;) 22:05
as it is, I'm responsible for planetsix
rafl Wha! svk tries to merge fglock's and my changes to todays journal and spawns me a vim with 4 open windows! 22:10
fglock maybe there are 4 possible combinations of merges :)
rafl hopes he did it right. 22:12
svnbot r6987 | rafl++ | r8343@ata: rafl | 2005-09-12 22:56:46 +0200 22:13
r6987 | rafl++ | * Added Debian lintian-override for Locale::KeyedText.
r6988 | fglock++ | * perl5/Array - fixed sparse autovivification, suche as @a[1000000000000]=99
fglock s/suche/such/ 22:14
svnbot r6989 | rafl++ | r8354@ata: rafl | 2005-09-13 00:08:43 +0200 22:16
r6989 | rafl++ | * Added news for the Debian package.
rafl Well, looks fine, doesn't it?
nothingmuch wow, that was fun 22:17
the runtime computes factorial
does IO
and randomly chooses whether to provide a native * or to take the reference implementation from the "prelude"
(based on +) 22:18
fglock nothingmuch: randomly? 22:21
svnbot r6990 | fglock++ | * Journal - news about the newly supprted backends
r6991 | nothingmuch++ | the circular stuff demoed in perl 5
pasteling "nothingmuch" at 82.81.247.180 pasted "randomly" (5 lines, 222B) at sial.org/pbot/13078 22:22
nothingmuch fglock: is it clear? 22:24
fglock yes 22:25
nothingmuch likes the fact that the AST runs just as well
nothingmuch dances the go to be dance 22:29
someone say something nice about the circular crap first though
fglock nice crap!
nothingmuch thanks =)
fglock goes home & 22:30
svnbot r6992 | rafl++ | r8354@ata: rafl | 2005-09-13 00:08:43 +0200 22:33
r6992 | rafl++ | * Added news for the Debian package.
rafl Grrr. svk confuses me.
svnbot r6993 | rafl++ | r8363@ata: rafl | 2005-09-13 00:29:35 +0200 22:34
r6993 | rafl++ | * Wrapped around some lines in todays journal.
nothingmuch luqui: svn.openfoundry.org/pugs/docs/notes...e_stuff.pl 22:43
just run it
it computes factorial like in the big graph
luqui updating svn and running
nothingmuch and the runtime randomly either includes or doesn't include a "native" implementation of &infix:<*> (which has a ref implementation based on +, -, and if) 22:44
luqui interesting 22:46
that is a large script
nothingmuch it's a bunch of modules in onefile 22:47
luqui yeah...
still, that's as big as most of my big modules on cpan
(where "my" big modules are medium-sized)
can you give me any help navigating the file?
nothingmuch sure 22:48
luqui where's an interesting part?
nothingmuch there is the Reducer class
Compiler, Interpreter and Dumper all inherit from it
when you shove the initial AST and env through the compiler it basically does symbol resolution 22:49
by reducing the tree
(details in a minute)
Interpreter does the same process but applies code
Dumper does the same process but pretty prints 22:50
sub reduce is a sort of MMDish hack to dispatch based on the node we're visiting
generic_reduce is used to traverse objects without caring about them
useful in the Dumper for container objects like Seq 22:51
anyway, the magic happens inside 'reduce_sym' in the debugger
compile_time_resolution does a yucky hack to make recursion possible 22:52
if things are found in the env then the compiler asks the runtime if it has a native Prim with an appropriate hash
if it does it's used
if it doesn't the thing from the env is compiled and used instead 22:53
key objects:
Val - wraps around perl values
Thunk - a sub
luqui ahh, Placeholder handles recursion?
nothingmuch yes
Seq - a sequence of exprs, where the last one is used 22:54
App - takes a value that is expected to be reduce to a thunk, and applies it
puts all the other things in an internal structure
Param - takes elements from that internal structure
Pad - a variable with a value 22:55
Stub - something you put in a thunk that can never be executed
makes sense?
the Runtime object is really just a factory and a hash
luqui probably
the names are fairly descriptive
luqui has always been pretty slow at reading codwe 22:56
*code
nothingmuch the hash is 'digest => Prim'
(prim iis arity and a code ref, with a name thrown in for debugging fun)
(and the hash it equals to) 22:57
luqui so how did you plan to work with temp &foo again?
nothingmuch not in this thing
luqui do you have a plan?
nothingmuch in this thing there are constant static globals 22:58
and dynamicly scoped vars
the dynamically scoped vars are delayed till runtime
luqui okay
nothingmuch but in theory, the hash could be asked by 'reduce_thunk' in Interpreter
to see if there is a native version 22:59
&foo is just a name
the hash mapping is WRT values
luqui I see
nothingmuch Runtime->new is where primitives are made 23:00
my $f = rand(1) > 0.5; ... ($f ? "*" : ());
whether or not the runtime provides a native * op or not
$r->run($env, $prog) - compile and execute AST
take functions from $env if needed 23:01
Dumper->reduce make an AST into a string
the next step is to just read the 'reduce_foo' methods one by one
they're pretty simple
oh, and note the enter_scope and leave_scope codoe
in the compiler the code is walked to see if there are any bindings that mask the global env
symbols that don't map to some structure (a Param or a thing in $env) are a compile time error 23:02
things from Params are left as Sym
things in $env are resolved into Val
in the interpreter enter_scope and leave_scope are used to dump pads and manage parameters from an app 23:03
that code is slightly messy, but I was searching for the minimal thing I could use
luqui yeah, it looks like proof of concept 23:04
it looks like a proof though...
rafl wi 53
luqui needs to play with it a little
nothingmuch heh, if you raise the Val->new from 5 to around 8-9 then 'with builtin &infix:<*>' finishes in 0.3 seconds, and without doesn't finish any time soon 23:06
luqui noticed :-)
I have it on 6 right now
nothingmuch anyway, off to sleep 23:07
luqui night 23:08
nothingmuch oh btw 23:10
i should note this is the result of the lexical rebinding of subs issue
sub &foo (&infix:<+>){ 1 + 2 }
foo(&say(; 23:11
i don't remember how
luqui really? 23:13
luqui doesn't see how that could cause this, but cool
oh btw
nothingmuch yeah, that's where the circular prelude idea popped up
luqui I'll let you in on a secret wrt my fmap proposal
nothingmuch btw - if you have ideas for a circular $env i'll be happy
luqui I'm trying to make junctions a functor to steal their magic :-)
luqui has been thinking about circular $env all day at school 23:14
nothingmuch i think when things like map defined with gather/take start getting there circularity will really shine 23:15
but that it'd be nice to have an example of how two runtimes with different rootsets can run the same code 23:16
luqui will probably write another proof of concept tonight with a graph-theoretic focus 23:17
that is, how do you tell whether a rootset is complete :-)
that's the theory thing I was talking about
nothingmuch you can just dish out the dep tree, and see if you hit a stub 23:18
luqui there are no stubs in a recursively defined prelude
*circularly
nothingmuch oh, in that sense
right
nothingmuch is very tired
luqui get some rest 23:19
nothingmuch one last thing to think of:
i like the way this scales
in the example graph the compiled in opcodes are all that is needed to actually run the code
and this same logic can make the things people fuss so much about (Template::Stash::XS, etc) easier
at the same go
embedded devices here we come 23:20
luqui likes this multiplatform prospect of perl 6 in general
luqui &
dudley_ is luqui's theory proposal up somewhere? 23:31
luqui so many people have been asking about it, maybe I should post it 23:38
stevan luqui: yes, put it back in
luqui: also please add anything interesting to docs/journal/* 23:39
we are helping autrijus with the journal since $work is crazy for him
dudley_ luqui: You can't just tease us like that and then not deliver ;)
stevan goes to tuck small children into bed
luqui I'm just afraid of putting it public on p6l 23:40
because it's a bunch of abstract nonsense
and some of it is still just nonsense
so I don't want people to reject it before they understand it
dudley_ then check it in under docs/ somewhere until it's fully cooked
luqui but I think putting it in pugs should be safe... I just won't post it to p6l
pugs folks seem to be pretty good at grokking half-complete abstractions 23:41
dudley_ some of us better than fully-complete abstractions...
That way we get to make up half of it as we go along 23:42
stevan luqui: pugs is a repository for the insane :) 23:45
it belongs here
dudley_: how about the MM in haskell? 23:46
nothingmuch said he would help too
actually I think up to gnosis in Haskell
then the rest in Perl 6 would be an even cooler idea
dudley_ stevan: I know exactly enough haskell to not feel like a total moron when reading haskell 23:47
stevan dudley_: you are way ahead of me then
nothingmuch has some haskell-fu
dudley_ but not enough to not feel like a total moron when writing it
stevan maybe luqui would help too *hint* *hint*
luqui sure
stevan horray
luqui I'm all for writing weird abstractions in haskell these days 23:48
stevan excellent
the goal of course it to get it into pugs
luqui oh, you mean under src/
very cool
stevan ideally
luqui so then the Pugs runtime for PIL2 could use it...
svnbot r6994 | luqui++ | r3389@jabberwock: fibonaci | 2005-09-12 17:48:17 +0000
r6994 | luqui++ | Added model_theory, which consists of all my writing on theories
r6994 | luqui++ | so far.
luqui or maybe even before that... but I wouldn't count on it 23:49
dudley_, there you go
stevan I am not sure of the timeline for PIL2
luqui isn't either
stevan however, PIL2 and the metamodel need not be dependent
luqui it was probably short until the demons claimed autrijus
stevan I would rather autrijus take his time on PIL2
yes
stevan has to go take the dog out,.. bbiab & 23:50
dudley_ cool, thanks luqui. 23:53
heh, about halfway through the second paragraph, I was thinking "Scala" in big bold type. 23:56
luqui of course, Scala is the language that solved this... kindof 23:57
but it gets crufty quickly
dudley_ That it does.
luqui I claim that "extends" on data constructors keeps it from getting crufty
but read on 23:58
dudley_ Every time I see "extends" now I think of Java's generics. And then try not to vomit.
dudley_ reads on 23:59