Re: [racket-users] Math-quiz program

2022-09-06 Thread 'John Clements' via Racket Users
There are two raco tools that might be of use to you: here’s a link to the 
documentation for both of them:

https://docs.racket-lang.org/guide/exe.html

Also, I personally recommend using the discourse forum rather than this mailing 
list. Following the transition to discourse last year, the users mailing list 
is much less frequently used.

https://racket.discourse.group/

John Clements


> On Sep 5, 2022, at 07:25, Hrvoje Blazevic  wrote:
> 
> I've been working last several months on a GUI math training/understanding 
> program for my 6 year old daughter who just started grade 1 (in Philippines - 
> they start beginning of June). 
> Originally I started with addition and subtraction, but as every new topic 
> (math related) was introduced in school (like basic idea of fractions, clock 
> and many others) and as I saw problems in understanding, I would add a new 
> exercise to the program. It contains 12 exercises in all now, and is pretty 
> much complete (I run out of ideas) :-) .
> 
> My problem/question is following. 
> As I've seen with my daughter, the program is very successful in teaching (at 
> least it is with my daughter), and she actually enjoys using it (which was 
> not the case when I originally started with papers of printed problems). 
> Therefore I would like to post this program on the internet for other parents 
> to use, but I can't find where Racket compiled/standalone programs are posted.
> 
> I have of-course found Racket packages repository, but (I admit I know 
> nothing of Racket packages) it does not seem to be what I need. As far as I 
> see it, packages are for people who use racket, have racket installed on 
> their computers, and know how to handle packages. 
> This is definitely not the folks I have in mind for my program.
> 
> So is there such a repository where I can post tarball containing compiled 
> program, and source code.
> 
> Hrvoje Blazevic
> 
> 
> -- 
> 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/41d08993-f323-4044-8c7c-239b58dcca8en%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/e6302ee9-c345-45fe-8576-a4fd1223d176%40mtasv.net.


[racket-users] Racket v8.4 released

2022-02-09 Thread 'John Clements' via Racket Users
Racket version 8.4 is now available from

https://racket-lang.org/



* Command-line Racket provides a new expression editor by default for
  its read-eval-print loop (REPL). The new REPL is based on the Chez
  Scheme expression editor, but extended to use the same
  language-sensitive syntax coloring and indentation tools as DrRacket.

* Typed Racket adds a kind system, preventing programmers from
  writing nonsensical type expressions. It checks whether type
  constructors are correctly applied to arguments, and separates
  type constructors from polymorphic types. The `:kind` form enables
  checking the kind of a type expression at the REPL. The new system
  also correctly rejects some ill-formed recursive types.

* Racket has a `file-or-directory-stat` for unified information about
  file-system objects.

* DrRacket shows the region affected by an `#;` S-expression comment
  by fading the commented-out region.

* Racket on Chez has faster multiplication and division for some
  numbers.

* Web server: The files dispatcher supports all standard caching-related
  HTTP response headers (e.g., Cache-Control).

* Web server: A new dispatcher captures the common pattern of processing
  HTTP requests and responses in a layered fashion.

* The Web Server supports use of the Cache-Control header, and includes
  a new wrapping dispatcher.

* Expander: add "portal" syntax to support new forms of syntax object
  binding.

* Documentation search is improved.

* Some hash operations support an optional `try-order?` argument.

* The plot-metrics interface has documentation.

* Fonts support OpenType feature settings.

* The Gui library has improved support for Wayland.

* The computation of quadratic roots is further improved.

* The `set/c` contract adds support for random generation.

* DrRacket's interactions window supports #lang-specific coloring
  and indentation.

* DrRacket's parenthesis-based keyboard shortcuts change based on
  the parentheses that each different #lang uses.

* The release includes many other bug repairs and other improvements!

Transition/Update notes:

* To turn off expeditor and make Racket's REPL go back to the old
  editline/readline-based editor, use the command

,input readline

  and then restart Racket. Get back to the new expression editor with

,input expeditor

  To toggle color mode for the new expression editor, use one of the
  following, which does not require restarting Racket:

,color #false
,color #true

* Support for comment fading in DrRacket requires an increment to
  the "WXME" format version so files with non-text content written
  by DrRacket v8.4 will open only in v8.4 and later. This does not
  affect files that consist only of unicode text.

* The addition of the kind system to Typed Racket means that certain
  mild abuses of the type system no longer type check, most notably
  the 'application' of a polymorphic type.


The following people contributed to this release:

Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew
Mauer-Oats, Andy Keep, Ayman Osman, Ben Greenman, Bob Burger, Bogdan
Popa, Cameron Moy, D. Ben Knoble, Fred Fu, Greg Hendershott, Gustavo
Massaccesi, Jamie Taylor, Jarhmander, Jesse Alama, Joel Dueck, John
Clements, Jordan Johnson, Laurent Orseau, Leif Andersen, Marc Burns,
Matthew Flatt, Matthias Felleisen, Mike Engelhart, Mike Sperber, Noah
Ma, Oscar Waddell, Pavel Panchekha, Philip McGrath, rgkirch, Robby
Findler, Sam Tobin-Hochstadt, Sergiu Ivanov, Sorawee Porncharoenwase,
Stefan Schwarzer, Stephen De Gabrielle, Tony Garnock-Jones, Viko Riféo,
and Zachary Mao



Link to package regressions issue for the 8.4 release:
  https://github.com/racket/racket/issues/4125

Feedback Welcome

-- 
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/8c50d317-dd83-44a9-b560-0f7759d49fa1%40mtasv.net.


Re: [racket-users] Vectors, boxes and places

2022-02-03 Thread 'John Clements' via Racket Users
Sounds like a good question to me. Perhaps it would make sense to post it to 
the discourse group, instead? I’m happy to ask on your behalf if you don’t feel 
like it.

https://racket.discourse.group/

John

