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

2020-09-10 Thread Shriram Krishnamurthi
I asked students to go to File | Install Package (not the DWIM box). From
there, I too get this "inferred package name includes disallowed
characters" message as Robby. But that isn't what my student got… So it
seems a bit unlikely this is the issue?

There is the possibility this is somehow different on Windows due to CR+LF
issues. Maybe one of the characters is being treated as a line-terminator
while the other is getting appended to the repo-name, causing the "might
not refer to" error? Perhaps someone with a Windows box could test out
John's "multiple paste" conjecture and see whether they get my student's
error message (see top posting of this thread) instead?

For what it's worth, I had to try quite hard to copy the newline off
github…so it would be impressive if two students in my class did just that.
(And it would be a remarkable piece of sleuthing by John!)

-- 
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/CAJUf2yTs0iC4rT8mbaU1BrWq08FRQrCFqWL9YqbFWUHmqr1CXQ%40mail.gmail.com.


[racket-users] hashcons

2020-09-10 Thread Hendrik Boom
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/20200911023429.7ux4r567yrqh7q2l%40topoi.pooq.com.


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

2020-09-10 Thread Robby Findler
I was able to follow John's instructions and I get what Shriram had in the
original message, so that seems like it is on the right track.

Confusingly, however, I also seem to be getting this more helpful message:

DrRacket install: invalid package source;
 inferred package name includes disallowed characters
  given: https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git

I can't see how this check gets evaded sometimes (and I cannot seem to get
back to the error state that produced the transcript below) so I didn't try
to push a fix.

But at least that might help SK's students & TAs for now.

Robby


Querying Git references for mystery-languages at
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
pkg: Git checkout initial protocol failed;
 the given URL might not refer to a Git repository
  given URL: https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
https://github.com/shriram/mystery-languages.git
  context...:
   /Users/robby/git/exp/plt/racket/collects/pkg/private/stage.rkt:762:25
   /Users/robby/git/exp/plt/racket/collects/net/git-checkout.rkt:336:0:
parse-initial-refs
   /Users/robby/git/exp/plt/racket/collects/net/git-checkout.rkt:73:8
   dynamic-wind
   call-in-empty-metacontinuation-frame
   /Users/robby/git/exp/plt/racket/collects/net/git-checkout.rkt:54:2:
retry-loop
   dynamic-wind
   call-in-empty-metacontinuation-frame
   dynamic-wind
   call-in-empty-metacontinuation-frame
   /Users/robby/git/exp/plt/racket/collects/pkg/private/stage.rkt:59:2:
lookup-normally
   /Users/robby/git/exp/plt/racket/collects/pkg/private/stage.rkt:107:0:
stage-package/info
   /Users/robby/git/exp/plt/racket/collects/pkg/private/install.rkt:141:0:
install-packages
   /Users/robby/git/exp/plt/racket/collects/pkg/private/install.rkt:925:4
   call-in-empty-metacontinuation-frame
   dynamic-wind

On Thu, Sep 10, 2020 at 8:40 PM Shriram Krishnamurthi 
wrote:

> It's not me doing this, it's a student. I agree this is always a
> possibility. But note that it also happened to a TA. I suppose they could
> all have been making the same mistake.
>
> --
> 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/CAJUf2ySBo9pwA4oyr62%3D-1MxiFLY-F0YL_kA4x-eXXqsbHqQDQ%40mail.gmail.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/CAL3TdOM5H4RhX5yBF1K4vM-Sd9kqTw5gUKnJRFr3%3DqaOzJ%2B%3Dbw%40mail.gmail.com.


Re: [racket-users] -i as an identifier

2020-09-10 Thread Robby Findler
The r6rs number syntax has explicit cases for +i and -i

   http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-7.html#node_sec_4.2

Robby


On Thu, Sep 10, 2020 at 7:27 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:

