Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - newdep

#31
Aaaaa finaly!...  thanks lutz! ;-)


Quote
read-file, write-file, append-file and delete-file when used with http:// URLs will now return nil under error conditions instead of throwing an error
#32
Again a syntax highlight for newlisp, but this time for a very good text editor!

Im working on a snippets collection too..its on its way...  ;-)



Enjoy..





; EmEditor Syntax File
;
; To import this file to an existing configuration, select Configuration
; under the Tool menu, select Define Configurations, select a configuration
; you want to import to, press [Properties], select the Highlight page, and
; press [Import].
;
; emeditor newLisp highlights v 1.0 by newdep 2012 (http://www.newlisp.org)
;
; Submit your customized file to submit@emurasoft.com
; to be listed in www.emurasoft.com user files pages.
;
#Highlight=on
#BeginTag=
#EndTag=
#CommentBegin=[cmd]
#CommentEnd=[/cmd]
#LineComment1=^;
#LineComment2=^#
#SingleQuote=off
#DoubleQuote=on
#ContinueQuote=off
#Escape=
#ScriptBegin=
#ScriptEnd=
#SpecialSyntax=off
#HighlightBraces=on

#Keyword color=2,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off
$
$0
$1
$10
$11
$12
$13
$14
$15
$2
$3
$4
$5
$6
$7
$8
$9
$args
$idx
$it
$main-args

#Keyword color=3,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off
!
!=
%
&
*
+
-
/
:
<
<<
<=
=
>
>=
>>
?
@
|
~

#Keyword color=1,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off
Class
MAIN
NaN?
Tree
abort
zero?
abs
acos
acosh
add
address
amb
and
append
append-file
apply
args
array
array-list
array?
asin
asinh
assoc
atan
atan2
atanh
atom?
base64-dec
base64-enc
bayes-query
bayes-train
begin
beta
betai
bind
binomial
bits
callback
case
catch
ceil
change-dir
char
chop
clean
close
command-event
cond
cons
constant
context
context?
copy
copy-file
cos
cosh
count
cpymem
crc32
crit-chi2
crit-z
current-line
curry
date
date-value
debug
dec
def-new
default
define
define-macro
delete
delete-file
delete-url
destroy
det
device
difference
directory
directory?
div
do-until
do-while
doargs
dolist
dostring
dotimes
dotree
dump
dup
empty?
encrypt
ends-with
env
erf
error-event
error-number
error-text
estack
eval
eval-string
exec
exists
exit
exp
expand
explode
factor
fft
file-info
file?
filter
find
find-all
first
flat
float
float?
floor
flt
for
for-all
format
fv
gammai
gammaln
gcd
get-char
get-float
get-int
get-long
get-string
get-url
global
global?
if
if-not
ifft
import
inc
index
int
integer
integer?
intersect
invert
irr
join
lambda?
last
legal?
length
let
letex
letn
list
list?
load
local
log
lookup
lower-case
macro?
main-args
make-dir
map
mat
match
max
mdl
member
min
mod
module
mul
multiply
name
net-accept
net-close
net-connect
net-error
net-eval
net-interface
net-listen
net-local
net-lookup
net-peek
net-peer
net-receive
net-receive-from
net-receive-udp
net-select
net-send
net-send-to
net-send-udp
net-service
net-sessions
new
nil
nil?
normal
not
now
nper
npv
nth
null?
number?
open
or
ostype
pack
parse
pipe
pmt
pop
pop-assoc
post-url
pow
pretty-print
primitive?
print
println
prob-chi2
prob-z
process
prompt-event
protected?
push
put-url
pv
quote
quote?
rand
random
randomize
read-buffer
read-char
read-expr
read-file
read-key
read-line
real-path
ref
ref-all
regex
regex-comp
remove-dir
rename-file
replace
reset
rest
reverse
rotate
round
save
search
seed
seek
select
semaphore
sequence
series
set
set-locale
set-ref
set-ref-all
setf
setq
sgn
share
signal
silent
sin
sinh
sleep
slice
sort
source
spawn
sqrt
starts-with
string
string?
sub
swap
sym
symbol?
symbols
sync
sys-error
sys-info
tan
tanh
throw
throw-error
time
time-of-day
timer
title-case
trace
trace-highlight
transpose
trim
true
true?
unify
unique
unless
unpack
until
upper-case
uuid
when
while
write-buffer
write-char
write-file
write-line
xml-error
xml-parse
xml-type-tags

#Keyword color=4,word=on,rightall=off,case=off,insidetag=off,regexp=on,rightall2=off
'

#Keyword color=5,word=on,rightall=on,case=off,insidetag=off,regexp=off,rightall2=on
[text]
[/text]
#33
Thats funny ;-) I would have expected to see LUA inside newlisp and not the other way around.

