svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com
Set by avar on 16 November 2006.
00:02 neonse left 00:05 ozo joined 01:04 bucky joined 01:06 jontec joined
jontec what does array[num1][num2] do? 01:07
01:12 johnjra joined
johnjra array[num1][num2] acceses the element at that position 01:21
jontec:
jontec so, this is a multi dimentsional array?
dimensional* 01:22
johnjra: sorry, forgot to point the message to you
finchely jontec: how would you declare an array with 2 dimensions? 01:23
johnjra jontec: reformulate your question
jontec finchely: is it an array with an array inside it?
johnjra: that's directed at you as well
johnjra jontec , to understand easier
finchely jontec: well yes an array of arrays 01:24
johnjra johnjra: array[num1][num2] has num1 x num2 elemnts right ?
johnjra: array[num1][num2] is a continous memory space with sizeof(type_chosen_for_array) x num1 x num2 <--this is the size of teh memory it occupies 01:26
jontec johnjra: that's the thing... I can't tell when it gets the second array? Let me pastebin the part I am talking about
johnjra jontec no no no 01:27
01:27 ozo left
Limbic_Region this is #perl6 right 01:27
?
johnjra jontec: so the memorry for that is continous,now arra[num1][num2] is just a way of saying access the (sizeoftypechosen x num1) +num2
jontec: you understand ? 01:28
jontec johnjra: I am seriously not getting this at all. T_T I'm a ruby programmer and not familiar with memory at all... 01:29
johnjra: nope
johnjra: do you know of anything I could read? 01:30
johnjra jontec: yes 01:31
01:31 johnjra joined
johnjra jontec: u there ? 01:34
jontec johnjra: yeah
johnjra: I just saw something... is this what it is perldoc.perl.org/perllol.html or is it something totally different 01:36
01:42 mjk joined
johnjra jontec 01:42
let us start with the case dimension 1
array[n];
how do you access cell n ?
well in C its relevant to see how
*(array+sizeof(cell)*j ) 01:44
jontec: u wit me ? 01:50
jontec: for dimension 2 01:51
you have * ((array+sizeof(cell)*j )+j1) 01:52
jontec no, not really, I didn't see that you had posted again 01:55
that syntax makes no sense to me
johnjra jontec: dude 01:56
jontec: if you have array[n][m] how much elements does it have ? how much does it weigh ?
jontec johnjra: I guess it has to be at least n wide and m long? 01:57
johnjra jontec: so how much eleemnts does it have ?
jontec: n * m , yes?
jontec n x m
yeah
johnjra jontec: but if it is array[n][m][p] ? 01:58
jontec n * m * p...
I'm seeing a cube now, is this wrong? should I be seeing a 3 x 3 square? 01:59
johnjra yes you are seeing a cube
jontec okay 02:00
johnjra but that cube can be seen as a line with length n*m*p
02:00 TimToady joined
johnjra do you agree ? 02:00
jontec yeah
johnjra so jontec if you have array[n][m][p] and array2[n*m*p] they weigh the same ? 02:01
jontec yeah
johnjra jontec: it remains to make a correspondence between them 02:02
jontec: how would you do that ?
jontec what do you mean?
johnjra jontec: make a one-to-one correspondence(function that associates an element from one side to an element on the other side) 02:03
jontec array[1][1][1] = array[n][m][p]? I only remember one-to-one functions (algebra) as being inverses. O_o 02:05
n, m, and p there are the last elements
I don't know how far they extend?
johnjra suppose n=2;m=3;p=4; 02:06
a[2][3][5] -> a2[30]
so we can associate a[1][1][1]->a2[1]
a[1][1][2]->a2[2] 02:07
so forth to a[1][1][5]->a2[5]
now a[1][2][1]->a2[6]
jontec but isn't that ambiguous? a[1][2][1] -> a2[2]?
woah... wait... I didn't understand that last one... let me read again. 02:08
johnjra jontec: it was a[1][1][2]->a2[2]
ok read again
jontec johnjra: yeah I see that, but wouldn't the one I wrote also associate to a2[2] (1*1*2) = (1*2*1) ? 02:09
johnjra jontec: no
jontec why? 02:10
johnjra jontec: if it were so,2 elements would be associated to one element and that would lead to 30 distinct elements in the left side and 29 distinct elements in the right side wich is wrong
distinct=unique
jontec: you understand ?
jontec okay, yeah... but in your last example... 1*2*1 != 6? 02:11
how does it reference to that
?
johnjra jontec: we shall get to that later
jontec: a[1][2][2]->a2[7] 02:12
a[1][2][3]->a2[8]
and so forth
a[1][2][5]->a2[9] 02:13
a[1][3][1]->a2[10]
ok ?
now you can see a pattern
jontec but I'm not going to get any of the other ones.... how is 1*2*3 = 8 and 1*2*3 = 9?
I can't... see one. 02:14
johnjra well a[i][j][k]->a2[ (i-1) * ((j*3) +k) ] 02:15
oh...sorry i have made a mistake
just a little to correct it
a[i][j][k]->a2[ ( (i-1)i*3+j )*3+k ] 02:17
>a[i][j][k]->a2[ ( (i-1)*3+j )*3+k ]
ok the last one is good
its ok now
you can check for i=1 ; j=3;k=1
it is a[1][3][1] -> a2[10] 02:18
wich is as we have typed above
jontec okay... gimme a sec... I have made a cube...
I need to tape it together
lol
johnjra now this formula lets you make a correspondence between a cube and a line with cells
lol ? 02:19
jontec okay, I'm done... I see the math... I can do the math... 02:21
but where is it derived... why?
by why I mean why would you want to make associations like this?
stevan jontec: if you program in C, it makes sense (for some definition of "sense") 02:22
jontec I mean it's way easier to look at the first.
nope.
I've only done VB
johnjra jontec: what we have proven is that a a[i1][i2][i3][i4]...[in] -> a[i1*i2*i3*...*in]
wich simplifies things allot
stevan jontec: that assumes that arrays are layed out in memory contiguiously 02:23
allbery_b you just have to remember thatin C, a multidimensional array is syntactic sugar for a unidirectional array
er, unidimensional
stevan in ruby/perl/any modern language ... the array is usually a series of pointers to the heap
jontec stevan: so, there is always a a2[1.. 30] 02:24
allbery_b a behavor which is held over from early C which was little more than structured assembly language :)
stevan jontec: I dont knwo what you mean
jontec stevan: lol... forget it 02:25
:D
stevan jontec: :)
johnjra jontec: yes,the answer is yes
stevan if you are not writing assembler/C, stuff like this is basically useless trivia IMO
a good compiler means you never need worry about memory layout
jontec stevan: but why is this important to understanding what array[num1][num2] is? if I know that it references something like a.... what is the thing... 02:26
I can't remember...
okay, I saw what you said.
okay, johnjra: thanks for the help understanding the whole memory arrangement (I think that's what we were discussing?). :D 02:28
johnjra yeah , your welcome :)
jontec I'm trying to figure out where the second dimension in my array came from for the guy who wrote this to reference it with two subscripts 02:32
stevan jontec: pasting the code would help
jontec stevan: oh, I was going to ask a question about push first :D 02:33
lol... umm push merely appends the data in the second array to the first? in the same dimension?
a1[a, b, c] (however I do push) a2[c, d, e] >> a1[a, b, c, d, e]? 02:34
stevan yes
jontec okay... I'll let you guys have a go... 02:36
trying to find someplace to paste... my two normal ones aren't working O_o 02:42
pastebin.com/853975 02:43
buubot The paste 853975 has been copied to erxz.com/pb/847
allbery_b pastebin.ca? sial.org/pbot? 02:45
02:46 polettix joined 02:48 b00t joined
jontec I've gotta go.. see ya... if you can tell me how that array magically gains a dimension, im me at Ez8Gundam4 02:53
allbery_b @tell jontec array indices in perl5 are 0 .. $#array-1 02:56
hm, right, they're messing with LB
in any case, does this mean we;'re back to being #perl6? 02:57
:/
03:03 leed joined 03:11 thepler joined 03:57 dduncan joined 04:04 xpika joined 04:37 mako132_ joined
miyagawa audreyt: ping 05:08
meppl gute nacht 05:11
05:29 b00t joined 05:44 Lunchy joined
allbery_b ...and I'm here too :) 05:45
OSX intel or ppc?
Lunchy intell
10.4
please excuse my horrendous spelling/typing :)
allbery_b hm. no intel here, audreyt has definitiely built pugs for 10.4 intel though 05:46
allbery_b has built it on ppc
Lunchy ah
allbery_b *definitely
Lunchy I've got macports installed, along with ghc and the latest parrot
but pugs fails to build
allbery_b what version of ghc? 05:47
Lunchy 6.6
allbery_b ok. where is it failing?
Lunchy when it tries to build UTF8 05:48
allbery_b there was recent discussion here (which I've lost due to having to reboot) about leftover files from old builds tripping over changes in parrot
Lunchy Build failed: 256 at util/build_pugs.pl line 360.
I checked out that line and didn't find an obvious answer 05:49
allbery_b that's almost useless, it's the lines before it that have real information. send them to sial.org/pbot or pastebin.ca?
Lunchy ah, yea, thought it mighta looked familar :) 05:50
allbery_b hm. al.so I never built parrot support into pugs here, I distrusted my prrot build to much (about 4 month ago, haven't updated)
basiclaly any build failure will end with essentially that message :)
Lunchy pastebin.ca/309963 05:51
buubot The paste 309963 has been copied to erxz.com/pb/848
Lunchy gotcha :)
allbery_b hm. is this the pugs source tarball or are you using svn.pugscode.org? 05:52
Lunchy tarball 05:53
suggest svn?
allbery_b I think the last tarball is too out of date
Lunchy heh, okay
allbery_b yes, get the latest from svn. possibly the tarball doesn't even support macintel (in fact likely, from that error message right at the start)
that looks like an early attempt at intel support that went awry 05:54
Lunchy ah
I'll give that a shot, thank you! 05:55
it's probably better that it doesn't work as it'll just distract me from haskell :)
allbery_b audrey was justr starting to play with an intell OSX box when I started with pugs, and the tarballwas already a little old 05:56
Lunchy oh, yea, that's from October! 05:57
allbery_b (actually I think only a week or so old, but (a) pugs development moves pretty fast outside the holiday season, and (b) still too arly for audrey to have fixed the intel build) 05:58
*early
Lunchy well, I got the tarball off cpan and it says the date is from october 05:59
allbery_b yeh
Lunchy os x doesn't come with svn does it?
allbery_b no, but it's in macports
Lunchy schweet 06:00
I've got so many ports installed it makes me feel like I'm on my gentoo box ;) 06:01
allbery_b then svn co svn.pugscode.org/pugs/ and go for it
dduncan if things go according to what I anticipate, I should be getting my own intel OSX box within a month ... the anticipate being that a refresh of the portables is announced this tuesday
then when I go to conferences I can bring my own portable rather than a borrowed one 06:02
Lunchy thanks allbery_b, it's been a while since I've used svn
allbery_b and eventually someobne here will offer you a commit bit :) 06:03
115 ports installed on mine. my freebsd box has more ;)
Lunchy danger will robinson!
allbery_b *everyone* gets a commit bit around here
Lunchy heh, I'd be too timid to ever use it, so feel free to give me one :)
I'd just got my macbook a about a month ago, I'm a new apple convert 06:04
06:06 sunnavy joined 06:15 BooK_ joined
Lunchy dang, svn gave teh same error 06:17
allbery_b hrm 06:18
Lunchy oh well, I suppose I can just ssh to my linux box and use it from there
allbery_b hm, wait. what version of xcode do you have installed?
Lunchy I think 4.1...whatever the latest is 06:19
allbery_b what does gcc_select say?
Lunchy 4.0.1
allbery_b hrm. think you'll need to wait for audreyt to show up, or someone else with macintel experience 06:20
that error message suggests to me that either gcc or ghc is confused abotu what platform it's building for
Lunchy okay, no problem, it's not a big deal to me, but if anyone wants to work through this with me in the interest of progress, I'm all for it :)
ah 06:21
allbery_b (multiple -arch flags shouldn't happen. my gguess is that somehow it thinks it's supposed to be doing ppc and intel compiles at the same time)
Lunchy yea, that sounds possible 06:22
06:26 nipra joined
Lunchy sure enough, -arch ppc and -arch i386 are in all of the makefiles 06:32
for the LD(D)FLAGS
allbery_b there may be some bit that needs to be tweaked somewhere in xcode to convinvce it to not do "fat" builds. I don't recall having to do anything but it may well be different on PPC 06:34
Lunchy looking through the settings, nothings jumping out at me 06:40
oh well, will play more tomorrow, it's bedtime for me :) thanks again for your assistence
06:48 bwk joined 07:31 buetow joined 07:33 Aankh|Clone joined 07:41 drbean joined 07:45 marmic joined 07:59 bucky_ joined 08:14 drbean left 08:16 f0rth_ joined 08:29 Odin- joined 08:30 iblechbot joined 08:32 f0rth joined 08:35 buetow joined 08:40 elmex joined 08:41 luqui joined 09:19 drrho joined 09:24 johnjra joined 09:46 drbean joined
TimToady I believe smartmatching is now close to sane. 09:46
but then, I've believed that before... :) 09:47
10:13 Alias__ joined 10:20 cdfh joined 10:42 ruoso joined 10:51 fglock joined
dduncan my, you're up late 10:53
fglock I'm trying to find a way to implement BEGIN blocks in pure perl6 11:01
is there an API for pads? 11:02
if I wrote an interpreter for the generated code, I could have enough program state info - but compiled code is harder 11:05
11:08 jferrero joined
fglock in a sense, BEGIN blocks need to be "executed" into a script, that could be replayed at run-time 11:28
11:29 kanru joined
dduncan Might macros do what you want? ... 11:35
or Perl 6 has actual BEGIN blocks ... 11:36
see Synopsis 4, under "Closure traits" ... 11:37
about 60% of the way down in dev.perl.org/perl6/doc/design/syn/S04.html
fglock 11:38
or are you trying to implement that Perl 6 spec rather than just use it?
fglock dduncan: yes - this is p6-on-p6 11:39
dduncan I C
can't say then
fglock I need to create the environment into which a BEGIN block will execute
and then recreate the side-effects at run-time 11:40
dduncan I assume that this is being written on a mini-Perl 6 then, and not a full Perl 6?
fglock I need something like 'is inner' sub trait
dduncan I don't yet know enough about that, sorry
fglock that't the mp6 -> kp6 transition 11:41
kp6 provides the lang to write 6-on-6
11:46 dduncan left
fglock storing pads as p6 data would make them easier to manage - I wonder if it's a bad idea, since native pads are much faster 11:53
there is an idea of a "Pad class" here: www.mail-archive.com/perl6-language...25373.html 12:09
12:11 chris2 joined
luqui perhaps this isn't the time to worry about speed 12:14
we can always optimize later, after bootstrapping, no?
12:17 elmex_ joined
fglock luqui: yes, but I worry about the compiler speed 12:19
it can easily go from a few seconds to several minutes
luqui yeah, I guess that wouldn't be good for development 12:24
(like when pugs took 45 minutes to compile)
fglock kp6 will end up desugaring almost to vm level - it could almost implement continuations 12:41
12:54 integral joined 12:58 finchely left 13:20 nipra joined 13:22 iblechbot joined 13:36 sonorous joined 13:40 sunnavy joined
svnbot6 r15010 | fglock++ | kp6 - added notes on BEGIN, pads, oo 13:50
13:51 sunnavy joined 13:52 TimToady joined 13:55 gnuvince joined 14:13 mdiep joined 14:18 [particle] left 14:36 [particle] joined 14:48 fglock joined
fglock hmm - desugaring kp6 into mp6 buys some interesting simplifications 14:56
following this line of thought, multi-dispatch could also be resolved at mp6 level 15:04
this is for bootstrapping - the calls can be replaced by native code later
15:15 sunnavy joined
fglock what is the scope of this declaration? multi infix:<+> {...} 15:18
avar same as multi sub .. ? 15:20
fglock with 'is export' it is valid in the modules that 'use' it, and with '*infix:<+>' it is valid everywhere?
15:29 thepler joined
wolverian err.no/src/contentless_ping.pl # heh 15:35
15:47 araujo joined 15:51 vel joined 15:55 Limbic_Region joined 15:56 araujo joined 15:57 mako132 joined 16:09 araujo joined 16:14 araujo joined 16:20 araujo joined 16:32 sunnavy joined 16:33 chris2 joined 16:38 hexmode joined 16:46 sunnavy joined 16:47 sonorous joined 16:48 weinig is now known as weinig|bbl 16:58 ozo joined
TimToady fglock: infix:<+> is just a strange name for a sub or multi, and under that name works exactly like a normal sub or multi. As an infix:, however, it also adds to the parsers infix table when in scope, and that scoping works like macros. 16:59
macros work only from the point of declaration or importation to the end of the scope. 17:00
so the semantics of *infix:<+> depend on when it was logically exported to *
17:01 luqui joined
TimToady or rather, when it was logically imported by * 17:01
fglock TimToady: thanks
TimToady if before the user's compilation unit is compiled, then the user's code sees your infix:<*>
but if exported at user's run time, then it would not be visible as a macro. 17:02
*however*, since there is already an infix:<+> defined 17:03
and since infix:<+> is presumably dispatched by MMD, it would actually find it anyway if defined as a multi
17:03 Nouk joined
TimToady since that is late binding 17:03
fglock I'm now considering a state-machine built using mp6, as kp6's runtime 17:05
this would add support for continuations
17:05 Nouk left
fglock hmm - too many options 17:07
17:07 mj41 joined
fglock the key for kp6 success is to find the right level of abstraction in the low-end 17:14
17:14 weinig|bbl is now known as weinig
luqui fglock, \calc + cps ? 17:14
what are kp6's goals? 17:15
fglock what't \calc ?
luqui lambda calculus
fglock luqui: it's being specified
luqui what does it stand for?
fglock KindaPerl6 - it's a compiler built upon MiniPerl6 17:16
should have better support for p6 features
luqui ohk
so it's like (mp6 + p6)/2 in a way
?
fglock like: containers, BEGIN, an object model
yes 17:17
it's a level of indirection
luqui hmm
fglock the main problem is performance x ease-of-implementation, I think 17:18
I'm trying to find the tradeoff 17:19
[particle] i'd go for ease of implementation, and refactor for performance
working trumps good 17:20
17:23 sunnavy_ joined
fglock [particle]: there is also the v6.pm's way - "move all problems into the backend" 17:30
in other words, just extend mp6 into full-p6 17:31
masak [particle]: of course it does, the latter is a subset of the former 17:32
[particle] well, parrot certainly has continuations
but not every back end will
so implementing them at a higher level makes sense (as long as they can still be optimized easily to a vm-ative continuation) 17:33
*vm-native
17:33 ludan joined
[particle] masak: 'good' is probably better written as 'well-designed' 17:34
or, 'optimized'
fglock brb 17:35
I think it boils down to backend-specific AST transformations 17:47
[particle] ah, well if it's just a matter of semantics, it's no big deal to xform ast 17:48
fglock is there a spec for p6-parrot high level ast? 17:49
I'd like to reuse if possible 17:50
17:50 kanru joined
[particle] pmichaud is working on past now as he implements p6 17:50
he'll be working on binding shortly, then 'for' 17:51
and lastly, begin/end
then we'll be running Test.pm 17:52
it'd be great if you found past useful enough to reuse outside of parrot
it would make ast transformation so easy for us :)
fglock it would be nice to have some examples 17:53
[particle] of what, parse tree -> ast 17:54
fglock source code -> ast would be nice
[particle] ok, well, p6 source goes through pge using a p6 grammar
actually, you can do live examples from languages/perl6 17:55
pastebot? 17:56
fglock [particle]: svn.pugscode.org/pugs/v6/v6-MiniPer...Control.pm - mp6-style grammar
pasteling "[particle]" at 144.81.84.207 pasted "example of 'say 1;' converted to parrot ast" (51 lines, 1.2K) at sial.org/pbot/22203 17:57
fglock thanks - I can work out from that 17:58
[particle] let me know if you need more examples 17:59
fglock what is 'ctype'? 18:00
[particle] that needs renaming
along with vtype
i'll point you to a discussion 18:01
fglock "concrete type"?
[particle] constant type
meaning, it can be stored in an i,s,or n register in parrot 18:02
rather than as pmc
so, it's an integer constant
and vtype is value type 18:03
ctype is optional, btw
18:04 amnesiac joined
[particle] groups.google.com/group/perl.perl6....bc53dcb3cb 18:05
i guess you have to request shorten here
fglock got it 18:08
18:09 _bernhard joined
fglock [particle]: I wonder if we could gen Past, out of the existing mp6 impl 18:09
[particle] what does mp6 gen now?
fglock it generated parrot source
generates
[particle] ah, right, it does.
fglock (or perl5 source)
[particle] it'd be nice to move that up to the ast level, generate past 18:10
18:10 justatheory joined
[particle] then mp6 doesn't need to worry about changes to parrot vm-level languages 18:10
fglock I wonder if you could work with me for an hour or so, and see what we get 18:11
[particle] can do
i'm updating pugs for the first time in a month
fglock this is the current parrot emitter: svn.pugscode.org/pugs/v6/v6-MiniPer...Emitter.pm 18:12
[particle] so, should we create Parrot/PAST/Emitter.pm? 18:14
fglock maybe just PAST/Emitter for short 18:15
[particle] that works
fglock it needs a workflow script - it can be copied from mp6-parrot.pl -> mp6-past.pl 18:16
and s/MiniPerl6::Parrot::Emitter/MiniPerl6::PAST::Emitter/ 18:17
[particle] ok, i'l start on it now
fglock just run 'sh hello-parrot.sh' to check if it's working 18:18
[particle] not on windows
fglock echo 'class Main { say "hello, World" }' | perl -Ilib5 mp6-parrot.pl | parrot - 18:19
s/'/"/
[particle] my variable $s masks earlier declaration... 18:21
oh, don't worry about that 18:22
fglock ?
[particle] but mp6-parrot.pl gets me "Can't call method "emit" without a package or object reference"
mp6-parrot.pl line 33
fglock hmm - let me try on another computer 18:23
it works in feather too 18:25
[particle] maybe i need to build/install some modules? 18:27
fglock do you have Scalar::Util installed? it's the only dependency
[particle] i had to change -Ilib5 to -Ilib
fglock that should not work - lib is a p6 directory
[particle] ok, i'll try again. i'm getting latest Scalar::Util, laso 18:28
fglock would you try copying the program to a file and perl -Ilib5 mp6-parrot.pl < filename 18:31
it may be a windows command line problem
[particle] sure. as soon as my Scalar::Util install finishes
fglock I got a windows machine - will try... 18:32
18:33 cdfh_ joined
[particle] crap, Scalar::Util fails a taint test on win32, gotta force install 18:33
same problem 18:36
fglock waiting for svn up to finish... 18:37
hmm - no problems in windows either - with vanilla perl 5.8.8 18:38
[particle] if i uncomment line 31, i get '' 18:39
empty single quotes (line 32, that is)
i'll try another machine, too 18:40
pasteling "fglock" at 200.17.89.88 pasted "mp6-parrot snippet" (19 lines, 384B) at sial.org/pbot/22204 18:43
18:44 rafl_ joined
[particle] that style works 18:48
18:50 pdcawley joined
fglock 'PAST::Val' seems like a good place to start 18:53
18:53 pdcawley joined
fglock it can be generated by class Val::Int, Val::Num ... 18:54
18:56 cdfh joined
fglock hmm - mp6 nodes are discarding 'pos' and 'source', but that's fixable 18:57
[particle]: in windows: echo class Main { say "hi" } | perl mp6-parrot.pl 18:59
the 'emit' problem is caused by '' around the echo string 19:00
[particle] gotcha 19:03
how do i compile PAST::Emitter to p5? 19:04
(get it from lib to lib5)
fglock perl mp6-perl5-boot.pl < lib/... > lib5/... 19:05
first: mkdir lib5/MiniPerl6/PAST
mp6-perl5-boot is the perl5-bootstrapped compiler 19:06
[particle] got it
fglock these commands can be added to util/build-perl5.sh, for a full-rebuild 19:07
19:13 buetow joined
fglock did it work? it should not take more than half a minute to compile 19:14
[particle] yes, it compiled 19:15
i'm now modifying, but as you said, i can't us esource or pos
so i'll just work around that for now 19:16
kolibrie fglock: I'm stuck trying to get data out of an array deep within a match 19:18
pasteling "kolibrie" at 66.239.158.2 pasted "how can I get to the data in this array?" (88 lines, 2.1K) at sial.org/pbot/22206
fglock kolibrie: looking
19:18 pbuetow joined
kolibrie has been looking for hours, and hopes someone else can find an answer with less effort 19:19
fglock [particle]: I can give you 'from' and 'to' - 'source' is a bit tricky because it may end up creating multiple copies of the string and eating ram 19:20
19:20 justatheory joined
[particle] <pos> is 'from', so i'll take that 19:22
i don't need source right now 19:23
19:28 autark joined 19:37 prism joined
kolibrie fglock: are you as baffled as me? 19:37
fglock kolibrie: add an extra $ at: $$block<names> 19:40
$block<names> returns a Match, the return-object is an array
kolibrie ahh, 19:41
fglock maybe because 'token block' doesn't have a return-block
kolibrie name: is still ARRAY(...), but this?: and hmm: have data now
that's good 19:42
now, can I apply this back into my real grammar?
fglock 'name' does not interpolate by default - that looks correct
kolibrie fglock: good, thank you so much! 19:43
fglock np
19:44 larsen_ joined
fglock I need to run 19:46
[particle]: thanks for the help
19:47 nipra joined
fglock & 19:48
kolibrie see you
fglock g'night
19:48 fglock left 19:51 larsen__ joined 20:06 Lorn joined
gaal feeds.feedburner.com/~r/typepad/Cut...e_moo.html 20:09
20:20 Lorn_ joined 20:23 Vex joined 20:27 rindolf joined
rindolf Hi all. 20:27
Hmmm... #perl has reached its limit and no more people can join. 20:28
Tene rindolf: that's exactly what perl6 is being made for! 20:31
wolverian heh 20:34
there were just 521 people on #perl
wolverian shrugs at irc
20:47 jferrero joined 20:57 awwaiid joined 21:06 weinig joined, weinig is now known as weinig|away 21:10 johnjra joined 21:12 koye joined 21:14 ludan joined 21:18 justatheory joined
TreyHarris TimToady: in re your last S03 mod--is "exists" gone? 21:19
21:27 [M]erk joined 21:30 buetow joined
TimToady I suspect it's gone. 21:30
though I'm still not entirely happy with contains... 21:31
contains %foo: $key doesn't read well, is one problem. 21:33
[particle] %foo.contains( $key ) reads okay, though 21:34
TimToady but exists is no better on that score.
%foo.exists($key) is worse on that.
[particle] yep
TimToady and I still wish there was a way to combine the predicate with subscript notation nicely.
but the P5 macro approach for exists and delete doesn't nicely keep the keyword near the actually part that you're testing 21:35
*actual
unless we made .exists and .delete postfix macros that require a subscript on the left. 21:36
but then we've made something look dispatchable that isn't.
it's more like %hash{$key}:delete or %hash{$key}:exists 21:37
they tell the subscript to do something other than just return the values
it's the subscript that has to do it, though, or you lose the original object you're subscripting by the time the values are returned. 21:38
and I'm not sure we really want to have the ordinary subscript code having to decide continually at runtime whether there was an adverb. 21:39
subscripting tends to be on the critical path in the tightest loops
so I'd rather have a macro that is known at compile time to modify the subscript to a different operator 21:40
in which case, it might even be punctuational. .?{$key} for exists, for instance. 21:41
but contains reads better than that... 21:42
hmm 21:43
%hash.:delete{$key} has possibilities. 21:44
or swipe a bit of grammatical category namespace... %hash.delete:<foo> 21:45
svnbot6 r15011 | particle++ | [v6]: beginnings of a PAST emitter for mp6
r15011 | particle++ | ~ created control script based on mp6-parrot.pl
r15011 | particle++ | ~ created emitter based on Parrot::Emitter.pm
r15011 | particle++ | - all Val:: nodes emit
r15011 | particle++ | - PAST::Block (top level) emits
r15011 | particle++ | ~ TODO:
r15011 | particle++ | - node numbering is a prerequisite to proper generation
r15011 | particle++ | - add Stmts and Stmt nodes
r15011 | particle++ | - refactor as needed
21:47 theorbtwo joined
pasteling "evalbot_r15010" at 194.145.200.126 pasted "Pugs build failure" (429 lines, 24.1K) at sial.org/pbot/22210 21:47
TimToady or maybe .delete and .contains are normal methods that return a proxy that responds to normal subscripting differently. 21:52
I would worry about those proxies persisting though if you *don't* subscript it... 21:53
You could create hashenbergs that delete their entries when you look at them...
$keyexists = contains %hash; if $keyexists<foo> { ... } 21:58
wolverian %hash.keys.contains($foo) 22:00
TimToady that's what S03 currently says, except you can leave out the .keys because .contains is subset, and %hash assumes that set context means keys. 22:01
wolverian ah, right. sorry :) 22:02
TimToady I'm so deeply offended... :)
wolverian %hash contains $foo? 22:04
TimToady I suppose if .delete and .contains don't have an argument list supplied, they can just autocurry themselves to proxy objects that do autodeletion or subset testing
would have to have a unary form that defaults to $_
when contains
and generally we've been shying away from completely hiding $_ defaulting 22:05
in favor of .method forms
I suppose it's not really hidden in this case, since it's pretty obvious
to the compiler at least whether contains is where a term or an infix is expected
but then you get into precedence issues 22:06
and whether a standalone {...} will be interpreted as a subscript or closure 22:07
and I want subscript notation somehow 22:08
so that you can delete from a multidim hash: %hash.delete:{$a;$b;$c}
%hash delete {$a;$b;$c} would turn those into statements.
wolverian do we want first-class subscripts that you can hand to a method then? 22:09
TimToady %hash.delete(\{$a;$b;$c}) 22:10
wolverian opens the specs to find Subscript
right. :)
22:11 polettix joined
TimToady reducable perhaps to %hash.delete\{$a;$b;$c} 22:11
wolverian somehow I like it if it's a regular method. probably just shying from specialness due to how perl5 treated it 22:12
TimToady but it has to do something either macroish or proxyish
or we need first class subscripts
which are arguably a kind of Capture 22:13
wolverian right. it's not obvious to me that the latter would be the worse solution
TimToady I rather suspect people would just a soon write %hash.delete{...} 22:15
wolverian I know I would. 22:16
I just want to first-class everything :)
TimToady so let's just make .exists and .delete macros if followed by { [ or < 22:17
.contains rather
then we can always switch to the proxy approach if the macro starts getting in the way 22:19
the proxy approach feels slightly cleaner in that we could somehow have any .mumble<foo bar> grab control of its subscript at runtime without the connivance of the compiler. 22:21
wolverian I like it too. 22:22
TimToady maybe there's some way to make method dispatch decide whether to dispatch as two cascaded methods or as a single method with a subscript argument depending on the way the signatures look somehow. 22:24
22:30 weinig|away is now known as weinig
mdiep where is the source for evalbot? 22:30
integral try svn.pugscode.org/pugs/examples/network/evalbot/ 22:31
22:32 Aankhen`` joined
mdiep thanks! 22:32
integral np
TimToady on the gripping hand, I don't think the proxy object helps much, because it's the original container that actually has to delete the item, which the current .delete(...) form calls. What we really are looking for is syntactic relief so we specify the identity of the contents the same way as with subscripting. 22:40
johnjra anyone here used vim with svn ? 22:45
i need to know if theres any possibility of getting vim integrated with svn,by that i mean,if i press a button in vim , it should svn commit stuff 22:47
TimToady hmm, write a macro that calls !svn ci maybe? 22:48
you'd probably want to autowrite first though.
I always autowrite on ^Z, so it's one stroke (more or less) to get to a prompt 22:49
but that's on Linux 22:50
my reflexes don't work at all well on Windows... :/
22:53 nperez joined
wolverian johnjra, it even comes with a svn integration script, I think. 22:58
scratch that, it doesn't. well, check vim.org
ingy TimToady: can I msg you? 23:00
23:02 frankg joined
ingy TimToady: in other words, are you identified to freenode's NickServ? 23:03
Juerd You can always receive messages 23:10
johnjra wolverian: did u make it work for yourself ?
Juerd Sending them does require identification
wolverian johnjra, I vaguely remember using it with svk with success. 23:11
johnjra svk ? 23:12
23:15 Psyche^ joined
wolverian johnjra, en.wikipedia.org/wiki/Svk 23:15
23:15 bucky joined 23:29 arguile joined 23:32 Psyche^ is now known as Patterner 23:33 dduncan joined 23:36 weinig is now known as weinig|food
ingy Juerd: msging someone typically involves a dialogue :P 23:36
Juerd Really? 23:37
Now I know what has been wrong all this time :)
ingy but thanks for the technical update 23:38
TimToady ingy: yes, I'm ID'd 23:39
23:40 lisppaste3 joined
ingy TimToady: are you seeing my msgs? 23:40
TimToady yes
ingy I'm not seeing yours
TimToady hmm 23:41
ingy see why I started down this road? :)
I think I've msged you several times and just thought you hated me
Which is of course impossible 23:42
TimToady what, that I hate you, or that you think it? :)
ingy :P
how could you not love me? 23:43
TimToady you got me there...
ingy well I was wondering if you still had access to the server that Dan Kogai set us up on 23:44
TimToady dunno, haven't looked in most of a year...
ingy do you even remember its address? 23:45
TimToady erm
23:56 sonorous is now known as sono