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

#1
Beautiful. Please don't die.
#2
Quote from: "Lutz"One could build a better debugger using the current debugging facilities and reflective API offered by newLISP and without changing anything inside newLISP.




When you said that, do you mean it is possible to build a debugger which can point to the proper line of code ?



I think one of the big problems we newbies face with debugging newLisp is that if you have repeated code, debugger will point to the first place the code is used instead of the one producing the error. With that out of the way I believe we can ditch the line numbers request.
#3
Some time ago Lutz replied here (i searched for it, but couldn't find it) that it wasn't possible without making newLisp go slower. Also that given the nature of the two step parsing newLisp does, source line numbers get lost.



I'm quoting from memory so maybe this is not exactly what he said. But the general concept I got from there was: can't be done without making a poor quality newLisp.



So maybe the solution would be to provide a fat-newLisp version for development that does not loose this information.



Another possible solution would be to learn how the people who don't complain about this do their development. Maybe there's something we're missing there.
#4
newLISP Graphics & Sound / Re: HTML Tag functions?
December 15, 2013, 07:36:49 AM
I haven't touched that code in some time now. Furthermore I have some un-pushed changes here in my disc, I changed several things to make it easier to use, for example, to avoid:


QuoteEvery function needs at least one parameter for the inner code, hence the empty

strings in the example above.


There's no need for that in the new code.



However I stumped into some hard-to-debug (for me, cause I'm a moron) stuff which I cannot recall right now and then life got me away from this project.



What xytoxon posted works nice. My approach convoluted things just to have this one benefit: to validate HTML code at generation. However with all this TDD approach everybody has jumped in, which include tests for views, I'm not sure anymore if my approach adds any value.



So I'm kind of reluctant to review that code. But if someone here has interest. I can at least push the changes I got and a note with the failing bits, so someone can start from there.
#5
newLISP in the real world / Re: Bug of (context Foo)?
November 01, 2013, 09:45:02 AM
You forgot to quote Foo on your second example:



(context 'Foo)


Other than that I don't see anything wrong with that. What error are you seeing?
#6
What happens if you try running it directly, not through the symbolic link:



/usr/bin/newlisp-10.5.4



What does say 'file' command about that file?



The reported error looks like a shell/file issue, but you show the file there... Strange!
#7
newLISP newS / Re: Alternative git repository
October 11, 2013, 12:35:19 PM
Ah! Beautiful! I didn't knew that about SF. Thanks Kosh. Altough, why not github.com? And... Doesn't have Lutz a git repo somewhere? How does his development? CVS?! :P
#8
newLISP newS / Re: Alternative git repository
October 11, 2013, 05:34:23 AM
Did you do this with a specific purpose or just for replication?
#9
newLISP in the real world / Re: Newlisp telnet
October 09, 2013, 02:31:43 AM
What do you mean by "real terminal"? To have line editing capability?
#10
Further elaboration on xytroxon reply:



(context 'next)

(setq seenSymbols '())

(define-macro (next:next aList)
    (unless (ref (string aList) next:seenSymbols)
        (push (list (string aList) (copy (eval aList))) next:seenSymbols))

    (pop (next:seenSymbols (first (ref (string aList) next:seenSymbols)) 1))
)                                                                                                                                                                        


Exercises to the reader:



1. optionally allow to re-copy symbol contents into seenSymbols. That way results from calling next will cycle and start over or new content can be assigned to used symbol.



2. convert to object like form
#11
You define your functions without arguments, like this:



(define (foo) (println $args)) ; -> (lambda () (println $args))
(foo 1 2 3) ; -> (1 2 3)


I put $args, but you can also use functions args or doargs. Check the manual for them, there're nice examples.



You may want to test the arguments' type to decide which signature should you act upon, there is a type function I found on this forum, but I don't recall where or who wrote it, so I'll paste it here:



(define (type x)                                                                                                                                                        
    (let (types '(
        "bool" "bool" "integer" "float" "string" "symbol" "context" "primitive"
        "import-simple" "import-libffi" "quote" "list" "lambda" "macro" "array"))

        (types (& 0xf ((dump x) 1)))))
#12
newLISP in the real world / Re: newLISP on Rockets
June 24, 2013, 06:06:02 AM
I was hesitant to join this topic, I didn't want this to become a dry discussion.



Just for completeness, I'll reply your questions before:
Quote from: "itistoday"I assume that you didn't visit the page after hitting ^C... Did you try Cmd/Ctrl-Shift-R (or a different browser)?

Also, try following these instructions to get it running under Apache instead:


You're right, I went to the page before hitting CTRL-C, stopping the program was my reaction to seeing an error on loading the page. Yes, I've tried reloading and yes I've tried another browser. Last one just to tell you that I did, because by seeing the error one already knows is not a browser problem, but I hate to leave loose ends. And finally, no, I wont follow any instructions to try it on Apache, because that's not the point.



So, to the point: what I tried to tell you (and I think Cormullion was trying the same) is that no matter how cool Dragonfly was, it looks abandoned now and needs some love.



Even the simplest code, no matter how mature, needs some maintenance now and then. Wouldn't need even more maintenance something that attempts to work in a field that never stays still, that's constantly changing, like the web?



You complain that the author of Newlisp on Rockets didn't fork your work. However he states that he learned and used a lot from Dragonfly, so he did base on your work, he just didn't use the fork path. Maybe because he's learning, maybe because he preferred to pick stuff by hand. Who knows!



Anyway, I didn't mean to be harsh at you before, and I don't now. I was just trying to point that a software that claims maturity should work out of the box. Because if after following instructions you have to hunt a bug, or try this and that to make it work, then software isn't mature, isn't ready for production.
#13
newLISP in the real world / Re: newLISP on Rockets
June 23, 2013, 12:39:07 AM
The exact same thing:
[attachment=1]steps.cropped.png[/attachment]
[attachment=0]result.png[/attachment]
#14
newLISP in the real world / Re: newLISP on Rockets
June 22, 2013, 05:10:11 PM
Well it surely looks like your framework is unmaintained. Now you post there's a new version, so I wanted to give it a try, followed README indications and this is what I got for the example:

ERR: invalid function : (load-files-in-dir (string DRAGONFLY_ROOT "/lib") ".lsp$")

I don't want to diminish your work, but it surely needs a face washing.



You must agree with me that a software that claims to be stable and shows an error just by following stated instructions is kind of disappointing.
#15
Thanks for your reply xytroxon. However I'm looking for a different concept. I'm still not there, but my idea is that only proper HTML5 code comes from my DSL, my objective is to produce valid HTML without the need to validate it.



Anyway I found a partial answer to my previous question, first I did this wraper:

(define-macro (wrap-in-context:wrap-in-context ctx-new)
(eval
(doargs (arg)
(read-expr
(replace {w+:} (string arg) "" 0) (eval ctx-new)))))


Problem is that it replaces any context, so I wrote another one:

(define-macro (replace-this-context:replace-this-context ctx-old ctx-new)
(eval
(doargs (arg)
(read-expr
(replace (string (eval ctx-old) ":") (string arg) "" 0) (eval ctx-new)))))


And it kind of solves my issue, but I'm still not satisfied because while I can wrap data in a context different from the one I'll replace, I cannot build functions with arguments, because those arguments get the context I wanna replace. So I have to juggle with data, and that's not cool.



So I'm still looking for a better solution.



Anyway, if you or someone else wanna take a look, I just uploaded it here:



https://github.com/conan-lugmen/newlisp-hin.git">//https://github.com/conan-lugmen/newlisp-hin.git



Please note it's not alpha nor beta software... maybe omega :P



Current work is still in the dev branch, master is old and probably non-functional. Also I found a couple of bugs recently that are becoming hard to track with the current definition if hin:hin (which grew too big), so I'll be changing stuff there these days.