Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - newland

#1
newLISP in the real world / bayes-train and query-cgi.txt
February 05, 2016, 04:43:04 AM
Hi,

I'm wondering, in the code of http://nuevatec.nfshost.com/query-cgi.txt">http://nuevatec.nfshost.com/query-cgi.txt , does bayes-train just update counts, or is there some bayesian stuff going on?  I'm quite unfamiliar with newlisp, and not sure what exactly the purpose of bayes-train is?
#2
newLISP in the real world / Re: PEG and template system?
September 16, 2014, 03:05:27 AM
Hi,



forgot to add this link: http://www.inf.puc-rio.br/~roberto/docs/ry10-01.pdf">http://www.inf.puc-rio.br/~roberto/docs/ry10-01.pdf on how to write regex equivalent in PEG.  That article gives  some motivation why PEG's are sometimes easier.
#3
newLISP in the real world / Re: PEG and template system?
September 16, 2014, 02:13:26 AM
Hi,



The scheme regex or Pike's system are not related to PEG's.  A PEG is a top down parsing language, and you can use it to parse data or (small) command languages.  A PEG often looks like a BNF , so making it quite easy to read and write.  In contrast, simple regexes are easy to write and work fast, but complicated regexes are difficult to write and nearly impossible to decipher.  Lua also has a quite nice PEG implementation.







https://en.wikipedia.org/wiki/Parsing_expression_grammar">https://en.wikipedia.org/wiki/Parsing_e ... on_grammar">https://en.wikipedia.org/wiki/Parsing_expression_grammar



https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">https://en.wikipedia.org/wiki/Backus–Naur_Form
#4
newLISP in the real world / PEG and template system?
September 15, 2014, 01:20:42 PM
Hi,



I'm wondering, is there something like the PEG implementation of guile:



https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html">https://www.gnu.org/software/guile/docs ... rsing.html">https://www.gnu.org/software/guile/docs/master/guile.html/PEG-Parsing.html



That would allow to define templates and to define parsing rules for e.g. the wiki, without using regular expressions.  Probably slower, but probably also easier to read.



thanks,



newland
#5
newLISP in the real world / Re: newlisp wiki setup / error
September 15, 2014, 01:18:06 PM
Hi Lutz,



thanks very much!  The wiki now works.  I'm experimenting to see how it exactly works.



newland
#6
newLISP in the real world / Re: newlisp wiki setup / error
September 12, 2014, 03:35:22 AM
Hi,



as a followup to my previous post, I also tried with newlisp 10.5 and 10.4.  Strangely they work better, as they allow to use the links at the bottom:



 Files | Index | Changes | References



These links don't work in my setup in 10.6



But still I can't visit http://localhost:8080/index.cgi?page=How_To_Use_Advanced_Features">http://localhost:8080/index.cgi?page=Ho ... d_Features">http://localhost:8080/index.cgi?page=How_To_Use_Advanced_Features without getting an error in all versions of newlisp.



What version of newlisp is running newlisp.org?



thanks,

newland
#7
newLISP in the real world / Re: newlisp wiki setup / error
September 12, 2014, 01:37:00 AM
Hi Lutz and Ralph,



thanks for the suggestions.  I tried the wiki also on a server with apache, next to my local setup.  I still get the same errors.  The strange thing is, when I request most pages, it works, e.g.

http://localhost:8080/index.cgi?page=Changes">http://localhost:8080/index.cgi?page=Changes



But when I request the page http://localhost:8080/index.cgi?page=How_To_Use_Advanced_Features">http://localhost:8080/index.cgi?page=Ho ... d_Features">http://localhost:8080/index.cgi?page=How_To_Use_Advanced_Features



I get:



ERR: list or string expected in function replace : nil called from user defined function search-content-table called from user defined function display-page



The errors come when using the wiki out of the archive unmodified.  I checked, but all pages have the same permissions.  I'm somewhat lost at what to try to solve the problem.  Maybe it helps, I'm using

newLISP v.10.6.0 64-bit on Linux IPv4/6 UTF-8 libffi



thanks,



newland
#8
newLISP in the real world / newlisp wiki setup / error
September 11, 2014, 02:48:28 AM
Hi,



I'm trying to use the newlisp wiki on localhost, started with the following command line:



./newlisp -http -d 8080 -w $PWD/



It works for some pages and page creation, but i run into problems with string functions used in the index.cgi script.



For example, if i try to view

or http://localhost:8080/index.cgi?files">http://localhost:8080/index.cgi?files



I get the following error

ERR: list or string expected in function find : nil called from user defined function get-flags called from user defined function files-table



There are also similar errors, e.g. ERR: list or string expected in function replace : nil .



So I suspect it has to do with string functions.  Help would be greatly appreciated.



thanks,



newland