> I think you read the doc correctly, but there are programs that use +i
> and -i, so it's unclear if fixing the reader is desirable. Perhaps the
> documentation should be adjusted instead.
>
> Here’s an example of how people use +i and -i:
> https://github.com/mbutterick/aoc-racket/blob/master/2019/03.rkt#L20
>
> On Thu, Sep 10, 2020 at 3:40 PM Sage Gerard  wrote:
>
>> It looks like -i cannot be used as an identifier because it evaluates to
>> the complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I
>> noticed this when trying to map CLI flag strings to identifiers. -i was the
>> only one in the set to fall over.
>>
>> In the Reading Numbers section of the reference, it looks like a digit
>> sequence is required before "i" for both the inexact complex and exact
>> complex productions. That makes sense to me because it doesn't seem right
>> to assume that an empty string corresponds to -1 like it seems to do here.
>> Maybe I'm misreading the grammar?
>>
>> Before I open a GitHub issue, I just need to know if any part of this is
>> unintentional.
>>
>> *~slg*
>>
>>
>> --
>> 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/s9pqyR4hlcTjjfYYHeNqnVsDKbU138qdy-L0rIquew86_TtTNX4SlRRw2r4Yv2-0szTzJiCmyu4QDmwwfPD863HHRO6oZpT9x1V8GfCmM3E%3D%40sagegerard.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/CADcueguL5rk5jaTsBqeuucCOuHC7NYanw-iA0CoCuBbjSC4TBA%40mail.gmail.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/CAL3TdONTk9UrXPV%2BFtb%2B6kFCHoaSsiR%2B1JQHS3kUgTw4_czEAw%40mail.gmail.com.


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

2020-09-10 Thread Shriram Krishnamurthi
It's not me doing this, it's a student. I agree this is always a
possibility. But note that it also happened to a TA. I suppose they could
all have been making the same mistake.

-- 
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/CAJUf2ySBo9pwA4oyr62%3D-1MxiFLY-F0YL_kA4x-eXXqsbHqQDQ%40mail.gmail.com.


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

2020-09-10 Thread 'John Clements' via Racket Users
Shriram, have you ruled out the classic multi-paste prolem? It looks very much 
like that’s what you’re seeing here.

That is, if you paste a string that ends with a newline into the “do what I 
mean” box, it will appear still to be blank. So you paste it again. So you 
paste it again. Eventually you figure it out and paste a string that doesn’t 
end with a newline, but then it tries to download from a URL that contains 
about five newlines in it. 

Again, to repeat:

1) Highlight a string ending with a newline.
2) Open the Package Manager box
3) Click in the “do what I mean box”.
4) Hit cmd-v. see that the box appears blank
5) Hit it a few more times, then click “install”.

I believe this should be fixed, and it should be an easy fix. I haven’t fixed 
it myself.

John


> On Sep 10, 2020, at 10:16, Shriram Krishnamurthi  wrote:
> 
> The original student (on Windows 10) has confirmed they were able to install 
> with raco on the shell, which further lends credence to the likelihood that 
> the PM and raco are doing something differently.
> 
> (I have some other issues w/ the caching and how clearing out the trash 
> doesn't seem to affect the cache, but I'll put that off for another day. <-;)
> 
> On Thu, Sep 10, 2020 at 10:06 AM Philip McGrath  
> wrote:
> Also, this is happening over encrypted HTTPS: no one is sniffing the 
> User-Agent header.
> 
> My initial attempt to reproduce in the GUI package manager was foiled because 
> I’d first tried installing at the command line, and the package manager used 
> a cached copy of the repository. From Shriram’s update last night, it sounds 
> like the GUI package manager and “raco pkg” are doing something differently.
> 
> 
> -- 
> -Philip
> 
> -- 
> 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/CAJUf2yQTO5dN7yKjvGu_mR13cD2BdkAHLGj2DU7Xdyeo5Ww-RQ%40mail.gmail.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/3a55bb1f-e501-42cc-a75e-eb4d48077cca%40mtasv.net.


Re: [racket-users] -i as an identifier

2020-09-10 Thread Sorawee Porncharoenwase
I think you read the doc correctly, but there are programs that use +i and
-i, so it's unclear if fixing the reader is desirable. Perhaps the
documentation should be adjusted instead.