But then again ... using the way of the compiler it makes sense ;-)
#34
Yes no problem (theoretically), but you dont want to reinvent the wheel and create a new serial driver on kernel level in newlisp using embeded C or Asm code...



When you have setup the lowlevel tty flowcontrol for the serial device newlisp can talk to the device/file without a problem..
#35
..Ofcourse we do need 2D games... a game is a game and every game is different.



You could ask yourself 'why' youre doing it though?..



And then there are ofcourse loads of alternative consoles... Personaly I hate games on a phone,

on the Ipad..its more like..Mooaahh...  but behind a full console wide-screen setup..let them come ;-)



Creating games is a very good learning curve... Hacking, faster, better coding.. being creative..etc..



I would say..try and finish the development of your game, that itself is already a hightscore ;-)
#36
Whither newLISP? / destructive setq ?
May 21, 2012, 03:13:40 PM
Hi Lutz,



The problem below looks familiar to me but i cant find/recall the explenation in the manual,

perhpas you can clear me up.. I would intepret it as a bug , as its not explained as a feature in the manual.



The question is , why doesn't the use of -1 or 'last apply to setq/setf for strings?

As the impression is made inside the manual that setq/setf can be used for string manipulation.



Problem is, with common sense, im unable to append 2 strings without deleting the last char. of the first.


> (setq A "Hello/")
"Hello/"
> (setq (A -1) "world")
"world"
> A
"Helloworld"
> (setq (A -1) "!")
"!"
> A
"Helloworl!"
> (setq (last A) "!")
"!"
> A
"Helloworl!"
>
#37
Of all options i did not test read-line... how stupid of me ;-) Thanks..
#38
Hi Lutz,



...yes yes i know :-), but my suggestion is more related to newlisp as being a command-line filter

and not such as being able to filter, its about 'not' creating a file/script when using newlisp but

about using newlisp on the command-line.



newlisp has functions that can be used on the regullar command-line in the OS, outside newlisp.





Just simple example on how it could be used:
# assuming $IN eats from STDIN on the commandline
echo 234.234 | newlisp -e '(add $IN 24.4234)'
258.6574

#or
cat myfile | newlisp -e '(explode $IN)'

#or
firstscript.lsp | newlisp -e '(net-send-udp "host.com" 1233 $IN)'

# or






Greetings :-)
#39
Hi Lutz,



is it possible to extend newlisp so that its capable of beeing a 'filter'.

So it accepts input during startup.



example:



echo "(println "hello newlisp")" | newlisp -e '(eval $main-args)'



I know $main-args wont work here but its just an example.



I would like to use newlisp in the command stream of linux this way.



Hope its something you to concider?



Greetings :-)
#40
Whither newLISP? / Re: Feature request: parse
May 07, 2012, 10:29:09 AM
Hi Lutz,



Well..



"... When no str-break is given, parse tokenizes according to newLISP's internal parsing rules...."



I think.. Im confused here.. Or by a different parser or by an older version of newlisp.



...issue closed for me..sorry for the interruption.. Ill stick a YellowIsh paper right in the middle of my

monitor to always add a str-break with parse and not leave it empty! ;-)
#41
Whither newLISP? / Feature request: parse
May 06, 2012, 08:36:36 AM
Hi Lutz,



A pothole for many (at least for me over and over again) is 'parse. ..i lost count..



Quicky parsing a string in newlisp cant be done without regex, or without inteferance of a pre-eval.

( And I believe a language should stay nice to look at ;-)



The pre-eval of str-data is something you quickly forget. The awkward part in parse is this

i.e. the octal issue, its already too late when its discovered...everyone runs into it at one time...



It would make a great improvement to useability versus expectation to see 'parse having an

extra parameter like: 'nil which indicated 'parse to handle its string being "dumb" without a pre-eval

of the str-data itself.



syntax: (parse str-data [str-break [int-option]] 'nil)



I believe it simply has many advantages having 'parse for quick & dirty use for str-data and

pass regex-crypto for simple things...



Hope its something you can consider? ;-)



Grt, Norman
#42
Thanks for this fix! I wondered already what it was but you found it, I ran several times into this issue...

Ill try it right away ;-)



---

The command-event function now trims trailing line-feed characters in all compile and platform flavors. Previously only UNIX and readline lib enabled versions would trim the string passed by command-event.

---
#43
A correction here to be made alex! It does work!



The .BAT version on my Win7 runs directly into a newlisp prompt but the .CMD works! .. Thanks!
#44
What do i catch here a wikibooks entry on newlisp? Never seen thatone befor? Thanks for the highlight ;-)
#45
Nice catch , I thought i give it a try but on my win7 it jumps right over the newlisp program into the newlisp prompt.

I too was this week seeking for a clean execute solution too on windows,

as on OS/2 i can use the COMSPEC= that cant be used under windows..



I have seen some perl examples doing these tricks but not very delightful

perhpas i run into another solution as this example is 99% close ;-)