Examples don't work

5 views
Skip to first unread message

cmalune

unread,
Nov 4, 2009, 8:34:08 AM11/4/09
to [Core-serveR]
Hey,

I finally managed to install Core Server after having some problems:

* After the src/vars.lisp file compiles, you have to interrupt and
then restart with "accept compilation success".
* I've only managed to get this to work on Ubuntu 9.04 with libev from
SVN. When I tried on Ubuntu 9.10 with libev 3.8, or the libev in the
repositories, all requested pages are blank - even if they have been
appropriately dispatched.
* However the above was tried when I did: (defmethod validate-
superclass (standard-method class+) t) to get around the start.lisp
problem, instead of simply replacing (defclass server) with (defclass+
server) - the latter worked.
* None of the examples seem to work, for example the javascript
examples generate bad javascript. And the blog example doesn't seem to
recognise the username and password. Is this supposed to be the case
(is everything broken??)

Thanks

Aycan iRiCAN

unread,
Nov 4, 2009, 10:46:43 AM11/4/09
to core-...@googlegroups.com
On Wed, 2009-11-04 at 05:34 -0800, cmalune wrote:
> Hey,
>
> I finally managed to install Core Server after having some problems:
>
> * After the src/vars.lisp file compiles, you have to interrupt and
> then restart with "accept compilation success".
> * I've only managed to get this to work on Ubuntu 9.04 with libev from
> SVN. When I tried on Ubuntu 9.10 with libev 3.8, or the libev in the
> repositories, all requested pages are blank - even if they have been
> appropriately dispatched.

I think I will remove libev codes from the repository, it was an
experiment. Thanks for reporting.

> * However the above was tried when I did: (defmethod validate-
> superclass (standard-method class+) t) to get around the start.lisp
> problem, instead of simply replacing (defclass server) with (defclass+
> server) - the latter worked.

You should better use defclass+.

> * None of the examples seem to work, for example the javascript
> examples generate bad javascript. And the blog example doesn't seem to
> recognise the username and password. Is this supposed to be the case
> (is everything broken??)

I'll try to fix examples as soon as possible. We have greatly improved
the javascript methodology and I think it's time to fix examples.

--
aycan

Edward Tate

unread,
Nov 4, 2009, 11:18:12 AM11/4/09
to core-...@googlegroups.com
Hey,

I wanted to get started using & contributing to Core Server but I'm not sure exactly which reference is best at this point. Have you got an example of the new javascript methodology, or something that demonstrates how to write a basic app using the latest source? :)

I think using libev is a good idea personally, since its damn fast. :) It works for me using libev from svn on ubuntu 9.04.

Thanks

cmalune

unread,
Nov 4, 2009, 12:58:06 PM11/4/09
to [Core-serveR]
FYI, I just got home and tried fixing things on Ubuntu 9.10, but the
server still responds nothing. No core-server.log is generated. When I
browser to http://localhost:8080/ I just get no response. :( This was
with me compiling libev from svn and also using class+ fix in the
start script.

Aycan iRiCAN

unread,
Nov 4, 2009, 6:35:56 PM11/4/09
to core-...@googlegroups.com

Thu Nov 5 01:28:30 EET 2009 aycan....@core.gen.tr
* Fixes to
http://groups.google.com/group/core-server/browse_thread/thread/16200d2507f09f17

Thu Nov 5 01:01:45 EET 2009 aycan....@core.gen.tr
* fixed blog example.
- fixed tinymce link
- added object-with-id superclass
- fixed init-database function.

Wed Nov 4 17:58:54 EET 2009 aycan....@core.gen.tr
* fixed start.lisp path in install.sh

For the blog example you should invoke (init-database *app*) to populate
database with default users. See comments at the top.

Evrim also fixed send/suspend problems and they're included in this
patch bundle.

Please check out other examples and report broken ones.

Cheerz,

--
aycan

Aycan iRiCAN

