[racket-users] Re: Some stuff about "case".

2020-06-03 Thread Jack Firth
Isn't that just match with the == pattern? (let ([x 'foo]) (match 'foo [(== x) 'got-foo] ['x 'got-quote-x])) ; => 'got-foo On Monday, June 1, 2020 at 11:54:01 AM UTC-7, cwebber wrote: > > As I started typing this email and looking into the definition of case, > I realized my

[racket-users] Re: foldts-test-suite

2020-06-03 Thread Jack Firth
> reporting for Rackunit tests? > > Alex. > > On Wednesday, June 3, 2020 at 2:00:02 AM UTC+8, Jack Firth wrote: >> >> The test case folding stuff in RackUnit should mostly be ignored, instead >> of extended. >> >> On Saturday, May 23,

[racket-users] Re: foldts-test-suite

2020-06-02 Thread Jack Firth
The test case folding stuff in RackUnit should mostly be ignored, instead of extended. On Saturday, May 23, 2020 at 7:52:21 AM UTC-7, Shriram Krishnamurthi wrote: > > The documentation > > >

[racket-users] Re: Puzzler - A Language for Puzzle Games

2020-04-23 Thread Jack Firth
Wow this is really, really cool. It reminds me a lot of Baba Is You. On Wednesday, April 22, 2020 at 3:51:41 PM UTC-7, Alex Owens wrote: > > Hello everyone! > > My name is Alex Owens and I've been a lurker on this mailing list - and in > the Racket community in general - for a while. While I'm

[racket-users] How to handle exceptions raised by events?

2020-02-22 Thread Jack Firth
Using wrap-evt and handle-evt, I can transform the synchronization result of an event. But events can throw exceptions when they're synchronized. Is there a way to wrap an event such that the wrapper can catch (and maybe reraise) any exceptions thrown by the wrapped event? I know I can wrap a

[racket-users] Re: how to adapt BC code for Racket CS?

2020-02-22 Thread Jack Firth
I'm no expert, but I have a feeling that optimizing for Racket CS will involve relying more on function calls and indirection, especially to avoid generating (or just writing) large amounts of code. So I suspect we'll see more of the following: 1. Implementing macro-generating macros by having

[racket-users] Re: style guide addition?

2020-01-21 Thread Jack Firth
I think that would be a great addition to the style guide. I agree that "expression" is clearer than "term", though I'm not too worried about it not covering (define(f x)3). We could add stronger language later on as we get a sense of how people react to the initial wording. On Monday, January

[racket-users] Rebellion updates

