Search found 36 matches

by jrh
Wed Feb 06, 2008 12:52 am
Forum: Anything else we might add?
Topic: Another newLISP-like language :)
Replies: 49
Views: 47397

Then why use contexts or OOP at all? Why indeed. Especially when implemented in a half-assed kludgy way as in C++ or Java. As for newLISP, I tried using contexts as objects but the performance was dog slow. Whether FOOP is worth it remains to be seen. I certainly haven't seen any advantages to it y...
by jrh
Tue Feb 05, 2008 11:56 pm
Forum: Anything else we might add?
Topic: Another newLISP-like language :)
Replies: 49
Views: 47397

Jeff wrote:Advantages: lexical scoping
Lexical scoping is nothing but a computer "science" shibboleth.
by jrh
Fri Feb 01, 2008 3:33 pm
Forum: newLISP newS
Topic: release newLISP version 9.3
Replies: 8
Views: 6142

newBert wrote:I think I'm going to abandon definitely Scheme ;)
I think you should abandon any indefinite Schemes too! ;-)

I downloaded the Mac PPC version last night. Everything is working just fine so far on OS X 10.4.11.
-
by jrh
Fri Feb 01, 2008 3:25 am
Forum: Anything else we might add?
Topic: Redefine DEFINE?
Replies: 17
Views: 16961

Building it in makes the languages syntax more complex. It is confusing and it also makes building expressions on the fly more difficult.
by jrh
Thu Jan 31, 2008 4:00 pm
Forum: Anything else we might add?
Topic: Redefine DEFINE?
Replies: 17
Views: 16961

Fanda wrote:In my opinion it sometimes makes things harder to read, because you have to remember exactly how many parameters function takes.
Well said.
by jrh
Sat Oct 27, 2007 4:30 pm
Forum: Anything else we might add?
Topic: regex again
Replies: 24
Views: 21661

Syntax should be as clear as possible. Some algorithms cannot be expressed simply, because they are not simple algorithms. They can however be broken up into simpler pieces, it's called modular programming. Regexes suck because they 1) don't do that and 2) use such terse symbols that one need const...
by jrh
Sat Oct 27, 2007 4:11 pm
Forum: Anything else we might add?
Topic: regex again
Replies: 24
Views: 21661

HPW wrote: Paste it in RegexBuddy and let explain it:
I would have to get a M$ Windoze system in order to do that. That seems like going from bad to worse! ;-)
by jrh
Sat Oct 27, 2007 3:23 pm
Forum: Anything else we might add?
Topic: regex again
Replies: 24
Views: 21661

Re: regex again

Holy Schneikees! What is *that* supposed to do? Only a nitwit would write something like that or spend time figuring out what it did. I must say that the excessive use of macros in LISP is another example of this syndrome. I don't care how rich he is, Paul Graham is dead wrong. Clear , concise, and...
by jrh
Fri Oct 12, 2007 9:40 pm
Forum: Anything else we might add?
Topic: regex again
Replies: 24
Views: 21661

With awk you can break it up into program steps. Better yet is to get rid of all those awful special characters in regular expressions. Here is a discussion of a possible LISPy way out of Perl/regex hell:

http://c2.com/cgi/wiki?AlternativesToRegularExpressions
by jrh
Fri Oct 12, 2007 9:09 pm
Forum: Anything else we might add?
Topic: regex again
Replies: 24
Views: 21661

Re: regex again

cormullion wrote: Is there a rough rule of thumb for when converting Perl regexen to newLISP
Yes, don't. Use awk. It may be wordy but at least it is comprehensible.
by jrh
Thu Oct 11, 2007 10:52 pm
Forum: Anything else we might add?
Topic: Advice on programming style...
Replies: 7
Views: 5840

Subroutines instead of functions, whatever floats your boat, but I'll pass.
by jrh
Thu Oct 11, 2007 10:52 pm
Forum: Anything else we might add?
Topic: A 3D Text Editor?
Replies: 10
Views: 8301

Meh... must be why I don't like compilers. Better to push 1 on the stack then another, etc...
by jrh
Thu Oct 11, 2007 8:38 pm
Forum: Anything else we might add?
Topic: Advice on programming style...
Replies: 7
Views: 5840

That dolist looks like Fortran (as do all dolists).

