Re: [racket-users] package manager woes on Windows 10?

2020-09-12 Thread jackh...@gmail.com
Could we make the "do what I mean" box just automatically strip any 
newlines pasted into it? It seems sensible to me to require that it only be 
a single line input.

On Friday, September 11, 2020 at 6:22:59 AM UTC-7 hen...@topoi.pooq.com 
wrote:

> On Thu, Sep 10, 2020 at 10:27:39AM -0400, George Neuner wrote:
> > 
> > 
> > On 9/10/2020 10:06 AM, Philip McGrath wrote:
> > > Also, this is happening over encrypted HTTPS: no one is sniffing the
> > > User-Agent header.
> > 
> > While it may not be the issue here, you need to understand that appliance
> > firewalls CAN and routinely DO examine data inside encrypted connections.
>
> Using man-in-the-middle attacks?
>
> -- hendrik
>

-- 
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/84b16cf0-7837-4d54-9423-c1286f5e2b7an%40googlegroups.com.


Re: [racket-users] Re: hashcons

2020-09-12 Thread Hendrik Boom
On Sat, Sep 12, 2020 at 01:23:24PM -0700, jackh...@gmail.com wrote:
> Not automatically, but you can make your own wrapper function around cons 
> that interns them using a weak hash table and then you can use that wrapper 
> function everywhere.

True, but that would require rewriting list, and quasiquote, ans 
others like that to use the hashcons.

Not impossible.

-- hendrik

> 
> On Thursday, September 10, 2020 at 7:34:37 PM UTC-7 hen...@topoi.pooq.com 
> wrote:
> 
> > Is there a way to run Racket so that every immuable cons is made with 
> > a hashcons operation; i.e. it makes a new cons scel only if there 
> > isn't already one in memory somewhere with the same car and cdr 
> > values?
> >
> > -- hendrik
> >
> 
> -- 
> 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/7ed721c9-4ed2-47eb-b8bb-a30a1ed9125fn%40googlegroups.com.

-- 
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/20200912224106.dretb2jnz6rtf3yc%40topoi.pooq.com.


[racket-users] Re: hashcons

2020-09-12 Thread jackh...@gmail.com
Not automatically, but you can make your own wrapper function around cons 
that interns them using a weak hash table and then you can use that wrapper 
function everywhere.

On Thursday, September 10, 2020 at 7:34:37 PM UTC-7 hen...@topoi.pooq.com 
wrote:

> Is there a way to run Racket so that every immuable cons is made with 
> a hashcons operation; i.e. it makes a new cons scel only if there 
> isn't already one in memory somewhere with the same car and cdr 
> values?
>
> -- hendrik
>

-- 
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/7ed721c9-4ed2-47eb-b8bb-a30a1ed9125fn%40googlegroups.com.


Re: [racket-users] Incorporating Markdown documents into Scribble

2020-09-12 Thread Hendrik Boom
On Sat, Sep 12, 2020 at 06:14:53AM -0700, Shriram Krishnamurthi wrote:
> I need a little help with `decode` vs `decode-flow` in Scribble. (Also, 
> this thread is about a question I wasn't able to find answered anywhere, so 
> hopefully it will lead to a solution that others can also use.)
> 
> Sometimes it's really useful to incorporate Markdown-formatted content into 
> the middle of a Scribble document. (Let's not argue about this, please!) My 
> assumption is that the Markdown document lives in a separate file (I'm not 
> trying to do any clever textual inlining). Thanks to Greg Hendershott, I'm 
> almost there! I use
> 
> https://github.com/greghendershott/markdown
> 
> Here are two versions of the inlining function:
> 
> @(require markdown markdown/scrib scribble/decode)
> 
> @(define (markdown-inline file)
>(decode-flow
>(xexprs->scribble-pres
>  (with-input-from-file file read-markdown
> 
> @(define (markdown-part file)
>(decode
>(xexprs->scribble-pres
>  (with-input-from-file file read-markdown
> 
> As a practical matter, `markdown-part` needs to take lots of extra 
> arguments to create the appropriate part instead of just producing a 
> title-less section. More importantly, you often don't want a separate 
> section: you just want to "splice" the content into the current context.
> 
> `markdown-inline` works great for this purpose, *except* if the included 
> Markdown file contains any sections of its own, e.g.,
> 
> This is text.
> 
> > Lorem ipsum
> 
> # Section
> 
> ## Subsection
> 
> Then I get this error:
> 
> decode-flow: contract violation
> 
>   expected: pre-flow?
> 
>   given: (part-start 0 #f '((part "section")) (style #f '()) '("Section"))
> Any recommendations on how to create a "splicing" version that also 
> respects having sub-sections, or is that impossible? (I've tried pulling 
> out parts of the `part`, etc., but without success.)
> 
> Thanks!
> 
> Shriram
> 
> -- 
> 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/3f0b1012-783d-464a-a0ed-66d3f29f8893n%40googlegroups.com.

This looks very useful.

-- hendrik

-- 
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/20200912163734.pdin66tp3zzmxa2f%40topoi.pooq.com.


[racket-users] Incorporating Markdown documents into Scribble

2020-09-12 Thread Shriram Krishnamurthi
I need a little help with `decode` vs `decode-flow` in Scribble. (Also, 
this thread is about a question I wasn't able to find answered anywhere, so 
hopefully it will lead to a solution that others can also use.)

Sometimes it's really useful to incorporate Markdown-formatted content into 
the middle of a Scribble document. (Let's not argue about this, please!) My 
assumption is that the Markdown document lives in a separate file (I'm not 
trying to do any clever textual inlining). Thanks to Greg Hendershott, I'm 
almost there! I use

https://github.com/greghendershott/markdown

Here are two versions of the inlining function:

@(require markdown markdown/scrib scribble/decode)

@(define (markdown-inline file)
   (decode-flow
   (xexprs->scribble-pres
 (with-input-from-file file read-markdown

@(define (markdown-part file)
   (decode
   (xexprs->scribble-pres
 (with-input-from-file file read-markdown

As a practical matter, `markdown-part` needs to take lots of extra 
arguments to create the appropriate part instead of just producing a 
title-less section. More importantly, you often don't want a separate 
section: you just want to "splice" the content into the current context.

`markdown-inline` works great for this purpose, *except* if the included 
Markdown file contains any sections of its own, e.g.,

This is text.

> Lorem ipsum

# Section

## Subsection

Then I get this error:

decode-flow: contract violation

  expected: pre-flow?

  given: (part-start 0 #f '((part "section")) (style #f '()) '("Section"))
Any recommendations on how to create a "splicing" version that also 
respects having sub-sections, or is that impossible? (I've tried pulling 
out parts of the `part`, etc., but without success.)

Thanks!

Shriram

-- 
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/3f0b1012-783d-464a-a0ed-66d3f29f8893n%40googlegroups.com.