unread,
Nov 4, 2009, 6:50:31 PM11/4/09
to core-...@googlegroups.com
On Thu, 2009-11-05 at 01:35 +0200, Aycan iRiCAN wrote:
> On Wed, 2009-11-04 at 09:58 -0800, cmalune wrote:
> > FYI, I just got home and tried fixing things on Ubuntu 9.10, but the
> > server still responds nothing. No core-server.log is generated. When I
> > browser to http://localhost:8080/ I just get no response. :( This was
> > with me compiling libev from svn and also using class+ fix in the
> > start script.
>
> Thu Nov 5 01:28:30 EET 2009 aycan....@core.gen.tr
> * Fixes to
> http://groups.google.com/group/core-server/browse_thread/thread/16200d2507f09f17
>
> Thu Nov 5 01:01:45 EET 2009 aycan....@core.gen.tr
> * fixed blog example.
> - fixed tinymce link
> - added object-with-id superclass
> - fixed init-database function.
>
> Wed Nov 4 17:58:54 EET 2009 aycan....@core.gen.tr
> * fixed start.lisp path in install.sh

Thu Nov 5 01:46:05 EET 2009
aycan....@core.gen.tr
* more fixes to html stream, defhandler does not imply send/suspend
anymore, you should wrap continations with send/suspend.
Shall I push this patch? (1/2) [ynWvpxdaqjk], or ? for help: y
Thu Nov 5 01:47:47 EET 2009 aycan....@core.gen.tr
* wrap web-display with send/suspend.

Fixed two more issues.

--
aycan

zekUs

unread,
Nov 5, 2009, 4:37:01 AM11/5/09
to [Core-serveR]
i am testing all examples. here is the results (javascript errors from
firebug):
addressbook.lisp: ok.

file-upload.lisp: ok.

js-components.lisp:
handler: component1.html: invalid property id {}:
document.getElementById('component1')\n
dict.html: invalid property id {}: document.getElementById
('dict')\n
dict2.html: syntax error return k1100(return false);\n

pinger.lisp: Execution of "/bin/ping " failed with error code: 2

relations.lisp: defcrud macro produces methods with class-name.method-
name convention. but example uses "-" as separetor. when i replace "-"
with "." the example works fine.

blog.lisp: ok.

guestbook.lisp: ok.

hello.lisp: ok.

jsguestbook.lisp: syntax error return k1102(return false);\n

links.lisp: i think this is an old example. no defhandler.

poleposition.lisp: i did not test this one.

quiz.lisp: like links.lisp but when i tried /quiz/main/ url i have an
unbound symbol http-context error.

websum.lisp: ok.

yeah that's all.

On 5 Kasım, 01:35, Aycan iRiCAN <aycan.iri...@core.gen.tr> wrote:
> On Wed, 2009-11-04 at 09:58 -0800, cmalune wrote:
> > FYI, I just got home and tried fixing things on Ubuntu 9.10, but the
> > server still responds nothing. No core-server.log is generated. When I
> > browser tohttp://localhost:8080/I just get no response. :( This was
> > with me compiling libev from svn and also using class+ fix in the
> > start script.
>
> Thu Nov  5 01:28:30 EET 2009  aycan.iri...@core.gen.tr
>   * Fixes tohttp://groups.google.com/group/core-server/browse_thread/thread/16200...
>
> Thu Nov  5 01:01:45 EET 2009  aycan.iri...@core.gen.tr
>   * fixed blog example.
>    - fixed tinymce link
>    - added object-with-id superclass
>    - fixed init-database function.
>
> Wed Nov  4 17:58:54 EET 2009  aycan.iri...@core.gen.tr

cmalune

unread,
Nov 5, 2009, 4:41:41 AM11/5/09
to [Core-serveR]
Just tried the examples after the latest pull, here were the results
(this was on ubuntu 9.04):

* The blog example won't save when I click save when adding a new blog
post.
* The file upload example doesn't answer correctly (when you click
save or cancel once you have submitted a picture).
* The Hello World example works. :)
* The jsguestbook example is blank, the javascript has an error.
* The normal guestbook example works.
* The js-components example is either blank, or doesn't work.

