Re: [racket-users] Plot Problem: No Line; Bounds not found

2021-06-15 Thread Robby Findler
While I completely agree that testing one's function is the best practical
advice here, it also seems worth an improvement to plot. Perhaps, in
addition to saying "could not determine sensible plot bounds", it could
also say something like "because there were no points" and perhaps even
follow up with "tried these points, but they all raised exceptions: ".

Robby


On Tue, Jun 15, 2021 at 2:19 PM Ben Greenman 
wrote:

> On 6/15/21, Britt Anderson  wrote:
> > Thanks for the help to my specific problem. More generally, what should
> > have clued me in to a contract or type error when the only message
> received
> > had to do with y plot bounds? Just looking for practical advice to help
> me
> > figure out things on my own going forward.
>
> There's nothing in this program that could have clued you in besides
> the empty plot.
>
> Next time, I'd write tests for my function before sending it to plot's
> `function` renderer.
>
> --
> 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/CAFUu9R5FF6%3D4c0-KnkycMBeL0AaU9PHnKRELOH33J8b9NSXqzQ%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/CAL3TdOMvGZhpY6aFR%2BMGAgvQ-pDYCMUzBHDFZp2%3DyiGKB3ZX6Q%40mail.gmail.com.


Re: [racket-users] Plot Problem: No Line; Bounds not found

2021-06-15 Thread Ben Greenman
On 6/15/21, Britt Anderson  wrote:
> Thanks for the help to my specific problem. More generally, what should
> have clued me in to a contract or type error when the only message received
> had to do with y plot bounds? Just looking for practical advice to help me
> figure out things on my own going forward.

There's nothing in this program that could have clued you in besides
the empty plot.

Next time, I'd write tests for my function before sending it to plot's
`function` renderer.

-- 
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/CAFUu9R5FF6%3D4c0-KnkycMBeL0AaU9PHnKRELOH33J8b9NSXqzQ%40mail.gmail.com.


Re: [racket-users] Plot Problem: No Line; Bounds not found

2021-06-15 Thread Britt Anderson
Thanks for the help to my specific problem. More generally, what should 
have clued me in to a contract or type error when the only message received 
had to do with y plot bounds? Just looking for practical advice to help me 
figure out things on my own going forward. 

On Tuesday, June 15, 2021 at 9:46:37 AM UTC-4 Ben Greenman wrote:

