Search found 408 matches

by Dmi
Sun Nov 16, 2008 9:29 pm
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

I think we have two issues here. One is denoting unification variables with ~ . I agree that it is better than uppercase. Still, it is encoding of information in symbol names. Imagine you have expressions F and G ... [skopped] Don't you see that it is encoding information in symbol name? Yes, it is...
by Dmi
Sun Nov 16, 2008 11:40 am
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

...Because one who uses such unify should encode information (~) in variable name. It is not good. Variable names should be just variable names. Imagine language such that programs look like: Not so exactly because such (~) variables will not have any special meaning in newlisp code - just variable...
by Dmi
Sat Nov 15, 2008 8:13 pm
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

I don't see how usage of ~something symbols may break newlisp syntax. I already can do (newlisp shell example) (set '~something 1) ~something 1 The idea is that actually no syntax breaking will occurs: We already can legally use ~-prefixed symbols as regular symbols in newlisp (also $-prefixed, %-pr...
by Dmi
Sat Nov 15, 2008 10:20 am
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

Yes, they are equivalents... but only if we haven't already binded symbols. If so, in Erlang this will be: {IP, _}={"127.0.0.1", something}, .... {IP, Port, {Type, Request}} = {"127.0.0.1", 8658, {"GET", "something"}} this is the actual form. Whether the unification fails, the exeception is thrown (...
by Dmi
Sat Nov 15, 2008 12:24 am
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

Thinking about unify example for newLISP, I found, that Erlang style unification can perfectly fit newLISP. The very cool usage proposal for unification in Erlang is extracting parameters from complex list/touple structures. I.e.: {IP, Port, {Type, Request}} = {"127.0.0.1", 8658, {"GET", "something"...
by Dmi
Tue Nov 11, 2008 11:08 pm
Forum: newLISP newS
Topic: Shared memory proposal
Replies: 4
Views: 2943

Lutz: Wow! This would be nice!
newdep: No! Please! ;-)
by Dmi
Tue Nov 11, 2008 12:31 pm
Forum: newLISP newS
Topic: Shared memory proposal
Replies: 4
Views: 2943

Shared memory proposal

Hi, Lutz! Last time I study Erlang and I found a useful thing that, imho, can significant simplify the newlisp asynchronous tasks when we need to fork and to use semaphores/shared memory. I think it would be cool to have some engine over shared memory when one process can issue (send-message Pid mes...
by Dmi
Tue Nov 11, 2008 11:56 am
Forum: newLISP newS
Topic: Unify
Replies: 12
Views: 6080

In simple words, unification is a method to match structured data to a template so - binded symbols and constants will be compared to corresponding data structure elements - unbinded symbols will be binded (assigned to) with corresponding data structure elements If mathcing has no conflicts, them un...
by Dmi
Mon Oct 27, 2008 8:24 pm
Forum: Anything else we might add?
Topic: lisp.ru
Replies: 6
Views: 6598

Но, боюсencedь, человек, для которого этот язык будет первым, к неряшливому стилю привыкнет на всю жизнь. But someone who starts using NewLisp as his first language //meaning, first Lisp variation -- translator// will get used to an untidy style for life Hmm... just my 5 cents here: Personally me, ...
by Dmi
Tue Jul 01, 2008 7:22 am
Forum: newLISP newS
Topic: parse-date %Y
Replies: 3
Views: 2431

Hi, Lutz! Thanks for reply! Just checked on Intel Celeron with the same Linux version - all seems to be ok. Initial test was on Amd64 Thurion with newlisp compiled in 32-bit mode from the same package. I can't to find any other differences yet... Can I do some system checks to catch? Thanks for time...
by Dmi
Mon Jun 30, 2008 10:57 pm
Forum: newLISP newS
Topic: parse-date %Y
Replies: 3
Views: 2431

parse-date %Y

Code: Select all

> (date (parse-date "2008" "%Y") 0 )
"Sun Dec 31 08:05:04 8676"
Year is 8676 instead of 2008 expected.

newlisp 9.3.12, Debian Linux
by Dmi
Fri May 23, 2008 8:51 pm
Forum: newLISP newS
Topic: development release newLISP v.9.3.12
Replies: 1
Views: 2081

Repository for Debian/Ubuntu at http://en.feautec.pp.ru is updated.
Fixed library path in gmp.lsp (thanks Ted Walther)
by Dmi
Fri May 02, 2008 9:22 pm
Forum: newLISP and the O.S.
Topic: mysql5.lsp
Replies: 6
Views: 5164

Ho! It's new for me! But you're right:

Code: Select all

void main(void){printf("%i\n",sizeof(int));}
prints 4, not 8 as I've expected

But linux distro is 64-bit, so, I suspect, mysql is compiled in 64bit mode.
by Dmi
Fri May 02, 2008 7:05 pm
Forum: newLISP and the O.S.
Topic: mysql5.lsp
Replies: 6
Views: 5164

Hi, Lutz! Hmm... my one is compiled from makefile_debian (as standard package). The compile options are: gcc -Wall -pedantic -Wno-uninitialized -Wno-strict-aliasing -Wno-long-long -c -g -DREADLINE -DLINUX -O2 newlisp.c Compiled and runs on dual core amd64 thurion in 64bit mode. No problems in newlis...
by Dmi
Fri May 02, 2008 2:33 pm
Forum: newLISP and the O.S.
Topic: mysql5.lsp
Replies: 6
Views: 5164

Dmytry Krasilnikov, working with me, found another bug in mysql5.lsp:

Code: Select all

(define (fetch-all)
  (dotimes (x (num-rows)) (push (fetch-row) all))
  (reverse all))
symbol 'all is global and here was no reset for it.

Code: Select all

(define (fetch-all , all)
should correct this.
by Dmi
Thu May 01, 2008 9:21 pm
Forum: newLISP and the O.S.
Topic: mysql5.lsp
Replies: 6
Views: 5164

mysql5.lsp

Here is a diff for mysql5.lsp to run on amd64/Debian I think it should go in other 64 bit systems. There is a two places in original file, where sizeof(int)=4 was assumed. They are changed to 8. Enjoy ;-) --- /usr/share/newlisp/modules/mysql5.lsp 2008-03-23 02:37:50.000000000 +0300 +++ mysql5-64.lsp...
by Dmi
Fri Mar 21, 2008 4:29 pm
Forum: newLISP newS
Topic: pop-assoc
Replies: 6
Views: 2795

nice :-)
by Dmi
Fri Mar 21, 2008 3:10 pm
Forum: newLISP newS
Topic: pop-assoc
Replies: 6
Views: 2795

pop-assoc

Hi, Lutz! I found a segfault: dmi@stone:~$ newlisp newLISP v.9.3.1 on Linux, execute 'newlisp -h' for more info. > (set 'l '((1 2) (3 4) (5 (6 7)))) ((1 2) (3 4) (5 (6 7))) > (pop-assoc ('l 3)) Segmentation fault I know that l must not be quoted, but this typo causes failure. And a question: what fo...
by Dmi
Wed Mar 19, 2008 6:49 am
Forum: newLISP newS
Topic: Compiling newlisp on ubuntu
Replies: 5
Views: 2952

Subsequental "apt-get update; apt-get source newlisp" in the same directory will update your sources when the new versio/|patch will appear on the server.

I don't know if there's a separate mechanism in debian to check sources for updates.
by Dmi
Tue Mar 18, 2008 3:48 pm
Forum: newLISP newS
Topic: Compiling newlisp on ubuntu
Replies: 5
Views: 2952

You can still compile this doing

Code: Select all

apt-get source newlisp
cd newlisp-***
dpkg-buildpackage -rfakeroot
This will make your own deb
by Dmi
Tue Mar 18, 2008 1:33 pm
Forum: newLISP newS
Topic: (column num lst)
Replies: 2
Views: 1907

Oh! Nice :-)
by Dmi
Tue Mar 18, 2008 7:17 am
Forum: newLISP newS
Topic: (column num lst)
Replies: 2
Views: 1907

(column num lst)

Hi, All!

Testing with new function:

Code: Select all

(define (column n lst)
  (map (fn(x) (x n)) lst))

Code: Select all

> (set 'lst '((a 1 q)(b 2 w)(c 3 e)))
((a 1 q) (b 2 w) (c 3 e))
> (column 1 lst)
(1 2 3)
by Dmi
Tue Mar 18, 2008 6:54 am
Forum: newLISP newS
Topic: Compiling newlisp on ubuntu
Replies: 5
Views: 2952

Hi, Tim! Look at http://en.feautec.pp.ru/SiteNews/NewLispDebian/ There is an Ubuntu version and source package which compiles both on Ubuntu and Debian. I maintaining this stuff. The debian version is at mentors.debian.net too. But, in fact, I haven't sufficient time at now for pushing it finally in...
by Dmi
Thu Mar 13, 2008 10:32 am
Forum: newLISP newS
Topic: TCP/IP server suite
Replies: 7
Views: 3442

Version 1.2
Some improvements,code cleanups and fixes.
by Dmi
Wed Mar 12, 2008 4:01 pm
Forum: newLISP newS
Topic: TCP/IP server suite
Replies: 7
Views: 3442

update

The timeout is moved from (sleep) to (select), Now in micro-seconds.