Search found 46 matches
- Sun Sep 12, 2010 12:26 am
- Forum: Anything else we might add?
- Topic: remember the bracket notation thread?
- Replies: 8
- Views: 5114
Re: remember the bracket notation thread?
ok, I still would welcome improvements, but I just found an easy solution to the punctuation problem: put punctuation characters in the expression! Ta daaa, one problem solved.
- Sat Sep 11, 2010 2:14 pm
- Forum: Anything else we might add?
- Topic: remember the bracket notation thread?
- Replies: 8
- Views: 5114
Re: remember the bracket notation thread?
oh, here's the uglier one with the flubber. #!/usr/bin/newlisp (change-dir (real-path)) (set 'the-args (join (rest (rest (main-args))) " ") 'a (read-file the-args) ;'a1 (append the-args "-original") 'a2 (append the-args "-bracketed-nomarkup") 'a3 (append the-args "-markup") 'aa "" 'b (parse a {\[[0-...
- Sat Sep 11, 2010 2:07 pm
- Forum: Anything else we might add?
- Topic: remember the bracket notation thread?
- Replies: 8
- Views: 5114
Re: remember the bracket notation thread?
Hey cormullion, grepper slipped past me--looks good! Your example matched everything, though. Hans-Peter, thanks, yours did the trick. I added a character class for line-breaks and then got a script working. After I started using my script, though, I discovered that I also need one for punctuation, ...
- Thu Sep 09, 2010 3:24 am
- Forum: Anything else we might add?
- Topic: remember the bracket notation thread?
- Replies: 8
- Views: 5114
remember the bracket notation thread?
Well, I'd like to revisit the editing-via-brackets thing. So, to begin with, may I please have a regular expression that matches three sets of brackets, empty or full?
[][][]
or
[stuff] [and] [junk]
or any combination imaginable.
Thank you. (stupid regex!)
[][][]
or
[stuff] [and] [junk]
or any combination imaginable.
Thank you. (stupid regex!)
- Sat Aug 14, 2010 1:16 pm
- Forum: newLISP and the O.S.
- Topic: open files code example
- Replies: 1
- Views: 2048
open files code example
may I have one? I use newlisp all the time to interact with other applications, say, to open an editor with a newlisp-generated file--I'd like to see if the editor is already running with said file open, and if it is, do nothing, or rerun my script, etc. I can do this in an awkward way by calling ps...
- Wed Jul 21, 2010 2:23 am
- Forum: Anything else we might add?
- Topic: Emacs org-mode and babel
- Replies: 0
- Views: 2840
Emacs org-mode and babel
Hey guys, recently, I started playing with org-mode for emacs (http://orgmode.org). From the homepage: Org-mode is for keeping notes, maintaining ToDo lists, doing project planning, and authoring with a fast and effective plain-text system. What I thought might be of interest to you guys is org-babe...
- Tue Jul 20, 2010 7:59 pm
- Forum: newLISP and the O.S.
- Topic: NewLISP and CentOS
- Replies: 3
- Views: 3044
Re: NewLISP and CentOS
centos may have newlisp in its repositories, but I would go ahead and compile it manually, myself.
- Sat Jul 10, 2010 2:13 pm
- Forum: newLISP in the real world
- Topic: REPL and newline
- Replies: 10
- Views: 3340
Re: REPL and newline
Anyway, guys thank you for replies and explanations. Although I would like the author himself participated this tiny discussion, looks like he nicely ignored all of this. Who knows, maybe this bug (as it obviously is) is not worth of any discussion, because it's solution probably does not fit into ...
- Tue Apr 27, 2010 12:52 pm
- Forum: newLISP and the O.S.
- Topic: Seeking NEWLISP 9.3.12 manual
- Replies: 3
- Views: 3133
- Wed Mar 24, 2010 8:16 pm
- Forum: Anything else we might add?
- Topic: why does this do this?
- Replies: 5
- Views: 4232
Re: why does this do this?
No need to apologize--your input was welcome and helpful, and I was joking about documentation. :-)
- Tue Mar 23, 2010 9:50 pm
- Forum: Anything else we might add?
- Topic: why does this do this?
- Replies: 5
- Views: 4232
Re: why does this do this?
Yep. seems counterintuitive. I did notice the (exit) bit--in my example it was commented out, I think. I was confused because I never told newlisp to read anything. Just of the top of my head, it seems like the argument should have been treated as though it was "bob," or anything else. It just happe...
- Tue Mar 23, 2010 9:41 pm
- Forum: newLISP newS
- Topic: Manual and release notes for upcoming 10.2.0
- Replies: 31
- Views: 16150
Re: Manual and release notes for upcoming 10.2.0
peanut gallery here. all of that sounds very cool and useful to me. :-)
- Mon Mar 22, 2010 1:34 am
- Forum: Anything else we might add?
- Topic: why does this do this?
- Replies: 5
- Views: 4232
why does this do this?
go.lsp ...
a.txt ...
b.txt ...
$ ./go.lsp a.txt
newLISP v.10.2.1 64-bit on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.
> b
"a.txt"
$ ./go.lsp b.txt
ERR: invalid function : (hello)
Code: Select all
#!/usr/bin/newlisp
(set 'b (join (rest (rest (main-args))) " "))
;(exit)
Code: Select all
hello
Code: Select all
(hello)
newLISP v.10.2.1 64-bit on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.
> b
"a.txt"
$ ./go.lsp b.txt
ERR: invalid function : (hello)
- Sat Mar 13, 2010 9:13 pm
- Forum: newLISP in the real world
- Topic: simple template replacement
- Replies: 12
- Views: 2928
Re: simple template replacement
Thanks guys, that did the trick. originally, the tags were ",1," and I changed them to "1=". I changed them back. :-)
- Sat Mar 13, 2010 7:44 pm
- Forum: newLISP in the real world
- Topic: simple template replacement
- Replies: 12
- Views: 2928
Re: simple template replacement
hmm, some wild code there. Edit: I think I see what you're doing now. It's doing 12 for me. Because the length is 12... ? yeah, pretty wild. I often hesitate to "show off" just because it's so dang ugly... I get 12 replacements but only 10 correct replacements. For 11 and up it replaces from somewh...
- Sat Mar 13, 2010 1:22 pm
- Forum: newLISP in the real world
- Topic: simple template replacement
- Replies: 12
- Views: 2928
Re: simple template replacement
Hi guys, this thing I have more or less working only correctly makes ten replacements. can you see what's wrong? the newlisp #!/usr/bin/newlisp (set 'written '((1 "1=" "one") (2 "2=" "two") (3 "3=" "three") (4 "4=" "four") (5 "5=" "five") (6 "6=" "six") (7 "7=" "seven") (8 "8=" "eight") (9 "9=" "nin...
- Sat Feb 20, 2010 7:52 pm
- Forum: newLISP in the real world
- Topic: setf and cons
- Replies: 2
- Views: 1043
Re: setf and cons
Yep, I think so, thanks. I think it was "sym" that I was missing.
I need to memorize all the functions, I guess, because when I need them I either can't remember them or can't find them.
I need to memorize all the functions, I guess, because when I need them I either can't remember them or can't find them.
- Sat Feb 20, 2010 2:23 pm
- Forum: newLISP in the real world
- Topic: setf and cons
- Replies: 2
- Views: 1043
setf and cons
Hey guys, given this: (define (c cc)(setf (eval (cc 0)) (cons (cc 1) '()))) I get this: ERR: no symbol reference found I see in the manual that this is normal, but I'd like to find an alternative way of making ("this" "that") into something that results from something like (set 'this "that") let me ...
- Wed Dec 02, 2009 7:15 pm
- Forum: newLISP in the real world
- Topic: simple template replacement
- Replies: 12
- Views: 2928
Re: simple template replacement
Hmm a bit too vague there] sorry about that. ,1, Heading ,2, paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph paragraph ,3, listitem ,4, listitem ,5, nested listitem ,6, paragraph paragraph paragraph paragrap...
- Wed Dec 02, 2009 4:06 pm
- Forum: newLISP in the real world
- Topic: simple template replacement
- Replies: 12
- Views: 2928
simple template replacement
Howdy guys, I want to label a text file with something like, ",1," ",2," etc, and copy what follows the 1 to what precedes the 2, etc, then stick it into corresponding spot in a template. There are regular expressions and junk in there I'm not too comfortable with, so I thought I'd rather ask than s...
- Mon Nov 02, 2009 7:38 pm
- Forum: newLISP newS
- Topic: newLISP Fan Club is Moving!
- Replies: 39
- Views: 20151
Re: newLISP Fan Club is Moving!
hey ryon,
I did finally remember my own address, but when the forum sent me a new password, I never received it.
really, it's ok; this username is fine.
I did finally remember my own address, but when the forum sent me a new password, I never received it.
really, it's ok; this username is fine.