Alan Ruttenberg | 1 Apr 2010 05:08
Picon
Gravatar

Re: [armedbear-devel] Proposal for URL to be used as Pathnames

On Mon, Mar 29, 2010 at 5:07 AM, Mark Evenson <evenson <at> panix.com> wrote:
> On 3/28/10 5:26 PM, Alan Ruttenberg wrote:
> […]
>
>> The reserved characters are scheme specific. I'd suggest that there be
>> a generic function eql dispatch on the scheme to compute namestrings.
>
> Since URL handlers can be added at runtime, which is the case with the
> OSGi handler for the "bundle" scheme that we are interested in
> supporting, we can't make an EQL specializer ahead of time for
> everything we will encounter.  I was hoping to use the Java
> implementations of the URLStreamHandler for the schemes help out here,
> but I don't see much.  At the moment I'm favoring just implementing such
> a specializer for "http" and "bundle", creating a protocol for a user to
> add a specializer, and calling it a day.

+ ftp, https, urn, info would all be common in my world.

btw, I'm not sure mixing the authority and port is the best choice -
they tend to be separate items.
Also, how to do fragments ("#anchor") and queries (?q=blah)  for http URIs?

> Do we want the namestring to always be the encoded form?  I was planning
> to have the namestring be what the user used to create the URL-PATHNAME,
> but always encode before going to the network.  I need to think about
> this more.

It's a good question. The thing is that with an http URI you want to
be able to format it for inclusion in a web page, or to execute an
http get on it. So you need to access the encoded form in an easy way.
(Continue reading)

Alan Ruttenberg | 2 Apr 2010 00:36
Picon
Gravatar

[armedbear-devel] lisp interpreter inside a beanshell JConsole?

Hi,

I'm trying to set up a lisp shell inside protege, by copy pasting from
the bean shell example they have:

http://code.google.com/p/co-ode-owl-plugins/source/browse/trunk/org.coode.shell/src/org/coode/shell/view/BeanShellView.java

(see  http://www.beanshell.org/manual/jconsole.html)

Unfortunately I'm losing, with the first eval I call resulting in a
null pointer exception.
I expect I don't know how to set up the top level loop to run with the
JConsole streams.

Can anyone help?

Thanks,
Alan
Alan Ruttenberg | 2 Apr 2010 04:29
Picon
Gravatar

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?

Just a heads up that I've got some help from Doug on this and have
made some progress.

Lisp starts up and can do simple things but.

a) Read from console doesn't work. Via button I can load files with
simple stuff like (print 'hello-world).
b) Doing anything beyond simple causes some trouble with autoloading,
I think. Here's the message (I'm trying to load swank here with the
idea of remote connecting from emacs, but e.g. (require 'asdf) gives
me the same error.)

For voyeurs, code's at

http://svn.neurocommons.org/svn/trunk/protege/org.sciencecommons.protege.lisp

Armed Bear Common Lisp 0.20.0-dev
Java 1.5.0_19 Apple Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 0.0 seconds.
Startup completed in 0.491 seconds.

"Starting up protege lisp interpreter"
; Loading #P"/Users/alanr/repos/slimenew/slime/swank-loader.lisp" ...
;   Loading stream ...
;   Loaded stream (0.0050 seconds)
;  Loading stream ...
;  Loaded stream (0.092 seconds)
WARNING: No architecture feature found in ~a.
Debugger invoked on condition of type TYPE-ERROR:
(Continue reading)

Picon

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?

One question is since you are on a Mac, your line endings in some situations might be '\r' by itself?
Not sure if between the client/server sockets if they ever get into '\r' only mode out of sync.
But since you have used ABCL  on Mac with java1.5 for a while this would have been something that maybe would have come up already.  Another thing.. if on Mac if a person uses the default system editors, what do line ending styles end up being?

But your actual error looks like Lisp missing something that helps identify the platform type and x86 vs amd64.


On Thu, Apr 1, 2010 at 7:29 PM, Alan Ruttenberg <alanruttenberg <at> gmail.com> wrote:
Just a heads up that I've got some help from Doug on this and have
made some progress.

Lisp starts up and can do simple things but.

