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

#1
Anything else we might add? / forget about scheme
March 14, 2004, 09:49:53 PM
Hi Lutz,



Being thinking about your respondes couple times just to make sure I fully understand you, without my programer's assumption of "I think I know that".



I  will have to say bye or run away from these scheme implementations for my new quest.  In some way I think they might be complicating the issues, including the js version.



I also check out the sxml  and stuff for scheme, their libs to do all that are bigger than newLisp's foot print or exe , while newLisp does it in one function.



Back to the basic form of the matters..  like you suggested newLisp returns html and JS to the client browser.  Only I will call it " html and javascript embeded inside newlisp" !!



Regards,
#2
Anything else we might add? / newlisp vs scheme
March 14, 2004, 03:28:58 PM
Hi Lutz,



The javascript shceme parser is no way comparing to newlisp at all,  I am just trying to stream line the coding effort for example:



I am thinking to code newlisp like syntax on the browser based REPL  console,  then pass the sexpression through remoting to the server side newlisp process or cgi then the call back on the javascript parser will pick it up then do the very basic evaluation then taking care of the DOM or GIU front end.



Kind of tired of debuging all these different pieces of programing languages. That's what I called Wrapping the complicated coding design while here Iam  thinking it's possiable to do all my coding in newlisp all the way around.   I might be dreaming or crazy :))



Regards,
#3
Anything else we might add? / Javascript Scheme/Lisp
March 14, 2004, 01:27:04 PM
Actually, I am running some webpage with javascript parser to evaluate scheme code. Which already intergrated with a hook to the browser's DOM or javascript routines.



My question for you will be : you think the syntax between newlisp and schem can co exists? What will you suggest I do to make them seemless?



Regards,
#4
Anything else we might add? / Lisp in Javascript
March 14, 2004, 10:39:22 AM
Hi  Lutz,



Thanks for the info on the static variables, I will remember to use contexts from now on,



Here is an idea forming on top of my head:

After being through the life cycles of developments, I am starting to think that it's really important to re-think the coding approach from ground up, instead of keep on wraping some

complex codes and carry them through out the life cycles due to "Programer's EGO".



So I am starting to re-enginer myself with the following:



1: Use newLisp on the server side to manage all logics rules and de-normalized  

    database structures.

2: Browser front end communicate with server side newlisp interface. (sxml <-->xml)



3: Finally, the crazy part,  is there a way to code and run newlisp right in side the  

    browser?  I ran into an javascript implementating which can run and compile R5RS

    (scheme).   But not sure how different it is between newlisp and scheme syntax.



The idea of keeping everything simple by using newlisp in all these tiers of process should really cut down lot's of overhead on development, debuging, implementing

and support cycles.  



What do you think about the  "newlisp in browser" ??



Regards,
#5
Anything else we might add? / 7.1** trough 7.52
March 13, 2004, 09:08:40 PM
Hi Lutz,



I did revmove the extra ((gs "")) as you suggested on both 7.1** and 7.52 version, both of  them works.



I kind of like the ((gs "" )) , according to the help document, it provides me a way of serializing the object and the statics vars; such a nice features!! Whole lots of potential for database or something like apache's sessions on the serverside.



Pretty happy with the current sxml to xml functions(for now), I am  working on the javascript for the browser side to sync with the DOM objects.



Regards,
#6
Anything else we might add? / Thanks for the TIPs
March 11, 2004, 02:22:36 PM
Hi Lutz,



I am  a bit new to the newlisp kind of coding concept such as define-macro and the lambda. I am not quite understand the full protential of these functions yet,  getting there slowly.



I did some testing and here is what I come up with so far:



(define (parsetree alist ps ((gs "")))

  (set 'gs (string gs ps))

  (while (> (length alist) 0)

   (set 'tmp (pop alist))

   (set 'gs (string gs "<" (first tmp) ">"))

   (if (list? (nth 1 tmp))

    (set 'gs (string gs (parsetree (nth 1 tmp) "")))

    (set 'gs (string gs (last tmp) "</" (first tmp) ">"))))gs)



(set 'record '(

  (field1 "ddfeewfw")

  (field2 ((child1 "") (child2 "")))

  (field3 "fdss")))



(parsetree record "")



output->

    <field1>ddfeewfw</field1>

    <field2><child1></child1>

               <child2></child2>

   <field3>fdss</field3>



As you can see the approach I am taking is still very non lisp. which result

in a bigger foot print in the code.



Once again, thanks for the tips with the define-macro, I will give it a try, hopely it will help me parseing not only the xml tags but all the attributes too.



Regards,
#7
Anything else we might add? / sxml to xml (xhtml)
March 10, 2004, 06:01:24 PM
Hi everyone,



I noticed newlisp a while ago, like the small foot print and the concept of keeping everything small and simple.



On the other hand, most of the folks have been doing coding in a more complex way for a very long time,  including myself.  In my case, it became a challenge in my thinking pattern, I admit that I have been brain washed for years.



Anyway, I'd like to say thanks for making newlisp available, it's refreshing compare to the rest of the languages wildly used in most of the industries.



Question: Is there a way to convert s-expression to xml or (xhtml) ?  I notice how easy it is to parse xml in newlisp. I am thinking if this can be done, then the door will be wide open for newlisp to the browsers. There are many javascript xml parsers available for 90% of the web browsers.



Regards.