This list is closed, nobody may subscribe to it.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(23) |
Oct
(20) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(2) |
Jun
(14) |
Jul
(1) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
(29) |
| 2002 |
Jan
|
Feb
(43) |
Mar
(2) |
Apr
(9) |
May
(15) |
Jun
|
Jul
(10) |
Aug
(13) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(6) |
| 2003 |
Jan
(6) |
Feb
(9) |
Mar
(18) |
Apr
(1) |
May
(6) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
(25) |
Dec
(18) |
| 2004 |
Jan
(30) |
Feb
(12) |
Mar
(6) |
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
(2) |
| 2008 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Per B. <pe...@bo...> - 2009-05-12 23:09:12
|
The latest trunk (soon to be Kawa 1.10) has some nice multi-language servlet support. For all the details, see: http://www.gnu.org/software/kawa/server/auto-servlet.html If the request is for a file with a known extension, such as ".brl", then that file will be compiled as a "module" in that language. Otherwise, it will look at the first line in the file. For example, if the contents of the file "hello" or "hello.html" is: <!-- Generated by kawa:brl --> <b>The result is [(list (symbol->string 'b) 10) (html:i "<ii>")].</b> Then Kawa knows this is a BRL file. This provides a simple way to create servlets with "clean" URLs. Kawa compiles and caches each module. If you modify it, KawaPageServelet will automtically re-compile it. One experimental BRL language change that I think is useful (though if it causes compatibility problems we can change it back): This version of BRL distinguishes between "foo" and ]foo[. Special HTML characheters are escaped in "foo", but not in ]foo[ - and not in the outermost layer outside square brackets. To distinguish these, ]foo[ gets parsed as an instance of the special UnescapedData class - which does implement java.lang.CharSequence, so it acts like a string in most respects. This re-implementation of BRL does not support all the features of "true" BRL, just the basic functionality. For example reading sitedefs.scm isn't implemented, but should be easy to add, since "dependencies" are supported. Neither define-input, define-cgi, or define-cookie are implemented yet. But I'm interested in working with the BRL community to "port" the necessary functionality. -- --Per Bothner pe...@bo... http://per.bothner.com/ |
|
From: Per B. <pe...@bo...> - 2009-05-12 22:52:22
|
On 05/12/2009 03:39 PM, Per Bothner wrote: > This re-implementation of BRL does not support all the > features of "true" BRL, just the basic functionality. > Neither define-input, define-cgi, or define-cookie are > implemented yet. It looks like: (define-input word) is more-or-less the same as: (define word (request-parameter 'word '())) so define-input should be easy to take care of. -- --Per Bothner pe...@bo... http://per.bothner.com/ |
|
From: Jake M. <jac...@gm...> - 2008-02-08 15:07:35
|
Thanks Bruce. Is there any way to obtain the brl-context from within sitedefs.scm, without requiring that the brl page pass it in as an argument? I tried a macro that contains (eval 'brl-context), which works in the kawa repl to obtain the value of an in-scope variable, but does not work in a brl page. - Jake On Feb 8, 2008 8:34 AM, Bruce Lewis <bl...@ea...> wrote: > This is a bug in BRL that would be hard to fix, but you can work around > it as follows: > > (silent (test-define x "y")) > > The problem is that top-level expressions have their values displayed, > so > (test-define x "y") > Becomes > (display (define x "y")) > > The variable doesn't get bound that way. > > Known Scheme syntax like define are special-cased in progfun.scm. > > The "silent" syntax in a BRL page becomes > > (begin > (define x "y") > "") > > The variable does get bound that way. > > The solution would be to reimplement BRL using the BRL-language part of > Kawa that Per created some time ago, but I don't know when I might get > to that. In the meantime the above workaround should do it. You can > put multiple expressions within one (silent ...). > > |
|
From: Bruce L. <bl...@ea...> - 2008-02-08 13:34:35
|
This is a bug in BRL that would be hard to fix, but you can work around it as follows: (silent (test-define x "y")) The problem is that top-level expressions have their values displayed, so (test-define x "y") Becomes (display (define x "y")) The variable doesn't get bound that way. Known Scheme syntax like define are special-cased in progfun.scm. The "silent" syntax in a BRL page becomes (begin (define x "y") "") The variable does get bound that way. The solution would be to reimplement BRL using the BRL-language part of Kawa that Per created some time ago, but I don't know when I might get to that. In the meantime the above workaround should do it. You can put multiple expressions within one (silent ...). |
|
From: Bruce L. <bl...@ea...> - 2008-02-08 13:01:03
|
It looks like you're doing everything right. It's probably a BRL bug. I'll see if I can take a look today.
----- Original Message -----
From: brl...@li... <brl...@li...>
To: brl user mailing list <brl...@li...>; kaw...@so... <kaw...@so...>
Sent: Fri Feb 08 05:52:21 2008
Subject: define-syntax containing define failing in brl page
Hello. The following is not working in a brl page, but does work at
the kawa repl, so I wondered if this was a bug in brl or if I'm doing
something wrong.
In sitedefs.scm, I have:
(define-syntax test-define
(syntax-rules ()
((test-define var value)
(define var value))))
In the brl page I have:
[(test-define x "y")]
x is [x]
When I reload the page, I get the error
gnu.mapping.UnboundSymbol: Unbound symbol x
at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:638)
at gnu.expr.Interpreter.getSymbolValue(Interpreter.java:645)
When I replace the word 'test-define' with 'define' in the brl page,
it works as expected, saying "x is y", but the test-define version
does not work.
At the kawa repl, the test-define version works. Any thoughts?
- Jake
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
brl-users mailing list
brl...@li...
https://lists.sourceforge.net/lists/listinfo/brl-users
|
|
From: Jake M. <jac...@gm...> - 2008-02-08 10:52:17
|
Hello. The following is not working in a brl page, but does work at
the kawa repl, so I wondered if this was a bug in brl or if I'm doing
something wrong.
In sitedefs.scm, I have:
(define-syntax test-define
(syntax-rules ()
((test-define var value)
(define var value))))
In the brl page I have:
[(test-define x "y")]
x is [x]
When I reload the page, I get the error
gnu.mapping.UnboundSymbol: Unbound symbol x
at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:638)
at gnu.expr.Interpreter.getSymbolValue(Interpreter.java:645)
When I replace the word 'test-define' with 'define' in the brl page,
it works as expected, saying "x is y", but the test-define version
does not work.
At the kawa repl, the test-define version works. Any thoughts?
- Jake
|
|
From: Jake M. <jac...@gm...> - 2008-02-07 21:12:27
|
Hello. I'd like to use define-syntax forms in a brl page, sitedefs.scm or both. Eventually I'd move them into their own compiled modules but I don't want to recompile during development and testing. Is this possible? I tried one but brl/kawa complained that no such syntax existed when I called it from within the page. Also, does anyone have an ant task or other such thing that makes it easy to recompile a kawa directory tree? - Jake |
|
From: Bruce L. <bl...@ea...> - 2008-02-06 13:35:47
|
To get square brackets to be treated like quotes, here are a couple of
useful elisp functions:
(defun brl-scheme-square-brl ()
"Cause square brackets to be treated like quotes in Scheme code"
(interactive)
(modify-syntax-entry ?\] "|" scheme-mode-syntax-table)
(modify-syntax-entry ?\[ "|" scheme-mode-syntax-table))
(defun brl-scheme-square-normal ()
"Cause square brackets to be treated like parentheses in Scheme code"
(interactive)
(modify-syntax-entry ?\] ")" scheme-mode-syntax-table)
(modify-syntax-entry ?\[ "(" scheme-mode-syntax-table))
Quack mode might have its own syntax table separate from
scheme-mode-syntax-table. Change the functions as appropriate.
I actually never use a BRL REPL, but kawa has command line switches that
start it up with a somewhat incomplete BRL mode. If you load
brl-global.scm it might be complete after that, but I haven't tried it.
Changing a page and reloading in a browser is what I always do.
-----Original Message-----
From: brl...@li...
[mailto:brl...@li...] On Behalf Of Jake Miles
Sent: Wednesday, February 06, 2008 12:15 AM
To: brl user mailing list
Subject: running brl interpreter in emacs
Hello. I'm trying to get up and running with brl. It would be great
to be able to run a scheme process in emacs as I usually do, so I can
write functions and call them and test them as I go, but that uses the
brl reader so I can use the ][ syntax for strings. Has anyone done
this that could help me out?
Also, I find that the quack emacs mode makes it impossible to write
brl code because it treats open/close parens and square brackets as
the same thing. Does anyone have an emacs setup they recommend for
brl development?
- Jake
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
brl-users mailing list
brl...@li...
https://lists.sourceforge.net/lists/listinfo/brl-users
|
|
From: Jake M. <jac...@gm...> - 2008-02-06 05:15:10
|
Hello. I'm trying to get up and running with brl. It would be great to be able to run a scheme process in emacs as I usually do, so I can write functions and call them and test them as I go, but that uses the brl reader so I can use the ][ syntax for strings. Has anyone done this that could help me out? Also, I find that the quack emacs mode makes it impossible to write brl code because it treats open/close parens and square brackets as the same thing. Does anyone have an emacs setup they recommend for brl development? - Jake |
|
From: Jake M. <jac...@gm...> - 2007-12-29 16:56:07
|
Hi all. I found the problem. When you set things up like this, where your app is the root (in my case, a virtual host) and not a sub-uri below the root, you have to set the cut-uri servlet parameter to false in web.xml. It says so clearly in web.xml, I just didn't realize it. So in "the real world", if you implement a website in brl, set cut-uri to false. Also, as the brl website mentions on the installation page, when using Tomcat you have to move brl-global.scm and sitedefs.scm out of WEB-INF into some other directory. - Jake On Dec 29, 2007 11:31 AM, Jake Miles <jac...@gm...> wrote: > Hello. I'm trying to get learnbrl running under Tomcat 4 on os x > 10.4. Using Tomcat 4 because that's what my servlet host will be > using (FuturePoint.com - they look good). I've set up learnbrl.local > as a virtual host in /etc/hosts and in tomcat's server.xml, and when I > go to http://learnbrl.local:8080/index.brl I get a brl error page that > says Error: String index out of range: -1. The exception stack trace > is below. Does anyone recognize this situation? I just unpacked > learnbrl.war, haven't touched it. JAVA_HOME is pointing to jdk 1.5. > My CLASSPATH variable is blank at the moment. I know I've run > learnbrl before, but I don't remember what was different. I was using > a different version of tomcat - would that make a difference? > > Thanks for any help. > > - Jake > > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(String.java:1762) > at java.lang.String.substring(String.java:1735) > at gnu.brl.brlsv.getCorrectedURI(brlsv.java:201) > at gnu.brl.brlsv.getPertinentURI(brlsv.java:210) > at gnu.brl.brlsv.doNormal(brlsv.java:260) > at gnu.brl.brlsv.doGet(brlsv.java:181) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) > at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) > at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) > at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) > at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) > at java.lang.Thread.run(Thread.java:613) > |
|
From: Jake M. <jac...@gm...> - 2007-12-29 16:31:00
|
Hello. I'm trying to get learnbrl running under Tomcat 4 on os x 10.4. Using Tomcat 4 because that's what my servlet host will be using (FuturePoint.com - they look good). I've set up learnbrl.local as a virtual host in /etc/hosts and in tomcat's server.xml, and when I go to http://learnbrl.local:8080/index.brl I get a brl error page that says Error: String index out of range: -1. The exception stack trace is below. Does anyone recognize this situation? I just unpacked learnbrl.war, haven't touched it. JAVA_HOME is pointing to jdk 1.5. My CLASSPATH variable is blank at the moment. I know I've run learnbrl before, but I don't remember what was different. I was using a different version of tomcat - would that make a difference? Thanks for any help. - Jake java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1762) at java.lang.String.substring(String.java:1735) at gnu.brl.brlsv.getCorrectedURI(brlsv.java:201) at gnu.brl.brlsv.getPertinentURI(brlsv.java:210) at gnu.brl.brlsv.doNormal(brlsv.java:260) at gnu.brl.brlsv.doGet(brlsv.java:181) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:613) |
|
From: Hoehle, Joerg-C. <Joe...@t-...> - 2007-10-26 14:08:05
|
Hi, [I'm not sure this may get through to brl-users. If not, please forward = it there.] Jake Miles wrote: >I have also tried (load "select") and (load "select.class") at the top >of sitedefs.scm, but they complain that they can't locate the file. I've used nothing else but (load "foo.scm") inside sitedefs.scm and it = has always worked for me. Using java 1.4(?), Tomcat x.y, kawa-1.7 and = brl-2.2.1 some years ago. IIRC, I had as directory structure myapp/WEB-INF/classes/*.scm including sitedefs.scm brl-global.scm and my = .scm files myapp/*.brl myapp/WEB-APP/lib/kawa, brl.jar In *.brl, I never loaded anything. I was just happy with BRL having = everything set up for me. Which is why I never managed to use KRL: The = individual .brl pages relied on all the stuff that sitedefs.scm had = loaded, including Lisp variables shared from one page to the next. With BRL/Kawa, I remember I had trouble when I wanted to use compiled = Scheme files. I worked around it by appending all scheme files into one, = compile that one with Kawa and have the .class files reside inside WEB-INF/classes/foo/bar/xyzname$bla.class (Or I'm confusing things and used that work-around when I wanted to = provide a command line tool, not web pages, written in BRL.) Regards, J=F6rg H=F6hle. |
|
From: Jake M. <jac...@gm...> - 2007-10-25 22:12:19
|
Hi Per. Thanks for the response. Yes, (require <select>) worked! It would be great to be able to lazy-load provided keyword modules as you say, but as long as module-export works in this case (it does), this is all one really needs for modular development and to use pre-compiled code in BRL pages. Thanks very much for the help. I'm a happy Schemer once again. - Jake On 10/25/07, Per Bothner <pe...@bo...> wrote: > > Jake Miles wrote: > > > As a test, I created a select.scm, containing a select function, with > > (provide 'jm-select) at the top of the file. > > Provide has pretty limited functionality: All it does is set a magic > variable so that when cond-expand tests for the feature it reports that > the feature is present. (Or at least that's the intention - not sure > if it works.) It doesn't magically cause the class to be loaded. > > > At the top of my > > sitedefs.scm I have (require 'jm-select). > > Try: > (require <select>) > > I think it shouldn't be too difficult to make provide/require do what > you want. The idea is that that (provide 'jm-select) would compile to > a class or a resource in a special package. For example it might > compile to a class named jm$Mnselect$provides in gnu.kawa.slib. > When require sees (require 'jm-select) it would look for that class, > load it, and use that to load the module class select.class. > > Something for the wishlist ... Though if enough people request the > feature, I can bump up the priority, since it seems simple enough. > -- > --Per Bothner > pe...@bo... http://per.bothner.com/ > |
|
From: Per B. <pe...@bo...> - 2007-10-25 21:23:08
|
Jake Miles wrote: > As a test, I created a select.scm, containing a select function, with > (provide 'jm-select) at the top of the file. Provide has pretty limited functionality: All it does is set a magic variable so that when cond-expand tests for the feature it reports that the feature is present. (Or at least that's the intention - not sure if it works.) It doesn't magically cause the class to be loaded. > At the top of my > sitedefs.scm I have (require 'jm-select). Try: (require <select>) I think it shouldn't be too difficult to make provide/require do what you want. The idea is that that (provide 'jm-select) would compile to a class or a resource in a special package. For example it might compile to a class named jm$Mnselect$provides in gnu.kawa.slib. When require sees (require 'jm-select) it would look for that class, load it, and use that to load the module class select.class. Something for the wishlist ... Though if enough people request the feature, I can bump up the priority, since it seems simple enough. -- --Per Bothner pe...@bo... http://per.bothner.com/ |
|
From: Jake M. <jac...@gm...> - 2007-10-25 20:54:13
|
Hi Bruce. Thanks for the quick response. I had tried that but it isn't
working, which is why I asked. I realize this is probably a Kawa question
and not a BRL question, but if you (or anyone else) can help me resolve this
I'd appreciate it. No matter what combinations of things I try from Kawa's
manual page on modules I can't get this to work.
As a test, I created a select.scm, containing a select function, with
(provide 'jm-select) at the top of the file. At the top of my
sitedefs.scmI have (require 'jm-select). I compiled
select.scm using this command in the command prompt:
java -Xms256m -Xmx256m kawa.repl -d -C select.scm
Then I copy select.class into WEB-INF\classes (I'm on Windows - I'm at
work), restart Tomcat (it doesn't seem to pick up changes without
restarting), and I get an Error: unbound symbol select. In Tomcat's console
I see:
C:\apache-tomcat-6.0.14\webapps\jake-brl-tests\WEB-INF\sitedefs.scm:6:2:unknown
feature name 'jm-select' for 'require'
C:\apache-tomcat-6.0.14\webapps\jake-brl-tests\WEB-INF\sitedefs.scm:52:4:warning
- no method `getRealPath' in
java.lang.Object
Below is the code in detail. Do you see offhand what I'm doing wrong? I
have also tried (load "select") and (load "select.class") at the top of
sitedefs.scm, but they complain that they can't locate the file. Are you
using provide/require or load in your sitedefs.scm?
>From Kawa's manual, provide and require only work at compile time, correct?
Is sitedefs.scm compiled upon initialization or interpreted? If
interpreted, it seems that provide/require wouldn't work.
Thanks for any help. I look forward to a long life of working with Schema
and BRL, as soon as I can get these low-level issues under control.
- Jake
The code in detail:
my select.scm looks like this:
(provide 'jm-select)
(define (select select? list)
(let loop ((in list)
(out '()))
(if (null? in)
(reverse out)
(loop (cdr in)
(if (select? (car in))
(cons (car in) out)
out)))))
My sitedefs.scm looks like this:
(require 'jm-select)
(define my-name "Jake")
(define (odds numbers)
(select odd? numbers))
And my index.brl contains this in the <body> element:
<body>
Hello, my name is [my-name].
[(define numbers '(1 2 4 5 6))]
The odd numbers in [numbers] are [(odds numbers)].
</body>
I'm running under the latest version of Tomcat, using Kawa 1.7 (the one
included in learnbrl.war), on Windows XP.
On 10/25/07, Bruce Lewis <bl...@ea...> wrote:
>
> Just use Kawa's module system to compile your code into modules under
> WEB-INF/classes. Use sitedefs.scm to require them.
>
>
>
>
> ------------------------------
>
> *From:* brl...@li... [mailto:
> brl...@li...] *On Behalf Of *Jake Miles
> *Sent:* Thursday, October 25, 2007 3:46 PM
> *To:* brl user mailing list
> *Subject:* BRL modularity/extensibility/pre-compilation
>
>
>
> Hi all. One thing has always stopped me from using BRL and Scheme for
> general web development, and I wanted to know if there's something I'm
> missing. It seems that the only places you can put scheme code that's
> callable from your BRL pages is in either the pages themselves or in the one
> file sitedefs.scm. Is this true? I'm looking for some solution that lets
> me divide up my code into modules however I wish, most importantly
> separating presentation logic (the pages) from all other logic.
>
> A related concern is that I'd like to be able to develop scheme code and
> compile it into modules/libraries, and then call the compiled functions from
> my BRL pages. Is there any way to do this? I know Kawa provides a
> scheme-to-java interface, and that I could probably call compiled scheme
> code that way, but ideally I'd develop scheme libraries, compile them, and
> then call them as scheme functions from my BRL pages. Is there something
> I'm missing?
>
> For example, the BRL manual mentions SLIB - is there a way to call
> Kawa-compiled SLIB functions from BRL pages? If so, that's the solution I'm
> looking for.
>
> Thanks for any help. I'd love to be able to do all my web development
> using Kawa and BRL.
>
> - Jake
>
>
|
|
From: Bruce L. <bl...@ea...> - 2007-10-25 19:57:36
|
Just use Kawa's module system to compile your code into modules under WEB-INF/classes. Use sitedefs.scm to require them. =20 =20 ________________________________ From: brl...@li... [mailto:brl...@li...] On Behalf Of Jake Miles Sent: Thursday, October 25, 2007 3:46 PM To: brl user mailing list Subject: BRL modularity/extensibility/pre-compilation =20 Hi all. One thing has always stopped me from using BRL and Scheme for general web development, and I wanted to know if there's something I'm missing. It seems that the only places you can put scheme code that's callable from your BRL pages is in either the pages themselves or in the one file sitedefs.scm. Is this true? I'm looking for some solution that lets me divide up my code into modules however I wish, most importantly separating presentation logic (the pages) from all other logic. =20 A related concern is that I'd like to be able to develop scheme code and compile it into modules/libraries, and then call the compiled functions from my BRL pages. Is there any way to do this? I know Kawa provides a scheme-to-java interface, and that I could probably call compiled scheme code that way, but ideally I'd develop scheme libraries, compile them, and then call them as scheme functions from my BRL pages. Is there something I'm missing?=20 For example, the BRL manual mentions SLIB - is there a way to call Kawa-compiled SLIB functions from BRL pages? If so, that's the solution I'm looking for. Thanks for any help. I'd love to be able to do all my web development using Kawa and BRL. =20 - Jake |
|
From: Jake M. <jac...@gm...> - 2007-10-25 19:45:52
|
Hi all. One thing has always stopped me from using BRL and Scheme for general web development, and I wanted to know if there's something I'm missing. It seems that the only places you can put scheme code that's callable from your BRL pages is in either the pages themselves or in the one file sitedefs.scm. Is this true? I'm looking for some solution that lets me divide up my code into modules however I wish, most importantly separating presentation logic (the pages) from all other logic. A related concern is that I'd like to be able to develop scheme code and compile it into modules/libraries, and then call the compiled functions from my BRL pages. Is there any way to do this? I know Kawa provides a scheme-to-java interface, and that I could probably call compiled scheme code that way, but ideally I'd develop scheme libraries, compile them, and then call them as scheme functions from my BRL pages. Is there something I'm missing? For example, the BRL manual mentions SLIB - is there a way to call Kawa-compiled SLIB functions from BRL pages? If so, that's the solution I'm looking for. Thanks for any help. I'd love to be able to do all my web development using Kawa and BRL. - Jake |
|
From: Ben A. <ben...@st...> - 2007-06-25 09:05:30
|
Hello there I would greatly appreciate a small amount of your time to assist with my doctoral research at The University of Newcastle. The research concerns open source licensing and we're seeking developers working on Java projects. The research is supervised, ethics-approved, anonymous and results will be freely available. Participation will also provide a custom licensing report for your project. To learn more, please visit: http://licensing-research.newcastle.edu.au Thanks for reading this email, and I hope you'll consider participating. Best regards Ben Alex (My apologies for being off-topic; this list will not be emailed again) |
|
From: BLewis <bl...@ea...> - 2006-12-15 15:23:47
|
Could you post the test page so I can check the exact same code? Also, what Java version is running on the new server? I wonder if BRL is using a deprecated method that Tomcat no longer supports. Have you checked that JSPs can set session variables on the new server? =20 =20 ________________________________ From: brl...@li... [mailto:brl...@li...] On Behalf Of Fer...@th... Sent: Friday, December 15, 2006 8:49 AM To: brl...@li... Subject: Session no working right =20 Hello, =20 We are moving the applications to a new server. It seems (brl-get-session brl-context) is not working right I put some value in the session and when I retrieve it in the next page, the value is gone. I also tried with a very simple page in which I set the value (#t) and reloading the page, and I always get #f when accessing the property. =20 Tomcat 5.5.17, BRL 2.2.1 and Kawa 1.7 =20 The same code is working on the old server, but with Tomcat 4.1.29 =20 Thanks =20 |
|
From: <Fer...@th...> - 2006-12-15 13:49:39
|
Hello, =20 We are moving the applications to a new server. It seems (brl-get-session brl-context) is not working right I put some value in the session and when I retrieve it in the next page, the value is gone. I also tried with a very simple page in which I set the value (#t) and reloading the page, and I always get #f when accessing the property. =20 Tomcat 5.5.17, BRL 2.2.1 and Kawa 1.7 =20 The same code is working on the old server, but with Tomcat 4.1.29 =20 Thanks =20 |
|
From: Bruce L. <br...@us...> - 2006-07-29 02:39:07
|
<Fer...@th...> writes: > What is the BRL equivalent of response.setDateHeaders() ? (brl-context-sv-req brl-context) will give you the ServletResponse object to call whatever methods you like. Or you can use the brl-http-header! function and brl-smtp-date (sp?) defined in netfun.scm that formats dates as required for SMTP and HTTP. The servlet getLastModified() (sp?) method is something I'd like to support someday. Something like (brl-last-modified foo :: <java.lang.Date>). It would look to a BRL page writer like a function that set the Last-Modified header and kept going, but due to the funny way servlet methods work, it would look at the call context and call a continuation with its argument if it's a getLastModified() context, but do nothing for a doPost() or doGet() context. > And there are no time functions in BRL? Hasn't been a priority for me as I've always been dealing with a database that does have them. There's an SRFI for time functions that's probably not hard to implement if Per hasn't already done it. The only BRL time function is (brl-now). By the way, the best working SVN snapshot is 2005-11-28 to compile with Kawa 1.7. I made a start on working with 1.8 but haven't finished it, and current SVN doesn't compile at all. |
|
From: <Fer...@th...> - 2006-07-28 14:11:30
|
What is the BRL equivalent of response.setDateHeaders() ? And there are no time functions in BRL? =20 Thanks =20 |
|
From: Bruce L. <br...@us...> - 2006-07-05 19:43:40
|
It doesn't work with Kawa 1.8. I'd like to make it work, but the "good enough" nature of 1.7 has made it hard to raise such work up my priority list. -- http://ourdoings.com/ Easily organize and disseminate news and photos for your family or group. |
|
From: <Fer...@th...> - 2006-07-03 11:59:46
|
Hello, =20 Does BRL work with Kawa 1.8? =20 Thanks |
|
From: Dominique B. <dom...@nu...> - 2006-03-24 21:02:15
|
Hi guys, I've just released SchemeScript 1.2.0, a Scheme editor plugin for Eclipse. http://schemeway.sourceforge.net This new version adds support for BRL. I.e. .brl files are recognized and syntax highlighting works as expected by treating all ]...[ expressions as strings. So I thought you'd be interested in knowing that. Cheers! Dominique Boucher |