> On 6/15/21, Britt Anderson  wrote:
> >
> > I was starting to explore plot and I am getting a behavior I do not
> > understand. plot doesn't seem to be able to figure out the bounds for
> > something that seems pretty straight-forward. When I give bounds as an
> > optional argument I don't see the line I expect to see. Can anyone 
> provide
> > me some pointers? I feel like I am just missing something conceptually 
> and
> > would appreciate some guidance. Here is some minimal code to demonstrate
> > the problem. I get a plot square, but no line, and I can demonstrate that
> > the function generates reasonable numbers for this range of inputs.
> >
> >
> >
> > #lang racket
> > (require plot)
> > (require math/distributions)
> >
> > (define (norm-prior mu)
> > (lambda (sd)
> > (lambda (ind)
> > (* ind (flnormal-pdf mu sd ind #f)
> >
> > (define d ((norm-prior 0.5) 0.1))
> >
> > (plot (function d 0 1 #:y-min 0.0 #:y-max 2.0 #:samples 100))
> >
> > (map d (range 0.0 1.0 0.01))
> >
>
> This is tricky.
>
> Plot is calling your function `d` with inputs like 0, 1/99, and 1. All
> of those give contract errors --- try (d 0) for yourself.
>
> But when a plot function throws an error, the library ignores the
> problem & keeps trying to draw a picture.
>
> To fix, I'd change `norm-prior` to make a flonum:
>
> (define (norm-prior mu)
> (lambda (sd)
> (lambda (ind)
> (* ind (flnormal-pdf mu sd (exact->inexact ind) #f)
>
> [[ Maybe plot should check if a function renderer produces no output
> and throw an error then. ]]
>

-- 
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/8021ed6d-f5f2-4279-9481-ad66eab9e762n%40googlegroups.com.


Re: [racket-users] Teaching Racket to kids experiences, syllabus ideas, etc

2021-06-15 Thread Sage Gerard
John Carmack did so for his 10 year old. His notes may be of interest.

https://groups.google.com/g/racket-users/c/yjRuIxypUQc

On 6/15/21 1:42 PM, Nathaniel W Griswold wrote:
> Has anyone taught racket to kids, like middle school and above?
>
> I see some really basic articles when googling around, but i was wondering if 
> anyone has experience with this.
>
> Would you use the picturing-programs book? I see it's built into Racket, 
> which is nice.
>
> I was thinking of something smaller though, for a low-pressure introduction 
> to programming, control flow, making an algorithm, that kinda stuff.
>
> Nate
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0FC82045-32B6-434C-BF40-B2C3298BA6C2%40manicmind.earth.

--
~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/65caa817-4bd6-7f2f-6676-03863d840cce%40sagegerard.com.


[racket-users] Teaching Racket to kids experiences, syllabus ideas, etc

2021-06-15 Thread Nathaniel W Griswold
Has anyone taught racket to kids, like middle school and above?

I see some really basic articles when googling around, but i was wondering if 
anyone has experience with this.

Would you use the picturing-programs book? I see it's built into Racket, which 
is nice.

I was thinking of something smaller though, for a low-pressure introduction to 
programming, control flow, making an algorithm, that kinda stuff.

Nate

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0FC82045-32B6-434C-BF40-B2C3298BA6C2%40manicmind.earth.


[racket-users] IFL2021 second call for papers

2021-06-15 Thread Pieter Koopman


IFL 2021

33rd Symposium on Implementation and Application of Functional Languages


 venue: online
  1 - 3 September 2021

 https://ifl21.cs.ru.nl




News


   - Paper submission is now open:
   https://easychair.org/conferences/?conf=ifl21
   

   .
   - Invited speakers are added: Stephanie Weirich and John Hughes
   - Sponsor added:  Facebook Research
   




Scope

The goal of the IFL symposia is to bring together researchers actively
engaged
in the implementation and application of functional and function-based
programming languages. IFL 2021 will be a venue for researchers to present
and
discuss new ideas and concepts, work in progress, and publication-ripe
results
related to the implementation and application of functional languages and
function-based programming.


Industrial track and topics of interest

This year's edition of IFL explicitly solicits original work concerning
*applications*
of functional programming in industry and academia. These contributions
will be reviewed by experts with an industrial background.

Topics of interest to IFL include, but are not limited to:

* language concepts
* type systems, type checking, type inferencing
* compilation techniques
* staged compilation
* run-time function specialisation
* run-time code generation
* partial evaluation
* (abstract) interpretation
* meta-programming
* generic programming
* automatic program generation
* array processing
* concurrent/parallel programming
* concurrent/parallel program execution
* embedded systems
* web applications
* (embedded) domain-specific languages
* security
* novel memory management techniques
* run-time profiling performance measurements
* debugging and tracing
* testing and proofing
* virtual/abstract machine architectures
* validation, verification of functional programs
* tools and programming techniques
* applications of functional programming in the industry, including
** functional programming techniques for large applications
** successes of the application functional programming
** challenges for functional programming encountered
** any topic related to the application of functional programming that is
interesting for the IFL community


Post-symposium peer-review

Following IFL tradition, IFL 2021 will use a post-symposium review process
to
produce the formal proceedings.

Before the symposium authors submit draft papers. These draft papers will
be
screened by the program chairs to make sure that they are within the scope
of
IFL. The draft papers will be made available to all participants at the
symposium.
Each draft paper is presented by one of the authors at the symposium.

After the symposium every presenter is invited to submit a full paper,
incorporating feedback from discussions at the symposium. Work submitted to
IFL
may not be simultaneously submitted to other venues; submissions must
adhere to ACM SIGPLAN's republication policy. The program committee will
evaluate these submissions according to their correctness, novelty,
originality,
relevance, significance, and clarity, and will thereby determine whether
the
paper is accepted or rejected for the formal proceedings. We plan to
publish
these proceedings in the International Conference Proceedings Series of the
ACM Digital Library, as in previous years. Moreover, the proceedings will
also
be made publicly available as open access.


Important dates

Submission deadline of draft papers:   17 August 2021
Notification of acceptance for presentation:   19 August 2021
Registration deadline: 30 August 2021
IFL Symposium: 1-3 September 2021
Submission of papers for proceedings:  6 December 2021
Notification of acceptance:3 February 2022
Camera-ready version:  15 March 2022


Submission details

All contributions must be written in English. Papers must use the ACM two
columns conference format, which can be found at:

  http://www.acm.org/publications/proceedings-template

Re: [racket-users] Racket v8.1 [cs] -- Memory leaks with IDE in Win10

2021-06-15 Thread J Fuller
Hi! I've read the issue ticket and that sure sounds like the problem! I've 
installed 8.1.0.7 and I'll see if that addresses it. 

Thanks very much!

On Tuesday, 15 June 2021 at 08:44:27 UTC-4 Matthew Flatt wrote:

> Hi, and thanks for the report!
>
> That sounds like a bug that has been fixed for the next release,
> especially if you opened any HTML page (such as documentation) from
> DrRacket.
>
> For more information on a previous report and the repair:
>
> https://github.com/racket/racket/issues/3832
>
> Snapshot versions with the repair:
>
> https://snapshot.racket-lang.org/
>
>
> Matthew
>
> At Tue, 15 Jun 2021 05:41:11 -0700 (PDT), J Fuller wrote:
> > Hi!
> > 
> > I'm having problems with memory consumption in Racket v8.1 [cs], 64 bit 
> on 
> > Windows 10.
> > 
> > I left the IDE running overnight with a one short file open in the 
> editor 
> > (less than 30 lines) but nothing actually running and in the morning, I 
> > found it it had consumed over 20GB of RAM (see attached screenshot from 
> > Process Explorer). 
> > 
> > Is there any way I can troubleshoot what's causing this?
> > What's the best information to supply to make a good bug report?
> > 
> > Thanks very much! 
> > 
> > -- 
> > 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/94f11c62-5e1c-498c-8550-bbda0e70f
> > 2b4n%40googlegroups.com.
> > 
> > 
> > 
> --
> > [image/png "Screenshot 2021-06-15 082515.png"] [~/Desktop & open] 
> [~/Temp & open]
> > .
>

-- 
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/dc0857bf-0b99-4570-a4ac-4d0e58ca7318n%40googlegroups.com.


Re: [racket-users] Plot Problem: No Line; Bounds not found

2021-06-15 Thread Ben Greenman
On 6/15/21, Britt Anderson  wrote:
>
> I was starting to explore plot and I am getting a behavior I do not
> understand. plot doesn't seem to be able to figure out the bounds for
> something that seems pretty straight-forward. When I give bounds as an
> optional argument I don't see the line I expect to see. Can anyone provide
> me some pointers? I feel like I am just missing something conceptually and
> would appreciate some guidance. Here is some minimal code to demonstrate
> the problem.  I get a plot square, but no line, and I can demonstrate that
> the function generates reasonable numbers for this range of inputs.
>
>
>
> #lang racket
> (require plot)
> (require math/distributions)
>
> (define (norm-prior mu)
>   (lambda (sd)
>   (lambda (ind)
> (* ind (flnormal-pdf mu sd ind #f)
>
> (define d ((norm-prior 0.5) 0.1))
>
> (plot (function d 0 1 #:y-min 0.0 #:y-max 2.0 #:samples 100))
>
> (map d (range 0.0 1.0 0.01))
>

This is tricky.

Plot is calling your function `d` with inputs like 0, 1/99, and 1. All
of those give contract errors --- try (d 0) for yourself.

But when a plot function throws an error, the library ignores the
problem & keeps trying to draw a picture.

To fix, I'd change `norm-prior` to make a flonum:

 (define (norm-prior mu)
   (lambda (sd)
   (lambda (ind)
 (* ind (flnormal-pdf mu sd (exact->inexact ind) #f)

[[ Maybe plot should check if a function renderer produces no output
and throw an error then. ]]

-- 
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/CAFUu9R649zKbfduwRk57gdCnYbAZ29amvSX1%3D%3D__Zx7hbbop9Q%40mail.gmail.com.


Re: [racket-users] Racket v8.1 [cs] -- Memory leaks with IDE in Win10

2021-06-15 Thread Matthew Flatt
Hi, and thanks for the report!

That sounds like a bug that has been fixed for the next release,
especially if you opened any HTML page (such as documentation) from
DrRacket.

For more information on a previous report and the repair:

  https://github.com/racket/racket/issues/3832

Snapshot versions with the repair:

  https://snapshot.racket-lang.org/


Matthew

At Tue, 15 Jun 2021 05:41:11 -0700 (PDT), J Fuller wrote:
>  Hi!
> 
> I'm having problems with memory consumption in Racket v8.1 [cs], 64 bit on 
> Windows 10.
> 
> I left the IDE running overnight with a one short file open in the editor 
> (less than 30 lines) but nothing actually running and in the morning, I 
> found it it had consumed over 20GB of RAM (see attached screenshot from 
> Process Explorer). 
> 
> Is there any way I can troubleshoot what's causing this?
> What's the best information to supply to make a good bug report?
> 
> Thanks very much! 
> 
> -- 
> 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/94f11c62-5e1c-498c-8550-bbda0e70f
> 2b4n%40googlegroups.com.
> 
> 
> --
> [image/png "Screenshot 2021-06-15 082515.png"] [~/Desktop & open] [~/Temp & 
> open]
> .

-- 
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/20210615074420.50%40sirmail.smtps.cs.utah.edu.


[racket-users] Racket v8.1 [cs] -- Memory leaks with IDE in Win10

2021-06-15 Thread J Fuller
 Hi!

I'm having problems with memory consumption in Racket v8.1 [cs], 64 bit on 
Windows 10.

I left the IDE running overnight with a one short file open in the editor 
(less than 30 lines) but nothing actually running and in the morning, I 
found it it had consumed over 20GB of RAM (see attached screenshot from 
Process Explorer). 

Is there any way I can troubleshoot what's causing this?
What's the best information to supply to make a good bug report?

Thanks very much! 

-- 
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/94f11c62-5e1c-498c-8550-bbda0e70f2b4n%40googlegroups.com.


[racket-users] Plot Problem: No Line; Bounds not found

2021-06-15 Thread Britt Anderson

I was starting to explore plot and I am getting a behavior I do not 
understand. plot doesn't seem to be able to figure out the bounds for 
something that seems pretty straight-forward. When I give bounds as an 
optional argument I don't see the line I expect to see. Can anyone provide 
me some pointers? I feel like I am just missing something conceptually and 
would appreciate some guidance. Here is some minimal code to demonstrate 
the problem.  I get a plot square, but no line, and I can demonstrate that 
the function generates reasonable numbers for this range of inputs. 



#lang racket
(require plot)
(require math/distributions)

(define (norm-prior mu)
  (lambda (sd)
  (lambda (ind)
(* ind (flnormal-pdf mu sd ind #f)

(define d ((norm-prior 0.5) 0.1))

(plot (function d 0 1 #:y-min 0.0 #:y-max 2.0 #:samples 100))

(map d (range 0.0 1.0 0.01))

  

-- 
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/547ba8a2-3515-4ee2-b46a-4aa134d85746n%40googlegroups.com.