Re: [racket-users] Anyone successfully filtering Italian spam?

2021-11-29 Thread George Neuner



On 11/29/2021 6:45 PM, Nathaniel Griswold wrote:

It’s getting through my filters, neither rspamd or my local client can catch on 
to it.

Is there a good simple filter?

Nate


Something has changed very recently because until this last week I 
rarely saw it (even marked AS spam) ... maybe a few times this whole 
year.  But in the last week I have gotten one or more copies in my inbox 
every day.


I use Thunderbird for email - which has a built-in learning junk filter 
- but I assumed my provider was filtering it because - sans a specific 
rule - Thunderbird would have just put in the Junk folder. I just wasn't 
seeing it.


???
George


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/a9f4c8f7-12b3-ea4c-726a-ec16c1e65eb1%40comcast.net.


Re: [racket-users] Anyone successfully filtering Italian spam?

2021-11-29 Thread 'William J. Bowman' via Racket Users
My spamassassin catches most of it, but also sometimes catches real list emails 
because it has stopped trusting racket-users. Some combination of bayes and 
txrep plugins are doing the heavy lifting, I think.

--
William J. Bowman

On Mon, Nov 29, 2021 at 05:45:37PM -0600, Nathaniel Griswold wrote:
> It’s getting through my filters, neither rspamd or my local client can catch 
> on to it.
> 
> Is there a good simple filter?
> 
> Nate
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/81262C45-D4BE-45DB-B126-5BD11274299A%40nan.sh.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/YaVwusmUite/nAw0%40williamjbowman.com.


[racket-users] Anyone successfully filtering Italian spam?

2021-11-29 Thread Nathaniel Griswold
It’s getting through my filters, neither rspamd or my local client can catch on 
to it.

Is there a good simple filter?

Nate

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/81262C45-D4BE-45DB-B126-5BD11274299A%40nan.sh.


Re: [racket-users] Let over lambda and location information

2021-11-29 Thread Sorawee Porncharoenwase
If you simply want the source location to be the macro call site, one
approach is finding where the source location currently is (in this case,
it’s the lambda inside make-keyword-procedure). Then, you simply need to
thread syntax/loc through macros to put the source location there.

Here’s an example:

#lang racket

(require racket/match
 syntax/parse/define)

