Re: LISP module from CPAN
On Tuesday 08 May 2007 01:40:09 pm David Nicol wrote: On 5/8/07, Vadim [EMAIL PROTECTED] wrote: no, it uses CFFI, so this should cover every implementation supporting that. Ever since reading Hackers and Painters http://www.amazon.com/exec/obidos/ISBN=0596006624/tipjartransactioA I've been defending Perl is a LISP! (which is actually quite easy, because nobody knows what I'm talking about) Are there a lot of libraries and things written to CFFI? Perl could provide a CFFI interface, that would strengthen the perl is a lisp meme. I think the LISP folks would like to use CPAN, not the other way around. As for Perl being a LISP... Perl is missing macros (unless you count opgrep and B::Generate) and continuations. Lisp is also dynamically typed (originally), which you can admittedly emulate in Perl, i.e. (let ((mk-adder (lambda (x) (lambda (y) (+ x y ... ) is our $x; sub mk_adder { return sub { my $y = shift; $x + $y } } ... but much cleaner (in Perl-land) as: sub mk_adder { my $x = shift; return sub { my $y = shift; $x + $y } } Incidentally, emacs lisp is dynamically typed, but scheme isn't. Confused? I am. :) ... wow, this is offtopic now. Regards, Jonathan Rockway -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; pgplQRObWB40O.pgp Description: PGP signature
Re: recent search.cpan changes?
On Sunday 06 May 2007 10:50:52 pm Adam Kennedy wrote: Jonathan Rockway wrote: Hi all, I noticed search.cpan is acting differently now (probably due to the HOOO perl fiasco). Were these changes discussed anywhere publicly before they were made? I'm interested in a full list of changes, so I don't have to guess what they are. (I'm a /little/ upset since DBIC developer releases are missing, modules I own in the modulelist are showing up as ** UNAUTHORIZED RELEASE **, modules are missing from search results, different mirrors are behaving differently, etc.) Also, I can't seem to find the search.cpan source. Could someone provide a pointer to it? search.cpan is not an official perl.org as such. It's written and owned by Graham, and blessed with the domain name as the best implementation of this functionality. As for your unauthorized release, they are because you made unauthorized releases :) You released modules without getting permissions on all of the namespaces. I suggest you rectify the problem and do an authorized release :) The problem seems to have fixed itself. The module in question was Test::WWW:::Selenium::Catalyst, which is the only module in the dist and was registered to me in the modulelist... but it was only a developer release and I had never uploaded a real release. Corner case... -- package JAPH;use Catalyst qw/-Debug/;($;=JAPH)-config(name = do { $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //, ;$;]-[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;-setup; pgpBmPp6e7e3t.pgp Description: PGP signature
Re: LISP module from CPAN
Jonathan Rockway wrote: On Tuesday 08 May 2007 01:40:09 pm David Nicol wrote: On 5/8/07, Vadim [EMAIL PROTECTED] wrote: no, it uses CFFI, so this should cover every implementation supporting that. Ever since reading Hackers and Painters http://www.amazon.com/exec/obidos/ISBN=0596006624/tipjartransactioA I've been defending Perl is a LISP! (which is actually quite easy, because nobody knows what I'm talking about) Are there a lot of libraries and things written to CFFI? Perl could provide a CFFI interface, that would strengthen the perl is a lisp meme. I think the LISP folks would like to use CPAN, not the other way around. This is two-fold situation. The opposite of what you said is true - the purpose of my module is to gain access to numerous LISP packages (maxima, etc) from Perl. I don't like socket approach, I like inter-language operations. But what you said is also true. I will be using the module to bring the power to my LISP programs also, something like (perl5re string ([\d.]+)) to extract all the numbers from string. Yet I like the combination of Perl+Lisp+Tcl/Tk thus providing rich GUI, rich mathematical packages, rich CPAN. As for Perl being a LISP... Perl is missing macros (unless you count opgrep I consider eval $string as a replacement of macros. and B::Generate) and continuations. Lisp is also dynamically typed (originally), which you can admittedly emulate in Perl, i.e. (let ((mk-adder (lambda (x) (lambda (y) (+ x y ... ) is our $x; sub mk_adder { return sub { my $y = shift; $x + $y } } ... but much cleaner (in Perl-land) as: sub mk_adder { my $x = shift; return sub { my $y = shift; $x + $y } } Incidentally, emacs lisp is dynamically typed, but scheme isn't. Confused? I am. :) ... wow, this is offtopic now. It's everywhere offtopic :) because this is all new unfortunately (it was surprise to me to find only toy LISP implementations on CPAN, and no real Lisp connectors). I wonder whether there will be enough followers, so for it to create Perl+Lisp mailing list... Thank you for your ideas, BTW. Best regards, Vadim.
Re: LISP module from CPAN
On 5/9/07, Vadim [EMAIL PROTECTED] wrote: I consider eval $string as a replacement of macros. for instance, I did the following in a curl wrapper package, to make the curlies optional around the fieldnames: BEGIN { for (qw/ BUFFER CALLBACK DATA EVENT FAILURE FETCHTIMEOUT GET MAXAGE MAXSTALE MESSAGE NOCACHE POST READY STARTED UH URL USER/){ eval FIELD; sub $_ : lvalue { \$_[0]-{$_} } FIELD }} What would that look like in LISP?
my META.yml keeps getting overriden during 'make dist'
Can anyone help me with following problem, please. Whenever I do 'make dist' before putting Tcl::Tk to CPAN META.yml gets overridden. So I edit it, then perl Makefile.PL make dist return it to the autogenerated stute. CPAN indexer totally confused, gets false positives about my module and I can't control over it. I tried different META.yml, but can't find way out. here it is: # http://module-build.sourceforge.net/META-spec.html name: Tcl-Tk version_from: lib/Tcl/Tk.pm installdirs: site requires: Tcl: 0.91 noindex: directories: - demos - tk-demos keywords: - Tk - Tcl/Tk/Tix - GUI auto_regenerate: false distribution_type: module generated_by: ExtUtils::MakeMaker version 6.21_01 Thanks in advance, Vadim.
Re: LISP module from CPAN
David Nicol wrote: On 5/9/07, Vadim [EMAIL PROTECTED] wrote: I consider eval $string as a replacement of macros. for instance, I did the following in a curl wrapper package, to make the curlies optional around the fieldnames: BEGIN { for (qw/ BUFFER CALLBACK DATA EVENT FAILURE FETCHTIMEOUT GET MAXAGE MAXSTALE MESSAGE NOCACHE POST READY STARTED UH URL USER/){ eval FIELD; sub $_ : lvalue { \$_[0]-{$_} } FIELD }} What would that look like in LISP? I'm LISP novice (although met it some 15 years ago, now I'm more serious with our relationship at our second attempt :) :) so I can be easily wrong but my vision of your BEGIN block is: (eval-when :when-compile (dolist (fname '(BUFFER CALLBACK ETCETERA)) (eval (read-from-string (format nil (defun ~A () (do-something-useful)) fname) Why didn't you placed functions in AUTOLOAD, and creating them only when needed? My Tcl::Tk module do heavy usage of AUTOLOADing, you may want to look at the approach :) Initially I did eval $string but then come to safer approach. PS. now this *is* off-topic, sorry for that. I'll try to be more on-topic from now on :)
Re: LISP module from CPAN
* Vadim [EMAIL PROTECTED] [2007-05-09 12:05]: Jonathan Rockway wrote: As for Perl being a LISP... Perl is missing macros (unless you count opgrep I consider eval $string as a replacement of macros. Not even close. `eval EXPR` burdens you with generating syntactically correct code and moves everything from compile time to runtime. It’s like the difference between doing *foo = sub { $bar }; and my $_bar = quotemeta $bar; eval sub foo { \$_bar\ }; `eval EXPR` is useful, but a poor substitute for solid metaprogramming facilities. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/
Re: my META.yml keeps getting overriden during 'make dist'
On 5/9/07, Vadim [EMAIL PROTECTED] wrote: Can anyone help me with following problem, please. Whenever I do 'make dist' before putting Tcl::Tk to CPAN META.yml gets overridden. I think the NO_META parameter for ExtUtils::MakeMaker::WriteMakefile() may be what you're looking for. http://search.cpan.org/~mschwern/ExtUtils-MakeMaker-6.32/lib/ExtUtils/MakeMaker.pm#NO_META So I edit it, then perl Makefile.PL make dist return it to the autogenerated stute. CPAN indexer totally confused, gets false positives about my module and I can't control over it. I tried different META.yml, but can't find way out. here it is: # http://module-build.sourceforge.net/META-spec.html name: Tcl-Tk version_from: lib/Tcl/Tk.pm installdirs: site requires: Tcl: 0.91 noindex: directories: - demos - tk-demos keywords: - Tk - Tcl/Tk/Tix - GUI auto_regenerate: false distribution_type: module generated_by: ExtUtils::MakeMaker version 6.21_01 Thanks in advance, Vadim.
Re: LISP module from CPAN
# from Vadim # on Wednesday 09 May 2007 10:53 am: Why didn't you placed functions in AUTOLOAD, and creating them only when needed? Because then you must override can() or your code is broken. It is usually a lot simpler (and gives better diagnostics) to just generate and install everything in advance. Particularly if you're only doing it to save typing. If you *actually* want to delay the decision of whether $foo-can(bar) until run-time, then yes autoload is the way to go. --Eric -- Time flies like an arrow, but fruit flies like a banana. --Groucho Marx --- http://scratchcomputing.com ---
Re: LISP module from CPAN
so if there were lisp-like macros available in perl, my sugar example might be something like the following? macro hashkeyaccessor(fieldname) { sub fieldname { $_[0]-{fieldname}} }; hashkeyaccessor $_ for qw/FIELD NAMES GO HERE .../; and I would save the trickiness of getting the interpolation level right. That is imagining a CPP macro... the LISP idea on macros is that the template would be created at the optree level rather than the source level, but its still a template and replacement kind of deal. What am I missing?
Re: LISP module from CPAN
* David Nicol [EMAIL PROTECTED] [2007-05-09 22:40]: so if there were lisp-like macros available in perl, my sugar example might be something like the following? macro hashkeyaccessor(fieldname) { sub fieldname { $_[0]-{fieldname}} }; hashkeyaccessor $_ for qw/FIELD NAMES GO HERE .../; and I would save the trickiness of getting the interpolation level right. That is imagining a CPP macro... the LISP idea on macros is that the template would be created at the optree level rather than the source level, but its still a template and replacement kind of deal. What am I missing? Nothing. You got it. Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/