[racket-users] build error on the package server for a package whose source is a simple URL (not a Git repo)

2021-07-01 Thread je...@lisp.sh
I'm not sure if what I'm seeing is a bug or whether I'm using the package 
system incorrectly, but here goes:

I just submitted a package to the package server whose source is a simple 
URL. It's not a Git repo accessible via HTTPS; it's a Fossil repo, with a 
server running that serves up a plain old tar-and-gzip'd directory. The 
error message from the build process:

pkg: mismatched checksum on package package source: 
https://example.com/cool-package/tarball/trunk/download.tar.gz expected: "" 
got: "a5d851da2832c0b43f7530794987da0a080ebe6d"

The naive way to read this error message is: OK, I need to specify a 
checksum. But there's no checksum field in the form on the package server. 
You can specify a URL and nothing else. After some digging, I found that 
checksums 
can be specified in an info.rkt file, but to my mind that shouldn't be 
necessary. My thinking is: if I just give a simple URL, the package server 
should just download the thing, make some reasonable guess about the 
content (in this case, it can be inferred from the media type in the 
server's response, but barring that, calling the `file` utility will reveal 
it's a gzip'd tar file, etc.), and we're off to the races. Am I thinking 
about things incorrectly? Are my expectations too high? What can I do? 
(Please don't tell me to just use Git!)

Jesse

-- 
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/7ba32102-8841-45c6-a1b3-e4bffed3ae8dn%40googlegroups.com.


[racket-users] Re: custom byte encoders?

2021-04-23 Thread je...@lisp.sh
The more I read in section 4.5.4 the more it dawns on me that what I'm 
after may not be possible without (a) a custom patched version of Racket 
and/or (b) a custom patched version of libiconv. An alternative -- I think 
-- would be a custom input port, but even that might require (a) and/or (b) 
above. Naturally, I'd prefer not to have to have a private variant of 
Racket, and I'd rather not roll my own encoder in C. If there's no other 
way, I'll do it. But maybe I'm overlooking something simpler.

On Friday, April 23, 2021 at 7:01:45 AM UTC+2 je...@lisp.sh wrote:

> Is it possible to make your own byte encoder? Section 4.5.4 of the 
> reference talks about them and describes the handful of built-in ones. I 
> don't see a way of making my own byte encoders, though. I'd like to have my 
> own way of validating bytes and performing replacements, similar to what is 
> done with the "UTF-8-permissive" encoder (for example, certain junk 
> characters get replaced by #\uFFFD), but I'd like to do a bit more than 
> that. For example, I'd like replace some exotic but otherwise valid UTF-8 
> characters with #\uFFFD. It seems that the only way to do that is to write 
> my own custom input (or output) port, with the validation/replacement logic 
> contained within the custom port's peek/read-bytes/write-bytes procedures. 
> Or perhaps I overlooking something?
>
> Jesse
>

-- 
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/2a29be0f-382d-44ee-b691-91c6b527fc48n%40googlegroups.com.


[racket-users] custom byte encoders?

2021-04-22 Thread je...@lisp.sh
Is it possible to make your own byte encoder? Section 4.5.4 of the 
reference talks about them and describes the handful of built-in ones. I 
don't see a way of making my own byte encoders, though. I'd like to have my 
own way of validating bytes and performing replacements, similar to what is 
done with the "UTF-8-permissive" encoder (for example, certain junk 
characters get replaced by #\uFFFD), but I'd like to do a bit more than 
that. For example, I'd like replace some exotic but otherwise valid UTF-8 
characters with #\uFFFD. It seems that the only way to do that is to write 
my own custom input (or output) port, with the validation/replacement logic 
contained within the custom port's peek/read-bytes/write-bytes procedures. 
Or perhaps I overlooking something?

Jesse

-- 
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/4a8c8030-b2f7-46fa-80ca-df425c6bda7an%40googlegroups.com.


[racket-users] custom input ports and specials

2021-04-12 Thread je...@lisp.sh
I'm implementing a tokenizer as a custom input port using 
`make-input-port`. My thinking is that `peek-char-or-special` and 
`read-char-or-special` will be the primary interface to the tokenizer; port 
locations will also be used. In this case, the input port should emitting 
characters as well as special values. It's not just bytes/characters.

Here's a simplified form of what I'm trying to accomplish. Imagine a 
language consisting of sequences (possibly empty) of ASCII letters 
(lowercase and uppercase). If you see a non-X (capital X), just emit that. 
(When I say "emit", what I mean is "value that should be returned by 
`peek-char-or-special` and `read-char-or-special`.) If you see an X and 
it's the last character of the input, emit #\X. If you see a capital X 
followed by any character, emit that character as a symbol. That's the 
special value. Thus:

  a b c ==> a b c

  X ==> X

  a X b ==> a 'b

I realize that this example could easily be done with regular expressions 
or just straightforward processing of byte strings using `port->bytes`. But 
I'd like to attack this problem using custom input ports. It feels like the 
right thing to do. With a custom input port, I can even do validation by 
logging errors. For example, if I'm given a byte that represents a 
non-ASCII letter, I can log an error and advance the port by one byte and 
try again.

I find the documentation for `make-input-port` rather heavy going. There 
are some examples there, which are a good start, but I'm still a bit lost. 
In the discussion of the peek and read procedures that are supplied as 
arguments to `make-input-port` (see `peek!` and `read!` below), I don't 
understand the byte strings that are being passed. It seems that this 
procedures are always given a mutable byte string, and the examples in the 
docs suggest that the byte string could/should indeed be modified. But in 
the input I have in mind, where peek and read might emit specials, it's 
unclear to me what I should stuff into the byte string. For example, if I'm 
peeking `Xm` (capital X and lowercase m), that should eventually get turned 
into `'m` (symbol whose name is "m"), so in my thinking, I'm looking at two 
bytes, not 1. But it seems that the peek and read procedures are always (?) 
given a byte string of length 1.

Anyway, this is perhaps all a long way of saying that I'm rather lost with 
my custom input port approach to the issue. Any advice would be 
appreciated. Maybe custom input ports are not the way to go about what I'm 
doing, but I'm not ready to abandon them just yet. Below you can read (ha!) 
the current status of where I am with this project.

Jesse


#lang racket/base

(require racket/match
 racket/format
 racket/port)

; Input strings are intended to be sequences of ASCII letters,
; uppercase and lowercase. Capital X followed by another letter
; should get turned into a symbol whose name is the one-character
; string consisting of that letter.
(define (make-cool-port in)
  (define (peek! bstr skip event)
(sleep 1)
(define bs (peek-bytes 2 skip in))
(cond [(eof-object? bs)
   eof]
  [else
   (match (bytes->list bs)
 [(list 88 a) ; 88 = X
  (lambda args 2)]
 [_ 1])]))
  (define (read! bstr)
(define peeked (peek! bstr 0 #f))
(cond [(eof-object? peeked)
   eof]
  [(procedure? peeked)
   (define bs (bytes->list (read-bytes (peeked) in)))
   (define a (cadr bs))
   (lambda args (string->symbol (~a (integer->char a]
  [else
   (read-byte in)
   peeked]))
  (make-input-port
   'xs
   read!
   peek!
   (lambda () (close-input-port

(define (read-it-all)
  (define t (peek-char-or-special))
  (log-error "peeked ~a" t)
  (unless (eof-object? t)
(read-char-or-special)
(read-it-all)))

(module+ main
  (call-with-input-string
   "Xaw"
   (lambda (in)
 (define p (make-cool-port in))
 (parameterize ([current-input-port p])
   (read-it-all)


-- 
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/a26f3849-5bec-4d41-bfb9-0f1127e8748cn%40googlegroups.com.


[racket-users] Rackefest 2021 Amateur Night: Call for participation

2021-03-07 Thread je...@lisp.sh
Friday and Saturday, March 26 & 27, 2021 is the next edition of Racketfest, 
the little Racket conference that could. On the homepage (
https://racketfest.com) you'll see an impressive lineup of 22 (!) talks 
from a star-studded array of Racket enthusiasts of all kinds.

This year Racketfest goes online, to Gather, following the brilliant 
example of the 2020 RacketCon. It'll be in two 4-hour blocks:

+ Friday, March 26 from 20:00 to 23:59 Central European Time (14:00 to 
17:59 US Eastern Time; 06:00 to 10:00 Australian Eastern Time, Saturday, 
March 27)

+ Saturday, March 27, again from from 20:00 to 23:59 Central European Time

You need to register first (https://racketfest.com/register) before 
moseying into the Racketfest space in Gather Town. Please get a ticket by 
Thursday, March 25 AOE so that I can upload the final list of email 
addresses to Gather. If the price is a barrier, just let me know -- thanks 
to our generous sponsors, we are happy to offer some diversity tickets. 
Just write to organiz...@racketfest.com if you'd like to be considered for 
such a ticket.

AMATEUR NIGHT FOR RACKETEERS!!

The Racketfest Organizers
Offer a Fine Array of Racket
Amusements, Projects, Delights
in

GATHER.TOWN!!

A Chance to Show Your Skills,
Hidden Talents, and New Work in
the Racket Programming Language
& Mingle with Your Fellow Racketeers

-- The Racketfest Organizers

-- 
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/cc0bc26f-ce03-40fc-9793-00aab69f0e9dn%40googlegroups.com.


[racket-users] the future of #lang web-server

2021-02-21 Thread je...@lisp.sh
#lang web-server is brilliant. This #lang is, in my view, a really 
excellent example of Racket's take on language-oriented programming. I find 
that the performance of continuations is just fine, given my limited use of 
them, and after a while you get used to the limitations and just program 
around them.

One thing that always bothers me about #lang web-server, though, is that 
there are a lot of provisos in the documentation. I'm talking about section 
3.2, "Usage Considerations", 
of https://docs.racket-lang.org/web-server/stateless.html, in the part 
after "However, there are some considerations you must make." Here a couple 
of questions:

+ " [#lang web-server] will create an immense number of lambdas and 
structures your program did not normally contain. The performance 
implication of this has not been studied with Racket."

This seems to me like an interesting research question. Has this question 
been taken up? I've tried taking a look on Google Scholar for any 
follow-up. I looked at citations of Jay's "Automatically RESTful web 
applications" and "The two-state solution: native and serializable 
continuations accord", but nothing stuck out to me (...which is not to say 
that there may have missed something).

+ Some limitations of #lang web-server seem don't seem obviously necessary, 
at least to someone who's not very familiar with the precise details of the 
underlying program transformations. You get used to them, but you wonder if 
there's some accessible world in which they work. For example: "You may not 
use parameterize 
,
 
because parameterizations are not serializable." Is that inherently so 
(that is, there's no way around that, no matter how clever you tweak the 
program transformations on which #lang web-server rests), or is that just a 
conequence of the particular approach taken (maybe it's possible, but no 
one has done it yet). Has there been any fresh thinking about these 
limitations?

Jesse

-- 
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/593786e4-7aca-4fe9-8b29-e58b9ff555dbn%40googlegroups.com.


Re: [racket-users] Re: changing my email address on the package server?

2021-02-21 Thread je...@lisp.sh
On Thursday, December 10, 2020 at 3:06:52 PM UTC+1 jay.mc...@gmail.com 
wrote:

The expected thing for you to do is to
>
> 1. Create a new account
> 2. Add that new account as an author to the packages
> 3. Remove your old account as an author to the packages
>
> If you want, though, I can do a search & replace in the database for you
>

I followed the recipe; it works, thanks! I don't have very many packages, 
so doing shi took only a couple of minutes. No need to do a manual rewrite.

-- 
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/88fd944d-c186-4708-a5df-61bada9a47aen%40googlegroups.com.


[racket-users] Racketfest 2021 Amateur Night: Call for Participation, lightning talks, artwork, posters, and more!

2021-02-15 Thread je...@lisp.sh
Save the date: March 26 & 27

AMATEUR NIGHT FOR RACKETEERS!!

The Racketfest Organizers
Offer a Proud Prelude to
the Next Racketfest
in

GATHER.TOWN!!

A Chance to Show Your Skills,
Hidden Talents, and New Work in
the Racket Programming Language
& Mingle with Your Fellow Racketeers

https://racketfest.com

This is a call for participation, whether in the form of

+ Prerecorded Lightning Talks
+ Screencasts
+ Posters
+ Artwork (à la standard-fish) for decorating the Gather space

This year Racketfest goes online, to Gather, following the brilliant 
example of the 2020 RacketCon. It'll be in two 4-hour blocks:

+ Friday, March 26 from 20:00 to 23:59 Central European Time (14:00 to 
17:59 US Eastern Time; 06:00 to 10:00 Australian Eastern Time, Saturday, 
March 27)

+ Saturday, March 27, again from from 20:00 to 23:59 Central European Time

The times are designed to make it possible for Europe-based Racketeers to 
get together as well as US-based ones, and even those based way out in 
Australia, New Zealand, and East Asia (at least for part of the event).

Your participation is needed! This year Racketfest is deliberately 
eschewing traditional talks in favor of a kind of "amateur night", where 
you can give a lightning talk (5-10 minutes, maybe more), submit a poster 
to be hung up, set up a stand for doing a tutorial on a topic of your 
choice. Here are some suggestions for what you could submit:

+ Anything you're working on. It doesn't have to be finished! We're talking 
about:

* libraries,
* #langs,
* applications whether command-line or GUI,
* tools

+ A DrRacket hack you like (Quickscript, anyone?), an Emacs racket-mode pro 
tip, or any other developer convenience

+ A paper you recently read (or wrote!)

+ A Racket project you'd like to start and perhaps need some feedback, 
guidance, or would like to solicit help

+ Something you'd like to teach others (break-out rooms will be available)

+ Open mic: sound off on some Racket-y topic that's on your mind

Please let me know if you would like to submit something! The call for 
participation is wide open. The bar for participation is kept deliberately 
low. You can do a 5-minute talk, right? You're even welcome to submit 
multiple lightning talks, if you wish.

In addition:

ARTWORK IS NEEDED

We will have an art gallery, where Racket-generated art will adorn the 
Gather walls. Please submit! Just reply to me privately, or write to 
organiz...@racketfest.com .

More details at https://racketfest.com . Register at 
https://racketfest.com/register . On Twitter at @racketfest .

-- The Racketfest Organizers

-- 
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/ba557e34-8a22-46ae-89f3-cc0e9ef2d74bn%40googlegroups.com.


Re: [racket-users] Typed Racket: Subtype of a struct typed where one field has a fixed value

2021-01-16 Thread je...@lisp.sh
I have it on good authority that parametric types are the way to go. Look 
at this:


#lang typed/racket
(struct (α β) point ([x : α] [y : β]))
(define-type Point point)

(define-type FixedY (Point Real 0))


That's it!
On Saturday, January 16, 2021 at 6:26:17 PM UTC+1 sorawe...@gmail.com wrote:

> According to https://docs.racket-lang.org/ts-reference/type-ref.html, 
> `Zero` exists. 
>
> On Sat, Jan 16, 2021 at 8:14 AM je...@lisp.sh  wrote:
>
>> Working in Typed Racket, consider a struct like this:
>>
>> (struct point
>>   ([x : Real]
>>[y : Real]))
>>
>> Is there a way to express the type of those points whose y field is, say, 
>> 0? In other words, I'd like a talk about point structs where x varies 
>> freely, but y is always 0. Obviously, I can make a function that 
>> discriminates this subclass, but I'm not sure how to express it as a type. 
>> I've hunted around in the docs, but I can't quite find what I'm looking for.
>>
>> -- 
>> 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/ee8bc006-590c-48f6-ac8b-4ef4f88019dfn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/racket-users/ee8bc006-590c-48f6-ac8b-4ef4f88019dfn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/54f032ae-925e-4b15-abe9-caae53e49b83n%40googlegroups.com.


[racket-users] Typed Racket: Subtype of a struct typed where one field has a fixed value

2021-01-16 Thread je...@lisp.sh
Working in Typed Racket, consider a struct like this:

(struct point
  ([x : Real]
   [y : Real]))

Is there a way to express the type of those points whose y field is, say, 
0? In other words, I'd like a talk about point structs where x varies 
freely, but y is always 0. Obviously, I can make a function that 
discriminates this subclass, but I'm not sure how to express it as a type. 
I've hunted around in the docs, but I can't quite find what I'm looking for.

-- 
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/ee8bc006-590c-48f6-ac8b-4ef4f88019dfn%40googlegroups.com.


Re: [racket-users] resumable exceptions (or: How can I break myself?)

2020-12-29 Thread je...@lisp.sh
Using parameters is a helpful suggestion. In my case, it's enough to just 
record the error and add a substitution character (explicitly marked as 
induced, that is, wasn't actually present in the input) without needing to 
rewind or advance the input port. It's sufficient for my purposes to just 
accumulate the errors as they occur. Thanks!

On Tuesday, December 29, 2020 at 12:32:52 PM UTC+1 rmculp...@gmail.com 
wrote:

> I would suggest avoiding exceptions and continuations and have a separate 
> parameter[*] that holds the current unexpected character handler. You'll 
> still have to figure out what kind of thing it returns (void, or a 
> replacement character, or a new input port?), but you have to do that 
> anyway. 
>
> The handler can raise an ordinary, non-continuable exception if it can't 
> repair the problem. Or it could do weird continuation stuff like capture 
> the part of the continuation since the handler was installed and apply it 
> to multiple characters to see if one works (but that would not work well 
> with stateful objects like input ports).
>
> Ryan
>
> [*] or argument, if that turns out to fit your code better
>
>
> On Tue, Dec 29, 2020 at 11:27 AM je...@lisp.sh  wrote:
>
>> I'm working on a tokenizer for that involves some level of 
>> "self-healing": if the input port contains an unexpected character, an 
>> error token is to be emitted, but computation isn't over -- we are to 
>> continue by substituting the bad character with a good one, emitting that, 
>> too (thereby recovering), and keep rolling.
>>
>> When the tokenizer encounters an unexpected character, what I'd like to 
>> do is similar to raising/throwing an exception, but what's going on isn't 
>> (in my understanding) quite the same as raising an exception, because I 
>> don't want to just have some ambient exception handler deal with the error, 
>> since my understanding is that exceptions don't have enough information to 
>> simply resume the computation. I guess I'd like to install a prompt, but 
>> when control goes back to the prompt, I'd like it to be possible to resume 
>> the computation.
>>
>> An old discussion here from 2015, with John Carmack ("continuing after a 
>> user break"), comes close to what I have in mind. It's about setting up a 
>> handler for breaks. I guess what I have in mind are breaks, but what's not 
>> clear to me is how to raise them in my code. It seems like `break-thread` 
>> is the only way to do that? The discussion of breaks in the docs involves a 
>> lot of talk about threads and user interaction. But what I'm doing isn't 
>> really about threads at all (I'm making a tokenizer, not a REPL or other 
>> interactive program), so it leaves me feeling uncertain that I want breaks 
>> after all. And even if breaks are a technically viable solution, I wonder 
>> if there are any performance penalties or other gotchas that could be 
>> avoided by using some other continuation forms.
>>
>> Here's some pseudo-Racket that gets at what I'm looking for:
>>
>> ; compute a list of tokens
>> ; -> (listof (char? or eof))
>> (define (handle-many)
>> (watch-for-break (lambda (e) (handle-break e))
>> (match (handle-one)
>> [(? eof-object?) '(eof)]
>> [(? char? c) (cons c (handle-one))])))
>>
>> ; -> char? or eof
>> (define (handle-one)
>> (define c (peek-char))
>> (match c
>> [(? eof-object?) eof]
>> [#\f
>> (break-with c) ; pass the unexpected character to the caller...
>> (read-char in) ; ...but after that, resume here!
>> #\a]
>> [else
>> (read-char in)
>> #\b]))
>>
>> Any suggestions?
>>
>> Thanks,
>>
>> Jesse
>>
>> -- 
>> 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/e455208d-0ac9-41d6-ad08-dd3d08e12baan%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/racket-users/e455208d-0ac9-41d6-ad08-dd3d08e12baan%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/e6445f8d-3008-47fc-9b4d-cee9785789cbn%40googlegroups.com.


[racket-users] resumable exceptions (or: How can I break myself?)

2020-12-29 Thread je...@lisp.sh
I'm working on a tokenizer for that involves some level of "self-healing": 
if the input port contains an unexpected character, an error token is to be 
emitted, but computation isn't over -- we are to continue by substituting 
the bad character with a good one, emitting that, too (thereby recovering), 
and keep rolling.

When the tokenizer encounters an unexpected character, what I'd like to do 
is similar to raising/throwing an exception, but what's going on isn't (in 
my understanding) quite the same as raising an exception, because I don't 
want to just have some ambient exception handler deal with the error, since 
my understanding is that exceptions don't have enough information to simply 
resume the computation. I guess I'd like to install a prompt, but when 
control goes back to the prompt, I'd like it to be possible to resume the 
computation.

An old discussion here from 2015, with John Carmack ("continuing after a 
user break"), comes close to what I have in mind. It's about setting up a 
handler for breaks. I guess what I have in mind are breaks, but what's not 
clear to me is how to raise them in my code. It seems like `break-thread` 
is the only way to do that? The discussion of breaks in the docs involves a 
lot of talk about threads and user interaction. But what I'm doing isn't 
really about threads at all (I'm making a tokenizer, not a REPL or other 
interactive program), so it leaves me feeling uncertain that I want breaks 
after all. And even if breaks are a technically viable solution, I wonder 
if there are any performance penalties or other gotchas that could be 
avoided by using some other continuation forms.

Here's some pseudo-Racket that gets at what I'm looking for:

; compute a list of tokens
; -> (listof (char? or eof))
(define (handle-many)
(watch-for-break (lambda (e) (handle-break e))
(match (handle-one)
[(? eof-object?) '(eof)]
[(? char? c) (cons c (handle-one))])))

; -> char? or eof
(define (handle-one)
(define c (peek-char))
(match c
[(? eof-object?) eof]
[#\f
(break-with c) ; pass the unexpected character to the caller...
(read-char in) ; ...but after that, resume here!
#\a]
[else
(read-char in)
#\b]))

Any suggestions?

Thanks,

Jesse

-- 
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/e455208d-0ac9-41d6-ad08-dd3d08e12baan%40googlegroups.com.


[racket-users] Re: changing my email address on the package server?

2020-12-09 Thread je...@lisp.sh
It occurs to me that another approach here -- possibly a necessary one 
given the current setup of the package server -- would be to manually 
intervene. Presumably, it's possible for a package server admin to just 
manually associate a package with a certain account?

On Thursday, December 10, 2020 at 6:44:41 AM UTC+1 je...@lisp.sh wrote:

> Is it possible to change my email address on the package server? It 
> doesn't appear so, but perhaps I'm missing something. If not, what would be 
> the recommended way of accomplishing an email change? I can create a new 
> account, of course. But how to claim ownership of an existing package? Can 
> one "abandon" a package with account X and "claim" the package with account 
> Y?
>
> Jesse
>

-- 
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/d9c9ce65-2070-460c-b679-fa2e187da704n%40googlegroups.com.


[racket-users] changing my email address on the package server?

2020-12-09 Thread je...@lisp.sh
Is it possible to change my email address on the package server? It doesn't 
appear so, but perhaps I'm missing something. If not, what would be the 
recommended way of accomplishing an email change? I can create a new 
account, of course. But how to claim ownership of an existing package? Can 
one "abandon" a package with account X and "claim" the package with account 
Y?

Jesse

-- 
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/f32f00b2-a6be-4049-99f0-82ec39139e22n%40googlegroups.com.