> On Feb 3, 2022, at 5:58 AM, Tim Jervis  wrote:
> 
> Dear Racketeers,
> 
> Is there something I have misunderstood about vectors, boxes and places which 
> might explain why immutable boxes are not place-message-allowed, but 
> immutable vectors are?
> 
> > (place-message-allowed? (box-immutable #f))
> #f
> > (place-message-allowed? (vector-immutable #f))
> #t
> > 
> 
> c.f.
> 
> https://docs.racket-lang.org/reference/boxes.html 
> 
> A box is like a single-element vector, normally used as minimal mutable 
> storage.
> 
> Best,
> 
> Tim
> 
> -- 
> 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/878F140E-3160-4B88-BB8B-4C04B1668BCB%40timjervis.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/3b47b917-cbd6-48f2-8def-b71e396f5d63%40mtasv.net.


Re: [racket-users] HTDP 2ed Learning resources and solutions to exercises

2021-12-22 Thread 'John Clements' via Racket Users
Solutions for the first edition are available at

https://htdp.org/2003-09-26/Solutions/

Also, you will probably find a faster response for questions like this at the 
racket discourse, 

https://racket.discourse.group/

(You might even find a pointer to 2e solutions? not sure)

Best,

John Clements

> On Dec 15, 2021, at 05:31, acate...@gmail.com  wrote:
> 
> Its one of my goals in 2022 to teach myself programming. To kick this goal 
> off early, I have decided to pick up HTDP 2e from Amazon.  After a cursory 
> glance through the book and working through a few problems. I notice that 
> there are no provided solution/ answer to the exercises in the book.  Which 
> means that there is no way to check my solutions against  the proper 
> recommended way to solve the exercises.  As a result, I have no idea if I am 
> actual on the right track in this learning process.  Where can I find the 
> solutions to the exercises in HTDP?  If there are no solutions what book 
> would you recommend that would be suited for a self-learner? 
> 
>  
> Thanks
> 
> 
> -- 
> 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/c5d6d826-c6f8-4d69-a021-9a843e3b58den%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/59ba8a1e-f784-4a14-8784-0695ee0a2f63%40mtasv.net.


Re: [racket-users] Discourse - Mailing list mode

2021-12-09 Thread 'John Clements' via Racket Users
I just tried it, from a new account that wasn’t associated with an account, and 
it looks like it went through … which is actually kind of frightening. Can’t a 
random spammer just send email to this address? I considered doing it as a 
stunt, but decided it would be nicer to ask about it first.

John

> On Dec 9, 2021, at 10:52, Sam Tobin-Hochstadt  wrote:
> 
> It appears that enabling this is quite simple. I believe I have set it
> up so that emailing racket+uncategorize...@discoursemail.com should
> create a new topic in the Uncategorized category. Feel free to test it
> out.
> 
> Sam
> 
> On Thu, Dec 9, 2021 at 8:27 AM Stephen De Gabrielle
>  wrote:
>> 
>>> it’s becoming apparent to me that setting up posting via email is frankly 
>>> difficult; I think that monitoring the list using mailing-list mode is 
>>> plausible, but posting, at this point, is not.
>> 
>> I had a chat with a Discourse consultant and they thought posting by email 
>> was possible if you self host, but self hosting with mailing list would 
>> require both a hosting provider, and a send mail provider (he uses digital 
>> ocean with sendgrid or mailgun). Receiving email is handled by the 'mail 
>> receiver container' if you are self hosting.
>> 
>> It was a casual conversation, and I don't know him well.  It would be good 
>> to know if other PL communities have done this
>> 
>> stephen
>> 
>> 
>> 
>> On Wed, Dec 8, 2021 at 6:47 PM 'John Clements' via Racket Users 
>>  wrote:
>>> 
>>> Your points are well taken, and moving away from a traditional mailing list 
>>> is not a decision that we took lightly; the fact is that we were simply 
>>> *failing* when it came to moderating the mailing list as run by google 
>>> groups, and running one through mailman was even worse. It appears that 
>>> discourse will allow us to spread the load of moderating the group across 
>>> the members of the group, rather than depending on one or two points of 
>>> failure.
>>> 
>>> BTW, lest you think that I think that discourse solves all our problems: 
>>> it’s becoming apparent to me that setting up posting via email is frankly 
>>> difficult; I think that monitoring the list using mailing-list mode is 
>>> plausible, but posting, at this point, is not. I guess I shouldn’t be 
>>> shocked: that’s the whole problem with email, it’s not authenticated in any 
>>> reasonable or widely used way.
>>> 
>>> Regardless, I’m happy with the move: we have about 181 people registered, 
>>> and the volume there looks robust and sustainable.
>>> 
>>> John
>>> 
>>>> On Dec 8, 2021, at 13:16, George Neuner  wrote:
>>>> 
>>>> 
>>>> On 12/8/2021 12:34 PM, James Platt wrote:
>>>>> On Dec 8, 2021, at 10:45 AM, George Neuner wrote:
>>>>> 
>>>>>> It's a big deal if you are (or were) following multiple groups.
>>>>> 
>>>>> I don't understand.  Why is this an issue?  I find it very convenient to 
>>>>> filter each group into it's own folder in email.  If this were a 
>>>>> non-technical group, you wouldn't expect everyone to know how to do that 
>>>>> but anyone who is a programmer ought to have no problem configuring 
>>>>> filters and folders.
>>>> 
>>>> If you had continued reading, you would have seen my comment that NOT ALL 
>>>> news groups support list distribution or posting via email. NNTP is not 
>>>> email.  Usenet group moderators[*] can choose how to make their groups 
>>>> available: the default is via list distribution and NNTP both, but the 
>>>> moderator can deliberately disable one or the other - or only enable 
>>>> digests via email, or disable posting.
>>>> 
>>>> My complaint is having to read some things via NNTP and others through 
>>>> email because, while there are programs that do both, I haven't found any 
>>>> single program that does BOTH WELL.  And that is without even considering 
>>>> the growing number of ... don't want to confuse by saying "groups", let's 
>>>> call them "crowds" ... that have abandoned Usenet entirely in favor of web 
>>>> forums.
>>>> 
>>>> George
>>>> 
>>>> [*] even unmoderated groups have a moderator/administrator - by default it 
>>>> is whoever started the group.
>>>> 
>>>> 
>>>> --
>>>> You re

Re: [racket-users] Discourse - Mailing list mode

2021-12-08 Thread 'John Clements' via Racket Users
Your points are well taken, and moving away from a traditional mailing list is 
not a decision that we took lightly; the fact is that we were simply *failing* 
when it came to moderating the mailing list as run by google groups, and 
running one through mailman was even worse. It appears that discourse will 
allow us to spread the load of moderating the group across the members of the 
group, rather than depending on one or two points of failure.

BTW, lest you think that I think that discourse solves all our problems: it’s 
becoming apparent to me that setting up posting via email is frankly difficult; 
I think that monitoring the list using mailing-list mode is plausible, but 
posting, at this point, is not. I guess I shouldn’t be shocked: that’s the 
whole problem with email, it’s not authenticated in any reasonable or widely 
used way.

Regardless, I’m happy with the move: we have about 181 people registered, and 
the volume there looks robust and sustainable.

John

> On Dec 8, 2021, at 13:16, George Neuner  wrote:
> 
> 
> On 12/8/2021 12:34 PM, James Platt wrote:
>> On Dec 8, 2021, at 10:45 AM, George Neuner wrote:
>> 
>> > It's a big deal if you are (or were) following multiple groups.
>> 
>> I don't understand.  Why is this an issue?  I find it very convenient to 
>> filter each group into it's own folder in email.  If this were a 
>> non-technical group, you wouldn't expect everyone to know how to do that but 
>> anyone who is a programmer ought to have no problem configuring filters and 
>> folders.
> 
> If you had continued reading, you would have seen my comment that NOT ALL 
> news groups support list distribution or posting via email. NNTP is not 
> email.  Usenet group moderators[*] can choose how to make their groups 
> available: the default is via list distribution and NNTP both, but the 
> moderator can deliberately disable one or the other - or only enable digests 
> via email, or disable posting.
> 
> My complaint is having to read some things via NNTP and others through email 
> because, while there are programs that do both, I haven't found any single 
> program that does BOTH WELL.  And that is without even considering the 
> growing number of ... don't want to confuse by saying "groups", let's call 
> them "crowds" ... that have abandoned Usenet entirely in favor of web forums.
> 
> George
> 
> [*] even unmoderated groups have a moderator/administrator - by default it is 
> whoever started the group.
> 
> 
> -- 
> 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/5f17-59b4-a381-ddd7-25b435887694%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/bacee3b2-b372-4dd0-af60-c657ba984936%40mtasv.net.


[racket-users] deleting terms of service for discourse group

2021-12-02 Thread 'John Clements' via Racket Users
Following up on feedback from y’all, we’ve deleted the terms of service for the 
racket discourse group. 

https://racket.discourse.group/tos

Hopefully this (lack of) TOS allays concerns about participation in the 
discourse group.

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/c97b732f-e31a-4081-ad4a-a1bfd6d39e2d%40mtasv.net.


Re: [racket-users] Racket Discourse

2021-11-23 Thread 'John Clements' via Racket Users
I’m sorry to hear that! Several things to check/try

1) I see the confirmation email coming from “rac...@discoursemail.com”, with 
subject line "[Racket Discussions] Confirm your new account”

Maybe it’s in your junk folder?

2) You can always ignore the given url and just go to racket.discourse.group 
and sign up manually, perhaps that will work.

Let me know if I can help any further, I do know that people have signed up 
using gmail accounts.

John

> On Nov 23, 2021, at 12:25, damien...@gmail.com  
> wrote:
> 
> if i create an account following the link at the end of this message , i 
> never get verification email at my google address i specified.
> 
> On Sunday, November 21, 2021 at 7:09:21 PM UTC+1 johnbclements wrote:
> TL;DR: Go to 
> 
> https://racket.discourse.group/invites/okLTSrQw1T 
> 
> and sign up for Racket Discourse (https://racket.discourse.group/) 
> 
> # Thoughts behind the move: 
> 
> Over time, it has become steadily more apparent that email-only 
> mailing lists are an outdated communication medium for the Racket 
> community. More recent arrivals in our community have generally 
> chosen other platforms like slack or discord to carry on discussions. 
> As a result, the signal-to-noise ratio of the racket users mailing list 
> has dropped below the level of viability. 
> 
> In short, it’s time to give up on the mailing list. 
> 
> After a good deal of research, it looks like there’s room for a whole 
> bunch of discussion platforms for Racket, but it also seems as though 
> there should be a “permanent” one; it should be archived, it should be 
> searchable in its entirety, and it should not tie us to someone else’s 
> plan to monetize user data. 
> 
> Given these criteria, the winner is Discourse, an open-source 
> messaging platform built by Jeff Atwood, Robin Ward, and Sam 
> Saffron. It has a reasonable business model (they host projects like 
> ours unless they get really big, whereupon you can either host it 
> yourself or pay them to do it); it’s widely used by other language 
> communities; and it appears to do most of what we want. 
> 
> # So where can I sign up? 
> 
> Sign up here: https://racket.discourse.group/invites/okLTSrQw1T 
> 
> The discourse platform has been in a “soft opening” phase for about 
> two weeks now, since RacketCon, and we have about a hundred users. 
> You’re receiving this message because we’d like to have *YOU* there 
> as well. 
> 
> # Can I still receive messages like a mailing list? 
> 
> Yes, you can. I have it enabled myself! 
> To use discord as a mailing-list: 
> Sign up, go to Preferences > Email, and tick “Enable mailing list mode'. 
> 
> Yours, 
> 
> John Clements & Stephen De Gabrielle 
> 
> -- 
> 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/a1cc04f5-25f6-4d0e-aeda-a656c18e5604n%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/e869aa79-b8c8-4d51-9737-ebdc2c5eb88e%40mtasv.net.


Re: the end of the [racket-users] mailing list and the migration to Discourse as a forum for Racket

2021-11-22 Thread 'John Clements' via Racket Users
I think I agree with pretty much everything you’ve written here. 

I will note that your problem with sending email to the mailing list from a 
different address *is* one I’ve experienced, many hundreds of times. 

I think your #1 and your #5 is more or less what blog.racket-lang.org is. I see 
Discourse as our best choice for #2. For chat, it sounds like most folks like 
IRC, Slack, or Discord. I’m not generally in that market, so I don’t think my 
opinions are worth much, there. I think there’s some hope that discourse might 
help out with #4, as well. 

Best,

John 

> On Nov 22, 2021, at 16:05, Siddhartha Kasivajhula  wrote:
> 
> That first email reads like a cross between a mathematical proof and some 
> kind of satire. Good stuff :)
> 
> The broad communication needs seem to be:
> 
> (1) a bulletin board / a channel for announcements
> (2) a forum / a channel for discussions
> (3) chat / a realtime channel.
> (4) a knowledge base
> (5) a broadcast / external-facing medium
> 
> It sounds like the proposal here is to use Discourse for both (1) and (2). 
> All of the above become (4) if they are archived, but there is also the wiki 
> (which I didn't know about) and of course the website and docs. Anyone can 
> tweet @racketlang for (5), I guess. And we haven't really talked about (3) 
> yet.
> 
> Some considerations people have brought up include:
> 
> Noise: I agree that Discourse is likely to have more volume. As a result, 
> simply using it in mailing list mode isn't exactly a 1-to-1 replacement, 
> since the volume of emails would be higher, making it less appropriate for 
> announcements. It would be nice to be able to have more fine-grained controls 
> over which messages get emailed (e.g. in terms of category or activity). The 
> other (complementary, in my view) option is to use digest mode. In 
> traditional mailing lists we pick one or the other. In Discourse, it seems 
> that if you visit the site, it doesn't send you the digest for that day. It 
> would be nice if it could be configured to always send a digest, to actually 
> emulate mailing list behavior. Finally, I did notice that I wasn't able to 
> reply to a Discourse post from my phone. It looked like my phone email client 
> was using the default sender instead of the Discourse-specific one. I don't 
> recall that happening in similar situations before, but it's entirely 
> possible that this is a problem with my email client. In any case, with these 
> improvements, I do think Discourse could be compelling as a replacement for 
> the mailing list for most people.
> 
> Open source: I agree this is an important criterion (which is one reason 
> you'll find me on IRC rather than Discord or Slack). Phil's point that Google 
> Groups isn't open source while Discourse is, seems a compelling argument for 
> Discourse here.
> 
> Terms of service: Can't believe I signed my rights away to company_name 
> without even reading applicable_laws in jurisdiction_here.
> 
> 
> 
> 
> On Mon, Nov 22, 2021 at 9:19 AM Sage Gerard  wrote:
> Mozilla's notes on their own instance summarizes an email-exclusive
> workflow well.
> 
> https://discourse.mozilla.org/t/how-do-i-use-discourse-via-email/15279
> 
> On 11/22/21 12:16 PM, 'John Clements' via Racket Users wrote:
> > Yes, I believe that replies by email are currently enabled. Here, let me 
> > test that.
> >
> > …
> >
> > Oh, yeah… can’t do that, the incoming email address isn’t the one that I 
> > send from. Sigh. Perhaps someone else can try this?
> >
> > One thing that I know isn’t set up yet is starting a new topic by email. I 
> > know it’s possible, but somebody needs to read the docs and check what’s 
> > required in order to set it up.
> >
> > John
> >
> >> On Nov 22, 2021, at 11:56, Sage Gerard  wrote:
> >>
> >> Y'all are configuring Discourse to allow replies by emails too, right?
> >>
> >> On 11/22/21 11:00 AM, J. Ryan Stinnett wrote:
> >>> On Mon, 22 Nov 2021 at 15:25, Martin Weigele  wrote:
> >>> A discourse type forum - we had this discussions in other contexts again 
> >>> and
> >>> again - may be a better choice for persons who have the luxury they can
> >>> concentrate on very few thingies. For all others, mailinglists are a much
> >>> better choice, you can follow many developments in one place: your mail
> >>> client, with a completely standard UI.
> >>>
> >>> Discourse has a mailing list mode each user can choose to enable which 
> >>> allows them to receive every post to their mail client, so you can 
> >>> continue to use your mail client workflow for followi

Re: the end of the [racket-users] mailing list and the migration to Discourse as a forum for Racket

2021-11-22 Thread 'John Clements' via Racket Users
Yes, I believe that replies by email are currently enabled. Here, let me test 
that.

…

Oh, yeah… can’t do that, the incoming email address isn’t the one that I send 
from. Sigh. Perhaps someone else can try this?

One thing that I know isn’t set up yet is starting a new topic by email. I know 
it’s possible, but somebody needs to read the docs and check what’s required in 
order to set it up.

John

> On Nov 22, 2021, at 11:56, Sage Gerard  wrote:
> 
> Y'all are configuring Discourse to allow replies by emails too, right?
> 
> On 11/22/21 11:00 AM, J. Ryan Stinnett wrote:
>> On Mon, 22 Nov 2021 at 15:25, Martin Weigele  wrote:
>> A discourse type forum - we had this discussions in other contexts again and 
>> again - may be a better choice for persons who have the luxury they can 
>> concentrate on very few thingies. For all others, mailinglists are a much 
>> better choice, you can follow many developments in one place: your mail 
>> client, with a completely standard UI.
>> 
>> Discourse has a mailing list mode each user can choose to enable which 
>> allows them to receive every post to their mail client, so you can continue 
>> to use your mail client workflow for following messages over there as well.
>> 
>> - Ryan
>> -- 
>> 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/CA%2B952WrzFB-FVWzn0%3DmES3kLd5XsU6gXqG8Vi8gij7Fz0J_Qgw%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/37a16e37-a38f-906f-3f7a-4c008e5a0a76%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/df2d0a47-804e-4275-a4b3-dbfd2116a702%40mtasv.net.


Re: [racket-users] Racket Discourse

2021-11-22 Thread 'John Clements' via Racket Users
Good questions:

1) Yes, Sam mentioned the discourse group at RacketCon, and there was some 
“hallway” discussion about it.
2) No, no sponsor was involved. Yikes! Indeed, I’m not aware that Racket *has* 
any sponsors currently, aside from the research and infrastructure grants that 
are being funded by the NSF et cetera.

John

> On Nov 22, 2021, at 09:52, Sage Gerard  wrote:
> 
> Thanks for checking on this. I'd expect something like a CoC more than a ToS 
> in this case, but terms are terms :)
> If you don't mind, I have a couple of follow up questions.
> 
>   • Were "rank-and-file" Racket contributors alerted to this change in 
> advance? Say, in a RacketCon speech? I may have missed it.
>   • Did a sponsor play any role in this transition?
> On 11/22/21 9:49 AM, John Clements wrote:
>> I’m actually very heartened to see the boilerplate here; it sounds like this 
>> is something we can edit, and not something imposed by Discourse. If that’s 
>> the case, then it certainly seems likely that we can find some language (or, 
>> more importantly, *lack* of language) that makes more of us happy.
>> 
>> I, for one, am shocked to see binding arbitration language in here: I think 
>> binding arbitration is one of the most revolting elements of corporate 
>> control in our society today, and if we were unable to remove the binding 
>> arbitration clause, I would likely abandon discourse myself.
>> 
>> Sounds like the next step is to come up with a TOS that’s acceptable to all, 
>> or find a way to remove it entirely.
>> 
>> John
>> 
>> 
>>> On Nov 22, 2021, at 04:54, Norman Gray 
>>>  wrote:
>>> 
>>> 
>>> Greetings.
>>> 
>>> On 22 Nov 2021, at 4:24, Sage Gerard wrote:
>>> 
>>> 
 But I have to ask, who wrote the ToS? Who is "the company" in its
 
 context? Discord? One of the Racket team's universities? A sponsor?
 
>>> I'm not sure who 'the company' is, either, but they appear to be called 
>>> 'company_name' (catchy!), and that users are notified that disputes can 
>>> only be arbitrated in city_for_disputes, under governing_law. *cough*
>>> 
>>> Such curiosities aside, all of that does represent unappealingly more 
>>> legalese than one expects for a mailing list.  But since the current list 
>>> is hosted at googlegroups, and since it's not obvious that Discourse Corp 
>>> is more predatory than Google Corp (indeed, the former is dispensing 
>>> freemium-ware rather than ad-ware, so are more attractive in terms of 
>>> business model), it feels irrational for me to be too put off by it.
>>> 
>>> Best wishes,
>>> 
>>> Norman
>>> 
>>> 
>>> --
>>> Norman Gray  :  
>>> https://nxg.me.uk
>>> 
>>> SUPA School of Physics and Astronomy, University of Glasgow, UK
>>> 
>>> --
>>> 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/BEC261BF-C274-4221-8F62-C77D181ED1EF%40glasgow.ac.uk
>>> .
>>> 

-- 
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/f00c26e6-f223-45d0-b725-f0b2fb421e4c%40mtasv.net.


Re: the end of the [racket-users] mailing list and the migration to Discourse as a forum for Racket

2021-11-22 Thread 'John Clements' via Racket Users
I’m … super confused by this message. Did I miss something? I feel like this 
message has a subtext that I’m completely missing.

John

> On Nov 22, 2021, at 08:06, Etan Wexler  wrote:
> 
> The stewards of Racket have decided that it’s time to give up on the mailing 
> list (that is, racket-users, to which this message is a contribution). The 
> stewards of Racket have designated another forum for Racket as the successor 
> to racket-users. This other forum for discussing Racket has as its basis the 
> software named “Discourse”, which is open‐source. Enlisting is prerequisite 
> to contributing to the Discursive forum for Racket. Enlisting is prerequisite 
> to receiving as Internet mail the contributions to the Discursive forum for 
> Racket. The stewards of Racket have published a facility for enlisting as a 
> participant in the Discursive forum for Racket.
> 

-- 
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/57281fc0-ae2e-409b-9df6-9b87efc35433%40mtasv.net.


Re: [racket-users] Racket Discourse

2021-11-22 Thread 'John Clements' via Racket Users
I’m actually very heartened to see the boilerplate here; it sounds like this is 
something we can edit, and not something imposed by Discourse. If that’s the 
case, then it certainly seems likely that we can find some language (or, more 
importantly, *lack* of language) that makes more of us happy.

I, for one, am shocked to see binding arbitration language in here: I think 
binding arbitration is one of the most revolting elements of corporate control 
in our society today, and if we were unable to remove the binding arbitration 
clause, I would likely abandon discourse myself.

Sounds like the next step is to come up with a TOS that’s acceptable to all, or 
find a way to remove it entirely.

John

> On Nov 22, 2021, at 04:54, Norman Gray  wrote:
> 
> 
> Greetings.
> 
> On 22 Nov 2021, at 4:24, Sage Gerard wrote:
> 
>> But I have to ask, who wrote the ToS? Who is "the company" in its
>> 
>> context? Discord? One of the Racket team's universities? A sponsor?
> 
> I'm not sure who 'the company' is, either, but they appear to be called 
> 'company_name' (catchy!), and that users are notified that disputes can only 
> be arbitrated in city_for_disputes, under governing_law. *cough*
> 
> Such curiosities aside, all of that does represent unappealingly more 
> legalese than one expects for a mailing list.  But since the current list is 
> hosted at googlegroups, and since it's not obvious that Discourse Corp is 
> more predatory than Google Corp (indeed, the former is dispensing 
> freemium-ware rather than ad-ware, so are more attractive in terms of 
> business model), it feels irrational for me to be too put off by it.
> 
> Best wishes,
> 
> Norman
> 
> 
> -- 
> Norman Gray  :  https://nxg.me.uk
> SUPA School of Physics and Astronomy, University of Glasgow, UK
> 
> -- 
> 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/BEC261BF-C274-4221-8F62-C77D181ED1EF%40glasgow.ac.uk.

-- 
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/0691253b-ef19-4534-b0ec-8faeca204807%40mtasv.net.


Re: [racket-users] Racket Discourse

2021-11-21 Thread 'John Clements' via Racket Users
Many thanks for your thoughts. I appreciate that your time and inbox space is 
at a premium, and I’ll try to be careful about posting things to more than one 
forum.

Best,

John Clements

> On Nov 21, 2021, at 22:53, Sorawee Porncharoenwase  
> wrote:
> 
> My personal opinion is that, if we want Discourse to be a replacement of the 
> mailing list, then we should treat it like one. Right now, it’s a combination 
> of the mailing list, wiki, FAQ site, and whatnot. And I don’t want one more 
> email in my inbox when someone decides to add an entry to the FAQ.
> 
> As concrete examples, consider:
> 
>   • 
> https://racket.discourse.group/t/urlang-is-javascript-with-a-sane-syntax/119
>   • https://racket.discourse.group/t/gui-builder-designer/151
> I’m not sure what’s the point of these posts in the context of the mailing 
> list. Stephen definitely knows MrEd designer and has been promoting it for 
> years, so this looks like his attempt to build a wiki/FAQ on Discourse. While 
> I really do appreciate Stephen’s effort into building and maintaining the 
> valuable wiki/FAQ at https://github.com/racket/racket/wiki, I personally 
> don’t think a mailing list is an appropriate medium for it. Urlang is great, 
> but I don’t understand why we are rehashing it now on Discourse. Will we also 
> see 1735 more posts to rehash every package on the package website in the 
> future?
> 
> Another issue is cross posting. Often posts are shared to all Slack, Discord, 
> Reddit, the current mailing list, and whatnot (and also in the other 
> direction). It makes sense to do that for event announcements. I’m not sure 
> the same can be said for other posts. They are inundating (at least to me), 
> especially if they happen a lot.
> 
> I understand that there's a spam problem on the current mailing list and in 
> fact have been complaining constantly on Slack. I actually even proposed to 
> Sam last year to consider Discourse as a replacement of the mailing list, so 
> I'm not against the software at all if that's what you worry about.
> 
> To be clear, no offense to anyone at all. It could be that my expectation of 
> the mailing list is far off from most people, and if that’s the case, I’d 
> simply excuse myself from it.
> 
> On Sun, Nov 21, 2021 at 3:42 PM Philip McGrath  
> wrote:
> I've long been in the basically-content-with-the-mailing-list camp, but I've 
> recently come around to the view that the status quo is untenable. I looked 
> into it after Racket 'Con and discovered the mailing list had shrunk 
> especially much for me, because the Google Groups spam filters were letting 
> through so much spam that Google spam filters on one hop of my receiving side 
> have been classifying a great deal of legitimate mailing list traffic as spam.
> 
> I haven't done much with Discourse yet, but it seems promising, and I hope it 
> works out.
> 
> I'd guess the list administrators have tried this already, but, just in case, 
> the Google Group settings should have a "Spam message handling" setting that 
> could be set to "Moderate without notifying content moderators" (see 
> https://support.google.com/groups/answer/2464926?hl=en#posting=%2Csettings-reference%2Cadvanced-settings-reference).
>  If this is the official moment for giving up on this mailing list, it would 
> probably be good to turn up these settings to some draconian level anyway, 
> just to leave one fewer spam target on the internet.
> 
> -Philip
> 
> On Sun, Nov 21, 2021 at 6:08 PM 'John Clements' via Racket Users 
>  wrote:
> Wait, you think that’s high traffic? Gee whiz, the mailing list *has* shrunk, 
> hasn’t it?
> 
> Okay, that was not an entirely serious reply, but I do think that in contrast 
> to the discord & slack channels, the discourse is likely to be searchable and 
> at least lightly curated six months from now. Also, if you take a look at the 
> mailing list archive 
> 
> https://www.mail-archive.com/racket-users@googlegroups.com/
> 
> … you’ll see a *shocking* amount of spam. Many of us don’t see this because 
> we have semi-reasonable spam filters, but others are putting up with what 
> looks like more than 50% spam on this list. That’s just not acceptable.
> 
> John
> 
> 
> > On Nov 21, 2021, at 14:14, Sorawee Porncharoenwase 
> >  wrote:
> > 
> > I could be in the minority here, but as an early proponent of Discourse to 
> > replace the mailing list (even before RacketCon), I feel reluctant to join 
> > it after observing it for a while. It has a very high traffic, with almost 
> > 100% of the contents being cross-posted everywhere else (and vice versa) 
> > anyway.
> > 
> > While I appreciate any efforts in

Re: [racket-users] Racket Discourse

2021-11-21 Thread 'John Clements' via Racket Users
Wait, you think that’s high traffic? Gee whiz, the mailing list *has* shrunk, 
hasn’t it?

Okay, that was not an entirely serious reply, but I do think that in contrast 
to the discord & slack channels, the discourse is likely to be searchable and 
at least lightly curated six months from now. Also, if you take a look at the 
mailing list archive 

https://www.mail-archive.com/racket-users@googlegroups.com/

… you’ll see a *shocking* amount of spam. Many of us don’t see this because we 
have semi-reasonable spam filters, but others are putting up with what looks 
like more than 50% spam on this list. That’s just not acceptable.

John


> On Nov 21, 2021, at 14:14, Sorawee Porncharoenwase  
> wrote:
> 
> I could be in the minority here, but as an early proponent of Discourse to 
> replace the mailing list (even before RacketCon), I feel reluctant to join it 
> after observing it for a while. It has a very high traffic, with almost 100% 
> of the contents being cross-posted everywhere else (and vice versa) anyway.
> 
> While I appreciate any efforts into promoting the site, I do think different 
> content has different appropriate mediums. For example, FAQs probably should 
> go to the wiki. There's no need to clutter anyone's inbox for this type of 
> content.
> 
> On Sun, Nov 21, 2021 at 10:09 AM 'John Clements' via Racket Users 
>  wrote:
> TL;DR: Go to
> 
>https://racket.discourse.group/invites/okLTSrQw1T
> 
> and sign up for Racket Discourse (https://racket.discourse.group/)
> 
> # Thoughts behind the move:
> 
> Over time, it has become steadily more apparent that email-only 
> mailing lists are an outdated communication medium for the Racket
> community. More recent arrivals in our community have generally 
> chosen other platforms like slack or discord to carry on discussions. 
> As a result, the signal-to-noise ratio of the racket users mailing list 
> has dropped below the level of viability.
> 
> In short, it’s time to give up on the mailing list.
> 
> After a good deal of research, it looks like there’s room for a whole
> bunch of discussion platforms for Racket, but it also seems as though
> there should be a “permanent” one; it should be archived, it should be
> searchable in its entirety, and it should not tie us to someone else’s
> plan to monetize user data.
> 
> Given these criteria, the winner is Discourse, an open-source
> messaging platform built by Jeff Atwood, Robin Ward, and Sam
> Saffron. It has a reasonable business model (they host projects like
> ours unless they get really big, whereupon you can either host it
> yourself or pay them to do it); it’s widely used by other language
> communities; and it appears to do most of what we want.
> 
> # So where can I sign up?
> 
> Sign up here: https://racket.discourse.group/invites/okLTSrQw1T
> 
> The discourse platform has been in a “soft opening” phase for about 
> two weeks now, since RacketCon, and we have about a hundred users. 
> You’re receiving this message because we’d like to have *YOU* there 
> as well.
> 
> # Can I still receive messages like a mailing list?
> 
> Yes, you can. I have it enabled myself!  
> To use discord as a mailing-list:
> Sign up, go to Preferences > Email, and tick “Enable mailing list mode'.
> 
> Yours,
> 
> John Clements & Stephen De Gabrielle
> 
> -- 
> 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/9d080367-1b70-4818-8e76-8c6714db404c%40mtasv.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/4b85e73f-4233-4b77-8d06-96b4afdebc24%40mtasv.net.


[racket-users] Racket Discourse

2021-11-21 Thread 'John Clements' via Racket Users
TL;DR: Go to

   https://racket.discourse.group/invites/okLTSrQw1T

and sign up for Racket Discourse (https://racket.discourse.group/)

# Thoughts behind the move:

Over time, it has become steadily more apparent that email-only 
mailing lists are an outdated communication medium for the Racket
community. More recent arrivals in our community have generally 
chosen other platforms like slack or discord to carry on discussions. 
As a result, the signal-to-noise ratio of the racket users mailing list 
has dropped below the level of viability.

In short, it’s time to give up on the mailing list.

After a good deal of research, it looks like there’s room for a whole
bunch of discussion platforms for Racket, but it also seems as though
there should be a “permanent” one; it should be archived, it should be
searchable in its entirety, and it should not tie us to someone else’s
plan to monetize user data.

Given these criteria, the winner is Discourse, an open-source
messaging platform built by Jeff Atwood, Robin Ward, and Sam
Saffron. It has a reasonable business model (they host projects like
ours unless they get really big, whereupon you can either host it
yourself or pay them to do it); it’s widely used by other language
communities; and it appears to do most of what we want.

# So where can I sign up?

Sign up here: https://racket.discourse.group/invites/okLTSrQw1T

The discourse platform has been in a “soft opening” phase for about 
two weeks now, since RacketCon, and we have about a hundred users. 
You’re receiving this message because we’d like to have *YOU* there 
as well.

# Can I still receive messages like a mailing list?

Yes, you can. I have it enabled myself!  
To use discord as a mailing-list:
Sign up, go to Preferences > Email, and tick “Enable mailing list mode'.

Yours,

John Clements & Stephen De Gabrielle

-- 
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/9d080367-1b70-4818-8e76-8c6714db404c%40mtasv.net.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread 'John Clements' via Racket Users
> On Nov 11, 2021, at 03:04, Yushuo Xiao  wrote:
> 
> Thank you for your comprehensive answer! It helps a lot. I also read more 
> about Racket after I posted the question and now I think that the few special 
> forms (as stated in "fully expanded program") are the core. All languages 
> built in Racket will parse and convert their syntax into syntax objects 
> (S-expressions) and then expand to these special forms. Am I right?

That’s a true statement… but that set is by no means fixed. These core forms 
then get compiled into native code (in CS) or bytecode (in BC), and changing 
this core set is certainly possible. It’s probably wiser to think of these core 
forms as an intermediate representation language in a compiler. I would agree 
that it’s an important IR, in that it’s essentially a subset of the racket 
language itself, but it’s definitely not an immutable ideal.

Apologies as always if you knew all this already,

John Clements

> 
> On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote:
> Hi Yushuo,
> 
> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
> I've learned some Racket, and can comfortably program in it, but I only 
> learned it as an ordinary language, much like Scheme. I know Racket is much 
> more than that, for its "language-oriented" features. Languages become a 
> first-class member in Racket, and to my understanding, even "#lang racket" is 
> just a language built on some core. What I want to know is, what's the very 
> core of Racket?
> 
> It depends on where you stop measuring.  You could argue that...
> 
> ...#lang racket  is the core, because it's what comes in the installation.  
> Things like gregor, struct-plus-plus, and csv-reading are packages that you 
> install from http://pkgs.racket-lang.org/ and are therefore outside the core.
> 
> ...#lang racket/base is the core, because it's the most limited set of Racket 
> that comes by default.  It mostly consists of only the basic list 
> manipulation functions, and if you want to use other things then you need to 
> include relevant libraries such as racket/match (giving you the 'match' 
> special form) or racket/format (giving you the ~a function), or racket-string 
> (giving you the string-length function), etc.
> 
> ...Raw lambdas and a few special forms are the core, because everything 
> compiles down to those.  (Approximately speaking.)
> 
> ...Lambda calculus is the core, because it's what all LISP descendants are 
> based on.
> 
> Once you start talking about other Racket languages with different syntax and 
> semantics, well then all bets are off.
> 
> 
> Does this help?
> 
> 
> I've noticed that in the Racket Reference there is a section "Fully Expanded 
> Programs", which seems the very core of Racket. But it still takes an 
> S-expression form, and apparently Racket allows language customization on the 
> syntax level. I wonder if the S-expression language is the core of Racket, or 
> the entire Racket has a different structure?
> 
> I would really appreciate it if anyone could explain it in a simple way or 
> could point out some good (and short) material for me to read. The Racket 
> Reference is too long, and I believe the core Racket can be well explained in 
> a much shorter piece of text, if I just look for a brief understanding.
> 
> Also my question may be confusing, because I don't understand Racket well at 
> all. Feel free to correct me or ask for clarification. Thanks in advance!
> 
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6929457c-459f-4c25-94c0-ea973b121c65n%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/228e0447-5d7e-4d88-870a-8aada5b31aa1%40mtasv.net.


[racket-users] Racket v8.3

2021-11-06 Thread 'John Clements' via Racket Users
Racket version 8.3 is now available from

https://racket-lang.org/


* Racket removes syntax arming and disarming in favor of a simpler
 system of protected syntax operations, along with other updates to the
 syntax system.

* DrRacket has improved support for custom #lang languages.

* Typed Racket improves precision for type-checking of non-polymorphic
  structures, existential types, and certain binding forms.

* Scribble HTML output gains a button to show / hide the table of
  contents on mobile platforms.

* Redex's stepper's GUI shows IO-judgment form rule names.

* Many bug fixes!


The following people contributed to this release:

Adam Zaiter, Alex Knauth, Alexis King, Ayman Osman, Ben Greenman, Bob
Burger, Bogdan Popa, Brian Adkins, Cameron Moy, Carl Eastlund, Dan
Holtby, Dominik Pantůček, Eli Barzilay, Ethan Leba, Fred Fu, Greg
Hendershott, Gustavo Massaccesi, J. Ryan Stinnett, Jason Hemann, Jay
McCarthy, Jesse Alama, Joel Dueck, John Clements, Jonathan Simpson,
Kartik Sabharwal, Laurent Orseau, Lehua Ding, Maciej Barć, Marc Burns,
Matthew Flatt, Matthias Felleisen, Michael Ballantyne, Mike Sperber,
Noah Ma, Paulo Matos, Pavel Panchekha, Philip McGrath, Robby Findler,
Ryan Culpepper, Ryan Sundberg, Sage Gerard, Sam Tobin-Hochstadt,
Shu-Hung You, Sorawee Porncharoenwase, Stefan Schwarzer, Stephen De
Gabrielle, Vincent St-Amour, William J. Bowman, minor-change, and yjqww6

Feedback Welcome

-- 
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/7a93648b-3e64-4c94-8932-eb8d1de887b2%40mtasv.net.


Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread 'John Clements' via Racket Users
In the text below, you refer to the “public” interface. Can I ask what you mean 
by “public” in this context?

John

> On Oct 29, 2021, at 11:16 AM, Brian Beckman  wrote:
> 
> I believe that run time will be the most plausible use case. I may write 
> macros that refer to struct-procedure names at macro-writing time, but I 
> don't expect to invoke the struct procedures at macro-expansion time. My 
> primary issue is "discoverability:" how can I find out the interface of any 
> struct?
> 
> On Thursday, October 28, 2021 at 1:00:15 PM UTC-7 jackh...@gmail.com wrote:
> Are you intending to use the struct procedure names at compile time (such as 
> in a macro) or runtime?
> 
> On Tuesday, October 26, 2021 at 5:02:46 PM UTC-7 bc.be...@gmail.com wrote:
> I understand why structs are opaque, by default, but I want to discover the 
> public interface of some struct type, that is, a list of the procedures 
> defined by the struct.
> 
> Here is an example. Suppose I want to find out all the procedures defined on 
> an instance of the syntax struct
> 
> #'42
> 
> Dr. Racket shows an expander clicky that shows some formatted information 
> inside the instance :
> 
> 
> 
> Uncapitializing the names in the display reveals the interface:
> 
> (syntax-position #'42) ~~> 790
> (syntax-span #'42) ~~> 2
> (syntax-original? #'42) ~~> #t
> 
> etc.
> 
> I want to discover those procedure names in my racket program, not manually 
> by visually inspecting graphics in Dr Racket. 
> 
> I found this trick for structs that I define:
> 
> #lang racket
> (require (for-syntax racket/struct-info))
> (require racket/pretty)
> 
> (struct foo (a b))
> (begin-for-syntax
>   (displayln 
>(extract-struct-info
> (syntax-local-value
>  #'foo
> 
> ~~>
> 
> 
> 
> but it doesn't work for the syntax type
> 
> (begin-for-syntax
>   (displayln 
>(extract-struct-info
> (syntax-local-value
>  #'syntax
> 
> ~~>
> 
> 
> 
> I'd be grateful for advice and an example of how to get the interface of 
> "syntax" without Dr Racket and without grovelling docs.
> 
> -- 
> 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/8e4ca03e-e276-4c42-a662-4fcf7c994387n%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/281a49f3-7870-48ca-888b-d3e5002b0f24%40mtasv.net.


Re: [racket-users] using neg-propositions in partition?

2021-10-05 Thread 'John Clements' via Racket Users
Ah! Thanks for the pointer. Should have looked in the issues. Yes, 2 filters 
certainly work fine.

John

> On Oct 5, 2021, at 4:45 PM, Ben Greenman  wrote:
> 
> There's an issue open about partition:
> https://github.com/racket/typed-racket/issues/138
> 
> Does `my-partition` work like you'd want? Based on Alex's last comment
> on the issue, it seems hard to give a predicate that matches the type.
> 
> 
> (Whenever I've wanted `partition` in typed code, I was always able to
> use 2 filters instead.)
> 
> On 10/5/21, 'John Clements' via Racket Users
>  wrote:
>> I was somewhat surprised to see today that I can’t use a predicate with both
>> positive and negative propositions in the way I would expect with
>> partition:
>> 
>>> (:print-type partition)
>> (All (a b)
>>  (case->
>>   (-> (-> b Any : #:+ a) (Listof b) (values (Listof a) (Listof b)))
>>   (-> (-> a Any) (Listof a) (values (Listof a) (Listof a)
>> 
>> 
>> Specifically, I would have expected the type to be something like this:
>> 
>> (All (a b c)
>>  (case->
>>   (-> (-> b Any : #:+ a) (Listof b) (values (Listof a) (Listof b)))
>>   ;; the second list must consist of 'c's:
>>   (-> (-> b Any : #:+ a #:- c) (Listof b) (values (Listof a) (Listof c)))
>>   (-> (-> a Any) (Listof a) (values (Listof a) (Listof a)
>> 
>> … so that if, say, I had a list of Elephants and Emus, that I could use
>> elephant? to split it into two lists: one of type (Listof Elephant) and one
>> of type (Listof Emu).
>> 
>> I tried to roll my own, and got pretty close:
>> 
>> (: my-partition
>>   (All (a b c)
>>(case->
>> ;; the second list must consist of 'c's:
>> (-> (-> b Any : #:+ a #:- c) (Listof b) (values (Listof a) (Listof
>> c)))
>> )))
>> 
>> (define (my-partition my-pred elts)
>>  (cond [(empty? elts)
>> (values '() '())]
>>[else
>> (define-values (stacks non-stacks)
>>   (my-partition my-pred (rest elts)))
>> (define f (first elts))
>> (cond [(my-pred f)
>>(values (cons f stacks)
>>non-stacks)]
>>   [else
>>(values stacks (cons f non-stacks))])]))
>> 
>> That is, I can do it for the case-> clause that I care about. Putting the
>> other two back in there causes it to fail type-checking. Is that the
>> problem, that TR can’t accommodate both flavors in the same type?
>> 
>> 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/aa1e77a8-9cc4-4f99-b413-1304daeec12b%40mtasv.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/724d3012-b8e3-4be2-9ce1-fbc15cbd0bd6%40mtasv.net.


[racket-users] using neg-propositions in partition?

2021-10-05 Thread 'John Clements' via Racket Users
I was somewhat surprised to see today that I can’t use a predicate with both 
positive and negative propositions in the way I would expect with partition:

> (:print-type partition)
(All (a b)
  (case->
   (-> (-> b Any : #:+ a) (Listof b) (values (Listof a) (Listof b)))
   (-> (-> a Any) (Listof a) (values (Listof a) (Listof a)


Specifically, I would have expected the type to be something like this:

(All (a b c)
  (case->
   (-> (-> b Any : #:+ a) (Listof b) (values (Listof a) (Listof b)))
   ;; the second list must consist of 'c's:
   (-> (-> b Any : #:+ a #:- c) (Listof b) (values (Listof a) (Listof c)))
   (-> (-> a Any) (Listof a) (values (Listof a) (Listof a)

… so that if, say, I had a list of Elephants and Emus, that I could use 
elephant? to split it into two lists: one of type (Listof Elephant) and one of 
type (Listof Emu).

I tried to roll my own, and got pretty close:

(: my-partition
   (All (a b c)
(case->
 ;; the second list must consist of 'c's:
 (-> (-> b Any : #:+ a #:- c) (Listof b) (values (Listof a) (Listof c)))
 )))

(define (my-partition my-pred elts)
  (cond [(empty? elts)
 (values '() '())]
[else
 (define-values (stacks non-stacks)
   (my-partition my-pred (rest elts)))
 (define f (first elts))
 (cond [(my-pred f)
(values (cons f stacks)
non-stacks)]
   [else
(values stacks (cons f non-stacks))])]))

That is, I can do it for the case-> clause that I care about. Putting the other 
two back in there causes it to fail type-checking. Is that the problem, that TR 
can’t accommodate both flavors in the same type?

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/aa1e77a8-9cc4-4f99-b413-1304daeec12b%40mtasv.net.


Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread 'John Clements' via Racket Users
I think I wouldn’t say “accepts”; I usually reserve this term for functions, 
but that’s a minor quibble.

I think I would call these “clauses”, as in

“With-handlers allows the user to specify exception-handling clauses. Each one 
includes two parts: a predicate, indicating whether blah blah blah, and a 
handler, which is called blah blah blah.”

No?

John

> On Sep 24, 2021, at 11:28, David Storrs  wrote:
> 
> 
> 
> On Fri, Sep 24, 2021 at 1:49 PM Jay McCarthy  wrote:
> I think the word you're looking for is "syntax". Many people think that 
> languages like Racket "don't have syntax" or "have uniform syntax", but this 
> is an example of how that is incorrect. Each macro has its own unique syntax 
> and this is an example of how `let` has a unique syntax where `(` does _not_ 
> mean "apply a function" or "apply a macro".
> 
> As a poor analogy, many human languages have a wide set of phonemes and you 
> combine those in certain rules (like you can't have 27 consonant sounds in a 
> row) and then use them in wider situations that we call grammar. I like to 
> think that languages like C has lots of phonemes and little grammar, because 
> there are lots of rules about how to form "C words" but basically no rules 
> for how to form "C sentences", because there's a lot of uniformity in how 
> expressions and statements combine. In contrast, languages like Racket have 
> very few phonemes (this is what I think people mean why they say "there is no 
> syntax") but many varied rules (in fact, arbitrary, because macros can 
> customize them) for combining those smaller units.
> 
> So there's no specific term for this structure?  I was looking for a 
> standardized way to say something like "with-handlers accepts a group of 
> two-element groups where each subgroup consists of a predicate and an action."
> 
> Jay
> 
> --
> Jay McCarthy
> Associate Professor @ CS @ UMass Lowell
> http://jeapostrophe.github.io
> Vincit qui se vincit.
> 
> 
> On Fri, Sep 24, 2021 at 1:25 PM David Storrs  wrote:
> Racket has a number of forms that include what look like lists of lists but 
> are not.  For example:  (let ((foo 7) (bar 8)) ...)
> 
> What would the '(foo 7)' and '(bar 8)' elements be called?  Groups, maybe?
> 
> -- 
> 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/CAE8gKodX800fK45c_dyVFCNB-AKmYmK26DxC42ZRDVHdzJ2Q7g%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/CAE8gKoeM6YYgpj-4Ey%2BoSSKRS%2BfMch3d0GDu85f9mwHmtxwVig%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/11a531ce-22f2-4f23-8246-46c6c77ffae7%40mtasv.net.


Re: [racket-users] Bootstrap on Racket

2021-09-04 Thread 'John Clements' via Racket Users
I use Greg Hendershott’s excellent and trouble-free ‘frog’ library. How would 
your code relate to this?

John

> On Aug 30, 2021, at 10:57, Dexter Lagan  wrote:
> 
> Hi again,
> 
>   I've been working on porting my Newstrap Web framework from newLISP to 
> Racket. I got most of it done and am about to start work on a router. Here's 
> what I got so far:
> 
> DexterLagan/rap: Combination of Racket and Bootstrap, RAP is a Web framework 
> aiming to produce good-looking pages with ease. (github.com)
> 
> based on Newsrap:
> 
> DexterLagan/newstrap: A fast, lightweight web framework written in newLISP. 
> (github.com)
> 
>   Does anybody know if something similar already exists? I looked around but 
> couldn't find anything production-ready (in Racket). I just want to know if 
> I'm wasting my time reinventing the wheel, or if there's value in having a 
> bunch of macros generate Bootstrap code. My first goal would be to have a 
> static site generator going, followed by a fully-featured framework for 
> production use.
> 
> Any and all feedback would help me greatly!
> 
> Dex
> 
> 
> -- 
> 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/473170ba-624a-4339-b499-9e936765603cn%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/75aa8867-0487-412e-9ce3-22edefb0a1e0%40mtasv.net.


[racket-users] Racket v8.2

2021-07-18 Thread 'John Clements' via Racket Users
--
Racket version 8.2 is now available from

https://racket-lang.org/


* Racket CS improved the performance of large-integer arithmetic.

* Racket has improved support for layered and tethered installation.

* Racket CS supports nonatomic allocation via ffi/unsafe.

* Cross-compilation works fully with the `raco cross` tool, which is
  distributed separately as the "raco-cross" package.
  
* DrRacket has performance improvements when editing files with
  picts containing large bitmaps.

* Typed Racket more consistently refines field types of non-polymorphic
  structs.

* Printing of values is unified across the teaching language
  implementations and the stepper.

The following people contributed to this release:

Alex Harsányi, Alex Knauth, Amirouche, Andrew Mauer-Oats, Bob Burger,
Bogdan Popa, Cameron Moy, Crystal Jacobs, Dale Vaillancourt, Diego
A. Mundo, Fred Fu, Greg Hendershott, Gustavo Massaccesi, Jack Firth,
Jamie Taylor, Jarhmander, Jason Hemann, Jay McCarthy, Jeffrey D. Swan,
Jens Axel Søgaard, Jesse Alama, John Clements, Laurent Orseau,
Lazerbeak12345, Matthew Flatt, Matthias Felleisen, Mike Sperber, Nada
Amin, Noah Ma, Oscar Waddell, Paulo Matos, Pavel Panchekha, Philip
McGrath, Ray Racine, Robby Findler, Ryan Culpepper, Sam Tobin-Hochstadt,
Shu-Hung You, Sorawee Porncharoenwase, Stephen Chang, Thorsten Blum,
Tony Garnock-Jones, WarGrey Gyoudmon Ju, William J. Bowman, Yu Fang,
and minor-change.

Feedback Welcome
--

-- 
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/d5696ad8-f2d2-4b58-8834-0f2a2e953403%40mtasv.net.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread 'John Clements' via Racket Users
Allow me to be very slightly less cautious than Robby: it may not be clear from 
this text that nearly every BSL program is also a Racket program *and* a Scheme 
program. If you work through HtDP—or even a part of it—you will be, I claim,  
both a Scheme and a Racket programmer. (And perhaps also a better Python, C, 
and Haskell programmer).

In other words: if your concern is that HtDP will not teach you Scheme, you 
need not worry.

John

> On Jul 13, 2021, at 11:19, Robby Findler  wrote:
> 
> I would say that the stuff in HtDP is teaching you the fundamentals of 
> programming; it isn't (about) teaching you a specific programming language. 
> These fundamentals apply to any programming language you might wish to 
> program in. And, of course, the book does use a (set of) languages to teach 
> you, but that's more about having something so that you can practice than it 
> is about teaching you the specifics of BSL.
> 
> If your goal is to learn how to program, just in general, I think HtDP is the 
> book for you. If your goal is something else, then HtDP may not be for you.
> 
> I should also add that I think that the learning the fundamentals of how to 
> program is a wonderful thing and I am very happy that I have learned them. It 
> is even better than my job overlaps with my favorite hobby (which happens to 
> be programming); I consider myself extremely lucky because of that!
> 
> best,
> Robby
> 
> 
> On Tue, Jul 13, 2021 at 10:12 AM joseph turco  
> wrote:
> I see. The stuff in HtDP, does it transfer over to any Racket syntax?
> 
> On Tue, Jul 13, 2021 at 10:56 AM George Neuner  wrote:
> 
> On 7/13/2021 10:13 AM, joseph turco wrote:
>> Hello,
>> 
>> Im am looking at learning a programming language, and have been bouncing 
>> around with scheme/racket/dyalog APL/squeak. upon investigation of scheme 
>> and racket, i found that in regards to racket, there really isn't a 
>> "Beginners book" that teaches the language. The only beginner book i could 
>> really see being close to teaching the language is HtDP, but that doesn't 
>> technically teach racket, but BSL. For scheme, im able to find beginner 
>> books, unless im not looking deep enough. Maybe if you fine folk don't mind 
>> pointing me in the right direction? Please excuse my ignorance.
>> 
>> -- Joseph T
> 
> Welcome.
> 
> Racket[*] largely is based on Scheme, and so much of what you learn about 
> Scheme will transfer.  Racket supports R5RS and R6RS Scheme as legacy 
> languages, so you can learn about Scheme /using/ Racket and its tools.  Then 
> when you are more comfortable, you can transition to using the Racket module 
> language instead.
> 
> George
> [*]  At least the untyped Racket language.  Racket really is a /suite/ of 
> languages: there also is a typed Racket, a lazy Racket, and various DSLs 
> (domain languages) which compile to and (mostly) freely intermix with Racket.
> 
> 
> -- 
> 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/CADhp54TpmGXSVDTjbcL%3DYqxiQDmytrMotcxJ7oKgTnniPQOwmg%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/CAL3TdONjgSWi3fpY9yAyvzpsFqW-cCzqQYCbhpUeMK_te_R49w%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/76ed8878-cf98-4835-a87b-53d2a750676b%40mtasv.net.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread 'John Clements' via Racket Users
Good to hear from you! There are actually a number of different books that I 
might suggest. In order to best direct you, it might be useful to know 
something about your programming background?

Best,

John Clements

> On Jul 13, 2021, at 10:13, joseph turco  wrote:
> 
> Hello,
> 
> Im am looking at learning a programming language, and have been bouncing 
> around with scheme/racket/dyalog APL/squeak. upon investigation of scheme and 
> racket, i found that in regards to racket, there really isn't a "Beginners 
> book" that teaches the language. The only beginner book i could really see 
> being close to teaching the language is HtDP, but that doesn't technically 
> teach racket, but BSL. For scheme, im able to find beginner books, unless im 
> not looking deep enough. Maybe if you fine folk don't mind pointing me in the 
> right direction? Please excuse my ignorance.
> 
> -- Joseph T
> 
> 
> -- 
> 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/CADhp54SQ%3DhwO1V%3DshEzNOpkFhn3tPg2vextUrXAEcSMf0vsgpA%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/9a732155-e6fb-43a3-ad7e-979269a0473d%40mtasv.net.


Re: [racket-users] Racket Slack archive [help wanted]

2021-06-08 Thread 'John Clements' via Racket Users
Hearing about this for the first time, seems like a fantastic idea.

10 seconds of experience:

1) It wasn’t immediately clear to me that the links were the names of channels. 
It seems painfully obvious to me now, but perhaps it’s worth starting all the 
names with hashes?

2) Clicking on the channel name “general” appears to melt down somehow, 
presumably because the page is really really really big. Is pagination near the 
top of most-desired-new-features?

Again, I think it’s great that you’re doing this!

John

> On Jun 8, 2021, at 08:16, D. Ben Knoble  wrote:
> 
> In case you missed it/aren't on Slack:
> 
> The latest version of the Slack archive is up-and-running at 
> https://benknoble.github.io/racket-slack-archive/ (extends through roughly 
> 2021-06-07).
> 
> The site is now built using a mix of 
> - Racket (data processing, mostly the json, hash, and unzip modules)
> - Jekyll/Ruby (site-generation; a plugin makes pages out of all the channel 
> directories, which are then rendered via a set of HTML templates)
> 
> I have some todos to make a nicer experience, and help is welcome. Also if 
> anyone wants to start working porting the Jekyll + Ruby stuff to Racket, feel 
> free.
> 
> -- 
> 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/a8efd2e6-ffb9-48d3-8b98-2d3da9551e70n%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/b25be9f7-e01d-4f9e-a1dc-5d1c6b94cfd0%40mtasv.net.


Re: [racket-users] student produces absolutely bonkers environment lookup code

2021-05-13 Thread 'John Clements' via Racket Users
Yep, I think that’s probably on the money. I guess this is really a classic 
example of the problem with writing code using internet search.

Many thanks!

> On May 7, 2021, at 4:38 PM, Ben Greenman  wrote:
> 
> On 5/7/21, Shu-Hung You  wrote:
>> Not that I have any idea of what's going on, but interestingly, Typed
>> Racket's second ->* example has (1)(3)(4). The use of list* may be
>> possible if one follows the type (List* String Natural x) in the
>> example.
>> 
>> https://docs.racket-lang.org/ts-reference/type-ref.html?#%28form._%28%28lib._typed-racket%2Fbase-env%2Fbase-types-extra..rkt%29._-~3e%2A%29%29
>> 
>> Shu-Hung
> 
> +1, that example in the docs looks _very_ similar to the student code
> 
> -- 
> 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/CAFUu9R4SJ7OisUeH5mFxGHpycrxhKYNFuSMLLgSzKCprt2aQWQ%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/36e88c8e-d2eb-43b5-8a8d-4144487fe347%40mtasv.net.


Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread 'John Clements' via Racket Users
Racket has the ability to read a variety of different image files. I would go 
first to 2htdp/image’s “bitmap/file” to read images. “save-image” can write 
images (but only as png files). I believe there are also an array of 
lower-level image manipulation functions that are likely to have a less 
friendly interface :).

Apologies in advance for any misleading information I might be providing….

John

> On May 11, 2021, at 1:09 PM, Robert Haisfield  
> wrote:
> 
> Alternatively, does the normal images function for Racket work? When I was 
> looking through the documentation I saw a lot about creating shapes but not 
> about using image files.
> 
> On Tuesday, May 11, 2021 at 2:03:33 PM UTC-6 Robert Haisfield wrote:
> Hmm does the video language work for image files? If so, then I think it 
> might work.
> 
> On Tuesday, May 11, 2021 at 9:03:35 AM UTC-6 Sage Gerard wrote:
> I hope that has what Robert is looking for, but I don't recognize that 
> speech. In fact, I have a false memory, because I'm not finding the speech 
> I'm looking for on https://con.racket-lang.org/2018/#speakers
> 
> On 5/11/21 10:19 AM, Bruce O'Neel wrote:
>> This might be it.
>> 
>> (seventh RacketCon): Leif Andersen -- Movies as Programs: The Story of a 
>> Racket - YouTube
>> 
>> 
>> 
>> 
>> 
>> 11 May 2021 15:30 Sage Gerard  wrote:
>> I don't know of one off hand, but I believe RacketCon 2018 (?) included a 
>> presenter that showed a PostScript-like DSL for designers and artists.  If 
>> pict not cover your needs, maybe dig into the presentations?
>> 
>> Failing that, can you show what you'd hope the syntax would look like? That 
>> would probably help point you in the right direction,
>> 
>> On 5/11/21 9:26 AM, Robert Haisfield wrote:
>>> I have to do a bunch of .jpg and .png image resizings and was looking for a 
>>> programmatic way to do it. Is their a Racket DSL for this? --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/0d576c32-7d4d-4944-9cbc-c12f04406fccn%40googlegroups.com.
>> -- ~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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/6e3aacdc-015b-2484-3bee-0c08e3fb612d%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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/1620742795-01b81de5d6862fd390ec60605ee3bc9d%40pckswarms.ch.
> --
> ~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/b6a89a78-c92c-41c1-960a-49d64d8a5366n%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/404c8fad-befc-4b01-8728-48ce9b912117%40mtasv.net.


Re: [racket-users] Racket v8.1

2021-05-09 Thread 'John Clements' via Racket Users
Ah! My apologies. I’ve added your name to our “preferred names” file, and I 
hope not to make this mistake again.

Thank you!

John

> On May 8, 2021, at 13:38, Dexter Lagan  wrote:
> 
> Hello sir,
> 
>  Thank you ! My name is actually Dexter Santucci. Apologies for the 
> confusion. My email address isn't telling.
> 
> Cheers!
> 
> Dexter
> 
> On Wednesday, May 5, 2021 at 6:39:22 PM UTC+2 johnbclements wrote:
> -- 
> Racket version 8.1 is now available from 
> 
> https://racket-lang.org/ 
> 
> 
> - DrRacket tabs can be dragged, and have new close buttons. 
> 
> - Racket CS supports cross-compilation using `raco exe`. 
> 
> - Racket CS supports Android on 32-bit and 64-bit ARM processors. 
> 
> - The database library supports running queries in OS threads. 
> 
> - Check-Syntax arrows correctly identify the definition site of 
> identifiers with contracts. 
> 
> - Racket CS performance has improved for structure predicates and 
> accessors 
> 
> - Racket CS is faster at multiplying extremely large numbers and 
> dividing large integers. 
> 
> - Racket CS allows callbacks to raise exceptions if they are annotated 
> with `#:callback-exns?`. 
> 
> - New ephemeron hash tables simplify the implementation of tables where 
> keys can refer to values. 
> 
> - Typed Racket supports for/foldr. 
> 
> - The stepper works for #lang htdp/*sl. 
> 
> - Struct signatures work for the ASL teaching language. 
> 
> The following people contributed to this release: 
> 
> Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew 
> Mauer-Oats, Anish Athalye, Ben Greenman, Bert De Ketelaere, Bob Burger, 
> Bogdan Popa, Brian Adkins, Cameron Moy, David Van Horn, Dexter Lagan, 
> Dominik Pantůček, Fred Fu, Greg Hendershott, Gustavo Massaccesi, Hazel 
> Levine, Ismael Luceno, Jack Firth, Jarhmander, John Clements, Jörgen 
> Brandt, Laurent Orseau, Lazerbeak12345, Matthew Flatt, Matthias 
> Felleisen, Micah Cantor, Mike Sperber, Noah Ma, Patrick McCarty, Paulo 
> Matos, Pavel Panchekha, Philip McGrath, Philippe Meunier, R. Kent 
> Dybvig, Robby Findler, Ryan Culpepper, Ryan Kramer, Sam Tobin-Hochstadt, 
> Sergiu Ivanov, Shu-Hung You, Sorawee Porncharoenwase, Stephen De 
> Gabrielle, William J. Bowman, bmitc, xxyzz, yjqww6, and ymdarake 
> 
> Feedback Welcome 
> -- 
> 
> 
> -- 
> 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/e8e8ecff-79ad-4c33-ab37-6d98ca18baa7n%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/3aa00891-bcde-4cbd-879f-1da1781210e1%40mtasv.net.


[racket-users] student produces absolutely bonkers environment lookup code

2021-05-07 Thread 'John Clements' via Racket Users
Background: I teach a PL course, using Shriram’s PLAI. Many of the assignments 
require students to maintain an environment mapping symbols to values. Shriram 
illustrates a nice easy way to do this, as a list of two-element structures. 
You can also use an immutable hash. Fine. So I’m grading a student submission, 
and I come across this:

(: extend-environment* (-> Environment (Listof (List Symbol Value)) 
Environment))
(define (extend-environment* env kv)
  (let loop ([kv : (Listof (List Symbol Value)) kv]
 [env env])
(cond
  [(empty? kv) env]
  [else
   (let* ([kv-pair (first kv)]
  [new-env (KVEnvironment (first kv-pair) (second kv-pair) env)])
 (loop (rest kv) new-env))])))


;; Returns a new environment with old-env as parent
(: extend-environment (->* (Environment Symbol Value) #:rest-star (Symbol 
Value) Environment))
(define (extend-environment env key value . kv)
  (define kv* : (Listof (List Symbol Value))
(let loop : (Listof (List Symbol Value))
  ([kv : (Rec x (U Null (List* Symbol Value x))) (list* key value kv)])
  (if (empty? kv)
  '()
  (let* ([take-two (list (first kv) (second kv))]
 [drop-two (rest (rest kv))])
(list* take-two (loop drop-two))
  (extend-environment* env kv*))

This solution uses

1) a named let,
2) the list* function,
3) a ->* type with a #:rest-star argument, and
4) A custom rec type for alternating symbols and values.

To cap it all off, the student DOESN’T EVEN USE the extra hardware. This is the 
only use of extend-environment in the code:

(extend-environment e name arg)

So, uh, any idea where this code came from? 

:)

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/ee31119c-aab4-48e4-94dd-39272dd34724%40mtasv.net.


Re: [racket-users] Tell require where to find C libraries ?

2021-05-06 Thread 'John Clements' via Racket Users
It looks to me like you probably need to edit your “config.rktd” file:

https://docs.racket-lang.org/raco/config-file.html?q=config.rktd#%28idx._%28gentag._67._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29

On my machine (macOS using macports), for instance I have do do this for every 
new installation of drracket:

- edit /config.rktd to contain
  (lib-search-dirs . (#f "/opt/local/lib”))

Let me know if I misunderstood your situation!

John Clements


> On May 6, 2021, at 3:54 AM, krs...@gmail.com  wrote:
> 
> 
> Hi!,
> 
> I am doing: (require taglib) and I get:
> > (require taglib)
> ; ffi-lib: could not load foreign library
> ;   path: libtag_c.so.0
> ;   system error: File not found
> ; [,bt for context]
> 
> I am on OpenBSD and that file is at:
> /usr/local/lib/libtag_c.so.3.0
> 
> How can I change my search path for C libs to be /usr/local ?
> 
> -- 
> 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/b8425f0a-6d45-4954-9e32-df51aa5151cbn%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/6c7c1827-2beb-4e05-a0f6-f26740a24544%40mtasv.net.


[racket-users] Racket v8.1

2021-05-05 Thread 'John Clements' via Racket Users
--
Racket version 8.1 is now available from

https://racket-lang.org/


- DrRacket tabs can be dragged, and have new close buttons.

- Racket CS supports cross-compilation using `raco exe`.

- Racket CS supports Android on 32-bit and 64-bit ARM processors.

- The database library supports running queries in OS threads.

- Check-Syntax arrows correctly identify the definition site of
  identifiers with contracts.

- Racket CS performance has improved for structure predicates and
  accessors

- Racket CS is faster at multiplying extremely large numbers and
  dividing large integers.

- Racket CS allows callbacks to raise exceptions if they are annotated
  with `#:callback-exns?`.

- New ephemeron hash tables simplify the implementation of tables where
  keys can refer to values.

- Typed Racket supports for/foldr.

- The stepper works for #lang htdp/*sl.

- Struct signatures work for the ASL teaching language.

The following people contributed to this release:

Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew
Mauer-Oats, Anish Athalye, Ben Greenman, Bert De Ketelaere, Bob Burger,
Bogdan Popa, Brian Adkins, Cameron Moy, David Van Horn, Dexter Lagan,
Dominik Pantůček, Fred Fu, Greg Hendershott, Gustavo Massaccesi, Hazel
Levine, Ismael Luceno, Jack Firth, Jarhmander, John Clements, Jörgen
Brandt, Laurent Orseau, Lazerbeak12345, Matthew Flatt, Matthias
Felleisen, Micah Cantor, Mike Sperber, Noah Ma, Patrick McCarty, Paulo
Matos, Pavel Panchekha, Philip McGrath, Philippe Meunier, R. Kent
Dybvig, Robby Findler, Ryan Culpepper, Ryan Kramer, Sam Tobin-Hochstadt,
Sergiu Ivanov, Shu-Hung You, Sorawee Porncharoenwase, Stephen De
Gabrielle, William J. Bowman, bmitc, xxyzz, yjqww6, and ymdarake

Feedback Welcome
--

-- 
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/9660bf5e-49ee-4b71-8407-4e1fcde01b36%40mtasv.net.


Re: [racket-users] limitation of TR contract translation?

2021-04-30 Thread 'John Clements' via Racket Users
Okay, submitted as bug. Many thanks to Matthias for reducing the example.

John

> On Apr 30, 2021, at 4:12 AM, Sam Tobin-Hochstadt  wrote:
> 
> This is a bug. It's not the the contract is unsatisfiable, it's that it's too 
> satisfiable. The contract system could probably make this work, but Typed 
> Racket should probably avoid this situation. 
> 
> Sam
> 
> On Fri, Apr 30, 2021, 2:07 AM 'John Clements' via Racket Users 
>  wrote:
> It seems that the conversion of TR types to contracts can result in contracts 
> like (or/c (cons/c any/c any/c) (cons/c any/c any/c)) that apparently cause 
> errors when run. 
> 
> I’m too tired to do a good job of providing a full example… no, actually, 
> it’s pretty easy. Run this program:
> 
> #lang racket
> 
> 
> (module foo typed/racket
> 
>   (provide val->autorun-table)
> 
>   (define-type Autorun-Result
> (U (Pair 'success Any)
>(Pair 'fail Any)))
> 
>   (define-type Autorun-Entry
> (List String Autorun-Result))
>   (define-predicate autorun-entry? Autorun-Entry)
> 
>   (define-type Autorun-Table (Listof Autorun-Entry))
>   (define-predicate autorun-table? Autorun-Table)
> 
>   (define (val->autorun-table [val : Any])
> : (U False Autorun-Table)
> (cond
>   [(list? val)
>(define first-bad (findf (compose not autorun-entry?) val))
>(when first-bad
>  (fprintf (current-error-port)
>   "not an expected autorun entry:\n~e\n"
>   first-bad))
>(cast val Autorun-Table)]
>   [else
>(error 'maybe-fetch-autorun-results
>   "result of read wasn't a list. moreinfo.")])))
> 
> (require 'foo)
> 
> (val->autorun-table '(("1234" (fail (zz 1234) (d 9)
> 
> 
> … see this error:
> 
> val->autorun-table: broke its own contract
>   two of the clauses in the or/c might both match: (cons/c any/c Any) and 
> (cons/c any/c Any)
>   produced: '(fail (zz 1234) (d 9))
>   in: the 2nd element of
>   an element of
>   a part of the or/c of
>   the range of
>   (->
>any/c
>(or/c
> #f
> (listof
>  (list/c
>   any/c
>   (or/c
>(cons/c any/c Any)
>(cons/c any/c Any))
>   contract from: (anonymous-module foo)
>   blaming: (anonymous-module foo)
>(assuming the contract is correct)
>   at: 38-unsaved-editor:20.11
> 
> 
> Basically, it looks like the type is getting simplified a bit as it’s being 
> translated into a contract, and unfortunately, the resulting contract is 
> unsatisfiable?
> 
> Is this a bug, or a known limitation?
> 
> 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/295471a4-99d9-4bbe-8e7b-351c1bb75e96%40mtasv.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/090e59fd-3e81-4ab9-9eea-85d643d095ab%40mtasv.net.


[racket-users] limitation of TR contract translation?

2021-04-30 Thread 'John Clements' via Racket Users
It seems that the conversion of TR types to contracts can result in contracts 
like (or/c (cons/c any/c any/c) (cons/c any/c any/c)) that apparently cause 
errors when run. 

I’m too tired to do a good job of providing a full example… no, actually, it’s 
pretty easy. Run this program:

#lang racket


(module foo typed/racket

  (provide val->autorun-table)
  
  (define-type Autorun-Result
(U (Pair 'success Any)
   (Pair 'fail Any)))

  (define-type Autorun-Entry
(List String Autorun-Result))
  (define-predicate autorun-entry? Autorun-Entry)

  (define-type Autorun-Table (Listof Autorun-Entry))
  (define-predicate autorun-table? Autorun-Table)

  (define (val->autorun-table [val : Any])
: (U False Autorun-Table)
(cond
  [(list? val)
   (define first-bad (findf (compose not autorun-entry?) val))
   (when first-bad
 (fprintf (current-error-port)
  "not an expected autorun entry:\n~e\n"
  first-bad))
   (cast val Autorun-Table)]
  [else
   (error 'maybe-fetch-autorun-results
  "result of read wasn't a list. moreinfo.")])))

(require 'foo)

(val->autorun-table '(("1234" (fail (zz 1234) (d 9)


… see this error:

val->autorun-table: broke its own contract
  two of the clauses in the or/c might both match: (cons/c any/c Any) and 
(cons/c any/c Any)
  produced: '(fail (zz 1234) (d 9))
  in: the 2nd element of
  an element of
  a part of the or/c of
  the range of
  (->
   any/c
   (or/c
#f
(listof
 (list/c
  any/c
  (or/c
   (cons/c any/c Any)
   (cons/c any/c Any))
  contract from: (anonymous-module foo)
  blaming: (anonymous-module foo)
   (assuming the contract is correct)
  at: 38-unsaved-editor:20.11


Basically, it looks like the type is getting simplified a bit as it’s being 
translated into a contract, and unfortunately, the resulting contract is 
unsatisfiable?

Is this a bug, or a known limitation?

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/295471a4-99d9-4bbe-8e7b-351c1bb75e96%40mtasv.net.


Re: [racket-users] Add Link to the racket Discord to the racket website?

2021-04-22 Thread 'John Clements' via Racket Users
This is the second time I’ve heard of matrix.org this week. Time to check it 
out.

John

> On Apr 20, 2021, at 1:45 AM, Yury Bulka  
> wrote:
> 
> Just my 5 cents...
> 
> Recently I had to register on a discord "server" to ask a question
> within another community - and the experience was of a high barrier of
> entry. I needed to provide my age, confirm my email, then (that might be
> an issue of that particular "server" - I'm not sure) I was forced to
> wait 5 minutes before I could interact. Also I notice now that discord
> sends me email notifications that contain third-party tracking.
> 
> Another walled garden trying to make me an addict of their service.
> 
> The only thing I want to do now is delete any of my presence on discord.
> 
> The IRC + Matrix combination is much more open and inclusive I think.
> 
> And there is a question of transparency of governance and moderation of
> course.
> 
> --
> Yury Bulka
> https://mamot.fr/@setthemfree
> #NotOnFacebook
> 
> 
> 
> Adam Golding  writes:
> 
>> I'm not so sure now: https://groups.google.com/g/racket-users/c/SkJAKkQhlgw
>> 
>> 
>> On Mon, 19 Apr 2021 at 03:39, Adam Golding  wrote:
>> 
>>> seconded
>>> 
>>> On Sun, 18 Apr 2021 at 14:56, schle...@gmail.com 
>>> wrote:
>>> 
 
 The racket discord is managed quite well, I think it should be added to
 the racket website so that newcomers can find it easier, just a thought.
 
 Maybe below the link to slack?
 
 --
 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/a8e865db-f585-477d-b397-fceaa7cb3131n%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/87pmyp1gzf.fsf%40privacyrequired.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/21c234c5-fd5b-4717-a9c0-40f2bd6df9c4%40mtasv.net.


Re: [racket-users] Understanding recursion in the function normalize-definition form the racket sources

2021-04-17 Thread 'John Clements' via Racket Users
I’m confused by your assertion that define-values can’t be used recursively. 
Here’s a program that does this:

#lang racket

(define-values (fact)
  (λ (x) (if (= x 0) 1 (* x (fact (sub1 x))

(fact 14)

Am I misunderstanding your message?

John Clements

> On Apr 17, 2021, at 05:02, Dan Synek  wrote:
> 
> I am trying to implement a variation of define. In order to do that I am 
> trying to understand the source of the define macro in racket.
>  It calls a function normalize-definition which looks like this:
>   (define-values (normalize-definition)
> (case-lambda 
>  [(stx lambda-stx check-context? allow-key+opt?)
>   (let-values ([(id mk-rhs body)
> (normalize-definition/mk-rhs stx lambda-stx 
> check-context? allow-key+opt? #t)])
> (values id (mk-rhs body)))]
>  [(stx lambda-stx check-context?) (normalize-definition stx lambda-stx 
> check-context? #f)]
>  [(stx lambda-stx) (normalize-definition stx lambda-stx #t #f)])))
> 
> In the two last cases of the case-lambda there is a call to 
> normalize-definition. It is not a recursive call, since define-values cannot 
> be used recursively. I cannot find any other normalize-definition in the 
> modules required by the norm-define module.
>  If I try to enter a copy of the definition (renamed to 
> normalize-definition1) I get (as expected) that normalize-definition1 is 
> undefined.
> What is going on?
> Thanks
> Dan
> 
> 
> -- 
> 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/ce5ce36e-03ee-44b1-a5ae-4f5a6e7b9d1en%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/3e1d308f-ab29-47e5-b42e-fdff07739645%40mtasv.net.


Re: [racket-users] Is this a good uninstall then install Racket plan...

2021-04-13 Thread 'John Clements' via Racket Users
What if he has directories that aren’t part of an installed package? That was 
my concern, and why I suggested manually deleting compiled subdirs.

John

> On Apr 13, 2021, at 18:58, Philip McGrath  wrote:
> 
> On Tue, Apr 13, 2021 at 8:21 PM 'John Clements' via Racket Users 
>  wrote:
> It sounds to me like the solution might be much much simpler than 
> re-installing an earlier version of racket. Here’s what I recommend.
> 
> 1) Delete all of the “compiled” subdirectories in your development path.
> 2) run “raco setup”.
> 
> I think you should be able to automate finding and updating the "compiled" 
> subdirectories by running:
> 
> raco setup --clean && raco setup
>  
> -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/01000178ce19df5f-46515da8-c86d-4a02-ad84-615dc7c8bc7d-00%40email.amazonses.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/a2b3fb74-a80c-42fd-ab2f-1c7bd577a983%40mtasv.net.


Re: [racket-users] Is this a good uninstall then install Racket plan...

2021-04-13 Thread 'John Clements' via Racket Users
Thanks for clarifying!

It sounds to me like the solution might be much much simpler than re-installing 
an earlier version of racket. Here’s what I recommend.

1) Delete all of the “compiled” subdirectories in your development path.
2) run “raco setup”.

It seems likely to me that this will solve the problem you’re seeing, and is 
very unlikely to break anything that’s not currently broken.

There are other more complicated or refined versions of this, but at the end of 
the day, this error is probably solved by just moving the offending file out of 
the way.

John


> On Apr 13, 2021, at 5:16 PM, Don Green  wrote:
> 
> I have several versions of racket installed on Ubuntu linux at default linux 
> locations.
> I think I should uninstall them all.
> Then after downloading a PPA from the racket web site
> install the version I want to a single directory. (I would be downloading 
> version: 7.8)
> Does this sound like a plan sound okay?
> 
> I gather from the comments I have received from John Clements, that he 
> suspects I am having some sort of problem that is motivating the desire to 
> return to an earlier version
> of Racket. 
> 
> I believe the problem is where I have placed my racket code files.
> I've been putting off moving them and would like to continue putting off 
> moving them.
> 
> I inadvertently upgraded to Racket v8.0 a couple of days ago. 
> 
> Welcome to Racket v8.0 [cs].
> > (current-library-collection-paths)
> '(#
>   #
>   #)
> 
> My code files all begin here: /home/don/.plt-scheme/4.2.1/collects/...
> 
> Racket error message when I run:
> $ my-prog
> read-compiled-linklet: version mismatch  expected: "8.0"  found: "7.8"  in: 
> /home/don/.plt-scheme/4.2.1/collects/DG/all/a/b/fn/filename-from-path-and-filename/compiled/filename-from-path-and-filename_ss.zo
> 
> So, since my compiled file was compiled under Racket version 7.8, there is a 
> mismatch since the Racket now installed is Racket v. 8.0.  Thus the reason 
> I'd like to return to running Racket v. 7.8.
> Thanks for your advice.
> Don
> 
> 
> 
> 
> -- 
> 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/134d170b-500d-4959-b842-6d4713329ffdn%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/16be474f-ca60-480f-af73-6b6c5e9a4cc9%40mtasv.net.


Re: [racket-users] inadvertently upgraded Racket version. Would like to make an older installed version current.

2021-04-13 Thread 'John Clements' via Racket Users
Did you install racket using a package manager, perhaps from the racket PPA? 
(I’m guessing the answer is yes, since this seems like the most likely 
situation to have caused an unintentional upgrade.)

If so, I think you should generally get the right behavior from using that same 
package manager to reinstall the earlier version, and “pin” it using whatever 
mechanism your package manager provides.

If you have code that’s not a part of a package installed by raco pkg (or 
installed with the —link option), I can imagine needing to recompile some 
sources using raco setup.

I suppose I should first have asked this question: what’s your reason for 
installing the earlier version? I ask because if the issue is CS/BC, you should 
be aware that there is a BC version of 8.0 available.

Finally, let me apologize in advance if anything I’m telling you is partly or 
completely mistaken!

John

> On Apr 13, 2021, at 12:55 PM, infodeveloperdon  
> wrote:
> 
> Hi, I'm using linux Ubuntu.
> Don
> 
> On Tuesday, April 13, 2021 at 1:02:33 PM UTC-6 johnbclements wrote:
> raco pkg remove is definitely not what you want. 
> 
> In general, I know there are languages (ocaml, haskell, rust) that put their 
> package managers “outside” of the currently installed version, so it might 
> make sense that a package manager command could be used to change to an 
> earlier version of the language.  
> 
> In Racket, by contrast, the package manager is part of the installation, on 
> the “inside”. 
> 
> However, you can certainly have multiple versions of Racket installed at the 
> same time. 
> 
> The details of which one is “active”, and what that word even means, is 
> highly dependent on what operating system you’re using. 
> 
> What operating system are you using? 
> 
> John Clements 
> 
> > On Apr 13, 2021, at 11:29, infodeveloperdon  wrote: 
> > 
> > I inadvertently upgraded Racket version. Would like to make an older 
> > installed version current. 
> > So now when I start DrRacket v8 is current. 
> > Is there a command that makes a specified version current? 
> > Does 
> > raco pkg remove  
> > effectively make the previous version current? 
> > Thanks. Don. 
> > 
> > -- 
> > 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...@googlegroups.com. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/a7577cff-a448-4e44-91b0-6d9d9e4557c5n%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/729e46a6-9c39-4d56-b1d4-2d6a11e5d25en%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/bf17a551-cd79-4b2b-940a-a8189825a8ac%40mtasv.net.


Re: [racket-users] "You do not have permission to respond to author in this group."

2021-04-13 Thread 'John Clements' via Racket Users
Hmm… that’s a new one to me. It sounds like there’s a setting that can be 
toggled, I’m not quite sure what the ramifications of toggling that setting 
would be.

John

> On Apr 13, 2021, at 1:05 PM, Don Green  wrote:
> 
> "You do not have permission to respond to author in this group."
> upon clicking button [Respond To Author]
> in Google Groups/ Racket
> Is there a setting I can change or is just the way this group is configured 
> for all?
> Thanks
> Don
> 
> 
> -- 
> 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/bcee693a-fbac-4716-8d59-512f3fc889b2n%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/99eea91e-ea0e-4119-954c-2fcceb161161%40mtasv.net.


Re: [racket-users] inadvertently upgraded Racket version. Would like to make an older installed version current.

2021-04-13 Thread 'John Clements' via Racket Users
raco pkg remove is definitely not what you want.

In general, I know there are languages (ocaml, haskell, rust) that put their 
package managers “outside” of the currently installed version, so it might make 
sense that a package manager command could be used to change to an earlier 
version of the language. 

In Racket, by contrast, the package manager is part of the installation, on the 
“inside”.

However, you can certainly have multiple versions of Racket installed at the 
same time.

The details of which one is “active”, and what that word even means, is highly 
dependent on what operating system you’re using. 

What operating system are you using?

John Clements

> On Apr 13, 2021, at 11:29, infodeveloperdon  
> wrote:
> 
> I inadvertently upgraded Racket version. Would like to make an older 
> installed version current.
> So now when I start DrRacket v8 is current.
> Is there a command that makes a specified version current?
> Does 
> raco pkg remove 
> effectively make the previous version current?
> Thanks. Don.
> 
> -- 
> 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/a7577cff-a448-4e44-91b0-6d9d9e4557c5n%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/29ed9c53-483b-414c-8a56-3dd9e0c449ec%40mtasv.net.


Re: [racket-users] Questions Regarding My First Program

2021-02-23 Thread 'John Clements' via Racket Users
I *always* use DrRacket… but I admit I may not understand the indenting part of 
your question. 

In DrRacket, when you hit the “tab” key, it should move the text on the line to 
the “correct” position, according to Racket’s indentation rules. Also, whenever 
you hit return, the cursor should be automatically indented to the appropriate 
column. Finally, you can highlight a block of text and hit “tab”, and it will 
all be re-indented.

Is this different from what you’re observing, or from what you’re expecting?

John Clements

> On Feb 23, 2021, at 4:05 PM, Sage Gerard  wrote:
> 
> I can't speak to DrRacket since I never use it, so I'll focus more on the 
> first question.
> 
> Functional programming typically deals with these considerations (among 
> others):
> 
>   • Write functions that return values purely in terms of arguments.
>   • Defer side-effects until you can't.
> A goal to make the program produce the same output given the same input, 
> every time.
> 
> One example would be to redefine `say` such that it doesn't immediately 
> print. Maybe just return the string you want said.
> 
> (define (say str)
>   (format "Chatbot: ~a\n" str))
> 
> (I'd personally use a struct representing a message, sender, etc. but that's 
> beside the point)
> 
> This change makes the function "pure" in that the same input returns the same 
> output, and there are no side-effects in doing so. But this creates a problem 
> where you need to "rope in" that value somewhere. How that happens depends on 
> the program. A program that reports download progress will handles 
> side-effects differently than a program that prints a report before stopping.
> 
> One approach is to update program state in the same (functional) way. If we 
> assume the chat history is a list, where the first element is the most recent 
> message, then this version of `say` adds a string to the chat.
> 
> (define (say chat-history str)
>   (cons (format "Chatbot: ~a\n" str) 
> chat-history))
> 
> I'd start with this kind of thinking until you get to the point where 
> side-effects are unavoidable. Since your program appears interactive, you can 
> still print in the loop. But think about what your program would be like if 
> you print ONLY in that loop.
> 
> Others can probably say more, but hopefully this helps you start.
> 
> On 2/23/21 5:59 PM, IF Karona wrote:
>> Hi everyone,
>> 
>> I am new here, and I have a couple of questions related to the code that 
>> follows this message.
>> 
>> 1. I want to learn functional programming. When it comes to solving the 
>> problem of making a simple chatbot such as this, is there an approach that 
>> is more consistent with functional programming?
>> 2. I would prefer to not have to use multiple spaces every time I want to 
>> indent. Does Dr. Racket have anything comparable to the tab functionality of 
>> other programs?
>> 
>> Thank you for letting me join your community!
>> 
>> Karona
>> 
>> ;example.rkt
>> 
>> #lang racket
>> 
>> (require racket/match)
>> 
>> (define (say str)
>> (printf "Chatbot: ~a\n" str))
>> 
>> (define (handle-input str)
>> (cond
>>   
>> [(regexp-match #px"(?i:Hello,* world!)" str)
>> (say "I would not know about the rest of the world, but I can 
>> hear \
>> you just fine.")]
>>   
>> [(regexp-match #px"(?i:I( am|'m) learning how to program in Racket,* 
>> world!)" str)
>> (say "Racket is a great language, and it is lovely that you are \
>> learning it, but does literally everyone need to know?")]
>> 
>> [(regexp-match #px".*,+\\s*world!" str)
>> (say "Did the whole world really need to hear that?")]
>>   
>> [else (say "Did you really just say something without addressing the 
>> \
>> world? I am so proud of you! :,)")]))
>> 
>> (let loop ()
>> (display "Input: ")
>> (define str (read-line (current-input-port) 'any))
>> (handle-input str)
>> (loop))
>> -- 
>> 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/2f107ab5-2efd-4c33-83f6-eb5751664cb6n%40googlegroups.com.
> --
> ~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/d3da9796-979d-cad9-36e5-91380939630c%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.

Re: [racket-users] New to Racket

2021-02-17 Thread 'John Clements' via Racket Users
Definitely! What’s up?

John Clements

> On Feb 17, 2021, at 10:36 PM, Rohan Posthumus  
> wrote:
> 
> Good morning,
> 
> I am new to Racket and want to know where I can ask questions if I do not 
> understand something. Is this the correct platform?
> 
> Kind regards
> Rohan
> 
> -- 
> 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/42f34a1b-6a10-40c0-ad54-9cfd586e9e94n%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/e1629f45-5296-49e2-9d05-a85b1c66a128%40mtasv.net.


Re: [racket-users] Racket v8.0 (!)

2021-02-16 Thread 'John Clements' via Racket Users
I think your 32-bit options at this point are these:

1) Use one of the nightly builds, e.g. 
https://plt.cs.northwestern.edu/snapshots/
2) Compile it yourself, using the source bundle.
3) (Of course, you could use an older version. Looks ilke 7.3 is the last one 
released in a 32-bit Linux build.)

Let me know if I’ve forgotten any other options!

John

> On Feb 16, 2021, at 15:27, Hendrik Boom  wrote:
> 
> On Tue, Feb 16, 2021 at 12:26:50PM -0500, John Clements wrote:
>> Help me out: which platform are you referring to?
> 
> The Linux one that was on everybody's PC before PC's went 64-bit.
> I still use that old computer now and then with a stable 
> Devuan release, especially when I'm on the move.
> (though normally at home I have a 64-bit one).
> 
> -- hendrik
> 
>> 
>> John
>> 
>>> On Feb 16, 2021, at 8:10 AM, Hendrik Boom  wrote:
>>> 
>>> On Sat, Feb 13, 2021 at 09:17:26PM -0500, 'John Clements' via Racket Users 
>>> wrote:
>>>> *** Racket 8.0 is here! ***
>>>> 
>>>> Racket version 8.0 is now available from
>>>> 
>>>>   https://racket-lang.org/
>>> 
>>> Are there no 32-bit intel binaries available?
>>> Or did I just look too soon?
>>> 
>>> -- 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/20210216161016.vtmuiws3m3b7mhed%40topoi.pooq.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/20210216232741.fnc7dabmw65niisa%40topoi.pooq.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/63554058-a655-441b-b6f3-dbd7471b519d%40mtasv.net.


Re: [racket-users] Racket v8.0 (!)

2021-02-16 Thread 'John Clements' via Racket Users
Help me out: which platform are you referring to?

John

> On Feb 16, 2021, at 8:10 AM, Hendrik Boom  wrote:
> 
> On Sat, Feb 13, 2021 at 09:17:26PM -0500, 'John Clements' via Racket Users 
> wrote:
>> *** Racket 8.0 is here! ***
>> 
>> Racket version 8.0 is now available from
>> 
>>https://racket-lang.org/
> 
> Are there no 32-bit intel binaries available?
> Or did I just look too soon?
> 
> -- 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/20210216161016.vtmuiws3m3b7mhed%40topoi.pooq.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/a9dd937e-3687-4ae1-a12f-e083ee5ca7d0%40mtasv.net.


[racket-users] Racket v8.0 (!)

2021-02-13 Thread 'John Clements' via Racket Users
*** Racket 8.0 is here! ***

Racket version 8.0 is now available from

https://racket-lang.org/

Racket 8.0 marks the first release where Racket CS is the default
implementation. Creating, polishing, and adopting Racket CS has been a
4-year effort involving the entire Racket community. At this point,
Racket CS is faster, easier to maintain and develop, and compatible
with existing Racket programs. Racket CS will continue to improve, but
at this point it is ready to be the primary variant of Racket for all
Racketeers. More details about the current state of Racket CS are
available in the recent blog post (https://blog.racket-lang.org/).

Other notable changes:

* Racket CS has better parallel garbage collection, a 10%-30% reduction
  in the size of generated code, and various targeted optimizations.

* A rewrite of the test-engine package allows the `#lang` versions of
  teaching languages to produce linked test-failure messages.

* The release comes with a new mark-up DSL for composing text to
  appear in the REPL (simple-tree-text-markup).

* Redex has an added `define-overriding-judgment` form  and improved
  error source location reporting.

* Windows scrolling speed reflects the system preference.

* The db package uses the utf8mb4 charset for MySQL connections.

The following people contributed to this release:

Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Bert De
Ketelaere, Bogdan Popa, Cameron Moy, David Van Horn, Davis Silverman,
Dominik Pantůček, Florian Weimer, Fred Fu, Gustavo Massaccesi, Jack
Firth, James Wilcox, Joel Dueck, John Clements, Jonathan Chan, Lîm
Tsú-thuàn, Mark, Matthew Flatt, Matthias Felleisen, Michael Ballantyne,
Mike Sperber, Paulo Matos, Pavel Panchekha, Peter Zhong, Phil Nguyen,
Philip McGrath, Robby Findler, Ryan Culpepper, Sam Tobin-Hochstadt,
Sergiu Ivanov, Shu-Hung You, Sorawee Porncharoenwase, Stefan Schwarzer,
Stephen Chang, Stephen De Gabrielle, Walter H. Yang, WarGrey Gyoudmon
Ju, kurinoku, xxyzz, and yjqww6

--

*** Windows users should note that as of this release date (2021-02-13),
Windows SmartScreen is observed to flag the Racket download bundles
as potentially malicious, based on the low number of times this
bundle has been downloaded and installed. Clicking a label with the
text “more info” appears to be necessary to install Racket
8.0. We’re hopeful that this issue will go away … soon? ***



-- 
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/06d8e16d-b7d2-41c6-ae76-99e33fecd3bd%40mtasv.net.


Re: [racket-users] requiring a file on windows

2021-02-02 Thread 'John Clements' via Racket Users
In order to allow static compilation, the path in a (file …) require must be a 
literal string. 

It sounds like you might be looking for “dynamic-require” ?

Apologies if I’m misunderstanding you.

John Clements


> On Feb 2, 2021, at 3:20 PM, thro...@gmail.com  wrote:
> 
> I can't seem to build paths the way require wants them on windows. 
> 
> I must be missing something basic.
> 
> Tried a bunch of things (can't remember them all), here's the last: 
> (Racket versions  8.0.0.4--2021-02-01 and 7.8)
> 
> (define wrk_dir #"C:/Temporary/zDEL3/TEST_BATCH/")
> (require(file(bytes->string/utf-8(bytes-append wrk_dir #"vend_map.rkt"
> 
> 
> 
> . file: ill-formed module path in: (file (bytes->string/utf-8 (bytes-append 
> wrk_dir #"vend_map.rkt")))
> > 
> 
> -- 
> 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/92dea514-f8f7-49f2-bf5a-1799430cd4bfn%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/5d6ed0ab-5ca8-4036-8248-47ddcefea101%40mtasv.net.


Re: [racket-users] Does password reset work on pkgs.racket-lang.org?

2021-02-01 Thread 'John Clements' via Racket Users
FWIW, I recall problems like this as well, about four years ago. I think we 
wound up resetting it manually, at the time. 

John

> On Feb 1, 2021, at 8:48 AM, Jay McCarthy  wrote:
> 
> I just checked it and I got an email, but it was put into spam.
> 
> If you can't identify a problem on your side, contact me off list and
> we can debug together.
> 
> Jay
> 
> --
> Jay McCarthy
> Associate Professor @ CS @ UMass Lowell
> http://jeapostrophe.github.io
> Vincit qui se vincit.
> 
> On Sat, Jan 30, 2021 at 9:56 PM Danny Yoo  wrote:
>> 
>> Hi everyone,
>> 
>> Unfortunately, it looks like the password on my account 
>> (d...@hashcollision.org) on pkgd.racket-lang.org got compromised recently, 
>> so I'm trying to figure out how to reset it now.
>> 
>> I don't see an option to do so except in the Login page.  When I try to do 
>> so, I ask it to "Email me a code", but it doesn't seem to be working.  I've 
>> checked my spam folder just to check, but don't see it in there as well.  
>> Any suggestions?
>> 
>> Thanks in advance!
>> 
>> --
>> 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/32659ebf-55da-47a3-a459-6e664926bc67n%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/CAJYbDanqK0%2BeQvFWXdi0w8Sa5Xfz7dtU-mMaySc%2BEiwAk3b_Dg%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/4ebaaf48-eecd-46e9-ae4b-571e2e1d843a%40mtasv.net.


Re: [racket-users] 32bit linux downloads

2021-01-26 Thread 'John Clements' via Racket Users
I don’t think we were planning on having those. It looks like the last time we 
made 32-bit binaries available was for version 7.3, in May 2019.

John Clements

> On Jan 26, 2021, at 5:31 AM, Ed Kademan  wrote:
> 
> 
> Will Racket 8 have 32-bit linux binaries available for download?
> 
> -- 
> 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/062354f4-a83b-4c61-adfc-61204fa97c50n%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/5052fc24-2e2f-427e-b8a0-6830e68c5a84%40mtasv.net.


[racket-users] Racket v7.9.0.900 is available for testing

2021-01-22 Thread 'John Clements' via Racket Users
Hello, most excellent Racket Users!

Version 7.9.0.900 is now available for testing from

  https://pre-release.racket-lang.org/

(Note that this is not available from the usual download site.)

If all goes well, we will turn this version into a v8.0 release
within a couple of weeks.

Your help and feedback in testing this new release candidate would be
much appreciated.


Please note that although the last few releases have included variants that 
used the Chez Scheme back-end, this is the first one for which it’s the 
default. The old back-end is now labeled as “BC” (“before chez”) on the 
pre-release download page.

Many thanks!

John Clements

-- 
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/ce4add22-6c19-4860-a249-36a52c94227a%40mtasv.net.


Re: [racket-users] Permutations ind Racket

2020-12-16 Thread 'John Clements' via Racket Users
Are you using the “How To Design Programs” textbook? It’s free, online, and 
written by the team that developed Racket:

https://htdp.org/2020-8-1/Book/index.html

Indeed, it would not be a stretch to say that Racket and this textbook are part 
of the same project.

How To Design Programs (or HtDP) is focused on the idea of systematic design, 
and makes this concrete in the form of a “design recipe”, outlining specific 
steps for developing programs.

Taking a 10-second look at your code, it seems that you skipped steps 1, 2, 3, 
and possibly 4 of the design recipe in developing your code. Specifically: you 
need purpose statements, input/output specifications, and examples/test cases. 
These are part of systematic design. 

I strongly suggest that you take a look at How To Design Programs to understand 
how to design functions like this methodically!

Hope this helps,

John Clements


> On Dec 15, 2020, at 5:12 AM, Kira Bender  wrote:
> 
> I study programming and have to do permutations in Racket without something 
> like map , foldr, remove, remq, sort! or begin. So now i have a code but it 
> doesn't show me every Permutation and some dopple. I can't find the issue or 
> how to fix and program it right only using recursion. Maybe some of you know 
> how to help me and find my logical or programming issue.  Here you can find a 
> github link to my code.
> https://gist.github.com/KiraBen/fd70ea1063dfcdadfea0332343e37558
> 
> Thank you for your help. 
> 
> With greetings Kira Bender
> 
> -- 
> 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/fd484f7c-77b5-492c-9780-d3c2a7cc0e0bn%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/93fac9b5-6d56-46c6-930f-7cdb5b26a6fb%40mtasv.net.


Re: [racket-users] Unusable mail group

2020-11-29 Thread 'John Clements' via Racket Users
It looks to me like there is a “My membership settings” pane in the left of the 
google groups web interface that allows you to specify the “email used for 
membership”. I conjecture that this would control the delivery of group 
e-mails. I also strongly suspect that this will only allow you to choose from 
the e-mail addresses associated with your gmail account (though, to be clear, 
these do *not* have to be gmail addresses). It’s not clear to me from your 
e-mail whether logging into your gmail account in order to use the web 
interface is something that you’re willing or able to do.

Does this help at all?

John


> On Nov 28, 2020, at 8:00 PM, Albert Wagner  wrote:
> 
> My actual email address is:  albert.wag...@mail.com, NOT the email above in 
> "From"
> I don't use my gmail account.  
> I can find no  way to change my email account in this URL:
> https://groups.google.com/g/racket-users
> 
> -- 
> 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/cf97db2a-9a38-4a72-bc7a-38a325e3b190n%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/13842b6b-fe78-4edf-936d-2edb4009cb64%40mtasv.net.


Re: [racket-users] compiler books

2020-11-27 Thread 'John Clements' via Racket Users
If you’re specifically interested in 

1) Compilers, and
2) Racket,

I think it’s hard to do better than Jeremy Siek’s Essentials of Compilation. He 
comes from the Indiana group, as, indirectly, does just about everything around 
here, and his approach is very closely related to Dybvig/Chez, including a 
nanopass architecture. Shout-outs also to Andy Keep and Abdulaziz Ghuloum, who 
did a lot of work related to this.

Here’s the link to the most recent course web page:

https://iucompilercourse.github.io/IU-P423-P523-E313-E513-Fall-2020/

… including a link to the book.

I would also be remiss in not mentioning Ben Lerner’s NU compilers course, for 
which lecture notes are online:

https://course.ccs.neu.edu/cs4410sp20/#%28part._lectures%29

And finally, I want to take a brief moment to impugn the Dragon Book; the last 
time I checked, I thought that it represented a very outdated approach to 
writing a compiler. I’m probably biased, but if you want a heavy book on 
low-level programming, I would go for Keith Cooper’s Compilers book. Jeremy 
Siek’s book, by contrast, is free, describes how to implement high-level 
languages such as Racket, and does not contain an encyclopedic discussion of 
low-level optimization.

Everything here is just my opinion, of course!

John

> On Nov 27, 2020, at 15:42, Tim Meehan  wrote:
> 
> Hendrik - sorry for misspelling your name .
> 
> On Fri, Nov 27, 2020 at 5:41 PM Tim Meehan  wrote:
> Thanks for the links, Hendrick and Matt!
> The holidays gave me some time to learn about things that I had put on the 
> back burner all year, so this is great timing.
> 
> 
> 
> On Fri, Nov 27, 2020 at 2:57 PM Matt Jadud  wrote:
> 
> 
> On Fri, Nov 27, 2020 at 12:40 PM Hendrik Boom  wrote:
> On Wed, Nov 25, 2020 at 09:46:21AM -0600, Tim Meehan wrote:
> I found a book by Dick Grune et al to be somewhat lighter than the dragon 
> book.  Looking online, I discoered I was thinking of the first edition.  I 
> haven't seen the second edition, but I'd guess the second edition would be 
> similar, though it has rather more material:
> 
> https://dickgrune.com/Books/MCD_1st_Edition/
> https://dickgrune.com/Books/MCD_2nd_Edition/
> 
> When I saw the first edition, I decided that if I were teaching an 
> introductory course in compilers, I would use it as textbook.
> 
> 
> I've been fond of 
> 
> https://www.nand2tetris.org/ 
> 
> for a while as a "soup to nuts" overview of computation from the NAND gate up 
> through a simple computer, a simplified assembly language, assembler, 
> compiler, VM, and so on. It's not an advanced text, but it does provide a 
> hands-on bottom-to-top view of the computational world that can help orient 
> someone who is exploring the space.
> 
> It's also why I keep wondering when I'm going to break down and pick up a 
> little FPGA board for myself and just play. :)
> 
> Cheers,
> Matt
> 
> -- 
> 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/CAAGM454t_FNXj8RHTbLuC1pe-14i-rF%3DyQ_B%2BmSvoE4DGUyMAw%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/CACgrOxKt0oS%3DXGRjujvZ6p9jkKaHS5r44SWVWGw0cu8z%3DOXrpg%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/2ceb25aa-b12b-4949-8ca9-22f7e9196091%40mtasv.net.


Re: [racket-users] Racket v7.9

2020-11-02 Thread 'John Clements' via Racket Users
But wait! There’s more! (Or, more prosaically: I left out several bullet items.)

* The `datum` form from `syntax/datum` works with syntax pattern
  variables and `syntax-parse` attributes.

* Unicode input works with recent versions of libedit in addition
  to libreadline. On Mac OS, a compatible version of libedit is
  included with Racket.

Best to everyone,

John

> On Nov 2, 2020, at 4:10 PM, 'John Clements' via Racket Users 
>  wrote:
> 
> Racket version 7.9 is now available from
> 
>https://racket-lang.org/
> 
> 
> * Racket CS may become the default Racket implementation in the next
>  release. If, between this release and the next, no bugs are discovered
>  in Racket CS that are more serious than those typically discovered in
>  Racket BC, then Racket CS will become the default for the next
>  release. (Serious Racket CS bugs were found since the v7.8 release,
>  but they're ever fewer and farther between.)
> 
> * Various improvements to Check Syntax arrows and
>  renaming, thanks to Sorawee Porncharoenwase.
> 
> * Full support for struct type properties in Typed Racket, developed by
>  Fred Fu.
> 
> * Racket CS now supports parallel garbage collection, along with
>  improvements for place-local-allocation and incremental promotion.
> 
> * Unix platforms now use the XDG filesystem conventions for the
>  locations of per-user configuration and library files by default, but
>  legacy paths are still used where they exist already.
> 
> * Scribble improvements by Sorawee Porncharoenwase, William Bowman, and
>  Shu-Hung You.
> 
> * Improvements to the plot library from Alex Harsányi and Bert De
>  Ketelaere.
> 
> The following people contributed to this release:
> 
> 5pyd3r, A. Green, Adam Michael, Alex Bartholomew, Alex Harsányi, Alex
> Knauth, Alexander B. McLin, Alexander Shopov, Alexis King, Andrew
> Mauer-Oats, Andy Keep, Ayman Osman, Barak A. Pearlmutter, Ben Greenman,
> Bert De Ketelaere, Bob Burger, Bodie Solomon, Bogdan Popa, Bruce
> Mitchener, Chris Frisz, Christian Häggström, Cullen Jennings, Daniel
> Brunner, DeathKing, Dionna Amalie Glaze, Dominik Pantůček, Evan Minsk,
> Fred Fu, Gavin Whelan, Graham Watt, Griffin Byatt, Gustavo Massaccesi,
> Göran Weinholt, Jack Firth, Jamie Taylor, Jason Felice, Jason Hemann,
> Jasper Pilgrim, Jay McCarthy, Jesse Alama, Jin-Ho King, John Clements,
> Jon Zeppieri, Juan Francisco Cantero Hurtado, Jéssica Milaré, Jörgen
> Brandt, Laurent Orseau, Leo Uino, Matthew D. Miller, Matthew Flatt,
> Matthias Felleisen, Michael Lenaghan, Mike Sperber, Mohamed Akram, Neal
> Alexander, Nick Fitzgerald, Oscar Waddell, Paulo Matos, Pavel Panchekha,
> Peter Klein, Philip McGrath, Quentin Dufour, R. Kent Dybvig, Robby
> Findler, Ryan Culpepper, Sam Tobin-Hochstadt, Shu-Hung You, Sorawee
> Porncharoenwase, Stephen Chang, Stephen De Gabrielle, Steven Watson,
> Taekyung, Ted Lemon, Thorsten Blum, Virgil Hou, William J. Bowman,
> combinatorylogic, deeglaze, evdubs, john, tokomikea, xxyzz, yjqww6, 陈梓
> 立, and 靈
> 
> 
> Feedback Welcome...
> 
> You’re awesome! Many thanks for all your hard work as part of this community!
> 
> John Clements & the Racket release team
> 
> 
> 
> -- 
> 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/d3114ac7-095a-4a54-a2cb-859ab3720ae2%40mtasv.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/81a7cbff-1ddb-4cf4-bfd2-594a3fc6dd1a%40mtasv.net.


[racket-users] Racket v7.9

2020-11-02 Thread 'John Clements' via Racket Users
Racket version 7.9 is now available from

https://racket-lang.org/


* Racket CS may become the default Racket implementation in the next
  release. If, between this release and the next, no bugs are discovered
  in Racket CS that are more serious than those typically discovered in
  Racket BC, then Racket CS will become the default for the next
  release. (Serious Racket CS bugs were found since the v7.8 release,
  but they're ever fewer and farther between.)

* Various improvements to Check Syntax arrows and
  renaming, thanks to Sorawee Porncharoenwase.

* Full support for struct type properties in Typed Racket, developed by
  Fred Fu.

* Racket CS now supports parallel garbage collection, along with
  improvements for place-local-allocation and incremental promotion.

* Unix platforms now use the XDG filesystem conventions for the
  locations of per-user configuration and library files by default, but
  legacy paths are still used where they exist already.

* Scribble improvements by Sorawee Porncharoenwase, William Bowman, and
  Shu-Hung You.

* Improvements to the plot library from Alex Harsányi and Bert De
  Ketelaere.

The following people contributed to this release:

5pyd3r, A. Green, Adam Michael, Alex Bartholomew, Alex Harsányi, Alex
Knauth, Alexander B. McLin, Alexander Shopov, Alexis King, Andrew
Mauer-Oats, Andy Keep, Ayman Osman, Barak A. Pearlmutter, Ben Greenman,
Bert De Ketelaere, Bob Burger, Bodie Solomon, Bogdan Popa, Bruce
Mitchener, Chris Frisz, Christian Häggström, Cullen Jennings, Daniel
Brunner, DeathKing, Dionna Amalie Glaze, Dominik Pantůček, Evan Minsk,
Fred Fu, Gavin Whelan, Graham Watt, Griffin Byatt, Gustavo Massaccesi,
Göran Weinholt, Jack Firth, Jamie Taylor, Jason Felice, Jason Hemann,
Jasper Pilgrim, Jay McCarthy, Jesse Alama, Jin-Ho King, John Clements,
Jon Zeppieri, Juan Francisco Cantero Hurtado, Jéssica Milaré, Jörgen
Brandt, Laurent Orseau, Leo Uino, Matthew D. Miller, Matthew Flatt,
Matthias Felleisen, Michael Lenaghan, Mike Sperber, Mohamed Akram, Neal
Alexander, Nick Fitzgerald, Oscar Waddell, Paulo Matos, Pavel Panchekha,
Peter Klein, Philip McGrath, Quentin Dufour, R. Kent Dybvig, Robby
Findler, Ryan Culpepper, Sam Tobin-Hochstadt, Shu-Hung You, Sorawee
Porncharoenwase, Stephen Chang, Stephen De Gabrielle, Steven Watson,
Taekyung, Ted Lemon, Thorsten Blum, Virgil Hou, William J. Bowman,
combinatorylogic, deeglaze, evdubs, john, tokomikea, xxyzz, yjqww6, 陈梓
立, and 靈


Feedback Welcome...

You’re awesome! Many thanks for all your hard work as part of this community!

John Clements & the Racket release team



-- 
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/d3114ac7-095a-4a54-a2cb-859ab3720ae2%40mtasv.net.


Re: [racket-users] FYI, build from HEAD fails in realloc()

2020-10-27 Thread 'John Clements' via Racket Users
FWIW, I continue to see this bug pretty much every time I forget to run git 
clean -xdf before doing a ‘make cs’.  Here’s the tail of the trace on today’s 
build:

raco setup: 4 running: /math-doc/math/scribblings/math.scrbl
raco setup: 2 running: /memoize/memoize/memoize.scrbl
raco setup: 2 running: /racket-doc/scribblings/more/more.scrbl
raco setup: 2 running: /gui-doc/mrlib/scribblings/mrlib.scrbl
raco setup: 6 running: /mysterx/scribblings/mysterx.scrbl
raco setup: 6 running: /mzcom/mzcom.scrbl
raco setup: 6 running: /compatibility-doc/mzlib/scribblings/mzlib.scrbl
raco setup: 2 running: /mzscheme-doc/mzscheme/mzscheme.scrbl
raco setup: 2 running: /net-doc/net/scribblings/net.scrbl
raco setup: 7 running: /racket-doc/openssl/openssl.scrbl
raco setup: 6 running: 
/optimization-coach/optimization-coach/scribblings/optimization-coach.scrbl
raco setup: 7 running: 
/option-contract-doc/scribblings/option-contract.scrbl
raco setup: 6 running: /net-doc/net/scribblings/osx-ssl.scrbl
raco setup: 6 running: /overeasy/overeasy.scrbl
raco setup: 6 running: /parser-tools-doc/parser-tools/parser-tools.scrbl
racket(43051,0x7f6e7000) malloc: *** error for object 0x128d5bdc8: pointer 
being realloc'd was not allocated
racket(43051,0x7f6e7000) malloc: *** set a breakpoint in malloc_error_break 
to debug
make[5]: *** [plain-in-place-setup] Abort trap: 6
make[4]: *** [cs-in-place-setup] Error 2
make[3]: *** [plain-in-place] Error 2
make[2]: *** [in-place] Error 2
make[1]: *** [cs-in-place] Error 2
make: *** [cs] Error 2
make cs  5746.10s user 1109.63s system 309% cpu 36:57.85 total

As usual, the culprit seems to be running math.scrbl.

John

> On Jun 30, 2020, at 1:49 PM, Sam Tobin-Hochstadt  wrote:
> 
> It should be fine to do both of those in the same directory.
> 
> Sam
> 
> On Tue, Jun 30, 2020 at 4:47 PM 'John Clements' via Racket Users
>  wrote:
>> 
>> D’oh!  Closing the loop on this one… it appears to me that this problem 
>> occurred after running a “make” (that is, a BC make) in a directory in which 
>> I’d been running “make cs”). I just did it again, which is how I figured it 
>> out. It’s a silly mistake on my part. It seems that running “math.scrbl” 
>> triggers the problem. Honestly, I have no idea if this is a bug or not.
>> 
>> John
>> 
>>> On Mar 23, 2020, at 04:34, Paulo Matos  wrote:
>>> 
>>> Hi John,
>>> 
>>> Has anyone already looked into this? I haven't seen this problem yet. If
>>> it's not solved, can you please open an issue?
>>> 
>>> Thanks,
>>> 
>>> Paulo Matos
>>> 
>>> 'John Clements' via Racket Users writes:
>>> 
>>>> Bang! I was wrong. Here’s another similar trace:
>>>> 
>>>> raco setup: 6 running: 
>>>> /pfds/pfds/scribblings/functional-data-structures.scrbl
>>>> raco setup: 4 running: /jbc-utils/gradeserver/gradeserver.scrbl
>>>> raco setup: 3 running: 
>>>> /htdp-doc/scribblings/htdp-langs/htdp-langs.scrbl
>>>> raco setup: 2 running: /images-doc/images/scribblings/images.scrbl
>>>> raco setup: 0 running: 
>>>> /macro-debugger/macro-debugger/macro-debugger.scrbl
>>>> raco setup: 7 running: /math-doc/math/scribblings/math.scrbl
>>>> raco setup: 5 running: /net-doc/net/scribblings/net.scrbl
>>>> raco setup: 1 running: 
>>>> /compatibility-doc/mzlib/scribblings/mzlib.scrbl
>>>> raco setup: 4 running: /racket-doc/openssl/openssl.scrbl
>>>> raco setup: 4 running: 
>>>> /optimization-coach/optimization-coach/scribblings/optimization-coach.scrbl
>>>> raco setup: 4 running: 
>>>> /option-contract-doc/scribblings/option-contract.scrbl
>>>> raco setup: 4 running: /net-doc/net/scribblings/osx-ssl.scrbl
>>>> raco setup: 5 running: /overeasy/overeasy.scrbl
>>>> raco setup: 4 running: /parsack/parsack/parsack.scrbl
>>>> raco setup: 1 running: 
>>>> /parser-tools-doc/parser-tools/parser-tools.scrbl
>>>> raco setup: 5 running: /pict-doc/pict/scribblings/pict.scrbl
>>>> raco setup: 1 running: 
>>>> /pict-snip-doc/scribblings/pict-snip/pict-snip.scrbl
>>>> raco setup: 4 running: 
>>>> /picturing-programs/picturing-programs/picturing-programs.scrbl
>>>> raco setup: 1 running: /racket-doc/pkg/scribblings/pkg.scrbl
>>>> raco setup: 4 running: /plai-doc/scribblings/plai.scrbl
>>>> raco setup: 1 running: /planet-doc/planet/planet.scrbl
>>>> raco setup: 4 running: /plot-doc/plot/scribblings/plot.scrbl
>>>> racket(54631,0x762f) malloc: *** error for object 0x12f96cdc8: 
>>>> pointer b

Re: [racket-users] garbage collection

2020-10-25 Thread 'John Clements' via Racket Users
It depends a lot on what you mean by a “Lisp-y” language. I’m certainly not 
going to disagree with the sentiments expressed in the stack overflow post that 
Dan Prager posted… after all, I wrote the top-posted one! You’re asking a 
question about persuading a co-worker, though. In my opinion, the best line of 
argument to use with people like this is that you could be trading CPU time 
against human developer time. I think it’s moderately non-controversial to 
suggest that writing code in languages without a garbage collector creates new 
opportunities for things to break, and therefore incurs a higher development 
and maintenance cost. If the software is going to be run enough, then maybe you 
can make an argument that the tradeoff is worth it. If it’s not on a critical 
path, though, then reducing development time is probably the better choice.

In my opinion, moving the discussion up one level (cost benefit analysis) 
reduces the opportunity for banging heads on the merits of garbage collection 
itself.

And, with that said, changing peoples’ minds is generally impossible.

John


> On Oct 25, 2020, at 10:10, Tim Meehan  wrote:
> 
> I'm in a very small programming operation, and I am trying to get my 
> co-workers to try out Racket, or at least tolerate some of the tools being 
> written in Racket. One of them has a very simple decision tree that he uses 
> to evaluate programming languages: "does it have a garbage collector?", if 
> yes, reject ...
> 
> It doesn't seem to be a speed thing, it seems to be that he is convinced that 
> the designers of the garbage collectors look for bad times to go to work and 
> screw up what he's doing. (You guys don't do that, right? )
> 
> It got me thinking though - is it possible to run modern Lisp-y languages 
> without a garbage collector? Is it even smart to try? I know that there must 
> be a trade off, I just didn't know enough about what was traded off to 
> explain it to him.
> 
> -- 
> 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/CACgrOxLZXa%2BLUhX4sWbdg8PtjnoiSw_yeSDMg7OoV9HSEMRweA%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/22ce3dfa-b2bb-4484-a43f-ff190461fbdb%40mtasv.net.


[racket-users] Re: [racket-dev] RacketCon is next weekend!

2020-10-09 Thread 'John Clements' via Racket Users
Just checked out the gather space. It looks very cool. How about some easter 
eggs?

John

> On Oct 9, 2020, at 7:07 AM, Jay McCarthy  wrote:
> 
> To the friends and followers of Racket,
> 
> You have produced thousands of commits since last Con. You have honored your 
> ancestors and brought glory to Racket. RacketCon is next weekend, from Friday 
> to Sunday, come and see.
> 
> https://con.racket-lang.org/
> 
> Kathi Fisler will keynote, and we will hear about distribution from Webber 
> and computation from Konrad, come and see.
> 
> https://con.racket-lang.org/
> 
> I want you to hear about Brian's web framework and Sage's dependency tracker. 
> Attend RacketCon for free and these worries will no longer trouble you. If 
> you don't watch, then you'll miss Pierce on randomness and Gustavo on type 
> recovery. You won't take part in the Racket town hall, or hear about Jesse's 
> riposte, Peter's contract generator, or Panicz's sketches. Stephen's games 
> will be less fun and Ben will shallowly type to no one but me. Come and see.
> 
> https://con.racket-lang.org/
> 
> Come and see, come and see, attendance is free, come and see:
> 
> https://con.racket-lang.org/
> 
> Tweet your friends and your bros, to please come and see.
> 
> Jay
> 
> --
> Jay McCarthy
> Associate Professor @ CS @ UMass Lowell
> http://jeapostrophe.github.io
> Vincit qui se vincit.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-dev/CAJYbDa%3DhzCXRRycZUig3rFfhzfcw-yUjxB-9aqKOWYjgXJ9gmw%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/7b8995d9-9a14-491d-8f76-c35d28343a79%40mtasv.net.


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

2020-09-15 Thread 'John Clements' via Racket Users
I have a question about the new behavior. 

(ObResearch: actually, I checked the drracket, racket, and gui repos, and I 
couldn’t find any new push, so I couldn’t check the code myself.)

Does it simply strip newlines, as Jack suggested, or does it signal an error? 
The latter seems less likely to silently cause weird problems / vulnerabilities 
/ etc.  

Also, I notice that the (current) behavior changes when there’s a branch 
specified explicitly; it seems that in this case, the URL parser happily splits 
at the hash and dumps the rest (including newlines) into the “branch” without 
any message about invalid characters. That might be an error in our URL 
parsing… or maybe URLs are allowed to have newlines in that part? That would be 
strange. Either way, I suspect that that bug (if it’s a bug) will be hidden by 
this fix.

Finally, a million thanks for fixing this; I always have students (and it 
happened again yesterday!) that run into this.

John



> On Sep 15, 2020, at 07:38, Robby Findler  wrote:
> 
> I just worry about backwards compatibility. There are probably places that 
> already do something about this problem woutside of the control-- how will 
> they interact?
> 
> Maybe if someone were to audit existing code on the pkg server then we would 
> know that changing the behavior in a certain way would work out. 
> 
> Robby 
> 
> 
> On Tue, Sep 15, 2020 at 12:46 AM Sorawee Porncharoenwase 
>  wrote:
> Can you explain why you are not sure? Under what circumstances do you think 
> the current 'single style behavior is useful? 
> 
> We can add 'single-no-return (though I dislike it because 'single means no 
> return already!) and change existing places that use 'single. However, 
> without switching the default style from 'single to 'single-no-return, people 
> will make mistakes again in the future. But if we will change the default 
> style to 'single-no-return too, why don't we simply directly change the 
> behavior 'single?
> 
> On Sun, Sep 13, 2020 at 1:36 PM Robby Findler  
> wrote:
> I'm not sure. I would probably add a 'single-no-return style and then grep 
> the codebase for places that use 'single and change them (as appropriate).
> 
> Robby
> 
> 
> On Sun, Sep 13, 2020 at 3:15 PM Sorawee Porncharoenwase 
>  wrote:
> I meant, wouldn’t it be better to fix text-field% itself, instead of only 
> some instances of it? Sorry if that was confusing.
> 
> 
> 
> 
> On Sun, Sep 13, 2020 at 1:12 PM Sorawee Porncharoenwase 
>  wrote:
> Should the fix apply to all 'single styled text-field% too?
> 
> 
> 
> 
> On Sun, Sep 13, 2020 at 7:50 AM Robby Findler  
> wrote:
> Yea, I agree. I'd made that change locally but hadn't pushed because I 
> couldn't make the bad behavior happen reliably. Perhaps that lack shouldn't 
> stop us! Pushed now.
> 
> Robby
> 
> 
> On Sat, Sep 12, 2020 at 11:15 PM jackh...@gmail.com  
> wrote:
> 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.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> 
> 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/CAL3TdON46%3DPR6_-iyppSMLsfEvNEveq3uGu64gQ3Lu1or7QgNw%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/CADcuegtFzzeErTTqi3m9Hyr%2Bu1m8YEo0cnAEw2onhKXGnTzHOg%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] Advice for beginner

2020-09-08 Thread 'John Clements' via Racket Users
Can you be more specific? Are there particular programs that you can point to? 
I think the solution to your problem is going to depend a bit on the kind of 
slowdowns that you’re seeing.

Best,

John Clements


> On Sep 7, 2020, at 05:04, Denis Maier  wrote:
> 
> 
> Hi,
> 
> I've started working with the Htdp textbook as I'd like to acquire a solid 
> foundation in (functional) programming. The approach to teaching programming 
> looks very promising. Having this ressource available online for free is 
> absolutely amazing. Thank you.
> 
> One slight annoyance I came across: I've found running code snippets with the 
> beginning languages rather slow, much slower than with `#lang racket`. Why is 
> that? Anything I could do to make that more performant? (Actually, running 
> simple racket snippets is much faster in the REPL than with DrRacket. Is 
> there a way to use the BSLs on the command line?)
> 
> Or: Could I just use work through the textbook with `#lang racket`? How 
> different is racket from the student languages? Are they subsets, i.e. will 
> everything that works in those languages also work with racket proper?
> 
> 
> All the best,
> Denis Maier
> 
> -- 
> 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/ec53a53a-bc4e-4fb1-a92a-87682cb8f731n%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/510b3f59-048e-4111-95e1-875b6601baf5%40mtasv.net.


Re: [racket-users] Racket v7.8

2020-08-04 Thread 'John Clements' via Racket Users
Yes, there is documentation for this feature! Here are two ways to get it:

1) On a machine with 7.8 installed, run `raco docs prop:struct-field-info` at 
the command line, or (equivalently) highlight the word in drracket and hit F1. 
Both of these open a web browser window pointed at your local documentation 
installation.

2) Wait a few days for the 7.8 docs to be installed at docs.racket-lang.org.

Best,

John

> On Aug 4, 2020, at 10:28, 'Joel Dueck' via Racket Users 
>  wrote:
> 
> I'm very interested in the prop:struct-field-info property. Is there any 
> documentation on it? I notice docs.racket-lang.org still says 7.7 up at the 
> top.
> 
> Thanks to everyone for this release!
> 
> On Monday, August 3, 2020 at 12:19:57 PM UTC-5 johnbclements wrote:
> This release announcement mistakenly omitted two important contributors: Tim 
> Brown, and Dionna Amalie Glaze. Many thanks for their help! 
> 
> John Clements 
> 
> > On Aug 3, 2020, at 09:35, John Clements  wrote: 
> > 
> > Racket version 7.8 is now available from 
> > 
> > https://racket-lang.org/ 
> > 
> > 
> > * Racket CS may become the default Racket implementation in the next 
> > release. With the improvements in this release, Racket CS provides all 
> > of the functionality of Racket BC (the current default 
> > implementation). If, between this release and the next, no bugs are 
> > discovered in Racket CS that are more serious than those typically 
> > discovered in Racket BC, then Racket CS will become the default for 
> > the next release. 
> > 
> > * Racket CS supports AArch32 and AArch64, including places and 
> > futures. The implementation should be considered experimental in this 
> > initial release. 
> > 
> > * Racket CS supports an "incremental" garbage-collection mode that can 
> > eliminate long GC pauses for some applications, such as animations and 
> > interactive games. 
> > 
> > * Racket CS unboxes local floating-point arithmetic (like Racket BC). 
> > 
> > * DrRacket's spell check features lower overhead and has fewer bugs. 
> > 
> > * Web Server performance under high concurrency is [better by up to an 
> > order of magnitude](https://github.com/racket/web-server/pull/94/). 
> > The Web Server is also more resistant to clients attempting to use 
> > unconstrained resources. 
> > 
> > * The math library includes the Kronecker product. 
> > 
> > * Windows supports finer granularity for `sleep` when sleeping for short 
> > periods of time, improving performance in animation. 
> > 
> > * The new prop:struct-field-info property provides static information 
> > about field names. 
> > 
> > * Debugging context in Racket CS is limited to 64,000 frames 
> > (approximately the same as Racket BC). This reduces the time taken to 
> > handle out-of-memory failures. 
> > 
> > * In `plot`, the legend font and the plot font can be controlled 
> > independently, and error-bars have an `#:invert?` option. 
> > 
> > * The plot and math libraries have new maintainers: Alex Harsányi for 
> > plot and Pavel Pancheka and Jens Axel Søgaard for math. 
> > 
> > 
> > The following people contributed to this release: 
> > 
> > Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew Kent, 
> > Andrew Mauer-Oats, Atharva Raykar, Ben Greenman, Benjamin Yeung, Bert De 
> > Ketelaere, Bogdan Popa, David Christiansen, David Florness, Diego 
> > Crespo, Fred Fu, Gary Baumgartner, Georges Dupéron, Gustavo Massaccesi, 
> > J. Ian Johnson, Jack Firth, Jay McCarthy, Jens Axel Søgaard, Jesse 
> > Alama, John Clements, Laurent Orseau, Leif Andersen, Luka Hadži-Đokić, 
> > Marc, Matthew Butterick, Matthew Flatt, Matthew Parris, Matthew Turland, 
> > Matthias Felleisen, Michael Ballantyne, Mike Sperber, Noah W M, Paulo 
> > Matos, Pavel Panchekha, Philip McGrath, Raphael Das Gupta, Reuben 
> > Thomas, Ricardo Herdt, Robby Findler, Ryan Culpepper, Sam 
> > Tobin-Hochstadt, Sancho McCann, Sorawee Porncharoenwase, Spencer 
> > Florence, Stephen De Gabrielle, Syntacticlosure, frogbird, kryptine, 
> > rsiddharth, and yurkobb 
> > 
> > Feedback Welcome 
> > 
> 
> 
> 
> 
> -- 
> 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/c5c0ad1d-d8d5-43c3-bceb-228d89e1d16fn%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/b09bd279-19b3-4c0c-b91f-0a40242eb3d5%40mtasv.net.


[racket-users] Re: Racket v7.8

2020-08-03 Thread 'John Clements' via Racket Users
This release announcement mistakenly omitted two important contributors: Tim 
Brown, and Dionna Amalie Glaze. Many thanks for their help!

John Clements

> On Aug 3, 2020, at 09:35, John Clements  wrote:
> 
> Racket version 7.8 is now available from
> 
>https://racket-lang.org/
> 
> 
> * Racket CS may become the default Racket implementation in the next
>  release. With the improvements in this release, Racket CS provides all
>  of the functionality of Racket BC (the current default
>  implementation). If, between this release and the next, no bugs are
>  discovered in Racket CS that are more serious than those typically
>  discovered in Racket BC, then Racket CS will become the default for
>  the next release.
> 
> * Racket CS supports AArch32 and AArch64, including places and
>  futures. The implementation should be considered experimental in this
>  initial release.
> 
> * Racket CS supports an "incremental" garbage-collection mode that can
>  eliminate long GC pauses for some applications, such as animations and
>  interactive games.
> 
> * Racket CS unboxes local floating-point arithmetic (like Racket BC).
> 
> * DrRacket's spell check features lower overhead and has fewer bugs.
> 
> * Web Server performance under high concurrency is [better by up to an
>  order of magnitude](https://github.com/racket/web-server/pull/94/).
>  The Web Server is also more resistant to clients attempting to use
>  unconstrained resources.
> 
> * The math library includes the Kronecker product.
> 
> * Windows supports finer granularity for `sleep` when sleeping for short
>  periods of time, improving performance in animation.
> 
> * The new prop:struct-field-info property provides static information
>  about field names.
> 
> * Debugging context in Racket CS is limited to 64,000 frames
>  (approximately the same as Racket BC). This reduces the time taken to
>  handle out-of-memory failures.
> 
> * In `plot`, the legend font and the plot font can be controlled
>  independently, and error-bars have an `#:invert?` option.
> 
> * The plot and math libraries have new maintainers: Alex Harsányi for
>  plot and Pavel Pancheka and Jens Axel Søgaard for math.
> 
> 
> The following people contributed to this release:
> 
> Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew Kent,
> Andrew Mauer-Oats, Atharva Raykar, Ben Greenman, Benjamin Yeung, Bert De
> Ketelaere, Bogdan Popa, David Christiansen, David Florness, Diego
> Crespo, Fred Fu, Gary Baumgartner, Georges Dupéron, Gustavo Massaccesi,
> J. Ian Johnson, Jack Firth, Jay McCarthy, Jens Axel Søgaard, Jesse
> Alama, John Clements, Laurent Orseau, Leif Andersen, Luka Hadži-Đokić,
> Marc, Matthew Butterick, Matthew Flatt, Matthew Parris, Matthew Turland,
> Matthias Felleisen, Michael Ballantyne, Mike Sperber, Noah W M, Paulo
> Matos, Pavel Panchekha, Philip McGrath, Raphael Das Gupta, Reuben
> Thomas, Ricardo Herdt, Robby Findler, Ryan Culpepper, Sam
> Tobin-Hochstadt, Sancho McCann, Sorawee Porncharoenwase, Spencer
> Florence, Stephen De Gabrielle, Syntacticlosure, frogbird, kryptine,
> rsiddharth, and yurkobb
> 
> Feedback Welcome
> 



-- 
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/67a075d1-a160-4fe1-a11f-137f06277127%40mtasv.net.


[racket-users] Racket v7.8

2020-08-03 Thread 'John Clements' via Racket Users
Racket version 7.8 is now available from

https://racket-lang.org/


* Racket CS may become the default Racket implementation in the next
  release. With the improvements in this release, Racket CS provides all
  of the functionality of Racket BC (the current default
  implementation). If, between this release and the next, no bugs are
  discovered in Racket CS that are more serious than those typically
  discovered in Racket BC, then Racket CS will become the default for
  the next release.

* Racket CS supports AArch32 and AArch64, including places and
  futures. The implementation should be considered experimental in this
  initial release.

* Racket CS supports an "incremental" garbage-collection mode that can
  eliminate long GC pauses for some applications, such as animations and
  interactive games.

* Racket CS unboxes local floating-point arithmetic (like Racket BC).

* DrRacket's spell check features lower overhead and has fewer bugs.

* Web Server performance under high concurrency is [better by up to an
  order of magnitude](https://github.com/racket/web-server/pull/94/).
  The Web Server is also more resistant to clients attempting to use
  unconstrained resources.

* The math library includes the Kronecker product.

* Windows supports finer granularity for `sleep` when sleeping for short
  periods of time, improving performance in animation.

* The new prop:struct-field-info property provides static information
  about field names.

* Debugging context in Racket CS is limited to 64,000 frames
  (approximately the same as Racket BC). This reduces the time taken to
  handle out-of-memory failures.

* In `plot`, the legend font and the plot font can be controlled
  independently, and error-bars have an `#:invert?` option.

* The plot and math libraries have new maintainers: Alex Harsányi for
  plot and Pavel Pancheka and Jens Axel Søgaard for math.


The following people contributed to this release:

Alex Harsányi, Alex Knauth, Alexander Shopov, Alexis King, Andrew Kent,
Andrew Mauer-Oats, Atharva Raykar, Ben Greenman, Benjamin Yeung, Bert De
Ketelaere, Bogdan Popa, David Christiansen, David Florness, Diego
Crespo, Fred Fu, Gary Baumgartner, Georges Dupéron, Gustavo Massaccesi,
J. Ian Johnson, Jack Firth, Jay McCarthy, Jens Axel Søgaard, Jesse
Alama, John Clements, Laurent Orseau, Leif Andersen, Luka Hadži-Đokić,
Marc, Matthew Butterick, Matthew Flatt, Matthew Parris, Matthew Turland,
Matthias Felleisen, Michael Ballantyne, Mike Sperber, Noah W M, Paulo
Matos, Pavel Panchekha, Philip McGrath, Raphael Das Gupta, Reuben
Thomas, Ricardo Herdt, Robby Findler, Ryan Culpepper, Sam
Tobin-Hochstadt, Sancho McCann, Sorawee Porncharoenwase, Spencer
Florence, Stephen De Gabrielle, Syntacticlosure, frogbird, kryptine,
rsiddharth, and yurkobb

Feedback Welcome



-- 
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/d8b39382-2355-49e5-b3ff-e37de39d6cb0%40mtasv.net.


Re: [racket-users] with-continuation-marks in errortrace

2020-07-27 Thread 'John Clements' via Racket Users
Let me jump in here and say a few things that maybe everyone already knows :).

The stepper’s annotation places a *ton* of annotation on a computation, and 
allows the reconstruction of the full computation. Errortrace does less, and 
provides less.

The both share a goal of allowing the programmer to see “where you are in the 
computation”, by capturing “what remains to be done in the computation”, and 
neither one tries to capture “how we got here”.

Specifically, in the (* (loop (sub1 n) n) expression, a mark on the application 
of loop is currently overwritten immediately by the mark on the body of the 
called function. In this case, the still-present mark on the multiplication is 
telling you “this multiplication still remains to be done”, but in fact you’ve 
lost important information on *which* of the subterms of the multiplication is 
currently being evaluated. In the stepper, this is essentially converted to 
a-normal form so that the mark isn’t just “the multiplication isn’t done yet” 
but rather “the second argument hasn’t yet been evaluated.”

My understanding of your proposal is that it suggests preserving the first mark 
that is associated with a continuation, rather than (or perhaps in addition to) 
the last.

I do think that this could be helpful in some situations.

I also think that the fundamental problem that you point to in the beginning 
isn’t one of what information to store, though, but rather how it’s presented. 
Specifically, the presence of the mark around the multiplication captures the 
following information: “we’re currently in a call to loop, and we’re evaluating 
either the first or second argument of this multiplication”. I’m not sure what 
a good way to present this information would be:

> in call to ‘loop’, at either (* [] n) or (* (loop (sub1 n) []).

yeah, that was terrible. Ugh. Surely someone can do better than that.

Anyhow, my point is that for the example that I believe you’re examining, the 
information you want can be extracted from the information that’s present.

I would like to acknowledge though, that that’s definitely *not* always the 
case; if you have a bunch of calls that only make tail calls, then you can 
easily lose information about how you got here. I understand that from a 
programmer’s standpoint, the question “how did we get here” may be more 
relevant than “where are we now,” and I do think that it might make sense to 
take the same approach that (IIRC) Andrew Tolmach & others took in the ML 
debugger of saving a rolling sequence of up to five marks (or six or ten or 
whatever you choose).

Put differently, I think that there is potentially a “lost information” 
situation here, but I think that if you want to preserve that information, you 
should do so by using a rolling buffer, rather than by supplementing “last 
expression” with “first expression”.

More broadly, I also think that errortrace’s display of information is probably 
not the best; I think it’s been a long time since anyone was thinking hard 
about how best to convey the errortrace information to the programmer. 
Apologies if I’m wrong about that.

AND, as always, apologies if I’m misunderstanding something important about 
your proposal!

Best,

John


> On Jul 27, 2020, at 09:26, Matthew Flatt  wrote:
> 
> At Sun, 26 Jul 2020 20:21:56 -0700, Sorawee Porncharoenwase wrote:
>> I have been toying with another way to instrument the code. It roughly
>> expands to:
>> 
>> (define-syntax-rule (wrap f)
>>  (call-with-immediate-continuation-mark
>>   'errortrace-k
>>   (λ (k)
>> (let ([ff (thunk f)])
>>   (if k
>>   (ff)
>>   (with-continuation-mark 'errortrace-k 'f
>> (ff)))
> 
> This variant probably generates faster code:
> 
> (define-syntax-rule (wrap f)
>   (call-with-immediate-continuation-mark
>'errortrace-k
>(λ (k)
>  (with-continuation-mark 'errortrace-k (or k 'f)
>f
> 
> 
>> Now, the question: why is the current errortrace implemented in that way?
>> Am I missing any downside of this new strategy? Would switching and/or
>> integrating with the new strategy be better?
> 
> I don't recall there was any careful study of the alternatives. Always
> setting the mark is easiest, and so that's probably why the current
> implementation always sets the mark. Maybe keeping the first expression
> for a frame instead of the last is consistently more useful.
> 
> At Sun, 26 Jul 2020 20:39:35 -0700, Sorawee Porncharoenwase wrote:
>> (By "integrating" with the new strategy, I meant having two keys: one for
>> the new strategy and one for the old strategy. I can see that the first
>> entry of the old strategy is useful, and it's missing in the new strategy).
> 
> Instead of a separate mark, `or` above could be replaced by some
> combinator that keeps more information in the mark value, such as a
> first and last call using a pair:
> 
> (define-syntax-rule (wrap f)
>   (call-with-immediate-continuation-mark
>'errortrace-k
>

Re: [racket-users] note about parsing speed of xml vs sxml?

2020-07-01 Thread 'John Clements' via Racket Users
Ryan, I just tested your pull request, and… it doesn’t make much difference in 
my example.

One important thing that I realize that I *totally neglected* to mention is 
that I’m running CS racket here, not BC. Based on my experiments, it appears 
that 

1) CS is much faster than BC for both xml(read-xml) and sxml (ssax:xml->sxml), 
and
2) CS speeds up sxml more dramatically.

Here are the results of running my tests with ryan’s/your PR:

pajaro2:/tmp clements> racketcs zz.rkt
cpu time: 12858 real time: 15642 gc time: 4242
ssax:warn: warning at position 150: DOCTYPE DECL plist 
http://www.apple.com/DTDs/PropertyList-1.0.dtd found and skipped
cpu time: 2157 real time: 2342 gc time: 332
pajaro2:/tmp clements> racketcs zz.rkt
cpu time: 10518 real time: 11248 gc time: 3544
ssax:warn: warning at position 150: DOCTYPE DECL plist 
http://www.apple.com/DTDs/PropertyList-1.0.dtd found and skipped
cpu time: 2183 real time: 2327 gc time: 305
pajaro2:/tmp clements> racketcs zz.rkt
cpu time: 10162 real time: 10706 gc time: 3363
ssax:warn: warning at position 150: DOCTYPE DECL plist 
http://www.apple.com/DTDs/PropertyList-1.0.dtd found and skipped
cpu time: 2188 real time: 2325 gc time: 328

(so actually, the first of these was pretty bad. … I suspect that’s a rare 
occurrence.

This broadly matches my first set of timings, which suggests that in racket CS, 
parsing an 18 Megabyte XML file generated by Apple Music “Export Library…” is 
about four times faster in sxml than in xml. 

In BC, by the way, parsing using xml takes about 14 seconds, and parsing using 
sxml takes about seven.

So really, I think maybe the on-the-side takeaway from this is this: CS is much 
faster than BC in this case.

John

> On Jun 28, 2020, at 17:30, Ryan Culpepper  wrote:
> 
> Thanks Alex for pointing out the use of list->string. I've created a PR 
> (https://github.com/racket/racket/pull/3275) that changes that code to use 
> string ports instead (similar to Hendrik's suggestion, but the string port 
> handles resizing automatically). Could someone (John?) with some large XML 
> files lying around try the changes and see if they help?
> 
> Ryan
> 
> 
> On Sun, Jun 28, 2020 at 9:56 PM Neil Van Dyke  wrote:
> If anyone wants to optimize `read-xml` for particular classes of use, 
> without changing the interface, it might be very helpful to run your 
> representative tests using the statistical profiler.
> 
> The profiler text report takes a little while of tracing through 
> manually to get a feel for how to read and use it, but it can be 
> tremendously useful, and is worth learning to do if you need performance.
> 
> After a first pass with that, you might also want to look at how costly 
> allocations/GC are, and maybe do some controlled experiments around 
> that.  For example, force a few GC cycles, run your workload under 
> profiler, check GC time during, and forced time after.  If you're 
> dealing with very large graphs coming out of the parser, I don't know 
> whether those are enough to matter with the current GC mechanism, but 
> maybe also check GC time while you're holding onto large graphs, when 
> you release them, and after they've been collected.  At some point, GC 
> gets hard for at least me to reason about, but some things make sense, 
> and other things you decide when to stop digging. :)  If you record all 
> your measurements, you can compare empirically the how different changes 
> to the code affect things, hopefully in representative situations.
> 
> I went through a lot of these exercises to optimize a large system, and 
> sped up dynamic Web page loads dramatically in the usual case (to the 
> point we were then mainly limited by PostgreSQL query cost, not much by 
> the application code in Scheme, nor our request network I/O), 
> and also greatly reduced the pain of intermittent request latency spikes 
> due to GC.
> 
> One of the hotspots, I did half a dozen very different implementations, 
> including C extension, and found an old-school pure Scheme 
> implementation was fastest.  I compared the performance of the 
> implementation using something like `shootout`, but there might be 
> better ways now in Racket. https://www.neilvandyke.org/racket/shootout/  
> I also found we could be much faster if we made a change to what the 
> algorithm guarantees, since it was more of a consistency check that 
> turned out to be very expensive and very redundant, due to all the ways 
> that utility code ended up being used.
> 
> In addition to contrived experiments, I also rigged up a runtime option 
> so that the server would save data from the statistical profiler for 
> each request a Web server handled in production.  Which was tremendously 
> useful, since it gave us real-world examples that were also difficult to 
> synthesize (e.g., complex dynamic queries), and we could go from Web 
> logs and user feedback, to exactly what happened.
> 
> (In that system I optimized, we used Oleg's SXML tools very heavily 
> 

Re: [racket-users] FYI, build from HEAD fails in realloc()

2020-06-30 Thread 'John Clements' via Racket Users
D’oh!  Closing the loop on this one… it appears to me that this problem 
occurred after running a “make” (that is, a BC make) in a directory in which 
I’d been running “make cs”). I just did it again, which is how I figured it 
out. It’s a silly mistake on my part. It seems that running “math.scrbl” 
triggers the problem. Honestly, I have no idea if this is a bug or not.

John

> On Mar 23, 2020, at 04:34, Paulo Matos  wrote:
> 
> Hi John,
> 
> Has anyone already looked into this? I haven't seen this problem yet. If
> it's not solved, can you please open an issue?
> 
> Thanks,
> 
> Paulo Matos
> 
> 'John Clements' via Racket Users writes:
> 
>> Bang! I was wrong. Here’s another similar trace:
>> 
>> raco setup: 6 running: 
>> /pfds/pfds/scribblings/functional-data-structures.scrbl
>> raco setup: 4 running: /jbc-utils/gradeserver/gradeserver.scrbl
>> raco setup: 3 running: 
>> /htdp-doc/scribblings/htdp-langs/htdp-langs.scrbl
>> raco setup: 2 running: /images-doc/images/scribblings/images.scrbl
>> raco setup: 0 running: 
>> /macro-debugger/macro-debugger/macro-debugger.scrbl
>> raco setup: 7 running: /math-doc/math/scribblings/math.scrbl
>> raco setup: 5 running: /net-doc/net/scribblings/net.scrbl
>> raco setup: 1 running: /compatibility-doc/mzlib/scribblings/mzlib.scrbl
>> raco setup: 4 running: /racket-doc/openssl/openssl.scrbl
>> raco setup: 4 running: 
>> /optimization-coach/optimization-coach/scribblings/optimization-coach.scrbl
>> raco setup: 4 running: 
>> /option-contract-doc/scribblings/option-contract.scrbl
>> raco setup: 4 running: /net-doc/net/scribblings/osx-ssl.scrbl
>> raco setup: 5 running: /overeasy/overeasy.scrbl
>> raco setup: 4 running: /parsack/parsack/parsack.scrbl
>> raco setup: 1 running: 
>> /parser-tools-doc/parser-tools/parser-tools.scrbl
>> raco setup: 5 running: /pict-doc/pict/scribblings/pict.scrbl
>> raco setup: 1 running: 
>> /pict-snip-doc/scribblings/pict-snip/pict-snip.scrbl
>> raco setup: 4 running: 
>> /picturing-programs/picturing-programs/picturing-programs.scrbl
>> raco setup: 1 running: /racket-doc/pkg/scribblings/pkg.scrbl
>> raco setup: 4 running: /plai-doc/scribblings/plai.scrbl
>> raco setup: 1 running: /planet-doc/planet/planet.scrbl
>> raco setup: 4 running: /plot-doc/plot/scribblings/plot.scrbl
>> racket(54631,0x762f) malloc: *** error for object 0x12f96cdc8: 
>> pointer being realloc'd was not allocated
>> racket(54631,0x762f) malloc: *** set a breakpoint in 
>> malloc_error_break to debug
>> make[2]: *** [in-place-setup] Abort trap: 6
>> make[1]: *** [plain-in-place] Error 2
>> make: *** [in-place] Error 2
>> make  240.77s user 75.70s system 398% cpu 1:19.32 total
>> 
>> 
>>> On Mar 20, 2020, at 3:11 PM, 'John Clements' via Racket Users 
>>>  wrote:
>>> 
>>> Here’s the tail of a build of racket HEAD that just failed during a call to 
>>> realloc(). I went back far enough to be sure I had a full record of what 
>>> was running on cores 0-7. 
>>> 
>>> I strongly suspect this is not reproducible, and I don’t think there’s any 
>>> further information that would be useful here, alas.
>>> 
>>> John
>>> 
>>> raco setup: 1 running: 
>>> /pfds/pfds/scribblings/functional-data-structures.scrbl
>>> raco setup: 0 running: 
>>> /future-visualizer/future-visualizer/scribblings/future-visualizer.scrbl
>>> raco setup: 4 running: /games/scribblings/games.scrbl
>>> raco setup: 6 running: 
>>> /racket-doc/scribblings/getting-started/getting-started.scrbl
>>> raco setup: 6 running: /games/gl-board-game/gl-board-game.scrbl
>>> raco setup: 0 running: /GLPK/glpk/glpk.scrbl
>>> raco setup: 5 running: /jbc-utils/gradeserver/gradeserver.scrbl
>>> read-compiled-linklet: version mismatch  expected: "7.6.0.17"  found: "7.6" 
>>>  in: 
>>> /Users/clements/git-clements/pkgs/jbc-utils/gradeserver/compiled/gradeserver_scrbl.zo
>>> context...:
>>>  read-linklet-or-directory
>>>  read-dispatch
>>>  read-syntax
>>>  default-load-handler
>>>  standard-module-name-resolver
>>>  module-path-index-resolve
>>>  module-declared?
>>>  /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1529:27
>>>  /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:904:0: 
>>> load-doc/ensure-prefix
>>>  /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1162:13
>>>  .../parallel-do.rkt:388:17
>>>  
>>> /Users/clem

[racket-users] Sound scrubbing with rsound

2020-06-15 Thread 'John Clements' via Racket Users
To Advait Raykar:

In response to a Slack thread about a scrubbing interface for sound playback:

Looks like you folks covered all the bases on rsound. It sounds like the 
"right" interface for this would be something that plays a file from start to 
finish but also allows you to asynchronously alter the playback point.

There are several ways to do this. There’s a way that uses the existing 
interface, and there’s a lower-level way. Hmm… actually, there are multiple 
ways, for multiple definitions of “lower-level”.

I think the right way to go here is with the “pstream” interface; it should 
allow you to queue sounds to be played, and to then change your mind and 
schedule different sounds to be played (as e.g. when the user moves a scroll 
bar). In fact, I have a pretty distinct recollection that students have 
implemented this using big-bang, and it works pretty well. Let me look …

Yes, in fact, there’s an example file called “katy-sliders” that’s a part of 
the rsound package. which does something similar. Specifically, it uses a 
slider to control the speed of playback, allowing both forward and backward 
play. This is a whole lot more computationally intensive than a scrubbing 
interface such as the one you describe, so this essentially constitutes a 
proof-of-possibility.  This example actually uses the low-level “signal” 
interface, which is required because you’re computing the samples as you go, 
rather than just queueing existing sounds. 

I should mention that there was one small issue in the “katy-sliders” example, 
calling 2htdp/image’s “text” function with a third argument of “solid”. I 
conjecture that this used to work, but that the interface has probably changed 
slightly (though the change might just be better enforcement of an existing 
contract). I’ve pushed an update to this, but you can make the change easily if 
you try running the file. Also, the file depends has a hard-coded dependency on 
a “/tmp/partygoing.wav” file, but you should be able to update this and point 
it to any wav you like.

I should also note that it looks like low-level manipulations of signed 16-bit 
numbers is either different or missing in CS racket, so for the moment, this 
code doesn’t run correctly in Racket CS.

Let me finish by suggesting a sequence of actions:

1) Convert your mp3 to a wav file.
2) Try the rsound/examples/katy-sliders.rkt file, to convince yourself that 
something like this is possible.
3) Write your own program using the pstream interface to implement a scrubber.

Let me know if you run into problems!

John Clements



-- 
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/b366520a-628b-4e8a-b8a2-e2a809e2f3ac%40mtasv.net.


Re: [racket-users] Finite state machine

2020-05-28 Thread 'John Clements' via Racket Users
Good to hear from you!

Unfortunately, it’s going to be really hard to help you without more 
information.

Can you give us some context on what your goal is, here? Is this part of a 
class? Your problem seems very under-specified.

John

> On May 27, 2020, at 8:53 PM, Med Ra  wrote:
> 
> Dear All, i'm a new member in the group and also a debutante in racket 
> programming and i will be happy if you read and understand what i'm asking .
> 
> I want create a finite state machine to represent an hotel room booking 
> system.
> 
> first , i have created the FSM Scheme as the following :
> 
> about Rooms ---> (state (available) (unavailble))
> two inputs ---> Time: T = 1 if some room will be available in the required 
> entering date in future.
>   Full Of F = 1if all the rooms are full at the moment.
> 
> I just want some help about how create this on drracket coding, And please 
> forgive my ignorance !
> 
> Thanks for attention.
> 
> 
> -- 
> 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/ee6807b0-8b02-40c1-8eeb-f41a01fa31d6%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/a6463687-9c43-4592-b0f1-a5914d47972a%40mtasv.net.


Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-26 Thread 'John Clements' via Racket Users
Okay, I could just be putting my foot in my mouth, here, but it sounds like 
you’re describing the kinds of things that are typically done by a 
type-checker. Have you considered adding a type-checking pass? It would contain 
an environment that maps names like “h1” to “types” that indicate that h1 is an 
instance of half-adder-arch.

In your case, the type checker would also be “resolving” lightweight 
expressions like (assign (h1 a) a) into fully-decorated expressions like 
(assign (port-ref half-adder h1 a) (port-ref full-adder a)) .

Does this make sense?

John


> On May 26, 2020, at 12:08 PM, Guillaume Savaton  
> wrote:
> 
> Le mardi 26 mai 2020 03:59:59 UTC+2, johnbclements a écrit :
> > So far, I have made two attempts to work around these issues: (1) by 
> > creating a metamodel-like data structure using Racket structs, and 
> > transforming syntax objects into struct instances; or (2) using syntax 
> > objects only and attaching context data to each of them as a syntax 
> > property. 
> > Both have strengths and weaknesses, and I am still feeling that I am not 
> > using Racket with the right mindset. 
> 
> I think your (2) sounds like a lighter-weight solution. However, it 
> definitely does seem as though much of the difficulty here is related to the 
> differences between a more imperative and a more functional style.
> 
> I'm not sure that solution (2) is lighter. Maybe the weight is moved to 
> another part of the implementation :)
> 
> I have set up an example at this address: 
> https://gist.github.com/senshu/c6db95615b4b2567f168d6bfbe61655e
> 
> It is basically a very stripped-down hardware description language that 
> borrows from VHDL and Verilog.
> Like VHDL, the description of a circuit is split into an "entity" (the 
> interface of the circuit) and an "architecture" (the implementation).
> For the sake of simplicity, this example does not implement a complete model 
> of computation.
> 
> The file "tiny-hdl-example-v1.rkt" implements a full adder and prints its 
> truth table.
> At this point, there is no name resolution, so I need to give redundant 
> information in the "port-ref" expressions.
> A better version of the language would allow to write:
> 
> (assign (h1 a) a)
> 
> instead of:
> 
> (assign (port-ref half-adder h1 a) (port-ref full-adder a))
> 
> because we know that
>   • h1 is an instance of half-adder-arch, that has the entity half-adder,
>   • the current architecture is full-adder-arch and its entity is 
> full-adder
> I hope it clarifies my current concerns.
> 
> Guillaume
> 
> -- 
> 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/a42ec2de-6441-483f-a05a-910c03c317e8%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/d7263942-5e70-49ac-977e-9d8a2471389c%40mtasv.net.


Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-25 Thread 'John Clements' via Racket Users
> ...

> So far, I have made two attempts to work around these issues: (1) by creating 
> a metamodel-like data structure using Racket structs, and transforming syntax 
> objects into struct instances; or (2) using syntax objects only and attaching 
> context data to each of them as a syntax property.
> Both have strengths and weaknesses, and I am still feeling that I am not 
> using Racket with the right mindset.

I think your (2) sounds like a lighter-weight solution. However, it definitely 
does seem as though much of the difficulty here is related to the differences 
between a more imperative and a more functional style. I think your idea of a 
simplified example—especially one illustrating the situations in which context 
information is required—would be an excellent idea!

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/f560d4b5-9707-4be8-8644-d41c8f249b1b%40mtasv.net.


Re: [racket-users] running Racket inside gradescope

2020-05-19 Thread 'John Clements' via Racket Users
100% yes but no. I am a long-time gradescope user, and I’ve been very happy 
with it. However, my usage has been entirely with scanned paper exams. I like 
the work that Gradescope has been doing, but I haven’t engaged with any of 
their tools beyond the paper-scanning ones, so I definitely don’t have anything 
to contribute to your work beyond tips on how best to use a paper cutter to 
remove staples from student exams. Also, the last time I checked, their 
“complete” tier was a bit rich for my blood; I would have to find a way to get 
the students to pay for it themselves if I were to seriously consider it.

John



> On May 19, 2020, at 11:42 AM, Shriram Krishnamurthi  wrote:
> 
> We expect to use Racket with Gradescope [https://www.gradescope.com/] in the 
> fall. Gradescope will run an autograder for programming assignments, using 
> this specification:
> 
> https://gradescope-autograders.readthedocs.io/en/latest/
> 
> (It's manifest as a Docker container.)
> 
> Has anyone already set up Gradescope for use in their classes? 
> 
> If so, can you share your work with us?
> 
> If not, are you a potential user?
> 
> 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/24255ddf-7b2e-4563-a45a-92ff5fa07e6c%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/94c9ceaf-fc9d-4f48-b9ea-0f87994b4232%40mtasv.net.


[racket-users] I should probably stop ignoring this internal error on startup

2020-05-05 Thread 'John Clements' via Racket Users
I think I maybe get this error every time I start up. Is this normal? I tried 
moving all prefs files aside to see if it was a configuration error, and … same 
thing.

In fact, even when I go into the three listed directories (pkgs/algol60, 
collects/racket, collects/syntax/parse/lib) and delete all the compiled/ 
directories and re-run setup, I get the same thing. Maybe this is just a known 
thing? I don’t see any references in my e-mail, or in github issues for racket 
or drracket.

This is 

Welcome to DrRacket, version 7.7.0.4--2020-05-03(-/f) [cs].
Language: No language chosen; memory limit: 128 MB.

John

Error invoking tool 
#;("tool.rkt")

instantiate-linklet: mismatch;
 reference to a variable that is uninitialized;
 possibly, bytecode file needs re-compile because dependencies changed
  name: idX43.1
  exporting instance: 
"/Users/clements/racket-cs/racket/collects/racket/dict.rkt"
  importing instance: 
"/Users/clements/racket-cs/racket/collects/syntax/parse/lib/function-header.rkt"
  context...:
   raise-arguments-error
   body of 
"/Users/clements/racket-cs/racket/collects/syntax/parse/lib/function-header.rkt"
   extract-imported-variabless
   [repeats 14 more times]
   temp35_0
   for-loop
   run-module-instance!
   for-loop
   [repeats 1 more time]
   run-module-instance!
   for-loop
   [repeats 1 more time]
   run-module-instance!
   for-loop
   [repeats 1 more time]
   run-module-instance!



-- 
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/bb891b6f-801b-44f5-ae62-83b184234748%40mtasv.net.


[racket-users] Racket v7.7

2020-05-02 Thread 'John Clements' via Racket Users
Racket version 7.7 is now available from

https://racket-lang.org/

* Racket CS remains ready for production use---thanks to those who have
  been putting it into practice to help iron out the remaining
  kinks---and it now supports a C API for embedding into other
  applications. See the "Inside: Racket" documentation for details.

* Racket CS uses a new HAMT implementation, dramatically reducing the memory
  required for immutable hash tables.

* Optimizations to the Racket CS compiler result in a code size savings
  of approximately 20%.

* GC callbacks are reliably called on major collections in Racket CS.
  Also, garbage collection is 10-20% faster.

* DrRacket can recover much more quickly from errors involving large
  stack traces.

* DrRacket now supports the use of the keyboard in the macOS Catalina
  "Open File" dialog.

* The net/http-client collection supports the 'deflate' content encoding.

* The `call-in-continuation` function (like Marc Feeley's
  `continuation-graft`) simplifies certain `call/cc` patterns by
  calling a thunk in a restored continuation.

* The `call-with-current-language` form allows more reliable tests for language
  level code.

* Use of the Cairo library can be multi-threaded.

* Improved documentation!

* Many bug fixes!

The following people contributed to this release:

Alexander Shopov, Ben Greenman, Benjamin Yeung, Brian Adkins, Brian
Wignall, Chongkai Zhu, Craig Ferry, David Florness, Fred Fu, Greg
Hendershott, Gustavo Massaccesi, Ilnar Salimzianov, Jack Firth, James
Bornholt, Jay McCarthy, Jens Axel Søgaard, Jesse Alama, John Clements,
Jon Zeppieri, Kartik Singhal, Laurent Orseau, Leo Shen, Luka
Hadži-Đokić, Matthew Butterick, Matthew Flatt, Matthias Felleisen, Mike
Sperber, Noah W M, Paulo Matos, Philip McGrath, Philippe Meunier,
Ricardo Herdt, Robby Findler, Ryan Culpepper, Sam Tobin-Hochstadt,
Sorawee Porncharoenwase, Spencer Florence, Stephen Chang,
Syntacticlosure, Thaddäus Töppen, Tom Gillespie, Xu Chunyang, ZHUO
Qingliang, kryptine, mehlon, muzimuzhi, redwyn, and Štěpán Němec

Feedback Welcome



-- 
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/10eebecc-dd92-4f39-97ce-168bfa9e7ea1%40mtasv.net.


Re: [racket-users] FrTime magic updating seconds

2020-04-28 Thread 'John Clements' via Racket Users
Wait! I got it! I forgot. It’s not hash-lang. I have to choose the language via 
the “choose language…” menu.

Sorry for the noise, folks.

John

> On Apr 28, 2020, at 3:28 PM, 'John Clements' via Racket Users 
>  wrote:
> 
> Okay, I have several things to say about Father Time.
> 
> Thing one: running through these demos (frtime/demos) is kind of astonishing. 
> There just doesn’t seem to be enough code for it to do what it’s doing. The 
> father time programs are *incredibly* concise distillations of behavior. The 
> ball-pushing demo is almost magical.
> 
> Thing two: I have a very very clear memory of being able to run a program like
> 
> #lang frtime
> 
> (current-seconds)
> 
> and seeing a changing number in the interactions window. I can’t make that 
> work now, and I’ve tried versions back to 7.3, which is the oldest one I have 
> handy that still runs on my mac. I’ve tried various combinations of (seconds) 
> and (current-seconds), running in the definitions and interactions window, 
> and none seem to work “correctly” (that is, with a changing number in the 
> interactions window). Is this something that went away a long time ago? Did I 
> ask this question already? Sigh.
> 
> 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/f8b9118d-66c7-4735-89a0-9976a307ac56%40mtasv.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/438b5489-9e00-4f9d-8977-5172bed853f4%40mtasv.net.


[racket-users] FrTime magic updating seconds

2020-04-28 Thread 'John Clements' via Racket Users
Okay, I have several things to say about Father Time.

Thing one: running through these demos (frtime/demos) is kind of astonishing. 
There just doesn’t seem to be enough code for it to do what it’s doing. The 
father time programs are *incredibly* concise distillations of behavior. The 
ball-pushing demo is almost magical.

Thing two: I have a very very clear memory of being able to run a program like

#lang frtime

(current-seconds)

and seeing a changing number in the interactions window. I can’t make that work 
now, and I’ve tried versions back to 7.3, which is the oldest one I have handy 
that still runs on my mac. I’ve tried various combinations of (seconds) and 
(current-seconds), running in the definitions and interactions window, and none 
seem to work “correctly” (that is, with a changing number in the interactions 
window). Is this something that went away a long time ago? Did I ask this 
question already? Sigh.

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/f8b9118d-66c7-4735-89a0-9976a307ac56%40mtasv.net.


Re: [racket-users] New week, new Racket! What are you folks up to?

2020-04-22 Thread 'John Clements' via Racket Users
Alongside everything else, I started exploring writing code to post GraphQL 
queries (specifically in order to interact with Canvas). The language’s syntax 
is yet another needlessly complicated approximation to s-expressions, but I do 
have some things working. Not sure if I should put together a CRAPL-licensed 
starter kit as a package.

John Clements

> On Apr 19, 2020, at 10:04 AM, Stephen De Gabrielle  
> wrote:
> 
> New week, new Racket! What are you folks up to? 
> 
> Answer here or on 
> - https://racket.slack.com/ (Sign up at https://racket-slack.herokuapp.com/ ) 
> - `#racket` IRC on freenode.net https://botbot.me/freenode/racket/ 
> - Tweet @racketlang on Twitter 
> - Racket discord https://discord.gg/6Zq8sH5 
> - [r/racket](https://www.reddit.com/r/Racket) 
> 
> Don’t forget to sign up for, and contribute to Racket News at 
> https://racket-news.com/ AND submit your links to Racket Stories 
> https://racket-stories.com/
> 
> Kind regards, 
> 
> Stephen
> 
> 
> 
> 
> -- 
> 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/07e9a208-c896-46e1-8a7e-9a94bceda393%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/01900ebd-a385-411a-9fad-0c2f9fe53e6c%40mtasv.net.


Re: [racket-users] Typed version of sxml?

2020-04-21 Thread 'John Clements' via Racket Users
Are you asking because you’d like your own code using SXML to be typed, or 
because you’d like the sxml implementation to be typed? I think another way of 
asking this is: are you worried about bugs in your code, or about bugs in 
Oleg’s code? I think that rewriting the sxml library into TR would be a lot of 
work, but developing a TR representation for sxml terms seems quite reasonable; 
of course, you’d pay the price of checking the type every time you crossed the 
boundary into sxml library code, I suppose.

John

> On Apr 21, 2020, at 2:18 PM, Hendrik Boom  wrote:
> 
> Is there a typed version of sxml?
> Its data representation would seem to be fairly easy to specify by a few 
> corecursice define-type's.
> 
> I's like to get the result of
>   (ssax:xml->sxml in '())
> as a typed value without having to waste time doing an exhaustive  
> run-time type-check on its output.  Because it *will* be OK.
> The xml file I'm dealing with is 2564178 bytes.
> 
> (I'm glad I have RAM nowadays.  The first Lisp I ever used ran on a 
> machine with 20.000 digits of memory (approx 10K in today's units).
> 
> Failing anything else I suppose I could define
>  (define-type Xml Any)
> but that seems kind of feeble.
> 
> -- 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/20200421211829.uo3ikwfwotr6zcf5%40topoi.pooq.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/b14c3ce3-c8c5-400b-83e8-1d4de2cad2da%40mtasv.net.


Re: [racket-users] visit a sequence of files

2020-04-21 Thread 'John Clements' via Racket Users
I would love that, but they’re not all in one directory. Maybe the easiest 
solution would be to write a script to temporarily move them all into one 
directory. In fact, as I think about this harder, I realize that the biggest 
problem may be that Apple’s file dialog doesn’t facilitate moving along a 
nested structure in the ways that I want, so temporarily moving them into a 
single directory is almost certainly what I want to do.

Thanks for the ideas!

Related note: it turns out that emacs has “find-dired”, which more or less does 
the same thing, by allowing you to specify a virtual “directory” as a set of 
arguments to ‘find’.

Thanks again,

John

> On Apr 21, 2020, at 1:43 PM, David Storrs  wrote:
> 
> Ah, got it.  Well, as to opening all the files, you can select them all in 
> Finder and Cmd+O.  (Presumably the equivalent works on Windows.) Can't help 
> you with the aesthetics, sorry.
> 
> On Tue, Apr 21, 2020 at 4:38 PM John Clements  
> wrote:
> Well, sure… once you open all the files. Opening all the files is the painful 
> part. Also, the display of tabs is not totally great when you have sixty or 
> seventy of them open. Sorry, it might not have been clear that I want a list 
> of sixty or seventy files.
> 
> John
> 
> > On Apr 21, 2020, at 1:34 PM, David Storrs  wrote:
> > 
> > I don't use DrRacket much, but would the normal 'previous / next window' 
> > commands work for you?  On Mac it's:
> > previous window:  Shft + Cmd + ~
> > next window: Cmd + ~ 
> > 
> > or 
> > 
> > previous window: Cmd + 
> > next window: Cmd + 
> > 
> > On Tue, Apr 21, 2020 at 4:29 PM 'John Clements' via Racket Users 
> >  wrote:
> > Here’s a question I have about both DrRacket and Emacs. It often happens in 
> > my workflow (grading files, for instance) that I want to set up a list of 
> > files, and then have an easy way to move forward or back in that list 
> > (“next file”, “previous file”). I see that emacs has a function called 
> > “next-file” which can move forward and back in a list of files apparently 
> > specified by a tags-table file; is that the easiest way to do something 
> > like this in emacs, or am I missing something obvious? In DrRacket, I’m 
> > guessing that there’s no existing functionality that would allow me to 
> > specify a list of files and move back and forth between them. I’m guessing 
> > I could implement something like this pretty easily … would this be a good 
> > job for Laurent Orseau’s Quickscript?
> > 
> > I would absolutely love to hear that I’ve missed something obvious!
> > 
> > Many thanks!
> > 
> > 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/38dfc78b-4d01-4ac1-b1cd-2e4b372c2d09%40mtasv.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/ba809078-79dc-4773-99c6-00152dcd368f%40mtasv.net.


Re: [racket-users] visit a sequence of files

2020-04-21 Thread 'John Clements' via Racket Users
Well, sure… once you open all the files. Opening all the files is the painful 
part. Also, the display of tabs is not totally great when you have sixty or 
seventy of them open. Sorry, it might not have been clear that I want a list of 
sixty or seventy files.

John

> On Apr 21, 2020, at 1:34 PM, David Storrs  wrote:
> 
> I don't use DrRacket much, but would the normal 'previous / next window' 
> commands work for you?  On Mac it's:
> previous window:  Shft + Cmd + ~
> next window: Cmd + ~ 
> 
> or 
> 
> previous window: Cmd + 
> next window: Cmd + 
> 
> On Tue, Apr 21, 2020 at 4:29 PM 'John Clements' via Racket Users 
>  wrote:
> Here’s a question I have about both DrRacket and Emacs. It often happens in 
> my workflow (grading files, for instance) that I want to set up a list of 
> files, and then have an easy way to move forward or back in that list (“next 
> file”, “previous file”). I see that emacs has a function called “next-file” 
> which can move forward and back in a list of files apparently specified by a 
> tags-table file; is that the easiest way to do something like this in emacs, 
> or am I missing something obvious? In DrRacket, I’m guessing that there’s no 
> existing functionality that would allow me to specify a list of files and 
> move back and forth between them. I’m guessing I could implement something 
> like this pretty easily … would this be a good job for Laurent Orseau’s 
> Quickscript?
> 
> I would absolutely love to hear that I’ve missed something obvious!
> 
> Many thanks!
> 
> 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/38dfc78b-4d01-4ac1-b1cd-2e4b372c2d09%40mtasv.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/dd520e71-a33f-4c47-af19-addcdce6f435%40mtasv.net.


[racket-users] visit a sequence of files

2020-04-21 Thread 'John Clements' via Racket Users
Here’s a question I have about both DrRacket and Emacs. It often happens in my 
workflow (grading files, for instance) that I want to set up a list of files, 
and then have an easy way to move forward or back in that list (“next file”, 
“previous file”). I see that emacs has a function called “next-file” which can 
move forward and back in a list of files apparently specified by a tags-table 
file; is that the easiest way to do something like this in emacs, or am I 
missing something obvious? In DrRacket, I’m guessing that there’s no existing 
functionality that would allow me to specify a list of files and move back and 
forth between them. I’m guessing I could implement something like this pretty 
easily … would this be a good job for Laurent Orseau’s Quickscript?

I would absolutely love to hear that I’ve missed something obvious!

Many thanks!

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/38dfc78b-4d01-4ac1-b1cd-2e4b372c2d09%40mtasv.net.


Re: [racket-users] New to racket, help with coursework question

2020-04-19 Thread 'John Clements' via Racket Users
First off: you’re very close.

Thing two: I think you need a clearer comment on the meaning of the “months” 
vector. Your description does not actually say what the vector represents or 
contains.

Thing three: Here’s my question to you. Suppose that I tell you a year and a 
month and the result of (vector-ref months x). 

To be more concrete, suppose I tell you the year is 2234 and the month is 4 and 
the result of (vector-ref months x) is 30. How many days would that month have? 
Can you explain how to compute the answer for each of the test cases below?

John Clements

> On Apr 19, 2020, at 11:50, Suz Renae  wrote:
> 
> I am new to racket (first year student) and since class has been pushed to 
> online only, I am having a harder time.
> 
> We are currently working on vectors and hash tables. I feel like I keep 
> overthinking it and keep getting stuck. I know that the first parameter in 
> the function will be the year and the second will be the (vector-ref months 
> x)that I pull from the defined vector.
> 
> The question I am having a hard time with and what I have actually done below.
> 
> Create a function that calculates the number of days in a month given a year 
> and a month
>   • Call the function number-of-days-in-month, and it's signature is 
> number, number -> number
>   • Example:
> (number-days-in-month 2016 1) -> 31
> (number-days-in-month 2016 11) -> 30
> (number-days-in-month 2016 12) -> 31
> (number-days-in-month 1900 2) -> 28
> (number-days-in-month 2000 2) -> 29
> (number-days-in-month 2016 2) -> 29
> (number-days-in-month 2200 2) -> 28
> What I have so far...
> 
> ;Leap Year
> (define (leap-year? year)
>   (and (zero? (modulo year 4))
>(or (not (zero? (modulo year 100)))
>   (zero? (modulo year 400))
>   )
>)
>   )
> 
> ;Months with days vector, beginning at an index of 0 since there is not 0th 
> month
> (define months (vector 0 31 28 31 30 31 30 31 31 30 31 30 31))
> 
> (check-expect(number-days-in-month 2016 1)31)
> (check-expect(number-days-in-month 2016 11)30)
> (check-expect(number-days-in-month 2016 12)31)
> (check-expect(number-days-in-month 1900 2)28)
> (check-expect(number-days-in-month 2000 2)29)
> (check-expect(number-days-in-month 2016 2)29)
> (check-expect(number-days-in-month 2200 2)28)
> 
> I  need help with building the actual function and what conditionals I should 
> be using.
> 
> (define (number-days-in month ?? ??)
> (cond
>  [
> 
> -- 
> 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/5d017eef-b235-4a8b-94fa-fe1e3f7b766e%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/02cda61a-5bea-4087-8518-e4a44d4dfa56%40mtasv.net.


[racket-users] http basic auth needed for github

2020-04-01 Thread 'John Clements' via Racket Users
Relevance: our build scripts make automated queries to GitHub.

Historically, GitHub has allowed authentication using query parameters; both a 
user token and a client user/password pair could be specified as part of the 
URL. It now appears that this is being deprecated, per

https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

My research suggests that both styles (token and client-user/pwd) essentially 
consist in adding a line to the headers. In the case of an api token, it 
appears to be a line of the form

Authorization: token 

I’ve tested this one, and it appears to work.

The other style of authentication (client auth) appears to use RFC 2617-style 
“basic” authentication. My reading of the RFC suggests that this essentially 
also consists of a request header line, of the form

Authorization: Basic 

… where the userid and password are appended with a colon and the base64 
encoded (and yes, everything breaks if you have a colon in your userid).

This one I haven’t implemented yet, I’m planning to come back when I need it 
(probably next week).

In the meantime, though, I thought I’d ask whether you two (or any of the rest 
of you) have recently made this adaptation, and can tell me about terrible 
mistakes that I’ve already made or am about to make.

Thanks!

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/6f823d16-45f2-424d-bbc0-7c2ad11f04e7%40mtasv.net.


Re: [racket-users] auto-indentation... off by one^H^H^Hsome?

2020-03-21 Thread 'John Clements' via Racket Users
Many thanks! Should I cancel my pull request?

John

> On Mar 21, 2020, at 18:34, Robby Findler  wrote:
> 
> I've pushed something so that racket:text% will indent better when it
> doesn't have a display.
> 
> Robby
> 
> On Fri, Mar 20, 2020 at 4:32 PM John Clements  
> wrote:
>> 
>> Made a pull request, many thanks!
>> 
>> John
>> 
>>> On Mar 20, 2020, at 1:36 PM, Robby Findler  
>>> wrote:
>>> 
>>> Looks right to me!
>>> 
>>> On Fri, Mar 20, 2020 at 3:26 PM John Clements  
>>> wrote:
>>> Could I add a note like this to the docs for the indentation function?
>>> 
>>> “NB: indentation results depend on the graphical context associated with 
>>> the object; it may be necessary to associate the object with an 
>>> editor-canvas and frame in order to get the expected results."
>>> 
>>> That text might not actually be accurate…
>>> 
>>> John
>>> 
 On Mar 20, 2020, at 1:16 PM, John Clements  
 wrote:
 
 Ah! this solves the issue. many thanks.
 
> On Mar 20, 2020, at 1:03 PM, Robby Findler  
> wrote:
> 
> Looks like you need a display or the text gets confused about how big
> (in pixels) characters really are:
> 
> #lang racket/gui
> (require framework)
> (define f (new frame% [label ""]))
> (define t (new racket:text%))
> (define ec (new editor-canvas% [parent f] [editor t]))
> (send t insert "(+3\n4)")
> (send t freeze-colorer)
> (send t tabify-all)
> (display (send t get-text))
> 
> On Fri, Mar 20, 2020 at 2:12 PM John Clements  
> wrote:
>> 
>> That actually solves a bunch of problems for me… but strangely, not the 
>> initial one. If, for instance, I tabify
>> 
>> (+  3
>> 4)
>> 
>> using the tabify-all method, the line with the four gets an indentation 
>> of 2, not 8. This is definitely different from DrRacket’s behavior.
>> 
>> Any idea how to fix this?
>> 
>> (cc:ing racket-users without permission, hope that’s okay?)
>> 
>> John
>> 
>> 
>>> On Mar 20, 2020, at 12:05 PM, John Clements  
>>> wrote:
>>> 
>>> Ah! That’s probably a better solution, I’ll just do that. I searched 
>>> for “indent”, should I try to add that as a search term for the 
>>> “tabify-all” method?
>>> 
>>> Many thanks!
>>> 
>>> (Also, sending mail to the list using “us...@racket-lang.org” seems to 
>>> be broken right now for me, sigh.)
>>> 
>>> John
>>> 
 On Mar 20, 2020, at 12:01 PM, Robby Findler 
  wrote:
 
 I'm not sure of the details but did you consider just inserting it
 into a racket:text% and then calling the tabify-all method?
 
 Robby
 
 On Fri, Mar 20, 2020 at 1:26 PM John Clements 
  wrote:
> 
> Hmm… followup problem. If I try to indent the string “#|\nabc\n|#” 
> (that is, a block comment), the compute-racket-amount-to-indent 
> method returns #f. Is this a bug, or just undocumented behavior?
> 
> John
> 
>> On Mar 20, 2020, at 10:41 AM, John Clements 
>>  wrote:
>> 
>> I’m writing code to help me grade exams, and one of the issues I’ve 
>> run into is that the code coming out of the LMS is all totally 
>> unindented. So, for instance, a student’s response might read:
>> 
>> ;Closures help a function value remember what substitutions have 
>> already been applied to it.
>> '{vars {{x {lam {x} {+ 1 x}}}
>> {y {lam {y} {+ 3 y
>> {+ {x 2} {y 4}}}
>> 
>> Obviously, it would be a lot easier to grade that if it was indented.
>> 
>> Excellent! A chance to whip up a quick-and-dirty auto-indenter, 
>> using DrRacket’s indentation framework. Specifically, the 
>> `compute-racket-amount-to-indent` method of racket:text<%>.
>> 
>> I’m pleased to report almost total success, aside from one strange 
>> off-by-one error that I’m looking for help with.  To see it, here’s 
>> the result of my auto-indenter on the prior block:
>> 
>> '{vars {{x {lam {x} {+ 1 x}}}
>>   {y {lam {y} {+ 3 y
>> {+ {x 2} {y 4}}}
>> 
>> (if you’re viewing this in a proportional-width font, that’s going 
>> to look terrible, sorry.)
>> 
>> The issue is that the final plus line isn’t lined up with the 
>> curly-brace that’s two chars after the end of `vars`… instead, it’s 
>> one character to the left.
>> 
>> A much simpler test case is simply running on “(+ 3\n4)”. Rather 
>> than getting the 4 lined up with the 3, I get it one character to 
>> the left.
>> 
>> And… uh oh. A more illuminating test case occurs when I run my code 
>> on “(+  3\n4)”. That is, I put a bunch more 

Re: [racket-users] trace facility in Racket?

2020-03-21 Thread 'John Clements' via Racket Users
Right, sorry, I should have added… doing *that* (eliminating the traces for 
production code) is almost trivial: just make a macro that’s defined to 
disappear when a flag is set:

#lang racket

(define-for-syntax production-flag #f)

(define-syntax (debug-only stx)
  (syntax-case stx ()
[(_ expr)
 (if production-flag
 #'(void)
 #'expr)]))


(define (fact f)
  (if (= f 0)
  1
  (begin
(debug-only (printf "hello!\n"))
(* f (fact (- f 1))

(fact 6)

The hard part is building UI tools to manipulate and insert these things 
without any changes to the code at all.

John


> On Mar 21, 2020, at 11:36 AM, Nicholas Papadonis 
>  wrote:
> 
> Thanks, you answered my question.  I’m educating myself in ways to debug 
> Scheme, coming from an imperative background.  
> 
> I suspect the solution would be to leave the trace statements in and use a 
> conditional when delivering production code.
> 
> 
>> On Mar 21, 2020, at 2:27 PM, John Clements  wrote:
>> 
>> It sounds like you’re looking for a way to have the trace inserted for you 
>> by a debugging tool, so you don’t have to remember to take it out again 
>> later. This wouldn’t be hard to do, but (as far as I know) no one’s taken 
>> the time to do it.
>> 
>> John
>> 
>>> On Mar 21, 2020, at 8:43 AM, Nicholas Papadonis 
>>>  wrote:
>>> 
>>> I was successful with MIT Scheme placing (trace proc) inside the closure of 
>>> this code.  Placing (trace proc) outside the closure did not have any 
>>> effect.
>>> 
>>> This is the question I'm asking.  Is it possible to trace without modifying 
>>> the closure?
>>> 
>>> I ask due to forward thinking about software engineering practices and 
>>> modifying code (although it could be argued in C a preprocessor block could 
>>> be placed to compile in or out conditional macros blocks).
>>> 
>>> Thanks again
>>> 
>>> On Sat, Mar 21, 2020 at 11:24 AM Ben Greenman  
>>> wrote:
>>> On 3/21/20, dgtlcmo  wrote:
 Does anyone know how to trace functions inside a closure?  I would like to
 trace hanoi-move, however find that with MIT Scheme I need to place (trace)
 
 within the closure (hanoi n), otherwise the trace will not occur.
 
 Can a trace like this be performed in Racket?
 
 Thanks
 
 (define (hanoi n)
 (define (pmd from to)
   (display "Move ")
   (display from)
   (display " to ")
   (display to)
   (newline)
   '())
 (define (hanoi-move n from to spare)
   (cond ((= n 0) '())
 ((= n 1) (pmd from to))
 (else
 (hanoi-move (- n 1) from spare to)
 (hanoi-move 1 from to spare)
 (hanoi-move (- n 1) spare to from
 (hanoi-move n "A" "B" "C"))
>>> 
>>> Yes, Racket has trace tools:
>>> https://docs.racket-lang.org/reference/debugging.html
>>> 
>>> Try adding (trace hanoi) before the call to (hanoi-move ) at the bottom
>>> 
>>> -- 
>>> 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/CAKD0t1%2Bn_W7%3Dc7%3D_KAcFuJQrFo86JBx8uGJuBfXY%2BgZrDFKHWg%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/fbf7ed4c-1373-495c-b951-575c3cf7e61f%40mtasv.net.


Re: [racket-users] trace facility in Racket?

2020-03-21 Thread 'John Clements' via Racket Users
It sounds like you’re looking for a way to have the trace inserted for you by a 
debugging tool, so you don’t have to remember to take it out again later. This 
wouldn’t be hard to do, but (as far as I know) no one’s taken the time to do it.

John

> On Mar 21, 2020, at 8:43 AM, Nicholas Papadonis  
> wrote:
> 
> I was successful with MIT Scheme placing (trace proc) inside the closure of 
> this code.  Placing (trace proc) outside the closure did not have any effect.
> 
> This is the question I'm asking.  Is it possible to trace without modifying 
> the closure?
> 
> I ask due to forward thinking about software engineering practices and 
> modifying code (although it could be argued in C a preprocessor block could 
> be placed to compile in or out conditional macros blocks).
> 
> Thanks again
> 
> On Sat, Mar 21, 2020 at 11:24 AM Ben Greenman  
> wrote:
> On 3/21/20, dgtlcmo  wrote:
> > Does anyone know how to trace functions inside a closure?  I would like to
> > trace hanoi-move, however find that with MIT Scheme I need to place (trace)
> >
> > within the closure (hanoi n), otherwise the trace will not occur.
> >
> > Can a trace like this be performed in Racket?
> >
> > Thanks
> >
> >  (define (hanoi n)
> >   (define (pmd from to)
> > (display "Move ")
> > (display from)
> > (display " to ")
> > (display to)
> > (newline)
> > '())
> >   (define (hanoi-move n from to spare)
> > (cond ((= n 0) '())
> >  ((= n 1) (pmd from to))
> >  (else
> >   (hanoi-move (- n 1) from spare to)
> >   (hanoi-move 1 from to spare)
> >   (hanoi-move (- n 1) spare to from
> >   (hanoi-move n "A" "B" "C"))
> 
> Yes, Racket has trace tools:
> https://docs.racket-lang.org/reference/debugging.html
> 
> Try adding (trace hanoi) before the call to (hanoi-move ) at the bottom
> 
> -- 
> 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/CAKD0t1%2Bn_W7%3Dc7%3D_KAcFuJQrFo86JBx8uGJuBfXY%2BgZrDFKHWg%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/9c7a5a9d-c664-4dfe-8d86-02958035baa4%40mtasv.net.


Re: [racket-users] FYI, build from HEAD fails in realloc()

2020-03-20 Thread 'John Clements' via Racket Users
Bang! I was wrong. Here’s another similar trace:

raco setup: 6 running: 
/pfds/pfds/scribblings/functional-data-structures.scrbl
raco setup: 4 running: /jbc-utils/gradeserver/gradeserver.scrbl
raco setup: 3 running: /htdp-doc/scribblings/htdp-langs/htdp-langs.scrbl
raco setup: 2 running: /images-doc/images/scribblings/images.scrbl
raco setup: 0 running: /macro-debugger/macro-debugger/macro-debugger.scrbl
raco setup: 7 running: /math-doc/math/scribblings/math.scrbl
raco setup: 5 running: /net-doc/net/scribblings/net.scrbl
raco setup: 1 running: /compatibility-doc/mzlib/scribblings/mzlib.scrbl
raco setup: 4 running: /racket-doc/openssl/openssl.scrbl
raco setup: 4 running: 
/optimization-coach/optimization-coach/scribblings/optimization-coach.scrbl
raco setup: 4 running: 
/option-contract-doc/scribblings/option-contract.scrbl
raco setup: 4 running: /net-doc/net/scribblings/osx-ssl.scrbl
raco setup: 5 running: /overeasy/overeasy.scrbl
raco setup: 4 running: /parsack/parsack/parsack.scrbl
raco setup: 1 running: /parser-tools-doc/parser-tools/parser-tools.scrbl
raco setup: 5 running: /pict-doc/pict/scribblings/pict.scrbl
raco setup: 1 running: 
/pict-snip-doc/scribblings/pict-snip/pict-snip.scrbl
raco setup: 4 running: 
/picturing-programs/picturing-programs/picturing-programs.scrbl
raco setup: 1 running: /racket-doc/pkg/scribblings/pkg.scrbl
raco setup: 4 running: /plai-doc/scribblings/plai.scrbl
raco setup: 1 running: /planet-doc/planet/planet.scrbl
raco setup: 4 running: /plot-doc/plot/scribblings/plot.scrbl
racket(54631,0x762f) malloc: *** error for object 0x12f96cdc8: pointer 
being realloc'd was not allocated
racket(54631,0x762f) malloc: *** set a breakpoint in malloc_error_break 
to debug
make[2]: *** [in-place-setup] Abort trap: 6
make[1]: *** [plain-in-place] Error 2
make: *** [in-place] Error 2
make  240.77s user 75.70s system 398% cpu 1:19.32 total


> On Mar 20, 2020, at 3:11 PM, 'John Clements' via Racket Users 
>  wrote:
> 
> Here’s the tail of a build of racket HEAD that just failed during a call to 
> realloc(). I went back far enough to be sure I had a full record of what was 
> running on cores 0-7. 
> 
> I strongly suspect this is not reproducible, and I don’t think there’s any 
> further information that would be useful here, alas.
> 
> John
> 
> raco setup: 1 running: 
> /pfds/pfds/scribblings/functional-data-structures.scrbl
> raco setup: 0 running: 
> /future-visualizer/future-visualizer/scribblings/future-visualizer.scrbl
> raco setup: 4 running: /games/scribblings/games.scrbl
> raco setup: 6 running: 
> /racket-doc/scribblings/getting-started/getting-started.scrbl
> raco setup: 6 running: /games/gl-board-game/gl-board-game.scrbl
> raco setup: 0 running: /GLPK/glpk/glpk.scrbl
> raco setup: 5 running: /jbc-utils/gradeserver/gradeserver.scrbl
> read-compiled-linklet: version mismatch  expected: "7.6.0.17"  found: "7.6"  
> in: 
> /Users/clements/git-clements/pkgs/jbc-utils/gradeserver/compiled/gradeserver_scrbl.zo
>  context...:
>   read-linklet-or-directory
>   read-dispatch
>   read-syntax
>   default-load-handler
>   standard-module-name-resolver
>   module-path-index-resolve
>   module-declared?
>   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1529:27
>   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:904:0: 
> load-doc/ensure-prefix
>   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1162:13
>   .../parallel-do.rkt:388:17
>   
> /Users/clements/racket/racket/collects/setup/../racket/private/more-scheme.rkt:261:28
>   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:441:20: loop
> 
>  context...:
>   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:332:4: 
> work-done method in list-queue%
>   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:282:17
>   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:236:4
>   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:138:0: 
> setup-scribblings
>   /Users/clements/racket/racket/collects/setup/setup-core.rkt:72:0: setup-core
>   "/Users/clements/racket/racket/collects/setup/main.rkt": [running body]
>   temp35_0
>   for-loop
>   run-module-instance!
>   "/Users/clements/racket/racket/collects/raco/main.rkt": [running body]
>   temp35_0
>   for-loop
>   run-module-instance!
>   perform-require!
> raco setup: 5 running: /graph-doc/graph/scribblings/graph.scrbl
> raco setup: 4 running: /htdp-doc/graphics/scribblings/graphics.scrbl
> raco setup: 6 running: /gregor-doc/gregor/scribblings/gregor.scrbl
> raco setup: 2 running: /gui-doc/scribblings/gui/gui.scrbl
> raco setup: 0 running: 
> /handin/handin-server/scribblings/handin-server.scrbl
> raco setup: 4 running: /racket-doc/help/help.scrbl
> raco s

[racket-users] FYI, build from HEAD fails in realloc()

2020-03-20 Thread 'John Clements' via Racket Users
Here’s the tail of a build of racket HEAD that just failed during a call to 
realloc(). I went back far enough to be sure I had a full record of what was 
running on cores 0-7. 

I strongly suspect this is not reproducible, and I don’t think there’s any 
further information that would be useful here, alas.

John

raco setup: 1 running: 
/pfds/pfds/scribblings/functional-data-structures.scrbl
raco setup: 0 running: 
/future-visualizer/future-visualizer/scribblings/future-visualizer.scrbl
raco setup: 4 running: /games/scribblings/games.scrbl
raco setup: 6 running: 
/racket-doc/scribblings/getting-started/getting-started.scrbl
raco setup: 6 running: /games/gl-board-game/gl-board-game.scrbl
raco setup: 0 running: /GLPK/glpk/glpk.scrbl
raco setup: 5 running: /jbc-utils/gradeserver/gradeserver.scrbl
read-compiled-linklet: version mismatch  expected: "7.6.0.17"  found: "7.6"  
in: 
/Users/clements/git-clements/pkgs/jbc-utils/gradeserver/compiled/gradeserver_scrbl.zo
  context...:
   read-linklet-or-directory
   read-dispatch
   read-syntax
   default-load-handler
   standard-module-name-resolver
   module-path-index-resolve
   module-declared?
   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1529:27
   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:904:0: 
load-doc/ensure-prefix
   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:1162:13
   .../parallel-do.rkt:388:17
   
/Users/clements/racket/racket/collects/setup/../racket/private/more-scheme.rkt:261:28
   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:441:20: loop

  context...:
   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:332:4: 
work-done method in list-queue%
   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:282:17
   /Users/clements/racket/racket/collects/setup/parallel-do.rkt:236:4
   /Users/clements/racket/pkgs/racket-index/setup/scribble.rkt:138:0: 
setup-scribblings
   /Users/clements/racket/racket/collects/setup/setup-core.rkt:72:0: setup-core
   "/Users/clements/racket/racket/collects/setup/main.rkt": [running body]
   temp35_0
   for-loop
   run-module-instance!
   "/Users/clements/racket/racket/collects/raco/main.rkt": [running body]
   temp35_0
   for-loop
   run-module-instance!
   perform-require!
raco setup: 5 running: /graph-doc/graph/scribblings/graph.scrbl
raco setup: 4 running: /htdp-doc/graphics/scribblings/graphics.scrbl
raco setup: 6 running: /gregor-doc/gregor/scribblings/gregor.scrbl
raco setup: 2 running: /gui-doc/scribblings/gui/gui.scrbl
raco setup: 0 running: 
/handin/handin-server/scribblings/handin-server.scrbl
raco setup: 4 running: /racket-doc/help/help.scrbl
raco setup: 4 running: /htdp-doc/htdp/htdp.scrbl
raco setup: 0 running: /htdp-doc/scribblings/htdp-langs/htdp-langs.scrbl
raco setup: 5 running: /htdp-doc/scribblings/htdp-langs/htdp-ptr.scrbl
raco setup: 5 running: /html-doc/html/html.scrbl
raco setup: 4 running: /html-parsing/html-parsing.scrbl
raco setup: 4 running: /http/http/http.scrbl
raco setup: 5 running: /images-doc/images/scribblings/images.scrbl
raco setup: 4 running: /racket-doc/scribblings/inside/inside.scrbl
raco setup: 3 running: /racket-doc/json/json.scrbl
raco setup: 3 running: /latex-pict/latex-pict/scribblings/latex-pict.scrbl
raco setup: 3 running: /lazy/lazy.scrbl
raco setup: 4 running: /levenshtein/levenshtein.scrbl
raco setup: 4 running: /racket-index/scribblings/main/license.scrbl
raco setup: 4 running: 
/racket-index/scribblings/main/user/local-redirect.scrbl
raco setup: 3 running: /macro-debugger/macro-debugger/macro-debugger.scrbl
raco setup: 4 running: /make/make.scrbl
raco setup: 6 running: /markdown/markdown/markdown.scrbl
raco setup: 4 running: /math-doc/math/scribblings/math.scrbl
raco setup: 6 running: /mcfly/mcfly.scrbl
raco setup: 6 running: /memoize/memoize/memoize.scrbl
raco setup: 6 running: /molis-hai/molis-hai/molis-hai.scrbl
raco setup: 7 running: /racket-doc/scribblings/more/more.scrbl
raco setup: 6 running: /gui-doc/mrlib/scribblings/mrlib.scrbl
raco setup: 2 running: /mysterx/scribblings/mysterx.scrbl
raco setup: 2 running: /mzcom/mzcom.scrbl
raco setup: 7 running: /compatibility-doc/mzlib/scribblings/mzlib.scrbl
raco setup: 2 running: /mzscheme-doc/mzscheme/mzscheme.scrbl
raco setup: 2 running: /net-doc/net/scribblings/net.scrbl
raco setup: 6 running: /racket-doc/openssl/openssl.scrbl
racket(52764,0x7ab17000) malloc: *** error for object 0x1735d8dc8: pointer 
being realloc'd was not allocated
racket(52764,0x7ab17000) malloc: *** set a breakpoint in malloc_error_break 
to debug
make[2]: *** [in-place-setup] Abort trap: 6
make[1]: *** [plain-in-place] Error 2
make: *** [in-place] Error 2
make  4947.41s user 1268.91s system 356% cpu 29:03.26 total


raco setup: 2 running: /mysterx/scribblings/mysterx.scrbl
raco setup: 2 running: /mzcom/mzcom.scrbl
raco setup: 7 running: /compatibility-doc/mzlib/scribblings/mzlib.scrbl
raco setup: 2 running: /mzscheme-doc/mzscheme/mzscheme.scrbl
raco setup: 

Re: [racket-users] auto-indentation... off by one^H^H^Hsome?

2020-03-20 Thread 'John Clements' via Racket Users
Made a pull request, many thanks!

John

> On Mar 20, 2020, at 1:36 PM, Robby Findler  wrote:
> 
> Looks right to me!
> 
> On Fri, Mar 20, 2020 at 3:26 PM John Clements  
> wrote:
> Could I add a note like this to the docs for the indentation function?
> 
> “NB: indentation results depend on the graphical context associated with the 
> object; it may be necessary to associate the object with an editor-canvas and 
> frame in order to get the expected results."
> 
> That text might not actually be accurate…
> 
> John
> 
> > On Mar 20, 2020, at 1:16 PM, John Clements  
> > wrote:
> > 
> > Ah! this solves the issue. many thanks.
> > 
> >> On Mar 20, 2020, at 1:03 PM, Robby Findler  
> >> wrote:
> >> 
> >> Looks like you need a display or the text gets confused about how big
> >> (in pixels) characters really are:
> >> 
> >> #lang racket/gui
> >> (require framework)
> >> (define f (new frame% [label ""]))
> >> (define t (new racket:text%))
> >> (define ec (new editor-canvas% [parent f] [editor t]))
> >> (send t insert "(+3\n4)")
> >> (send t freeze-colorer)
> >> (send t tabify-all)
> >> (display (send t get-text))
> >> 
> >> On Fri, Mar 20, 2020 at 2:12 PM John Clements  
> >> wrote:
> >>> 
> >>> That actually solves a bunch of problems for me… but strangely, not the 
> >>> initial one. If, for instance, I tabify
> >>> 
> >>> (+  3
> >>> 4)
> >>> 
> >>> using the tabify-all method, the line with the four gets an indentation 
> >>> of 2, not 8. This is definitely different from DrRacket’s behavior.
> >>> 
> >>> Any idea how to fix this?
> >>> 
> >>> (cc:ing racket-users without permission, hope that’s okay?)
> >>> 
> >>> John
> >>> 
> >>> 
>  On Mar 20, 2020, at 12:05 PM, John Clements  
>  wrote:
>  
>  Ah! That’s probably a better solution, I’ll just do that. I searched for 
>  “indent”, should I try to add that as a search term for the “tabify-all” 
>  method?
>  
>  Many thanks!
>  
>  (Also, sending mail to the list using “us...@racket-lang.org” seems to 
>  be broken right now for me, sigh.)
>  
>  John
>  
> > On Mar 20, 2020, at 12:01 PM, Robby Findler  
> > wrote:
> > 
> > I'm not sure of the details but did you consider just inserting it
> > into a racket:text% and then calling the tabify-all method?
> > 
> > Robby
> > 
> > On Fri, Mar 20, 2020 at 1:26 PM John Clements 
> >  wrote:
> >> 
> >> Hmm… followup problem. If I try to indent the string “#|\nabc\n|#” 
> >> (that is, a block comment), the compute-racket-amount-to-indent method 
> >> returns #f. Is this a bug, or just undocumented behavior?
> >> 
> >> John
> >> 
> >>> On Mar 20, 2020, at 10:41 AM, John Clements 
> >>>  wrote:
> >>> 
> >>> I’m writing code to help me grade exams, and one of the issues I’ve 
> >>> run into is that the code coming out of the LMS is all totally 
> >>> unindented. So, for instance, a student’s response might read:
> >>> 
> >>> ;Closures help a function value remember what substitutions have 
> >>> already been applied to it.
> >>> '{vars {{x {lam {x} {+ 1 x}}}
> >>> {y {lam {y} {+ 3 y
> >>> {+ {x 2} {y 4}}}
> >>> 
> >>> Obviously, it would be a lot easier to grade that if it was indented.
> >>> 
> >>> Excellent! A chance to whip up a quick-and-dirty auto-indenter, using 
> >>> DrRacket’s indentation framework. Specifically, the 
> >>> `compute-racket-amount-to-indent` method of racket:text<%>.
> >>> 
> >>> I’m pleased to report almost total success, aside from one strange 
> >>> off-by-one error that I’m looking for help with.  To see it, here’s 
> >>> the result of my auto-indenter on the prior block:
> >>> 
> >>> '{vars {{x {lam {x} {+ 1 x}}}
> >>>{y {lam {y} {+ 3 y
> >>>  {+ {x 2} {y 4}}}
> >>> 
> >>> (if you’re viewing this in a proportional-width font, that’s going to 
> >>> look terrible, sorry.)
> >>> 
> >>> The issue is that the final plus line isn’t lined up with the 
> >>> curly-brace that’s two chars after the end of `vars`… instead, it’s 
> >>> one character to the left.
> >>> 
> >>> A much simpler test case is simply running on “(+ 3\n4)”. Rather than 
> >>> getting the 4 lined up with the 3, I get it one character to the left.
> >>> 
> >>> And… uh oh. A more illuminating test case occurs when I run my code 
> >>> on “(+  3\n4)”. That is, I put a bunch more spaces before the 3. 
> >>> After indentation, the 4 is still only indented by two characters. So 
> >>> it looks like the `compute-racket-amount-to-indent` method is not 
> >>> looking for the token following the first one following the paren in 
> >>> the prior line (which would account for all the spaces), but just 
> >>> adding one to the last position of the first token following the 
> >>> paren. This makes me wonder 

Re: [racket-users] auto-indentation... off by one^H^H^Hsome?

2020-03-20 Thread 'John Clements' via Racket Users
Could I add a note like this to the docs for the indentation function?

“NB: indentation results depend on the graphical context associated with the 
object; it may be necessary to associate the object with an editor-canvas and 
frame in order to get the expected results."

That text might not actually be accurate…

John

> On Mar 20, 2020, at 1:16 PM, John Clements  wrote:
> 
> Ah! this solves the issue. many thanks.
> 
>> On Mar 20, 2020, at 1:03 PM, Robby Findler  wrote:
>> 
>> Looks like you need a display or the text gets confused about how big
>> (in pixels) characters really are:
>> 
>> #lang racket/gui
>> (require framework)
>> (define f (new frame% [label ""]))
>> (define t (new racket:text%))
>> (define ec (new editor-canvas% [parent f] [editor t]))
>> (send t insert "(+3\n4)")
>> (send t freeze-colorer)
>> (send t tabify-all)
>> (display (send t get-text))
>> 
>> On Fri, Mar 20, 2020 at 2:12 PM John Clements  
>> wrote:
>>> 
>>> That actually solves a bunch of problems for me… but strangely, not the 
>>> initial one. If, for instance, I tabify
>>> 
>>> (+  3
>>> 4)
>>> 
>>> using the tabify-all method, the line with the four gets an indentation of 
>>> 2, not 8. This is definitely different from DrRacket’s behavior.
>>> 
>>> Any idea how to fix this?
>>> 
>>> (cc:ing racket-users without permission, hope that’s okay?)
>>> 
>>> John
>>> 
>>> 
 On Mar 20, 2020, at 12:05 PM, John Clements  
 wrote:
 
 Ah! That’s probably a better solution, I’ll just do that. I searched for 
 “indent”, should I try to add that as a search term for the “tabify-all” 
 method?
 
 Many thanks!
 
 (Also, sending mail to the list using “us...@racket-lang.org” seems to be 
 broken right now for me, sigh.)
 
 John
 
> On Mar 20, 2020, at 12:01 PM, Robby Findler  
> wrote:
> 
> I'm not sure of the details but did you consider just inserting it
> into a racket:text% and then calling the tabify-all method?
> 
> Robby
> 
> On Fri, Mar 20, 2020 at 1:26 PM John Clements  
> wrote:
>> 
>> Hmm… followup problem. If I try to indent the string “#|\nabc\n|#” (that 
>> is, a block comment), the compute-racket-amount-to-indent method returns 
>> #f. Is this a bug, or just undocumented behavior?
>> 
>> John
>> 
>>> On Mar 20, 2020, at 10:41 AM, John Clements  
>>> wrote:
>>> 
>>> I’m writing code to help me grade exams, and one of the issues I’ve run 
>>> into is that the code coming out of the LMS is all totally unindented. 
>>> So, for instance, a student’s response might read:
>>> 
>>> ;Closures help a function value remember what substitutions have 
>>> already been applied to it.
>>> '{vars {{x {lam {x} {+ 1 x}}}
>>> {y {lam {y} {+ 3 y
>>> {+ {x 2} {y 4}}}
>>> 
>>> Obviously, it would be a lot easier to grade that if it was indented.
>>> 
>>> Excellent! A chance to whip up a quick-and-dirty auto-indenter, using 
>>> DrRacket’s indentation framework. Specifically, the 
>>> `compute-racket-amount-to-indent` method of racket:text<%>.
>>> 
>>> I’m pleased to report almost total success, aside from one strange 
>>> off-by-one error that I’m looking for help with.  To see it, here’s the 
>>> result of my auto-indenter on the prior block:
>>> 
>>> '{vars {{x {lam {x} {+ 1 x}}}
>>>{y {lam {y} {+ 3 y
>>>  {+ {x 2} {y 4}}}
>>> 
>>> (if you’re viewing this in a proportional-width font, that’s going to 
>>> look terrible, sorry.)
>>> 
>>> The issue is that the final plus line isn’t lined up with the 
>>> curly-brace that’s two chars after the end of `vars`… instead, it’s one 
>>> character to the left.
>>> 
>>> A much simpler test case is simply running on “(+ 3\n4)”. Rather than 
>>> getting the 4 lined up with the 3, I get it one character to the left.
>>> 
>>> And… uh oh. A more illuminating test case occurs when I run my code on 
>>> “(+  3\n4)”. That is, I put a bunch more spaces before the 3. After 
>>> indentation, the 4 is still only indented by two characters. So it 
>>> looks like the `compute-racket-amount-to-indent` method is not looking 
>>> for the token following the first one following the paren in the prior 
>>> line (which would account for all the spaces), but just adding one to 
>>> the last position of the first token following the paren. This makes me 
>>> wonder whether DrRacket actually uses this method to indent.
>>> 
>>> Hmm.
>>> 
>>> Well, here’s the code to reproduce this. Note that there’s an obvious 
>>> bug/assumption in that my code doesn’t account for any existing leading 
>>> spaces on a line, but none of my examples have leading spaces following 
>>> newlines.
>>> 
>>> Advice appreciated!
>>> 
>>> John
>>> 
>>> 
>>> 
>>> 

Re: [racket-users] auto-indentation... off by one^H^H^Hsome?

2020-03-20 Thread 'John Clements' via Racket Users
Unimportant thing one: this code had the same issue as mine, but as Robby 
points out, the issue is the way the text% is constructed; I was just creating 
a racket:text% directly, which (IIUC) doesn’t have a graphics context, so the 
auto-indenter can’t figure out how wide characters are.

Less unimportant thing: It seems like a whole bunch of people are writing 
racket linting/style-checking code right now, which seems like an unfortunate 
duplication of resources. I’ve got one that I’m about to deploy to my students 
that uses a combination of raw-text and read-but-not-expanded syntax, and right 
now it’s looking for simple things like functions without purpose statements, 
lines with only trailing parens, and uses of ‘cast’ that aren’t in fairly 
specific places (to wit, the bodies of functions named “parse”, a kind of 
ridiculous hack).

If you released your code, then we could all use it, and shower you day and 
night with bug reports and irritating feature requests!

John

> On Mar 20, 2020, at 12:21 PM, Benjamin Lerner  wrote:
> 
> In my auto-indenter and style checker (not yet a package that’s widely 
> available): evidently, there are some preferences that control which 
> constructs get tabified differently than expected. So I tweak those 
> preferences before invoking tabify-all. (In my case, I’m trying to support 
> two plausible indentation styles, depending on whether students have 
> different defaults set, so I compute the indentation twice.)
> 
> #lang racket
> 
> ;; Read in a source file and tabify it according to the following three 
> tabbing styles:
> ;;
> ;; 1. Untabbed (as writen directly in the file)
> ;; 2. Standard DrRacket tabbing excluding the big-bang default.
> ;;big-bang indents as:
> ;;  (big-bang a
> ;;b)
> ;; 3. Standard DrRacket tabbing including the big-bang default.
> ;;big-bang indents as:
> ;;  (big-bang a
> ;;b)
> ;;
> ;; (-> racket:text%? (values string? string? string?))
> ;;
> ;; WARNING!!! This function likely has effects based on the framework 
> library. It should NOT touch
> ;; your filesystem. However, this module should not be instantiated alongside
> ;; other DrRacket preferences.
> ;;
> (provide tabify-text)
> 
> (require framework/preferences)
> 
> (define (tabify-text t)
>   (parameterize* ([preferences:low-level-put-preferences
>(λ _ (void))]
>   [preferences:low-level-get-preference
>(λ _ #f)])
> (define untabbed (send t get-text))
> (define tabbed
>   (let ()
> (match-define (list table rx1 rx2 rx3 rx4)
>   (preferences:get 'framework:tabify))
> (hash-remove! table 'big-bang)
> (preferences:set 'framework:tabify
>  (list table rx1 rx2 rx3 rx4))
> (send t tabify-all)
> (send t get-text)))
> (define lambda-tabbed
>   (let ()
> (match-define (list table rx1 rx2 rx3 rx4)
>   (preferences:get 'framework:tabify))
> (hash-set! table 'big-bang 'lambda)
> (preferences:set 'framework:tabify
>      (list table rx1 rx2 rx3 rx4))
> (send t tabify-all)
> (send t get-text)))
> (values untabbed tabbed lambda-tabbed)))
> 
> On 3/20/20 3:12 PM, ‘John Clements’ via Racket Users wrote:
> 
> 
> 
>> That actually solves a bunch of problems for me… but strangely, not the 
>> initial one. If, for instance, I tabify
>> 
>> (+  3
>>   4)
>> 
>> using the tabify-all method, the line with the four gets an indentation of 
>> 2, not 8. This is definitely different from DrRacket’s behavior.
>> 
>> Any idea how to fix this?
>> 
>> (cc:ing racket-users without permission, hope that’s okay?)
>> 
>> John
>> 
>> 
>> 
>>> On Mar 20, 2020, at 12:05 PM, John Clements 
>>>  wrote:
>>> 
>>> Ah! That’s probably a better solution, I’ll just do that. I searched for 
>>> “indent”, should I try to add that as a search term for the “tabify-all” 
>>> method?
>>> 
>>> Many thanks!
>>> 
>>> (Also, sending mail to the list using “
>>> us...@racket-lang.org
>>> ” seems to be broken right now for me, sigh.)
>>> 
>>> John
>>> 
>>> 
>>>> On Mar 20, 2020, at 12:01 PM, Robby Findler 
>>>>  wrote:
>>>> 
>>>> I'm not sure of the details but did you consider just inserting it
>>>> into a racket:text% and then calling the tabify-all method?
>>>> 
>>>> Robby
>>>> 
>>>> On Fri, Mar 20, 2020 at 1:26 PM John C

Re: [racket-users] auto-indentation... off by one^H^H^Hsome?

2020-03-20 Thread 'John Clements' via Racket Users
Ah! this solves the issue. many thanks.

> On Mar 20, 2020, at 1:03 PM, Robby Findler  wrote:
> 
> Looks like you need a display or the text gets confused about how big
> (in pixels) characters really are:
> 
> #lang racket/gui
> (require framework)
> (define f (new frame% [label ""]))
> (define t (new racket:text%))
> (define ec (new editor-canvas% [parent f] [editor t]))
> (send t insert "(+3\n4)")
> (send t freeze-colorer)
> (send t tabify-all)
> (display (send t get-text))
> 
> On Fri, Mar 20, 2020 at 2:12 PM John Clements  
> wrote:
>> 
>> That actually solves a bunch of problems for me… but strangely, not the 
>> initial one. If, for instance, I tabify
>> 
>> (+  3
>>  4)
>> 
>> using the tabify-all method, the line with the four gets an indentation of 
>> 2, not 8. This is definitely different from DrRacket’s behavior.
>> 
>> Any idea how to fix this?
>> 
>> (cc:ing racket-users without permission, hope that’s okay?)
>> 
>> John
>> 
>> 
>>> On Mar 20, 2020, at 12:05 PM, John Clements  
>>> wrote:
>>> 
>>> Ah! That’s probably a better solution, I’ll just do that. I searched for 
>>> “indent”, should I try to add that as a search term for the “tabify-all” 
>>> method?
>>> 
>>> Many thanks!
>>> 
>>> (Also, sending mail to the list using “us...@racket-lang.org” seems to be 
>>> broken right now for me, sigh.)
>>> 
>>> John
>>> 
 On Mar 20, 2020, at 12:01 PM, Robby Findler  
 wrote:
 
 I'm not sure of the details but did you consider just inserting it
 into a racket:text% and then calling the tabify-all method?
 
 Robby
 
 On Fri, Mar 20, 2020 at 1:26 PM John Clements  
 wrote:
> 
> Hmm… followup problem. If I try to indent the string “#|\nabc\n|#” (that 
> is, a block comment), the compute-racket-amount-to-indent method returns 
> #f. Is this a bug, or just undocumented behavior?
> 
> John
> 
>> On Mar 20, 2020, at 10:41 AM, John Clements  
>> wrote:
>> 
>> I’m writing code to help me grade exams, and one of the issues I’ve run 
>> into is that the code coming out of the LMS is all totally unindented. 
>> So, for instance, a student’s response might read:
>> 
>> ;Closures help a function value remember what substitutions have already 
>> been applied to it.
>> '{vars {{x {lam {x} {+ 1 x}}}
>> {y {lam {y} {+ 3 y
>> {+ {x 2} {y 4}}}
>> 
>> Obviously, it would be a lot easier to grade that if it was indented.
>> 
>> Excellent! A chance to whip up a quick-and-dirty auto-indenter, using 
>> DrRacket’s indentation framework. Specifically, the 
>> `compute-racket-amount-to-indent` method of racket:text<%>.
>> 
>> I’m pleased to report almost total success, aside from one strange 
>> off-by-one error that I’m looking for help with.  To see it, here’s the 
>> result of my auto-indenter on the prior block:
>> 
>> '{vars {{x {lam {x} {+ 1 x}}}
>> {y {lam {y} {+ 3 y
>>   {+ {x 2} {y 4}}}
>> 
>> (if you’re viewing this in a proportional-width font, that’s going to 
>> look terrible, sorry.)
>> 
>> The issue is that the final plus line isn’t lined up with the 
>> curly-brace that’s two chars after the end of `vars`… instead, it’s one 
>> character to the left.
>> 
>> A much simpler test case is simply running on “(+ 3\n4)”. Rather than 
>> getting the 4 lined up with the 3, I get it one character to the left.
>> 
>> And… uh oh. A more illuminating test case occurs when I run my code on 
>> “(+  3\n4)”. That is, I put a bunch more spaces before the 3. After 
>> indentation, the 4 is still only indented by two characters. So it looks 
>> like the `compute-racket-amount-to-indent` method is not looking for the 
>> token following the first one following the paren in the prior line 
>> (which would account for all the spaces), but just adding one to the 
>> last position of the first token following the paren. This makes me 
>> wonder whether DrRacket actually uses this method to indent.
>> 
>> Hmm.
>> 
>> Well, here’s the code to reproduce this. Note that there’s an obvious 
>> bug/assumption in that my code doesn’t account for any existing leading 
>> spaces on a line, but none of my examples have leading spaces following 
>> newlines.
>> 
>> Advice appreciated!
>> 
>> John
>> 
>> 
>> 
>> 
>> #lang racket
>> 
>> (require framework)
>> 
>> ;; given a string of racket text, return the corresponding indented 
>> string
>> ;; NB: CURRENTLY ASSUMES ALL LINES START WITH ZERO SPACES.
>> (define (string-indent text-to-indent)
>> (define t (new racket:text%))
>> (send t erase)
>> (send t insert text-to-indent 0)
>> (define num-paragraphs (add1 (send t last-paragraph)))
>> (define indents
>> (for/list ([n (in-range num-paragraphs)])
>>   

[racket-users] Re: auto-indentation... off by one^H^H^Hsome?

2020-03-20 Thread 'John Clements' via Racket Users
That actually solves a bunch of problems for me… but strangely, not the initial 
one. If, for instance, I tabify

(+  3
  4)

using the tabify-all method, the line with the four gets an indentation of 2, 
not 8. This is definitely different from DrRacket’s behavior.

Any idea how to fix this?

(cc:ing racket-users without permission, hope that’s okay?)

John


> On Mar 20, 2020, at 12:05 PM, John Clements  wrote:
> 
> Ah! That’s probably a better solution, I’ll just do that. I searched for 
> “indent”, should I try to add that as a search term for the “tabify-all” 
> method?
> 
> Many thanks!
> 
> (Also, sending mail to the list using “us...@racket-lang.org” seems to be 
> broken right now for me, sigh.)
> 
> John
> 
>> On Mar 20, 2020, at 12:01 PM, Robby Findler  
>> wrote:
>> 
>> I'm not sure of the details but did you consider just inserting it
>> into a racket:text% and then calling the tabify-all method?
>> 
>> Robby
>> 
>> On Fri, Mar 20, 2020 at 1:26 PM John Clements  
>> wrote:
>>> 
>>> Hmm… followup problem. If I try to indent the string “#|\nabc\n|#” (that 
>>> is, a block comment), the compute-racket-amount-to-indent method returns 
>>> #f. Is this a bug, or just undocumented behavior?
>>> 
>>> John
>>> 
 On Mar 20, 2020, at 10:41 AM, John Clements  
 wrote:
 
 I’m writing code to help me grade exams, and one of the issues I’ve run 
 into is that the code coming out of the LMS is all totally unindented. So, 
 for instance, a student’s response might read:
 
 ;Closures help a function value remember what substitutions have already 
 been applied to it.
 '{vars {{x {lam {x} {+ 1 x}}}
 {y {lam {y} {+ 3 y
 {+ {x 2} {y 4}}}
 
 Obviously, it would be a lot easier to grade that if it was indented.
 
 Excellent! A chance to whip up a quick-and-dirty auto-indenter, using 
 DrRacket’s indentation framework. Specifically, the 
 `compute-racket-amount-to-indent` method of racket:text<%>.
 
 I’m pleased to report almost total success, aside from one strange 
 off-by-one error that I’m looking for help with.  To see it, here’s the 
 result of my auto-indenter on the prior block:
 
 '{vars {{x {lam {x} {+ 1 x}}}
  {y {lam {y} {+ 3 y
{+ {x 2} {y 4}}}
 
 (if you’re viewing this in a proportional-width font, that’s going to look 
 terrible, sorry.)
 
 The issue is that the final plus line isn’t lined up with the curly-brace 
 that’s two chars after the end of `vars`… instead, it’s one character to 
 the left.
 
 A much simpler test case is simply running on “(+ 3\n4)”. Rather than 
 getting the 4 lined up with the 3, I get it one character to the left.
 
 And… uh oh. A more illuminating test case occurs when I run my code on “(+ 
  3\n4)”. That is, I put a bunch more spaces before the 3. After 
 indentation, the 4 is still only indented by two characters. So it looks 
 like the `compute-racket-amount-to-indent` method is not looking for the 
 token following the first one following the paren in the prior line (which 
 would account for all the spaces), but just adding one to the last 
 position of the first token following the paren. This makes me wonder 
 whether DrRacket actually uses this method to indent.
 
 Hmm.
 
 Well, here’s the code to reproduce this. Note that there’s an obvious 
 bug/assumption in that my code doesn’t account for any existing leading 
 spaces on a line, but none of my examples have leading spaces following 
 newlines.
 
 Advice appreciated!
 
 John
 
 
 
 
 #lang racket
 
 (require framework)
 
 ;; given a string of racket text, return the corresponding indented string
 ;; NB: CURRENTLY ASSUMES ALL LINES START WITH ZERO SPACES.
 (define (string-indent text-to-indent)
 (define t (new racket:text%))
 (send t erase)
 (send t insert text-to-indent 0)
 (define num-paragraphs (add1 (send t last-paragraph)))
 (define indents
  (for/list ([n (in-range num-paragraphs)])
(define par-start (send t paragraph-start-position n))
(list par-start
  (send t compute-racket-amount-to-indent
par-start
head-sexp-type
 ;; NB: OBVIOUSLY WRONG, assumes all lines start with zero leading spaces:
 ;; act in reverse order, to avoid messing up the meaning of char posns:
 (for ([indent (in-list (reverse indents))])
  (send t set-position (first indent))
  (define space-string
(list->string (for/list ([i (in-range (second indent))]) #\space)))
  (send t insert space-string))
 (send t get-text))
 
 ;; for now, always return 'other
 (define (head-sexp-type str)
 'other)
 
 
 (define text-to-indent
 #<<|
 ;Closures help a function value remember what substitutions 

[racket-users] Test message sent to racket-users@googlegroups.com

2020-03-20 Thread 'John Clements' via Racket Users
Please ignore, thanks.



-- 
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/5ebd201a-8811-482a-b1a1-45a6c6b0d276%40mtasv.net.


Re: [racket-users] Lambda calculus done in Racket

2020-02-20 Thread 'John Clements' via Racket Users
I’m sure many other people have something like this, but here’s “Lab 5” from my 
currently-running PL course:

https://www.brinckerhoff.org/clements/2202-csc430/Labs/lab5.html

It introduces church numeral encodings and also this kind of true-false 
encoding as small programming challenges in Racket. It assumes that you already 
know how to program in Racket. It doesn’t go deep.

John

> On Feb 17, 2020, at 9:12 AM, Lawrence Bottorff  wrote:
> 
> I found these blowing down the sidewalk today
> 
> ; TRUE = λx.λy.x
> (define mytrue 
>   (lambda (t) (lambda (f) t)))
> 
> and 
> 
> ; FALSE = λx.λy.y
> (define myfalse
>   (lambda (t) (lambda (f) f)))
> 
> Two problems, I don't understand them and AFAICT, they don't work. I traced 
> them back to this post on stackoverflow. Can anyone get me started here?
> 
> LB
> 
> -- 
> 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/CAFAhFSXjQq2WWei8zvVY38cQmPd9Yb9sd95zCsszWY_aO3xPkA%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/525248ef-03a7-4e88-9ef8-507dd298e433%40mtasv.net.


Re: [racket-users] Web server + authentication

2020-02-15 Thread 'John Clements' via Racket Users
Wait, we *all* have postmark libraries? 

Sigh.

John

> On Jan 23, 2020, at 16:29, Jens Axel Søgaard  wrote:
> 
> Den tor. 23. jan. 2020 kl. 01.47 skrev Matthew Butterick :
> I concur on Postmark. For 2+ yrs I've used it with the Racket web server for 
> mbtype.com. I pass the server settings to `smtp-send-message` from `net/smtp`.
> 
>> On 22 Jan 20, at 3:00 AM, Bogdan Popa  wrote:
>> 
>> I like using Postmark[0] for this.  Their free plan lets you send up to
>> 100 e-mails a month, their paid plans come at a reasonable price and
>> they have helpful docs and validators to help you set up SPF, DMARC and
>> DKIM.
> Two recommendations!
> 
> I took a second look at Postmark and was impressed by their service,
> so I went ahead and added password recovery emails via Postmark.
> 
> Some nice features:
> - don't need to setup and maintain a mail server
> - weekly report on the "spam status" of your domain
> - email templates (html mails are hard)
> - an ios app to track mails
> - 100 mails free pr month (which for Racket Stories is plenty)
> 
> Thanks for the push.
> 
> 
> Stephen, I think, password resets were what you originally asked for (see 
> latest commit).
> 
>  https://github.com/soegaard/racket-stories
> 
> The code hasn't been deployed yet - it'll happen sometime tomorrow.
> 
> Philip: I'll keep your solution in mind, if I for some reason need to change 
> it.
> 
> /Jens Axel
> 
> 
> 
> 
> 
> -- 
> 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/CABefVgzNd2ZF1fpChjPKu9uYP1JambVJNzONUqKeTquPR-v2Lg%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/5614dc15-473c-4ff6-81a2-5c951cd8f919%40mtasv.net.


Re: [racket-users] resources for learning JS / React?

2020-02-15 Thread 'John Clements' via Racket Users
Belatedly: awesome, many thanks!

John

> On Jan 27, 2020, at 02:39, Sean Kemplay  wrote:
> 
> 
> This is a good (free) course that takes you the lates best practices of JS 
> (getting more functional), react and then react native.
> 
> https://www.edx.org/course/cs50s-mobile-app-development-with-react-native
> 
> 
> On Saturday, January 25, 2020 at 6:56:57 PM UTC, 'John Clements' via 
> users-redirect wrote:
> I have a graduate student that wants a self-guided introduction to JS and 
> React. The problem here, to some degree, is that there are so *many* 
> introductions. Does anyone here have specific references that might be 
> helpful? (Say, e.g., if Gregor Kiczales did a JS course on coursera… that 
> would be pretty much perfect.) 
> 
> 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/c433373a-3135-426d-90f3-f5d79032d38c%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/7b5f53bb-0401-4fc0-81e1-78dd375e88f4%40mtasv.net.


Re: [racket-users] Rolling dice game

2020-02-15 Thread 'John Clements' via Racket Users
Have you taken a look at How To Design Programs? At the end of section one, you 
should have what you need to build these games and others like them:

https://htdp.org/2019-02-24/part_one.html

John Clements

> On Feb 3, 2020, at 03:31, Wilzoo  wrote:
> 
> Hi guys, so I am working on rolling dice game in GUI, the game rules will be 
> something like rolling 3 dices and then giving out points to 2 players based 
> on the rolled values. 
> 
> Im now stuck on the showing value in GUI. Basically what I need is to show 
> rolled value somewhere in frame. 
> 
> This is my rolling dice code:
> 
> (define (nrandom n)
> (if (= n 0 ) '() (cons (random 1 7) (nrandom (- n 1)
> 
> this is my callback function which i know is wrong:
> 
> (new button% [parent gamew]
>  [label "roll dice"]
>  [min-width 150]
>  ; Callback procedure for a button click:
>  [callback (lambda (b e) (send (nrandom 3) show #t))])
> 
> So by using this im getting my 3 values in IDE window. Where should I look 
> for information how to get them in frame in some kind of box?
> 
> I just started my programming journey and racket documentation is not easy 
> for me to get any information from there tbh. Just figuring out how to make 
> frame and buttons + callback functions took me good few hours.
> 
> Thanks for help
> 
> 
> -- 
> 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/da23d01b-5422-4fe9-b40d-0ca9a904fed9%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/9c3d2a9a-a79d-47d6-b874-31a8dbb0d296%40mtasv.net.


Re: [racket-users] How to convert String to Integer

2020-02-15 Thread 'John Clements' via Racket Users
Did anyone suggest this code to you? Apologies if I’m re-treading an old 
conversation.

#lang typed/racket
(: string2value (-> String Integer))
(define (string2value str)
  (define maybe-integer (string->number str))
  (cond [(exact-integer? maybe-integer) maybe-integer]
[else (error 'string2value
 "expected a string convertible to an integer, got: ~e"
 str)]))


Best,

John Clements

> On Feb 15, 2020, at 10:37, 'John Clements' via Racket Users 
>  wrote:
> 
> ??
> 
>> (string2value "-1234")
> - : Integer
> -28766
>> (string2value "abcd")
> - : Integer
> 54562
>> 
> 
> Is this your desired behavior?
> 
>> On Feb 12, 2020, at 16:43, Alain De Vos  wrote:
>> 
>> I came to the following result as conversion function :
>> 
>> #lang typed/racket
>> (: string2value (-> String Integer))
>> (define (string2value astring)
>>  (define (fun [val : Char] [res : Integer])
>>(+ (* 10 res) (- (char->integer val) 48)))
>>  (foldl fun 0 (string->list astring))
>> )
>> (print (string2value "12345"))
>> 
>> 
>> 
>> On Tuesday, February 11, 2020 at 11:34:16 AM UTC+1, Alain De Vos wrote:
>> I tried the following function to conver a String to an Integer.
>> 
>> #lang typed/racket
>> (: myconversion (-> String Integer))
>> (define (myconversion str)
>>  (string->number str))
>> 
>> The error given is :
>> Type Checker: type mismatch
>>  expected: Integer
>>  given: (U Complex False) in: (string->number str)
>> 
>> I guess this is because a number is not an Integer.
>> 
>> How to proceed?
>> 
>> I found the following code on internet , but this looks like a real overkill 
>> for this simple problem ,
>> 
>> (: numerical-char->integer (->
>> Char
>>   Integer
>> ))
>> (define (numerical-char->integer char)
>> 
>> 
>> (let ([num (- (char->integer char) 48)]) ; 48 = (char->integer #\0)
>> 
>> 
>> (if
>> 
>> 
>> (or (< num 0) (> num 9))
>> 
>> 
>> (raise 'non-numerical-char #t)
>> 
>> num
>> )))
>> 
>> 
>> 
>> (: string->integer (->
>> String
>>   Integer
>> ))
>> (define (string->integer str)
>> 
>> 
>> (let ([char-list (string->list str)])
>> 
>> 
>> (if (null? char-list)
>> 
>> 
>> (raise 'empty-string #t)
>> 
>> 
>> (
>> foldl
>> 
>> (λ([x : Integer] [y : Integer])
>> 
>> 
>> (+ (* y 10) x))
>> 
>> 
>> 0
>> 
>> 
>> (map numerical-char->integer char-list)
>> 
>> 
>> -- 
>> 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/3e58a927-c05a-4688-984c-1750fb014624%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/f6d3c6ef-8779-4e91-956f-d82eb11b%40mtasv.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/450ccb56-b2ff-42c7-9df3-292f07151fd9%40mtasv.net.


  1   2   3   4   5   >