2020-01-20 Thread Jack Firth
Hello all! Just wanted to give a quick announcement about some of the new features that have landed in Rebellion recently: - Added comparators and ranges

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
ation song and dance to be entirely robust, and it would be nice to > not have to worry about it. > > On Jan 18, 2020, at 04:46, Jack Firth wrote: > >  > I appreciate the sentiment about prior art, but I'm already familiar with > both of those links and a significant part of my day

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
lly the same, Haskell’s libraries provide a much richer set of > higher-level abstractions, both in the standard library (see > Control.Exception and Control.Concurrent.*) and in other packages. > > On Jan 18, 2020, at 04:04, Jack Firth wrote: > > I am making a new concu

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
m yourself while you’re implementing a new concurrency > abstraction. > > On Jan 18, 2020, at 03:36, Jack Firth wrote: > > Wouldn't you want to *force* the first thread to wait with > semaphore-wait/enable-break in that case? Since if they're disabled then > that thread can't be cooperati

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
whether or not their argument is a proper > list—the higher-level `first`/`rest` do that, instead.) > > On Jan 18, 2020, at 03:21, Jack Firth wrote: > > It isn't clear to me either. I can't think of a use case for it, but I'm > hoping either somebody else can or somebody can c

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
but I don’t know; I’m just speculating. > > On Jan 18, 2020, at 03:10, Jack Firth wrote: > > I don't see how it has to do with semaphores being low-level. If waiting > on a semaphore while breaks are enabled is almost certainly wrong, checking > whether breaks are enabled and rais

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
hing like Haskell’s MVars) that manages > disabling interrupts in the critical section for you. (Why doesn’t this > exist already? My guess is that most Racket programmers don’t worry about > these details, since they don’t call `break-thread` anywhere, and they want > SIGINT to just kill th

Re: [racket-users] Breaking semaphores

2020-01-18 Thread Jack Firth
breaks are disabled until we exit it, but we can still be > interrupted if we’re blocked waiting to enter it. > > So it’s not so much that there’s anything really special going on here, > but more that break safety is inherently anti-modular where state is > involved, and you can

[racket-users] Breaking semaphores

2020-01-17 Thread Jack Firth
The docs for semaphores say this: In general, it is impossible using only semaphore-wait to implement the > guarantee that either the semaphore is decremented or an exception is > raised, but not both. Racket therefore supplies semaphore-wait/enable-break > (see Semaphores), which does permit

Re: [racket-users] What's the point of make-continuation-mark-key?

2020-01-11 Thread Jack Firth
(In other words, they're > like structs declared with `#:authentic`.) > > At Sat, 11 Jan 2020 19:48:17 -0800 (PST), Jack Firth wrote: > > Based on my reading of Continuation Frames and Marks > > < > https://docs.racket-lang.org/reference/eval-model.html#(part

[racket-users] What's the point of make-continuation-mark-key?

2020-01-11 Thread Jack Firth
Based on my reading of Continuation Frames and Marks , any value at all can be used as a key for a continuation mark. So why does make-continuation-mark-key

[racket-users] How do I provide a name as both a match expander and contracted function?

2019-12-30 Thread Jack Firth
If I'm making my own data types, one common thing I want to do is make smart constructors that double as match expanders. I could use `define-match-expander` with two transformers, but then I can't add a contract to the smart constructor with `contract-out`. If I try to write this: (provide

[racket-users] Re: Inadvertedly requiring racket/unsafe/ops

2019-12-14 Thread Jack Firth
I think that documentation fix is a good idea. More broadly, it seems awkward that all of the unsafe ops for different data types are combined together into a single module. I would instead expect there to be modules like racket/fixnum/unsafe, racket/struct/unsafe, racket/vector/unsafe, etc.

Re: [racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Jack Firth
> > The "tdelete-duplicates" uses a hash-table to store already seen elements: > if the element is in the hash table, just filter it out. If it is not, we > do: (hash-set! already-seen element #t). That should be constant timeish. > I understand how that works for the usual eq? / eqv? /

[racket-users] Re: srfi-171 transducers for racket

2019-12-10 Thread Jack Firth
This is great! Thank you for your work on this srfi. Transducers are relatively new to Racket's ecosystem and I'm happy to see more of the design space being explored. The documentation in the SRFI document still holds with some small caveats: > bytevector-u8-reduce/transduce is now

Re: [racket-users] Vector length and indices contracts

2019-12-05 Thread Jack Firth
What if we had a `(vector-index/c vec)` contract combinator? It would be equivalent to `(integer-in 0 (sub1 (vector-length vec)))`. On Wednesday, December 4, 2019 at 1:29:22 PM UTC-8, Matthew Flatt wrote: > > At Wed, 4 Dec 2019 22:24:10 +0100, Dominik Pantůček wrote: > > What about all the

Re: [racket-users] Re: GUI (get-directory)

2019-11-20 Thread Jack Firth
Would it have helped if the get-directory documentation had included examples? Many parts of Racket's documentation are lacking in example code, especially the less-commonly-encountered parts. On Tuesday, November 19, 2019 at 10:52:14 PM UTC-8, pow bam wrote: > > Indeed I would have likely

[racket-users] Re: Looking for transducer early-adopters

2019-11-15 Thread Jack Firth
l > > The final package uses vectors, so I am not sure that would be useful in > converting it to transducers, but if you want to look at it, it is here: > https://github.com/alex-hhh/tzgeolookup > > Alex. > > > > On Friday, November 15, 2019 at 3:18:23 PM UTC+8, J

[racket-users] Looking for transducer early-adopters

2019-11-14 Thread Jack Firth
Hello all! I'd like to get Rebellion's transducer and reducer libraries up to feature parity with Racket's ordinary list-processing

Re: [racket-users] Efficient idiom for converting key-set of a hash-map into a hash-set

2019-10-26 Thread Jack Firth
A dict doesn't guarantee unique keys, but it *does* guarantee that dict-ref returns a single value and dict-set accepts a single value, which is really strange to guarantee if you're not also going to guarantee unique keys. Honestly, I think association-lists-as-dicts were a mistake. If you

[racket-users] [ANN] Transducers library

2019-10-23 Thread Jack Firth
Rebellion now provides the rebellion/streaming/transducer library for processing streams of data using transducers. A *transducer* is a kind of sequence transformation that comes with

Re: [racket-users] Scribble examples performance

2019-10-19 Thread Jack Firth
close the evaluator at the end of the module. > > Sam > > On Sat, Oct 19, 2019, 3:43 AM Jack Firth wrote: > >> The Scribble docs for my Rebellion >> <https://github.com/jackfirth/rebellion> package take nearly two minutes >> to build. I have a hunch that most

[racket-users] Scribble examples performance

2019-10-19 Thread Jack Firth
The Scribble docs for my Rebellion package take nearly two minutes to build. I have a hunch that most of the time is spent compiling, evaluating, and rendering example code. Every one of my Scribble modules is structured roughly like this: #lang

[racket-users] Re: providing classes from a module

2019-10-02 Thread Jack Firth
(provide fish%) ought to work. Classes created with racket/class are values, just like numbers, strings, and functions, so you can provide them like you would other values. On Wednesday, October 2, 2019 at 1:09:40 PM UTC-7, Tim Meehan wrote: > > Say for instance, I have a class in

[racket-users] Happy Hacktoberfest!

2019-10-01 Thread Jack Firth
Every October, DigitalOcean and GitHub run an event called Hacktoberfest . If you sign up for it and you open at least four pull requests on GitHub during the month of October, you'll get a free T-shirt. To get Racketeers in the Hacktoberfest spirit,

[racket-users] REPL printing importance?

2019-09-11 Thread Jack Firth
Survey question: how important is it that values print nicely at a REPL? Do any of you have pet peeves in this area, or cases you wished Racket handled better? Tales of woe gladly welcomed! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

[racket-users] [ANN] Racket-on-ChezScheme docker images now available

2019-09-07 Thread Jack Firth
Thanks to the hard work of Bogdan Popa , you can now run Racket-on-ChezScheme inside docker containers using the jackfirth/racket DockerHub repository. The ChezScheme image variants are tagged as

Re: [racket-users] [racket users] make-keyword-procedure follow-up

2019-08-31 Thread Jack Firth
You might have some success using my arguments package, which defines an arguments? data structure wrapping a bundle of positional and keyword args. It also provides some functions that are like make-keyword-procedure and keyword-apply, but

Re: [racket-users] Would it help to call racket2 something else?

2019-08-29 Thread Jack Firth
On Thursday, August 29, 2019 at 12:46:53 AM UTC-4, David Storrs wrote: > > > On Wed, Aug 28, 2019, 11:43 PM Sage Gerard > wrote: > >> >> Maybe I'm overthinking this. I already know that nothing in #lang racket >> is getting thrown out or anything. > > > Yes, it is. > I believe Sage's statement

[racket-users] [ANN] Reducers, a better way to fold

2019-07-15 Thread Jack Firth
I've recently added another library to Rebellion, this one for reducers . A *reducer* is a way to combine a series of values: > (require rebellion/streaming/reducer) > (reduce into-sum 1 2 3 4 5) 15 You can reduce any sequence using

[racket-users] Re: why scribble may be slow

2019-07-15 Thread Jack Firth
I believe the reason Scribble is slow on your file has to do with algorithms and logic in Scribble that have poor performance characteristics on large files, and nothing at all to do with the fact that Scribble is implemented in Racket. With a reproducible performance benchmark for running

Re: [racket-users] The case, and a proposal, for elegant syntax in #lang racket2

2019-07-15 Thread Jack Firth
Matthias, I ask that you please not respond to discussion about the diversity of the Racket community by saying it's a political topic and politics have no place here. That statement alone is political and makes many people feel unwelcome, including me. On the topic of a new syntax: I am

[racket-users] Re: Language-Specific Plugins: Toolbar button functionality to call drracket:eval:expand-program

2019-06-25 Thread Jack Firth
This sounds very similar to pict3d , particularly if you adopt the approach suggested by Phillip of using a main submodule to render things instead of a drracket plugin. Is pict3d close to what you're trying to do? Not saying you *should* use pict3d or do

[racket-users] [ANN] Rebellion collection libraries: multisets, multidicts, and association lists, oh my!

2019-06-22 Thread Jack Firth
The rebellion package recently acquired a few new collection libraries: - rebellion/collection/multiset - A library for *multisets*, which are like sets that can contain

[racket-users] Breaks and events

2019-03-07 Thread Jack Firth
Question for synchronizable event experts: why is there no `break-evt`? The existence of `sync/enable-break` suggests to me that it is possible to have mutually exclusive choice between synchronizing on an event or raising a break. And we have an analogous construct for `sync/timeout` in the form

[racket-users] R6RS history

2019-02-26 Thread Jack Firth
What exactly is the history surrounding scheme, racket, and r6rs? I've gotten vague impressions of serious scheme community conflicts around that time but nothing specific. Does anyone have a timeline of important events related to that? -- You received this message because you are subscribed to

[racket-users] Struct properties and recursion

2019-02-22 Thread Jack Firth
Does it seem weird to anybody else that there's no way to set struct properties without mutual recursion? Say I'm defining a 2d point struct and want to set the prop:custom-write property to control how points print. I might start with this: (struct point (x y) #:property prop:custom-write

Re: [racket-users] Collections and data structures wishlist?

2019-01-25 Thread Jack Firth
copying the entire list processing API for each one. On Fri, Jan 25, 2019 at 12:51 PM Matthias Felleisen wrote: > > > On Jan 25, 2019, at 3:46 PM, Thomas F. Burdick > wrote: > > > > > > > > On January 25, 2019 8:33:09 PM GMT+01:00, Jack Firth < >

Re: [racket-users] Collections and data structures wishlist?

2019-01-25 Thread Jack Firth
> > Maybe you'll need to clarify what Racket2 is? I am not familiar. Racket2 is the (unofficial) name of what Racket could hypothetically be if we made lots of breaking changes to the existing APIs. It's named that because it would likely mean creating a `#lang racket2` language with all of the

[racket-users] Questions about module encapsulation guarantees

2018-09-09 Thread Jack Firth
If I make a symbol with `gensym` (or do anything else that creates a new value that's not `eq?` to any other value) in some module, what are the absolute upper limits on my ability to use that symbol within the module without allowing any other modules to get ahold of the symbol? What do code

[racket-users] Re: Experience with REST APIs in Racket

2018-04-12 Thread Jack Firth
I think this is an area where Racket's ecosystem could be significantly improved. However, this would probably only be worth the investment for those developing on both the client and server side of multiple services. Do you have plans to develop your own HTTP service APIs in Racket as well?

[racket-users] Re: Question about Racket design philosophy: returning (void)

2018-04-10 Thread Jack Firth
Racket's also flexible enough that you can say "to hell with void, I want function chaining" if you decide it's more appropriate: (require fancy-app) ;; now (+ _ 1) means (lambda (v) (+ v 1)) (require point-free) ;; now (~> x f g h) means (h (g (f x))) ;; makes voidful procedures return their

Re: [racket-users] Another pkgs badge improvement, re needing documentation

2018-03-26 Thread Jack Firth
You could get very close to this by making the package catalog and naming system hierarchical rather than flat. A package `foo` would be both a package and it's own package catalog, nested within the parent catalog. Each of the `foo-lib`, `foo-doc`, and `foo-test` packages would instead be

[racket-users] Re: Splitting up a GUI source file?

2018-03-25 Thread Jack Firth
On Friday, March 23, 2018 at 8:39:52 AM UTC-7, HiPhish wrote: > > I might reconsider the rentals part, but that's not relevant at the > moment. My > problem is that even though the three panes don't need to know anything > about > each other, they need to know about their parent (the main tab

[racket-users] Re: Understanding 'curry'

2018-02-28 Thread Jack Firth
Thanks everyone for the headache. I think I'll stick to the `fancy-app` package and reserve curry for adventurous dinner outings. -- 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,

[racket-users] Re: How to check if a symbol is defined before calling it?

2018-02-18 Thread Jack Firth
> > The recent plot library introduces a new function, `point-pict` which is > not yet available as part of a Racket distribution, and the plot package > has to be installed separately from GitHub for this function. > > In my code I would like to be able to check if this function is available

Re: [racket-users] Path to file in dynamic-place

2018-01-23 Thread Jack Firth
A rule of thumb you can follow to avoid tricky bugs like this: *never use string literals as dynamic module names.* Anywhere you see a dynamic / reflective function on modules called with a literal string, a contradiction exists between the programmer and the dynamic function: 1. The

[racket-users] Re: Installing Racket Package `gregor` inside a Docker container

2017-12-29 Thread Jack Firth
With the Docker images I use for Racket, gregor installs fine. I ran the command `docker run -it jackfirth/racket:6.11 raco pkg install --auto gregor` and it completed without error. You can find the dockerfile being used to produce those images in the Github repo

[racket-users] Re: Best way to deploy to the package server if the module relies on a DB?

2017-12-13 Thread Jack Firth
In my fixture package I'm attempting to (hopefully) make this sort of thing easier for RackUnit-based tests (see this github issue ), so if you're using RackUnit I'm interested in seeing what

[racket-users] Re: how can I approximate syntax properties with `make-rename-transformer`?

2017-11-28 Thread Jack Firth
What about passing the configuration data to `other-module-begin` via keyword arguments or tagged expressions in the body of the `(other-module-begin ...)` expansion? Is there a particular reason `mb` and `other-module-begin` need to communicate with syntax properties? On Tuesday, November 28,

Re: [racket-users] Re: #lang languages and cyclic dependencies

2017-11-28 Thread Jack Firth
Huh, I must have missed this the first time around. I've run into this sort of thing multiple times before and it usually brings me to this question: What if the configuration file was the main module of your app, instead of something imported by your app? Think about it. The

Re: [racket-users] Unit test inner procedures

2017-11-28 Thread Jack Firth
gt; running a program in Pyret, by default we only run the test cases lexically > present in the main module of the program.) > > ~ben > > On 11/28/2017 01:53 PM, Jack Firth wrote: > > BUT, one could easily imagine an extension to the unit testing framework >> where inner te

Re: [racket-users] Unit test inner procedures

2017-11-28 Thread Jack Firth
> > BUT, one could easily imagine an extension to the unit testing framework > where inner tests work, too. With a combination of coverage and unit > testing, you can usually get these inner unit tests to run and record their > status the same way outer ones do in module+. Pyret, for example,

[racket-users] Re: Unit test inner procedures

2017-11-27 Thread Jack Firth
I don't think you can directly test an inner procedure while keeping your test code separately loadable (e.g. different file or module). It doesn't seem like a good idea to me, personally. Inner procedures communicate to me that I can change, reorganize, delete, and otherwise do whatever I want

[racket-users] Re: single-file packages and embedded documentation and metadata

2017-11-10 Thread Jack Firth
> > I have to redo my tools once more, and am sick of my current `(doc ...)` > and `@doc` format, *and the resulting dependency on McFly.* > Could you elaborate on your experience with this? For a module with embedded docs I'd want to treat them the same as tests: in a special submodule

Re: [racket-users] where does DrRacket get its environment variables on OS X?

2017-11-08 Thread Jack Firth
> > I wonder whether a submodule is a better approach here. DrRacket > implicitly runs a `test` submodule, while `racket` doesn't, and you > could add more submodules to the list in DrRacket. But that approach > doesn't work if the conditional adjustment goes in a library, instead > of the

[racket-users] Re: Open source projects

2017-10-19 Thread Jack Firth
Welcome, we're very glad to have you! Open source Racket projects are scattered all over the place, but here are some good ways to find actively maintained and hopefully accessible projects that might interest you: - Watch some talks from recent RacketCons, especially the most recent one

Re: [racket-users] Intro and projects inquiry

2017-10-14 Thread Jack Firth
> > > Racket doesn't play well with existing code bases (except C things) > > and so my hypothesis is simply that to gain adoption of Racket, you > > need to solve problems that aren't in the "production path." Good > > thing there are *lots* of those! All those Python scripts you have? > >

[racket-users] Re: code reflection

2017-10-14 Thread Jack Firth
> > So is there a way ... from normal code ... to get at the locals of > functions higher in the call chain? Or at least the immediate caller? > Some reflective capability that I haven't yet discovered? > I'm not sure if there's a way to do that, but I'm wondering if what you want to do can

[racket-users] Re: [ANN] Porting PAIP's Prolog interpreter from Common Lisp to Racket, 1st version

2017-10-14 Thread Jack Firth
This is really cool, thanks for writing about it and sharing it! And thanks for showing me another book I ought to get around to reading. There were some very interesting talks last weekend at RacketCon 2017 related to logic programming, program synthesis, and unification that you might be

Re: [racket-users] Intro and projects inquiry

2017-10-11 Thread Jack Firth
> > Web back-ends are my wheelhouse. It sure would make my professional life > easier... Not gonna lie, this isn't something I'd look forward to banging > out alone. > I've been looking into web stuff for Racket quite a bit, specifically web microservices. Shoot me an email if you're

Re: [racket-users] scribble newbie, myfunctionname undefined

2017-09-29 Thread Jack Firth
A few other notes / tips: - The `scribble/example` library is meant to replace the legacy `scribble/eval` library, as the `examples` form provided by `scribble/example` will make documentation building fail if example code throws an unexpected error. - Did you add a `scribblings` field to your

[racket-users] Re: tabular text display

2017-09-21 Thread Jack Firth
I've implemented this for board games occasionally, so +1 to someone making a package. -- 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] Re: Efficient & "nice" communication mechanism between Racket and other languages

2017-09-07 Thread Jack Firth
On Thursday, September 7, 2017 at 9:11:47 AM UTC-7, Brian Adkins wrote: > I'm considering having a group of programmers create micro-services in > various programming languages to be glued together into a single application. > I would like a communication mechanism with the following

Re: [racket-users] Re: Racket Web servlet performance benchmarked and compared

2017-09-05 Thread Jack Firth
On Tuesday, September 5, 2017 at 3:17:38 AM UTC-7, Piyush Katariya wrote: > Wow. ~7K looks like good number. > > Is it common practice to spawn Thread for each request ? Is it that cheap > from resource point of view ? can ThreadPool could be of some help here ? Racket threads are not OS

[racket-users] Re: Mapping over pattern variables

2017-09-01 Thread Jack Firth
I recommend splitting this macro in two so you don't need to escape out of the template language: (define-syntax (macro stx) (syntax-parse stx [(_ (var1:id ...) (~and vars (var2:id ...)) #'(begin (macro/var2 (#freeze var1) vars) ...)])) (define-syntax (macro/var2 stx (syntax-parse

Re: [racket-users] pkgs.racket-lang.org log in is down

2017-08-29 Thread Jack Firth
On Tuesday, August 29, 2017 at 10:42:31 AM UTC-7, Tony Garnock-Jones wrote: > It'd also be great for Racket in general to have better visibility into > running programs to see what's going wrong with them in situations like > this. I think it's possible to do this with existing features and

[racket-users] Re: Library function naming

2017-08-28 Thread Jack Firth
The Racket Style Guide[1] has some notes about this in the Textual Matters: Names[2] section: > Use meaningful names. The Lisp convention is to use full English words > separated by dashes. Racket code benefits from the same convention. > Note that _ (the underline character) is also classified

Re: [racket-users] Re: Racket dotenv file loading

2017-08-27 Thread Jack Firth
On Sunday, August 27, 2017 at 7:57:52 PM UTC-7, Royall Spence wrote: > And it's ready to consume: > https://pkgd.racket-lang.org/pkgn/package/dotenv > > This is the first Lisp-family code I've published, so that's exciting. > Any feedback the list has to offer regarding style, approach, or >

[racket-users] Re: Racket dotenv file loading

2017-08-27 Thread Jack Firth
On Sunday, August 27, 2017 at 11:01:17 AM UTC-7, Royall Spence wrote: > I'm starting work on a Racket library for loading .env files to override > environment variables. This is a common way of doing things for people who > want to run multiple web applications on a single server without their

[racket-users] Re: Contract for function of either one or two arguments?

2017-08-24 Thread Jack Firth
> I want to be able to say "the rest argument is a list that has an even number > of elements and more than zero elements", but I'm not sure how to capture > that.  Thoughts? I've run into this multiple times as well, and would like someone (maybe me) to write a package (maybe named

[racket-users] Re: How to introspect a function? (and/or other things)

2017-08-22 Thread Jack Firth
> Likewise, I haven't had much luck figuring out how to introspect structures.  > I can say (object-name strct) to get the name of the struct, but I cannot > find any way to answer the questions: > > >     - What are the names of your fields? > >     - What are the accessor / mutator

[racket-users] Re: "Test did not clean up resources" message from GUI test runner

2017-08-21 Thread Jack Firth
On Sunday, August 20, 2017 at 6:28:20 PM UTC-7, Alex Harsanyi wrote: > I just noticed that the GUI test runner displays "test did not clean up > resources" messages on my tests, but it is not clear to me what resources are > not being cleaned up. > > I tried to reproduce the problem in the

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Jack Firth
> Just to make sure I understood correctly: ‘msgpack’ is the umbrella module > that users import, ‘msgpack/test/pack’ (and ‘unpack’) are the test modules > that will be run for testing only. How about the directory structure? I like > to keep all source files in a source directory (my original

[racket-users] [ANN] New package: disposable

2017-07-21 Thread Jack Firth
I recently published `disposable`, an experimental package for safely handling external resources. Features: - representation of a "disposable", a producer of values with external resources that must be disposed - safe handling of disposables for multiple usage patterns, including: - for a

[racket-users] Re: low-friction app extensibility in racket

2017-07-06 Thread Jack Firth
On Thursday, July 6, 2017 at 2:53:43 AM UTC-7, Neil Van Dyke wrote: > * Pretty similar alternative: user has a Racket file "my-foo", which is > the immediate program the user runs. This file does a `(require foo)`, > as well as a `(start-foo #:pref1 x #:pref2 y ...)`. You may be interested in

[racket-users] Re: Removing undocumented exports of rackunit/text-ui

2017-06-25 Thread Jack Firth
On Monday, June 12, 2017 at 11:55:31 AM UTC-7, Jack Firth wrote: > The rackunit/text-ui module[1] provides `run-tests` along with a handful of > other random undocumented functions with unclear purposes such as > `display-ticker`. I have a PR to rackunit open[2] that removes the >

[racket-users] Re: GLPK: how many chickens to invite to your picnic?

2017-06-23 Thread Jack Firth
On Friday, June 23, 2017 at 10:13:36 AM UTC-7, 'John Clements' via users-redirect wrote: > Doing some operations research in Racket? Frustrated by the lack of linear > programming libraries? Well, be frustrated no more! > > Actually, this is just a package announcement: I built a nice clean >

[racket-users] Re: Naive question on how to capitalize only the first word of a string

2017-06-19 Thread Jack Firth
Given how many solutions everyone's giving, this would be a good rosetta code task :) -- 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] Re: Naive question on how to capitalize only the first word of a string

2017-06-19 Thread Jack Firth
On Monday, June 19, 2017 at 5:12:10 PM UTC-7, Glenn Hoetker wrote: > I'm quite new to Racket/LISP, so I hope this isn't breathtakingly obvious. > Can someone please tell me the best way to capitalize just the first word in > a multiword string. So, given the string "it was a dark and stormy

Re: [racket-users] RacketCon Code of Conduct

2017-06-19 Thread Jack Firth
> These are invariably motte and bailey style arguments and the notion that the > only reason I or anyone else could possibly resent CoCs is some desire to > abuse their absence is astonishing. How you could not find such groupthink > "censorious" is beyond my ability to sympathize with. I can

[racket-users] Re: RacketCon Code of Conduct

2017-06-16 Thread Jack Firth
Agreed. Possibly with someone(s) to be the official point of contact for issues related to it. -- 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

Re: [racket-users] Wanted: Easier way to contribute docs

2017-06-13 Thread Jack Firth
> It might also be a good idea to have the documentation generator put a > standard sentence at the top of each page: "Click on a section header to find > out how to link to it or edit it." A lot of sites show a hyperlink icon (two chain links typically) when you mouse over a section title. We

[racket-users] Removing undocumented exports of rackunit/text-ui

2017-06-12 Thread Jack Firth
The rackunit/text-ui module[1] provides `run-tests` along with a handful of other random undocumented functions with unclear purposes such as `display-ticker`. I have a PR to rackunit open[2] that removes the undocumented exports (it does *not* remove `run-tests`). So far I've found no callers

[racket-users] Re: ANN: syntax-parse-example 0.0

2017-05-18 Thread Jack Firth
On Wednesday, May 17, 2017 at 10:58:59 PM UTC-7, Ben Greenman wrote: > The syntax-parse-example package is a showcase of useful macros written using > syntax-parse. > https://pkgs.racket-lang.org/package/syntax-parse-example > > > > At the moment, the showcase is nearly empty ... but it's easy

Re: [racket-users] Best way to write run-once-and-cache functions?

2017-04-26 Thread Jack Firth
On Wednesday, April 26, 2017 at 9:48:56 AM UTC-7, David K. Storrs wrote: > On Wed, Apr 26, 2017 at 12:21 AM, Jon Zeppieri wrote: > I don't know that there's a right way, but if your functions are > > nullary, then promises are a decent fit: > > > > (define conf > >  

[racket-users] Re: Best way to write run-once-and-cache functions?

2017-04-26 Thread Jack Firth
A `define/delay` macro for this might be a good addition to `racket/promise`: (define-simple-macro (define/delay id:id expr:expr) (begin (define p (delay expr)) (define (id) (force p (define/delay conf (with-input-from-file "db.conf" read-json)) (conf) ;; forces promise -- You

Re: [racket-users] Re: Setting parameters between files does not work as expected

2017-04-24 Thread Jack Firth
Whoops! That's what I get for assuming Racket makes the same mistake that Python does :) On Mon, Apr 24, 2017 at 1:58 PM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote: > On Mon, Apr 24, 2017 at 4:43 PM, Jack Firth <jackhfi...@gmail.com> wrote: > > Default values f

[racket-users] Re: Setting parameters between files does not work as expected

2017-04-24 Thread Jack Firth
Default values for function arguments are computed once when the function is defined, not each time the function is called. You'll want to make the defaults all false and get the parameter values inside the function body. -- You received this message because you are subscribed to the Google

[racket-users] Re: Racket Package Catalog Site and Raco Commands

2017-04-24 Thread Jack Firth
A `raco` tag for all packages that add raco commands is a great idea. I don't think we should build some sort of system tag that's automatically added though; I'd much rather have some way of granting "tagging rights" to a set of catalog users and let them figure out what tags are appropriate

[racket-users] Re: minimal vs full racket performance issues

2017-03-16 Thread Jack Firth
On Thursday, March 16, 2017 at 3:25:34 PM UTC-7, Dan Liebgold wrote: > Is there a way to do minimal installs of packages? I imagine skipping any > gui elements would cut down the dependencies quite a bit. You can install a package in binary form with `raco pkg install --binary foo`, which

Re: [racket-users] Are types first class values in typed/racket

2017-02-15 Thread Jack Firth
That's not possible in Typed Racket, no. Type checking is after macro expansion so type information doesn't even exist when your macro would expand. However, hope is not lost. There is a new approach to typechecking with macros outlined in the Types as Macros paper by Stephen Chang and Alex

[racket-users] Re: Programming paradigms supported by Racket (according to wikipedia)

2017-02-12 Thread Jack Firth
Somewhat reductionally, anyone can write a Racket library that implements a `#lang` with the semantics of any language on that list, so Racket therefore supports all paradigms. This doesn't really say anything useful. -- You received this message because you are subscribed to the Google Groups

  1   2   >