Here’s an example of how people use +i and -i:
https://github.com/mbutterick/aoc-racket/blob/master/2019/03.rkt#L20

On Thu, Sep 10, 2020 at 3:40 PM Sage Gerard  wrote:

> It looks like -i cannot be used as an identifier because it evaluates to
> the complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I
> noticed this when trying to map CLI flag strings to identifiers. -i was the
> only one in the set to fall over.
>
> In the Reading Numbers section of the reference, it looks like a digit
> sequence is required before "i" for both the inexact complex and exact
> complex productions. That makes sense to me because it doesn't seem right
> to assume that an empty string corresponds to -1 like it seems to do here.
> Maybe I'm misreading the grammar?
>
> Before I open a GitHub issue, I just need to know if any part of this is
> unintentional.
>
> *~slg*
>
>
> --
> 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/s9pqyR4hlcTjjfYYHeNqnVsDKbU138qdy-L0rIquew86_TtTNX4SlRRw2r4Yv2-0szTzJiCmyu4QDmwwfPD863HHRO6oZpT9x1V8GfCmM3E%3D%40sagegerard.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/CADcueguL5rk5jaTsBqeuucCOuHC7NYanw-iA0CoCuBbjSC4TBA%40mail.gmail.com.


[racket-users] -i as an identifier

2020-09-10 Thread Sage Gerard
It looks like -i cannot be used as an identifier because it evaluates to the 
complex number 0-1i. So in the v7.8 REPL, (define -i "foo") fails. I noticed 
this when trying to map CLI flag strings to identifiers. -i was the only one in 
the set to fall over.

In the Reading Numbers section of the reference, it looks like a digit sequence 
is required before "i" for both the inexact complex and exact complex 
productions. That makes sense to me because it doesn't seem right to assume 
that an empty string corresponds to -1 like it seems to do here. Maybe I'm 
misreading the grammar?

Before I open a GitHub issue, I just need to know if any part of this is 
unintentional.

~slg

-- 
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/s9pqyR4hlcTjjfYYHeNqnVsDKbU138qdy-L0rIquew86_TtTNX4SlRRw2r4Yv2-0szTzJiCmyu4QDmwwfPD863HHRO6oZpT9x1V8GfCmM3E%3D%40sagegerard.com.


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

2020-09-10 Thread George Neuner




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.


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/b7faf924-5d4a-0d21-db6c-dee1afde8c61%40comcast.net.


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

2020-09-10 Thread Shriram Krishnamurthi
The original student (on Windows 10) has confirmed they were able to
install with raco on the shell, which further lends credence to the
likelihood that the PM and raco are doing something differently.

(I have some other issues w/ the caching and how clearing out the trash
doesn't seem to affect the cache, but I'll put that off for another day.
<-;)

On Thu, Sep 10, 2020 at 10:06 AM Philip McGrath 
wrote:

> Also, this is happening over encrypted HTTPS: no one is sniffing the
> User-Agent header.
>
> My initial attempt to reproduce in the GUI package manager was foiled
> because I’d first tried installing at the command line, and the package
> manager used a cached copy of the repository. From Shriram’s update
> last night, it sounds like the GUI package manager and “raco pkg” are doing
> something differently.
>
>
> --
> -Philip
>

-- 
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/CAJUf2yQTO5dN7yKjvGu_mR13cD2BdkAHLGj2DU7Xdyeo5Ww-RQ%40mail.gmail.com.


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

2020-09-10 Thread Philip McGrath
Also, this is happening over encrypted HTTPS: no one is sniffing the
User-Agent header.

My initial attempt to reproduce in the GUI package manager was foiled
because I’d first tried installing at the command line, and the package
manager used a cached copy of the repository. From Shriram’s update
last night, it sounds like the GUI package manager and “raco pkg” are doing
something differently.


-- 
-Philip

-- 
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/010001747856d1f6-1ebee798-1b06-4633-a897-13e206024129-00%40email.amazonses.com.


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

