[racket-users] web cells expiring unexpectedly quickly

2019-01-09 Thread Jesse Alama
Playing around with stateless servlets, I find my web cells expiring 
unexpectedly quickly. Before going into code, here's what I'm working on 
at the moment:


* A new user goes to a registration page and completes the form there
* The inputs are checked. If they're valid, we register the user. (To 
simplify the discussion, assume that the inputs are valid.)
* Log the newly created user in by setting a web cell to the ID (a 
string?) of the newly created user.
* Use redirect/get, passing the result to an onboarding page ("Thanks 
for registering -- Welcome to the club! Here's what you can do here:")


The onboard function takes a request? as input; the newly created user 
is not an argument to that function. I'm implementing the concept of 
"the current user" using web cells. To get the current user, I use 
web-cell-ref. To set the current user, I use web-cell-shadow.


This works, but what I find is that, after about one minute, the web 
cell expires. Refreshing the onboarding page (created using 
redirect/get), web-cell-ref will soon start returning the initial value 
(#f) rather than that string.


In code:

(define (onboard req)
  (cond [(string? (web-cell-ref current-user))
 (response/xexpr
  `(html
(head (title "Welcome!"))
(body
 (h1 "You made it")
 (p "Welcome to the club")
 (h2 ,(web-cell-ref current-user)]
[else
 (response/xexpr
  `(html
(head (title "Huh?"))
(body
 (h1 "You logged in before…")
 (p "…but now you're GONE."]))

starts going into the second branch after about a minute. That is, upon 
successfully arriving at the onboard page, I can refresh the page 
successfully (without unintentionally registering the user again and 
again, in line with my understanding of redirect/get). But if I refresh 
the page after about 1 minute, I see "…but now you're GONE".


This is surprising because the memory pressure is surely minimal. This 
is all done on my laptop with a single user. Moreover, I'm doing things 
here by hand; I"m not flooding the server with a ton of requests, trying 
to force the continuation manager to start dropping stuff.


Are my expectations out of line here? Perhaps I'm misunderstanding 
something. I was approaching web cells, roughly speaking, as "parameters 
for the web", but this kind of behavior makes me think that I'm getting 
something wrong (or expecting too much). I'm using the default 
continuation manager coming from serve/servlet, which gives me 128 MB. 
Given what I'm doing in this case, I find it hard to believe that I'm 
exhausting memory, but maybe I am.


--
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] go cheney yourself

2019-01-09 Thread Andrew Gwozdziewycz
I was hoping for a link to Baker’s “Cheney on the MTA”

http://home.pipeline.com/~hbaker1/CheneyMTA.html

(Since I didn’t get it, here you are!)

> On Jan 9, 2019, at 17:41, Claes Wallin (韋嘉誠)  wrote:
> 
> Entirely off-topic for racket-users.
> 
> Where is this list that I can read you post links like this? :-)
> 
> -- 
>/c
> 
>> On Wed, Jan 9, 2019, 05:41 Tim Hanson > Sorry! Yes, wrong list; noticed immediately; deleted immediately, butI guess 
>> that doesn’t stop the mails.
>> 
>> Mea maxima culpa.
>> 
>> I’ll try to be more careful in the future.
>> 
>> Tim
>> 
>> 
>> > On Jan 8, 2019, at 10:37 PM, Matthias Felleisen  
>> > wrote:
>> > 
>> > 
>> > This is totally inappropriate. 
>> > 
>> > 
>> >> On Jan 8, 2019, at 4:09 PM, Tim Hanson  wrote:
>> >> 
>> >> great piece by Michelle Goldberg, imho:
>> >> 
>> >> https://www.nytimes.com/2019/01/07/opinion/rashida-tlaib-profanity.html
>> >> 
>> >> -- 
>> >> 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.
>> >> For more options, visit https://groups.google.com/d/optout.
>> > 
>> 
>> -- 
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Second Call for Papers: PACMPL issue ICFP 2019

2019-01-09 Thread 'Sam Tobin-Hochstadt' via users-redirect
PACMPL Volume 3, Issue ICFP 2019

Call for Papers



accepted papers to be invited for presentation at

 The 24th ACM SIGPLAN International Conference on Functional Programming

 Berlin, Germany

   http://icfp19.sigplan.org/



### Important dates



Submissions due:1 March 2019 (Friday) Anywhere on Earth

https://icfp19.hotcrp.com

Author response:16 April (Tuesday) - 18 Apri (Friday) 14:00 UTC

Notification:   3 May (Friday)

Final copy due: 22 June (Saturday)

Conference: 18 August (Sunday) - 23 August (Friday)



### About PACMPL



Proceedings of the ACM on Programming Languages (PACMPL

) is a Gold Open Access journal publishing

research on all aspects of programming languages, from design to

implementation and from mathematical formalisms to empirical

studies. Each issue of the journal is devoted to a particular subject

area within programming languages and will be announced through

publicized Calls for Papers, like this one.



### Scope



[PACMPL](https://pacmpl.acm.org/) issue ICFP 2019 seeks original

papers on the art and science of functional programming. Submissions

are invited on all topics from principles to practice, from

foundations to features, and from abstraction to application. The

scope includes all languages that encourage functional programming,

including both purely applicative and imperative languages, as well as

languages with objects, concurrency, or parallelism. Topics of

interest include (but are not limited to):



  * *Language Design*: concurrency, parallelism, and distribution;

 modules; components and composition; metaprogramming; type

 systems; interoperability; domain-specific languages; and

 relations to imperative, object-oriented, or logic programming.



  * *Implementation*: abstract machines; virtual machines;

 interpretation; compilation; compile-time and run-time

 optimization; garbage collection and memory management;

 multi-threading; exploiting parallel hardware; interfaces to

 foreign functions, services, components, or low-level machine

 resources.



  * *Software-Development Techniques*: algorithms and data structures;

 design patterns; specification; verification; validation; proof

 assistants; debugging; testing; tracing; profiling.



  * *Foundations*: formal semantics; lambda calculus; rewriting; type

 theory; monads; continuations; control; state; effects; program

 verification; dependent types.



  * *Analysis and Transformation*: control-flow; data-flow; abstract

 interpretation; partial evaluation; program calculation.



  * *Applications*: symbolic computing; formal-methods tools;

 artificial intelligence; systems programming; distributed-systems

 and web programming; hardware design; databases; XML processing;

 scientific and numerical computing; graphical user interfaces;

 multimedia and 3D graphics programming; scripting; system

 administration; security.



  * *Education*: teaching introductory programming; parallel

 programming; mathematical proof; algebra.



Submissions will be evaluated according to their relevance,

correctness, significance, originality, and clarity. Each submission

should explain its contributions in both general and technical terms,

clearly identifying what has been accomplished, explaining why it is

significant, and comparing it with previous work. The technical

content should be accessible to a broad audience.



PACMPL issue ICFP 2019 also welcomes submissions in two separate

categories — Functional Pearls and Experience Reports —

that must be marked as such at the time of submission and that need

not report original research results.  Detailed guidelines on both

categories are given at the end of this call.



Please contact the principal editor if you have questions or are

concerned about the appropriateness of a topic.



### Preparation of submissions



**Deadline**: The deadline for submissions is **Friday, March 1, 2019**,

Anywhere on Earth ().

This deadline will be strictly enforced.



**Formatting**: Submissions must be in PDF format, printable in black

and white on US Letter sized paper, and interpretable by common PDF

tools. All submissions must adhere to the "ACM Small" template that is

available (in both LaTeX and Word formats) from

.  For authors

using LaTeX, a lighter-weight package, including only the essential

files, is available from

.



There is a limit of **25 pages for a full paper or Functional Pearl**

and **12 pages for an Experience Report**; in either case, the

bibliography will not be counted against these limits. Submissions

that exc

Re: [racket-users] go cheney yourself

2019-01-09 Thread 韋嘉誠
Entirely off-topic for racket-users.

Where is this list that I can read you post links like this? :-)

-- 
   /c

On Wed, Jan 9, 2019, 05:41 Tim Hanson  Sorry! Yes, wrong list; noticed immediately; deleted immediately, butI
> guess that doesn’t stop the mails.
>
> Mea maxima culpa.
>
> I’ll try to be more careful in the future.
>
> Tim
>
>
> > On Jan 8, 2019, at 10:37 PM, Matthias Felleisen 
> wrote:
> >
> >
> > This is totally inappropriate.
> >
> >
> >> On Jan 8, 2019, at 4:09 PM, Tim Hanson  wrote:
> >>
> >> great piece by Michelle Goldberg, imho:
> >>
> >> https://www.nytimes.com/2019/01/07/opinion/rashida-tlaib-profanity.html
> >>
> >> --
> >> 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.
> >> For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: project idea: drracket notebook mode

2019-01-09 Thread Neil Van Dyke

Greg Trzeciak wrote on 1/9/19 7:16 PM:
I believe 'hydrogen' like interface is probably closest to what you 
are looking for:


Personally, I was thinking of something closer to the Jupyter interface 
(including literate text blocks, not comments, and the notebook-like 
indicators of evaluation order/state), but as a view or modality within 
DrRacket.


Imagine being in DrRacket, working on a Racket file, and being able to 
toggle your view and manner of interacting with the file between a 
notebook interface (with literate programming, integrated evaluation) 
and a conventional Racket source code file.  And being able to use all 
the DrRacket features for working with Racket files.


(What I described above doesn't involve any IPython/Jupyter protocol, 
though support for DrRacket also being an IPython/Jupyter frontend could 
be added later, to mix languages or for remote use. But the first and 
perhaps main benefit probably comes from the relatively simple and 
straightforward addition to DrRacket code above.)


--
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: project idea: drracket notebook mode

2019-01-09 Thread Greg Trzeciak
I believe 'hydrogen' like interface is probably closest to what you are 
looking for: 
https://atom.io/packages/hydrogen
https://blog.nteract.io/hydrogen-interactive-computing-in-atom-89d291bcc4dd
https://github.com/nteract/hydrogen

For a poor man's implementation - you can already send selected 
s-expression to interaction 
window: 
http://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html?q=drracket#%28part._.Sending_.Program_.Fragments_to_the_.R.E.P.L%29
Now to make it display the result below the selection...

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Is Racket a good fit for my application?

2019-01-09 Thread Ryan Kramer
Scribble is awesome, but I don't think it's the first tool I would reach 
for in this situation. I'm assuming your reports will be mostly tabular and 
not very much prose, in which case Scribble might become an unnecessary 
layer that gets in the way of what you are really trying to do, which is 
generate HTML.

I would probably try to use X-expressions and something like xexpr->html 
[1] to generate an HTML report. Especially if you are planning on building 
a web UI in the future, HTML as X-expressions should work well. (See for 
example [2] which uses X-expressions.)

[1]: 
https://docs.racket-lang.org/txexpr/index.html#(def._((lib._txexpr%2Fmain..rkt)._xexpr-~3ehtml))
[2]: https://docs.racket-lang.org/continue/

Disclaimer: I've never done anything like this in Racket so I could be way 
off.

If you want to go from HTML to PDF automatically, it might be worth 
considering chrome from the command line:

chrome.exe --headless --disable-gpu --print-to-pdf=my-report.pdf 
my-report.html

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Functional augmenting

2019-01-09 Thread George Neuner
Hi Neil,

On Tue, 8 Jan 2019 14:28:29 -0500, Neil Van Dyke
 wrote:

>In current Racket, the defining module wasn't expecting its own 
>procedure definition to change out from under it, and other users of 
>that module also weren't expecting it to change.
>
>Racket semantics for procedures seems good for software engineering, as 
>well as for tools static analysis, and as a foundation for DSLs and 
>other languages implemented as transformations to Racket, and I don't 
>want to break all that.
>
>When we want polymorphism, we can use something like generics, which 
>normally tells both humans and tools that a particular different 
>abstraction is happening (even if you implemented it with normal 
>procedures -- the code and documentation would tell you of the 
>abstraction).  Whether to do that is also a decision of the module that 
>provides the procedure/generic definition and documents it.
>
>[1] However, if `before` in the quoted example is actually only 
>syntactic sugar for `define` with `apply`, then it's not mutating the 
>original procedure, so I can put down the fire extinguisher.  

AFAICS the example is nothing but a wrapper that mutates the input to
the original.  I see nothing wrong with that.

Even in the case of generics, in no case is the original procedure
being mutated.  It's simply being superceded by a new [same name]
function that (theoretically) adds value.  The new function may (or
not) call the original as part of its working.

For normal functions/procedures I don't see harm in wrappers that
specialize them to new environments.  This is done all the time.  If
you are objecting to the wrapper having the same name as the original
function then I take your point about potential confusion ... but
otherwise I'm lost.


>In that 
>syntactic sugar case, whether to do it is a very local decision, of each 
>module that internally opts to use that sugar. Maybe that sugar makes 
>sense, for those particular modules that use it, within whatever 
>project/organization maintains that source code.

George

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Is Racket a good fit for my application?

2019-01-09 Thread Matthias Felleisen

> On Jan 9, 2019, at 9:30 AM, Thiago Araújo  wrote:
> 
> Hi,
> 
> I am a Lisp enthusiast who's new to Racket. I need to build a program for my 
> mom that's basically a medical report database where generating PDFs and 
> printing (to paper) plays a central part in the business. The report format 
> doesn't need to be PDF, but it needs to be printable through Racket (or an 
> external program that I can easily integrate). Basically, I need the ability 
> to print each report that exists in the database with a variety of different 
> layouts.
> 
> I see Racket already has "racket/gui", which is exactly what I need to build 
> the UI and allow the users to create the reports. And it also has "scribble", 
> which seems to be a good fit for generating PDFs. So my questions are:
> 
> - Would scribble work for my purpose?

Yes. 


> - How would I integrate "racket/gui" with the system's printer dialog and 
> send my PDFs to the printer?


Yes. 

DrRacket does this already, but your app seems much simpler. 


> - If the above is not possible, would there be an external program you could 
> recommend?
> - Would my app work on both Windows and macOS?


Yes. 

I routinely so such things but not completely automated. If you know latex, you 
can use scribble to synthesize a really good looking PDF but you will need to 
make sure to have a tex/latex installed on your target platforms. The output 
will be identical (if you have the same fonts). 

If your mother is happy with scibbled HTML that is then rendered to PDF for 
printing, go with that. Every platform has a browser and thus an HTML renderer. 

Conduct an experiment “by hand” first to see what your mom likes. 

Good luck. 





> 
> Racket seems an awesome fit because I'd have the possibility to build a web 
> UI in the future.
> 
> Thank you, I'd appreciate any recommendations :)
> 
> -- 
> 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 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Is Racket a good fit for my application?

2019-01-09 Thread Thiago Araújo
Hi,

I am a Lisp enthusiast who's new to Racket. I need to build a program for 
my mom that's basically a medical report database where generating PDFs and 
printing (to paper) plays a central part in the business. The report format 
doesn't need to be PDF, but it needs to be printable through Racket (or an 
external program that I can easily integrate). Basically, I need the 
ability to print each report that exists in the database with a variety of 
different layouts.

I see Racket already has "racket/gui", which is exactly what I need to 
build the UI and allow the users to create the reports. And it also has 
"scribble", which seems to be a good fit for generating PDFs. So my 
questions are:

- Would scribble work for my purpose?
- How would I integrate "racket/gui" with the system's printer dialog and 
send my PDFs to the printer?
- If the above is not possible, would there be an external program you 
could recommend?
- Would my app work on both Windows and macOS?

Racket seems an awesome fit because I'd have the possibility to build a web 
UI in the future.

Thank you, I'd appreciate any recommendations :)

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Functional augmenting

2019-01-09 Thread Greg Hendershott
On Tue, Jan 8, 2019 at 4:35 PM Jens Axel Søgaard  wrote:
>
> Den tir. 8. jan. 2019 kl. 21.40 skrev David Storrs :
>>
>>
>> This.  In an ideal world, before/after/around would be parameterized so that 
>> you can make the change only for a defined scope.
>>
>> Still, the intent was never that it would extend its effects outside the 
>> current module.
>
> In that case you can use let-syntax and to redefine #%app.

If we're talking module scope, there's (require (rename-in racket/base
[+ rkt:+])), then define + as you prefer, using rkt:+ or not as you
like.

If we're talking local scope, there's local-require. Or simply (let
([+ my-plus]) (+ 1 2 3)).

Both are syntactically apparent. (The first is more apparent when the
require is at the top and the module isn't too long.) In terms of
cognitive load, it's just roses by other names.


If we're talking dynamic scope, then it sounds like generics / classes
/ passing a function as an argument, are likely to be better than
"monkey-patching" or "advising". That kind of stuff has its place for
emergency hot-fixes or endless mutable balls of end-user mud like
Emacs. But it's refreshingly sane not to have it as part of the
language or package ecosystem, I think?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] FOSDEM: Flyers, posters, and overall Racket visuals/communication material

2019-01-09 Thread Jérôme Martin
Hello Racketeers!

I'm going to FOSDEM in February, giving some talks and workshops about 
Racket in the "Minimalistic Languages Room". 
https://fosdem.org/2019/schedule/track/minimalistic_languages/

In order to promote our beloved language there, I'd like to print out some 
big posters.
Do you have some promotional material and/or ideas we could display?

I'm thinking of catch phrases like:
- Racket: the language-oriented programming language
- Racket: visit the new Tower of Babel today!
- Can't code it? Did you try your own language?

I'm open to any suggestion, may it be phrases or visuals.

See you around, folks!
Jérôme

-- 
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.
For more options, visit https://groups.google.com/d/optout.