From what I could gather there are problems with answering the call/
cc, and there are problems in the javascript wrt to generating dom
elements.

Thanks for the fixes thus far!! :)


On Nov 5, 12:50 am, Aycan iRiCAN <aycan.iri...@core.gen.tr> wrote:
> On Thu, 2009-11-05 at 01:35 +0200, Aycan iRiCAN wrote:
> > On Wed, 2009-11-04 at 09:58 -0800, cmalune wrote:
> > > FYI, I just got home and tried fixing things on Ubuntu 9.10, but the
> > > server still responds nothing. No core-server.log is generated. When I
> > > browser tohttp://localhost:8080/I just get no response. :( This was
> > > with me compiling libev from svn and also using class+ fix in the
> > > start script.
>
> > Thu Nov  5 01:28:30 EET 2009  aycan.iri...@core.gen.tr
> >   * Fixes to
> >http://groups.google.com/group/core-server/browse_thread/thread/16200...
>
> > Thu Nov  5 01:01:45 EET 2009  aycan.iri...@core.gen.tr
> >   * fixed blog example.
> >    - fixed tinymce link
> >    - added object-with-id superclass
> >    - fixed init-database function.
>
> > Wed Nov  4 17:58:54 EET 2009  aycan.iri...@core.gen.tr
> >   * fixed start.lisp path in install.sh
>
> Thu Nov  5 01:46:05 EET 2009
> aycan.iri...@core.gen.tr                          
>   * more fixes to html stream, defhandler does not imply send/suspend
> anymore, you should wrap continations with send/suspend.
> Shall I push this patch? (1/2)  [ynWvpxdaqjk], or ? for help: y
> Thu Nov  5 01:47:47 EET 2009  aycan.iri...@core.gen.tr

evri...@core.gen.tr

unread,
Nov 5, 2009, 12:42:20 PM11/5/09
to core-...@googlegroups.com
Hi,

Please do a darcs pull in the core-server/lib/core-server directory. There
should be fixes to most of the questions below.

evrim.

On Thu, 5 Nov 2009 01:41:41 -0800 (PST), cmalune <cma...@gmail.com>
wrote:

Edward Tate

unread,
Nov 5, 2009, 4:45:28 PM11/5/09
to core-...@googlegroups.com
Hello,

Just tried a couple of examples:

* jsguestbook is still blank.
* clicking save on blog example gives me this error:
Unknown type of relation slot: #<CLASS+-EFFECTIVE-SLOT-DEFINITION BLOG::AUTHOR>
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [IGNORE-ERROR] Ignore the error and return (values)
 1: [RETRY] Retry the funcall
 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "Http Peer Handling Unit" RUNNING {AB8E7C9}>)

Will try more later,
Thanks

Edward Tate

unread,
Nov 5, 2009, 6:16:48 PM11/5/09
to core-...@googlegroups.com
Also, some REPL output:
SERVER> (with-core-stream (s "")
      (dom-element! s (<:ul (<:li)))
      (return-stream s))
"<>
  <>  </></>"

Btw this is on Ubuntu 9.10 with the latest libev

Thanks

evri...@core.gen.tr

unread,
Nov 5, 2009, 6:51:05 PM11/5/09
to core-...@googlegroups.com
On Fri, 6 Nov 2009 00:16:48 +0100, Edward Tate <cma...@gmail.com> wrote:
> Also, some REPL output:
> SERVER> (with-core-stream (s "")
> (dom-element! s (<:ul (<:li)))
> (return-stream s))
> "<>
> <> </></>"
>
> Btw this is on Ubuntu 9.10 with the latest libev
>

Hi,

The current usage is:

SERVER> (with-core-stream (s "")
(write-stream (make-html-stream (make-indented-stream s)) (<:ul
(<:li)))
(return-stream s))
"<ul>
<li>
</li>
</ul>"


But i've fixed the old functor interface for your sake, it's in the
*repo*.

