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

#1
newLISP in the real world /
November 17, 2004, 04:29:48 PM
Yep, makes perfect sense. Thanks.
#2
newLISP newS / bugger - one more
November 17, 2004, 04:27:16 PM
2996c2996

<    version 8.2.7 espressions in exp-1 ... where not evaluated.

Apart from the slip indicated in the diff, 'where' should be 'were'.

Sorry.
#3
newLISP newS /
November 17, 2004, 04:14:49 PM
Quote from: "Lutz"... I need some kind of spelling support in VI, which is my HTML editor, any suggestions?Lutz

Maybe VI macros that can use [ai]spell on the current buffer?  Or a macro that writes out a tmp file and runs [ai]spell on that and hooks back the result?
#4
newLISP newS /
November 17, 2004, 04:06:42 PM
Only a few this time.



  http://homepages.paradise.net.nz/~j_gauss/wix/7diff.txt">http://homepages.paradise.net.nz/~j_gauss/wix/7diff.txt



some slips may be hard to pick up:  lib|d|emo vs lib|b|emo

and semaphore vs sempahore because lines are the same length.
#5
newLISP newS /
November 17, 2004, 02:33:18 PM
A quick look at the latest manual (8.2.7) indicates that you've fixed the little typos.  Thank you very much -- now I can read without tripping ;-)



But the first typo was hard to pick up: nuevatAc used instead of nuevatEc. It occurs as a hypertext link in the last line of the paragraph that comes just before the "Deprecated Functions" section. (I checked the link just in case the company registered both names :-)



I'll do another quick pass over the manual looking for more typos.
#6
In the manual we have this example:
Quote
typedef struct mystruc {

    int number;

    char * ptr;

    } MYSTRUC;

 

 MYSTRUC * foo3(char * ptr, int num )

    {

    MYSTRUC * astruc;

 

    astruc = malloc(sizeof(MYSTRUC));

    astruc->ptr = malloc(strlen(ptr) + 1);

    strcpy(astruc->ptr, ptr);

    astruc->number = num;

 

    return(astruc);

    }

 

 > (set 'astruc (foo3 "hello world" 123))

 4054280

 > (get-string (get-integer (+ astruc 4)))  <--- ??

 "hello world"

 > (get-integer astruc)

 123


Assuming that astruc is just a memory address, why do we need to call 'get-integer' before we get at the string?



I redefined the struct so that the char* came before the int and noticed that we still need to use 'get-integer' before 'get-string'. But getting the integer is still straightforward: (get-integer (+ astruc 4))
#7
newLISP in the real world /
November 14, 2004, 01:08:27 PM
+1    (i.e. "yes" to having them added)
#8
Anything else we might add? /
November 11, 2004, 02:19:56 PM
Quite true :-)

Thank you.
#9
Anything else we might add? /
November 11, 2004, 03:15:44 AM
Quote from: "newdep" ...

It could be an option though to have the choise in a "define/contstant/set"

to have a user defined "Comment" like (where it must be included in

every source file at the beginning, otherwise it wont work) -->>



(setq comment '( "[text]"  "[/text"] )    



(setq comment '( "{" "}" )



(setq comment '( "[text]n" "[/text]n" )



Norman.


Nice idea but there would be a large performance hit on the parser.  You could write yourself a preprocessor that does the necessary substitutions prior to running the main script.  But that would be too much work and messy ...



However, my suggestion could easily be implemented within the function or macro that is doing the processing. e.g.
(define-macro (dostuff! _str)
  ;; check for special case
  (if (= (first (eval _str)) "n")
    (nth-set 0 (eval _str) ""))

  ;; now we do stuff to the string

  nil ;; dummy return
)
As I said, it's just a convenience thing :-)

Lucas.
#10
newLISP in the real world /
November 10, 2004, 07:48:06 PM
Quotewell, there you go! I completely missed the fact that newlisp had a sourceforge page.

but no mailing list ;-)
#11
Anything else we might add? /
November 10, 2004, 05:57:44 PM
Quote from: "Lutz"So basically the [text], [/text] tags would always be on a line by itself. I am not sure ... I have to think about this a little bit longer...



Lutz

Not at all.



I shall be more precise: the parser would ignore the first newline only if the newline exists.



No current code will be affected except those that already have an explicit newline.  In this case, another newline will have to be added.



So the proposed change makes the following equivalent:



[text]hello world

hello world

[/text]



will parse the same as



[text]

hello world

hello world

[/text]



In the second example, because the parser finds a single newline as the first character after [text], it skips it.  It does not skip any arbitrary character, only if it is a newline.  So we can continue to use [text][/text] either way without change.  Hence, the proposal does not break the style of coding where we place [text]hello there[/text] on the same line.



My reference to changes to this board referred to the fact that it will be easier for users to write their normal comments interspersed with blocks of code.  The board code would not need changing. (if it does use [text][/text] that is.)



Lucas
#12
newLISP in the real world /
November 09, 2004, 06:37:02 PM
May I share my thoughts on this?  (Bit cheeky for a new user - sorry)



I think that the current system for source code control and distribution is perfect! We have no problems with any website being down or CVS being broken?  Why complicate things?



We don't have a mailing list though.  The advantage of having one is that interested users can subscribe and just sit back and watch without actually having to come to the board.



On the other hand, the board does show what newLisp is capable of.



So I would suggest keeping the status quo visavis the source code but 'consider' a mailing list where one has to subscribe to post and where the archive is available for searching and casual reading.



Lucas
#13
Hi Lutz,

  This is an rfc - a request for convenience ;-)

Should the parser be made to ignore the first hard newline after

[text]? This would make it easier to write and read boxed-quoted text in scripts.



For example: here is how we currently write 2 indented paragraphs:

[text]___words words words words

words words words words etc

words words words words etc  

words words words words etc

___words words words words

words words words words etc

words words words words etc

words words words words etc

[/text]



If the first hard newline is ignored, we can instead do this

[text]

___words words words words

words words words words etc

words words words words etc  

words words words words etc

___words words words words

words words words words etc

words words words words etc

words words words words etc

[/text]



I'm guessing the first real-world difference will be felt on the board:

when we use the style for 'code'.

Question: Should this be extended to the hard newline before [/text]?

i.e. at the end of the quoted text.  I don't know.



Lucas
#14
newLISP in the real world /
November 09, 2004, 03:56:28 PM
Thanks newdep.  I've added it to the one on the site,  Also added 3 other words.



http://homepages.paradise.net.nz/j_gauss/wix/newlisp.html">http://homepages.paradise.net.nz/j_gaus ... wlisp.html">http://homepages.paradise.net.nz/j_gauss/wix/newlisp.html



There's another macro available as well - it does "autobrackets".



Yeah, I had left [text][/text] as normal dunno why :-)  ... I'm also going to make a suggestion for an enhancement to Lutz re [text][/text]



If you have any other enhancements or color schemes I'll put them up.  There is a larger set of color schemes when working on a terminal in X since you can change the background of the terminal as well.



Lucas
#15
newLISP newS /
November 07, 2004, 09:19:08 PM
Hi Lutz ,

I got a PM from you to say that the mail might have been dropped.



So here is a link to the tarball.



http://homepages.paradise.net.nz/~j_gauss/wix/lucas.tgz">http://homepages.paradise.net.nz/~j_gauss/wix/lucas.tgz



 ** since removed -- Lutz now has it **



This was just a first pass over the docs yielding about 80 possible errors/typos.

Reject or accept each as you deem appropriate.



Lucas.