Search found 39 matches
- Wed Jan 30, 2019 5:52 pm
- Forum: newLISP newS
- Topic: Ask info about newLISP
- Replies: 6
- Views: 3726
Re: Ask info about newLISP
One thing on the TODO list: non-blocking sockets, which would allow internet services to be more reliable and avoid a race condition when doing things the traditional way using net-select/accept on sockets that are bound and listening for incoming connections. Haven't had time to do it myself. One ...
- Wed Sep 13, 2017 9:26 am
- Forum: Anything else we might add?
- Topic: Newlisp vs Lua
- Replies: 11
- Views: 6077
Re: Newlisp vs Lua
Actually to me co-routines are not a major feature in Lua. One problem is that a procedure which is not "co-routine aware" cannot be turned in to a "co-routine aware" one. If someone provides a GUI library without a single-step gui.run() function (silly example), you are screwed. So if you have a lo...
- Tue Sep 12, 2017 7:41 am
- Forum: Anything else we might add?
- Topic: Newlisp vs Lua
- Replies: 11
- Views: 6077
Newlisp vs Lua
Let's Rock'n'Troll! I've lurked on comp.lang.forth for a long time. One thing I couldn't understand is why people constantly compared Forth with C, which was pointless in my eyes because they where in whole different categories. It became even more pointless when Lua began to gain traction, because ...
- Sun Mar 19, 2017 1:52 pm
- Forum: Anything else we might add?
- Topic: FOOP destructors?
- Replies: 4
- Views: 6963
Re: FOOP destructors?
FOOP. The F should be a P. Every time I try to use it for something more object-y than glorified structures, it falls flat on its face (and even as glorified structures, it's not really convenient out-of-the-box). I'd rather use contexts for prototype-based objects. Kind of what the /dev/urandom exa...
- Tue Dec 30, 2014 10:59 am
- Forum: Anything else we might add?
- Topic: NewLISP GUI using web elements
- Replies: 2
- Views: 5178
Re: NewLISP GUI using web elements
I quite agree that Java is becoming less relevant these days. But I disagree that the way to go is the browser. Just like Java, Javascript is cool because it's "already there" and "cross-platform", but it's still poor at making interactive apps. The CSS/HTML/Javascript was never meant to build deskt...
- Tue Sep 30, 2014 4:29 pm
- Forum: newLISP in the real world
- Topic: write-file should add parameter to specified character
- Replies: 4
- Views: 1954
Re: write-file should add parameter to specified character
Maybe the OP was talking about the name of the files rather than the content?
- Wed Sep 24, 2014 8:02 am
- Forum: newLISP in the real world
- Topic: IUP bindings
- Replies: 1
- Views: 1425
IUP bindings
Hello,
Doe anyone have bindings for the IUP library?
Doe anyone have bindings for the IUP library?
- Sun Jun 29, 2014 12:57 pm
- Forum: Anything else we might add?
- Topic: Serial Port Module?
- Replies: 6
- Views: 6301
Re: Serial Port Module?
To me, the major split is between Windows and Linux platforms. That's also true for sockets. You have no choice but to write platform specific code and to hide the differences behind the a common API. As for DSR/DTR, RS is such a mess that one can always stumble upon some hardware that do use that. ...
- Thu Jun 26, 2014 10:19 pm
- Forum: Anything else we might add?
- Topic: flat enough?
- Replies: 4
- Views: 4328
Re: flat enough?
That's because '(1 2) is a quoted expression, not a list:
Code: Select all
(list? (nth 0 '('(1 2) (3 4)))) ; --> nil (id est, false)
Code: Select all
(quote? (nth 0 '('(1 2) (3 4)))) ; --> true
- Mon Jun 02, 2014 12:05 pm
- Forum: newLISP in the real world
- Topic: I/O multiplexing on pipes
- Replies: 7
- Views: 3031
Re: I/O multiplexing on pipes
int returnneg(void) is a valid prototype.It's actually "more correct" than int returnneg(): the former tells that the function takes no arguments, while the latter can take any number of arguments.
source: http://www.drdobbs.com/c-and-c-case-stu ... /184401562
source: http://www.drdobbs.com/c-and-c-case-stu ... /184401562
- Sat May 24, 2014 12:07 pm
- Forum: newLISP in the real world
- Topic: a journey in seek of a new language
- Replies: 2
- Views: 1342
Re: a journey in seek of a new language
I work with the manual essentially, plus the "code patterns" file. Both of them give a lot of recipes. One thing to note about NewLisp is that its built-in functions library is very rich. And many of these functions can be used in more than one way thanks to the clever use of default parameters. As ...
- Mon Mar 24, 2014 6:40 pm
- Forum: Whither newLISP?
- Topic: RFC: A reference counted newLISP (and how to implement it).
- Replies: 6
- Views: 8811
Re: RFC: A reference counted newLISP (and how to implement i
Maybe that work could be reused for a different thing. I didn't really run into the issue as of yet, but a potential memory management problem may happen with external libraries that return allocated object, and you are responsible for freeing them. It seems there exist no way to "link" with Newlisp...
- Fri Mar 21, 2014 12:25 pm
- Forum: newLISP in the real world
- Topic: if we can see line number in error message
- Replies: 11
- Views: 2671
Re: if we can see line number in error message
Debugging and error messages are still a weak point of Newlisp for me. I could make it slightly easier by inserting a call to getDebuggerInput() at the end of printErrorMessage(). At least one can check the value of local variables, arguments, and even those of the callers if names don't overlap. Ca...
- Fri Mar 21, 2014 9:22 am
- Forum: newLISP in the real world
- Topic: Optimisations
- Replies: 2
- Views: 1223
Optimisations
Arrays versus Lists The deal is that lists are good at insertion and bad at random access, while arrays suck at insertion and are good at random access (I've measured a 30% difference on random accesses). More often than not, one does a bit of both, so the choice between lists and arrays is not obv...
- Tue Mar 18, 2014 11:15 am
- Forum: So, what can you actually DO with newLISP?
- Topic: newLisp vs node.js
- Replies: 5
- Views: 5677
Re: newLisp vs node.js
Node.js is popular because it's javascript. It let "web" developers reuse their knowledge, server-side. Javascript itself is one of the biggest steal in CS history IMHO. The language design is full of WTFs (kind of the opposite image of Newlisp if you ask me), but it is the language of web browsers....
- Tue Mar 18, 2014 10:43 am
- Forum: newLISP in the real world
- Topic: portability issue with net-receive-from
- Replies: 1
- Views: 1029
portability issue with net-receive-from
I used (net-receive-from) to make a little UDP proxy under linux. When I ran it under windows, it unexpectedly didn't work.
It seems that under Windows (XP), the address field which is returned is in the form ip-address:port.
It seems that under Windows (XP), the address field which is returned is in the form ip-address:port.
- Tue Mar 18, 2014 10:17 am
- Forum: newLISP in the real world
- Topic: FOOP recursive method
- Replies: 4
- Views: 1471
Re: FOOP recursive method
Maybe a useful tip: use letex to avoid fiddling manually with self-fields. For instance:
Code: Select all
(letex (H '(self 1) L '(self 2))
(define (rectangle:perimeter) (* 2 (+ H L)))
(define (rectangle:area) (* H L)))
- Wed Mar 05, 2014 5:26 pm
- Forum: Whither newLISP?
- Topic: fexpr issues
- Replies: 18
- Views: 8761
Re: fexpr issues
I know this is different from what I initially asked for, but... if you remove lines from 4912 to 4921 (the ones that insert the expansion code), one gets interesting options for forging the replacement expression. Like for instance this improved curry: (macro (curry*) (case (length $args) (2 (letex...
- Wed Mar 05, 2014 11:54 am
- Forum: Whither newLISP?
- Topic: fexpr issues
- Replies: 18
- Views: 8761
Re: fexpr issues
Also, I spotted by chance a misuse of define-macro in the "apply" entry: my-gcd is defined as a macro; but if you try (my-gcd 12 18 (+ 1 2 3)) one gets an error.
- Tue Mar 04, 2014 5:40 pm
- Forum: Whither newLISP?
- Topic: fexpr issues
- Replies: 18
- Views: 8761
Re: fexpr issues
Oh, nice!
Do I have to wait 10.5.8 to officially come out or can I grab it right now?
Do I have to wait 10.5.8 to officially come out or can I grab it right now?
- Tue Mar 04, 2014 8:42 am
- Forum: newLISP in the real world
- Topic: read-line optimisation
- Replies: 3
- Views: 1316
read-line optimisation
Hello, While programming a little tool that analyses some log file, I've noticed that read-line is a bit slower than one would expect. Looking at its code, it appeared to me reading the stream char-by-char could be the cause. I Modified it to use fgets instead: char * readStreamLine(STREAM * stream,...
- Fri Feb 28, 2014 7:07 pm
- Forum: Whither newLISP?
- Topic: fexpr issues
- Replies: 18
- Views: 8761
Re: fexpr issues
May be if you replace (println k) with (println “=====>” k), you can better follow the debug behavior Indeed I thought about this possibilty and did something like that. It seems I didn't put enough dashes in my println. fexprs are functions, so I would argue: the behavior is expected. args should ...
- Fri Feb 28, 2014 9:42 am
- Forum: Whither newLISP?
- Topic: fexpr issues
- Replies: 18
- Views: 8761
fexpr issues
Consider this dumbed-down version of do-until: (module "macro.lsp") (define-macro (DO-UNTIL test B) (do-while (not (eval test)) (eval B))) (macro (DO-UNTIL* T B) (do-while (not T) B)) (println "test 1") (define (foo k) (DO-UNTIL (<= k 0) (begin (println k) (dec k)))) (foo 3) (println "test 2") (defi...
- Wed Jan 29, 2014 11:28 am
- Forum: newLISP in the real world
- Topic: FFI - struct passed by value
- Replies: 2
- Views: 1138
Re: FFI - struct passed by value
Thanks. (set 'GA "gappw32.dll") (struct 'Rect "int" "int" "int" "int") (import GA "app_new_app" "void*" "int" "void*") (import GA "app_new_window" "void*" "void*" "Rect" "char*" "long") (import GA "app_main_loop" "void" "void*") (import GA "app_show_window" "void" "void*") (import GA "app_new_label"...
- Tue Jan 28, 2014 10:46 pm
- Forum: newLISP in the real world
- Topic: FFI - struct passed by value
- Replies: 2
- Views: 1138
FFI - struct passed by value
I'd like to use this nice little GUI library: http://enchantia.com/software/graphapp/ The widget set is not as full featured as other libraries but it's good enough for simple user interfaces. Plus it fits in a single 700K DLL and is portable. The problem is that it passes and returns one of its maj...