Re: [racket-users] make extensions or replacements

2019-04-16 Thread david
Hendrik, What is that you are trying to do, maybe you are misunderstanding some concept about make? It seems to me that the whole point of make is to "run a program" whenever some of the files have changed. Regards, David On 2019-04-16 21:25, Hendrik Boom wrote: I'm sending

Re: [racket-users] make extensions or replacements

2019-04-16 Thread david
I think the tool to use depends on what you want to achieve =) Do you have an example of what you think is missing? I like the idea that maybe you want to make use racket to generate some Makefile's to your liking. Maybe using #lang scribble/text Best Regards, David On 2019-04-16

Re: [racket] iPhone

2010-06-18 Thread David Brown
oftware to Apple's store. No, the free iPhone SDK doesn't let you send programs you write to your phone. You can only run them in a simulator. You have to pay money for the privilege of being able to run them on a real device. David ___

Re: [racket] [The Racket Blog] New comment on Racket.

2010-06-18 Thread David Brown
help with this kind of thing, so it is even a supported thing to do. David _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] [The Racket Blog] New comment on Racket.

2010-06-18 Thread David Brown
inary Ubuntu on a Nexus One, although it isn't all that useful as a phone that way. Some people have expressed a desire to run Android on top of an ordinary Linux userspace, but I don't know if any progress has been made in making that happen. David __

Re: [racket] Racket & Netbook

2010-06-30 Thread David Brown
but build something large, like Racket itself, and expect it to not be very usable while it is building. I would expect the Atom to have better thermal properties, though, although it is slower overall. David _ For list-related administrative tasks

Re: [racket] [htdp] Help with Exercise 12.4.2

2010-07-06 Thread David Yrueta
Hi Sam -- As Jos commented, this is a very tough exercise, but it looks like you're off to a good start. The most obvious problem with your current solution lies with 'insert-everywhere/in-single-word.' My first suggestion is to check the function examples to make sure the values they expect are

Re: [racket] [htdp] Help with Exercise 12.4.2

2010-07-06 Thread David Yrueta
my base case the function should return a list of words but before returned a single word. Very good decision. Now take a close look at how you phrased the second condition. According to the design recipe, it should be structured to match the second condition of your data definition for list-of-

[racket-users] exporting example code from slideshow documents

2021-02-21 Thread David Bremner
I mostly use emacs org-mode documents for making (latex beamer) slide decks. This allows me to "tangle" the example code from the slides, along with whatever needed supporting material, to generate example programs that I can share with students. Is there a (pre-built?) way to do something simil

[racket-users] Verifying the contract on a function

2021-02-24 Thread David Storrs
I have some macros that generate functions. For testing purposes, I'd like to be able to ask the function "Do you have this contract ?" Is there a way to do that? I've been digging through the Contracts section and googled for it but I'm not seeing one. -- You received this message because you

Re: [racket-users] Verifying the contract on a function

