Search found 2038 matches

by cormullion
Mon Apr 14, 2014 5:41 pm
Forum: newLISP in the real world
Topic: Newbie help with Artful-Mysql
Replies: 14
Views: 8107

Re: Newbie help with Artful-Mysql

Ah, so it was the self-ish additions that were wrong... Good job, mate! (I assume, I can't run the code...)
by cormullion
Fri Apr 11, 2014 2:41 pm
Forum: newLISP in the real world
Topic: Newbie help with Artful-Mysql
Replies: 14
Views: 8107

Re: Newbie help with Artful-Mysql

Perhaps someone with mySQL installed can help - I tried to run mysql.lsp on my Mac but mysql isn't installed by default. I stick to sqlite :). newLISP itself changes quite often - - but there are many libraries out there which don't manage to keep up with the changes.... On another thread, Lutz offe...
by cormullion
Fri Apr 11, 2014 7:27 am
Forum: newLISP in the real world
Topic: Newbie help with Artful-Mysql
Replies: 14
Views: 8107

Re: Newbie help with Artful-Mysql

Some suggestions - I don't actually know the answer...:) If you're using the latest version from Github, that appears to be written for an earlier newLISP version - 10.0.1... It's possible that the change in FOOP (in version 10.2?) has made the code non-functional. I'm not sure whether these code mo...
by cormullion
Sat Mar 22, 2014 10:27 am
Forum: newLISP in the real world
Topic: regex \\d{n} problem
Replies: 9
Views: 4656

Re: regex \\d{n} problem

@bairui yes, their power is undisputed. Beauty? Well, in a way, perhaps. But the reason I hate them is because they make me feel stupid. :) I can write a pattern which works, but when I look at it later I can't understand it at all, and I can't read it fluently. (Have a look at markdown.lsp . I can'...
by cormullion
Fri Mar 21, 2014 5:48 pm
Forum: newLISP in the real world
Topic: regex \\d{n} problem
Replies: 9
Views: 4656

Re: regex \\d{n} problem

Code: Select all

(replace "[^a-z]" "@$@&i&&@&$@h$$a@@&%&@%t@@%@%@e%%&@@$r@$%%e&&%&g@%%u$&&%l&@a&%$r@$%e@%x%&p&r&@$@e&$&ss&$i%&o%%%@ns"{}0)
by cormullion
Tue Mar 18, 2014 5:20 pm
Forum: So, what can you actually DO with newLISP?
Topic: newLisp vs node.js
Replies: 5
Views: 9190

Re: newLisp vs node.js

I've been trying out the new Node.js-based editor, Atom.io. There's a lot to like about it, but the central problem is that it's slowish - it struggles with loading new documents, for example. Perhaps we all spend so much time waiting in web browsers anyway, it's not a problem... :)
by cormullion
Tue Mar 04, 2014 5:37 pm
Forum: newLISP in the real world
Topic: Intersect bug
Replies: 7
Views: 3504

Re: Intersect bug

No worries - it made me read that part of the manual again, so I gained something too... :)
by cormullion
Tue Mar 04, 2014 11:02 am
Forum: newLISP in the real world
Topic: Intersect bug
Replies: 7
Views: 3504

Re: Intersect bug

Perhaps there are some variations in the definition of intersection... With this definition: "All the elements of set A that are in set B": (intersect '(1 2 2 2 3) '(2 2) true) ;-> (2 2 2) it looks correct. But "All the elements of set B that are in set A" should be returning '(2 2). Trouble is, A a...
by cormullion
Tue Mar 04, 2014 10:07 am
Forum: newLISP in the real world
Topic: Intersect bug
Replies: 7
Views: 3504

Re: Intersect bug

Hi tadeas. Is that a bug?
by cormullion
Sat Mar 01, 2014 11:54 pm
Forum: newLISP in the real world
Topic: Problem in crypto.lsp?
Replies: 2
Views: 2034

Re: Problem in crypto.lsp?

By the way, the error appeared when using OAuth authentication for the Twitter API - I think the authentication keys supplied by Twitter are longer and so triggered the if clause...
by cormullion
Sat Mar 01, 2014 6:05 pm
Forum: newLISP in the real world
Topic: Problem in crypto.lsp?
Replies: 2
Views: 2034

Problem in crypto.lsp?

