Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-09-07 Thread Andy Wingo
On Mon 29 Jul 2013 10:36, Nala Ginrut writes: > If you just want to check whether a symbol was defined, try: > (module-defined? (current-module) 'function-lambda-expression) Alternate spelling: (defined? 'foo) Andy -- http://wingolog.org/

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-08-12 Thread Thien-Thi Nguyen
() 白い熊 () Thu, 01 Aug 2013 16:42:31 +0400 So if anyone would have alternate ideas [...] If you are comfortable w/ starting from a Lisp (Emacs or CLISP) base, perhaps you can find fruitful the "recode" facility of CEDET: http://www.emacswiki.org/emacs/SemanticRecoder This addresses the (una

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-08-01 Thread 白い熊
On 2013-08-01 16:42, 白い熊 wrote: Clisp, or Guile and it'll run. Currently I like playing with Clisp more, what I like about Guile is that it's a new project, so would Meant "GNU project", not "new project". :@) -- 白い熊

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-08-01 Thread 白い熊
On 2013-08-01 05:12, Nala Ginrut wrote: On Wed, 2013-07-31 at 12:20 +0200, Ralf Mattes wrote: Isn't the main problem here that the OP assumes that all three languages have "the same syntax"? This isn't true at all. They share some basic syntax but any "real" CL/Elisp/Scheme code will use more t

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-31 Thread Nala Ginrut
On Wed, 2013-07-31 at 12:20 +0200, Ralf Mattes wrote: > Isn't the main problem here that the OP assumes that all three languages > have "the same syntax"? This isn't true at all. They share some basic > syntax but any "real" CL/Elisp/Scheme code will use more than this basic > subset. And even with

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-31 Thread Ralf Mattes
Isn't the main problem here that the OP assumes that all three languages have "the same syntax"? This isn't true at all. They share some basic syntax but any "real" CL/Elisp/Scheme code will use more than this basic subset. And even within this limited syntactic subset, while one syntax will work

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-31 Thread Alexei Matveev
On 29 July 2013 10:21, 白い熊 wrote: > Hello: > > I'm developping a program which I'd like to be able to use without > modification with Guile as the interpreter as well as Emacs lisp and clisp. > > Cond-expand macro was supposed to assist "conditional compilation", see an example below. I am not su

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread Nala Ginrut
On Wed, 2013-07-31 at 10:28 +0400, 白い熊 wrote: > Nala Ginrut wrote: > >you may try: > >(with-output-to-string (lambda () (apropos "guile"))) > >you're so lucky that "with-output-to-string" appears in clisp, but I'm > >not familiar with elisp > > Very close I think, it exists in elisp too, however

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread 白い熊
Nala Ginrut wrote: >you may try: >(with-output-to-string (lambda () (apropos "guile"))) >you're so lucky that "with-output-to-string" appears in clisp, but I'm >not familiar with elisp Very close I think, it exists in elisp too, however (with-output-to-string (lambda () (apropos "clisp"))) is tru

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread Nala Ginrut
On Wed, 2013-07-31 at 08:47 +0400, 白い熊 wrote: > Nala Ginrut wrote: > >Here's a dilemma, unless guile/clisp/emacs have the same > >checker-procedure with same name and definition, you have no promise to > >check it under different language environment. The best way is > >prepossess which is portabl

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread Nala Ginrut
On Wed, 2013-07-31 at 08:47 +0400, 白い熊 wrote: > Nala Ginrut wrote: > >Here's a dilemma, unless guile/clisp/emacs have the same > >checker-procedure with same name and definition, you have no promise to > >check it under different language environment. The best way is > >prepossess which is portabl

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread 白い熊
Nala Ginrut wrote: >Here's a dilemma, unless guile/clisp/emacs have the same >checker-procedure with same name and definition, you have no promise to >check it under different language environment. The best way is >prepossess which is portable. Yes, I have been thinking very hard about this. The c

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-30 Thread Nala Ginrut
On Mon, 2013-07-29 at 15:21 +0400, 白い熊 wrote: > Nala Ginrut wrote: > > >> I would like to program for Guile as the lowest denominator. > >> > >> What is the proper check I should define that would tell me whether > >I'm currently interpreting the code in Guile, or Emacs, or Crisp. > >> > >

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-29 Thread 白い熊
Nala Ginrut wrote: >I think the most efficient way is to use 'cpp' of gcc to do the >pre-processer, or you have to try eval-when, please read the manual for OK, I did read up on it, but it's not a parent how to go about this interpreter testing. I don't want to get a preprocessor into it, beca

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-29 Thread Nala Ginrut
I think the most efficient way is to use 'cpp' of gcc to do the pre-processer, or you have to try eval-when, please read the manual for it. 在 2013-7-29 PM7:23,"白い熊" 写道: > Nala Ginrut wrote: > > >> I would like to program for Guile as the lowest denominator. > >> > >> What is the proper check I sh

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-29 Thread 白い熊
Nala Ginrut wrote: >> I would like to program for Guile as the lowest denominator. >> >> What is the proper check I should define that would tell me whether >I'm currently interpreting the code in Guile, or Emacs, or Crisp. >> > >If you just want to check whether a symbol was defined, try: >(mo

Re: Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-29 Thread Nala Ginrut
On Mon, 2013-07-29 at 10:21 +0200, 白い熊 wrote: > Hello: > > I'm developping a program which I'd like to be able to use without > modification with Guile as the interpreter as well as Emacs lisp and clisp. > Hi! Welcome to Guile! > So far, I was only programming for Emacs/Clisp, for this I us

Determining programatically whether the interpreter is Guile or Clisp or Emcs

2013-07-29 Thread 白い熊
Hello: I'm developping a program which I'd like to be able to use without modification with Guile as the interpreter as well as Emacs lisp and clisp. So far, I was only programming for Emacs/Clisp, for this I used a rather crude check of: (defun kx-emacsp () (not (functionp #'function-l