subscribe

2011-03-23 Thread Thorsten
hi,
I like picolisp (very much) and would like to participate in the mailing
list.
I could not figure out how and where to subscribe with Gnus - therefore this
email.
regards
Thorsten


Scaling

2011-03-24 Thread Thorsten
Hallo,
I recently discovered (amazing) picolisp and have a few (I hope not too
naive) questions. I write one mail for each question to not mix up
things.

I read in the documentations about distributed picolisp databases, the
ability to make picolisp apps faster and faster by adding hardware cores
(and using different pipes of the underlying linux OS?), and the
possibility to deploy picolisp-apps in the clouds. But these things are
only mentioned, without further explications.

Since scaling and concurrency is all the hype in the Java world (scala,
clojure) I would like to know a bit more about capabilities and limits
of picolisp in this area, and how these things are achieved in practise
(ie how to deploy an picolisp-app in the cloud?)

Thanks
Thorsten


Pico Lisp and Emacs Lisp

2011-03-24 Thread Thorsten
Hallo,
it seems to me that elisp and picolisp are close relatives in the lisp
familiy, and I wonder if it would be possible to convert elisp code to
picolisp code - and how difficult this would be?

There have been apparently successful attempts to convert elisp to scheme (
http://www-pu.informatik.uni-tuebingen.de/users/knauel/selc-ifl.pdf), and
scheme is very different from elisp. I was thinking about `refactoring` the
text in *.el files to a syntax that picolisp can understand, but that might
be too naive.

All the (1800 ?) primitive C functions in elisp were problematic when
porting elisp to scheme, but maybe thats not the case with picolisp. Of
course the thousands of buffer functions etc are meaningless in picolisp,
since there are no buffers in the gui framework. But maybe one could connect
the conkeror webbrowser (http://conkeror.org/), a fine javascript browser
modeled closely after emacs, to the gui framework of picolisp and map the
emacs buffer commands etc to the related conkeror concepts (it has buffers,
keymaps ...).

Then suddenly many of those emacs modes and libraries would make sense in
picolisp, and with more than 1 million lines of elisp code available the
claims that 'picolisp has no libraries' would stop.

Regards
Thorsten


Inferior processes and access to foreign libraries

2011-03-24 Thread Thorsten
Hello,
one thing I like very much about emacs is the ability to run foreign
programs (like R and picolisp) as inferior process and communicate with them
as if they were part of emacs.

I wonder if one could build a picolisp app that fully integrates with R
(statistics software, http://www.r-project.org/) and GRASS GIS (a command
line GIS that uses a superset of shell commands, http://grass.fbk.eu/) on
its linux host machine?

Emacs obviously can use foreign programs, like ie ledger mode (
http://www.emacswiki.org/emacs/LedgerMode) which uses a fast program written
in C++.  I wonder if picolisp can access libraries written in other
languages too?

It's always claimed that clojure is great because it has access to countless
java libraries on the jvm. But clojure is all about functional programming,
concurrency and avoiding mutable state, while java is all about objects with
mutable state. So it would only make sense for a clojure program to call
java libraries like pure functions without side effects and use the return
value, otherwise the clojure clean and scalable programming model would be
messed up.

Can't picolisp do this too? Call Java (and C, C++, Python ...) functions
(with a list of data, maybe) and use the return value? Maybe using clojure
as man in the middle between java and picolisp who takes care of converting
lists in other datastructures and vice versa?

Thanks any help on the road to picolisp enlightment
Thorsten


Re: Scaling

2011-03-24 Thread Thorsten
Hi Henrik,
thanks, that's an interesting read.
So dividing a database in several smaller files and accessing them with
something like id or ext gives a distributed faster database, and when doing
so ie in an Amazon EC2 account the database might (automagically) end up on
different servers, thus becoming faster and (almost endlessly) scalable.
I have no practical experience with deploying picolisp or the amazon cloud,
so I'm just guessing, I just want to get a general idea of what can be done
with picolisp and what not.

Thorsten

PS
Is anybody using Emacs/Gnus for this mailing list and can give some advice
how to make that work?


2011/3/24 Henrik Sarvell 

> Hi Thorsten.
>
> Here is a description of a real world example:
> http://picolisp.com/5000/-2-I.html
>
> In that article you will also find some links to functions that might or
> might now be of use to you, such as (ext).
>
> When it comes to distributed data and PicoLisp you don't get much for free
> (apart from the aforementioned ext functionality). It's more like a
> framework with which you are able to create something more specific.
>
> In short, you won't get something like Cassandra, Hadoop or Riak out of the
> box but you could certainly create something like them with the tools that
> you do have.
>
> And you could probably create something similar to those three with less
> hassle than it was to create them in their respective languages (Java /
> Erlang).
>
> /Henrik
>
>
>
> On Thu, Mar 24, 2011 at 6:11 PM, Thorsten <
> gruenderteam.ber...@googlemail.com> wrote:
>
>> Hallo,
>> I recently discovered (amazing) picolisp and have a few (I hope not too
>> naive) questions. I write one mail for each question to not mix up
>> things.
>>
>> I read in the documentations about distributed picolisp databases, the
>> ability to make picolisp apps faster and faster by adding hardware cores
>> (and using different pipes of the underlying linux OS?), and the
>> possibility to deploy picolisp-apps in the clouds. But these things are
>> only mentioned, without further explications.
>>
>> Since scaling and concurrency is all the hype in the Java world (scala,
>> clojure) I would like to know a bit more about capabilities and limits
>> of picolisp in this area, and how these things are achieved in practise
>> (ie how to deploy an picolisp-app in the cloud?)
>>
>> Thanks
>> Thorsten
>>
>>
>


Re: Inferior processes and access to foreign libraries

2011-03-24 Thread Thorsten
Hi Alexander,
thanks for all that information, definitely worth a wiki entry.
Due to limited skills number 1.  and number 4./5. seem to be the most
realistic options for me, but I will need some time to digest so much new
info.
My plans are to read and learn more about picolisp the next weeks, while
terminating some other stuff, and then build a small but real webapp in
picolisp - I'm already  looking forward for that.
Picolisp seems so easy and so powerful at the same time.
Cheers
Thorsten

2011/3/24 Alexander Burger 

> Hi Thorsten,
>
> > I wonder if one could build a picolisp app that fully integrates with R
> > (statistics software, http://www.r-project.org/) and GRASS GIS (a
> command
> > line GIS that uses a superset of shell commands, http://grass.fbk.eu/)
> on
> > its linux host machine?
>
> There are basically five ways a PicoLisp program can be integrated with
> other software:
>
> 1. Call existing library functions
>
>   This is available only in the 64-bit version with the 'native'
>   function. C functions can be directly called from Lisp code. For an
>   extensive example, look at "lib/openGl.l".
>
> 2. Write a shared object file (DLL)
>
>   This is analog in the 32-bit and 64-bit versions, but due to the
>   underlying implementation such shared object files are written in C
>   for the 32-bit version, and in assembly for the 64-bit version.
>   Examples are the 'ext' and 'ht' libraries, built in the Makefile's
>   ("src/ext.c", "src/ht.c", "src64/ext.l" and "src64/ht.l").
>
> 3. Write inline C code
>
>   The 32-bit and 64-bit versions of PicoLisp behave a little different
>   here. In the 32-bit version, these functions must contain glue code
>   to convert between C and Lisp data. The file "misc/crc.l" contains an
>   example for both versions.
>
> 4. Start other programs as sub-processes, and communicate with their
>   standard I/O via pipes. This can be done with the 'in', 'out' and
>   'pipe' functions.
>
> 5. Use sockets or some other type of IPC (e.g. named pipes) to
>   communicate with another program.
>
> Did I forget some other way?
>
>
> > It's always claimed that clojure is great because it has access to
> countless
> > java libraries on the jvm. But clojure is all about functional
> programming,
>
> BTW, there is also ErsatzLisp, a subset of PicoLisp written in Java. It
> provides for some ways to call the underlying JVM.
>
>
> > concurrency and avoiding mutable state, while java is all about objects
> with
> > mutable state. So it would only make sense for a clojure program to call
> > java libraries like pure functions without side effects and use the
> return
> > value, otherwise the clojure clean and scalable programming model would
> be
> > messed up.
>
> Yep. The same problems apply to ErsatzLisp.
>
>
> > Can't picolisp do this too? Call Java (and C, C++, Python ...) functions
>
> Several years ago, the PicoLisp GUI depended heavily on Java applets.
> This stuff is still available as a separate tarball "picoJavaGUI.tgz".
> It also contains a file "lib/java.l" which provides an interface to a
> separately running JVM. This was never really used, though.
>
> In one project we communicated with C++ programs via a PLIO library.
> PLIO is the format used by PicoLisp internally for marshalling database
> objects, for the 'pr' and 'rd' functions, and family IPC ('tell' etc.).
> A skeleton for PLIO can be fetched from "software-lab.de/plio.tgz".
>
> I'll gladly explain more details if you have specific questions :)
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Inferior processes and access to foreign libraries

2011-03-24 Thread Thorsten
Hi Henrik,
that's what I thought - moving lists back and forth between two variants of
lisp should somehow be manageable.
Thanks for the tip, I wil have a closer look.
Thorsten

BTW a lot of nice articles on your blog.

2011/3/24 Henrik Sarvell 

> Hi Again :)
>
> Yes I've done some experimenting in this direction here:
> http://www.prodevtips.com/2010/05/30/clojure-with-a-picolisp-database-via-clojure-http-client/
>
>
>
> On Thu, Mar 24, 2011 at 7:03 PM, Thorsten <
> gruenderteam.ber...@googlemail.com> wrote:
>
>> Hello,
>> one thing I like very much about emacs is the ability to run foreign
>> programs (like R and picolisp) as inferior process and communicate with them
>> as if they were part of emacs.
>>
>> I wonder if one could build a picolisp app that fully integrates with R
>> (statistics software, http://www.r-project.org/) and GRASS GIS (a command
>> line GIS that uses a superset of shell commands, http://grass.fbk.eu/) on
>> its linux host machine?
>>
>> Emacs obviously can use foreign programs, like ie ledger mode (
>> http://wwwemacswiki.org/emacs/LedgerMode<http://www.emacswiki.org/emacs/LedgerMode>)
>> which uses a fast program written in C++.  I wonder if picolisp can access
>> libraries written in other languages too?
>>
>>
>> It's always claimed that clojure is great because it has access to
>> countless java libraries on the jvm. But clojure is all about functional
>> programming, concurrency and avoiding mutable state, while java is all about
>> objects with mutable state. So it would only make sense for a clojure
>> program to call java libraries like pure functions without side effects and
>> use the return value, otherwise the clojure clean and scalable programming
>> model would be messed up.
>>
>> Can't picolisp do this too? Call Java (and C, C++, Python ...) functions
>> (with a list of data, maybe) and use the return value? Maybe using clojure
>> as man in the middle between java and picolisp who takes care of converting
>> lists in other datastructures and vice versa?
>>
>> Thanks any help on the road to picolisp enlightment
>> Thorsten
>>
>
>


Re: Scaling

2011-03-24 Thread Thorsten
Hi Alexander,

Distribution involves separate machines, connected via TCP. On each

> machine, typically several PicoLisp database processes are running,
>


> Changes to the individual DBs have to be done the normal way (e.g. the
> 'put>' family of methods), where each application (PicoLisp process
> family) is maintaining its own DB.
>

Is my interpretation right, that the ' several PicoLisp database processes'
running on one machine form a 'PicoLisp process family' that is considered
as one application with one database? So it is one database per machine,
using several processes on that machine, that has to be changed
individually, but can be queried as part of a distributed red of databases
on several machines connected via TCP?

How do you split up the databases? Rather by rows or rather by columns (I
know they are not 2D tables in picolisp, what I mean is: does every DB cover
the whole class hierarchy, but only a fraction of the objects, or does each
DB cover a fraction of the class hierarchy, but all objects belonging to
these classes?

Cheers
Thorsten


Re: Inferior processes and access to foreign libraries

2011-03-24 Thread Thorsten
Hi Alexander,


Yeah, these are the easiest. If you have a 64-bit system, however, 3 is
> as simple as 1.
>
>
Unfortunately  I installed 32-bit Ubuntu on my machine, only to find out
later that it has 64-bit architecture ...

If you like, you might join the #picolisp IRC channel. Gives more
> interactive feedback. And, it looks we are in the same time zone :)
>


yes, I live in Berlin.  The #picolisp IRC channel is another thing I have to
check out (I never used IRC ;). But I already found an emacs mode for IRC,
so lets see ...

Cheers
Thorsten


openGL

2011-04-16 Thread Thorsten
Hello List,
besides being on the road I keep studying PicoLisp a bit, and I´m trying to
understand the openGL library.
It seems almost too easy to be true, but I still have a few questions:

1. Is that a complete integration of OpenGL into PicoLisp, or just a partial
integration of the most usefull functions and constants? I don´t know
nothing about OpenGL, but it seems to be huge, and for example looking up
the GLUT library I found 19 callback functions, while there are only 8 in
the openGL lib.

2. I don´t understand the constant definitions, for example:
(def 'GLUT_RGB  (hex ""))
What is that hex value standing for, and how is it choosen for the
respective OpenGL constant?

When back home, I would like to write similar PicoLisp libraries for GRASS
GIS and maybe R  (although its huge) - it doesn´t seem too dificult, and
would be very useful.

Cheers
Thorsten


Re: openGL

2011-04-18 Thread Thorsten
Hi Jon,
I was just trying to understand how an external library is made part of
PicoLisp.
I must admit I can only find one version of openGL.l in the lib folder
(probably the 64-bit version), but may be I didn´t look in all the places

Re: openGL

2011-04-18 Thread Thorsten
Hi Jon,
in my last post I forgot to mention the following with respect to R and
UNIX-alikes:
"R can be built as a shared library1 if configured with ‘--enable-R-shlib’.
This shared
library can be used to run R from alternative front-end programs."
(from http://cran.r-project.org/doc/manuals/R-exts.pdf)
Thorsten

2011/4/16 Jon Kleiser 

>  Hi Thorsten,
>
>  1. No, none of the OpenGL libraries included with PicoLisp is complete.
>  If there are functions or constants that you're missing, just let us
>  know. Maybe you figure out how to add them yourself. It's not very hard.
>  Are you using the 32- or 64-bit PicoLisp? The OpenGL libraries for these
>  two PicoLisps are implemented quite differently.
>
>  2. Those hex values are just plain integers. In this case we could just
>  have written (def 'GLUT_RGB 0).
>
>  /Jon
>
>  On Sat, 16 Apr 2011 14:27:15 +0100, Thorsten
>   wrote:
> > Hello List,
> > besides being on the road I keep studying PicoLisp a bit, and I´m
> > trying to understand the openGL library.
> > It seems almost too easy to be true, but I still have a few
> > questions:
> >
> > 1. Is that a complete integration of OpenGL into PicoLisp, or just a
> > partial integration of the most usefull functions and constants? I
> > don´t know nothing about OpenGL, but it seems to be huge, and for
> > example looking up the GLUT library I found 19 callback functions,
> > while there are only 8 in the openGL lib.
> >
> > 2. I don´t understand the constant definitions, for example:
> > (def 'GLUT_RGB  (hex ""))
> > What is that hex value standing for, and how is it choosen for the
> > respective OpenGL constant?
> >
> > When back home, I would like to write similar PicoLisp libraries for
> > GRASS GIS and maybe R  (although its huge) - it doesn´t seem too
> > dificult, and would be very useful.
> >
> > Cheers
> > Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: openGL

2011-04-18 Thread Thorsten
Hi Alex,

> Which version (32 or 64 bits) do you intend to use?
>

I have 32 bit Ubuntu installed on 64 bit hardware. I guess I should change
to 64 bit linux, since the 64 bit version of PicoLisp seems to be really
good for interacting with foreign libraries. But thats a complete new
installation, and I first have to finish one project before I attempt that.
Until the middle of May I´m on the road without access to my own machine or
a running Picolisp, but I already try to figure out the magic behind those
extremely simple looking files like lib/math64.l or Jon´s 64-bit
lib/openGL.l.

My goal is to contribute two (64 bit) libraries, lib/r.l and lib/grass.l,
that enable direct access of R and GRASS GIS from PicoLisp, similiar to the
openGL library. That would make PicoLisp a fantastic environment for
business applications with special needs for Statistics and GIS. Today,
Python is more or less the `official´ scripting language for both, R and
GRASS GIS, and R is much used to analyse the spatial-temporal data from
GRASS. So R and GRASS are somehow natural allies.

BTW, there is an active discussion about a new Lisp-based version of R (
http://www.stat.auckland.ac.nz/~ihaka/downloads/Compstat-2008.pdf) by the
R-founders themselves, that should be better suited for general application
programming and for the management of huge datasets (and should be faster in
processing huge amounts of data).


> > "R can be built as a shared library1 if configured with
> ‘--enable-R-shlib’.
> > This shared
> > library can be used to run R from alternative front-end programs."
>
> This looks good. You should be able to call that library directly from
> the 64-bit version, analog to "lib/openGl.l" (or "lib/math64.l" for
> another example).
>
>
It is that analogy that I still don´t understand, since these two example
files only have some constant definitions and a lot of Picolisp function
definitions that do nothing else but use their arguments to call a native
function with the same number of arguments.

But there are a lot of special geographic data types in a GIS, and R has
more primitive types than just lists, and it has classes that specify
special objects that can be used as function parameters and return values.
I would expect the first step for building an PicoLisp-R or Picolisp-GRASS
interface would be to map all possible data types in that languages to
PicoLisp classes, and then write the calls to the native functions.
Therefore, the openGL file looks a bit magic to me - do the native functions
return nothing, and do they only use numbers or lists as parameters, no need
for special data-types?

I´m very much a newbie with (Pico)Lisp, still learning the basics, and I
don´t want to announce contributions here that I can´t deliver later on, but
it looks doable and I´m quite enthusiastic about a possible integration of R
and GRASS with such a great application building tool like PicoLisp.


> As my daughter must use R in her studies in the near future, and I
> learned in the past that my daughters tend to ask me for help on
> computer-related problems, it might be good if I also engage a bit on
> that subject ;-)
>

That would be a great coincidence ... ;)

Cheers
Thorsten


> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: openGL

2011-04-18 Thread Thorsten
Hi Jon,
thanks for the link.
Thorsten

2011/4/18 Jon Kleiser 

> Hi Thorsten,
>
>
> On 18-04-11 12:33 , Thorsten wrote:
>
>> Hi Jon,
>> I was just trying to understand how an external library is made part of
>> PicoLisp.
>> I must admit I can only find one version of openGL.l in the lib folder
>> (probably the 64-bit version), but may be I didn´t look in all the places
>>
> I guess you're right; only the 64-bit version is included. If you need the
> 32-bit version, you can get it here: <
> http://folk.uio.no/jkleiser/pico/gl.tgz>
>
> When it comes to (R and) shared libraries, I'm afraid I may not be able to
> help you.
>
> /Jon
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


XML-Libraries

2011-06-14 Thread Thorsten
Hello List,
just a short question:
There a two xml-libraries in the picolisp distrubution, xm.l (shorter but
newer) and xml.l.
Which one is the 'official' one? Is one of them a rewrite of the other?
Cheers
Thorsten

PS 1
I think I read something about it, but I can't find it anymore:
What are the naming conventions for PicoLisp-methods? What does the use of
[?  _  $] in a method-name imply?
xml?  # probably a predicate
_xml
_xml_
xml$

PS 2
what kind of method is this, with a "string" (transient symbol) as name and
the argument without parenthesis:
(de "xmlL" Lst
   (push ...)   )


Re: XML-Libraries

2011-06-14 Thread Thorsten
Hi Alex,
Thanks for the info - and sorry for asking things that are actually
explained in the docs.
I knew I read about it somewhere ...
Cheers
Thorsten

2011/6/14 Alexander Burger 

> Hi Thorsten,
>
> > There a two xml-libraries in the picolisp distrubution, xm.l (shorter but
> > newer) and xml.l.
> > Which one is the 'official' one? Is one of them a rewrite of the other?
>
> "xml.l" is the "official" one. "xm.l" is sufficient for simple purposes
> (and used by some apps), and exists for historical reasons.
>
>
> > I think I read something about it, but I can't find it anymore:
> > What are the naming conventions for PicoLisp-methods? What does the use
> of
>
> The naming conventions apply not only to methods, but to functions in
> general.
>
>
> > [?  _  $] in a method-name imply?
>
> > xml?  # probably a predicate
>
> Right.
>
> '?' by itself is not really a predicate, though, but the frontend
> function for interactive Pilog queries.
>
>
> > _xml
>
> If the first character is an underscore, it denotes a local function. It
> is to tell the user (and the 'lint' function) that this function might,
> for example, access free variables not bound in other contexts, or other
> resources.
>
>
> > _xml_
>
> A trailing underscore has no special meaning.
>
>
> > xml$
>
> '$' in the beginning or end of the function's name usually indicates
> some kind of string function. This is not a clearly defined convention.
>
> BTW, most conventions are described in "Naming Conventions"
> (doc/ref.html#conv).
>
>
> > what kind of method is this, with a "string" (transient symbol) as name
> and
> > the argument without parenthesis:
> > (de "xmlL" Lst
> >(push ...)   )
>
> These are two independent issues:
>
> 1. Using a transient symbol protects this symbol from accesses outside
>   the current source file. This applies to functions, methods,
>   variables or whatever.
>
> 2. If a function or method has a single symbolic parameter (not a list
>   of symbols as in most cases), this symbol is bound to the list of all
>   _unevaluated_ arguments.
>
>   This is described in more detail in "Evaluation" (doc/ref.html#ev).
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Wiki: Using 'edit'

2011-07-27 Thread Thorsten
Hi Alex, 
very interesting, helpfull - and comprehensible ;)
Thanks
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Namespace support

2011-09-18 Thread Thorsten

Hi List, 
one question with regards to this topic: 
what would be the advantage of namespaces in Picolisp over
namingconventions like in Emacs Lisp?

'gnus-function-name' for all functions in gnus library
'dired-function-name' for all functions in dired library etc

That seems to work quite well in Emacs for decades now, and has the
advantage to keep things simpler, since there is one concept less build
into the system. 
Just being curious
Cheers
Thorsten





Tomas Hlavaty  writes:

> Hi Alex,
>
>>> for namespaces convenient. Scheme implementations provide an import
>>> statement that let's you include symbols from one namespace into your
>>> current one. This is not yet exciting but you can manipulate the
>>> symbols during this import:
>>> 
>>> - prefixing them
>>> - renaming them
>>> - filtering out (or in) certain symbols but not all.
>>> 
>>> I conclude that such procedures are added easily now that symbols
>>> exists.
>>
>> Right. This could be done on the Lisp level, but we must be careful.
>>
>> For example, renaming a _symbol_ is possible only for transient
>> symbols, so such a function would need to remove the symbol from all
>> namespaces, rename it, and intern it again.
>
> Personally I am not a fan of namespaces in picolisp.
>
> However, once there is support for namespaces, as Christian points out,
> there are other operations that should be supported.  It seems to me
> that your suggested implementation solves the problem of symbol name
> clashes, but introduces a new problem of namespace name clashes.  Do I
> read that right?  One of the most important operations on namespaces
> should be creating a local name (alias) for it.  Common Lisp didn't get
> this right, for example, so it would be great if picolisp avoided that
> flaw.
>
> Cheers,
>
> Tomas

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Namespace support

2011-09-19 Thread Thorsten
Jakob Eriksson  writes:

> On Mon, Sep 19, 2011 at 02:51:32PM +0700, Henrik Sarvell wrote:
>> Having to write the full name all the time could easily become
>> comical, as in my above Clojure example. This is also one of the
>> reasons I have leaned towards
>
> +1
>
> Imagine all the rants which could be made about code full of both
> parens AND ultralong function names. :-)

Hi Jakob,
from my 'innocent' newbie perspective to both, PicoLisp and Emacs Lisp,
I can report that ultralong function names and straight documentation
conventions in Emacs Lisp helped me _a lot_ in understanding elisp source code,
even without full understanding of the language, while lack of
documentation (except for the core functions) and cryptically short
functions names do represent an obstacle when trying to understand
Picolisp source code. 

Imho, this is one topic were Picolisp could improve by copying some
habits from the Emacs Lisp community. 
And, with an editor like Emacs, those ultralong function names are not as
impracticable as one would think. 
Cheers
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Namespace support

2011-09-19 Thread Thorsten
Henrik Sarvell 
writes:

> I can understand both your arguments Thorsten but in the end there
> must've been a reason why you found PicoLisp interesting enough that
> you wanted to try it out as opposed to using elisp/common lisp for
> everything.

> Perhaps it was the brevity and clarity of syntax, the minimalism?

There are more than enough reasons to find PicoLisp interesting, and you
mentioned a few. I'm only saying that the documentation string for each
function in elisp is kind of helpfull, and so are the 'speaking''
function names, although they do seem comically long sometimes. 

> I can tell you this, I didn't go for PicoLisp because it enabled me to
> write "packages" with the help of function names of the form
> foo.bar.func.

I think in this case it would even be possible to 'eat your cake and
have it', at least when using PicoLisp mode in Emacs. There might be a way to
stick to PicoLisp minimalism, but have some documentation conventions
with very little extra effort. Having more time now, I'll give it a try,
but I'm not sure if my elisp is good enough to succeed. 

Cheers
Thorsten


> On Mon, Sep 19, 2011 at 4:29 PM, Thorsten
> 
> wrote:
>
> Jakob Eriksson  writes:
>
> > On Mon, Sep 19, 2011 at 02:51:32PM +0700, Henrik Sarvell wrote:
> >> Having to write the full name all the time could easily become
> >> comical, as in my above Clojure example. This is also one of the
> >> reasons I have leaned towards
> >
> > +1
> >
> > Imagine all the rants which could be made about code full of both
> > parens AND ultralong function names. :-)
>
> Hi Jakob, from my 'innocent' newbie perspective to both, PicoLisp
> and Emacs Lisp, I can report that ultralong function names and
> straight documentation conventions in Emacs Lisp helped me _a lot_
> in understanding elisp source code, even without full
> understanding of the language, while lack of documentation (except
> for the core functions) and cryptically short functions names do
> represent an obstacle when trying to understand Picolisp source
> code.
>
> Imho, this is one topic were Picolisp could improve by copying
> some habits from the Emacs Lisp community.  And, with an editor
> like Emacs, those ultralong function names are not as
> impracticable as one would think.  Cheers Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Equivalenz of (quote (...)) and '(...)

2011-09-28 Thread Thorsten

Hi list, 
I thought that  (quote (...)) and '(...) should be equivalent, but I get
different results with the following two versions of a little test program:

# version A
(prog 
   (let (tab  '((1 2 3 ) (4 5 6) (7 8 9)))
   (+ (caar tab) (caar (cdr tab )

---
result:
: -> 5

# version B
(prog 
   (let (tab  (quote ((1 2 3 ) (4 5 6) (7 8 9
   (+ (caar tab) (caar (cdr tab )

---
result:
: !? (+ (caar tab) (caar (cdr tab)))
(1 2 3) -- Number expected


Thats a bit strange - at least for me ;)
cheers
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Equivalenz of (quote (...)) and '(...)

2011-09-28 Thread Thorsten
José Romero 
writes:

> On Wed, 28 Sep 2011 20:27:15 +0200
> Thorsten  wrote:
>
>> 
>> Hi list, 
>> I thought that  (quote (...)) and '(...) should be equivalent, but I
>> get different results with the following two versions of a little
>> test program:
>> 
>> # version A
>> (prog 
>>(let (tab  '((1 2 3 ) (4 5 6) (7 8 9)))
>>(+ (caar tab) (caar (cdr tab )
>> 
>> ---
>> result:
>> : -> 5
>> 
>> # version B
>> (prog 
>>(let (tab  (quote ((1 2 3 ) (4 5 6) (7 8 9
>>(+ (caar tab) (caar (cdr tab )
>> 
>> ---
>> result:
>> : !? (+ (caar tab) (caar (cdr tab)))
>> (1 2 3) -- Number expected
>> 
>> 
>> Thats a bit strange - at least for me ;)
>> cheers
>> Thorsten
>> 
>
> See http://picolisp.com/5000/!wiki?ArticleQuote :3 that article pretty
> much says why it behaves the way it does.
>
> Cheers,
> José

I see, so (quote (1 2 3) (4 5 6) (7 8 9)) would be equivalent to '((1 2
3 ) (4 5 6) (7 8 9)). 
Thanks for the link
cheers
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Inhibit any writing to STDOUT in PicoLisp codeblock

2011-10-07 Thread Thorsten

Hello List,
I need a way to inhibit any writing to STDOUT in a PicoLisp codeblock. I
found the following, what seems to work just fine on Linux: 

,
| (out "/dev/null" . prg)
`

But what about Windows and other platforms (without /dev/null)? Is there
a generic, platform-independent way to achieve the same thing? 

Thanks for any help.

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Inhibit any writing to STDOUT in PicoLisp codeblock

2011-10-08 Thread Thorsten
Randall Dow  writes:

> Windows has the "NUL" (or is it "NULL") device.

so I might define a function 'no-out' that calls either

 ,---
 | (out "/dev/null". prg)
 `---

or

 ,--
 | (out "NULL". prg)
 `--

depending on the OS. In elisp there is the variable 'system-name' to
find out about the OS. Is there something similar in picolisp (I could
not find anything)?

On which OS is picolisp running currently, I read quite a lot of post
about porting it to other OS here recently.

That inhibition of any writing to STDOUT should basically work on all
platforms that support both - emacs and picolisp. 


> On Oct 8, 2011, at 5:13 AM, Thorsten wrote:
>> I need a way to inhibit any writing to STDOUT in a PicoLisp codeblock. I
>> found the following, what seems to work just fine on Linux: 
>> 
>> ,
>> | (out "/dev/null" . prg)
>> `
>> 
>> But what about Windows and other platforms (without /dev/null)? Is there
>> a generic, platform-independent way to achieve the same thing? 

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Inhibit any writing to STDOUT in PicoLisp codeblock

2011-10-08 Thread Thorsten
Alexander Burger  writes:

Hi Alex, 

> Yes, it is the global '*OS'. 

Ah, thanks. 

> As a general rule, "full" PicoLisp runs only on POSIX systems.

So maybe I should treat PicoLisp as a POSIX app and make my life easy
by just using "/dev/null" ;)
Would that be considered 'robust'?

But since quite a lot of people use Emacs on Windows, I should probably
take those two OS into account and ignore the rest. 

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Inhibit any writing to STDOUT in PicoLisp codeblock

2011-10-08 Thread Thorsten
dexen deVries 
writes:

> On Saturday 08 October 2011 15:11:57 you wrote:
>> So maybe I should treat PicoLisp as a POSIX app and make my life easy
>> by just using "/dev/null" ;)
>> Would that be considered 'robust'?
>
> Perhaps it'd be easier to supply a hacked version of `out' on Windows,
> made to recognized "/dev/null" as special case. Just like you can, for
> example, use "/" as path separator in a lot of Windows apps.

I don't know C, but (without really understanding the code) I guess that
somewhere in 'pushOutFiles' there must be inserted a 

,---
| if (OS equals Windows && any equals "/dev/null") {
| ... send to "NULL" ...
| } else { ... as is ...}   
`---

for a hacked version of 'out'. Unfortunately, I'm not quite sure where,
and how to do that right in C. 

// from io.c
,---
| // (out 'any . prg) -> any
| any doOut(any ex) {   
|any x; 
|outFrame f;
|   
|x = cdr(ex),  x = EVAL(car(x));
|wrOpen(ex, x, &f); 
|pushOutFiles(&f);  
|x = prog(cddr(ex));
|popOutFiles(); 
|return x;  
| } 
`---
// from io.c
,
| void pushOutFiles(outFrame *f) {   
|OutFile = OutFiles[f->fd];  
|f->put = Env.put,  Env.put = putStdout; 
|f->link = Env.outFrames,  Env.outFrames = f;
| }  
`

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Inhibit any writing to STDOUT in PicoLisp codeblock

2011-10-09 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> So maybe I should treat PicoLisp as a POSIX app and make my life easy
>> by just using "/dev/null" ;)
>> Would that be considered 'robust'?
>
> Indeed. I would say that this is a non-issue.
>
> IIRC, Cygwin supports "/dev/null", and otherwise PicoLisp doesn't run on
> MS-Windows anyway (except for the java version (ErsatzLisp)).

Thanks for your help. The C- and low-level stuff is a bit over my head,
and after all I've read in this thread, it really does not seem to be a
big issue. So I will just use (out "/dev/null" . prg), that should work
fine in almost all cases. 

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


PicoLisp added to Org-Babel

2011-10-25 Thread Thorsten

Hi list,

I would like to announce that I (with help and substancial
input from Eric Schulte, the org-babel author) added picolisp to the
multilanguage-programming environment org-babel
((http://orgmode.org/worg/org-contrib/babel/index.html), that is part of
the great emacs library orgmode (http://orgmode.org/).

You can download ob-picolisp.el here:
https://github.com/tj64/ob-picolisp

Org-babel enables a kind of 'localitiy principle on steroids', since one
can write code-blocks of dozens of languages in one single file.
Funcional programming with code blocks is possible, e.g. using return
values from a clojure code-block as input value of a picolisp
code-block.

Org-babel is used for literal programming in the scientific community,
using the facilities to tangle the source code into separate files and
to export the whole .org file to html, latex and other formats.

Each code block can be edited in the specialised Emacs mode for the
respective language, e.g shell code in shell-mode and R code in ESS
(emacs speaks statistics) mode.

I can imagine using org-babel as a flexilbe database reporting tool for
picolisp. It should be very easy, e.g., to build a dynamic database
report by sending data from a picolisp codeblock to a R codeblock for
analysis, print the results into the .org file, and export it to html or
latex.

Org-babel could be useful for documenting picolisp source-code too.
Inside the picolisp code-blocks, the usual minimal picolisp style could
be applied. All the other information could be part of the .org file.
This way, one could 'have his cake and eat it', so to say, since the
pure picolisp code blocks could be toggled into separate files, but a
lot of documentation could be added to the .org file that contains the
code-blocks.

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp added to Org-Babel

2011-10-26 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> Indeed, this seems to open a lot of possibilities. I didn't know about
> org-babel, and I also must confess that I'm not an emacs user.

there is even a vim clone of orgmode, but I don't know how usable it is:
http://www.vim.org/scripts/script.php?script_id=3342

I don't think it offers org-babel funcionality, but who knows...

PS
It must have been late when I wrote the announcement-mail, since I
messed up all the technical terms in it. Here is a little quote that
gives the correct terms:

,
| Babel supports Literate Programming (LP) by allowing the act of
| programming to take place inside of Org-mode documents. The Org-mode   
| file can then be exported (woven in LP speak) to HTML or LaTeX for 
| consumption by a human, and the embedded source code can be extracted  
| (tangled in LP speak) into structured source code files for consumption
| by a computer. 
`


Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp added to Org-Babel

2011-11-03 Thread Thorsten
Alexander Burger  writes:

Hi Alex, 
FYI - I just read this post in the orgmode mail-group. So there seems to be
some action in the VimOrganizer project again:

,-
| From: Herbert Sitz  
  
| Subject: New version of VimOrganizer, an Org-mode clone in Vim
  
| Newsgroups: gmane.emacs.orgmode   
  
| To: emacs-orgm...@gnu.org 
  
| Date: Thu, 3 Nov 2011 00:31:15 + (UTC)
  
|   
  
| I just formally pushed up a new version of VimOrganizer, an Org clone in Vim. 
  
|   
  
| This version is much closer to being a true alternative to using Org-mode in  
  
| Emacs.  I say alternative to "using Org-mode in Emacs", because VimOrganizer 
in 
| large part operate as a front end to Org-mode by making calls to a running 
Emacs
| server.  All of the export functionality is done this way, as is access to 
stuff
| like Org-babel, spreadsheet evaluation, live blocks like clocktables, column  
  
| blocks, etc.  
  
|   
  
| I'd be glad to hear any feedback, comments, suggestions. . .  
  
|   
  
| An intro to some of the stuff in the new version is here: 
  
| https://github.com/hsitz/VimOrganizer/blob/master/intro.txt   
  
|   
  
| Git page is here: 
  
| https://github.com/hsitz/VimOrganizer 
  
|   
  
| And the page on Vim's website is here:
  
| http://www.vim.org/scripts/script.php?script_id=3342  
  
|   
  
| I will try to get some videos of the new functionality in next day or two.  
One 
| main thing I'm happy about is I extended my patch of Vim to allow separate
  
| highlighting of TODO items on folded headings.  Previously my patch enabled   
  
| level-dependent fold highlighting, but always showed TODOs in same color as 
the 
| folded heading.  Much nicer to have everything collapsed and still have the   
  
| TODOs pop out at you. 
  
|   
  
| Thanks to everybody on here who's provided help for my (sometimes silly)  
  
| questions about Org-mode and how it works.  I'm starting to really appreciate 
  
| elisp, so who knows what the future holds. . .
  
|   
  
| Regards,  
  
|   
  
| Herb  
  
`-


>> > Indeed, this seems to open a lot of possibilities. I didn't know about
>> > org-babel, and I also must confess that I'm not an emacs user.
>> 
>> there is even a vim clone of orgmode, but I don't know how usable it is:
>> http://www.vim.org/scripts/script.php?script_id=3342
>
> Cool, this might accommodate me even better ;-)
>
> A bit of a drawback is that the project seems to have "paused" since
> more than a year.

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: The many uses of @

2011-11-08 Thread Thorsten
José Romero 
writes:

> On Tue, 08 Nov 2011 21:47:04 +0100
> Thorsten  wrote:
>
>> José Romero 
>> writes:
>> 
>> > 'text also uses @ http://software-lab.de/doc/refT.html#text
>> > It's also useful to note that in short-circuit evaluation style
>> > functions like 'and, @ always holds the result of the previously
>> > evaluated argument, as you can see in this typical PicoLisp line:
>> >
>> >   (and and (@ (min @ 5) (prinl @) (gt0 (dec @)) .))
>> >
>> > ;)
>> 
>> ok, I added these two cases to the table (see below).
>> 
>> Could you give a little 'walk-through' for the example line, its not
>> that obvious (to me) how this works (but it does) ;)
>> 
>> min, prinl, gt0 and dec are obvious.
>> the double 'and and' and the '.' at the and are a bit strange. Where
>> does the initial @=5 come from - because @ is initially T and T is
>> greater than everything else?
>> 
>> cheers
>
> Pretty silly and badly written explanation of what goes on there:
>
>  I'm eval. I see a list, look inside, i see a symbol called 'and. i
>  look at it's val. It's a number, thus a function pointer, i call it
>  with the rest of the list unevaluated.
>
>  I'm doAnd, i look at the list i was passed, i see a symbol called 'and,
>  i evaluate it, a number came out, it's not NIL, so i shove it in @ and
>  look at the next cadr. It's a list, i evaluate it, has a symbol called
>  @ in it's car, that symbol resolves to a number, a pointer to doAnd, i 
>  call it with the rest of the list unchanged.
>
>  I'm doAnd, i look at the list i was passed, the first argument,
>  evaluating it results in a function call that returns 5, it's not nil,
>  so i shove it to @ and go on. The next element is another list, a call
>  to prinl happens, it returned 5, it's not nil, so i shove it to @ and
>  go on. Look at the next element, a call to (gt0 (dec @)), returns 4,
>  that is not nil, so i shove the 4 in @ and go on. Looking at the next
>  cadr i see @ again (but i don't realize, because i don't know wether a
>  list is circular or not), it evaluates to 4, so i shove it to @ keep
>  going. I see (min @ 5) again.
>  ... 3
>  ... 2
>  ... 1
>  ... (gt0 (dec @)) returns NIL here, so i stop evaluating and return NIL
>
>  Back in the first doAnd, i see the previous call returned NIL, so i
>  stop evaluating right there and return NIL.

great, thank you - thats probably what one would call "dense code". 

what I did not understand (or remembered) in the beginning was that symbols
evaluate to their VAL, a number (the second 'and') and that a final '.'
immediatly followed by a closing parenthesis indicates a circular list. 

a lot of things going on in one single line of code. in picolisp its
really helpfull to be aware whats going on under the hood. 

> Then I realized that it could be written with only one 'and using
> the right syntax (and losing part of it's rube-goldberg appeal):

that looks a bit easier ...

>   (and 5 . ((prinl @) (gt0 (dec @)) .))

let me try this one: 

I'm eval. I see a list, look inside, i see a symbol called 'and. i
look at it's val. It's a number, thus a function pointer, i call it
with the rest of the list unevaluated.
I'm doAnd, i look at the number i was passed, i see a number 5,
i evaluate it, a number came out, it's not NIL, so i shove it in @ and
look at the next cadr. 

here I get stuck - this looks like a dotted pair cell, but thats a list
and not an atom in the CDR? or is this list evaluated until it return an
atom as an result? otherwise its clear that doAnd evaluates the circular
list until NIL is returned.  

Cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Wacky stuff with circular lists, Was:The many uses of @

2011-11-08 Thread Thorsten
José Romero 
writes:

>> >   (and 5 . ((prinl @) (gt0 (dec @)) .))

> If it helps, this is how that S-expression should look in memory, I
> omitted the technically correct representation of numbers and symbols
> to keep it simple:
>
>  ,---,
> +---+---+  +---+---+ '->+---+---+  +---+---+ |
> |   | >| -->|   | >|   | '
> + | +---+  + | +---++ | +---+  + | +---+
>   v  v| ,'
>  and 5| |  +---+---+  +---+---+
>   | '->|   | >|   | / |
>   ,---'+ | +---+  + | +---+
>   |  v  |
>   | gt0 |  +---+---+  +---+---+
>   | '->|   | >|   | / |
>   |   +---+---+  +---+---+ + | +---+  + | +---+
>   '-->|   | >|   | / |   v  v
>   + | +---+  + | +---+  dec @
> v  v
>   prinl    @
>
> (I hope email keeps it's formatting)
>
> Cheers

that helps a lot, formatting is ok, thanks for you effort!
cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: The many uses of @

2011-11-09 Thread Thorsten
Alexander Burger  writes:


Hi Alex,

>> sure how to insert the table. I would like to insert the raw html so
>> that I don't have to recreate the table in wiki syntax (probably only
>> the  part?). 
>
> Hmm, that's a problem. Currently, the only way to display such data is
> the "pre-formatted" markup, e.g.
>
> :{
>data layout
> }
>
> or point to some external HTML document with
>
>^{http://location.org Document}

I don't have a server running. 

> It would be tempting to add a new markup, for direct inclusion of HTML
> code, to the wiki syntax. However, this would introduce trouble, because
> the automatic TeX/PDF generator can't handle it.
>
>
> You could try to use 'html2text' on the HTML document, do some manual
> tuning, and then include it as pre-formatted text. Can you try that?

Its the html-export of an Emacs .org file anyway, so the original file
is plain text. I'll try that. 

But somehow I discovered a bug in the wiki?
when I try to make a new doc

,--
| myaccount->documents->new->Document+->new
`--

I get this message, even when I just logged in a minute ago. 
I closed and re-opened my brower (conqueror) but that did not help.
strange...

,
| Timeout
|
| Es konnte keine Verbindung zur Anwendung hergestellt werden.   
|
| Wahrscheinlich wurde die Wartezeit überschritten und die Anwendung beendet.
| Bitte versuchen Sie, die Anwendung neu aufzurufen. 
|
| Could not connect to the current session.  
|
| Probably, a timeout occurred, and the session terminated.  
| Please try to re-connect to the application.   
|    
`

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: The many uses of @

2011-11-09 Thread Thorsten
Thorsten  writes:

> But somehow I discovered a bug in the wiki?
> when I try to make a new doc
>
> ,--
> | myaccount->documents->new->Document+->new
> `--
>
> I get this message, even when I just logged in a minute ago. 
> I closed and re-opened my brower (conqueror) but that did not help.
> strange...
>
> ,
> | Timeout
> |
> | Es konnte keine Verbindung zur Anwendung hergestellt werden.   
> |
> | Wahrscheinlich wurde die Wartezeit überschritten und die Anwendung beendet.
> | Bitte versuchen Sie, die Anwendung neu aufzurufen. 
> |
> | Could not connect to the current session.  
> |
> | Probably, a timeout occurred, and the session terminated.  
> | Please try to re-connect to the application.   
> |
> `

Trying again, after waiting a few minutes, it worked.

Now I inserted the (ultra-long) table into a :{} enrironment and made a
new page. Preview showed that the format of the table was ok, but the
table-size was not fitted to pagesize (no line-breaks).
I saved the page anyway. Lets see how it looks like. 

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: The many uses of @

2011-11-09 Thread Thorsten
Alexander Burger  writes:

> On Wed, Nov 09, 2011 at 02:46:18PM +0100, Alexander Burger wrote:
>> > ,--
>> > | myaccount->documents->new->Document+->new
>> > `--
>> ...
>> The 'choDoc' function created the wrong object (a markup instead of a
>> document) in the "New" button :(
>
> BTW, the normal way to create a new document in the Wiki is to embed a
> link into some other, existing page, and then to click on that link.
> Then the creation of the propert document and markup is done
> automatically.
>
> The above actions were in the "maintenance GUI", which allows a direct,
> low-level access to all DB objects.

I see. Thats probably, why my new page doesn't appear anywhere in the
wiki yet, there is no link pointing to it. I'll try to fix that now. 

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: The many uses of @

2011-11-09 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> Perhaps better clean it up and insert linebreaks. And perhaps some
> delimiting lines.

I gave it a second try, starting with a link from the articles page, and
and now everything looks fine and works without problems - as long as
I'm logged in. 

When I log out and access the wiki, the link to my article (on the
articles/essays page) is not shown as a link any more, but as text. 
I have no idea why - the link entry looks fine to me...

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Quickstart Picolisp Wiki (was: The many uses of @)

2011-11-09 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

now it looks quite nice. 

While I was on it, I added a little "Quickstart
Picolisp Wiki" section to the "Help" page, since the intended use of the
wiki was not obvious for me at first sight - although it seems really
easy, once you know what to do. 

I hope thats ok as an absolute beginners guide. 

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


How to get the signature of function and method definitions

2011-11-10 Thread Thorsten

Hi list, 

I remember that Alex recently mentioned a method how to get the
signature of any function or method definition loaded in the system.
Unfortunately, I could not find the related post again.

Any hints where I have to look  would be appreciated.

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-10 Thread Thorsten
Henrik Sarvell 
writes:

> I don't know if this is exactly what you want but (all) can be used to
> inspect stuff, an example of getting all loaded classes:
>
> (de getClasses ()
>
>   (filter
>  '((S)
>  (and
> (= `(char "+") (char S))
> (type S)))
>  (all)))
>

all looks definitely useful, but I remember reading about a function
that (out of the box) returns something like this (using all as example)

,---
| (all ['T | '0]) -> lst
`---

for every loaded function/method (maybe without the return value),
i.e.that gives me the information how many and what kind of arguments
the function/method expects. 


> On Thu, Nov 10, 2011 at 7:27 PM, Thorsten
>  wrote:
>>
>> Hi list,
>>
>> I remember that Alex recently mentioned a method how to get the
>> signature of any function or method definition loaded in the system.
>> Unfortunately, I could not find the related post again.
>>
>> Any hints where I have to look  would be appreciated.
>>
>> cheers
>> --
>> Thorsten
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>

-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Wacky stuff with circular lists, Was:The many uses of @

2011-11-10 Thread Thorsten
Alexander Burger  writes:

> Hi Thorsten,
>
>> And now I'm listed as the author of this wiki page, but it should
>> actually be Jose. Maybe he can make a little change to the page, so
>> that his name appears too?
>
> BTW, there is of course an "illegal" way to change it, by going to the
> maintenance GUI, clicking on "Documents", then on the "@" before say,
> "circularlists", and then in the Revision History above click on the
> desired markup object (here "CircularLists added"). There, you can
> change the User. I wrote this just to show what should _not_ be done ;-)

If its ok for Jose to see his text published there (otherwise I delete
it), he is more than welcome to make this little 'illegal' change to
give that page the correct author. 

> SCNR

? ;)

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-10 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> I remember that Alex recently mentioned a method how to get the
>> signature of any function or method definition loaded in the system.
>
> I'm not completely sure what you mean with signature in this context.
>
>
> You can inspect a function by pretty-printing,
>
>: (pp 'insert)
>(de insert (N Lst X)
>   (conc (cut (dec N) 'Lst) (cons X) Lst) )

too much output in this case

> by looking at it with an editor (sorry, only 'vim' at the moment),
>
>: (vi 'insert)

that was another question of mine - what would it take to get a

,
| (emacs 'insert)
`

function, and a 

,---
| (edit 'insert)
`---

that opens an emacs window?

> or access its reference
>
>: (doc 'insert)

gives me this output - is that intended for vim too? (sorry for the long
lines). 

: (doc 'insert)
1,02kbloaded->(208730594.32315):(stamp73059432315)->"2000-06-1708:58:35"(init 
'tree ['any1] ['any2]) -> 
lstInitializesastructureforsteppingiterativelythroughadatabasetree.any1andany2mayspecifyarangeofkeys.Ifany2isgreaterthanany1,thetraversalwillbeinoppositedirection.Seealsotree,step,iterandscan.:(init(tree'nr'+Item)35)->(((3.5)((3NIL.{3-3})(4NIL.{3-4})(5NIL.{3-5})(6NIL.{3-6})(insert
 'cnt 'lst 'any) -> 
lstInsertsanyintolstatpositioncnt.Thisisanon-destructiveoperation.Seealsoremove,place,append,deleteandreplace.:(insert3'(abcde)777)->(ab777cde):(insert1'(abcde)777)->(777abcde):(insert9'(abcde)777)->(abcde777)≪
 ↑ ↓ Viewing libgpm: zero screen dimension, assuming 80x25.


> A "signature" in the sense of C or Java is perhaps
>
>: (car insert)
>-> (N Lst X)

That probably what I was looking for.

> i.e. the formal parameters of the function.

Is there is similar method to get the formal parameters of a method?

,---
| :(class +Shape)   
| -> +Shape 
|   
| :(dm T (X Y)  
| (=: x X)  
| (=: y Y)) 
| -> T  
|   
| :(dm move> (DX DY)
| (inc (:: x) DX)   
| (inc (:: y) DY))  
| -> move>  
|   
| :(car move>)  
| !? (car move>) 67291568 -- Variable expected ?
|   
| : (car 'move>)
| -> 67291568   
|   
| : (car insert)
| -> (N Lst X)  
`---

Thanks for you answer

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-10 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> > by looking at it with an editor (sorry, only 'vim' at the moment),
>> >
>> >: (vi 'insert)
>> 
>> that was another question of mine - what would it take to get a
>> 
>> ,
>> | (emacs 'insert)
>> `
>> 
>> function, and a 
>> 
>> ,---
>> | (edit 'insert)
>> `---
>> 
>> that opens an emacs window?
>
> Yes, this would be nice to have. I don't know enough about emacs, but
> it should be surely possible.
>
> For the first case, the source of 'vi' (lib/debug.l:162) could be taken
> as a template.
>
> The first expression
>
>(when (pair "X")
>   (setq C (cdr "X")  "X" (car "X")) )
>
> occurs in a similar form in most debugging functions, and extracts a
> possible class from the argument(s), i.e. calling (vi 'msg> '+Cls) or
> (vi '(msg> . +Cls)) is the same. Then the file and line number is
> searched in the '*Dbg' property of that symbol or class:
>
>(if C
>   (get C '*Dbg -1 "X")
>   (get "X" '*Dbg 1) ) )
>
> and also maintained in a local static variable "*Vi" for later
> (repeated) calls and for 'ld'.
>
> Then there is some "tags" file handling, don't know what makes
> sense for emacs here.
>
> The real call of 'vim' is
>
>   (call 'vim
>  (pack "+set tags=" (tmp "tags") ",./tags")
>  "+set isk=33-34,36-38,42-90,92,94-95,97-125"
>  (pack "+" (car "*Vi"))
>  (path (cdr "*Vi")) )
>
> Again, some tags fiddling, and the charset for symbols is set in 'isk'.
>
> The most important part is the argument +123 (if the line number in the
> file is 123) and the file's path name in the last two arguments to
> 'vim'.

Ok, let me think about this, when I fully understand the 'vi' function I
might be able to produce an 'emacs' function, its a nice exercise.   

> 'edit' is far more tricky, because it re-opens itself with additional
> symbols which were "click"ed on. Perhaps we should think about it once
> 'vi' is ported to 'emacs'.

agreed.


>> >: (doc 'insert)
>> 
>> gives me this output - is that intended for vim too? (sorry for the long
>> lines). 
>> 
>> : (doc 'insert)
>> 1,02kbloaded->(208730594...
>
> Dunno. This is strange.
>
> By default, 'doc' simply calls the 'w3m' browser (if neither a browser
> is in the environment variable BROWSER, nor one was passed as a second
> argument to 'doc').

I do use w3m and w3m-mode for emacs, and now I exported a new
environment variable BROWSER=w3m - and w3m seems to be on the path, since
I get the expected output when I type 'w3m' in a shell. But
nevertheless I get the same strange output in the emacs inferior
*picolisp* buffer. 

>> > A "signature" in the sense of C or Java is perhaps
>> >
>> >: (car insert)
>> >-> (N Lst X)
>> 
>> That probably what I was looking for.
>> 
>> > i.e. the formal parameters of the function.
>> 
>> Is there is similar method to get the formal parameters of a method?
>> 
>> ,---
>> | :(class +Shape)   
>> | -> +Shape 
>> |   
>> | :(dm T (X Y)  
>> | (=: x X)  
>> | (=: y Y)) 
>> | -> T  
>> |   
>> | :(dm move> (DX DY)
>> | (inc (:: x) DX)   
>> | (inc (:: y) DY))  
>> | -> move>  
>> |   
>> | :(car move>)  
>> | !? (car move>) 67291568 -- Variable expected ?
>> |   
>> | : (car 'move>)
>> | -> 67291568   
>> |   
>> | : (car insert)
>> | -> (N Lst X)  
>> `---
>
> Yes, you could do
>
>: (car (method 'move> '+Shape))
>-> (DX DY)
>
> (as you can do (pp 'move> '+Shape) or (vi 'move> '+Shape)).

I see, that works, still (very) much to learn ;)
Thanks for you help.

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-11 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> Perhaps the output mode (console cooked vs. raw) is not right? Does it
> behave correctly if you start it - without emacs - just from the shell
>
>$ pil +
>
> in the default way?

picolisp does work from the shell - but not 'doc:

,-
| tj1@tj-desktop:~$ pil + 
| + open: No such file or directory   
| ?   
| : (+ 2 3)   
| -> 5
| : (pp 'insert)  
| (de insert (N Lst X)
| (conc (cut (dec N) 'Lst) (cons X) Lst) )
| -> insert   
| : (doc 'insert) 
| !? (doc 'insert)
| doc -- Undefined
| ?   
| :   
`-----


Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-11 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>
>> > Perhaps the output mode (console cooked vs. raw) is not right? Does it
>> > behave correctly if you start it - without emacs - just from the shell
>> >
>> >$ pil +
>> >
>> > in the default way?
>> 
>> picolisp does work from the shell - but not 'doc:
>> 
>> ,-
>> | tj1@tj-desktop:~$ pil + 
>> | + open: No such file or directory   
>
> Oops, do you use a rather old version? The '+' as debug flag was
> introduced with picoLisp-3.0.6 (before March 2011).
>
>
>> | !? (doc 'insert)
>> | doc -- Undefined
>
> This happens because the '+' was not recognized, and thus the debugger
> and related information were not loaded.

oops...
yes, I sometimes underestimate the dynamics in projects like picolisp
or org-mode ...

I updated, now it works just fine in the shell

,
| tj1@tj-desktop:~$ pil +
| : (doc 'insert)
| -> T   
| :  
`

then showing me the doc in w3m. 

But it still don't work in the inferior *picolisp* buffer in emacs. I
don't post that output again since it was quite 'toxic' the last time -
all my mails turned blue in emacs-gnus (due to unprintable characters?)
and I had to restart gnus.   

I recently read something about sending raw shell commands from emacs to
a shell via emacs comint-mode (which forms the basis of
inferior-picolisp mode) - that was apparently not possible. But I don't
know if this is a related problem.

Or is it the command used by default in inferior-picolisp.el to start up
picolisp?

,--
| (defvar picolisp-program-name "/usr/bin/picolisp"
| "The name of the program used to run Picolisp." )
`--

(I did set the 4 links for global installation)

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Does 'doc' require Global Installation?

2011-11-11 Thread Thorsten
Henrik Sarvell 
writes:

Hi Henrik,

> For emacs I wrote jump to documentation some while back:
> http://www.prodevtips.com/2010/11/03/autocompletion-jump-to-documentation-swank-and-slime/
>
> If you don't care to do the jump here is the e-lisp code that you put
> in your config:
>
> (defun picolisp-jump ()
>  (interactive)
>  (let (myword myurl)
>(setq myword
>  (if (and transient-mark-mode mark-active)
>  (buffer-substring-no-properties (region-beginning) (region-end))
>(thing-at-point 'symbol)))
>   (setq myurl (concat "http://www.software-lab.de/doc/ref"; (upcase
> (substring myword 0 1)) ".html#" myword))
>   (browse-url myurl)))
>
> Invocation:
>
> (define-key picolisp-mode-map (kbd "C-M-r") 'picolisp-jump)

This is really great, thanks.

I was looking for an easier way to access the documentation from inside
emacs. It works just fine for me, except one little thing: the emacs-w3m
window (in my case) always replaces the picolisp window, instead of
splitting it and showing both buffers, w3m and picolisp.

I use (w3m-use-tab t), what seems to be a logical choice, unfortunately
it overrides the usual split window behaviour by (w3m-pop-up-windows t).
Maybe you use w3m too and found a solution for this?


cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-11 Thread Thorsten
Tomas Hlavaty  writes:

> Hi Tomas,
>
>> I remember that Alex recently mentioned a method how to get the
>> signature of any function or method definition loaded in the system.
>> Unfortunately, I could not find the related post again.
>>
>> Any hints where I have to look  would be appreciated.
>
> have a look at
>
>$ git clone http://logand.com/git/swank-picolisp.git
>
> it does what you are after, even for C/asm functions.

Thats quite impressive, thanks. I thought slime/swank is only for communication
with compiled lisps, but well ...

I can open a picolisp file in slime-mode now, but I can't connect (with
slime-connect):

,---
| Connecting to Swank on port 4005.. [2 times] open-network-stream: make
| client process failed: verbindungsaufbau abgelehnt, :name, SLIME  
| Lisp, :buffer, nil, :host, 127.0.0.1, :service, 4005  
`---

I have to check my slime installation ...


Is that still valid, or should it rather be 'pil ore 'plmod now? 
,---
| (setq slime-lisp-implementations  
|   `((picolisp ("/usr/bin/picolisp/p") :init slime-init-picolisp)))
`---

So, the connection via swank replaces the connection via
inferior-picolisp/commint - or uses it? And slime-mode replaces
picolisp-mode, or adds new functionality to it? 

Thats new terrain, I only knew about swank from ENSIME, the emacs scala
mode, never used slime/swank with a lisp. 

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Does 'doc' require Global Installation?

2011-11-11 Thread Thorsten
Henrik Sarvell 
writes:

> Thorsten I'm afraid we're two monkeys in a spaceship with this.

what is quite strange, since it is such a nice combination. I have a bit
experience with NetBeans and Java, and with hindsight that combination
appears really primitive to me. 

> The above code is basically just ripped from Xah Lee's article:
> http://xahlee.org/emacs/emacs_lookup_ref.html
>
> Read Xah's stuff carefully and maybe it will help you, note the
> (w3m-browse-url myurl) call in his second code listing.

that would have been easier, I reached the following solution with some
indirection:

,---
| '(browse-url-browser-function (lambda (url &optional new) (w3m-browse-url url 
t)))
`---

maybe I should drop the final 't' (new session), I will try that. 

> Basically everything in my whole emacs series is just copy paste from
> other people's code.
>
> I have attached my config for complete reference in case you want to
> take a look.

thanks, thats definitely helpfull, I read your emacs+picolisp posts, but
I'm still not yet there... some work ahead. 

BTW, did you ever try to just start emacs with 

,--
| emacs -fg wheat -bg black
`--
 
that looks quite nice, and is much more readable then most of the
color-themes in my opinion. 


cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-14 Thread Thorsten
Henrik Sarvell 
writes:

Hi Henrik,

> Does it matter if you can see the definition instead of simply jumping
> to it?

not really.

> Because with the help of CTags I can jump to any defined function or
> method in a .l file.

I tried it once to set up TAG files, but I didn't really succeed. I think
I have to read a bit more in the Emacs manual and then try your tutorial
again. TAGS seem to be really usefull, not only for Picolisp, but
everywhere in Emacs.  

> With jump to documentation you basically get this functionality for
> the built in functions.

I really like this, since I'm still in a phase where I basically have to
look up (almost) every Picolisp function I use, and that was a bit
tedious using the web interface.

> On Sat, Nov 12, 2011 at 2:44 AM, Thorsten
>  wrote:

>> Tomas Hlavaty  writes:
>>
>>> Hi Tomas,
>>>
>>>> I remember that Alex recently mentioned a method how to get the
>>>> signature of any function or method definition loaded in the system.
>>>> Unfortunately, I could not find the related post again.
>>>>
>>>> Any hints where I have to look  would be appreciated.
>>>
>>> have a look at
>>>
>>>    $ git clone http://logand.com/git/swank-picolisp.git
>>>
>>> it does what you are after, even for C/asm functions.
>>
>> Thats quite impressive, thanks. I thought slime/swank is only for 
>> communication
>> with compiled lisps, but well ...
>>
>> I can open a picolisp file in slime-mode now, but I can't connect (with
>> slime-connect):
>>
>> ,---
>> | Connecting to Swank on port 4005.. [2 times] open-network-stream: make
>> | client process failed: verbindungsaufbau abgelehnt, :name, SLIME
>> | Lisp, :buffer, nil, :host, 127.0.0.1, :service, 4005
>> `---
>>
>> I have to check my slime installation ...
>>
>>
>> Is that still valid, or should it rather be 'pil ore 'plmod now?
>> ,---
>> | (setq slime-lisp-implementations
>> |       `((picolisp ("/usr/bin/picolisp/p") :init slime-init-picolisp)))
>> `---
>>
>> So, the connection via swank replaces the connection via
>> inferior-picolisp/commint - or uses it? And slime-mode replaces
>> picolisp-mode, or adds new functionality to it?
>>
>> Thats new terrain, I only knew about swank from ENSIME, the emacs scala
>> mode, never used slime/swank with a lisp.
>>
>> Cheers,
>> --
>> Thorsten
>>
>> --

>> UNSUBSCRIBE:
>>mailto:picolisp@software-lab.de?subject=Unsubscribe

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-14 Thread Thorsten
Tomas Hlavaty  writes:

Hi Tomas,

>> Thats quite impressive, thanks. I thought slime/swank is only for
>> communication with compiled lisps, but well ...
>
> slime/swank is a client/server protocol.  There are backends e.g. for
> Common Lisp, Scheme, Clojure, R, Picolisp and probably more.  It is not
> difficult to write a new backend, if your interpreter supports the
> features you are after.  I find it much better that the traditional
> commint stuff. I use slime daily and can't imagine life without it
> anymore;-) Definitely the way to go if you don't follow Alex's steps
> with xterm and vi.  I haven't implemented the whole protocol yet, but
> the subset in swank-picolisp is already usable and very helpful.

So you use the same commands/keybindings for all those different lisp
dialects? Reminds me a bit a ESS (emacs speaks statistics), a single
interface for R, SAS and others. Didn't know that there is a R backend
for slime/swank. I guess that in this case 'slime mode extends ESS with the
ability to talk to the server interpreter(s) [R, SAS...] via the swank
protocol' too -  instead of replacing ESS. Sounds very interesting. 

>> I can open a picolisp file in slime-mode now, but I can't connect
>> (with slime-connect):
>>
>> ,---
>> | Connecting to Swank on port 4005.. [2 times] open-network-stream: make
>> | client process failed: verbindungsaufbau abgelehnt, :name, SLIME  
>> | Lisp, :buffer, nil, :host, 127.0.0.1, :service, 4005  
>> `---
>>
>> I have to check my slime installation ...
>>
>> Is that still valid, or should it rather be 'pil ore 'plmod now? 
>> ,---
>> | (setq slime-lisp-implementations  
>> |   `((picolisp ("/usr/bin/picolisp/p") :init slime-init-picolisp)))
>> `---
>
> Yes, I think the way picolisp is launched has changed recently, so you
> need the use the correct shell script, likely pil.  Please let me know
> it it worked for you.  You should get a repl and then type (+ 1 2) and
> get the result.  If you move your cursor around, you should see function
> arguments in the message buffer and if you do M-. and M-, then you
> should be jumping around the sources.

I have to learn more about slime and check my installation. Thanks for
the links below. 

>> So, the connection via swank replaces the connection via
>> inferior-picolisp/commint - or uses it? And slime-mode replaces
>> picolisp-mode, or adds new functionality to it?
>
> Swank is a client/server protocol that doesn't use commint mode, it
> talks to the picolisp interpreter via socket.  Slime mode extends
> picolisp mode with the ability to talk to the server interpreter(s) via
> the swank protocol.
>
>> Thats new terrain, I only knew about swank from ENSIME, the emacs
>> scala mode, never used slime/swank with a lisp.
>
> I didn't know Scala worked with slime too.

ENSIME is an implementation of the swank protocol, and it works quite
nice. I don't know if it uses the slime conventions/keybindings too.  

> I recommend reading about slime and watching some videos (look for slime
> and Marco Baringer), e.g.
>
> http://www.youtube.com/watch?v=_B_4vhsmRRI
> http://bc.tech.coop/blog/050728.html
> http://common-lisp.net/project/slime/
> https://secure.wikimedia.org/wikipedia/en/wiki/SLIME
> http://www.emacswiki.org/emacs/SlimeMode
>
> Cheers,
>
> Tomas

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-14 Thread Thorsten
Alexander Burger  writes:

Hi Alex,
> On Mon, Nov 14, 2011 at 01:38:56PM +0100, Alexander Burger wrote:
>> I think that the necessary tags are already there, or can be easily
>
> I'm assuming that emacs can use the 'vi' tag file format. Am I wrong?

I must admit I'm a bit overwhelmed by all the new information and
possibilities I learned about in this thread - will need some time to
digest all that. 

Since Emacs is such a huge beast, I try to learn it step by step - and
TAGS was one of the topics I couldn't get my head around easiliy, so I
just left it for another attempt later on.

Therefore, I can't really say much about the tag file formats at the
moment, maybe Henrik can help.

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-14 Thread Thorsten
Alexander Burger  writes:


Hi Alex,
> On Mon, Nov 14, 2011 at 01:38:56PM +0100, Alexander Burger wrote:
>> I think that the necessary tags are already there, or can be easily

> I'm assuming that emacs can use the 'vi' tag file format. Am I wrong?

I'm afraid not, I used 

,-
| M-. 
| (find-tag tagname &optional next-p regexp-p)
`-

on 'while' in a picolisp source-file in @/src64. and got the following
message:

,-
| visit-tags-table-buffer:
| File /home/tj1/bin/picoLisp/src64/tags is not a valid tags table
`-

Is that ctags or etags or something else what 'vi' uses? 


,---
| *emacs-tags* *emacs_tags* *E430*  
| Emacs style tag files are only supported if Vim was compiled with the 
| |+emacs_tags| feature enabled.  Sorry, there is no explanation about Emacs tag
| files here, it is only supported for backwards compatibility :-). 
|   
| Lines in Emacs tags files can be very long.  Vim only deals with lines of up  
| to about 510 bytes.  To see whether lines are ignored set 'verbose' to 5 or   
| higher.   
|   
| http://vimdoc.sourceforge.net/htmldoc/tagsrch.html
`---

If 'vi' uses (exuberant) ctags, it seems you could produce an etags TAGS
file for emacs by simply running 'ctags -e'. 


,-
| Despite the wealth of available options, defaults are set so that ctags |
| is most commonly executed without any options (e.g. "ctags *", or "ctags|
| −R"), which will create a tag file in the current directory for all |
| recognized source files. The options described below are provided merely|
| to allow custom tailoring to meet special needs.|
| |
| −e  |
| |
| Enable etags mode, which will create a tag file for use with the Emacs  |
| editor. Alternatively, if ctags is invoked by a name containing the |
| string "etags" (either by renaming, or creating a link to, the  |
| executable), etags mode will be enabled. This option must appear before |
| the first file name.|
| http://ctags.sourceforge.net/ctags.html#HOW%20TO%20USE%20WITH%20GNU%20EMACS |
|     |
`-

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: tags

2011-11-14 Thread Thorsten
Doug Snead 
writes:

Hi Doug,

> FWIW ... here's something I use instead of ctags for picolisp. 
>
> $ cat /usr/local/bin/lisptags
>
> #!/bin/sh 
> # make a tags file for pico lisp source files.
> # use:
> #   lisptags foo.l bar.l baz.l ... bof.l
> # generate the file 'tags'
> # [based on lisptags csh script by John Foderaro, c.1982]
> awk '
> /^[ \t]*\(d[em][ \t]/ { print $2 "\t" FILENAME "\t?^" $0 "$?" }
> /^[ \t]*\(class[ \t]/ { print $2 "\t" FILENAME "\t?^" $0 "$?" }
> ' $* | sort > tags
>
>
> Doug

Are these tag files readable for emacs? 
Since tags seems to be sorted, I guess not, since etags apparently are
not sorted. 


> --- On Mon, 11/14/11, Henrik Sarvell  wrote:
>
>> From: Henrik Sarvell 
>> Subject: Re: How to get the signature of function and method definitions
>> To: picolisp@software-lab.de
>> Date: Monday, November 14, 2011, 6:59 AM
>> It's at the end here:
>> http://www.prodevtips.com/2010/09/29/emacs-color-themes-tags-cedet-ecb-and-other-customizations/
>> 
>> Not much to it, I do things "old school" ie I put the
>> download in
>> /opt/picolisp and simply cd there in a shell and do: ctags
>> -e -R
>> --languages=-JavaScript,-PHP,-C,-Make,-HTML
>> 
>
cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-14 Thread Thorsten
) 
| (slime-net-coding-system ...)) (slime-start* (cond ... ...))) slime()   
| (save-excursion (slime)) (if (slime-connected-p) nil (save-excursion
| (slime))) (unless (slime-connected-p) (save-excursion (slime))) (lambda 
| nil (unless (slime-connected-p) (save-excursion ...)))()
| run-hooks(slime-mode-hook slime-mode-on-hook) (let ((last-message ...)) 
| (setq slime-mode (cond ... ... ...)) (slime-setup-command-hooks) (setq  
| slime-modeline-string (slime-modeline-string)) (run-hooks (quote
| slime-mode-hook) (if slime-mode ... ...)) (if (called-interactively-p)  
| (progn nil ...))) slime-mode(1) (lambda nil (tsm-mode) (define-key  
| picolisp-mode-map (kbd "C-M-r") (quote picolisp-jump)) (slime-mode 1))()
| run-hooks(picolisp-mode-hook) apply(run-hooks picolisp-mode-hook)   
| run-mode-hooks(picolisp-mode-hook) picolisp-mode()  
| set-auto-mode-0(picolisp-mode nil) set-auto-mode() normal-mode(t)   
| after-find-file(nil t) find-file-noselect-1(#   
| "~/lispProjects/picolisp/test2.l" nil nil   
| "~/Dropbox/lispProjects/picolisp/test2.l" (14680230 2049))  
| find-file-noselect("/home/tj1/lispProjects/picolisp/test2.l" nil nil)   
| ido-file-internal(raise-frame) ido-find-file()  
| call-interactively(ido-find-file nil nil)   
`-

>>
>> Is that still valid, or should it rather be 'pil ore 'plmod now? 
>> ,---
>> | (setq slime-lisp-implementations  
>> |   `((picolisp ("/usr/bin/picolisp/p") :init slime-init-picolisp)))
>> `---
>
> Yes, I think the way picolisp is launched has changed recently, so you
> need the use the correct shell script, likely pil.  Please let me know
> it it worked for you.  You should get a repl and then type (+ 1 2) and
> get the result.  If you move your cursor around, you should see function
> arguments in the message buffer and if you do M-. and M-, then you
> should be jumping around the sources.
>

cheers
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-15 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> I have a problem there, I tried
>> 
>> ,
>> | home/tj1/bin/picolisp/pil   |
>> | home/tj1/bin/picolisp/plmod |
>> | home/tj1/bin/picolisp/bin/pil   |
>> | home/tj1/bin/picolisp/bin/plmod |
>> | home/tj1/bin/picolisp/bin/psh |
>> `
>> 
>> but no matter which one  I use, and I always get an error, e.g. 
>> 
>> ,--
>> | (prog (load  
>> | "/home/tj1/bin/picolisp/lib/swank-picolisp/swank-picolisp.l")
>> | (swank-start "/tmp/slime.20688"))
>> |  
>> | Can't exec program:  
>> | /home/tj1/bin/picolisp/bin/psh   
>> `--
>> 
>> Now I'm a bit confused - which command should I use, and is that related
>> to file permissions (they seem alright to me) or something else?
>
> I think this error occurs because the binary 'picolisp' cannot be found.

strange, I changed $PATH and emacs exec-path:

,---
| ~ $ echo $PATH

| 
/home/tj1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:

| 
/usr/local/scala/bin:/home/tj1/shellscripts:/home/tj1/.cabal/bin:home/tj1/bin/picolisp/bin
`---

,
| ~ $ (print exec-path)  
| ("/home/tj1/shellscripts" "/home/tj1/bin" "/usr/local/sbin"
| "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games"
| "/usr/local/scala/bin" "/usr/lib/emacs/23.1/i686-linux-gnu"
| "/home/tj1/.cabal/bin/" "/home/tj1/" "/home/tj1/bin/picolisp/bin") 
`
 
and still get the same error message:

,--
| (prog (load  
| "/home/tj1/bin/picolisp/lib/swank-picolisp/swank-picolisp.l")
| (swank-start "/tmp/slime.1757")) 
| Can't exec program:  
| /home/tj1/bin/picolisp/pil   
|  
| Process inferior-lisp exited abnormally with code 1  
`--



> BTW, 'psh' does not make sense to be executed stand-alone (though this
> is not the problem here), because it tries to connect to a running
> PicoLisp application server.

ok, I changed that to 'pil'

> But "/home/tj1/bin/picolisp/pil" or "/home/tj1/bin/picolisp/plmod", for
> example, should work, if in the directory "/home/tj1/bin/picolisp/bin" a
> binary executable "picolisp" can be found.

and there is an executable 'picolisp' in "/home/tj1/bin/picolisp/bin"
(and without slime, with inferior picolisp mode, it works)

,---
| /home/tj1/bin/picoLisp/bin:   
| insgesamt 232 
| drwxr-xr-x  2 tj1 tjx   4096 2011-11-11 15:23 .   
| drwxr-xr-x 19 tj1 tjx   4096 2011-11-15 01:35 ..  
| -rwxr-xr-x  1 tj1 tjx 206636 2011-11-11 15:23 picolisp
| -rwxr-xr-x  1 tj1 tjx107 2010-03-14 16:37 pil 
| -rwxr-xr-x  1 tj1 tjx223 2011-05-30 07:56 plmod   
| -rwxr-xr-x  1 tj1 tjx277 2011-05-06 08:14 psh 
| -rwxr-xr-x  1 tj1 tjx923 2011-05-06 08:45 replica 
| -rwxr-xr-x  1 tj1 tjx   2211 2008-03-09 15:16 watchdog
`---

When using slime, should the inferior buffer a *inferior-lisp* or rather
a *inferior-picolisp* buffer? I guess, the *inferior-lisp* buffer should
be fine ...

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-15 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> What happens if you execute it in the shell
>
>$ /home/tj1/bin/picolisp/pil

,
| tj1@tj-desktop:~$ /home/tj1/bin/picolisp/pil   
| bash: /home/tj1/bin/picolisp/pil: Datei oder Verzeichnis nicht gefunden
`


> I assume that this 'pil' file is
>
>#!/bin/sh
>exec ${0%/*}/bin/picolisp ${0%/*}/lib.l @ext.l "$@"

yes, that it.


> so you see that it will try to execute
>
>/home/tj1/bin/picolisp/bin/picolisp
>
> What does the command
>
>$ file /home/tj1/bin/picolisp/bin/picolisp
>
> say?

,--
| tj1@tj-desktop:~$ file /home/tj1/bin/picolisp/bin/picolisp   
| /home/tj1/bin/picolisp/bin/picolisp: ERROR: cannot open  
| `/home/tj1/bin/picolisp/bin/picolisp' (No such file or directory)
`--


>> and there is an executable 'picolisp' in "/home/tj1/bin/picolisp/bin"
>> (and without slime, with inferior picolisp mode, it works)

,--
| tj1@tj-desktop:~$ pil
| : (+ 3 5)
| -> 8 
| :
`--

very strange. but

,--
| tj1@tj-desktop:~$ /usr/bin/picolisp/pil  
| bash: /usr/bin/picolisp/pil: Ist kein Verzeichnis
| tj1@tj-desktop:~$ /usr/share/picolisp/pil
| :
`--

so thats the solution - I have a local installation, I set the 4 links
to /usr/bin/ and /usr/share/ as described in INSTALL - but apparently
only /usr/share/picolisp is the one that works. 
I have no idea why. 

after changing all calls to 'pil' to '/usr/share/picolisp/pil' and the
call to swank-picolisp to '/usr/share/picolisp/lib/swank-picolisp'
things worked - more or less. 
The connection to slime worked, I get a slime-repl with a pil> prompt,
and calculations like (+ 3 4 ) work - but everything is extremely slow,
and after each keystroke I get 'wrong number of arguments' errors ...

but anyway - it works, somehow, finally. 
I should become a software- and usability-tester, I have what it takes
;)

now I'll try to figure out why what is still making problems. 
thanks for your help!

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-15 Thread Thorsten
Tomas Hlavaty  writes:

Hi Tomas,

>> swank-picolisp and copied your configuration except the picolisp command 
>>
>> ,---
>> | usr/bin/picolisp/p
>> `---
>>
>> I have a problem there, I tried
>>
>> ,
>> | home/tj1/bin/picolisp/pil   |
>> | home/tj1/bin/picolisp/plmod |
>> | home/tj1/bin/picolisp/bin/pil   |
>> | home/tj1/bin/picolisp/bin/plmod |
>> | home/tj1/bin/picolisp/bin/psh |
>> `
>
> isn't there a slash missing to indicate absolute pathname?

this now works with the pil command, although the behaviour is still a
bit strange. 

>> but no matter which one  I use, and I always get an error, e.g. 
>>
>> ,--
>> | (prog (load  
>> | "/home/tj1/bin/picolisp/lib/swank-picolisp/swank-picolisp.l")
>> | (swank-start "/tmp/slime.20688"))
>> |  
>> | Can't exec program:  
>> | /home/tj1/bin/picolisp/bin/psh   
>> `--
>
> I just tried with the latest picolisp from repository and it works.
>
> My .emacs is something like:
>
> (setq slime-lisp-implementations
>   `((picolisp ("/home/tomas/git/picolisp/pil" "+") :init 
> slime-init-picolisp)))
>
> (defun slime-init-picolisp (file _)
>   (setq slime-protocol-version 'ignore)
>   (format "%S\n"
>   `(prog (load ,(expand-file-name
>  "/home/tomas/git/swank-picolisp/swank-picolisp.l"))
>  (swank-start ,file
>
> (add-to-list 'load-path "~/git/picolisp/lib/el/")
> (require 'picolisp)
> (add-to-list 'auto-mode-alist '("\\.l\\'" . picolisp-mode))
>
> (add-hook 'picolisp-mode-hook (lambda () (slime-mode 1)))
>
> (add-to-list 'load-path "~/lisp/slime/")
> (require 'slime-autoloads)
> (slime-setup '(slime-repl slime-fuzzy slime-fancy slime-asdf))
>
> (setq slime-net-coding-system 'utf-8-unix)

I spend the afternoon updating to emacs 24, since I read about problems
with emacs 23.1.1 and slime. But nothing changed, its still very slow,
and I get 

,
| error in process filter: Wrong number of arguments: nil, 27
`

constantly when moving in the repl. 
I copied most of your configs too, but to no avail. 


>> | (:program "/home/tj1/bin/picolisp/bin/psh" :program-args nil :buffer
>
> I think this is wrong program.  See my config above, it should be pil.
 
yes I changed that. 

Thank a lot for your help, I'm kind of exhausted now after installing
slime and installing emacs 24 the whole day - can't think straight ahead
anymore. Have to get used to the new emacs, and then figure out whats
wrong with my slime installation.

The new gnus is incredibly colorfull - I hope you don't see my text in
orange and yellow like I do. 

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-15 Thread Thorsten
Tomas Hlavaty  writes:

Hi Tomas,
>
>> so thats the solution - I have a local installation, I set the 4 links
>> to /usr/bin/ and /usr/share/ as described in INSTALL - but apparently
>> only /usr/share/picolisp is the one that works.  I have no idea why.
>
> how did you install your local picolisp?  Did you "cd src; make"?  Can
> you find the bin/picolisp executable file after that?

I'm not quite sure anymore, but I think I just followed the
instructions. I have to check the links I set. 

>> after changing all calls to 'pil' to '/usr/share/picolisp/pil' and the
>> call to swank-picolisp to '/usr/share/picolisp/lib/swank-picolisp'
>> things worked - more or less.  The connection to slime worked, I get a
>> slime-repl with a pil> prompt, and calculations like (+ 3 4 ) work -
>> but everything is extremely slow, and after each keystroke I get
>> 'wrong number of arguments' errors ...
>
> OK.  Now how exactly did you set up your slime?  I think Henrik had a
> similar problem because he was using some slime contribs that
> swank-picolisp doesn't support.  If you start with those contribs I sent
> in the previous email, it should work.

I actually had two of your four contribs, I now copied your contribs,
but no change yet. 


> The problem you are seeing is that when you move your cursor, emacs
> talks to picolisp to find information about symbols your cursor points
> at, e.g. if you write
>
>pil> (+ 1 2)
>
> and then place your cursor above +, slime tries to display information
> about +.  I use emacs autodoc and in this case, I see that the symbol
> plus is a built-in function, its address and arguments.

> It is slow for you because something about this autodoc stuff doesn't
> work for you.

yes, thats what it looks like - at least partly a problem with autodoc.
It works only with the native functions anyway, I can lookup +, but not
pp. and when I do (pp 'insert), 'insert' is returned, when I do (pp
insert) the connection breaks.  

>> but anyway - it works, somehow, finally.  I should become a software-
>> and usability-tester, I have what it takes ;)
>
> Great;-)

I would wish I had less talent to figure out all possible complications
when attempting something like a slime install ;)

> You could have a look at the inferior-lisp buffer and you'll see some
> messages sent forth and back between emacs and picolisp.  It should give
> you an idea what the problem is.

looks like this:
there is still a "/usr/share/picolisp/p" in there, I don't know where
this comes from. 


(prog (load "/usr/share/picolisp/lib/swank-picolisp/swank-picolisp.l") 
(swank-start "/tmp/slime.2969"))
: (prog (load "/usr/share/picolisp/lib/swank-picolisp/swank-picolisp.l") 
(swank-start "/tmp/slime.2969"))
## Listening on port 47344
(:emacs-rex (swank:connection-info) "COMMON-LISP-USER" t 1)
0001A2(:return (:ok (:pid 3210 :style nil :encoding (:coding-system "utf-8" 
:external-format "utf-8") :lisp-implementation (:type "PicoLisp32" :name 
"PicoLisp32" :version "3.0.8" :program "/usr/share/picolisp/p") :machine 
(:instance "tj-desktop" :type "i686" :version "AMD Athlon(tm) 64 X2 Dual Core 
Processor 5000+") :features (:dummy) :modules ("module1" "module2") :package 
(:name "PIL1" :prompt "pil1") :version nil)) 1)
(:emacs-rex (swank:swank-require '((swank-asdf swank-package-fu 
swank-presentations swank-fuzzy swank-fancy-inspector swank-c-p-c 
swank-arglists))) "COMMON-LISP-USER" t 2)
15(:return (:ok NIL) 2)
(:emacs-rex (swank:create-repl nil) "COMMON-LISP-USER" t 3)
1F(:return (:ok ("PIL" "pil")) 3)
(:emacs-rex (swank:autodoc '(("+" swank::%cursor-marker%)) :print-right-margin 
184) "PIL" :repl-thread 4)
2F(:return (:ok "+ 67317800 ('num ..) -> num") 4)
(:emacs-rex (swank:autodoc '(("+" NIL swank::%cursor-marker%)) 
:print-right-margin 184) "PIL" :repl-thread 5)
2F(:return (:ok "+ 67317800 ('num ..) -> num") 5)
(:emacs-rex (swank:autodoc '(("+" "3" NIL swank::%cursor-marker%)) 
:print-right-margin 184) "PIL" :repl-thread 6)
2F(:return (:ok "+ 67317800 ('num ..) -> num") 6)
(:emacs-rex (swank:autodoc '(("+" "3" "4" NIL swank::%cursor-marker%)) 
:print-right-margin 184) "PIL" :repl-thread 7)
2F(:return (:ok "+ 67317800 ('num ..) -> num") 7)


Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: How to get the signature of function and method definitions

2011-11-15 Thread Thorsten
Tomas Hlavaty  writes:


 Hi Tomas,
>
>> When using slime, should the inferior buffer a *inferior-lisp* or
>> rather a *inferior-picolisp* buffer? I guess, the *inferior-lisp*
>> buffer should be fine ...
>
> It is *inferior-lisp* and the repl is called *slime-repl picolisp*.
> They are numbered if you are connecting to multiple servers.

That looks good then. 
Thanks

Cheers,
-- 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp is DEAD

2012-02-07 Thread Thorsten

Hi Alex, Hi list,

> On January 23, 2012 at 2:02 PM Jon Kleiser  wrote:
> I am trying to brainstorm ways for people (Burger) to make a living

I'm actually trying the same thing (find a way to make a living) as a
late starter in programming with a fresh degree but little practical
experience, and I thought I had quite a good idea that builds on PL.

Due to my limited skills, I often end up struggling with more or less
unrelated technical problems, e.g. my still not completed shift from
Ubuntu to ArchLinux and from Emacs 23 to Emacs 24 kept me away from PL
for weeks now due to all kinds of unexpected problems.  

I still think there could be something like a killer app for picolisp
that gives it real popularity, and that is Open Source ERP: build
something similar (or better) than the popular Python apps
http://www.openerp.com/ or http://www.tryton.org/en/, for example, and
copy the apparently very successfull business-model. 
In this realm, I don't think the medium to small businesses really care
about the language the app is written in, its more about how powerfull
and userfriendly the app is.

My idea was (and is) to combine emacs and picolisp into a really
powerfull but simple to use ERP system. With orgmode, gnus, ledger,
taskjuggler etc emacs already offers most of the funcionality of an ERP
system (the infamous libraries ;), and is used by many freelancers and
programmers as such. Whats missing is a real database (besides bbdb) and
the possibility of interactive web-development, both the core strenght of PL. 

By using the easy communication between PL (or emacs) with R
(statistics) and GRASS GIS the ERP system could be adapted to advanced
tasks (maybe its USP?). 

I would say, most of the needed functionality is already there, its all
communication between lisps (elisp and picolisp) facilitated by the
existance of the orgmode library ob-picolisp. What is needed is a UI
taking advantage of emacs as a client and picolisp as a webinterface. 

This could be started as a community project, enabling the contributers
to offer the system as local installation or as a cloud app. 

I was a bit shocked to hear that somebody so skilled like Alex has
difficulties to make a living based on PL - then what about me, a
struggling beginner?

On the other hand, I would be glad to share my business-idea and make it
a team-project, since I think the open source ERP market is relatively
new, offers great promise, and the most popular competitor OpenERP was
extremely buggy until recently and still had quite a lot of success. I would
guess that the big and dynamic orgmode community would take some
interest into such a project too. 

Just my 2 cents ;)

Cheers
Thorsten





-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


PicoLisp is GREAT (was: Please stop it)

2012-02-08 Thread Thorsten
Jon Kleiser 
writes:

Hi Jon, 
sorry for the wrong citation. And I think you are quite right - the
headline 'PicoLisp is DEAD' should have never ever come into existance,
since it now will be on the web forever, and starters always check what
the web has to say about a new language (at least I did). Probably
worse than the 'missing library' stuff. I just followed up your post
without changing the subject - a mistake. 

I think, a change in perspective would be beneficial from the business
point of view. When considering Emacs Lisp (elisp), for example, its
very hard to find somebody on the web who adores and praises it as a
programming language. Even emacs fanatics often critizise elisp.
Nevertheless, its probably the most popular lisp of all, and many people
(including me) think its fun programming in it. 

Why do writers make the effort to learn Emacs? Why do many scientists
and statiticans use Emacs as their editor? Why do people learn emacs to
organize their life with orgmode?
Because they love elisp? Rather not. Its more that the concepts of emacs
and its characteristic as a lisp interpreter makes it possible that a
few smart people write (in reasonable or even short time) amazing
emacs-modes like auctex (LaTex mode), ESS (Emacs Speaks Statistics),
orgmode, ledger, gnus, magit, and many more, that are simply better than
anything else on the market (and free of course).

So maybe rather use PL's great characteristics to build a great product
and then make money with consulting, training, implementation, and
cloud-offerings around that product, than trying to sell the language
itself? And then try to join with the emacs/orgmode community. There is
so much functionality in Emacs, its all there already, waiting to be
made accessible for 'non-experts' and used commercially (accepting the
FSF licence of course). And its all written in elisp, and the big,
dynamic and friendly Emacs/orgmode community is composed out of (e)lisp
programmers, no need to convince them that 'lisp is not about redundant
parenthesis'.   

just another 2 cents ;)
cheers 
thorsten



> On 2/8/12 3:44 AM, Thorsten wrote:
>> Hi Alex, Hi list,
>>
>>> >  On January 23, 2012 at 2:02 PM Jon Kleiser  
>>> > wrote:
>>> >  I am trying to brainstorm ways for people (Burger) to make a living
> Hi,
>
> Please stop "quoting" me as having written that about brainstorming.
> (You're not the first one.)
> I think it was Jakob Eriksson who wrote that.
>
> And please no more DEAD. Repeat it enough times, and you know what'll
> happen. ;-)
>
> /Jon

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp SSL Problem

2012-02-15 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>https://wiki.picolisp.com

I tried it on the wiki with firefox 10, first firefox complains about
the self-signed certificate, and then doesn't connect after a security
exception has been defined.

But I have no idea, what the problem may be, unfortunately.

Cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp SSL Problem

2012-02-16 Thread Thorsten
Alexander Burger  writes:

> On Wed, Feb 15, 2012 at 09:44:01PM +0100, Alexander Burger wrote:

Hi Alex, 

> I've also asked in #firefox, without results :(

doesn't this sound somehow related?
(from http://www.gossamer-threads.com/lists/nsp/foundry/33310)

,-
| Firefox 10.x and SI-SSL 
| Hello colleagues,   
| 
| since Mozilla started to release Firefox 10 on January 31st we are  
| seeing some issues with SSL terminated websites on SI Platform running  
| version 11g.
| 
| As far as we could determine the SSL connection between the firefox 10.x
| clients and the SI is reset by the SI when starting to transfer 
| application data. By now we did not see any successful connection   
| between the SI and the realservers in question, so it looks like no data
| gets requested by the SI from the realservers.  
| 
| Is there anybody on the list who is able to confirm this behavior?  
`-


just ignore this post otherwise ...
cheers
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp SSL Problem

2012-02-16 Thread Thorsten
Thorsten  writes:

> Alexander Burger  writes:
>
>> On Wed, Feb 15, 2012 at 09:44:01PM +0100, Alexander Burger wrote:

One more try. 

from:
http://code.google.com/p/chromium/issues/detail?id=98101#c31

 Comment 8 by a...@chromium.org, Oct 12, 2011 
,
|Yes, requests will be in multiple records from now on. See
|http://www.imperialviolet.org/2011/09/23/chromeandbeast.html Firefox
|will make this change an in upcoming release and Microsoft are expected
|to do the same.
`

again, just ignore it if its completely off-topic ...
cheers
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp SSL Problem

2012-02-16 Thread Thorsten
Alexander Burger  writes:

> I don't know if this helps, though (as I can't reproduce the problem).
> The ssllabs.com analyzer still complains, though.

I tried the 7fach and the wiki urls again you gave me (FF10), and
unfortunately see the same errorpage as before. 

Cheers,
 - Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Google Summer of Code (GSoC) 2012

2012-03-03 Thread Thorsten
Alexander Burger  writes:

Hi List,

> On Mon, Feb 27, 2012 at 01:40:16PM +0100, Thorsten wrote:
>> We prepared a GSoC 2012 page in the PicoLisp wiki
>> (http://picolisp.com/5000/!wiki?gsoc), where you can find more
>> information. 
>> ...
>> For now (till 2012-03-09) the most important task is to collect ideas
>> and find out who would like to be a mentor for his (or other peoples)
>> project ideas. Then, if PicoLisp is accepted by Google, we need to
>> spread the word and make students apply for a project.
>> 
>> Any thoughts or ideas how to make the PicoLisp application for the GSoC
>> 2012 a success are welcome.

I would suggest to add at least 2 or 3 more project ideas to the ideas
page (http://picolisp.com/5000/!wiki?ideasPage) to raise the odds of
PicoLisp being accepted as mentoring organisation. 

The best case would be if anybody is interested to participate as a
student and has a project idea (and a possible mentor in mind). However,
if you would like to see some new feature in PicoLisp and to mentor the
related project, it would be very helpfull too. 

A third (viable) option is to think about a project idea that is
beneficial for the PicoLisp community and doesn't require special
background (domain) knowledge from a (potential) mentor, but might be
interesting for students in general. That way, you can propose an idea
without being the student or mentor for that proposal. 

As an example, I would propose the project "Build a web-shop for
PicoLisp". Would that make sense? Any other ideas?

If somebody has an idea but doesn't want to get involved with the wiki,
he can just post it here on the list, I put it on the wiki then. 

Thanks
-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Google Summer of Code (GSoC) 2012

2012-03-04 Thread Thorsten

Hi Jose, 
I'm quite impressed too and wouldn't dare to enter any discussion of
your proposal. 

However, it would be nice to put your idea(s) in a digestable format on
the GSoC ideas page. I would suggest to figure out a general topic as a
headline (similar to "Enabling support for geo-data and spatial analysis
in PicoLisp") and then describe your idea(s) in a few paragraphs in a
way that a Google employee, who probably never heard of PicoLisp before,
gets the general idea - whats it all about, why is it important for
PicoLisp, what can be done with the code later on etc.

I must admit that after reading your post I would not be able to explain
to somebody else in a few words what you are proposing, and I couldn't
give your idea a short label or title.

That might be entirely due to my ignorance, but it might also be a hint
that the description of your proposel is too technical, too
low-level to 'sell' the idea to an Google employee - who only reads the
GSoC ideas page without any further background information. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Construct sequences of URL-Strings - need help

2012-03-04 Thread Thorsten


Hi List, 

I try to construct sequences of URL-Strings separated by one blank and
have been almost successfull - but I have to get rid of all the
backslashes '\' in the string sequence:

Here is the 'workhorse-function' for the task: 

,-
| ### construct the url's
| (de replaceUrlWildcard (U W)
| (let Y (split (chop U) "*")
|(glue "\" \"" (mapcar '((X) (pack (car Y) X  (cdr Y))) W)) ))
`-

And here is the use case:

,-
| ### define the url's 
| (setq U_ref # URL 
|"http://software-lab.de/doc/ref*.html"; )
| (setq W_ref  # wildcard replacements
|(list "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P"
|"Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" ))
| 
| ### make a sequence of url strings 
| (setq UrlStrings_ref (pack """" (replaceUrlWildcard U_ref W_ref) """"))  
`-

Thats what I get (strings seperated by one blank - with backslashes):

,---
|  ? (pack """" (replaceUrlWildcard U_ref W_ref) """")
|  
| "http://software-lab.de/doc/refA.html\";
| \"http://software-lab.de/doc/refB.html\";
| \"http://software-lab.de/doc/refC.html\";
| \"http://software-lab.de/doc/refD.html\";
| \"http://software-lab.de/doc/refE.html\";
| \"http://software-lab.de/doc/refF.html\";
| \"http://software-lab.de/doc/refG.html\";
| \"http://software-lab.de/doc/refH.html\";
| \"http://software-lab.de/doc/refI.html\";
| \"http://software-lab.de/doc/refJ.html\";
| \"http://software-lab.de/doc/refK.html\";
| \"http://software-lab.de/doc/refL.html\";
| \"http://software-lab.de/doc/refM.html\";
| \"http://software-lab.de/doc/refN.html\";
| \"http://software-lab.de/doc/refO.html\";
| \"http://software-lab.de/doc/refP.html\";
| \"http://software-lab.de/doc/refQ.html\";
| \"http://software-lab.de/doc/refR.html\";
| \"http://software-lab.de/doc/refS.html\";
| \"http://software-lab.de/doc/refT.html\";
| \"http://software-lab.de/doc/refU.html\";
| \"http://software-lab.de/doc/refV.html\";
| \"http://software-lab.de/doc/refW.html\";
| \"http://software-lab.de/doc/refX.html\";
| \"http://software-lab.de/doc/refY.html\";
| \"http://software-lab.de/doc/refZ.html";
`---

This is what I would need (strings separated by one blank,  no '\'):

,---
| "http://software-lab.de/doc/refA.html";
| "http://software-lab.de/doc/refB.html";
| "http://software-lab.de/doc/refC.html";
| "http://software-lab.de/doc/refD.html";
| "http://software-lab.de/doc/refE.html";
| "http://software-lab.de/doc/refF.html";
| "http://software-lab.de/doc/refG.html";
| "http://software-lab.de/doc/refH.html";
| "http://software-lab.de/doc/refI.html";
| "http://software-lab.de/doc/refJ.html";
| "http://software-lab.de/doc/refK.html";
| "http://software-lab.de/doc/refL.html";
| "http://software-lab.de/doc/refM.html";
| "http://software-lab.de/doc/refN.html";
| "http://software-lab.de/doc/refO.html";
| "http://software-lab.de/doc/refP.html";
| "http://software-lab.de/doc/refQ.html";
| "http://software-lab.de/doc/refR.html";
| "http://software-lab.de/doc/refS.html";
| "http://software-lab.de/doc/refT.html";
| "http://software-lab.de/doc/refU.html";
| "http://software-lab.de/doc/refV.html";
| "http://software-lab.de/doc/refW.html";
| "http://software-lab.de/doc/refX.html";
| "http://software-lab.de/doc/refY.html";
| "http://software-lab.de/doc/refZ.html";
`---

I could of course use query-replace in Emacs and delete the backslashes,
but I would like to have a correctly formated sequence of URL strings as
output: 

,-
| "url-sting1" "url-string2" ... "url-stringN"
`-

Any tips would be appreciated
TIA

-- 
Cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Construct sequences of URL-Strings - need help

2012-03-04 Thread Thorsten
José Romero 
writes:


Hi Jose, 
   
> Huh? i don't see any backslashes, you are missing the quotes at the
> start and end though. This is the "correct" code, if my mind reading
> skills are working well today:
>
> : (prin "\"" (replaceUrlWildcard U_ref W_ref) "\"")
> ... 
> "http://software-lab.de/doc/refZ.html"-> "\""

thanks for your answer, but I think I need a function that returns that
value and doesn't print it. 
An external program reads the URL's like this:

,--
| (setq UrlStrings_ref (prin "\"" (replaceUrlWildcard U_ref W_ref) "\""))
| (call "pandoc"  "-s" "-S"  UrlStrings_ref  "-o" "/home/tj/picolisp-ref.org" )
`--

and needs UrlStrings_ref to evaluate to a sequence of strings - not to
print it and return -> "\""

,--
| (call "pandoc"  "-s" "-S"  UrlStrings_ref  "-o" "/home/tj/picolisp-ref.org" )
| pandoc: ": openFile: does not exist (No such file or directory)
`--
 
> Note that quotes are escaped like \" not ""

Yes, I don't where these  4 """" quotes come from - do they have a special
meaning in Picolisp? I don't remember ... 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Construct sequences of URL-Strings - need help

2012-03-06 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> isn't this what you mean?
>
>(de replaceUrlWildcard (U W)
>   (let Y (split (chop U) "*")
>  (glue " "
> (mapcar
>'((X) (pack (car Y) X (cadr Y)))
>W ) ) ) )
>
>(replaceUrlWildcard
>   "http://software-lab.de/doc/ref*.html";
>   '("A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P"
>  "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" ) )
>
>-> "http://software-lab.de/doc/refA.html 
> http://software-lab.de/doc/refB.html ...
>
> Side note: Though the result of 'pack' is the same, I would recommend
> (cadr Y) instead of (cdr Y), to reflect the result of 'split'.
>
>
>> An external program reads the URL's like this:
>> 
>> ,--
>> | (setq UrlStrings_ref (prin "\"" (replaceUrlWildcard U_ref W_ref) "\""))
>
> If you use 'print' instead of 'prin' here, you don't need to supply the
> double quotes yourself:
>
>: (print "abc") 
>"abc"-> "abc"
>
> gives the same _output_ as
>
>: (prin "\"" "abc" "\"")
>"abc"-> "\""
>
>
>> Yes, I don't where these 4 """" quotes come from - do they have a
>> special
>> meaning in Picolisp? I don't remember ... 
>
> If the reader sees two double quotes in sequence, it returns NIL
> (representing the empty string)
>
>: (list "a" "" "b")
>-> ("a" NIL "b")
>
> Therefore, """" read as two NILs
>
>: (list "a" """" "b")
>-> ("a" NIL NIL "b")
>
> which in turn disappear in the 'pack'
>
>(pack '("a" NIL NIL "b"))
>-> "ab"


just for the record, this from your PM:

   ,--
   | (de replaceUrlWildcard (U W)
   |(let Y (split (chop U) "*")
   |   (mapcar
   |  '((X) (pack "\"" (car Y) X (cadr Y) "\""))
   |  W ) ) )
   `--

and then: 

   ,---
   | (apply call
   |(replaceUrlWildcard Uxxx Wyyy)
   |"pandoc"  "-s" "-S"  "-o" "/home/tj/picolisp-ref.org" )
   `---

did the job perfectly - thanks.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp assembler in JavaScript?

2012-03-06 Thread Thorsten
Alexander Burger  writes:

Hi Alex, hi Rudy, 

> BTW, Thorsten is now in the process of inserting Rudy's reply into the
> Ideas-Page, and then we'll probably can delete that reply.

Done, maybe Rudy should have a look if I didn't mess up his original
intetions, otherwise Alex could delete the reply now. 
-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Google Summer of Code (GSoC) 2012

2012-03-17 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

> unfortunately, our application was rejected:
>
>> Thank you for submitting "PicoLisp" organization application to Google  
>> Summer of Code 2012.
>> Unfortunately, we were unable to accept your organization's
>> application at
>> this time.
>> We received many more applications for the program than we are able to  
>> accommodate,
>> and we would encourage you to reapply for future instances of the
>> program.
>> 
>> Best regards,
>> 
>> Google Open Source Programs
>
> Let's think about trying it next year ...

Too bad we did not make it. Maybe next year? Maybe PicoLisp is just too
small as a project, or we should copy some of the good stuff from the
successfull applications - I've seen some quite nice ideas pages. 

However, it was probably worth give it a try, and next year it should be
much easier and faster to apply again, since we know the whole procedure
already. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Speedtest PicoLisp vs Emacs Lisp

2012-04-22 Thread Thorsten

Hi List, 
out of curiosity I did a little speedtest with PicoLisp and Emacs Lisp
on a 64bit Arch Linux (see
http://picolisp.com/46850/62704437697738713~!wiki?PILvsEL). 

The results are quite favorable for PicoLisp - it is about 4 times
faster than interpreted Emacs Lisp and 2 times faster than compiled
Emacs Lisp.

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-23 Thread Thorsten
José Romero  writes:

Hi Jose, 
very interesting results. I always had the feeling that even compiled
Elisp is not much faster than PicoLisp, but I thought that was just a
'feeling'. I would like to add your results to the wiki page - let me
know if I shouldn't. 

> On Mon, 23 Apr 2012 02:22:21 +0200
> Thorsten  wrote:
>
>> 
>> Hi List, 
>> out of curiosity I did a little speedtest with PicoLisp and Emacs Lisp
>> on a 64bit Arch Linux (see
>> http://picolisp.com/46850/62704437697738713~!wiki?PILvsEL). 
>> 
>> The results are quite favorable for PicoLisp - it is about 4 times
>> faster than interpreted Emacs Lisp and 2 times faster than compiled
>> Emacs Lisp.
>> 
>
> Nice, I did my own tests on a 32 bit machine, not such a dramatic
> speedup for picolisp by my numbers (about the same speed as bytecode)
> but this thing is only really measuring function call/arithmetic cost.
>
> $ cat > fibo.el << .
>> (defun fibo (N)
>>(if (> 2 N)
>>   1
>>   (+ (fibo (1- N)) (fibo (- N 2))) ) )
>> 
>> (fibo 35)
>> .
> $ time emacs --no-site-file --script fibo.el 
>
> real  0m13.854s
> user  0m13.829s
> sys   0m0.016s
> $ emacs --no-site-file -batch -f batch-byte-compile fibo.el 
> Wrote /home/cyborgar/tmp/sptest/fibo.elc
> $ time emacs --no-site-file --script fibo.elc
>
> real  0m5.882s
> user  0m5.828s
> sys   0m0.008s
> $ cat > fibo.l << .
>> (de fibo (N)
>>(if (> 2 N)
>>   1
>>   (+ (fibo (dec N)) (fibo (- N 2))) ) )
>> (fibo 35)
>> .
> $ time pil fibo.l -bye
>
> real  0m5.662s
> user  0m5.624s
> sys   0m0.004s
>
> I tested with the "extensive list manipulations" code Alex tested CLisp
> and SBCL a while back, with pretty nice results also:
>
> $ cat > tst.el << .
>> (defun tst ()
>>   (mapcar
>>(lambda (X)
>>   (cons
>>(car X)
>>(reverse (delete (car X) (cdr X))) ) )
>>'((a b c a b c) (b c d b c d) (c d e c d e) (d e f d e f)) ) )
>> (dotimes (i 100) (tst))
>> .
> $ time emacs --no-site-file --script tst.el 
>
> real  0m8.311s
> user  0m8.273s
> sys   0m0.032s
> $ emacs --no-site-file -batch -f
> batch-byte-compile tst.el Wrote /home/cyborgar/tmp/sptest/tst.elc
> $ time emacs --no-site-file --script tst.elc 
>
> real  0m5.622s
> user  0m5.604s
> sys   0m0.012s
> $ cat > tst.l << .
>> (de tst ()
>>(mapcar
>>   '((X)
>> (cons
>>(car X)
>>(reverse (delete (car X) (cdr X))) ) )
>>   '((a b c a b c) (b c d b c d) (c d e c d e) (d e f d e f)) ) )
>> (do 100 (tst))
>> .
> $ time pil tst.l -bye
>
> real  0m1.208s
> user  0m1.192s
> sys   0m0.012s
>
> Looks like the emacs compiler can't improve much in that function and
> it's still 4.6-6.9x slower than picolisp, whoops :)
>
> $ uname -a
> Linux icz 2.6.32-5-686 #1 SMP Mon Jan 16 16:04:25 UTC 2012 i686
> GNU/Linux 
> $ cat /proc/cpuinfo |grep "model name" | cut -d: -f2
>  Pentium(R) Dual-Core CPU   T4200  @ 2.00GHz
>  Pentium(R) Dual-Core CPU   T4200  @ 2.00GHz
>
> Cheers, 
> José

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-23 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> out of curiosity I did a little speedtest with PicoLisp and Emacs Lisp
>
> Many thanks for doing this test! And for the extensive description of
> how to set it up.

Since these are my two main tools, I was always interested in how they
perform relative to each other. 

> A note about the wiki-link in the mail:
>
>> http://picolisp.com/46850/62704437697738713~!wiki?PILvsEL). 
>
> It is not a good idea to make a copy of a link in the wiki while one is
> in a session (logged in), because both the port (46850) and the
> session-ID (62704437697738713) in the URL are only valid during that
> session.
>
> The right link would be
>
>http://picolisp.com/5000/!wiki?PILvsEL
>
> You can get it if you click on the "Log out" link, and then navigate to
> that page again.

I knew something was wrong when I pasted the link, since there was a
long discussiion about PicoLisp links here not so long ago - but it was
already quite late when I posted so I did not investigate. Thanks for
the tip.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-23 Thread Thorsten
Alexander Burger  writes:

Hi Alex,

>> Results are quite similar, but surprisingly enough, your 32bit system is
>> faster on list manipulation than my 64bit system. 
>
> I would have expected that. All other things equal, 64-bit PicoLisp is
> usually slower than the 32-bit version, due to a poorer memory cache
> performance (the cells are twice as large size). On the other hand,
> arithmetics are faster, due to the additional short number type in
> pil64.

I added that comment to the wiki page, since the comparison between
32bit and 64bit was quite a nice side effect of Jose's replication of
the test. Hope thats ok. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Fwd: finding the schwerpunkt

2012-04-23 Thread Thorsten
Jakob Eriksson  writes:

> Our Schwerpunkt could be that elusive web IDE which can be deployed on free
> CGI hosting and scale upwards.
> :)

Maybe name it 'PicoBlitz'?  ;)

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-23 Thread Thorsten
Jakob Eriksson  writes:

> On April 23, 2012 at 5:15 PM Thorsten  wrote:
>
>>
>> Unfortunately, it seems that enthusiasm of aficionados of other
>> (slower?) Lisp dialects is limited, since in no time I had 2 negative
>> votes and 1 close request. So may be have a quick look before the
>> inevitable happens - the question is closed and moved to some hidden
>> dark spot of the internet.
>
>
> Stackoverflow is not for these kinds of "questions". I don't know how
> to word something like that for it be accepted by SO.
>
> But I am a strong proponent of moving questions people ask here about
> programming problems with PicoLisp, to SO. It will increase the
> visibility of PicoLisp.
> SO is more for "why does this not work, I have tried X, Y and Z, can
> you help me?" more than "give me stats for this program".

Hi Jakob, 
these 2 questions are among the most popular on stackoverflow: 

,-
| 1068
| votes
| 32
| answers
| 108k views
| The Definitive C++ Book Guide and List
| This question attempts to collect the few pearls among the dozens of bad
| C++ books that are released every year. Unlike many other programming
| languages, which are often picked up on the go from ...
`-


,---
| 819
| votes
| 36
| answers
| 143k views
| Git for beginners: The definitive practical guide
| Ok, after seeing this post by PJ Hyett, I have decided to skip to the
| end and go with Git. So what I need is a beginner's practical guide to
| Git. "Beginner" being defined as someone who knows how to ...
`---

Lets face it, questions are only good questions on stackoverflow if the
answer is what the crowd wants to hear. This kind of crowd censorship is
well known from wikipedia. Its a waste of time to post there if any 5
people can close a question that is unfavorable for their favorite
language or tool. Where is the scientific spirit that first looks at the
numbers an then forms an opinion?

I used to like stackoverflow, but why invest time there if your question
is gone after a few hours?

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


flinuxpicolisp

2016-07-04 Thread Thorsten
Hi List,
I just discovered a nice article by Joe Bogner about FLINUX as an 
alternative was to run PicoLisp under Windows (http://picolisp.com/wiki/?
flinuxpicolisp).

I tried it out, and succeded to a certain point but not further.

When installing necessary tools like wget, make etc. I often hit the 
"could not change the root directory (No such file or directory)" error, 
but it appeared after the last installation step, and after an C-c 
installation appeared successful.

But when trying to compile the 64bit version, Java is missing, and when I 
try to install it, I get the above error in the middle of the installation 
process that thus cannot finish.

There is some info about this 
(https://github.com/wishstudio/flinux/issues/63), but I could not really 
find a solution. Did somebody on the list succeed with the Flinux install 
of the 64bit version on Windows? 

Any hints would be welcome.
Cheers 
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: flinuxpicolisp

2016-07-05 Thread Thorsten
Joe Bogner  writes:

Hi Joe, Hi Everybody,

 
> On Mon, Jul 4, 2016 at 2:17 PM, Thorsten  wrote:Hi List,
> I just discovered a nice article by Joe Bogner about FLINUX as an
> alternative was to run PicoLisp under Windows 
(http://picolisp.com/wiki/?
> flinuxpicolisp).
> 
> 
> Hi Thorsten, glad you found it.
>  
> 
> I tried it out, and succeded to a certain point but not further.
> When installing necessary tools like wget, make etc. I often hit the
> "could not change the root directory (No such file or directory)" 
error,
> but it appeared after the last installation step, and after an C-c
> installation appeared successful.
> 
> 
> I had the same experience. I think it was a side effect of how bash 
runs within it and didn't affect the pil32 execution as far as I 
remember.
>  
> 
> But when trying to compile the 64bit version, Java is missing, and 
when I
> try to install it, I get the above error in the middle of the 
installation
> process that thus cannot finish.
> 
> 
> Unfortunately, I don't think you'll be able to compile or run the 
64bit version. I was unable to compile a x64 version of flinux and it 
seems like it is not implemented. For 
example, https://github.com/wishstudio/flinux/tree/7874a4ff9ba2fec4ad1c6
7b857c563288d5aa93e/src/dbt, does not have an x64 version and the 
assembly for x86_trampoline does not compile under visual c++ x64.
> 
> This is the main motivation for working on the native x64 version of 
PicoLisp using midipix as the linux syscall interop layer.  Thanks for 
the mention Rick!

ok, so its not my fault that I can't install the 64bit version via 
flinux. Then I wait for that very interesting project of yours.
Thanks for all the hints and links
Cheers Thorsten


> The x64 version is still in a draft status, most of the changes are 
here: https://github.com/joebo/picoLisp-win-x86-
64/blob/master/src64/arch/win-x86-64.l, to support the different ABI 
calling convention. It relies on midipix which is still in alpha and 
hasn't yet been released which is why I haven't actively promoted it. 
There's a few workarounds still in the code too, for example dlopen 
isn't yet implemented in midipix so ht ext: code needs to be compiled 
into the picolisp binary, https://github.com/joebo/picoLisp-win-x86-
64/blob/master/src64/Makefile#L129
> 
> 
> The current x64 windows binary release can be found under Releases in 
the github repo linked above, https://github.com/joebo/picoLisp-win-x86-
64/releases
> 
> 
> 
> There is some info about this
> (https://github.com/wishstudio/flinux/issues/63), but I could not 
really
> find a solution. Did somebody on the list succeed with the Flinux 
install
> of the 64bit version on Windows?
> Any hints would be welcome.
> CheersThorsten
> --
> UNSUBSCRIBE: mailto:picolisp-rbqqylfharzybvfhvmr...@public.gmane.org?
subject=Unsubscribe
> 
> 
> 
> 




Re: In Detail: Native C Calls

2012-05-09 Thread Thorsten Jolitz
Alexander Burger  writes:

Hi Alex,

> at last, I have found the time to write an in-detail description of
> the
> 'native' function:
>
>http://software-lab.de/doc/native.html
>
> Any comments welcome! It became quite long, not because 'native' is so
> complicated, but because there are so many ways of passing information
> to and from C functions. I hope it clears some of the smoke.

can't wait to try this out with the R statistics package. 
Since the package can be built as shared library, it might be possible
to call all of R directly from PicoLisp - without the need for the
typical intermediary packages (like RPy for R/Python communication).

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


PicoLisp Bible - Call for Papers

2012-07-19 Thread Thorsten Jolitz

Hi List,

I'm on my way to publish (in cooperation with Alex) a 'PicoLisp Bible'
with (almost) everything written about PicoLisp collected and organized
in one single book. I will be the editor (and author of a few articles
from the wiki), most of the articles will be (of course) from Alex, but
e.g. Henrik gave the permission to include his tutorial series on
ProDevTips too. 

Every article will be published under the name of its author, I'm only
the editor who merges everything together. It should be more or less a
non-profit project, the (likely) costs will be paid for by me, the
(unlikely) profits will reimburse me for all the work to put the book
together. 

So, if you have anything PicoLisp related in your mind you always wanted
to write an article or essay about - now would be the perfect time.
Maybe you have written a library and want for explain its use, or you
can describe an interesting practical use case, or maybe your IDE/Editor
setup for PicoLisp. There are so many interesting aspects about PicoLisp
that would be worth to document. 

The idea is that you write your articles in the 'articles and essays'
section of the PicoLisp wiki, from where it is easy to download them as
tex files (to be merged into the book). 

So this is a CALL FOR PAPERS for the 'PicoLisp Bible', the deadline would
be (more or less) the 1st of September, please let me (us) know if you
are interested and planning to contribute something. 

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Bible - Call for Papers

2012-07-20 Thread Thorsten Jolitz
Meadowlark technology
 writes:

> An excellent idea Thorsten.
> If I can think of a contribution I can make I will do so.  Though I use
> pl I would NOT say I was sufficiently expert to tell others how to do
> so!

Without being sufficiently expert either I made a table (mainly for
myself) with all uses of the @ mark in PicoLisp and published it in the
wiki (articles & essays), so, even without the deep understanding, you
might be able to figure out an interesting but underdocumented topic.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Bible - Call for Papers

2012-07-20 Thread Thorsten Jolitz
Jakob Eriksson  writes:

> Great initiative!
>
> I will try to put something short together on how portable the
> very core of (mini)PicoLisp is. No promise though, but it would be fun.

Sounds definitely interesting. Even a small descriptive article would be
better than nothing, this is not about writing sophisticated scientific
articles for a peer reviewed magazin, just about collecting and
organizing existing (and maybe some new) docs about PicoLisp. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Rudy Hagedorn 
writes:

> Great idea!
>
> How does 'the picolisp compendium' sound as title?


That makes two proposals then:
- PicoLisp Bible
- PicoLisp Compendium

I must admit I like Compendium even better.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Yiorgos Adamopoulos
 writes:

> On Fri, Jul 20, 2012 at 1:52 PM, Thorsten Jolitz
>  wrote:
>> That makes two proposals then:
>> - PicoLisp Bible
>> - PicoLisp Compendium
>
> Just to make them three:
>
> - PicoLisp Works

Nice double meaning ;)

It would be interesting to let the community vote, however, that seems to be a
bit complicated. Maybe just let Alex decide what he likes best, as an
easy solution?

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Alexander Burger  writes:

>> > - PicoLisp Works
>> 
>> Nice double meaning ;)
>
> Indeed!
>
>> It would be interesting to let the community vote, however, that
>> seems to be a
>> bit complicated. Maybe just let Alex decide what he likes best, as an
>> easy solution?
>
> Or better you, as you are the editor?

I think 'PicoLisp Works' would work pretty well as a title ... 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Terry Palfrey 
writes:

> Will this include the Rosetta Code examples?

Thats not a bad idea at all, but it depends a bit on the technical side.
It would seem to be too much work if I had to transform the Rosetta Code
html to Tex and then pick out the PicoLisp parts. 

But maybe it would be possible to use the pure PicoLisp source files,
embed each example (programmatically) in a \verbatim environment, put a
title on it, and then include it as attachment. 

Would definitely be a great source of information. No legal problems
there (besides the technical ones?)

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Alexander Burger  writes:

> On Fri, Jul 20, 2012 at 02:32:00PM +0200, Thorsten Jolitz wrote:
>> Terry Palfrey 
>> writes:
>> 
>> > Will this include the Rosetta Code examples?
>> ...
>> Thats not a bad idea at all, but it depends a bit on the technical side.
>> It would seem to be too much work if I had to transform the Rosetta Code
>> html to Tex and then pick out the PicoLisp parts. 
>
> Well, I have all the solutions I posted so far in a single large source
> file ("rosettacode.l", 17194 lines as of today).
>
> So I uploaded it now to software-lab.de. Perhaps it helps?
>
>http://software-lab.de/rosettacode.l

Thanks Alex, that seems to be the only feasable solution to me to
programmatically convert this .l file into a .tex file and use it as
attachment. Since the rosettacode.l file looks very clean and organized,
and the Rosetta task-titles and outputs are included, it should be
possible.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-20 Thread Thorsten Jolitz
Christophe Gragnic
 writes:

> I was thinking trying to learn PicoLisp while reading Successful Lisp
> (I already read the official PicoLisp tuto once):
> http://psg.com/~dlamkins/sl/contents.html
> The plan was to read and translate the examples in PicoLisp.
>
> I planned to do this during the summer but:
> 1) summer is half finished and I only read 4 chapters without writing
> a line of code.
> 2) some reviewing from Alex or others would have been needed for a
> serious publication.
>
> If ever I have something to share, even after the publication, I'll share.

I still have to figure out the detailles of book-on-demand
self-publishing on a world-wide scale (most likely with Amazon?), but I
know them quite well for national publishers here in Germany, and it
shouldn't be that expensive (hopefully), so, who knows, there might be a
second edition e.g. after 2 years - with new material and corrections.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-21 Thread Thorsten Jolitz
Terry Palfrey 
writes:

> I was thinking of some sort of graphic to imply "works" like a
> waterworks or something that was 
>
> based on gears/cogs/sprockets yet encompassed the mindworks that
> picolisp expresses and
> submit this as a thinking draft.

Cover design is definitely a topic where I would love to get input from
the community, since I'm not a designer. 

It seems the name of the book has more or less converged to "PicoLisp
Works", so the cover design should be based on that name. 

Your graphic looks really nice - I like it, thanks. I hope there are no
copyright on any of the parts?

Why don't we collect some proposals and figure out which one is the most
popular, just like we did with the names?

BTW
I just found out that there is an upper limit for book size (at
Amazon some 870 pages or so) in self-publishing, so if I include the
function reference (some 200 pages) and the rosettacode examples (huge),
what I really would like to do, there might be no other choice than
making it two books (i.e. there might be two different covers ;)
 
-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-21 Thread Thorsten Jolitz
Laurent Artaud  writes:

> Le 21/07/2012 20:05, Thorsten Jolitz a écrit :
>> Terry Palfrey 
>> writes:
>>
>> BTW
>> I just found out that there is an upper limit for book size (at
>> Amazon some 870 pages or so) in self-publishing, so if I include the
>> function reference (some 200 pages) and the rosettacode examples (huge),
>> what I really would like to do, there might be no other choice than
>> making it two books (i.e. there might be two different covers ;)
>>
>>
>
> I fear that the price tag for a book this size would be outside of
> what I would pay for.
> I would suggest that you consider PDF or ePub: it would both remove
> the maximum size limit and reduce your publication costs.


With the 2 volume solution, Vol.1 with all the docs, references and
articles would probably have some 330 to 350 pages, and might be still
affordable. Vol. 2 with the function reference and the rosettacode
examples might be twice as big. I think ebooks are often included in
self-publishing offers. 


-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp Book

2012-07-21 Thread Thorsten Jolitz
Christophe Gragnic
 writes:

> On Sat, Jul 21, 2012 at 8:05 PM, Thorsten Jolitz
>  wrote:
>>
>> BTW
>> I just found out that there is an upper limit for book size (at
>> Amazon some 870 pages or so) in self-publishing, so if I include the
>> function reference (some 200 pages) and the rosettacode examples (huge),
>> what I really would like to do, there might be no other choice than
>> making it two books (i.e. there might be two different covers ;)
>
> Do you know about Lulu:
> http://www.lulu.com/
> I guess Amazon is bigger so it must have some nicer stuff, do you know
> how they compare?

Actually the Lulu website looks at least as good as Amazons
www.createspace.com. I don't know how they compare, in Germany is
another big one called www.bod.de. 

It seems publishing on lulu or createspace is free, and they charge
something like 40pc for each book (or was it 40pc for the author?), but I
know that there are costs publishing on BOD, so I guess one has to read
the small print too.

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz

Hi List, 
related to the nice idea of publishing the Rosettacode examples (which
would actually be nicer _with_ the task descriptions included) I have a
few (probably rather newbie) technical questions about manipulating the
file-system and processing text in PicoLisp: 

1. How to make, concat, and kill files (and directories) on Linux with
   PicoLisp? Using the system functions?

2. How to realize the following workflow (from Emacs, using Emacs Lisp)
   in PicoLisp:

   You open a text file in an Emacs buffer, goto beginning-of-buffer, do
   a regexp-search for pattern1. Get the point position of the start of
   pattern1, then delete all the text between beginning-of-buffer and
   start-of-pattern1. Do another regexp-search for pattern2, get point
   position of end-of-pattern2. Then treat end-of-pattern2 like
   beginning-of-buffer and search for start-of-pattern3 etc.

   The idea is to identify certain blocks in the text and delete
   everything around them. Thats a very typical task for Emacs Lisp in
   Emacs, but I'm not quite sure how to do this in PicoLisp. Probably
   would need a book with all the Rosettacode examples on my desk to
   easily look it up ;)

3. Is it possible to use 'prog' or 'let' with 'apply', i.e. apply a
   whole sequence of functions instead of only one to the 'lst argument?

Thanks for any tips.

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Alexander Burger  writes:

Hi Alex,

thanks a lot, thats what I needed to know, now I have to give it a try. 

>> 3. Is it possible to use 'prog' or 'let' with 'apply', i.e. apply a
>>whole sequence of functions instead of only one to the 'lst argument?
>
> I'm not sure what you mean here. Perhaps it helps to know that the
> mapping functions take an arbitrary number of lists? Can you give an
> example?

I will try to get as far as I can and then maybe ask again with a better
specified question. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Henrik Sarvell 
writes:

Hi Henrik, 

> Below I've pasted links to descriptions of functions that might or
> might not be what you want based on a quick glance on your questions:
>
> 1.) http://software-lab.de/doc/refC.html#call
>
> 2.) http://software-lab.de/doc/refM.html#match

Thanks, I will look those up (have to get used to do these things
without regexp, but it does make sense somehow, since regexp sometimes
appear like textbook examples for the meaning og 'cryptic'.


> 3.) I don't really get this one, isn't it possible for you to simple
> loop through the functions in questions with for instance for or mapc
> and then apply them one by one?

That question was obviously not well formulated, I think I give it a try
now with the info I got and maybe ask again later on based on what I
got. 


-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz

Hi List, 
I have a rather strange problem:

I want to (from within Emacs)

,--
| (setq X (list "string1" ... "string200"))
`--

and it seems PicoLisp just freezes - no error messages, but no output
either, and the process seems to be frozen. 
Now when I split the list into 

,
| (setq Y (list "string1" ... "string100"))
| (setq Z (list "string101" ... "string200"))
`

both evaluations work, and quite fast. I could make Y even smaller and Z
bigger - until a certain limit (Y = 25, Z = ca. 180 or so), and both
assignments work just fine. But when I add both parts together, PicoLisp
freezes again when assigning X.

Is there something like an upper limit for how many Strings can be in a
list in PicoLisp? Or might that be Emacs related?

200 or 300 are not really that big numbers ...

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz
Alexander Burger  writes:

Hi Alex,

>> Is there something like an upper limit for how many Strings can be in a
>> list in PicoLisp? Or might that be Emacs related?
>
> No, there is no limit. Neither to the length of the command line (if you
> use the built-in line editor).
>
> How did you invoke PicoLisp? Does this also happen if you invoke just as
>
>$ pil +
>
> i.e. PicoLisp alone, without Emacs?

No, that works, although there are is someting strange happening too:
some of the strings in the list are replaces by NIL, and it seems as if
the '\' that signals a linebreak in an Emacs buffer is somehow
misinterpreted as an escaping backslash

 ,
 | "wiki/Binary_strings" "wiki/Bitmap"
 | "wiki/Bitmap/Bresenham%27s_line_algorithm"
 | "wiki/Bitmap/B%C3%A9zier_curves/Cubic"
 | "wiki/Bitmap/B%C3%A9zier_curves/Quadratic" "wiki/Bitmap/Flood_fill"
 | "wiki/Bitmap/Histogram" "wiki/Bitmap/Midpoint_circle_algorithm"
 | "wiki/Bitmap/PPM_conversion_through_a_pipe"
 | "wiki/Bitmap/Read_a_PPM_file"
 | "wiki/Bitmap/Read_an_image_through_a_pipe"
 | "wiki/Bitmap/Write_a_PPM_file" "wiki/Bitwise_IO"
 | "wiki/Bitwise_operations" "wiki/Boolean_values" "wiki/Box_the_compass"
 | "wiki/Break_OO_privacy" "wiki/Brownian_tree" "wiki/Bulls_and_cows"
 | "wiki/Bulls_and_cows/Player" "wiki/Caesar_cipher" "wiki/Calendar"
 | "wiki/Calendar_-_for_%22real%22_programmers"
 | "wiki/Call_a_foreign-language_function" "wiki/Call_a_function"
 | "wiki/Call_a_function_in_a_shared_library" "wiki/Call_an_object_method"
 | "wiki/Case-sensitivity_of_identifiers" "wiki/Catalan_numbers"
 | "wiki/Character_codes" "wiki/Character_matching" "wiki/Chat_server"
 | "wiki/Checkpoint_synchronization" "wiki/Chess_player"
 | "wiki/Chess_player/PicoLisp"
 `

becomes

  ,--
  | "wiki/Binary_strings" "wiki/Bitmap"
  | "wiki/Bitmap/Bresenham%27s_line_algorithm\" " NIL " " NIL " " NIL " "
  | NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL "
  | " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL
  | " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL " " NIL "
  | \"wiki/Chat_server" "wiki/Checkpoint_synchronization"
  | "wiki/Chess_player" "wiki/Chess_player/PicoLisp" 
  `--


So it looks more like an Emacs (PicoLisp mode) related problem. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Alexander Burger  writes:

> For making files where you will usually use 'out', and write directly to
> the file.
>
> To concat two files, you could do:
>
>(out "c" (in "a" (echo)) (in "b" (echo)))
>
> Erasing a file is not implemented as a PicoLisp function. You can simply
> call 'rm'
>
>(call 'rm "c")

Is there a way to make 'out' write directories too?

,-
| (out "/new/dir/newfile" (in "a" (echo)) (in "b" (echo)))
`-

(This doesn't work for me)

Or do I have to use something like

,--
| (call 'mkdir "/new/dir/")
`--

then  

,---
| (call 'cd "/new/dir/")
`---

then 

,----
| (out "newfile" (in "a" (echo)) (in "b" (echo))) |
`

?

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Upper limit for list lenght in PicoLisp?

2012-07-23 Thread Thorsten Jolitz
Alexander Burger  writes:

Hi Alex,

> You said that you call it as
>
>(setq X (list "string1" ... "string200"))
>
> Note that this evaluates the transient symbols "string1" etc., so if one
> of them has a value NIL (or anything else), it will be included in the
> list.
>
> What you actually want to do is
>
>(setq X '("string1" ... "string200"))

yes, definitely... thanks

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Processing Text in PicoLisp

2012-07-23 Thread Thorsten Jolitz
Henrik Sarvell 
writes:

> AFAIK out doesn't do auto dir creation or any dir creation for that
> matter.

ok

> Note that you can use info to check stuff, could possibly be used in a
> function that checks a certain path from top to bottom and creates any
> missing dirs on the way. Ie if new exists it will create dir.

didn't know about info, thats definitely usefull, thanks

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


  1   2   3   4   >