Hi Lutz! I ran into a few problems using crypto.lsp. I eventually solved it by editing the hmac function to look like this: (define (hmac hash_fn msg_str key_str , blocksize opad ipad) (set 'blocksize 64) (set 'opad (dup "\x5c" blocksize)) (set 'ipad (dup "\x36" blocksize)) (if (> (length key_str) b...
by cormullion
Thu Sep 12, 2013 12:08 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

xytroxon wrote:It shall be so:
Madness in great ones must if-not unwatch'd go.

The Tragedy of Hamlet Cormullion, Prince of newLISP Act 3 Scene 1
and from the same pen:
If we do meet again, we’ll smile indeed.
If not, ’tis true this parting was well made.
by cormullion
Wed Sep 11, 2013 6:15 am
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

Cannot remember having seen anybody actually using if-not , except myself. Well, these days you don't have to rely on memory - just search the internet. For example, on Github, two repositories not unknown to the newLISP community - Artful-Code, and Dragonfly - both make use of this function. I use...
by cormullion
Tue Sep 10, 2013 7:05 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

Good points, Ricky. And of course the confused user can't unconfuse themselves by looking in the manual, so, if they find some code of mine which uses if-not , they might not be able to work out how to get my code running. (Not that many people bother.. :).) I do think I use if-not rather like a Per...
by cormullion
Sun Sep 08, 2013 11:03 am
Forum: Anything else we might add?
Topic: Fuzzy logic using newLISP
Replies: 6
Views: 6729

Re: Fuzzy logic using newLISP

Some of the files are still available, at http://web.archive.org/web/20070907010731/http://www.intricatevisions.com/index.cgi?page=nlfuzzy . The test function isn't there, but could probably be re-built. It's something like: (define (print-test-fn ) (println (args 0)) (dolist (a (rest (args))) (doli...
by cormullion
Thu Sep 05, 2013 4:57 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

Thoughts... You may indeed be technically correct - and there may indeed be some logical semantic justification for removing it. However: The main difference to other programming language philosophies is, that some of newLISP's traits are influenced by thinking that is normally not found in the comm...
by cormullion
Wed Sep 04, 2013 8:43 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

:)

The function will "keep working for an indefinite time". More Doctor Who than Sherlock?
by cormullion
Fri Aug 30, 2013 8:33 pm
Forum: newLISP in the real world
Topic: What happened to "if-not"?
Replies: 15
Views: 7999

Re: What happened to "if-not"?

I hope not. No point in changing the basics of the language at this point, surely?
by cormullion
Mon Aug 19, 2013 9:16 pm
Forum: Anything else we might add?
Topic: [semantics] copy of context referenced lists
Replies: 4
Views: 4708

Re: [semantics] copy of context referenced lists

Thanks for the kind words, Lutz. I'm content to not be a programming geek (anyway I failed the entrance exam). In fact, I studied music at college, so I'm not even a proper writer... :) But as you know I particularly like one aspect of newLISP, and that's its informal and casual nature, even though ...
by cormullion
Fri Aug 09, 2013 6:25 pm
Forum: newLISP in the real world
Topic: FOOP colon method invocation from string
Replies: 8
Views: 4321

Re: FOOP colon method invocation from string

Good work, FOOperman. And thanks for the "compliment"! :)
by cormullion
Fri Aug 09, 2013 5:24 pm
Forum: newLISP in the real world
Topic: FOOP colon method invocation from string
Replies: 8
Views: 4321

Re: FOOP colon method invocation from string

Looks good. There are many ways to do it. (define (Circle:Circle (x 10) (y 10) (radius 3)) (list Circle x y radius)) (define (Circle:area) (mul (pow (self 3) 2) (acos 0) 2)) (define (Circle:center) (list (self 1) (self 2))) (define (Circle:circumference) (mul 2 (self 3) (acos 0))) (set 'mycircle (Ci...
by cormullion
Sat Aug 03, 2013 3:24 pm
Forum: newLISP in the real world
Topic: is this a bug?
Replies: 3
Views: 2291

Re: is this a bug?

Not really - at least, not in newLISP... You didn't specify a number base, and then you announced an octal number with the initial "0". But then you blew it with the "8", which is not a valid octal digit. Also, you didn't specify a default value in the event of a failed conversion, so you got the de...
by cormullion
Tue Jul 30, 2013 7:50 pm
Forum: So, what can you actually DO with newLISP?
Topic: Just share what newlisp does for me here
Replies: 7
Views: 9123

Re: Just share what newlisp does for me here

Interesting post! Thanks for contributing it. I think Lutz uses newLISP for everything... :) But I don't use it so much at present - but I still have half a dozen scripts running every day on my machine. These are usually triggered by typing strings while Keyboard Maestro or TextExpander are running...
by cormullion
Mon Jul 29, 2013 5:46 pm
Forum: newLISP in the real world
Topic: Inserting into a nested list (with assoc)
Replies: 4
Views: 3410

Re: Inserting into a nested list (with assoc)

set-ref is nearly as awesome as set-ref-all with match wild-cards! :)