evrim.

Edward Tate

unread,
Nov 6, 2009, 2:37:03 AM11/6/09
to core-...@googlegroups.com
Hey,

The problems I encountered were with the latest source. Is this new functor interface documented anywhere or are there any examples of it that work?

So last night the examples didn't work with the latest source.

I deleted old fasls and did a full recompile with the latest source and now I get this whilst compiling html.lisp:
Final object pointer 0x14ff6fc4, start 0x14ff6fc4, end 0x14ff6f48
fatal error encountered in SBCL pid 12346(tid 3085207232):
GC invariant lost, file "gc-common.c", line 211

Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb>

This is with SBCL 1.0.29.11, I will use 1.0.32 later and see what happens next.

Btw are you pulling from a different repo than me? (http://labs.core.gen.tr/repos/core-server/)

Thanks

Aycan iRiCAN

unread,
Nov 6, 2009, 7:35:13 AM11/6/09
to core-...@googlegroups.com
On Fri, 2009-11-06 at 08:37 +0100, Edward Tate wrote:
> Hey,
>
> The problems I encountered were with the latest source. Is this new
> functor interface documented anywhere or are there any examples of it
> that work?
>
> So last night the examples didn't work with the latest source.
>
> I deleted old fasls and did a full recompile with the latest source
> and now I get this whilst compiling html.lisp:
> Final object pointer 0x14ff6fc4, start 0x14ff6fc4, end 0x14ff6f48
> fatal error encountered in SBCL pid 12346(tid 3085207232):
> GC invariant lost, file "gc-common.c", line 211
>
> Welcome to LDB, a low-level debugger for the Lisp runtime environment.
> ldb>

Could you please give more information about your environment? We fixed
each example, tested with firefox 3.5 and had no problem so far.

> This is with SBCL 1.0.29.11, I will use 1.0.32 later and see what
> happens next.

I'm using 1.0.18 and had no problem.

aycan@fgt:~$ sbcl --version
SBCL 1.0.18.debian


> Btw are you pulling from a different repo than me?
> (http://labs.core.gen.tr/repos/core-server/)

You're pulling from the right repo.

--
aycan

Edward Tate

unread,
Nov 6, 2009, 8:10:53 AM11/6/09
to core-...@googlegroups.com
Hey,

Testing was on two different environments:

On Ubuntu 9.10 I used 1.0.29.11 (the default that comes with debian) and got LDB error with the latest source. I deleted the old fasl files but still no luck. The jsguestbook example is blank. Initially I used libev from apt repo, but this failed whilst compiling, so I installed libev from SVN and the web server worked this time. (Before the patches the server didn't work in this environment)

On Ubuntu 9.04 I used 1.0.32, and got no LDB error with the latest source. The jsguestbook example is blank. I used libev from apt, but this failed whilst compiling, so I used libev from SVN here too. The web server seems works, but not for jsguestbook example (which remains blank).

What environment are you guys using?

Thanks

Aycan iRiCAN

unread,
Nov 6, 2009, 11:26:55 AM11/6/09
to core-...@googlegroups.com
On Fri, 2009-11-06 at 14:10 +0100, Edward Tate wrote:
> Hey,
>
> Testing was on two different environments:
>
> On Ubuntu 9.10 I used 1.0.29.11 (the default that comes with debian)
> and got LDB error with the latest source. I deleted the old fasl files
> but still no luck. The jsguestbook example is blank. Initially I used
> libev from apt repo, but this failed whilst compiling, so I installed
> libev from SVN and the web server worked this time. (Before the
> patches the server didn't work in this environment)
>
> On Ubuntu 9.04 I used 1.0.32, and got no LDB error with the latest
> source. The jsguestbook example is blank. I used libev from apt, but
> this failed whilst compiling, so I used libev from SVN here too. The
> web server seems works, but not for jsguestbook example (which remains
> blank).
>
> What environment are you guys using?

I am using Debian Stable environment with 64bit kernel. Could you please
pull latest patches and retry. We just pushed a patch for the blank page
problem (which is related with console.debug). Also we commented out
experimental io codes (this removes libev dependency but we still depend
on cffi).

--
aycan

Edward Tate

unread,
Nov 6, 2009, 12:18:36 PM11/6/09
to core-...@googlegroups.com
Hey,

I just pulled the latest patches on Ubuntu 9.04, I loaded the demo and then went to http://localhost:8080/jsguestbook/index.html, and firebug gave me no errors but initially I got a blank screen. When I refreshed the page I got the guestbook! Maybe firefox cached it or something? Anyway I tried going away from the page and back again and it persisted in working so it looks successful!

Thanks !!! :D

Edward Tate

unread,
Nov 6, 2009, 12:21:18 PM11/6/09
to core-...@googlegroups.com
Uhoh,

I just restarted firefox, and it gave me the blank screen again. When I refreshed the page it worked. This is the output I got:

* (load "/home/et4te/core/examples/jsguestbook.lisp")
STYLE-WARNING: Implicitly creating new generic function MESSAGE.LIST.
STYLE-WARNING: Implicitly creating new generic function MESSAGE.QUERY.
STYLE-WARNING: Implicitly creating new generic function MESSAGE.FIND.
STYLE-WARNING: Implicitly creating new generic function MESSAGE.ADD.
STYLE-WARNING: Implicitly creating new generic function MESSAGE.UPDATE.
STYLE-WARNING: Implicitly creating new generic function MESSAGE.DELETE.
STYLE-WARNING: Implicitly creating new generic function SEND-MESSAGE/JS.
STYLE-WARNING: Implicitly creating new generic function GET-MESSAGES/JS.
STYLE-WARNING: Implicitly creating new generic function ADD-FORM/JS.
STYLE-WARNING: Implicitly creating new generic function SHOW-GUESTBOOK/JS.
STYLE-WARNING: redefining INIT in DEFGENERIC
STYLE-WARNING: Implicitly creating new generic function INDEX.HTML.

T
* Compiling constructor for GUESTBOOK-COMPONENT.
STYLE-WARNING:
   Implicitly creating new generic function TR.GEN.CORE.SERVER::%COMPONENT!.
STYLE-WARNING: redefining TR.GEN.CORE.SERVER:COMPONENT! in DEFGENERIC

and in core-server.log
11/06 18:19 EVAL-REQUEST request uri: #<URI NIL://NIL:NIL@NIL:NIL/(favicon.ico)?# {AA21DC1}>
11/06 18:20 HTTP-APPLICATION fqdn: jsguestbook, static-handler:: #<URI NIL://NIL:NIL@NIL:NIL/(index.html)?# {AA48FC1}>
11/06 18:20 HTTP-APPLICATION fqdn: jsguestbook, static-handler:: #<URI NIL://NIL:NIL@NIL:NIL/(library.core)?# {AB26E69}>
11/06 18:20 HTTP-APPLICATION fqdn: jsguestbook, k-url: act-XKgBjChE2286

Thanks

evri...@core.gen.tr

unread,
Nov 6, 2009, 9:35:28 PM11/6/09
to core-...@googlegroups.com
On Fri, 6 Nov 2009 18:21:18 +0100, Edward Tate <cma...@gmail.com> wrote:
> Uhoh,
>
> I just restarted firefox, and it gave me the blank screen again. When I
> refreshed the page it worked. This is the output I got:
>
> * Compiling constructor for GUESTBOOK-COMPONENT.
> STYLE-WARNING:
> Implicitly creating new generic function
> TR.GEN.CORE.SERVER::%COMPONENT!.
> STYLE-WARNING: redefining TR.GEN.CORE.SERVER:COMPONENT! in DEFGENERIC


Hi,

When a component defined via defcomponent or defmethod, components
javascript contructor is not defined. Its is compiled when a request need
to render a component. This takes a few seconds.

evrim.

Reply all
Reply to author
Forward
0 new messages