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 - eddier

#1
newLISP in the real world /
June 12, 2009, 05:34:54 AM
Well, I'm glad someone got some use from it :)



The error *is* probably a permissions error.



Eddie
#2
newLISP in the real world /
June 11, 2009, 12:13:59 PM
Thanks Lutz.



Wow, I thought it would take more changes than that. I need to make some modifications for security reasons.


QuoteIf it works for you, I can put it on as a demo again.


Sure, you may use it or modify it for whatever purpose you wish.



Eddie[/quote]
#3
newLISP in the real world / calendar program
June 11, 2009, 10:24:09 AM
Hello Lutz.



I once wrote a web calendar program an posted it on newlisp. I figured you had updated it so that it would run with newer versions of newlisp. I was wondering if you have an updated version? I need to modify it so that it will run on one of our httpd servers on a specified port.



Eddie
#4
Anything else we might add? /
July 06, 2006, 10:55:38 AM
You might want to implement filter-map as well. There are a bunch of nice functions in the SRFI libraries like append-map and one that I was using quite often when collecting data for calculations. Note that I just copied this documentation from the DrScheme help desk.



filter-map f clist1 clist2 ... -> list



Like map, but only true values are saved.

(filter-map (lambda (x) (and (number? x) (* x x))) '(a 1 b 3 c 7))

    => (1 9 49)



Note that filter-map is both more efficient and flexible than (map f1 (filter f2 data)). More efficient since it only makes one pass over the data and more flexible since it can be applied to multiple lists. Both append-map and filter-map work if lists are different lengths and are circular lists (although one has to be finite).



eddier
#5
Anything else we might add? /
June 28, 2006, 07:13:10 AM
Hi cormullion.



This is really a tough one in one sense, because NL doesn't have a character data type that would be an element of a string (list or array of characters). Membership should only be used to test to see if a character is in a string.



We should be able to almost treat "" as {}. Of course strings can't be nested like sets (or can they?) and strings have order to their elements and sets don't. Also, strings can have redundant elements (this may be imposed by having order?).



If we compare the string, list, and set operations, then the current implementation is probably inconsistent. That is,



(member "" "string")



should probably be nil. If we look at "" like {}, then its like saying

{} in {s,t,r,i,n,g} or (member "" "string") which is false. However, {} in {{},s,t,r,i,n,g} or (member "" "{}string")  where {} is a nested string would be true. The catch is that in NL, member is treating "a" as both a chacter and a string. This is inconsistent in a pure mathematical sense. IMHO, the member function should not be used with strings but, Lutz should decide the semantics here.



On the other hand,

(substring "" "this") => true

is consistent because {} is a subset of {t, h, i, s}.



Let's see what Lutz has to say.



Eddie
#6
Anything else we might add? /
June 28, 2006, 06:16:13 AM
As a mathematician I can definitely say two things are being confused here.



substring should act like subset in sets, i.e. {a} is a subset of {a,b}.

Also, {} is a subset of every set.

member should act like set membership, i.e.  a is a member of {a,b}.

However, {a} is not a member of {a,b} and neither is {}.

{} is a member of {{}} the set with one element the emptyset.



Just my two cents.



Eddie
#7
newLISP newS /
January 26, 2006, 05:59:48 AM
Hi Nigel,



Looks great! Strange that it lost the table of contents.


Quotecommenting out usepackage[T1]{fontenc} caused lots of error regarding textquotedbl

commenting out usepackage{amsmath,amssymb,amsfonts,textcomp} causes errors re textquotesingle.


I'm not sure why they do it that way? Maybe to avoid useing backquotes. In latex, the left single quote is ` and the left double quote is `` two of them. Yep I bet you got small black rectangle for double quotes when you commented them out no?


QuoteI'll add html2latex.lsp to my list of possible projects.

Sounds like a fun project!



I worked on a translator for document codes into both html and latex for a little. I plan to work on this some more after I have finished the college's IT Plan. Even if not for newLISP but for creating large documents at work.



Eddie
#8
newLISP newS /
January 25, 2006, 05:14:52 PM
I don't see any problems except that it is not loading the newcentury fonts.



You can kill the usepackage[ascii]{inputenc} and usepackage[T1]{fontenc} if you wish.



I even doubt wether you need the usepackage{amsmath,amssymb,amsfonts,textcomp} since I don't think there's probably any serious math stuff going on in the manual. I have never had any font troubles with these packages except for textcomp. I'm not sure what that one does.



add



usepackage{newcent}



where it will read



title{newLISP v8.7.1 Manual and Reference}

usepackage{newcent}

begin{document}



Now, pdflatex newlisp_manual.tex twice.

The first pass gets the information for the table of contents and the links

The second pass will put that information back into the pdf file.



The text shown in acrobat should be clean and copyable.



Eddie
#9
newLISP newS /
January 25, 2006, 09:34:25 AM
If you can, show all of the stuff between documentclass{.... and begin{document}. Another suggestion is the ordering of the packages: try putting usepackage{newcent} as the last package before begin{document}



Eddie
#10
newLISP newS /
January 25, 2006, 05:37:03 AM
Will Nigel's solution work Lutz?  If it does I would like to make one suggestion. In the .tex file on the very next line after the documentclass{article or whatever} put

usepackage{newcent}

This will make the fonts much cleaner and enable you to copy and paste text from the manual (if you click the [T] button on the toolbar).



Eddie
#11
newLISP newS /
January 23, 2006, 03:22:16 PM
QuoteEditing a text file would be fine, as long as everything we do is with standard tools. I do not want add new dependencies, incompatibilities etc.. The current method using HTML and OpenOffcie at least works on all platforms. We will do it but is has to be simple.


By all means! The standard tools would be pdflatex, newlisp, and a text editor. Chances are pdflatex, newlisp, and a text editor are already on your machine ;)



Actually, this is very similar to a project I'm currently working on. So the lessons will carry from one project to the other. If no one minds, It'll take some time though.



Eddie[/quote]
#12
newLISP newS /
January 23, 2006, 09:49:46 AM
Actually, what I was thinking: create a file called manual.txt. Run the script

./doc.lsp quickref.txt

The output would be 3 files: "manual.html," "manual.pdf," and "qref.pdf." This might actually take a bit more thought?



We would just use short commands in manual.txt

.h 0 Introduction
.p this is a paragraph
.h 1 Section One
.h 2 Subsection
...


=>

<html>
<head>
<title>manual</title>
<style>
 ...
</style>
</head>
<body>
<h1>Contents</h1>
<ol type="I">
  <li>Introduction</li>
  <li>Section One</li>
...
</ol>
<p style="newpage">
<h1>Introduction</h1>
<p>this is a paragraph</p>
<h2>Section One</h2>
...


and



documentclass{article}
usepackage{newcent}
usepackage[hyperref stuff ...]{hyperref}
usepackage[margin=1in]{geometry}
...
begin{document}
tableofcontents
newpage
chapter{Introduction}

this is a pragraph

section{Section One}

...


We just need to define what codes we would need. Especially for the inline code sections. This is the reason I suggest building the quick reference first, to determine what codes we should have.



Eddie
#13
newLISP newS /
January 23, 2006, 09:34:25 AM
Are you using OSX?



If you are using Linux, the PDF and HTML files generated by the script would be portable across all platforms.



Eddie
#14
newLISP newS /
January 23, 2006, 08:26:59 AM
Actually a script to generate both the HTML version and a PDF file is what I would prefer doing. I'm doing something similar to this for the Factbook I generate here at the College. If I make this script, could we possibly generate two PDF documents instead of one (One for the main document and the other of a Quick Reference)? The reason is that parts, chapters, sections, and subsections are added to both the Bookmarks of a PDF file and the Table of Contents.



Eddie
#15
newLISP newS /
January 23, 2006, 06:35:13 AM
Nigel,



I somewhat cheat on this. There is generally a package of macros to do about anything you want in LaTeX. I don't write that many macros (depends on the project). I just usepackage{whatever} and use the commands from the manual provided. I also use LyX many times to get the main content in and then export the latex to tweak. I have written some tools usually in Python or newLISP to generate graphs in the {epic,eepic} picture environment, which is pretty easy.



Lutz,



This is going to take longer than I thought. Even when replacing HTML codes with LaTeX codes using the regular expression replacement in emacs, it is going to take some time. Also, the structure of the manual doesn't really match the structure of a document imposed by LaTeX. I worked on it a bit Friday night until the wife and I had to babysit our two year old granddaughter. Last night I start on a Quick Reference. After I complete a quick reference, I'll go back and tackle the main document which is now much bigger than I remember. I'm going to need more time on this than I previously thought.



Eddie