2020-09-10 Thread Shriram Krishnamurthi
Please note that, per my message last night, this is also happening (my TA
claims he saw the *identical* text: multiple red lines, etc.) on macOS 11.
So it's not just for Windows any more.

On Thu, Sep 10, 2020 at 9:20 AM George Neuner  wrote:

>
> On 9/10/2020 7:37 AM, Hendrik Boom wrote:
> > On Thu, Sep 10, 2020 at 12:49:25AM -0400, George Neuner wrote:
> > >
> > > I don't know if DrRacket even sends a "user agent" string.
> >
> > If DrRacket can send a user agent string, so can malware.
> >
> > So it's not really reliable to filter on the user agent string.
> >
> > -- hendrik
>
> Of course ... any HTTP request can forge a user agent string:  most
> browsers allow you to change it, and so do some HTTP aware
> applications.  E.g., there is a plugin for Firefox that changes it on
> the fly based on the URL - use cases involve things like Google image
> search behaving differently for Chrome vs non-Chrome users, and
> Microsoft sites behaving differently for non-Windows users.
>
> My point is that there may be something unseen - probably a firewall -
> blocking the DrRacket request but not blocking requests from the known
> browser.  If it isn't some software installed on the machine itself, it
> likely is an IT appliance guarding the whole network. Firewall
> appliances are NAT routers: they can look inside even encrypted
> connections to examine protocols being used and the raw data passing
> through.
>
> Based on the error from Shriram's message, it looks like DrRacket is
> successfully calling out but doesn't like/understand the response ...
> which would tend to eliminate Windows built-in firewall as a suspect [it
> doesn't do protocol inspection].  It still could be other AV/firewall
> software on the machine, or something upstream in the network that his
> student is unaware of.
>
> YMMV,
> George
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Racket Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/racket-users/7rMAEma8Xkg/unsubscribe.
> To unsubscribe from this group and all its topics, 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/8a1628af-b647-5272-1c9a-da347b604091%40comcast.net
> .
>

-- 
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/CAJUf2yQcbB98opH%3D%2BYs0R6XTFAY14hphTnQejnvPRf%3D03o12qQ%40mail.gmail.com.


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

2020-09-10 Thread George Neuner



On 9/10/2020 7:37 AM, Hendrik Boom wrote:

On Thu, Sep 10, 2020 at 12:49:25AM -0400, George Neuner wrote:
> 
> I don't know if DrRacket even sends a "user agent" string.


If DrRacket can send a user agent string, so can malware.

So it's not really reliable to filter on the user agent string.

-- hendrik


Of course ... any HTTP request can forge a user agent string:  most 
browsers allow you to change it, and so do some HTTP aware 
applications.  E.g., there is a plugin for Firefox that changes it on 
the fly based on the URL - use cases involve things like Google image 
search behaving differently for Chrome vs non-Chrome users, and 
Microsoft sites behaving differently for non-Windows users.


My point is that there may be something unseen - probably a firewall - 
blocking the DrRacket request but not blocking requests from the known 
browser.  If it isn't some software installed on the machine itself, it 
likely is an IT appliance guarding the whole network. Firewall 
appliances are NAT routers: they can look inside even encrypted 
connections to examine protocols being used and the raw data passing 
through.


Based on the error from Shriram's message, it looks like DrRacket is 
successfully calling out but doesn't like/understand the response ... 
which would tend to eliminate Windows built-in firewall as a suspect [it 
doesn't do protocol inspection].  It still could be other AV/firewall 
software on the machine, or something upstream in the network that his 
student is unaware of.


YMMV,
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/8a1628af-b647-5272-1c9a-da347b604091%40comcast.net.


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

2020-09-10 Thread Hendrik Boom
On Thu, Sep 10, 2020 at 12:49:25AM -0400, George Neuner wrote:
> 
> I don't know if DrRacket even sends a "user agent" string.

If DrRacket can send a user agent string, so can malware.

So it's not really reliable to filter on the user agent string.

-- 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/20200910113752.ej65fc6clr245yan%40topoi.pooq.com.