(func3 (func2 (func1 s))) is LISP !!!
-
by jrh
Thu Oct 11, 2007 8:24 pm
Forum: Anything else we might add?
Topic: A 3D Text Editor?
Replies: 10
Views: 8301

Jeff wrote:Rather than parsing 1 + 1 and requiring the parser to turn into something like PLUS, 1, 1 for the evaluating code
Shouldn't that be 1 1 PLUS ?
by jrh
Sat Sep 22, 2007 1:26 am
Forum: Anything else we might add?
Topic: redirecting functions
Replies: 5
Views: 4128

God, what a mongrelized bastard newLISP is! (this is a good thing.)

With C library support and sockets, a TCL/TK interface, and now Java graphics it's the language of The Day of the Triffids. Watch out, you will be assimilated!
by jrh
Tue Sep 18, 2007 7:36 pm
Forum: newLISP in the real world
Topic: Max threads
Replies: 9
Views: 6588

Hmmmm.. It looks like WindowServer is started by mach_init way before any global shell stuff is executed. Just check to make sure your custom wrapper hasn't been nuked after a software upgrade.

So does OS X distribute your forked procs over all the processors? :-)
by jrh
Tue Sep 18, 2007 7:11 pm
Forum: newLISP in the real world
Topic: Max threads
Replies: 9
Views: 6588

You can stick the command ulimit -u 256 (or whatever number) in bashrc (or lower) and then all user privilege level shells and child processes will inherit that limit for the lifetime of the process.
by jrh
Tue Sep 18, 2007 6:50 pm
Forum: newLISP in the real world
Topic: Max threads
Replies: 9
Views: 6588

There are a number of subsystems that have configurable settings at startup. You can run the command sysctl -a to see all of them. Everything is called from the /etc/rc file and it is usually a good idea to place your custom changes in the appropriate file called by rc such as (in this instance) sys...
by jrh
Tue Sep 18, 2007 5:35 pm
Forum: newLISP in the real world
Topic: Max threads
Replies: 9
Views: 6588

The default number of procs per user session in OS X is 100. There is a configuration parameter maxprocperuid in a .conf file over in /etc (i forget which) that you can set to override this limit.
by jrh
Tue Sep 18, 2007 5:08 pm
Forum: newLISP in the real world
Topic: Threading with fork/semaphore/share
Replies: 2
Views: 2750

Why do you find it necessary to use a macro for this?
by jrh
Fri Aug 24, 2007 4:23 pm
Forum: Anything else we might add?
Topic: Optimized tail recursion
Replies: 8
Views: 5873

The SATA drive should not be a factor either as War and Peace will easily fit into RAM. I know you are thrilled as all get out by your toy, but frankly I'm not impressed. Given the current state of OSX and the available compilers, using a quad core for anything but a server seems pretty silly to me....
by jrh
Fri Aug 24, 2007 3:05 pm
Forum: Anything else we might add?
Topic: Optimized tail recursion
Replies: 8
Views: 5873

Jeff wrote: Interestingly enough, it takes about the same amount of time (assuming we are still talking about war and peace) on a quad-core g5.
That's because it is only using one processor.
by jrh
Wed Aug 15, 2007 4:22 pm
Forum: Anything else we might add?
Topic: Counting chars in a string
Replies: 14
Views: 10190

Is there no way to iterate quickly over the chars in a string? What is newLisp's internal representation of a string like? Strings and text appear as contiguous areas of memory in newLISP. Fastest iteration I've found while staying in newLISP is to index into them from the base address: (time (setq...
by jrh
Fri Jul 20, 2007 11:40 pm
Forum: newLISP newS
Topic: Loop that collects results?
Replies: 9
Views: 7021

Don't let that computer just sit there. Generate some cpu cycles!

Code: Select all

> (map eval (transpose (append (transpose (dup (list (sym (char 42)) 2) 10)) (list (rest (index string? (explode "C++  sucks!")))))))

(2 4 6 8 10 12 14 16 18 20)
---
by jrh
Thu Jul 19, 2007 9:20 am
Forum: newLISP newS
Topic: Loop that collects results?
Replies: 9
Views: 7021

Re: Loop that collects results?

Code: Select all

> (rest (filter (lambda (x) (= (% x 2)0)) (sort (unique (rand 21 210)))))

(2 4 6 8 10 12 14 16 18 20)
---