pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:02 eternaleye_ joined 00:17 iblechbot left 00:32 charsbar left, charsbar_ joined 00:47 eternaleye_ left 00:55 ab5tract left 01:14 elmex left 01:20 BinGOs_ left 01:27 BinGOs joined 02:08 ab5tract joined
rakudo_svn r31169 | jkeenan++ | Make file conform to no trailing whitespace coding standard. 02:21
02:22 Limbic_Region left
meppl good night 02:28
02:30 meppl left 02:55 AzureStone_ left 02:56 kanru left 02:59 AzureStone__ left, ispy_ joined, AzureStone joined 03:01 kanru joined 03:08 wknight8111 left 03:11 sail0r joined 03:12 sail0r left 03:13 eternaleye_ joined 03:14 _jedai_ left, Ontolog joined, _jedai_ joined 03:29 Alias_ joined
Ontolog does Perl6 have some sort of "in" operator ala SQL? 03:32
xinming Ontolog: What do you mean? 03:34
example is better. ;-)
s1n he means is a value contained in a list/hash...
Ontolog yes
$a in @array is true if @array contains a value $a 03:35
xinming isany
literal $a ~~ @array
xinming it does
Ontolog i see
~~ does a lot of things?
literal yes
Ontolog I saw ~~ also checks the type
literal it is the "smart match operator"
Ontolog ah
literal one of those Do What I Mean things :) 03:36
Ontolog i am disappointed that subroutine arguments are not copy per default but read-only
i would think people expect copy 03:37
xinming Ontolog: this is the sane default, If you really want copy, is copy can do that. 03:38
Juerd What you expect depends on what you're used to
Copying makes awfully little sense to me, but I grew up with Visual Basic where I was taught to use ByRef as much as possible for performance reasons (not to actually change the values), and Perl 5 where pass-by-reference is the default 03:39
Perl 6 will add write protection, to save your gut. 03:40
s1n i cannot conceive a good reason to use pass-by-value on anything other than the case when you want it unmodified
but even then, there's usually write protection available in most languages
Juerd One reason is the contrived idea of compatibility with my ($foo, $bar) = @_; 03:41
Downright silly IMO
But I'm off to get some sleep; it's 541 am here. 03:42
Highlight of the day: waiting 10 minutes in front of a red traffic light, calling the police and ignoring the light with permission :)
Yes, I had an extremely boring day. 03:43
Good localtime
afk
Ontolog you actually called them and got permission?? 03:44
you should have just ran it silly man!!! 03:45
03:46 mncharity joined 03:49 dragon3 joined
mncharity moritz_: ok, a thrice+ repeated hint suffices. :) perl.net.au/wiki/Elf Questions, comments, etc, welcome all. moritz++ 03:50
lambdabot Title: Elf - PerlNet
Ontolog do I still have to do 'use strict;' and 'use warnings;'?
or is that default now?
s1n currently, use strict is sort of enforced 03:51
Ontolog are there new suggested filename extensions for scripts and object modules? 03:52
or is it still .pl and .pm?
03:52 mncharity left 03:54 ispy_ left
literal still .pl and .pm as far as I know 03:56
Ontolog anyone have a vim syntax file for Perl 6?
literal here's one: svn.openfoundry.org/pugs/util/perl6.vim 03:57
don't know how much it covers though
Ontolog awesome, thanks! 03:59
do we still have __DATA__ sections? 04:07
PerlJam Ontolog: no, they've been subsumed into POD 04:08
Ontolog not sure I understand
PerlJam Ontolog: something like =begin DATA ... =end DATA and you get a filehandle to access it. So now you can have more than one "__DATA__" section 04:09
Ontolog that's cool, where is this documented?
literal probably in the Synopsis on Pod 04:10
PerlJam S02 I think
yep, that's it. 04:11
__DATA__ becomes =begin DATA and the filehandle is $=DATA
Ontolog so you can have more than one __DATA__ section but actually they are all aggregated into one "file" accessed via $=DATA, is that correct? 04:14
literal no
you can have =begin WHATEVER_YOU_WANT
Ontolog ohhh haha i get it
so =begin FARTS will let me get data from $=FARTS? 04:15
literal yes
Ontolog i see that's cool
literal dev.perl.org/perl6/doc/design/syn/S02.html
lambdabot Title: Synopsis 2: Bits and Pieces - perl6 04:16
04:18 justatheory left
Ontolog yeah I've been looking at that document 04:19
So if I want some code to run when a class is loaded (I want to initialize some class attributes), where do I put that code?
PerlJam "when a class is loaded"? What does that mean? 04:20
literal you mean when an object is instantiated? e.g. a constructor? 04:23
s1n Ontolog: you mean like the BEGIN blocks?
is that even in perl6? 04:24
PerlJam s1n: aye 04:25
literal S02 has something to say about BEGIN blocks
Ontolog i mean exactly, when a class is loaded
if Perl 6 decides that happens when the first object is instantiated that is fine i don't care
actually, even before the first class method invocation 04:26
PerlJam Ontolog: I still don't understand what you mean by "when a class is loaded". What does it mean to "load" a class? Classes can be defined and put in files and those files can be "loaded". But these things are orthogonal. 04:27
literal Ontolog: an example would help
pmichaud when defining a class, the statements inside the class definition are executed when it's loaded, as if it were a BEGIN block. 04:28
class Foo { say 'hello'; ... }
Ontolog i see
so that should work for me
defining class attributes? 04:52
'has' is only for object attributes yes?
04:53 rindolf joined
literal our? 04:55
Ontolog i don't know, i'm asking you 05:00
literal I don't know either :)
05:09 pht joined 05:19 Psyche^ joined
pmichaud our defines package-scoped variables 05:20
Ontolog a package is the same as a class yes? 05:21
pmichaud which act like class attributes in this case. See S12, the line that starts "Class attributes are declared with either my or our"
Ontolog yes i saw that
so what's the different between my and our 05:22
pmichaud my is a lexically scoped variable, our is package scoped
Ontolog so my can only be used to declare private class attributes? 05:23
pmichaud see S12 :-)
literal hm, perlcabal.org/syn/Differences.html <-- this says that Pod will be replaced with Kwid, yet S26 says nothing about Kwid
Ontolog yeah i have it open and i'm reading it
lambdabot Title: Perl6::Perl5::Differences
pmichaud literal: I think that document was written prior to S26
literal ah, ok 05:24
so Pod's not going anywhere?
pmichaud literal: well, perl 6 pod is different from perl 5 pod
literal of course
pmichaud so it went "somewhere" :-)
literal not too far I hope
that Kwid thing didn't look good 05:25
Ontolog so I still use the 'use' keyword for importing class definitions?
pmichaud Ontolog: yes 05:26
05:33 Patterner left, Psyche^ is now known as Patterner
pasteling "Ontolog" at 59.37.36.178 pasted "Cast error" (7 lines, 245B) at sial.org/pbot/32180 05:37
Ontolog I get a casting error, it sucks
pmichaud you probably want for =$=DATA instead 05:38
it looks to me as though =$=DATA is being evaluated in list context for the 'while' modifier. 05:39
Ontolog i see, i'll give it a shot
so while evaluates things in list context?
does perl5 work that way?
pmichaud I don't know that pugs is correct here. 05:40
Ontolog same error with for
pmichaud i.e., for any of the perl6 implementations, it's not entirely safe to assume that because the implementation does something a certain way that that's the way that perl 6 defines it
i.e., the implementations are still catching up with the spec
Ontolog yes i know
pmichaud how about for =$=DATA { %validPinyin{$_} = chomp $_ } 05:42
Ontolog same result 05:43
05:44 dragon3 left
Ontolog no matter what I do with that $=DATA object I get this error 05:47
pmichaud maybe pugs doesn't do iterators on this yet 05:48
I don't know.
sorry.
Ontolog i'm gonna try with rakudo
pmichaud I'm certain rakudo doesn't handle POD data yet.
Ontolog shit 05:49
maybe i should wait another couple years before trying out perl6
05:49 _jedai_ left 05:56 charsbar_ left, charsbar joined 05:57 mberends joined, Ontolog left 06:01 agentzh left 06:04 eternaleye_ left 06:06 eternaleye joined 06:09 cognominal left 06:10 ashizawa joined 06:12 cognominal joined 06:40 jferrero joined 06:56 agentzh joined, iblechbot joined 07:08 Ontolog joined 07:18 ab5tract left 07:23 kanru left
dduncan opinion question - which sounds like a better name for a generic data type that represents a single point in time at an arbitrary precision: 'instant' or 'moment' or something else? 07:35
moritz_ "something else" is certainly too long ;) 07:37
07:37 Myoma left
dduncan yes 07:38
personally I'm thinking 'instant' is the better of the two, since 'moment' seems to have more unrelated meanings, in physics
moritz_ aye 07:39
07:41 kanru joined
pht you should also know that there is no such thing as single point in time in physics 07:42
but i would go with something simple like Time, because that is also what normal time() is
or TimePoint ... 07:43
'instant' has confusing associations
dduncan sure 07:48
however, the data type I was talking about is a base type, and has subtypes [DateTime, Date, Time] which is what people would typically be using, and that would probably reduce confusion ... the main times one would use Instant directly (and one reason it exists distinctly) is if they want to express a different precision than YMDHIS or YMD or HIS; eg, if they just want to specify a year-month or hour-minute 07:51
mberends sometimes 'when' reads easily, but given its new keyword meaning, it's a non starter
dduncan yes, I thought of 'when' too but dismissed it as sounding too much like a non-noun 07:52
I do tend to name my date/time containing variables $when_this and $when_that though
or attributes etc 07:53
thank you 07:54
pht how about 'wink' then ;-) 08:02
dduncan cute, but not so professional 08:03
for now I'm sticking with "Instant" barring a better idea coming along 08:04
moritz_ Ontolog: no need to chomp() at all, file handles automatically chomp by default 08:07
Ontolog ah that's cool but maybe it won't make my problem go away 08:08
yes same problem
08:12 smg left
dduncan good night 08:19
08:19 dduncan left 08:28 Bzek joined 08:32 braceta joined 08:33 barney joined 08:40 _jedai_ joined
moritz_ @tell mncharity re feedback for the elf homepage: very nice. Just one small nit, you don't explain if STD_blue is going to be in ruby as well 09:04
lambdabot Consider it noted.
09:08 kanru left 09:14 ispy_ joined 09:42 smg joined 09:45 Lunchy joined 09:52 iblechbot left 10:00 iblechbot joined 10:03 _jedai_ left 10:07 Alias_ is now known as adamkennedy 10:09 Ontolog left 10:14 elmex joined 10:28 smtms joined 10:44 kanru joined 10:53 hanekomu joined, barney left 11:09 wknight8111 joined
mberends rakudo: class Dog { has $.name is rw; method bark() { say "$.name says Woof!"; } } class Pug is Dog { method set_name($n) { $.name=$n } } my $pot = Pug.new(); $pot.set_name( 'Spot' ); $pot.bark(); 11:09
p6eval rakudo 31177: OUTPUT[Statement not terminated properly at line 1, near "class Pug "ā¤ā¤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)ā¤]
11:09 rindolf left
mberends rakudo: class Dog { has $.name is rw; method bark() { say "$.name says Woof!"; } }; class Pug is Dog { method set_name($n) { $.name=$n } }; my $pot = Pug.new(); $pot.set_name( 'Spot' ); $pot.bark(); 11:11
p6eval rakudo 31178: OUTPUT[Spot says Woof!ā¤]
11:11 adamkennedy left
moritz_ mberends: in general you can only omit the ';' after a '}' if it's followed by a newline 11:12
mberends your eyesight is phenomenal
moritz_ rather my experience with rakudo ;) 11:13
mberends my real question is, why does it fail when class Dog is relocated to Dog.pm? 11:14
moritz_ because inheritance is done at compile time, and use happens (errornously) at run time 11:17
BEGIN { use Dog; }; should help
mberends thanks, i'll try that. does (erroneously) mean Watch This Space for changes? 11:18
moritz_ it means "file a bug report" ;) 11:20
or I can do that if you'd prefer that
literal or even better, you can fix it! :P 11:22
11:22 Ontolog joined, pmurias joined 11:27 braceta left
Ontolog shit shit 11:28
why don't DATA sections work yet?
fooey
mberends mortiz_: S11 suggests 'use' is for compile time and 'require' is for run time. I'm new here, this will be my first bug report - exciting!
moritz_ mberends: well, go ahead then 11:29
Ontolog: because nobody implemented them yet. Patches welcome
Ontolog moritz_: i have no idea where to start implementing such a thing 11:30
pmurias Ontolog: they are just a convieniece, they are not really need for anything so nobody implemented them 11:31
Ontolog a huge convenience 11:33
if i can't have my data section i have to put my data in another file
this makes distributions more of a pita
where do I install this data file?
.keys and .values don't work on hashes? 11:34
pmurias Ontolog: you can have your data in a string literal
mberends Ontolog: I have similar frustrations at times. But it's documented, so it will come. Your hinting might it bump it up the priority queue. A multiline string is a reasonable workaround 11:36
the other day I tried a heredoc and failed, but maybe that was between chair and keyboard 11:38
moritz_ heredocs are NYI in rakudo 11:40
mberends that'll be why I moved on
another NYI seems to be $*PID 11:53
moritz_ another bug report? 11:54
11:54 DJ-Dongdot joined
mberends that seems like nagging. there are probably more important jobs right now 11:56
more constructively, it would help to write a test that currently fails. I'll look into that 11:57
moritz_ spec/S02-magicals/pid.t 11:59
mberends: a ticket with [TODO] marker is fine. pmichaud wants all TODO items in RT
12:03 pmurias left, pmurias joined
mberends ok, then you'll hear more from me. it must be quite a job linking multiple reports of the same problem 12:03
moritz_ it's manageable. I go through the RT from time to time (ever 2 months or so) and look what problems are solved in the mean time 12:05
12:06 masak joined
moritz_ so when a ticket is closed of which unmarked duplicates exist, the duplicates will later be closed anyway 12:06
bbl 12:07
mberends That's quite a clerical job. As a consolation, that's how Einstein started 12:08
12:10 ashizawa left 12:12 xinming joined
masak what's the status of Kwid these days? 12:23
what I remember of it, I really liked
but it's hard to find information on it 12:24
it's sort of half-bitrotted away from the face of the Web
12:26 braceta joined 12:33 meppl joined
pmurias where does the new Pod spec live? 12:36
masak @tell mncharity you mention STD_blue on the page, but don't say what it is. also, I certainly get motivated by the quote "Elf is currently (2008-09-15) the only implementation which can handle a p6 program as large as itself." (although I think you meant "...as large as Elf")
lambdabot Consider it noted.
masak it can be argued that an empty p6 program can handle a p6 program as large as itself :P 12:38
literal I believe I read about a C Obfuscation Contest entry for a compiler that could compile itself that was just that
the next year they changed the rules and didn't allow empty submissions :) 12:39
pmurias literal: wouldn't you get a missing main error? 12:40
masak "tricks you can only pull once"
literal ah, I think the task was "shortest program that can output its own source code" 12:42
12:43 DJ-Dongdot left
literal trying to find it.. 12:43
12:43 sri_work joined
mberends pmurias: perlcabal.org/syn/S26.html 12:44
lambdabot Title: S26
mberends pmurias: POD6 is nice. I hope we migrate over to it ASAP 12:46
pugs_svn r22261 | pmurias++ | [smop] added a unfinished RI DSL
literal Worst abuse of the rules. In several years, an entry was submitted that was so patently absurd that it required a new definition of some of the rules for the next year. This is regarded as a high honor. An example is the world's shortest self-reproducing program. The entry was a program zero bytes in length that if run printed zero bytes to the screen (this requires some creative use of the makefile to get it right). 12:49
that one
masak literal: URL?
literal www.ioccc.org/1994/smr.hint
the pasted text is from en.wikipedia.org/wiki/International...ode_Contes 12:50
masak nice :)
13:00 ispy_ left
pasteling "Ontolog" at 207.192.69.61 pasted "Hash is empty?" (16 lines, 364B) at sial.org/pbot/32185 13:00
Ontolog oh my god what am i doing wrong? 13:01
13:04 jferrero left, ruoso joined 13:05 lolo92 joined
ruoso Hello! 13:05
mberends good localtime(), idufghasudyhi! 13:09
13:12 sri_work left, cognominal left, bennymack-work left, s1n left, cotto_home left, jiing left
masak Ontolog: well, for starters, I'd use the %! form all the way with %!validPinyin 13:12
13:13 sri_work joined, cognominal joined, cotto_home joined, jiing joined, s1n joined, bennymack-work joined
masak ...and with $!pydata 13:13
I don't know if twigils are required -- I think they are -- but it's certainly clearer to use them all the time
Ontolog i thought that it's only for declaration purposes 13:14
also, i tried adding them and it causes an error 13:15
masak Ontolog: oh?
no, they're not just for declaration
usually, you use them all the way through the whole class
Ontolog: another thing that surprises me is that you do assignments outside of methods (and after declarations) in your class 13:16
Ontolog why?
masak while it's probably not disallowed, I've just never seen it before
Ontolog i need to initialize class data
how else should I be doing that?
masak I'd put such things in a BUILD method or something (and make the class non-singleton)
Ontolog make a BUILD method? 13:17
masak alternatively, do the assignments with the declarations
um, a BUILD submethod
Ontolog: have you seen S12?
13:18 demerphq joined
ruoso pmurias, the ri dsl looks nice... do you plan to have the prototype registered only on the namespace? or as a C symbol also? 13:19
13:19 sunnavy joined
pmurias it's only optionaly registered as a C symbol 13:21
visit to the occulist& 13:22
masak o_O
masak read "occultist"
I fall for that one every time! don't know why...
Ontolog how do people start hacking on rakudo? 13:26
13:26 riffraff joined
masak Ontolog: they find something they want, read the source, make the change, and send a patch 13:27
usually they hang out on #parrot at irc.perl.org too
Ontolog i see they just read the source?
are there any development docs? 13:28
masak a few, yes
Ontolog where? 13:29
masak looking
www.parrotcode.org/docs/submissions.html 13:30
lambdabot Title: Parrot Submissions Instructions - parrotcode
masak that's for sending patches to Parrot in general
(Rakudo is currently a part of the Parrot source tree)
Ontolog nothing documenting how the source code is layed out, what the different pieces do 13:31
some kind of architecture?
masak svn.perl.org/parrot/trunk/languages...l6/ROADMAP
that one documents where Rakudo is, and where it's going
svn.perl.org/parrot/trunk/languages...erview.pod 13:32
lambdabot tinyurl.com/5pfb2n
masak svn.perl.org/parrot/trunk/languages...ossary.pod
lambdabot tinyurl.com/54s3va
masak svn.perl.org/parrot/trunk/languages...ssion.data 13:33
lambdabot tinyurl.com/5e4g64
masak these three are all good pointers to Rakudo internals.
the last one is a list of test files which should all pass, modulo fudging
gives a good overview of what is expected to work at present 13:34
13:34 charsbar_ joined, charsbar left
masak also, svn.perl.org/parrot/trunk/languages...grammar.pg and svn.perl.org/parrot/trunk/languages...actions.pm 13:35
lambdabot tinyurl.com/5jh29s
masak these two are in some sense the "core", in that changes often affect these two files
[particle]1 ...and then there's the list of rt tickets...
13:35 [particle]1 is now known as [particle]
masak aye. 13:35
[particle] ontolog: i'm giving a talk on rakudo tonight in seattle 13:36
you're welcome to join us ;)
Ontolog its webcast? 13:37
13:38 braceta left
Ontolog i'de like to help get perl 6 working, and i'm curious how i can do that. however i have never had any experience writing compilers, interpreters, or anything of the such 13:38
so i really don't know how to just jump in and tack on a feature
for example, the POD stuff 13:39
I would like to read from __DATA__ sections
using the new POD syntax =begin DATA .... =end DATA
masak Ontolog: FWIW, I feel I've helped Perl 6 along just by using it, and sending rakudobug emails :)
we need developers of all kinds: users, testers, patchers and developers 13:40
Ontolog yes i'm also just trying to use Perl 6, but i keep coming across things that don't work and it irks me and makes me want to implement it
masak just be the most creative you can on your level of expertise :)
Ontolog i'm sure if there were some kind of high level design docks it would help a lot
13:40 yves joined
masak (not meant to put you down, by the way) 13:40
if you feel like patching Rakudo, go for it! 13:41
Ontolog haha no it's ok i'm no Turing Award candidate
masak just saying that a well-written rakudobug ticket is worth a lot
engage people with your need for this =begin DATA feature, and people will have compassion and implement it for you 13:42
happened to me quite a few times, actually
if you really suffer from the lack of internals documentation, though, I suggest you send a rakudobug for that too
(but do read the ones I sent you first, so you know what to complain about) 13:43
mberends studying the perl6 RT queue at rt.perl.org/rt3/Public gives a very good idea of hacks required 13:46
lambdabot Title: Public Perl Bug Tracker
13:47 pht left
Ontolog anyone have parrot vim syntax file? 13:48
masak Ontolog: svn.pugscode.org/pugs/util/perl6.vim 13:49
Ontolog i have that one 13:50
i'm talking about parrot
or pir syntax
[particle] no, it's not webcast :(
ontolog: what do you mean by "if there were some high-level design docs"? 13:51
have you not seen spec.pugscode.org?
lambdabot Title: Official Perl 6 Documentation
[particle] it even has test coverage metrics built in
masak Ontolog: svn.perl.org/parrot/trunk/editor/ 13:52
lambdabot Title: Revision 31178: /trunk/editor
[particle] yep, make vim-install in the editor dir
13:53 cosimo joined
Ontolog [particle]: yes there is the perl 6 design spec but i'm talking about the rakudo design spec 13:53
[particle] no such thing 13:54
Ontolog rakudo implements perl 6, but how does it do it
i see
masak Ontolog: there's those links I sent you
Ontolog yeah i am looking at all the links you guys send
and the bug reports and all of that
and the source code itself
masak Ontolog: might also be worthwhile to peruse the use.perl journals of jonathan++ and pmichaud++
Ontolog anyway just looking at the source code, it seems 90% of it is parrot code
[particle] masak: i suggest rakudo.org 13:55
masak [particle]: yes, even better
[particle] ontolog: yes, much is pir code, but that will be changing soon
Ontolog changing to..?
[particle] much of the pir code (not all) will be replaced by perl 6 code
Ontolog that's cool
[particle] 'use' has recently been implemented well enough to do that
Ontolog that's what I would like to do
[particle] (and a few necessary things) 13:56
Ontolog is write perl 6
[particle] you can write perl 6 today
masak++ and viklund++ have written a wiki engine in rakudo
Ontolog i mean perl 6 that will help the perl 6 project
[particle] november-wiki.org/
yes, i understand
masak (gotta do something about that main page...)
[particle] by writing a small app in perl 6, you will help explore the edges of rakudo 13:57
masak: give me an id :)
masak [particle]: hold on...
mberends Ontolog: I would be delighted if you could implement socket(), connect(), listen() etc 13:58
Ontolog that's the thing, there are quite a few edges :p
the perl native functions? 13:59
mberends yes
Ontolog in pir or in perl 6?
mberends I don't know. I'd just like to be able to write TCP/IP servers and clients on Rakudo 14:00
pmichaud $ cat src/*/*.p[gm] | wc -l
4335
$ cat src/*/*.pir | wc -l
10879
looks to me like only 72% of the code is written in PIR :-)
Ontolog hey my guess wasn't so off! :p 14:01
my point was a large majority
anyway, i'll look into socket connect and listen, seems like an interesting thing to work on
mberends great! 14:03
[particle] pmichaud: how much c? 14:05
14:05 charsbar_ left, charsbar joined 14:06 demerphq left 14:08 rindolf joined 14:09 demerphq joined 14:10 zamolxes joined 14:13 abra joined 14:16 sri_work left
pmichaud particle: I don't know -- there are some unused C files lying about 14:20
[particle] ontolog: rakudo sockets has been waiting on an improved parrot i/o impl 14:21
ontolog: which is scheduled to happen after the mmd branch is merged with trunk (probably next week)
Ontolog cool
[particle] so, better sockets in 2-3 weeks
Ontolog right now i'm reading (the ancient) Perl 6 and Parrot book
trying to get my mind around Parrot first 14:22
[particle] ontolog: there's an updated version of the parrot chapters in the parrot repo
docs/book iirc
14:22 hercynium joined 14:23 iblechbot left 14:24 xiaoyafeng joined 14:26 sri_work joined, demq joined
mberends ontolog, particle: as sockets are done, how about implementing $*PID etc? 14:26
pmichaud $*PID shouldn't be too difficult, if Parrot has that information available 14:29
[particle] yes, it does, i just can't remember where atm
mberends I do worry about some of these requests distracting from the roadmap sequence 14:31
pmichaud If a specific (and easily implemented) feature helps someone do programming, I'm not too worried about it affecting the roadmap 14:33
if it's difficult to implement, then yes, it's a concern :-)
pmurias Ontolog: the general procedure i use on non-rakudo compilers is make the feature you need be parsed, emitted right and write the runtime support 14:36
ruoso pmichaud, I was about to reply to the value types thread... but it's probably better to just say here... 14:38
aren't "value types" supposed to be read only?
14:38 demerphq left
ruoso I mean... the reason value types are values is that they cannot be changed and that it doesn't make any difference copying a reference or a clone... 14:39
pmichaud Range is listed as a value type... although that might be a mistake
or it may have some other oddities I'm not aware of
ruoso Range might be a value type, and most of the "changes" made to Range objects might be simply compositions on top of it
I mean... 1..3.push(4) doesn't seem very sane 14:40
pugs: say 1..3.push(4);
p6eval pugs: OUTPUT[*** Can't modify constant item: VUndefā¤ at /tmp/8xOO2Ow4t2 line 1, column 5-17ā¤]
pmichaud no, but $range = 1..5; $range.pop; is already defined by the spec
ruoso because a range in scalar context return a lazy iterator? 14:41
:)
pmichaud no, the value of $range itself is changed
[particle] right
pmichaud $range = 1..5; $range.pop; say $range.perl; # 1..4
ruoso ok... Range in scalar context returns a MutableRange? 14:42
which is then an object, and no longer a value?
pmichaud that's one possibility, yes
although I suspect that $range.WHAT should still return 'Range' 14:43
ruoso .WHAT for identity is something I really dislike
moritz_ ruoso: but it's specced
ruoso because (1,2,3).WHAT eventually might return something different then (3,2,1).WHAT
pmichaud anyway, I already replied in the thread that I can agree with the "value is readonly" model, or at least try it out with Rakudo 14:44
it just poses some difficulties with Parrot's container model (or rather, it's lack of one)
ruoso pmichaud, SMOP also lacks a "container" model... the containers are simply plain objects that hold other objects 14:45
and the syntax is translated to something in that level...
pmichaud ruoso: so, is @a[1] a container?
pmurias es
ruoso yes
pmurias yes
pmichaud that's what Parrot lacks.
ruoso but that's not up to parrot
it's up to the implementation of the value stored in @a
in SMOP 14:46
@a[1] should translate to Pad<@a>.FETCH.postcircumfix:<[ ]>(1)
lambdabot Unknown command, try @list
pmichaud In Parrot it means that @a is a PMC that contains an array of container PMCs, and each container PMCs then holds a reference to the associated value PMC
i.e., an array of size n ends up with 2n+1 gc-able elements 14:47
pmurias PMC are equivalent to smop objects
ruoso but it looks like the variable is something more intrinsic to parrot than it is in smop
in SMOP the lexical pad is an object itself 14:48
and that might be the fundamental difference
pmichaud the lexical pad is an object itself also, but that's really irrelevant to what I'm describing (I think)
I mean, I could be referring to an Array that isn't in the lexical base
i.e., an anonymous Array
pmurias @a[1] = 3 stores 3 in the scalar stored in the element with index 1 in @a
lambdabot Unknown command, try @list
masak lambdabot, learn Perl 6! 14:49
pmichaud so, does that mean there are three smop objects?
ruoso maybe more ;)
pmichaud one for the array, one for the scalar, one for the 3?
pmurias yes
pmichaud okay, that's the same as Parrot then
I was hoping to avoid all of those extra scalar PMCs
pmurias consider @a[1] = $foo;@a[1] = 7;say $foo;
ruoso of course the scalar might be just a proxy, depending on the array implementation
pmurias consider @a[1] := $foo;@a[1] = 7;say $foo; 14:50
pmichaud oh, I could already do that without @a[1] having to be a scalar PMC
I could just bind @a[1] directly to $foo
ruoso the array *must return* a scalar on .[] 14:51
but it doesn't need to *store* the actual scalar
moritz_ so you want to autovivify containers as needed?
pmichaud well, that's what Parrot will end up doing, yes. 14:52
ruoso so, that's the model we're using in SMOP
of course it's easier to implement it storing the scalars at first... 14:53
and that's what pmurias did on smop iirc
pmurias so it actually should be 4 values the array, the scalar, the proxy and the 3
ruoso: yes
14:53 jferrero joined
pmurias we can layer the proxy object in Perl 6 14:53
ruoso pmurias, if you have the proxy, you don't need the scalar...
and we also need to note that taking this easy path means not supporting autovivification as specced 14:54
which means that the real array type for Perl 6 will not be SMOP__S1P__Array
pmurias but i if i bind $foo to a @a[1] i need to store $foo somewhere
ruoso $foo is stored in the lexical pad
it just needs to contain a reference to the array and the index 14:55
and it also need to access additional methods that are not part of the array api
which means that the relationship between the proxy and the array is implementation dependent
pmurias you mean change $foo instead of @a in @a[1] := $foo? 14:56
ruoso oh... right... I see it now... I was thinking in the opposite direction...
ruoso thinking...
moritz_ remember that you can also do @a[0] := @b[1]
ruoso remember that @a[1] := $foo might fail also... 14:57
if the array doesn't support it
pugs: my $foo; my @a := (1,2,3); @a[1] := $foo; $foo = 1; say @a; 14:58
p6eval pugs: OUTPUT[*** Can't modify constant item: VUndefā¤ at /tmp/vD5KlX0xYj line 1, column 28-41ā¤]
ruoso pugs: my $foo; my @a := (1,2,3); @a[1] := $foo; say @a;
p6eval pugs: OUTPUT[*** Can't modify constant item: VUndefā¤ at /tmp/iWajnsVUGI line 1, column 28-41ā¤]
moritz_ rakudo: my $foo; my @a := (1,2,3); @a[1] := $foo; $foo = 1; say @a;
p6eval rakudo 31178: OUTPUT[113ā¤]
ruoso that is supposed to fail
since (1,2,3) is read only
moritz_ but @a isn't 14:59
ruoso but you bound @a to a readonly list
it *is* read-only
moritz_ uhm
right
if I assigned it instead it should work, right?
ruoso yes...
masak rakudo: my @a = (1,2,3,4,5); @a[3] := @a; say @a.perl' 15:00
15:00 rindolf left
p6eval rakudo 31178: OUTPUT[Statement not terminated properly at line 1, near "'"ā¤ā¤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)ā¤] 15:00
masak oops
rakudo: my @a = (1,2,3,4,5); @a[3] := @a; say @a.perl
p6eval rakudo 31178: RESULT[[1, 2, 3, 1, 2, 3, 1, 2, 5]ā¤1]
moritz_ masak: you're evil
ruoso that's the part TimToady was starting to think that assignment implies eager evaluation ...
masak interesting answer :)
moritz_: don't worry, I Tried It At Home first
moritz_ lol
masak just wanted to show it's broken
as is much other nested array handling right now 15:01
ruoso lunch &
masak rakudo: my @a = (1); @a[0] := @a; say @a.perl # this seems to work, however 15:02
moritz_ masak: what should binding of an array to an array element give?
masak ok, I _am_ evil
moritz_: what it should, I guess. an array containing itself as an element 15:03
moritz_ sh: line 1: 14678 CPU time limit exceeded
p6eval rakudo 31178: No output (you need to produce output to STDOUT)
masak question is rather, should .perl hang on printing such an array
p6eval++
moritz_ masak: I thankt that's what @a[0] = @a should give you 15:04
masak you mean that = should have binding semantics in this case?
moritz_ s/thankt/think/
hrm
masak I'd expect that to flatten and expand as elements, actually
moritz_ thinks nothing anymore
masak so @a = (1,2,3); @a[0] = @a; # now it has 5 elements 15:05
1,2,3,2,3
moritz_ allright
masak but maybe that's just me
moritz_ though more of @a[0] = @a to create a self-referential data structure
pmurias is it possible to create a header from a c file automaticly? 15:06
masak I'd use @a[0] := @a for that
moritz_ masak: binding a list container to a scalar container just feels wrong, IMHO
masak moritz_: please explain why
moritz_ because a scalar is a not a list, and vice versa 15:08
just like $x := 3 makes no sense to me
masak is that allowed Perl 6? 15:09
moritz_ dunno
pmichaud @a = (1,2,3); @a[0] = @a; causes @a to still have only 3 elements, and gives an "unused values" warning
lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
moritz_ perl6: my $x := 3; say $x
p6eval elf 22261, pugs, rakudo 31178: OUTPUT[3ā¤]
pmichaud @a[0] = @a is a list assignment
lambdabot Unknown command, try @list
masak pmichaud: ah. makes sense. 15:10
pmichaud: what about @a[0] := @a ?
pmichaud masak: I don't know about that one. :-)
15:10 riffraff left
masak :) 15:10
pmurias moritz_: under the mp6/kp6 interpretation it is valid
pmichaud part of me thinks that ends up with a self-referential structure
masak I hope so
that seems to be what's happening in at least one case in Rakudo right now 15:11
question is, should .perl be able to handle that, and if so, how?
moritz_ masak: it should
perhaps it should emit something like 'do { my @x = (...); @x[0] := @x; @x }' 15:12
masak submits rakudobug
ruoso moritz_, $x := 3 is absolutely reasonable
pugs: $x := 3; say $x; 15:13
p6eval pugs: OUTPUT[*** ā¤ Unexpected " :="ā¤ expecting "::"ā¤ Variable "$x" requires predeclaration or explicit package nameā¤ at /tmp/IOTZWg1i9c line 1, column 3ā¤]
ruoso pugs: my $x := 3; say $x;
p6eval pugs: OUTPUT[3ā¤]
ruoso pugs: my $x := 3; $x = 1;
moritz_ masak: it was on the older form of the rakudo roadmap
p6eval pugs: OUTPUT[*** Can't modify constant item: VInt 3ā¤ at /tmp/jgEpj2qod8 line 1, column 13-19ā¤]
moritz_ ruoso: I don't understand why. '3' doesn't have a container.
masak moritz_: oki
moritz_ (that doesn't mean that a bug report is out of place, though)
ruoso moritz_, because it seems that every value is a container of itself... 15:14
as well as every values is a list that contains itself
moritz_ wonders if he will have lost all faith in Perl 6 by the time it's finished
that sounds pretty polymorphic 15:15
ruoso heh...
indeed... Perl 6 requires the most polymorphic runtime I've ever seen
15:17 riffraff joined
ruoso really lunch & 15:17
masak moritz_: I won't have lost faith in Perl 6. I simply won't use the parts I'll have lost faith in. :) 15:18
moritz_ masak: like, list assignment and binding? ;/ 15:19
masak probably not, I still have faith in those :)
at least one by one. 15:20
moritz_ anyway, at some point I'll just keep a watchful eye over the testsuite, apply patches for obvious bugs, and let tze Zen flow through me in a hope that I'll eventually understand all that weird stuff 15:21
masak sounds wonderful
moritz_ (which is roughly what I'm doing now, with small variations) 15:22
masak Ontolog: also, search.cpan.org/~rgrjr/parrot-0.7.0...-intro.pod which I just re-found 15:24
lambdabot Title: Writing PIR - search.cpan.org, tinyurl.com/5w54zh
15:25 z80ASM joined
moritz_ the latest p6l posting by Mark J Reed has a nice analogy for assignment and binding ;) 15:25
z80ASM timtowtdi ;P
moritz_ aye ;)
masak I really liked that analogy too 15:26
z80ASM yap yap
masak z80ASM: arf arf! 15:27
PerlJam moritz_: not only a nice analogy, but a good explanation too. 15:34
cognominal perl6: my $a = Int.new; $a=666; say "$a, {$a.WHAT}"; my %a; %a{$a}= $a ; %a<i> = '0'; say "{+%a} keys"; say $_ ~ ' ' ~ .WHAT for keys %a; say "{%a.keys}, {%a{$a}}"; 15:35
p6eval rakudo 31178: OUTPUT[666, Intā¤2 keysā¤0 Intā¤MMD function __concatenate not found for types (97, 80)ā¤current instr.: '_block11' pc 319 (EVAL_11:97)ā¤]
..pugs: OUTPUT[666, Intā¤2 keysā¤i Strā¤666 Strā¤i 666, 666ā¤]
..elf 22261: OUTPUT[Use of uninitialized value in concatenation (.) or string at ./elf_f line 3408.ā¤syntax error at (eval 125) line 11, near ". ->WHAT"ā¤ at ./elf_f line 3861ā¤]
masak rakudo: say "{;}" # hee hee 15:37
p6eval rakudo 31178: OUTPUT[Null PMC access in get_string()ā¤current instr.: 'print' pc 13909 (src/gen_builtins.pir:8713)ā¤]
masak what should that print? :)
rakudo: say "{nothing}" # hee hee 15:38
p6eval rakudo 31178: OUTPUT[Null PMC access in get_string()ā¤current instr.: 'print' pc 13909 (src/gen_builtins.pir:8713)ā¤]
cognominal rakudo: say "{rand}" 15:39
p6eval rakudo 31178: OUTPUT[0.400301ā¤]
moritz_ masak: probably some stringfication of some value of undef, which the empty block returns 15:40
masak: but since bare returns don't work yet, I'm not surprised that {;} doesn't work either
masak rakudo: say "{sub a { say "OH HAI" }; a}"
p6eval rakudo 31178: OUTPUT[OH HAIā¤1ā¤]
masak rakudo++ # awesome
moritz_: bare returns don't work?
they used to...
15:41 obra_work joined
pmichaud ...bare return doesn't work? rt #? 15:42
moritz_ rakudo: sub a { return }; say a ~~ undef
p6eval rakudo 31178: OUTPUT[Use of uninitialized valueā¤ā¤]
moritz_ rakudo: sub a { return }; say defined(a)
p6eval rakudo 31178: OUTPUT[1ā¤]
moritz_ why in the seven hells did the first one print a warning? 15:43
masak
ERC>
ERC> rakudo: sub a { return }; say a.WHAT
moritz_ rakudo: sub a { return }; say a.WHAT
p6eval rakudo 31178: OUTPUT[Listā¤]
masak moritz_: that's why.
it's probably a List with an Undef value in it
moritz_ yes, and I don't think that's right
15:44 hanekomu left
pmichaud rakudo: say () ~~ undef; 15:44
p6eval rakudo 31178: OUTPUT[0ā¤]
moritz_ RT #58770, for reference
pmichaud: do you know why the first one gave a warning?
cognominal perl6: my %a; %a<i> = 't'; say $_ for keys %a ; say %a<i>
p6eval rakudo 31178: OUTPUT[0ā¤tā¤]
..pugs: OUTPUT[iā¤tā¤]
..elf 22261: OUTPUT[Undefined subroutine &GLOBAL::keys called at (eval 121) line 5.ā¤ at ./elf_f line 3861ā¤]
moritz_ rakudo: my %a; %a<i> = 't'; .say for keys %a ; say %a<i> 15:45
p6eval rakudo 31178: OUTPUT[0ā¤tā¤]
pmichaud I'm suspicious that the 'for' statement modifier isn't working properly.
moritz_ aye
pmichaud moritz_: no, I don't know why we got a warning in the first one.
15:46 pmurias left
moritz_ rakudo: my %a; %a<i> = 't'; for keys %a { .say }; say %a<i> 15:46
p6eval rakudo 31178: OUTPUT[0ā¤tā¤]
moritz_ pmichaud: bogus warnings would explain why the test suite warns that much ;)
pmichaud rakudo: sub a { return }; say a.defined; 15:47
p6eval rakudo 31178: OUTPUT[1ā¤]
pmichaud rakudo: sub a { return }; say a ~~ undef;
p6eval rakudo 31178: OUTPUT[Use of uninitialized valueā¤ā¤]
pmichaud rakudo: sub a { return }; say a() ~~ undef;
p6eval rakudo 31178: OUTPUT[0ā¤]
moritz_ the difference between the last two is really weird
pmichaud oh, I get it :-) 15:48
it's parsing as prefix:<~> prefix:<~>
masak ouch
15:48 sunnavy left
pmichaud rakudo: say ~~undef; 15:48
p6eval rakudo 31178: OUTPUT[Use of uninitialized valueā¤ā¤]
masak there we have it
pmichaud there ya go. :-) 15:49
moritz_ that's what you get for not using LTM!
pmichaud I don't know that LTM solves that particular problem.
a is a listop
so it expects a term after that
masak :(
I don't.
pmichaud it's the same issue as if we do say a + 3
that becomes say(a(+3)) and not say(a() + 3)
moritz_ uhm, even STD.pm mis-parses a ~~ undef 15:50
for some value of mis-parsing 15:51
pmichaud I'm saying it's not a mis-parse
I'm saying that's what the spec says. :-)
cognominal I am puzzled by the 'i' becoming a 0 in the for loop
15:51 riffraff left
moritz_ cognominal: that's very weird, and worth a bug report IMHO 15:51
pmichaud rakudo: my %a; %a<i> = 't'; say %a.keys.perl;
cognominal I file one
p6eval rakudo 31178: OUTPUT[["i"]ā¤]
pmichaud rakudo: my %a; %a<i> = 't'; for %a.keys { .say } 15:52
p6eval rakudo 31178: OUTPUT[iā¤]
pmichaud rakudo: my %a; %a<i> = 't'; for keys %s { .say }
p6eval rakudo 31178: OUTPUT[Scope not found for PAST::Var '%s'ā¤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)ā¤]
moritz_ pmichaud: ok. That's a bit unexpected to me
pmichaud rakudo: my %a; %a<i> = 't'; for keys %a { .say }
p6eval rakudo 31178: OUTPUT[0ā¤]
pmichaud looks like keys as a function call isn't working.
probably an improper export.
I also wonder if keys is really a named unary 15:53
moritz_ but that wouldn't be that first time that I expected too much magic
cognominal pmichaud, I file the bug or it is a no-brainer for you to fix it?
masak I think, if ' ~~ ' is ever parsed as prefix:<~> prefix:<~>, then it's not the user who's at fault, it's the language 15:54
pmichaud go ahead and file the bug. it's not nearly as simple as it might look at first
cognominal ok
pmichaud I'm guessing keys is probably not a named unary
15:54 pmurias joined
pmichaud at any rate, it's in the same category as values, keys, pairs, and kv 15:55
moritz_ multi Int|List keys ( %hash ; Matcher *@keytests )
pmichaud rakudo: my %a; %a<i> = 't'; for keys(%a) { .say }
p6eval rakudo 31178: OUTPUT[0ā¤]
moritz_ heck, it's not even defined as a method in S29
which certainly looks wrong to me 15:56
masak S29 needs lots of love 15:59
moritz_ indeed 16:00
and IMHO it needs that love real soon
masak it has needed that love real soon for quite a while now
moritz_ from a language design (and even implementation) point of view that's not urgent, but for somebody who uses the language it's essential 16:01
PerlJam moritz_: so ... are you volunteering? :)
[particle] people *use* this language!?!?! ;)
masak [particle]: aye.
that's always a possible side effect creating one.
s/effect/effect of/
moritz_ PerlJam: I tried, and quickly noticed that I lack some important knowledge to do it 16:02
PerlJam moritz_: like what? 16:03
moritz_ PerlJam: OO, signatures, type hierarchy, knowledge of what is immutable and what not
16:04 Exodist joined, z80ASM left
pmichaud oh, I just love this headline from CNN: "Bush lands in Texas; residents urged to leave" 16:04
moritz_ *lol* 16:05
PerlJam pm: :-) yeah, I saw that earlier :)
pmichaud who says there's no media bias? ;-)
PerlJam moritz_: the last 3 items are documented in the synopses.
moritz_ PerlJam: type hierarchy not really 16:06
PerlJam: or if so, where can I find it?
pmurias the casual user parts of OO are documented in S12 too 16:07
16:07 justatheory joined
moritz_ aye 16:07
but I have to actually understand and internalize them to be able to modify the synopsis in any meaningful way
pmichaud afk, lunch and errands 16:10
16:13 obra_work left, obra_work joined, obra_work is now known as obra 16:15 hercynium_ joined 16:17 hercynium left 16:21 justatheory left 16:22 zamolxes left 16:24 sri_work left 16:25 sri_work joined, iblechbot joined 16:28 apeiron_ is now known as apeiron 16:32 justatheory joined 16:33 cosimo left 16:37 barney joined 16:45 jferrero left 16:47 wilx joined 16:51 masak left 16:52 justatheory left 16:54 sri_work left, sri_work joined 16:55 kanru left 16:58 kanru joined, clintongormley joined 17:06 wknight8111 left
ruoso pmichaud, about "values are read-only"... I've just realized I don't know how to implement $a++ in that schema... 17:17
17:17 justatheory joined
moritz_ uhm, you take the value from $a, calculate the incremented value, store it in $a 17:18
ruoso right... so it's a macro? 17:20
moritz_ it doesn't have to
sub postfix:<++>($x is rw) { ... }
ruoso hmm... ok... I was considering it as a method call, not as a sub 17:21
moritz_ I think that all operators except postcircumfix are actually sub (multi) calls 17:22
ruoso hmm... that would solve it... 17:23
rakudo_svn r31179 | moritz++ | [rakudo] first shot at Str.comb 17:27
17:32 rindolf joined 17:37 Chillance joined
pmichaud in fact, S03 even says that ++$a is explicitly equivalent to $a.=succ 17:39
17:39 jhorwitz joined
pmichaud (but optimizers are allowed to assume that this is not overridden for integers) 17:39
17:41 obra left
pmichaud also, I would expect that $x would be passed 'is ref' instead of 'is rw', so that we don't end up promoting constants to lvalues 17:42
moritz_ and of them is allowed to autovivify, iirc 17:43
pugs_svn r22262 | moritz++ | [t/spec] simplified comb.t, and fudged for rakudo 17:46
18:14 hercynium_ left 18:17 clintongormley left
rakudo_svn r31181 | moritz++ | [rakudo] added comment about string coercion to Str.comb 18:17
18:19 hanekomu joined
rakudo_svn r31182 | pmichaud++ | [rakudo]: spectest-progress.csv update: 163 files, 3370 passing tests 18:25
18:26 BinGOs left
rakudo_svn r31183 | moritz++ | [rakudo] add tests for Str.comb to spectest_regression 18:27
18:28 BinGOs joined 18:34 wilx left 19:05 TJCRI joined 19:06 charsbar left 19:07 charsbar joined, clintongormley joined
pmurias pmichaud: got the exact line in the spec? 19:11
19:11 charsbar left, charsbar joined
moritz_ S03:517 I guess 19:12
ack++
pmurias pmichaud: (for the optimizers are free to assume)
ruoso: if i implement the forward context propagation and prove it's not too complex would you have any other issues with it 19:15
pugs_svn r22263 | pmurias++ | [smop] added stub item and item is rw contexts 19:21
19:24 zamolxes joined 19:26 xinming left
pugs_svn r22264 | pmurias++ | [smop] removed spec contradicting context RI's 19:33
19:36 loomis53 joined 19:38 loomis53 left 19:40 Psyche^ joined
alester yay ack! 19:41
19:42 abra left
rindolf Hi alester 19:43
19:43 barney left
rindolf alester: turns out Google Code no longer has vendor lock-in in regards to its svn repositories. 19:44
One can create svnsync copies and then dump the copies.
alester Why are you telling me this?
I'm not seeing a connection to me.
rindolf alester: ah. 19:45
alester: well, you're hosting some projects on Google code.
alester right, but I'm not concerned about "vendor lock-in"
moritz_ rindolf: that was never really a problem, because git-svn could already create a 99.95% accurate copy with normal http/svn access
pmurias ruoso: i'm considering a one step transition to add context to the capture 19:46
19:48 Lorn_ left
ruoso pmurias, I really think it's saner to have it represented in terms of late context propagation 19:49
conceptually, it looks more consistent
specially for things like viewing (1,2,3,(1,2,3,(1,2,3))) in slice context 19:51
or my @a = [1,2,3] so that @a contains a single element with the array [1,2,3] in it 19:52
and my $a = \foo(); bar(|$a);
19:52 Patterner left
ruoso all that seems much consistent with late context propagation... 19:52
19:52 Psyche^ is now known as Patterner
ruoso note however, that I don't deny implementing forward context propagation... but I think that should be a later addition to the model, most of the time working to provide optimizations 19:53
late context propagation can provide all the needed semantics... 19:54
it might be not that efficient, but there's room for optimization
19:56 Lorn joined
rakudo_svn r31185 | moritz++ | [rakudo] implement and test Str.match, cjfields++ 19:58
ruoso pmurias, I do think we will benefit from forward context propagation at the moment we have multi's implemented
rakudo_svn r31185 | moritz++ | Patch courtesy by Chris Fields. Also added him to CREDITS
ruoso and that we start to implement multi resolution depending on the context... that's why I thought on the context to be stored in the capture
and then add JIT to that, and you have a huge benefit... 19:59
pugs_svn r22265 | moritz++ | [t/spec] added some references to RT tickets (rakudo), and unfudged a test
20:03 lisppaste3 left 20:09 mberends left 20:11 larsen_ joined
pmurias ruoso: i agree that the late contex propagation is more consitent but i think i'm afraid it would lead to differences from Perl 6 20:12
ruoso actually, akaics, it will lead us to a more Perl-6-friendly model 20:13
s/akaics/afaics/
pmurias, which specific differences you think it'll produce? 20:14
pmurias thinking...
20:15 rindolf left, eternaleye left
pmurias ruoso: want is the main thing 20:16
ruoso pmurias, want can be implemented by introspection, at first...
but it can also wait until we have 'forward context propagation' as well 20:17
pmurias introspection - how? 20:18
ruoso by looking at the frames 20:19
pmurias that would be a truly horrible hack
ruoso yeah... I know ;) 20:20
but I do think "want" can wait until we have the 'forward context propagation' implemented
the thing I'm trying to avoid is the use of want at this early stages of development
the truth is that I see want as a 'horrible hack' ;) 20:21
that way I think it should be implemented only as a feature that is in the specs to be supported, not as something we'll be using in the type system bootstrap 20:22
moritz_ std: "abc".:d 20:23
p6eval std 22265: OUTPUT[parsedā¤]
ruoso pmurias, is there any other worry besides want? 20:26
pmurias lazy context propagation leads to ugly m0ld code 20:27
ruoso pmurias, that's why we need s1p :)
that will generate the ugly m0ld code :)
pmurias which i'll read while debugging s1p :( 20:28
20:30 justatheory left
ruoso I see... but I really honestly think the ugly m0ld code will buy us a much better runtime 20:30
pmurias i think there are no other worries because the builtin stuff doesn't return unrelated stuff in different contexts as that just confuses people 20:31
20:31 justatheory joined
pmurias ruoso: what are actually the arguments in favor of 'lazy context propagation'? 20:32
rakudo_svn r31188 | moritz++ | [rakudo] revert parts of r31185, it broke smart matching against "normal" code 20:33
r31188 | moritz++ | objects (ie not regexes)
ruoso the problem is that you don't actually have much control over the object you're calling, because of how much P6 supports polymorphism... that way.. you wouldn't have a way to know if some value returned by some method is context-wise or not 20:34
and more importantly... 20:35
most of the time, the methods will return a simple plain value
and that value, will be context-wise
that way... only very few value types actually need to be context-wise
on the other hand, if we go for forward context propagation... every single method will need to be context-wise 20:36
pmurias with the "forward context propagation" most of the values will just pass the context on 20:37
ruoso pmurias, the bigger problem with that is the bootstrap smop does in the method calls
because there's no difference between low-level method call and high-level method call 20:38
so every method implemented by every RI will need to be context-wise
20:38 wknight8111 joined
ruoso including the low-level ones 20:38
pmurias it seems a bit of work to convert everything now (i can do it), but just a tiny bit of work for every future RI 20:40
ruoso the problem is not how much work it means
but how fragile the model becomes 20:41
pmurias example please
ruoso map implementation (see the wiki page) with forward context propagation 20:42
becomes much more fragile, because it presumes too much from what other method calls will do 20:43
pmurias i think we will need a hybrid approach, as even an evil Perl 6 method can return the wrong thing in the wrong context 20:44
ruoso that's my point... 'forward context propagation' is an optimization for smop 20:45
because it depends too much on the foreign object...
and you can only count on it when the other object is really known by you
pugs_svn r22266 | moritz++ | [t/spec] add smart match tests for unary sub truth
ruoso which might happen most of the time...
and that's where optimizers comes in...
the optimizer would generate a prettier m0ld code 20:46
jit-compile it to a multi with the context in the signature 20:47
and the multi dispatch would use it depending on the context presented in the capture
(that's one way to implement that optimization... some more evil alternatives are also possible) 20:48
pmurias ruoso: the map implementation actually seems easier with forward context propagation 20:49
ruoso it seems easier when you know all the participants 20:50
but when the participants are unknown (that's where the polymorphism comes in) 20:51
and potentially lazy
it looks a lot harder
ruoso later &
ruoso have to run &
20:52 ruoso left, larsen__ joined 20:53 justatheory left 20:54 lisppaste3 joined 20:55 larsen_ left 21:00 lisppaste3 left 21:01 lisppaste3 joined 21:06 charsbar_ joined 21:07 charsbar left, c9s joined, ptman joined, Helios- left, jiing left 21:08 jiing joined
pugs_svn r22267 | moritz++ | [t/spec] if I formulate these smartmatch tests correctly, they might actually 21:08
r22267 | moritz++ | work. Also unfudged for rakudo.
21:08 Helios- joined 21:11 hercynium joined 21:22 armagad joined 21:23 justatheory joined 21:25 armagad left, eternaleye joined
moritz_ @tell mberends I made the subject of RT #58936 a bit more verbose, thanks for reporting! 21:28
lambdabot Consider it noted.
21:29 TJCRI left 21:31 armagad joined 21:34 armagad left 21:36 larsen__ left 21:44 Khisanth joined 21:50 eternaleye left 21:51 eternaleye joined 21:54 lisppaste3 left 21:57 obra joined 22:05 Khisanth left, hercynium left 22:13 lisppaste3 joined 22:17 lisppaste3 left 22:18 lisppaste3 joined 22:20 Chillance left, lisppaste3 left 22:21 lisppaste3 joined 22:26 lisppaste3 left 22:27 lisppaste3 joined
lisppaste3 Apologies for the trouble today. The bot should stop bouncing in and out of your channel now. 22:34
22:35 xuser left 22:36 alester left 22:38 Limbic_Region joined, pmurias left 22:41 xuser joined 22:46 hanekomu left 22:51 iblechbot left 22:52 clintongormley left 22:57 Khisanth joined 23:23 sri_work left 23:53 ruoso joined