Search found 64 matches

by bairui
Mon Dec 03, 2012 8:16 am
Forum: newLISP in the real world
Topic: formatting 'nil'
Replies: 9
Views: 4015

Re: formatting 'nil'

There might be a shorter way to express this, but my limited (new)lisp-fu offers you:

Code: Select all

(format "%s,%s,%s,%s" (map (fn (x) (or x "")) fruits))
by bairui
Mon Nov 26, 2012 9:49 pm
Forum: newLISP newS
Topic: ERR: no working directory found
Replies: 3
Views: 6994

Re: ERR: no working directory found

(this could be utterly off track, but i've seen something similar before)

Do you have any non-ascii characters in your path?
Does it work if you move your working directory to c:\foo\ ?
by bairui
Tue Oct 09, 2012 1:15 am
Forum: newLISP Graphics & Sound
Topic: seesaw for newlisp?
Replies: 0
Views: 6330

seesaw for newlisp?

Has anyone played with the seesaw swing library for clojure? I have only dabbled so far, but it looks pretty sexy. How does it stack up against newlisp's guiserver? Would a port of seesaw to newlisp be:

1. possible
2. worthwhile
3. desirable

?
by bairui
Mon Oct 08, 2012 7:58 am
Forum: newLISP Graphics & Sound
Topic: Can't get tag list for gs:mouse-released event...
Replies: 6
Views: 9153

Re: Can't get tag list for gs:mouse-released event...

Nothing bright to add to this, oofoe, except to say: nice work
by bairui
Fri Oct 05, 2012 8:21 am
Forum: newLISP in the real world
Topic: utf8 (chinese) in current working directory path on windows
Replies: 6
Views: 2614

Re: utf8 (chinese) in current working directory path on wind

Thanks for the left-field thinking, xytroxon. :-) I should have mentioned that Chinese is working in other places. I should also have mentioned that this is Win XP. I just tested again and discovered that I can type in Chinese, even in the newLISP IDE. If I open a file (from within the newLISP IDE) ...
by bairui
Fri Oct 05, 2012 6:38 am
Forum: newLISP in the real world
Topic: utf8 (chinese) in current working directory path on windows
Replies: 6
Views: 2614

Re: utf8 (chinese) in current working directory path on wind

Thanks, xytroxon,

I was using the UTF-8 version, yes. I haven't tested this with the non-UTF-8 version.

I wonder... the GUI IDE depends on JRE... Might my Sun Java 1.7 JRE not be UTF-8 compatible? Is that even possible?

o_O

-- bazz
by bairui
Thu Oct 04, 2012 10:00 am
Forum: newLISP in the real world
Topic: utf8 (chinese) in current working directory path on windows
Replies: 6
Views: 2614

Re: utf8 (chinese) in current working directory path on wind

Thanks for the prompt, winger. I didn't show any code before because fails were happening in places that weren't failing in linux. I assumed there must have been a known windows glitch that people would inform me of here. I finally got some time today to grab a windows box and look at the problem in...
by bairui
Tue Oct 02, 2012 2:39 am
Forum: newLISP in the real world
Topic: Request for critique
Replies: 2
Views: 1565

Re: Request for critique

Thanks for the feedback, Cormullion. I have integrated all of your suggestions along with a few other modifications. While I appreciate any and all feedback, I was particularly looking for some solid GUI best-practice corrections. I have this niggling feeling that I'm Doing It The Wrong Way. Too man...
by bairui
Mon Oct 01, 2012 4:36 am
Forum: newLISP in the real world
Topic: Request for critique
Replies: 2
Views: 1565

Request for critique

Hi, guys, I'm very new to lisp (in general, and newLISP in particular). I'm also fairly... GUI challenged - I spend all my time in command-line or text-only environments. Most of my coding experience has been limited to this domain. As such... I suck at building GUIs and would LOVE for some construc...
by bairui
Mon Oct 01, 2012 3:24 am
Forum: newLISP in the real world
Topic: utf8 (chinese) in current working directory path on windows
Replies: 6
Views: 2614

utf8 (chinese) in current working directory path on windows

I dev on a linux box and only get to test on a windows box periodically. I have noticed failures on the windows machine that are solved by simply ensuring that the newlisp script is moved to a directory that doesn't contain chinese characters in the path (like, C:\foo\). I saw an error at one stage ...
by bairui
Mon May 14, 2012 9:00 am
Forum: newLISP in the real world
Topic: cleaning strings
Replies: 8
Views: 3692

Re: cleaning strings

Cool. I was thinking of something along the same lines:

(setf input "a bb ccc dddd eeeee ffffff")
(filter (fn (s) (>= (length s) 4)) (parse input))
by bairui
Sun May 06, 2012 5:47 am
Forum: newLISP in the real world
Topic: read-line on file handle seeks to EOF
Replies: 3
Views: 1726

Re: read-line on file handle seeks to EOF

Thanks for the quick reply, acknowledgement of the bug and having it fixed in dev already, Lutz.
This is not an emergency, so I can wait for the update to trickle down. I'm on Arch Linux.

Love newLISP, btw, Lutz - such a clean and pretty little lisp. Thanks for all the good work.
by bairui
Sun May 06, 2012 3:07 am
Forum: newLISP in the real world
Topic: read-line on file handle seeks to EOF
Replies: 3
Views: 1726

Re: read-line on file handle seeks to EOF

I found a workaround for my immediate needs by setting the file pointer to the position after the search: (search file (append {<a name="} search-term {">\s*</a>}) true 1) I'm still not yet skipping the lines after the search, but I imagine I could do that with another regex. Knowing the more idioma...
by bairui
Sun May 06, 2012 2:18 am
Forum: newLISP in the real world
Topic: read-line on file handle seeks to EOF
Replies: 3
Views: 1726

read-line on file handle seeks to EOF

(setq file (open {foo} {read})) (println (seek file)) (read-line file) (println (seek file)) The first seek prints 0 as expected, however the second one prints the EOF byte position. I couldn't find this behaviour documented in the read-line section of the manual. So... is this a bug in newLISP or ...