a) Read from console doesn't work. Via button I can load files with
simple stuff like (print 'hello-world).
b) Doing anything beyond simple causes some trouble with autoloading,
I think. Here's the message (I'm trying to load swank here with the
idea of remote connecting from emacs, but e.g. (require 'asdf) gives
me the same error.)

For voyeurs, code's at

http://svn.neurocommons.org/svn/trunk/protege/org.sciencecommons.protege.lisp

Armed Bear Common Lisp 0.20.0-dev
Java 1.5.0_19 Apple Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 0.0 seconds.
Startup completed in 0.491 seconds.

"Starting up protege lisp interpreter"
; Loading #P"/Users/alanr/repos/slimenew/slime/swank-loader.lisp" ...
;   Loading stream ...
;   Loaded stream (0.0050 seconds)
;  Loading stream ...
;  Loaded stream (0.092 seconds)
WARNING: No architecture feature found in ~a.
Debugger invoked on condition of type TYPE-ERROR:
 org.armedbear.lisp.Lisp$unboundValue <at> ca18c6
[1] MOP(1):

Regards,
Alan


On Thu, Apr 1, 2010 at 6:36 PM, Alan Ruttenberg
<alanruttenberg <at> gmail.com> wrote:
> Hi,
>
> I'm trying to set up a lisp shell inside protege, by copy pasting from
> the bean shell example they have:
>
> http://code.google.com/p/co-ode-owl-plugins/source/browse/trunk/org.coode.shell/src/org/coode/shell/view/BeanShellView.java
>
> (see  http://www.beanshell.org/manual/jconsole.html)
>
> Unfortunately I'm losing, with the first eval I call resulting in a
> null pointer exception.
> I expect I don't know how to set up the top level loop to run with the
> JConsole streams.
>
> Can anyone help?
>
> Thanks,
> Alan
>

_______________________________________________
armedbear-devel mailing list
armedbear-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel

_______________________________________________
armedbear-devel mailing list
armedbear-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
Alan Ruttenberg | 2 Apr 2010 05:25
Picon
Gravatar

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?

On Thu, Apr 1, 2010 at 11:08 PM, dmiles <at> users.sourceforge.net
<logicmoo <at> gmail.com> wrote:
> One question is since you are on a Mac, your line endings in some situations
> might be '\r' by itself?
> Not sure if between the client/server sockets if they ever get into '\r'
> only mode out of sync.
> But since you have used ABCL  on Mac with java1.5 for a while this would
> have been something that maybe would have come up already.  Another thing..
> if on Mac if a person uses the default system editors, what do line ending
> styles end up being?

I tried various control characters in an attempt to end the line, but no luck.

> But your actual error looks like Lisp missing something that helps identify
> the platform type and x86 vs amd64.

I usually get the message:

WARNING: No architecture feature found in (POWERPC PPC X86 X86-64
AMD64 I686 I586 I486 PC386 IAPX386 SPARC64 SPARC HPPA64 HPPA PENTIUM3
PENTIUM4).

If I (require 'asdf) instead instead get

"Starting up protege lisp interpreter"
; Loading stream ...
;   Loading stream ...
;   Loaded stream (0.016 seconds)
Debugger invoked on condition of type TYPE-ERROR:
  org.armedbear.lisp.Lisp$unboundValue <at> ad8437
[1] FORMAT(1):

Hmm. Something with special binding?

Now in both these cases I'm calling eval in the same thread where I
called createDefaultInstance. If instead the (require 'asdf) is in a
file I try to load (by calling eval from a different thread), I
instead get the CPU pinned and have to force quit.

-Alan

>
>
> On Thu, Apr 1, 2010 at 7:29 PM, Alan Ruttenberg <alanruttenberg <at> gmail.com>
> wrote:
>>
>> Just a heads up that I've got some help from Doug on this and have
>> made some progress.
>>
>> Lisp starts up and can do simple things but.
>>
>> a) Read from console doesn't work. Via button I can load files with
>> simple stuff like (print 'hello-world).
>> b) Doing anything beyond simple causes some trouble with autoloading,
>> I think. Here's the message (I'm trying to load swank here with the
>> idea of remote connecting from emacs, but e.g. (require 'asdf) gives
>> me the same error.)
>>
>> For voyeurs, code's at
>>
>>
>> http://svn.neurocommons.org/svn/trunk/protege/org.sciencecommons.protege.lisp
>>
>> Armed Bear Common Lisp 0.20.0-dev
>> Java 1.5.0_19 Apple Inc.
>> Java HotSpot(TM) Client VM
>> Low-level initialization completed in 0.0 seconds.
>> Startup completed in 0.491 seconds.
>>
>> "Starting up protege lisp interpreter"
>> ; Loading #P"/Users/alanr/repos/slimenew/slime/swank-loader.lisp" ...
>> ;   Loading stream ...
>> ;   Loaded stream (0.0050 seconds)
>> ;  Loading stream ...
>> ;  Loaded stream (0.092 seconds)
>> WARNING: No architecture feature found in ~a.
>> Debugger invoked on condition of type TYPE-ERROR:
>>  org.armedbear.lisp.Lisp$unboundValue <at> ca18c6
>> [1] MOP(1):
>>
>> Regards,
>> Alan
>>
>>
>> On Thu, Apr 1, 2010 at 6:36 PM, Alan Ruttenberg
>> <alanruttenberg <at> gmail.com> wrote:
>> > Hi,
>> >
>> > I'm trying to set up a lisp shell inside protege, by copy pasting from
>> > the bean shell example they have:
>> >
>> >
>> > http://code.google.com/p/co-ode-owl-plugins/source/browse/trunk/org.coode.shell/src/org/coode/shell/view/BeanShellView.java
>> >
>> > (see  http://www.beanshell.org/manual/jconsole.html)
>> >
>> > Unfortunately I'm losing, with the first eval I call resulting in a
>> > null pointer exception.
>> > I expect I don't know how to set up the top level loop to run with the
>> > JConsole streams.
>> >
>> > Can anyone help?
>> >
>> > Thanks,
>> > Alan
>> >
>>
>> _______________________________________________
>> armedbear-devel mailing list
>> armedbear-devel <at> common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>
>
Mark Evenson | 2 Apr 2010 10:59
Picon
Favicon

Re: [armedbear-devel] Proposal for URL to be used as Pathnames

On 4/1/10 5:08 AM, Alan Ruttenberg wrote:
> On Mon, Mar 29, 2010 at 5:07 AM, Mark Evenson<evenson <at> panix.com>  wrote:
[…]
>>  At the moment I'm favoring just implementing such
>> a specializer for "http" and "bundle", creating a protocol for a user to
>> add a specializer, and calling it a day.
>
> + ftp, https, urn, info would all be common in my world.

I currently intend to only implement URIs that can be dereferenced with 
respect to the network authority, which is why I call these things "URL 
pathnames".  Something like "urn" or "info" that needs a resolution 
mechanism are not such good fits for CL Pathnames as far as I can tell, 
as the primary motivation here is to get LOAD and OPEN working for 
objects that java.net.URL (and its extensions via 
java.net.URLStreamHandler) can construct.  I think if we want real URIs, 
I think we should look at using [PURI][1] as I don't think that 
java.net.URI has a schema specific escaping mechanism.  If I implemented 
a method to convert from PURI <--> ABCL Pathname where possible, what 
that be suitable for your needs.

[1]: http://puri.b9.com/

> btw, I'm not sure mixing the authority and port is the best choice -
> they tend to be separate items.

As I understand it "authority" is "host" plus (optional or implied) 
"port".  I intend to implement SETFable functions like URL-PATHNAME-PORT 
URL-PATHNAME-AUTHORITY, URL-PATHNAME-HOST to allow the user to 
manipulate this value.

> Also, how to do fragments ("#anchor") and queries (?q=blah)  for http URIs?

A good question for which I'm not entirely happy with my current answer: 
  just incorporate them in NAME, while providing functions like 
URL-PATHNAME-QUERY and URL-PATHNAME-FRAGMENT to allow manipulation.  The 
other possibility I considered was somehow overloading the information 
in TYPE (make TYPE a LIST?) but that seems to have ambiguity problems as 
well.

>> Do we want the namestring to always be the encoded form?  I was planning
>> to have the namestring be what the user used to create the URL-PATHNAME,
>> but always encode before going to the network.  I need to think about
>> this more.
>
> It's a good question. The thing is that with an http URI you want to
> be able to format it for inclusion in a web page, or to execute an
> http get on it. So you need to access the encoded form in an easy way.
> I'm leaning to namestring as the way of retrieving that, but I suppose
> it doesn't matter as long as their's some function.

We'll make functions then.  I suppose we need four:  two variants to 
handle the inputs of string or pathname crossed with decoding or encoding.

[…]

> I hadn't thought about wild cards at all. Maybe the use of logical
> pathnames for this is overambitious and I should think of this
> facility for URLs and retain my current system for dealing with URIs.
>
> http://mumble.net:8080/svn/lsw/trunk/util/namespace.lisp
> http://mumble.net:8080/svn/lsw/trunk/util/uri.lisp

My preference would be to get de-referencable URIs (aka URLs) working 
first, and then look at implementing further stuff on top of that.  I 
believe that sorting out how to handle such things probably be handled 
in libraries external to ABCL.  I think that as long as we can get 
'http', 'https', 'ftp', and 'bundle' URLs working with LOAD and OPEN 
(and MERGE-PATHNAME, PROBE-FILE, MATCH-PATHAME-P, etc.), we're going to 
cover most of the usage out there.

--

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."
Mark Evenson | 2 Apr 2010 15:31
Picon
Favicon

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?

On 4/2/10 5:25 AM, Alan Ruttenberg wrote:
[…]

> WARNING: No architecture feature found in (POWERPC PPC X86 X86-64
> AMD64 I686 I586 I486 PC386 IAPX386 SPARC64 SPARC HPPA64 HPPA PENTIUM3
> PENTIUM4).

I don't think this is a problem, as it is the same message that one 
normally gets when starting up SLIME with ABCL.

> If I (require 'asdf) instead instead get
>
> "Starting up protege lisp interpreter"
> ; Loading stream ...
> ;   Loading stream ...
> ;   Loaded stream (0.016 seconds)
> Debugger invoked on condition of type TYPE-ERROR:
>    org.armedbear.lisp.Lisp$unboundValue <at> ad8437
> [1] FORMAT(1):

I don't get to that error instead when I invoke 
Interpreter.createDefaultInstance() with {"--init", "(require \'asdf)"} 
as parameter, my Protege instance just quits.  I built my Protege from 
the SVN sources on trunk, so maybe I have some other instability. 
Advice on how to create a better build environment or an explanation of 
how you are running Protege here would be welcome.

> Hmm. Something with special binding?

I suspect this is more of an undiagnosed problem in loading in an OSGi 
context, as I know that *LISP-HOME* is nil, so I think something is 
bombing out in reaction to that in trying to autoload more code.  I 
patched what code I could find to get abcl.jar to load, but we never 
tried to do anything useful with the code, so I am expecting that we are 
running into untested problems with running from an OSGi bundle

[…]

>>>> I'm trying to set up a lisp shell inside protege, by copy pasting from
>>>> the bean shell example they have:
>>>>
>>>>
>>>> http://code.google.com/p/co-ode-owl-plugins/source/browse/trunk/org.coode.shell/src/org/coode/shell/view/BeanShellView.java
>>>>
>>>> (see  http://www.beanshell.org/manual/jconsole.html)

[…]

Did you get JConsole to work outside of OSGi? That would be my next step 
in investigating this, as the console.getInputStream() call you are 
making to set the Java standard input doesn't seem to be working.  Do 
you have a copy of the source for bsh-2.0b4?  It seems to be unavailable 
from what I can find out.

--

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."
Alan Ruttenberg | 2 Apr 2010 18:11
Picon
Gravatar

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?

On Fri, Apr 2, 2010 at 9:31 AM, Mark Evenson <evenson <at> panix.com> wrote:
> On 4/2/10 5:25 AM, Alan Ruttenberg wrote:
> […]
>
>> WARNING: No architecture feature found in (POWERPC PPC X86 X86-64
>> AMD64 I686 I586 I486 PC386 IAPX386 SPARC64 SPARC HPPA64 HPPA PENTIUM3
>> PENTIUM4).
>
> I don't think this is a problem, as it is the same message that one
> normally gets when starting up SLIME with ABCL.

Yes - the point was that when running inside protege I got an unbound
variable error before the list was printed.

>
>> If I (require 'asdf) instead instead get
>>
>> "Starting up protege lisp interpreter"
>> ; Loading stream ...
>> ;   Loading stream ...
>> ;   Loaded stream (0.016 seconds)
>> Debugger invoked on condition of type TYPE-ERROR:
>>    org.armedbear.lisp.Lisp$unboundValue <at> ad8437
>> [1] FORMAT(1):
>
> I don't get to that error instead when I invoke
> Interpreter.createDefaultInstance() with {"--init", "(require \'asdf)"}
> as parameter, my Protege instance just quits.  I built my Protege from
> the SVN sources on trunk, so maybe I have some other instability.
> Advice on how to create a better build environment or an explanation of
> how you are running Protege here would be welcome.

Don't you need "--eval" before the require?

>
>> Hmm. Something with special binding?
>
> I suspect this is more of an undiagnosed problem in loading in an OSGi
> context, as I know that *LISP-HOME* is nil, so I think something is
> bombing out in reaction to that in trying to autoload more code.  I
> patched what code I could find to get abcl.jar to load, but we never
> tried to do anything useful with the code, so I am expecting that we are
> running into untested problems with running from an OSGi bundle
>
>
> […]
>
>>>>> I'm trying to set up a lisp shell inside protege, by copy pasting from
>>>>> the bean shell example they have:
>>>>>
>>>>>
>>>>> http://code.google.com/p/co-ode-owl-plugins/source/browse/trunk/org.coode.shell/src/org/coode/shell/view/BeanShellView.java
>>>>>
>>>>> (see  http://www.beanshell.org/manual/jconsole.html)
>
> […]
>
> Did you get JConsole to work outside of OSGi?

Haven't. I think that's what Doug is trying. He knows about the input
problem and has a theory, but I haven't heard back yet from him. Will
send his example, which uses the larkc/abcl.

> That would be my next step
> in investigating this, as the console.getInputStream() call you are
> making to set the Java standard input doesn't seem to be working.

Hmm. I think they advertise getReader. Doug pointed out that method. I
can poke at that.
I don't know for Readers versus InputStreams, but it looks like abcl
likes the latter.

>  Do  you have a copy of the source for bsh-2.0b4?  It seems to be unavailable
> from what I can find out.

Here? http://ikayzo.org/svn/beanshell/BeanShell/
Alan Ruttenberg | 2 Apr 2010 22:26
Picon
Gravatar

Re: [armedbear-devel] lisp interpreter inside a beanshell JConsole?



On Fri, Apr 2, 2010 at 12:11 PM, Alan Ruttenberg <alanruttenberg <at> gmail.com> wrote:
> That would be my next step
> in investigating this, as the console.getInputStream() call you are
> making to set the Java standard input doesn't seem to be working.

Hmm. I think they advertise getReader. Doug pointed out that method. I
can poke at that.
I don't know for Readers versus InputStreams, but it looks like abcl
likes the latter.

So two things.
1) Something definitely wrong with initialization. If the first thing I do is (print *standard-input*) I get an unbound variable error.
2) Somebody's confused about something. If I start with eval (loop do (print (read-char))) I get printouts as if it's reading unicode escape sequences

Armed Bear Common Lisp 0.20.0-dev
Java 1.5.0_19 Apple Inc.
Java HotSpot(TM) Client VM
Low-level initialization completed in 0.0 seconds.
Startup completed in 0.486 seconds.

"Starting up protege lisp interpreter" 
; Loading stream ...
;   Loading stream ...
;   Loaded stream (0.0050 seconds)
; Loaded stream (0.121 seconds)
a

#\\ 
#\u 
#\0 
#\0 
#\6 
#\1 
#\\ 
#\u 
#\0 
#\0 
#\0 
b
#\a 
#\\ 
#\u 
#\0 
#\0 
#\6 
#\2 
#\\ 
#\u 
#\0 
#\0 
#\0 

-Alan
_______________________________________________
armedbear-devel mailing list
armedbear-devel <at> common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
Reinhard Oldenburg | 3 Apr 2010 00:33
Picon
Picon

[armedbear-devel] Loading from jar - status

Dear ABCL-Team,

some time a go the theme of loading compiled files from jar-archives has 
been discussed on this list but somehow I missed the final conclusion. 
There seems to be no example or documentaion of this feature. Especially 
I'm interested in loading Maxima from a jar file - is this possible?

Yours,
Reinhard Oldenburg

Gmane