Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?

by jonadab (Parson)
on Mar 29, 2003 at 10:43 UTC ( [id://246600]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?
in thread Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?

That all sounds great. So what's stopping you from building a module to implement buffers and putting it on CPAN right now? Surely it's possible to implement an elisp-style buffer system in Perl and/or C.

The Perl5 object model isn't up to it. Yes, in theory it maybe could be done, but it's beyond my powers to do it. As far as doing it in C... I'll have to leave that to someone who can stand working in low-level languages.

The Perl6 object model will bring it within reach, however. It was reading the Apocalypse articles that got me to thinking about doing it in Perl. I'm pretty sure I can put the basic pieces together in just a few weeks in Perl6, once Perl6 comes out.


for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}
  • Comment on Re: Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Implementing (elisp-like) buffers in Perl 6: how to do buffer-localisation of arbitrary package variables?
by samtregar (Abbot) on Mar 29, 2003 at 18:27 UTC
    Frankly, I doubt it. The Perl 5 object system is among the most flexible in the programming world. What exactly are you missing that you think you'd need to implement buffers?

    -sam

      The Perl 5 object system is among the most flexible in the programming world.

      Maybe if you compare it to C++ and Java. Sure, it's Turing-complete, so theoretically anything could be implemented in it. But I prefer to keep my sanity. The Perl6 object model will have a number of substantial improvements, and I'll be looking forward to that. Yes, I know it will be a while yet, but as the Apocalypsen roll in, more and more of the design (at least) will be clear. It may even be possible to start before Perl6 is released as such.


      for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}
        Maybe if you compare it to C++ and Java.

        Or Ada. Or Python. Or Ruby. Should I list all the languages I know? Would that make Perl's OO support any more or less flexible?

        You didn't answer my question. What precisely is missing from Perl 5's object system that is keeping you from implementing buffers now?

        Don't get me wrong, I'm looking forward to Perl 6 too. But most of what I've seen looks like syntactic sugar. Are there really applications that can be written in Perl 6 that simply cannot be written in Perl 5? I won't believe it until you produce concrete evidence.

        -sam

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://246600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found