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 - cameyo

#166
newLISP and the O.S. / Re: Build newLISP for win10 64bit
February 17, 2019, 04:27:29 AM
Download and install:  tdm64-gcc-5.1.0-2.exe

Download and unpack newlisp source code

Change folder to source code folder

Type: make -f makefile_xxxxx
I choose "makefile_mingw64_utf8" and then "makefile_mingw64dll_utf8" for "makefile_xxxxx"

After a few seconds i got my newlisp.exe and then newlisp.dll.



Thanks Lutz and HPW
#167
newLISP and the O.S. / Re: Build newLISP for win10 64bit
February 16, 2019, 07:53:14 AM
@HPW:

Thanks. I have already read that...

But reading it again had help me to understand :-)

Try with: http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download">//http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download



Have a nice day.
#168
newLISP and the O.S. / Build newLISP for win10 64bit
February 16, 2019, 06:37:28 AM
Which tools i need to build newLISP from source (windows 10 - 64 bit) ?

MinGW or mingw-w64 ?

Which version of gcc ?

Can someone point me on the right direction?

Thanks
#169
Whither newLISP? / Re: Retrieving the value of a symbol
February 11, 2019, 12:53:08 PM
You solve my question with:
(eval (sym {"name"})) -> 3
Thanks fdb :-)
#170
Whither newLISP? / Retrieving the value of a symbol
February 11, 2019, 10:33:07 AM
These expressions generate an error:
(set '"name") -> ERR: symbol expected in function set : '"name"
(set (quote "name") 3) -> ERR: symbol expected in function set : '"name"

But the following are valid (then "name" is a valid symbol):
(setf '"name" 3) -> 3
(setq "name" 3) -> 3

Now the problem: how to retrieve the value of the symbol "name"?
(println "name") -> name
(setq a "name")
(println a) -> "name"

Thanks
#171
newLISP and the O.S. / Windows 10 ANSI color
February 07, 2019, 03:22:02 AM
The console in Windows 10 support VT (Virtual Terminal) / ANSI escape sequences but it is disable by default.

To activate it:

in registry key [HKEY_CURRENT_USERConsole], create or set the VirtualTerminalLevel DWORD value to 1.

(or from cmd.exe : reg add HKCUConsole /v VirtualTerminalLevel /t REG_DWORD /d 1)

To deactivate it:

in registry key [HKEY_CURRENT_USERConsole], create or set the VirtualTerminalLevel DWORD value to 0.



You must open a new console window for changes to take effect.

For example use the ANSI color when debugging:
(trace-highlight "27[0;31m" "27[0;0m") ;red text color
(trace-highlight "27[0;7m" "27[0;0m")  ;negative

cameyo
#172
newLISP in the real world / Re: factor-group function
January 31, 2019, 08:47:03 AM
I forgot to add the inverse function:


(setq fg (factor-group 220))
;-> ((2 2) (5 1) (11 1))


(setq num-fg (apply * (map (lambda (x) (pow (first x) (last x))) fg)))
;-> 220


cameyo
#173
newLISP newS / Re: Ask info about newLISP
January 07, 2019, 10:55:33 PM
Thanks for info and for your work.



cameyo
#174
newLISP newS / Re: Ask info about newLISP
January 03, 2019, 09:45:42 AM
Thanks Hans-Peter.

I have seen newlisp 10.7.5 in the development folder...

A reply from Lutz can solve my question :-)



cameyo
#175
newLISP newS / Ask info about newLISP
January 03, 2019, 04:57:10 AM
I'd like to get some infos about the development of newLISP.

When will be out a new version?

Thanks.
#176
Take a look here:

http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=4940">//http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=4940

Keep in mind that windows 7 is worse than windows 10 :-(
#177
(define (f converse-rate-list)
  (local (rate) (setq rate converse-rate-list))
)

I am almost sure that this is not what you are searching for...  :-)

cameyo
#178
newLISP in the real world / Re: Notepad++ bundle
November 29, 2018, 01:32:23 PM
Update:

1) Shortcut (Ctrl + F8) to evaluate expression inside notepad ++ (get the result in notepad++ console)

2) Shortcut (Ctrl + Alt + =) to insert:

[cmd]



[/cmd]



cameyo
#179
newLISP in the real world / Re: factor-group function
November 28, 2018, 10:41:51 PM
Thanks Ralph.

I am really enjoying newLisp :-)

cameyo
#180
newLISP in the real world / factor-group function
November 25, 2018, 01:45:59 AM
To solve a project euler problem i have written this factor-group function:
(define (factor-group x)
  (letn (fattori (factor x)
         unici (unique fattori))
    (transpose (list unici (count unici fattori)))))

(factor-group 2000)
;-> ((2 4) (5 3))
(factor-group 232792560)
;-> ((2 4) (3 2) (5 1) (7 1) (11 1) (13 1) (17 1) (19 1))

Do you known a better/faster way?

Thanks.



cameyo