Search found 173 matches

by joejoe
Wed Jul 31, 2019 10:33 am
Forum: newLISP in the real world
Topic: ccxt with nL
Replies: 0
Views: 4890

ccxt with nL

Hi, ccxt has 'support' for php, python and js. https://github.com/ccxt/ccxt https://github.com/ccxt/ccxt/wiki/Manual#api-methods--endpoints I would like to skip those languages and simply access its api endpoints from nL. Would anyone have a thought on how this might be done? Thank you for any tip o...
by joejoe
Mon Jun 17, 2019 10:56 pm
Forum: newLISP in the real world
Topic: loading html templates
Replies: 2
Views: 3219

Re: loading html templates

Wow, that did the trick!

Thank you for the insight Ralph! :9)
by joejoe
Mon Jun 17, 2019 3:10 pm
Forum: newLISP in the real world
Topic: loading html templates
Replies: 2
Views: 3219

loading html templates

Hi, I think I should load html templates with set command, however when I surround the html with the [text][/text] tags and use println to display the html, it omits the header. For example, this code: (set 'template [text]<!DOCTYPE html> <html lang="en"> <title>W3.CSS Template</title> <meta charset...
by joejoe
Sun Jun 16, 2019 7:02 am
Forum: newLISP in the real world
Topic: format json-parse data into html
Replies: 7
Views: 6108

Re: format json-parse data into html

Blingo!

Raisins have been picked Ralph! Woo hoo! :D

What a treasure it is to have such support!

I learned more than I was looking for and am such happier!

Kind thanks for your suggestion and guidance, again.

It's a happy json raisin pickin from the cake kinda day today! :P
by joejoe
Sat Jun 15, 2019 9:48 pm
Forum: newLISP in the real world
Topic: format json-parse data into html
Replies: 7
Views: 6108

Re: format json-parse data into html

Ralph Gotcha on the x y term form finding they y data if it is there. Also on the error prevention by returning an empty value instead of getting a nil value from the ref statement. It's brilliant and certainly makes using json data more friendly. I am getting the ERR: data type and format don't mat...
by joejoe
Fri Jun 14, 2019 8:07 pm
Forum: newLISP in the real world
Topic: format json-parse data into html
Replies: 7
Views: 6108

Re: format json-parse data into html

Thanks to both Ralph and Hans-Peter! I am trying Ralph's and am getting nil response. If I am understanding correctly, Ralph intended that I do something like this: (set 'ali (get-url ali-link)) (set 'alie (json-parse ali)) (set 'jsondata (lookup "products" (lookup "result" alie))) (define (raisins ...
by joejoe
Mon Jun 10, 2019 5:58 am
Forum: newLISP in the real world
Topic: format json-parse data into html
Replies: 7
Views: 6108

format json-parse data into html

Hi, I would like to format json data into html. I have attempted this for a few days, and success looms. :0) The json-parse return data is this: (("result" (("totalResults" 19) ("products" ((("productTitle" "GILDAN EMACS GNU XEMACS LISP programmers wildebeest short-sleeved T-shirt") ("imageUrl" "htt...
by joejoe
Thu Mar 14, 2019 3:42 am
Forum: newLISP newS
Topic: Book about Fuzzy Logic in newLISP
Replies: 9
Views: 15223

Re: Book about Fuzzy Logic in newLISP

Argüelles,

Thank you for the meta extension facility! Looks stellar!

Quick question, do you have a license associated w the code?

nL is GPL which allows us to modify contribute it without letting others close source it.

I'm getting a grasp of the idea of fuzzy logic on top of nL! Kudos! :D
by joejoe
Sat Jul 14, 2018 3:14 am
Forum: newLISP in the real world
Topic: Sorting a list or string
Replies: 4
Views: 4453

Re: Sorting a list or string

You might have meant the third line be (set 'worder (map lower-case words)) Ralph, you always bat cleanup around here. Thank you! It's hard to admit you know what I want to do before I even thought to do it! ;0) Thanks for this very much and learned going forward. Big thanks for this and all many p...
by joejoe
Wed Jul 11, 2018 9:16 am
Forum: newLISP in the real world
Topic: Sorting a list or string
Replies: 4
Views: 4453

Sorting a list or string

Hi and thanks! (set 'word (join titles " ")) (set 'words (find-all {\w{5,}} word)) (set 'worder (lower-case (string words))) (println (sort worder)) ERR: list or array expected in function sort : worder worder looks similar to this: ("one" "two" "three") How would I best sort this? Thanks very much ...
by joejoe
Mon May 07, 2018 1:15 am
Forum: newLISP in the real world
Topic: json-parse string expected
Replies: 2
Views: 3409

Re: json-parse string expected

Thanks again Ted,! I was able to do it with get-url here. (json-parse (get-url "https://pastebin.com/raw/brx7F2vA")) (("ID" ("1" "2" "3" "4" "5" "6" "7" "8")) ("Name" ("Rick" "Dan" "Michelle" "Ryan" "Gary" "Nina" "Simon" "Guru")) ("Salary" ("623.3" "515.2" "611" "729" "843.25" "578" "632.8" "722.5")...
by joejoe
Sun May 06, 2018 9:49 am
Forum: newLISP in the real world
Topic: json-parse string expected
Replies: 2
Views: 3409

json-parse string expected

Hi, (json-parse (exec "curl https://www.asdf.com/asdf.json")) I am getting the message that a string is expected. The result of the exec has [text]......[/text] at the beginning and end of what is returned. Is this why json-parse thinks it is not a string? I tried (json-parse (string (exec "curl.......
by joejoe
Sat Feb 03, 2018 2:14 am
Forum: Anything else we might add?
Topic: Newlisp vs Lua
Replies: 11
Views: 13421

Re: Newlisp vs Lua

TedWalther, I have long appreciated your advice and direction. On multiple occasions you have guided me in the proper direction. Thank you. Your responses I regard as true mentorship. That is absolute. You need to look at it from both sides. [...] The choice I have is, [...] [contribute to closed or...
by joejoe
Fri Feb 02, 2018 8:39 am
Forum: Anything else we might add?
Topic: Newlisp vs Lua
Replies: 11
Views: 13421

Re: Newlisp vs Lua

newLisp vs Lua. These are two differently licensed projects, which make them incomparable. I always try to be mindful of what the licensing is for the tools that I use, and I consider MIT/BSD/ISC and the like to be superior (namely, more free) than any GPL. If you contributed code that your grand-ki...
by joejoe
Wed Dec 21, 2016 9:47 pm
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Ok gotcha thanks.

I got the signatures generating correctly with your message help, Ralph.

Code: Select all

(string (chop (base64-enc (crypto:hmac ....)) "%3D")
This did it and a few tweaks to finalize the url formatting got successful api calls.

Thanks all for the help!
by joejoe
Wed Dec 21, 2016 3:32 pm
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

I think the issue may be with line breaks. When I do this: (set 'output1 (crypto:hmac crypto:sha256 "onetwo" "1234567890")) (set 'signature-hex (unpack (dup "b" (length output1)) output1)) (println (join (map (curry format "%02x") signature-hex))) I get this: 47d07edd67e5cca3bb98c5cf4cca73459dd8a89a...
by joejoe
Thu Dec 15, 2016 2:26 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Hi and thanks, I want to back up to make sure I have the HMAC SHA256 signature calculating correctly. I am trying this: (set 'output1 (crypto:hmac crypto:sha256 (string "GET webservices.amazon.co.uk /onca/xml AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Actor=Johnny%20Depp&AssociateTag=mytag-20&Operation=Ite...
by joejoe
Sun Dec 11, 2016 10:57 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Hi and thank you for help, Here is what I am running: #!/usr/bin/newlisp (module "crypto.lsp") (set 'pubkey "aa") (set 'privkey "bb") (set 'timestamp (string (date (date-value) 320 "%Y") "-" (date (date-value) 320 "%m") "-" (date (date-value) 320 "%d") "T" (date (date-value) 320 "%H") "\%3A" (date (...
by joejoe
Sat Nov 05, 2016 11:03 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Hi and thanks! I think I got to the signature: ("131 37 166 173 32 246 42 23 198 156 244 102 148 91 171 80 252 115 124 141 246 64 19 94 85 112 145 181 2 189 98 73") When I use an online hex decoder I get this: qf3"FB#V$A‰q€%!AA$fA™HQQ!‰˜s Looks like a signature! How would I decode the hex in nL to...
by joejoe
Sun Oct 23, 2016 5:28 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Got it, thanks Ralph! Much appreciated!! :D
by joejoe
Sun Oct 23, 2016 5:16 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

And would I be correct to use this module that Lutz has already created?

http://www.newlisp.org/code/modules/cry ... rypto_hmac

or just use the

http://www.newlisp.org/code/modules/cry ... pto_sha256

Thanks again!
by joejoe
Sun Oct 23, 2016 5:12 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

Re: generating aws signature

Ok great, that is what I had hoped, thank you very much Ralph!
by joejoe
Sun Oct 23, 2016 4:38 am
Forum: newLISP in the real world
Topic: generating aws signature
Replies: 13
Views: 9625

generating aws signature

Hi, I am following this php code and am trying to reproduce it with nL. http://webtutsdepot.com/2009/10/13/amazon-signed-request-php/ I cannot figure out if this is a two part transaction or just a single query. Would anyone know if I need an initial aws server response from the get-url command in o...
by joejoe
Fri Oct 14, 2016 8:45 pm
Forum: newLISP in the real world
Topic: basic web calculator
Replies: 2
Views: 3417

Re: basic web calculator

Hi Ted, Thanks for the links and tips! I am planning to have it be a lot more involved in the future, so I want to use nL because I know I can do everything with it. I would rather not have to set up a database, but will if I must. I was thinking to keep my tally in the url bar in a format something...
by joejoe
Thu Oct 13, 2016 10:01 pm
Forum: newLISP in the real world
Topic: basic web calculator
Replies: 2
Views: 3417

basic web calculator

Hi, I would like to create a basic web calculator using nL. I would like to display three images which correspond to three different values (say 1, 2 and 3). I would like to display a running total as the images are clicked on. So, I would start with the value of 0. I click on the first image (which...