(define-syntax-parse-rule
  (methods*
   [(method-name method-args ...) body ...] ...
   fallback)

  #:with the-proc
  (syntax/loc this-syntax
(lambda (kw-args kw-vals method . args)
  (match (assq method all-methods)
[(cons _name found-method)
 found-method
 #;(keyword-apply found-method kw-args kw-vals args)]
[#f
 (keyword-apply fallback kw-args kw-vals method args)])))

  (let ((method-name
 (lambda (method-args ...)
   body ...)) ...)
(define all-methods (list (cons 'method-name method-name) ...))
(define method-dispatch
  (make-keyword-procedure the-proc))
method-dispatch))

(define no-such-method
  (make-keyword-procedure
   (lambda (kw-vals kw-args method . args)
 (error "No such method" method

(define-syntax-parse-rule (methods method-defns ...)
  #:with out
  (syntax/loc this-syntax
(methods* method-defns ... no-such-method))
  out)

(define my-methods
  (methods
   [(double x)
(* x x)]))

my-methods ;=> #

Also note that there’s procedure-rename

and syntax-local-name

which you might want to use instead:

#lang racket

(require racket/match
 syntax/parse/define)

(define-syntax-parse-rule
  (methods*
   [(method-name method-args ...) body ...] ...
   fallback)

  #:with the-name (syntax-local-name)

  (let ((method-name
 (lambda (method-args ...)
   body ...)) ...)
(define all-methods (list (cons 'method-name method-name) ...))
(define method-dispatch
  (procedure-rename
   (make-keyword-procedure
(lambda (kw-args kw-vals method . args)
  (match (assq method all-methods)
[(cons _name found-method)
 found-method
 #;(keyword-apply found-method kw-args kw-vals args)]
[#f
 (keyword-apply fallback kw-args kw-vals method args)])))
   'the-name))
method-dispatch))

(define no-such-method
  (make-keyword-procedure
   (lambda (kw-vals kw-args method . args)
 (error "No such method" method

(define-syntax-rule (methods method-defns ...)
  (methods* method-defns ... no-such-method))

(define my-methods
  (methods
   [(double x)
(* x x)]))

my-methods ;=> #



On Mon, Nov 29, 2021 at 12:18 PM Christine Lemmer-Webber <
cweb...@dustycloud.org> wrote:

> Take the following code:
>
> #+BEGIN_SRC racket
> (require racket/match)
>
> (define-syntax-rule (methods* [(method-name method-args ...) body ...] ...
>   fallback)
>   (let ((method-name
>  (lambda (method-args ...)
>body ...)) ...)
> (define all-methods (list (cons 'method-name method-name) ...))
> (define method-dispatch
>   (make-keyword-procedure
>(lambda (kw-args kw-vals method . args)
>  (match (assq method all-methods)
>[(cons _name found-method)
> found-method
> #;(keyword-apply found-method kw-args kw-vals args)]
>[#f
> (keyword-apply fallback kw-args kw-vals method args)]
> method-dispatch))
>
> (define no-such-method
>   (make-keyword-procedure
>(lambda (kw-vals kw-args method . args)
>  (error "No such method" method
>
> (define-syntax-rule (methods method-defns ...)
>   (methods* method-defns ... no-such-method))
> #+END_SRC
>
> This is kind of a kluge, I know.  But you get the idea.  Let over
> lambda, because we're going to be reusing these procedures over and over
> again across multiple calls.
>
> Now let's say I instantiate this like:
>
> #+BEGIN_SRC racket
>   (define my-methods
> (methods
>  [(double x)
>   (* x x)]))
> #+END_SRC
>
> > my-methods
> #
>
> That's the line where method-dispatch is defined, *inside the macro*.
> But what I really want is for the annotation on the procedure to be
> *where my-methods is defined* not pointing back inside the macro.
>
> I have no idea how to do this.  Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/87sfveu34u.fsf%40dustycloud.org
> .
>

-- 
You received this message because you are subscribed to the 

[racket-users] Re: Let over lambda and location information

2021-11-29 Thread Christine Lemmer-Webber
Oops, just saw the discourse forum.  Moved to:

https://racket.discourse.group/t/let-over-lambda-and-source-location-information/306


Christine Lemmer-Webber  writes:

> Take the following code:
>
> #+BEGIN_SRC racket
> (require racket/match)
>
> (define-syntax-rule (methods* [(method-name method-args ...) body ...] ...
>   fallback)
>   (let ((method-name
>  (lambda (method-args ...)
>body ...)) ...)
> (define all-methods (list (cons 'method-name method-name) ...))
> (define method-dispatch
>   (make-keyword-procedure
>(lambda (kw-args kw-vals method . args)
>  (match (assq method all-methods)
>[(cons _name found-method)
> found-method
> #;(keyword-apply found-method kw-args kw-vals args)]
>[#f
> (keyword-apply fallback kw-args kw-vals method args)]
> method-dispatch))
>
> (define no-such-method
>   (make-keyword-procedure
>(lambda (kw-vals kw-args method . args)
>  (error "No such method" method
>
> (define-syntax-rule (methods method-defns ...)
>   (methods* method-defns ... no-such-method))
> #+END_SRC
>
>
> This is kind of a kluge, I know.  But you get the idea.  Let over
> lambda, because we're going to be reusing these procedures over and over
> again across multiple calls.
>
> Now let's say I instantiate this like:
>
> #+BEGIN_SRC racket
>   (define my-methods
> (methods
>  [(double x)
>   (* x x)]))
> #+END_SRC
>
>> my-methods
> #
>
> That's the line where method-dispatch is defined, *inside the macro*.
> But what I really want is for the annotation on the procedure to be
> *where my-methods is defined* not pointing back inside the macro.
>
> I have no idea how to do this.  Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87lf16u1oo.fsf%40dustycloud.org.


[racket-users] Let over lambda and location information

2021-11-29 Thread Christine Lemmer-Webber
Take the following code:

#+BEGIN_SRC racket
(require racket/match)

(define-syntax-rule (methods* [(method-name method-args ...) body ...] ...
  fallback)
  (let ((method-name
 (lambda (method-args ...)
   body ...)) ...)
(define all-methods (list (cons 'method-name method-name) ...))
(define method-dispatch
  (make-keyword-procedure
   (lambda (kw-args kw-vals method . args)
 (match (assq method all-methods)
   [(cons _name found-method)
found-method
#;(keyword-apply found-method kw-args kw-vals args)]
   [#f
(keyword-apply fallback kw-args kw-vals method args)]
method-dispatch))

(define no-such-method
  (make-keyword-procedure
   (lambda (kw-vals kw-args method . args)
 (error "No such method" method

(define-syntax-rule (methods method-defns ...)
  (methods* method-defns ... no-such-method))
#+END_SRC

This is kind of a kluge, I know.  But you get the idea.  Let over
lambda, because we're going to be reusing these procedures over and over
again across multiple calls.

Now let's say I instantiate this like:

#+BEGIN_SRC racket
  (define my-methods
(methods
 [(double x)
  (* x x)]))
#+END_SRC

> my-methods
#

That's the line where method-dispatch is defined, *inside the macro*.
But what I really want is for the annotation on the procedure to be
*where my-methods is defined* not pointing back inside the macro.

I have no idea how to do this.  Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87sfveu34u.fsf%40dustycloud.org.