2021-02-24 Thread David Storrs
Aha. That and contract-equivalent? do what I need. Thanks, Sam. On Wed, Feb 24, 2021 at 10:20 PM Sam Tobin-Hochstadt wrote: > You can use the value-contract function, along with contract-stronger? to > do this. > > Sam > > On Wed, Feb 24, 2021, 6:03 PM David Storrs wrote

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread David Storrs
Hi IF, I think this is what you want. You were right about the issue -- you were consing onto the history list but then immediately throwing away the result because it wasn't modifying the original history value. #lang racket (struct message (str sender recipient) #:transparent) ; This returns

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-25 Thread David Storrs
()] [else (say input "I didn't understand that")])) (let loop ([history '()]) (display "Input: ") (define input (message (read-line (current-input-port) 'any) "participant" "me")) (display "Chatbot: ") (if (equal? (messag

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread David Storrs
This is very cool. You might take a look at the `threading` module for additional ideas: https://docs.racket-lang.org/threading/index.html On Tue, Mar 9, 2021 at 10:20 AM Roger Keays wrote: > Hi all, > > I recently publish a new package called *fluent* which adds some syntax > enhancements to R

Re: [racket-users] Word Count program/benchmark performance

2021-03-18 Thread David Storrs
Hi Pawel, I'll take a look at the code later, but did that 21 seconds include startup time for the interpreter? On Thu, Mar 18, 2021, 9:24 AM Pawel Mosakowski wrote: > Hello, > > I am a Racket beginner and I have come across this article: > > > https://benhoyt.com/writin

[racket-users] Best way to say 'block until true'?

2021-03-19 Thread David Storrs
Suppose I have a function that tests for some condition, e.g. (define current-user (make-parameter #f)) (define (current-user-set?) (not (false? (current-user))) What is the best way to say "wait until 'current-user-set?' returns true"? I've been through the Events chapter in the Reference and no

Re: [racket-users] Best way to say 'block until true'?

2021-03-19 Thread David Storrs
can't think of anything but a poll. > > > > -- > > Jay McCarthy > > Associate Professor @ CS @ UMass Lowell > > http://jeapostrophe.github.io > > Vincit qui se vincit. > > > > On Fri, Mar 19, 2021 at 11:59 AM David Storrs > wrote: >

Re: [racket-users] Best way to say 'block until true'?

2021-03-19 Thread David Storrs
check-x) ; pauses for 3 seconds, then outputs "success" (check-x) ; outputs "success" immediately (check-x) ; ibid > > -- > Jay McCarthy > Associate Professor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Fri, Mar 19,

Re: [racket-users] Best way to say 'block until true'?

2021-03-19 Thread David Storrs
rofessor @ CS @ UMass Lowell > http://jeapostrophe.github.io > Vincit qui se vincit. > > On Fri, Mar 19, 2021 at 1:02 PM David Storrs > wrote: > > > > > > > > On Fri, Mar 19, 2021 at 12:02 PM Jay McCarthy > wrote: > >> > >> The best thing is t

Re: [racket-users] Re: Racket on Corporate Desktop Windows

2021-03-30 Thread David Storrs
Slightly offtopic, but I wanted to point out that when GMail sees a conversation happening it collapses all the emails into one line and displays the first names of the first two posters side-by-side with the subject. I am tickled to have a thread from Bruce O'Neel and Wayne Harris in my email. O

[racket-users] Package server certificate expired

2021-04-01 Thread David Storrs
Not sure where the right place is to report this, but the certificate for pkgd.racket-lang.org expired on 3/31/2021. -- 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

[racket-users] New package announce: value-evt

2021-04-01 Thread David Storrs
Wraps an arbitrary value into a synchronizable event. The synchronization result of the event is the original value, with two exceptions: procedures sync to their return value and lists sync recursively. Both of these values can be disabled via keywords. The package server is telling me that it ne

Re: [racket-users] New package announce: value-evt

2021-04-01 Thread David Storrs
ocumentation" but the .html file did not appear in the directory and it's not linked into my local doc set. I hadn't noticed because I had previously created the file directly using 'scribble value-evt.scrbl' What might I have done wrong? > On 4/1/21 12:12 PM, David St

Re: [racket-users] New package announce: value-evt

2021-04-01 Thread David Storrs
x27;m wondering if that hid defaults that would otherwise be > provided. > > https://github.com/dstorrs/value-evt/blob/master/info.rkt > https://github.com/dstorrs/thread-with-id/blob/master/info.rkt > > If that's not it, I'd have to take time after work to look more clos

[racket-users] How to make a sandboxed evaluator in Scribble

2021-04-01 Thread David Storrs
I cargo-culted this chunk of code and, predictably, it is now failing for reasons I don't understand. This is in the value-evt scribble file; it works fine when I build the file manually but it's failing in the package server build: @(define eval (call-with-trusted-sandbox-configuration (l

Re: [racket-users] How to make a sandboxed evaluator in Scribble

2021-04-01 Thread David Storrs
On Thu, Apr 1, 2021 at 3:58 PM Sam Tobin-Hochstadt wrote: > > You might use `(list 'value-evt)` if that's the require you want. > > Sam ... Blarg. Yes, thank you. Should have realized. > > On Thu, Apr 1, 2021 at 3:41 PM David Storrs wrote: > > > &g

[racket-users] Running user-supplied code in a place

2021-04-07 Thread David Storrs
I'm trying to expand a task manager to optionally use places and I'm having some trouble understanding the issue. ; test.rkt #lang racket (provide start) (define (start thnk) (sync (place ch (place-channel-put ch (thnk) ; x.rkt #lang racket (require "test.rkt") (start (thunk 'ok)) Result

Re: [racket-users] Werid contract violation blame erros

2021-04-07 Thread David Storrs
I've always liked define/contract because it guarantees the safety of the function from erroneous calls by other functions in the module, which helps with debugging and testing. It sounds like you think that's a bad move? On Wed, Apr 7, 2021 at 4:35 PM Robby Findler wrote: > > The short answer:

Re: [racket-users] Running user-supplied code in a place

2021-04-07 Thread David Storrs
Thanks, George. This helped a lot. On Wed, Apr 7, 2021 at 9:03 PM George Neuner wrote: > > > On 4/7/2021 5:34 PM, David Storrs wrote: > > I'm trying to expand a task manager to optionally use places and I'm > > having some trouble understanding the issue. >

Re: [racket-users] Injecting local contracts for prefab constructors

2021-05-12 Thread David Storrs
If you're willing to accept a low tech solution, might I suggest this: $ perl -i.bak -lpe 's/\(foo/\(make-foo/g' *.rkt Also, I'll self-plug and point you towards this: #lang racket (require struct-plus-plus ) (struct++ foo ([a real?]) (#:omit-reflection) #:prefab) (define checked (foo++ #:a 7

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

2021-05-13 Thread David Storrs
On Wed, May 12, 2021 at 9:21 PM Ben Greenman wrote: > On 5/12/21, Robert Haisfield wrote: > > Daniel, that's awesome. How would I filter down this list according to > the > > regex? > > > > (define list-of-files (map path->string (directory-list starting-path))) > > You can wrap it in a filter:

Re: [racket-users] Help in understanding 'letrec' example

2021-05-13 Thread David Storrs
Incidentally, a more concise way of doing this would be: (define target (build-path "tarzan")) ; convert to path only once (for/or ([item (in-directory "/tmp/test")]) ; or whatever directory you want to start in (equal? target (file-name-from-path item))) On Sat, May 8, 2021 at 3:50 AM Utkarsh

[racket-users] Sharing scope in setup/cleanup for dynamic-wind?

2021-05-18 Thread David Storrs
dynamic-wind is nice because it guarantees that the pre- and postconditions for a chunk of code will be run regardless of continuation jumps, exceptions, etc. The only issue I have is that the three thunks do not share scope, making it difficult to do setup/teardown workflows. I feel like I shoul

Re: [racket-users] Sharing scope in setup/cleanup for dynamic-wind?

2021-05-18 Thread David Storrs
conn "foo")) > (lambda () (finalize-connection conn > > Sam > > On Tue, May 18, 2021 at 2:08 PM David Storrs > wrote: > > > > dynamic-wind is nice because it guarantees that the pre- and > postconditions for a chunk of code will be run regardless of

Re: [racket-users] Sharing scope in setup/cleanup for dynamic-wind?

2021-05-19 Thread David Storrs
On Tue, May 18, 2021 at 4:09 PM Philip McGrath wrote: > On Tue, May 18, 2021 at 3:52 PM Sam Tobin-Hochstadt > wrote: > >> I think the key question is what you want to happen if you would need >> to re-run the "pre" thunk, because you re-enter the code via a >> continuation. >> >> In many cases,

Re: [racket-users] Freenode -> libera.chat

2021-05-20 Thread David Storrs
What happened with Freenode? On Thu, May 20, 2021 at 8:12 AM Tony Garnock-Jones < to...@leastfixedpoint.com> wrote: > On 5/20/21 1:28 PM, Paulo Matos wrote: > > Tony Garnock-Jones writes: > >> With the recent damage to the Freenode IRC network, a new `#racket` has > >> been founded on irc.libera.

Re: [racket-users] Registered on irc.libera.chat

2021-05-24 Thread David Bremner
Hendrik Boom writes: > > Experience in other channels indicates that saying you are moving to > libera.chat will get the quick response of having your administrator > privileges revoked and having that message deleted. > For what it is worth, that has not been my experience. I have moved sever

Re: [racket-users] Registered on irc.libera.chat

2021-05-26 Thread David Bremner
Yury Bulka writes: > #haskell seems to have been taken over: > > https://www.reddit.com/r/haskell/comments/nl74hc/freenode_has_unilaterally_taken_over_haskell/ > Yes, I spoke too soon apparently. #notmuch was also hijacked last night. I have deleted my freenode account. d -- You received thi

Re: [racket-users] Computed properties for a struct?

2021-06-07 Thread David Storrs
On Fri, Jun 4, 2021 at 6:21 PM flirora wrote: > Is there a way to define a struct so that it has a field whose value is > filled in (instead of passed to the constructor) with a value derived from > other fields? For example, could you define a struct foo with two > explicit fields, x and y, plus

[racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
I'm getting bytes off the wire and attempting to write them to a port. I have a check in place to verify that the pipe has free space but when I attempt to reports that yes, there is space, and then it writes and fails regardless and I'm not sure why. The following is a simplified version of the

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
output: avail: 16777216 space available? #t pipe content length: 0 rx buffer overflow. pipe content length: 15, written 15, expected 509 done On Wed, Jun 16, 2021 at 2:11 PM George Neuner wrote: > > On 6/16/2021 1:19 PM, David Storrs wrote: > > I'm getting bytes off the w

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
On Wed, Jun 16, 2021 at 2:25 PM George Neuner wrote: > > On 6/16/2021 2:16 PM, David Storrs wrote: > > Damn. Sorry, I posted out of sync versions of code and output. This is > correct: > > (define bstr (make-shared-bytes 509 5)) > (define rx-pipe-size 16777216) > (

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
For the record, it doesn't work in 8.1 either. On Wed, Jun 16, 2021 at 2:44 PM David Storrs wrote: > > > On Wed, Jun 16, 2021 at 2:25 PM George Neuner > wrote: > >> >> On 6/16/2021 2:16 PM, David Storrs wrote: >> >> Damn. Sorry, I posted out o

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
Got it. Thanks. On Wed, Jun 16, 2021 at 3:45 PM Matthew Flatt wrote: > At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > > It looks like the problem > > is that "flush" is not defined ... > > Yes, "returns without blocking after writing as many bytes as it can > immediately flush" is va

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread David Storrs
pipe content length: ~a, written ~a, expected ~a" (pipe-content-length rx-out) num-bytes-written (bytes-length bstr (displayln "done") output avail: 16777216 space available? #t pipe content length: 0 done test.r On Wed, Jun 16, 2021 at 4:13 PM David Storrs wrote: >

[racket-users] SISAL like interpreters in racket/scheme

2021-06-23 Thread David Bremner
I'm interested in SISAL and the IF1 intermediate form. I found a typescript based interpreter [1] and an old version of the original compiler in CVS [2], but would love not to have to deal with typescript or CVS. Toy subsets or similar languages welcome! [1]: https://github.com/parsifal-47/sisal

[racket-users] invalid memory error from parameter with contracted guard

2021-06-23 Thread David Storrs
I'm seeing an "invalid memory reference. Some debugging context lost" error when using a parameter that has a guard function AND the guard function is user-defined AND the guard function has a contract on it. What is the right place to file this aside from the list? Demonstration: #lang racket/

Re: [racket-users] invalid memory error from parameter with contracted guard

2021-06-24 Thread David Storrs
Great! You're the best, Matt. What was the issue, if it's simple enough to explain? On Wed, Jun 23, 2021, 11:53 PM Matthew Flatt wrote: > Hi David, > > Thanks for the report! This is fixed for the next release and in > the current snapshots. >

Re: [racket-users] invalid memory error from parameter with contracted guard

2021-06-24 Thread David Storrs
yer, but applying a > parameter's guard procedure didn't use `|#%app|` as it should have. The > repair was to add `|#%app|`. > > At Thu, 24 Jun 2021 09:55:39 -0400, David Storrs wrote: > > Great! You're the best, Matt. What was the issue, if it's simple enough

[racket-users] Moving a function into a different `place?`

2021-07-01 Thread David Storrs
What is the best way to pass a function into a child `place`? I've got a server function that accepts a dispatch function as one of its arguments and I need to be able to run the server in a separate `place` (in the dynamic-place sense) because it's part of a GUI application. [details] My initial

Re: [racket-users] Moving a function into a different `place?`

2021-07-01 Thread David Storrs
the Racket version it's fine but then your interface doesn't match what the user is expecting. https://groups.google.com/g/racket-users/c/wexYxYYU7GE/m/3zXxn6NoAwAJ?pli=1 > Sam > > On Thu, Jul 1, 2021 at 2:36 PM David Storrs > wrote: > > > > What is the best way to

[racket-users] Is anyone looking to hire a junior web developer?

2021-07-10 Thread David Storrs
I have an acquaintance who has been learning web development as a way out of the poverty trap she's stuck in. I don't have personal experience with her skills but I can say that she's highly motivated and will work hard. If anyone has a Python or web-development job opening, could you drop me a li

[racket-users] Rosette variable definitions from an s-expression (I'm new to Rosette)

2021-07-12 Thread David Wonnacott
I'm hoping there are readers of this list who are familiar with Rosette , or could at least suggest a better place for me to ask such questions. I'm trying to use Rosette for some symbolic code simplification, and I'd like to be a

Re: [racket-users] Ubuntu PPA also updated to v8.2

2021-07-30 Thread David Bremner
Joseph Turco writes: > Now we just need the Debian ppas to update to 8.2 for x86 and arm. I'm > more inclined for arm as building racket on a 64bit distro on a pi 400 > hangs the OS. I don't know what you refer to when you say "Debian ppas", but 8.2 is available in Debian experimental for amd64,

Re: [racket-users] Ubuntu PPA also updated to v8.2

2021-07-31 Thread David Bremner
Joseph Turco writes: > So I tried installing racket 8.2 from the experimental repos > (downloaded it) and the dependencies (newer version of libc6) will > break some things. So install at your own risk. I'll stick with 7.2 > for now. Yes, I should have mentioned those packages only work with a d

Re: [racket-users] [ANN] Introducing "social" contracts

2021-08-16 Thread David Storrs
Hi Siddhartha, Will this package handle ->* and ->i, either now or in the future? On Sat, Aug 14, 2021 at 1:40 PM Siddhartha Kasivajhula wrote: > Fellow Scheming Racketeers, > When you've written a function that takes an integer and returns another > one, you may write a contract for it as (->

[racket-users] Changing log destination from the environment

2021-08-25 Thread David Storrs
I've always used loggers in their default form, where they send to the terminal, and then I use tee if I want it to go to a file as well. That's easy and effective but there's got to be a better way. Two questions: 1) Is there a way to change logger destinations from the environment such that mo

[racket-users] New module log-bracketed; should probably be something else

2021-09-02 Thread David Storrs
I often find that for debugging I want to see a log message saying "I'm about to do X" followed by X followed by "I'm done with X" and I want it to return the result of X. I wrote this macro and posted it to the package server: https://pkgs.racket-lang.org/package/log-bracketed In retrospect, the

Re: [racket-users] New module log-bracketed; should probably be something else

2021-09-03 Thread David Storrs
lt but I prefer to give the option to use a format string if you want something different. > On Thu, Sep 2, 2021 at 2:06 PM Martin DeMello > wrote: > >> I do like the second form better, especially since the actual code being >> run is not obscured by simply being the last argument

[racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-08 Thread David Storrs
raise-arguments-errors produces neatly stacked key/value pairs with whitespace arranged such that values line up even when keys are of different lengths. Is there an easy way to get that for something that is not an error? I've been through both The Printer and the raise-arguments-error sections

[racket-users] Why does syntax-parser work here but not syntax-parse?

2021-09-08 Thread David Storrs
This is from the documentation and it obviously works: (define parser1 (syntax-parser [((~alt (~once (~seq #:a x) #:name "#:a keyword") (~optional (~seq #:b y) #:name "#:b keyword") (~seq #:c z)) ...) 'ok])) (parser1 #'(#:a 1)) When run it yields 'ok. If I chan

Re: [racket-users] Why does syntax-parser work here but not syntax-parse?

2021-09-08 Thread David Storrs
*headdesk headdesk headdesk headdesk headdesk* Thank you. On Wed, Sep 8, 2021 at 2:02 PM Stephen Chang wrote: > > shouldn't the entire parenthesized expression be given to the macro > processor and then replaced with something valid before being rejected? > > That would be true if you're defini

[racket-users] [module announce] in-out-logged

2021-09-08 Thread David Storrs
Package: https://pkgs.racket-lang.org/package/in-out-logged Wraps a chunk of code in "entering" and "leaving" log messages, returns the value(s) produced by the code. Example: Keyword arguments are all optional. #:to and #:at may appear in either order but #:with must come last if it is present.

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
assoc > list would make sense too... > (prefixln #:prefix (~a k ": ") #:align 'right > v)) > > (current-prefix-length 0) > (displayln "") > (displayln "indentation through multiple nested calls:") > (with-indent >

Re: [racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
2021 at 5:26 PM Laurent wrote: > Maybe take a look at the text-table package. > > On Wed, 8 Sep 2021, 14:41 David Storrs, wrote: > >> raise-arguments-errors produces neatly stacked key/value pairs with >> whitespace arranged such that values line up even when keys are

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
On Fri, Sep 10, 2021 at 1:33 PM kamist...@gmail.com wrote: > I like the apply max instead of foldl, quite a bit easier. > > Instead of `(format "\t~a" (~a (~a k #:width width) v #:separator "\t"))` > I prefer one of these: > (~a "\t" (~a k #:width width) "\t" v) > (~a #:separator "\t" "" (~a k #:

[racket-users] Set logging (or env variables generally) in racket-mode

2021-09-14 Thread David Storrs
racket-mode is terrifically useful, and my only issue with it is that it doesn't show logging messages. Is there a way to make it do that? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-16 Thread David Storrs
Sorawee answered your immediate question, but I figured I'd offer a pointer to Fear of Macros in case you haven't seen it: https://www.greghendershott.com/fear-of-macros/ It helped me a lot when I was trying to get my head around macros. Also, I got a lot of value from reading through the code of

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread David Storrs
NB: You did a 'reply' to Sorawee instead of to the list as a whole, and also the same for the email I sent. Probably good to 'reply all' so that the list gets the full context. Sorawee offered some good advice on how to do the things you're asking about and asked relevant questions. I'm wonderi

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread David Storrs
dotted accessors for clarifying field names. It doesn't support inheritance but it would make it easy to do many of the things I think you might be interested in. https://docs.racket-lang.org/struct-plus-plus/index.html On Fri, Sep 17, 2021 at 3:08 PM David Storrs wrote: > > NB:

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

2021-09-24 Thread David Storrs
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"

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

2021-09-24 Thread David Storrs
t; Okay, but what about in (with-handlers ((symbol? (lambda (e) (displayln e ...)? That's an association between two things but not a binding pair. Also, sorry, I should have been clearer up front by giving more than the one example. > On Fri, Sep 24, 2021 at 10:25 AM David Storrs > w

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

2021-09-24 Thread David Storrs
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: > >&

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

2021-09-24 Thread David Storrs
On Fri, Sep 24, 2021 at 2:37 PM John Clements wrote: > 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 in

Re: [racket-users] Strange readline/racket-mode behavior

2021-09-24 Thread David Storrs
The dev team will have to answer your actual question, but I thought I might offer a more compact solution that incorporates the fix you mentioned: (define (yn #:read-one-char? [read-one-char? #f]) (display "y/n: ") (flush-output (current-output-port)) (define func (if read-one-char? read-ch

[racket-users] Having trouble getting documentation to generate

2021-09-28 Thread David Storrs
Summary: Documentation for a new module is not being generated when I would expect it to be and when I do it manually it ends up not linking basic Racket items. I've done a lot of searching to figure it out and would appreciate some help. Long version: I published a module a few days ago called

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread David Storrs
7;s getting that. On Tue, Sep 28, 2021 at 1:36 PM Ben Greenman wrote: > On 9/28/21, David Storrs wrote: > > Summary: Documentation for a new module is not being generated when I > > would expect it to be and when I do it manually it ends up not linking > > basic Racket items.

Re: [racket-users] [ANN] fmt: a Racket code formatter

2021-09-28 Thread David Storrs
This is very cool, Sorawee. Thank you for sharing. On Tue, Sep 28, 2021 at 2:03 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Announcing the pre-alpha version of fmt, a Racket code formatter. Code > formatter is a tool that reformats your code so that it conforms to a style > co

[racket-users] [ANN] try-catch - exception handling with dynamic-wind guarantees

2021-09-28 Thread David Storrs
Module name: try-catch https://pkgd.racket-lang.org/pkgn/package/try-catch Lisp stereotypically has a problem that it's super easy to write your own code so the library ecosystem ends up fractured, with multiple options to do the same thing. McCarthy forbid that I should break the stereotype, so

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread David Storrs
On Tue, Sep 28, 2021 at 3:30 PM Ben Greenman wrote: > On 9/28/21, David Storrs wrote: > > > Also, any ideas on why the remove fails? > > > > $ raco pkg remove try-catch > > raco pkg remove: invalid `deps' specification > > specification: '("

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread David Storrs
On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt wrote: > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > I haven't tried `raco setup` to look at its output, but one possible > > improvement would be for whatever code complains about the "invalid > `deps' > > specification" to always r

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread David Storrs
Cool, thanks. On Wed, Sep 29, 2021 at 11:23 AM Matthew Flatt wrote: > At Wed, 29 Sep 2021 11:20:47 -0400, David Storrs wrote: > > On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt > wrote: > > > > > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > &g

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-01 Thread David Storrs
On Fri, Oct 1, 2021 at 11:58 AM Hendrik Boom wrote: > On Fri, Oct 01, 2021 at 02:22:14PM +, Jesse Alama wrote: > > Hello, > > > > Have you ever wished you could do a C-style return in the middle > > of a block of Racket code? When you're in the heat of things with > > a complicated problem wh

[racket-users] rename-out not working as expected

2021-10-12 Thread David Storrs
--- ; test.rkt #lang racket (define (do-something) "ok") (provide do-something) ; test2.rkt #lang racket (require "test.rkt") (provide (rename-out [do-something do-it])) #lang racket (require "test2.rkt") do-it --- The printed value is # although I was expecting #. Have

Re: [racket-users] rename-out not working as expected

2021-10-12 Thread David Storrs
ut`; you might want > this library to change the dynamic displayed name: > https://docs.racket-lang.org/static-rename/index.html > > -- > William J. Bowman > > On Tue, Oct 12, 2021 at 03:07:13PM -0400, David Storrs wrote: > > --- > > ; test.rk

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-22 Thread David Storrs
On Thu, Oct 21, 2021 at 5:26 AM George Neuner wrote: > > On 10/20/2021 5:53 PM, unlimitedscolobb wrote: > > > You can get a lot of mileage out of the 'set' datatype, which removes ordering from the equation, especially since lists will act as sets in a pinch. (When you want to improve performanc

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread David Storrs
I'd be interested to know this as well. It sounds like something that isn't possible in Racket, since it's essentially specifying how a module can do its job and that requires a level of introspection that I think is excluded by design. On Thu, Oct 21, 2021 at 10:37 AM kalime...@gmail.com wrote:

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread David Storrs
On Mon, Oct 25, 2021 at 10:25 PM 'Joel Dueck' via Racket Users < racket-users@googlegroups.com> wrote: > > >- Removing dependencies: yes, I see the appeal. I’m really not eager >to reimplement all the timezone handling and temporal comparison stuff in >gregor, though. > > Joel > Havin

Re: [racket-users] Adding keybindings to debug

2021-10-28 Thread David Storrs
I don't know if this fills the need but it's a useful thing to know regardless: macOS will allow you to add a keyboard shortcut for any menu item in any application. https://support.apple.com/guide/mac-help/create-keyboard-shortcuts-for-apps-mchlp2271/mac On Thu, Oct 28, 2021 at 1:10 PM James Zol

Re: [racket-users] Adding keybindings to debug

2021-10-30 Thread David Storrs
The menu strings get very fussy, so check that you entered it exactly right, and do a very simple one to start. That's the usual cause in my experience. On Sat, Oct 30, 2021, 7:25 AM Mike Engelhart wrote: > On Mac OS I tried adding keyboard shortcuts using the linked Apple support > document to

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

2021-10-31 Thread David Storrs
On Sun, Oct 31, 2021, 7:49 AM Jens Axel Søgaard wrote: > Hi Brian, > > A few random thoughts: > > > I would like, given only the symbol foo referring to the struct type > itself, > > to discover (at least) the list of procedures foo?, foo-a, foo-b, plus > > anything else the author of foo (the ty

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

2021-10-31 Thread David Storrs
][+]" name > "struct")) > struct-plus-plus)) > > (struct horse (breed color legs)) > > (define beauty (horse 'arabian 'black 4)) > > (define info (force (struct-ref beauty))) > (map struct-field-name (struct-info-fields info)) > > The res

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

2021-11-06 Thread David Storrs
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-

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

2021-11-11 Thread David Storrs
ly 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? > > On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote: > >>

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

2021-11-11 Thread David Storrs
Out of curiosity, what is it that you're trying to achieve here? You're not going to program in the fully-expanded language, you're going to program in something higher level. Is this purely a "learning assembly code is good because it gives you a better understanding of machine architecture" thi

[racket-users] Best way to append an element to a list?

2021-11-16 Thread David Storrs
If I want to add an element to the end of an immutable list, is it better to do: (append current-list (list new-element)) or (reverse (cons new-element (reverse current-list))) or something else? I would imagine it's the first one because that should be a single traversal and link add instead of

Re: [racket-users] Best way to append an element to a list?

2021-11-16 Thread David Storrs
unction) > (printf "~a: " (object-name function)) > (time > (void (for/fold ([l null]) > ([n (in-range target-length)]) > (function l n) > > (profile A) > (profile B)) > > On 11/16/21 2:04 PM, David Storrs w

[racket-users] racket-mode / paredit combine closing parens

2021-11-17 Thread David Storrs
In Emacs, I've seen a demonstration where one keystroke can pull all closing parens together, transforming this (point/cursor position is shown as |): (let () (let () (some-func 'a)| ) ) into this: (let () (let () (some-func 'a)))| I haven't been able to find the relevant ke

Re: [racket-users] racket-mode / paredit combine closing parens

2021-11-17 Thread David Storrs
Ah, that looks right. Thanks, Siddhartha. On Wed, Nov 17, 2021 at 1:59 PM Siddhartha Kasivajhula wrote: > Was curious about this feature so I went looking. It might be lispy-tab > <http://oremacs.com/lispy/#lispy-tab>. > > > On Wed, Nov 17, 2021 at 10:35 AM David Storrs &

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

2021-11-22 Thread David Storrs
That's sudden. On Mon, Nov 22, 2021 at 8:06 AM 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).

  1   2   3   4   5   6   7   8   9   10   >