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

#16
newLISP newS / Re: sending emails to @gmail.com
May 22, 2023, 03:43:25 PM
Ah; I looked up rDNS for 168.235.93.184 and got 168-235-93-184.cloud.ramnode.com rather than newlispfanclub.com, which would be the origin of an email.

#17
newLISP newS / sending emails to @gmail.com
May 22, 2023, 03:33:34 PM
This morning I got a blurb here about the pains of sending emails to addresses @gmail.com, detailing a bit about how finicky they, Google, are.

Whilst that is true, I've held this email address some 20 years mostly because their spam filtering has been quite outstanding. During that time I have set up some number of MTA (typically small and smallish ones), and like apparently this forum, come to realize both that in order to deliver to @gmail.com addresses all the "ducks" need to be in perfect order, and that getting attention and assistance by Google staff to figure out the "ducks" is near impossible.

This forum is close to perfect in its setup apart from lacking its reverse DNS setup, which I believe is one of the "ducks", i.e. one thing that @gmail.com is finicky about.

(And if it'd be of any help. I'm more than happy to be a trial target for MTA configuration trials.)

#18
maybe check out

https://web.archive.org/web/20230000000000*/http://www.newlisp.org/downloads/manual_frame.html">https://web.archive.org/web/20230000000 ... frame.html">https://web.archive.org/web/20230000000000*/http://www.newlisp.org/downloads/manual_frame.html
#19
newLISP in the real world / Re: string function
June 15, 2022, 02:00:08 AM
I'm confused about why you appear confuse... of course (string ""a""b"") is the same as (string ""   a   ""  b  ""); the string function packs together the stringifying of its arguments ignoring any (optional) whitespace between them. No strangeness involved afaict.
#20
.. and you should dazzle me with the code as well :)



I had a hard time avoiding brute-force, which I thought too boring, but then it started to take too much time for me so I gave up.



Ralph.
#21
Yes it's a bug in the handling of the "incoming cell data" for an ffi_type_float at nl-import.c:814.

That current line is
floatV = (float) *(double *)&cell->aux;
and should be replaced with the following
floatV = (float) ((cell->type == CELL_FLOAT)? *(double *)&uint64V : uint64V);
which corresponds to how it's handled in the pack function.
#22
newLISP newS / Re: Error in 10.7.6
December 29, 2021, 05:36:05 AM
My fully repeatable test is:
> (push x x)
(?)
> (x 0 0)

ERR: list reference changed
> x
#23
newLISP newS / Re: Error in 10.7.6
December 28, 2021, 12:13:32 PM
Same behaviour in "newLISP v.10.7.5 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h"
#24
newLISP in the real world / Re: Hash-map e contexts
September 10, 2021, 03:25:49 AM
tried to edit, to wrap the sym term into an eval, but the server doesn't let me...
#25
newLISP in the real world / Re: Hash-map e contexts
September 10, 2021, 03:23:41 AM
1) a "hashmap" is a context without default functor, i.e.
(and (context? S) (nil? (sym (term S) S nil)))

2) using the symbol as functor results in its list if entries, i.e.
(apply S)
#26
newLISP in the real world / Re: Puzzle
November 24, 2019, 02:03:56 AM
Yes, quite challenging. Especially with the (implied) constraint that f is restricted to integers, as arguments and values (otherwise it's all too easy). Perhaps the following is  acceptable?
(define (f n)
  (if (= n) 0 (> n)
      (if (odd? n) (inc n) (- (dec n)))
      (if (odd? n) (dec n) (- (inc n)))))
#27
newLISP in the real world / Re: Fractran language
November 20, 2019, 01:38:01 PM
Ah. I didn't think about that. One might make a bitsL function for that, eg:
; Compute "bits" for bigint and int
(constant 'MAXINT (pow 2 62))                                                    
(define (prep s) (string (dup "0" (- 62 (length s))) s))
(define (bitsL n)
    (if (<= n MAXINT) (bits (int n))
      (string (bitsL (/ n MAXINT))
              (prep (bits (int (% n MAXINT)))))))
but then I'm less sure about the gain in speed.
#28
newLISP in the real world / Re: Fractran language
November 19, 2019, 10:21:10 PM
Interesting.



To gain speed, you could specialize the power-of-2 test into the following
(nil? (find "1" (1 (bits n))))
That method is 1-2 magnitudes faster than "proper math's", and using bits for ilog2 as well, it could become the following, faster run function:
(define (run2 program start step)
  (dotimes (x step)
    (let (b (bits x))
       (or (find "1" (1 b)) (print (dec (length b)) ", ")))
    (setq start (fractran program start)))
  'stop)


:)
#29
newLISP in the real world / Re: nL cron script
October 27, 2019, 09:49:30 PM
println ? did you mean string ?



btw, cron scripts are run in $HOME so it would append to $HOME/ltcbtc.txt
#30
newLISP in the real world / Re: nL cron script
October 27, 2019, 07:42:32 PM
A script file needs to tell which interpreter to use at it's first line, so it'd be like
#!/usr/local/bin/newlisp
(append-file "ltcbtc.txt" (println pairs (date (date-value) 0 "%y%m%d%H%M%S")))
if you have installed newlisp at there.



Alternatively you make an embedded executable with the script; something like
$ newlisp -x winny.lsp herbie ; chmod a+x herbie  and then use that in crontab.
* * * * * /home/joe/winny/herbie.