Re: [racket-users] The Racket programming language mailing list has moved!!

2023-07-21 Thread Sam Tobin-Hochstadt
We're using the free-for-open-source plan from Discourse: https://free.discourse.group/ Sam On Fri, Jul 21, 2023 at 1:13 PM Ryan Johnson wrote: > Thanks > > How did you guys get a discourse.group subdomain? I visited > discourse.group and the domain is unreachable. > > What software is it

Re: [racket-users] how do I remove a specified collection?

2022-08-08 Thread Sam Tobin-Hochstadt
I don't think that you need to remove `t`. Instead, your problem is that somewhere something is calling `collection-path` with "t" as an argument. If you provide more information about the context and the error message, it would be easier to help here. Sam On Mon, Aug 8, 2022 at 11:31 AM Don

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2022-01-12 Thread Sam Tobin-Hochstadt
guise permission issues, so I suspect that switching to "ask to join" > will make that problem go away too. > > On 1/12/22 1:00 PM, Sam Tobin-Hochstadt wrote: > > > Here's my suggestion: we switch to "ask to join" on Google Groups. I > > think that will no

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2022-01-12 Thread Sam Tobin-Hochstadt
so the mailing list configuration is relevant >> for a different reason. Do we want members to start the process in Google >> Groups, or by sending an email to a fixed address? >> >> On 1/11/22 1:51 PM, Robby Findler wrote: >> >> Probably people find out about

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2022-01-11 Thread Sam Tobin-Hochstadt
One thing to note here: it's now not possible to _request_ to join the list. If someone wants to join the list, they have to know someone who is already a member and ask them to join. It looks like another option is "Anyone on the web can ask" to join. It's not immediately clear who gets the

Re: [racket-users] Discourse - Mailing list mode

2021-12-09 Thread Sam Tobin-Hochstadt
It appears that enabling this is quite simple. I believe I have set it up so that emailing racket+uncategorize...@discoursemail.com should create a new topic in the Uncategorized category. Feel free to test it out. Sam On Thu, Dec 9, 2021 at 8:27 AM Stephen De Gabrielle wrote: > > > it’s

[racket-users] Looking for system admin help for the package system

2021-12-07 Thread Sam Tobin-Hochstadt
Currently, the implementation of https://pkgs.racket-lang.org as well as https://pkg-build.racket-lang.org (see Notes) is primarily maintained by Matthew Flatt, although much of it was originally written by Jay McCarthy and Tony Garnock-Jones (for pkgs in particular). Matthew of course wears a lot

[racket-users] Security advisory for racket/sandbox; fixed in v8.2

2021-07-19 Thread Sam Tobin-Hochstadt
The Racket team recently became aware of a security vulnerability in the `racket/sandbox` library. Code evaluated using a sandbox could cause system modules to incorrectly use attacker-created modules instead of their intended dependencies. This could allow system functions to be controlled by the

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

2021-07-01 Thread Sam Tobin-Hochstadt
Ah, this must be a case where different platforms behave differently, because I still see other threads running even with `finder:std-get-file` on Linux. Sam On Thu, Jul 1, 2021 at 2:58 PM David Storrs wrote: > > > > On Thu, Jul 1, 2021 at 2:42 PM Sam Tobin-Hochstadt > wrote: &

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

2021-07-01 Thread Sam Tobin-Hochstadt
Your "only remaining idea" is what I'd recommend for telling another place what function to run (that's how dynamic-place works in the first place). But your [details] sounds worrying. I just tested on my machine and it didn't happen for me, and I don't think it's supposed to happen on other

Re: [racket-users] machine and network outage at Northeastern

2021-07-01 Thread Sam Tobin-Hochstadt
Unfortunately, this has had larger impact than we expected, because a number of places linked directly to mirror.racket-lang.org, which normally hosts downloads. That machine will be down until July 2. In particular, this seems to affect the setup-racket GitHub Action and the homebrew formula for

Re: [racket-users] Speeding up the conversion of flvectors to string

2021-06-29 Thread Sam Tobin-Hochstadt
On Tue, Jun 29, 2021 at 12:04 PM Jonathan Simpson wrote: > > On Monday, June 28, 2021 at 10:25:36 PM UTC-4 Sam Tobin-Hochstadt wrote: >> >> On Mon, Jun 28, 2021 at 9:46 PM Jonathan Simpson wrote: >> > >> > On Sunday, June 27, 2021 at 10:29:55 AM UTC-4 Robby

Re: [racket-users] Speeding up the conversion of flvectors to string

2021-06-28 Thread Sam Tobin-Hochstadt
On Mon, Jun 28, 2021 at 9:46 PM Jonathan Simpson wrote: > > On Sunday, June 27, 2021 at 10:29:55 AM UTC-4 Robby Findler wrote: >> >> Replacing ` (~r x #:precision 1)` with `(number->string x)` and ditto for >> `y` eliminates the overhead of contracts and brings about another 4x speedup >> on my

Re: [racket-users] Top-level unbound identifiers during expansion

2021-06-28 Thread Sam Tobin-Hochstadt
This is indeed an issue where "the top-level is hopeless" is the problem [1]. However, there's a better work-around. You can write `(define-syntaxes (name.r ...) (values))` to forward-declare all those names, and then the subsequent definitions will work correctly. Sam [1]

[racket-users] An Apology

2021-06-18 Thread Sam Tobin-Hochstadt
should have, and we are sorry. If you wish to offer your thoughts to the people named below, the email address feedb...@racket-lang.org will reach us directly. Jay McCarthy John Clements Matthew Flatt Robby Findler Sam Tobin-Hochstadt [Matthew Butterick's recent post]: https

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

2021-05-18 Thread Sam Tobin-Hochstadt
the code should do before > getting into the weeds of error handling. > > (I probably should have put these details in the original message but I was > trying to keep it simple so as not to make people burn brain cycles.) > > On Tue, May 18, 2021 at 2:34 PM Sam Tobin-Hochs

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

2021-05-18 Thread Sam Tobin-Hochstadt
It's not quite as convenient, but here's a version of your program that should work: (let ([conn #f]) (dynamic-wind (lambda () (set! conn (connect-to-server)) (lambda () (send-message conn "foo")) (lambda () (finalize-connection conn Sam On Tue, May 18, 2021 at 2:08 PM David

Re: [racket-users] I want a package at installation scope but also to keep my install clean

2021-05-18 Thread Sam Tobin-Hochstadt
You might also be interested in the new `raco-pkg-env` tool: https://github.com/samdphillips/raco-pkg-env/ Sam On Tue, May 18, 2021 at 12:20 PM Matthew Flatt wrote: > > Yes, this approach can work. I don't think the existing Racket tools > will help much with persisting a configuration across

Re: [racket-users] Package install conflicts on the Racket package catalog

2021-05-05 Thread Sam Tobin-Hochstadt
I think there's two things you're seeing. 1. The results hadn't yet updated for your typed-compose change. I no longer see a conflict here: https://pkg-build.racket-lang.org/ 2. The conflicts page is for _all_ the packages in the whole package catalog. That's why it always mentions mischief. The

Re: [racket-users] limitation of TR contract translation?

2021-04-30 Thread Sam Tobin-Hochstadt
This is a bug. It's not the the contract is unsatisfiable, it's that it's too satisfiable. The contract system could probably make this work, but Typed Racket should probably avoid this situation. Sam On Fri, Apr 30, 2021, 2:07 AM 'John Clements' via Racket Users < racket-users@googlegroups.com>

Re: [racket-users] Typed Racket: type relations

2021-04-20 Thread Sam Tobin-Hochstadt
On Mon, Apr 19, 2021 at 3:19 PM Dominik Pantůček wrote: > > >>> > >>> However, I would suggest that the right fix here is to use refinement > >>> types, and specify exactly what you want. Unfortunately, the > >>> refinement types feature (good intro here: > >>>

Re: [racket-users] Typed Racket: type relations

2021-04-20 Thread Sam Tobin-Hochstadt
It's a little more complicated than that -- the _constraints_ have to be linear -- that is, the expressions in the refinements, but the expressions reasoned about can be more general. However, it doesn't do very much useful with multiplication by bounded values at the moment. Sam On Mon, Apr 19,

Re: [racket-users] Typed Racket: type relations

2021-04-19 Thread Sam Tobin-Hochstadt
On Sun, Apr 18, 2021 at 3:05 AM Dominik Pantůček wrote: > > 0. Thank you very much for looking into this. > > On 18. 04. 21 4:57, Sam Tobin-Hochstadt wrote: > > Ok, three parts: > > > > 1. Is it possible to make `average` on `Byte` provably produce a > > `Byt

Re: [racket-users] Typed Racket: type relations

2021-04-17 Thread Sam Tobin-Hochstadt
s with TR to provide > compile-time type consistency and to have modules which are internally > consistent and if they are used with other TR code the consistency > remains. More on that later. > > On 16. 04. 21 15:51, Sam Tobin-Hochstadt wrote: > > To improve this,

Re: [racket-users] Typed Racket: type relations

2021-04-16 Thread Sam Tobin-Hochstadt
To improve this, we'd have to extend the type of `fxquotient`, which is reasonable, but I'm not sure what the addition would be. In particular, your addition is not sound: (fxquotient 1024 2) produces 512 which is not a Byte. Sam On Thu, Apr 15, 2021 at 6:22 PM Dominik Pantůček wrote: > >

Re: [racket-users] Variadic fixnum operations (was: Unsafe structs)

2021-04-15 Thread Sam Tobin-Hochstadt
On Thu, Apr 15, 2021 at 4:21 PM Dominik Pantůček wrote: > > Hello Racketeers, > > >> * Math/Fixnums/Flonums: All fx+/-/*/... accept two arguments only. No > >> unary fl-, no variadic-argument fl+ or fxior (this one hurt the most). > > > > These definitely became variadic after the type

Re: [racket-users] Upgrading installer verification

2021-04-02 Thread Sam Tobin-Hochstadt
There is indeed signing for Ubuntu ppas, but that's specific both to apt and to the ppa system. Sam On Fri, Apr 2, 2021, 9:29 PM Sage Gerard wrote: > No, I'm just looking for extra confidence when verifying installers. > > On that note, did Ubuntu require someone to sign packages to distribute

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

2021-04-01 Thread Sam Tobin-Hochstadt
You might use `(list 'value-evt)` if that's the require you want. Sam On Thu, Apr 1, 2021 at 3:41 PM David Storrs wrote: > > 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

Re: [racket-users] Upgrading installer verification

2021-04-01 Thread Sam Tobin-Hochstadt
I don't think we have plans to start signing installers. The code that creates installers is in the `distro-build` package, and the use of sha1 is here: https://github.com/racket/distro-build/blob/21ccc39fc14408eea79aff035e508856a66adf89/distro-build-server/pack-built.rkt#L76 Sam On Thu, Apr 1,

Re: [racket-users] Package server certificate expired

2021-04-01 Thread Sam Tobin-Hochstadt
This should be fixed now. Let this be a lesson about ignoring warnings about out-of-date software. :) Sam On Thu, Apr 1, 2021 at 11:59 AM David Storrs wrote: > > Not sure where the right place is to report this, but the certificate for > pkgd.racket-lang.org expired on 3/31/2021. > > -- >

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

2021-03-19 Thread Sam Tobin-Hochstadt
small speed-ups? On my machines, if I > run the same program twice, I can sometimes see more than 10% time difference. > > On Fri, Mar 19, 2021 at 4:10 PM Sam Tobin-Hochstadt > wrote: >> >> Use `#:authentic`, and `unsafe-vector*-{ref,set!}` saved about 50 more >>

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

2021-03-19 Thread Sam Tobin-Hochstadt
Another possibility is to send a message on a channel when the user is set, and then just wait with `sync` for a message to appear on the channel. Sam On Fri, Mar 19, 2021 at 12:02 PM Jay McCarthy wrote: > > The best thing is to use a semaphore instead of a mutable reference. > If you can't do

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

2021-03-19 Thread Sam Tobin-Hochstadt
something new. >> > >> > Many thanks, >> > Pawel >> > >> > On Thursday, March 18, 2021 at 7:22:10 PM UTC bogdan wrote: >> > >> >> I managed to get it about as fast as Python by making it really >> >> imperative and rolling m

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

2021-03-19 Thread Sam Tobin-Hochstadt
rch 18, 2021 at 7:22:10 PM UTC bogdan wrote: > > > >> I managed to get it about as fast as Python by making it really > >> imperative and rolling my own hash: > >> > >> https://gist.github.com/Bogdanp/fb39d202037cdaadd55dae3d45737571 > >> > >

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

2021-03-18 Thread Sam Tobin-Hochstadt
Tobin-Hochstadt wrote: > > Here's a somewhat-optimized version of the code: > > #lang racket/base > (require racket/string racket/vector racket/port) > > (define h (make-hash)) > > (time > (for* ([l (in-lines)] > [w (in-list (string-split l))] >

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

2021-03-18 Thread Sam Tobin-Hochstadt
Here's a somewhat-optimized version of the code: #lang racket/base (require racket/string racket/vector racket/port) (define h (make-hash)) (time (for* ([l (in-lines)] [w (in-list (string-split l))] [w* (in-value (string-downcase w))]) (hash-update! h w* add1 0))) (define v

Re: [racket-users] Synchronizable conjunction of events?

2021-03-16 Thread Sam Tobin-Hochstadt
can express that > reagents have trouble with? How does the implementation complexity compare? > > On Monday, March 15, 2021 at 8:12:03 PM UTC-4 Sam Tobin-Hochstadt wrote: > >> I think Aaron Turon's reagents (and more generally k-cas) are an example >> of N-way rendezvous.

Re: [racket-users] Synchronizable conjunction of events?

2021-03-15 Thread Sam Tobin-Hochstadt
I think Aaron Turon's reagents (and more generally k-cas) are an example of N-way rendezvous. Sam On Mon, Mar 15, 2021, 5:50 PM Matthew Flatt wrote: > At Mon, 15 Mar 2021 13:38:46 -0700 (PDT), Greg Rosenblatt wrote: > > Is there a corresponding event for a logical conjunction (I was looking >

Re: [racket-users] Possible bug when reading/writing large inexact numbers

2021-03-07 Thread Sam Tobin-Hochstadt
I believe it's https://github.com/racket/racket/commit/0561d71e60502fa857b0d169f64da723584d96d6 Sam On Sun, Mar 7, 2021 at 8:52 PM Greg Rosenblatt wrote: > > Great, thanks. Out of curiosity, where in the reader was this bug > originally? Can you point me to a diff? > > On Sunday, March 7,

Re: [racket-users] Method gen:custom-write of a struct not working within lists

2021-03-04 Thread Sam Tobin-Hochstadt
On Thu, Mar 4, 2021 at 3:24 PM Dimaugh Silvestris wrote: > > On Thu, 4 Mar 2021 at 19:29, Sam Tobin-Hochstadt wrote: >> >> It doesn't print that way because that wouldn't turn back into the original >> value when evaluated, since it's quoted. > > > Is there

Re: [racket-users] Method gen:custom-write of a struct not working within lists

2021-03-04 Thread Sam Tobin-Hochstadt
I think you want to add `#:property prop:custom-print-quotable 'never` to that struct declaration, and then it will behave as you wanted. Sam On Thu, Mar 4, 2021 at 11:44 AM Dimaugh Silvestris wrote: > > I have a struct defined as: > (struct ugen sc.unit (name rate inputs) > #:methods

Re: [racket-users] Racket slower than Chez Scheme on interpreter benchmark, potential low hanging fruit?

2021-03-04 Thread Sam Tobin-Hochstadt
day, March 3, 2021 at 11:12:30 AM UTC-8 Sam Tobin-Hochstadt wrote: >> >> First, there's no longer a difference because yjqww6 just had a PR >> merged that improves the Racket performance. >> >> The performance difference that was there was mostly because the Chez &

Re: [racket-users] Racket slower than Chez Scheme on interpreter benchmark, potential low hanging fruit?

2021-03-03 Thread Sam Tobin-Hochstadt
First, there's no longer a difference because yjqww6 just had a PR merged that improves the Racket performance. The performance difference that was there was mostly because the Chez code was run with `--optimize-level 3` which turns off safety. If that was changed to `--optimize-level 2` the

Re: [racket-users] Racket slower than Chez Scheme on interpreter benchmark, potential low hanging fruit?

2021-03-01 Thread Sam Tobin-Hochstadt
When Chez is faster than Racket CS, the usual culprits are either: - mutable pairs - very large code size that causes Racket CS to interpret the outer module However, neither of those seem to be happening here. Sam On Mon, Mar 1, 2021 at 2:39 AM philngu...@gmail.com wrote: > > There’s this

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

2021-02-24 Thread Sam Tobin-Hochstadt
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: > 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

Re: [racket-users] public email addresses on packages server

2021-02-23 Thread Sam Tobin-Hochstadt
Github doesn't require making your email address public. Sam On Tue, Feb 23, 2021 at 12:19 PM Hendrik Boom wrote: > > On Sat, Feb 20, 2021 at 11:47:19PM +0700, Roger Keays wrote: > > Has any consideration been given to concealing email addresses on > > pkgs.racket-lang.org for privacy

Re: [racket-users] can't create a new package on pkgd.racket-lang.org

2021-02-23 Thread Sam Tobin-Hochstadt
Unfortunately, it's old versions of Racket that don't support this, and adding error messages there will have the same problem as fixing them -- they're already out there and on people's computers. However, this will be fixed in the next release of Racket. Sam On Tue, Feb 23, 2021 at 6:49 AM

Re: [racket-users] Sticky scrollable nav bar in docs

2021-02-18 Thread Sam Tobin-Hochstadt
This seems like it would be a nice addition. I think starting with a PR is the right place to begin. Sam On Wed, Feb 17, 2021 at 7:01 PM 'William J. Bowman' via Racket Users wrote: > > One of my students asked about making the Racket docs navbar sticky and > scrollable, to help when navigating

Re: [racket-users] Error while starting simple program

2021-02-15 Thread Sam Tobin-Hochstadt
I think there's a typo in your program -- there's an extra "br" in the name of `racket/function`. Sam On Mon, Feb 15, 2021 at 11:58 AM Gowthaman Basuvaraj wrote: > > open-input-file: cannot open module file > module path: racket/functionbr > path:

Re: [racket-users] Error while compiling Racket BC

2021-02-05 Thread Sam Tobin-Hochstadt
. > > Greetings. > > Killian Zhuo (KDr2, https://kdr2.com) > > > > On Saturday, February 6, 2021, 07:47:41 AM GMT+8, Sam Tobin-Hochstadt < > sa...@cs.indiana.edu> wrote: > > > This means that you're building with a previous version of Racket that is > too

Re: [racket-users] Error while compiling Racket BC

2021-02-05 Thread Sam Tobin-Hochstadt
This means that you're building with a previous version of Racket that is too old (which might be quite recent but is nonetheless too old to use in place of bootstrapping). Sam On Fri, Feb 5, 2021, 6:44 PM 'Killian Zhuo (KDr2)' via Racket Users < racket-users@googlegroups.com> wrote: > Here is

Re: [racket-users] Typed racket and generics?

2021-02-02 Thread Sam Tobin-Hochstadt
Unfortunately this isn't supported yet. Right now, you can use struct type properties directly to build your own generics, but you can't use the generics library. Sam On Sat, Jan 30, 2021 at 4:20 AM Stuart Hungerford wrote: > > Hi Racketeers, > > Is there any way to have Racket code using

Re: [racket-users] Unsafe structs

2021-01-21 Thread Sam Tobin-Hochstadt
On Wed, Jan 20, 2021 at 5:16 PM Dominik Pantůček wrote: > > Hi Sam, > > I went through all my notes and prepared minimal (sometimes) working > examples for most of the issues I mentioned. Let's go through it one by > one. I assume that some of the complications I encountered were because > my

Re: [racket-users] Unsafe structs

2021-01-08 Thread Sam Tobin-Hochstadt
Thanks for this detailed account (and for trying it out). I have some questions inline: On Sat, Jan 2, 2021 at 5:34 PM Dominik Pantůček wrote: > And now for the worse part. TR rough edges: > > * Higher-order procedures and polymorphic functions in all imaginable > combinations. That was a total

Re: [racket-users] Web Server Tutorial Tries to Write to Library Directory

2020-12-22 Thread Sam Tobin-Hochstadt
I believe this is a bug in `web-server/insta`, but here's a workaround: Add the following to the beginning of the `app` module: (require racket/runtime-path) (define-runtime-path here ".") Then use `here` instead of `(current-directory)` in the `start` function. Sam On Tue, Dec 22, 2020 at

Re: [racket-users] Towards an Incremental Racket Parser for better IDE experience?

2020-12-09 Thread Sam Tobin-Hochstadt
oo limited knowledge too, but that's a > non-problem as it wouldn't be a one-person task anyway). > Nevertheless, I really appreciate the exchange. > > Kind regards, > Nicolas > > On Wednesday, December 2, 2020 at 7:56:58 PM UTC+1 Sam Tobin-Hochstadt wrote: >> >> A few

Re: [racket-users] [racket users] Detecting characters in symbols in macros

2020-12-09 Thread Sam Tobin-Hochstadt
Here's an example: #lang racket (require (for-syntax syntax/parse)) (define-syntax (foo stx) (syntax-parse stx [(_ arg:id) #:when (regexp-match "[$]" (symbol->string (syntax-e #'arg))) #'1] [(_ arg) #'2])) (foo $abc) (foo abc) That prints 1 followed by 2. Sam On Wed,

Re: [racket-users] Towards an Incremental Racket Parser for better IDE experience?

2020-12-02 Thread Sam Tobin-Hochstadt
A few thoughts on these topics, which I've been thinking about for a while. First, let's distinguish two things. One is an _incremental_ system, such as a parser, which is one which does less work in response to a small change than it would need to do from scratch. The other is a system with

Re: [racket-users] hash-ref in typed Racket

2020-11-25 Thread Sam Tobin-Hochstadt
ich misses > because the hash has no keys. The third argument works because it’s a > function that happens to return a string. It’s funny because it looks like it > type-checks, but it doesn’t really. > > This code: > > #lang typed/racket > > (define h : (Immutable-HashT

Re: [racket-users] snappier place startup time

2020-11-24 Thread Sam Tobin-Hochstadt
` is about 12ms. Sam On Tue, Nov 24, 2020 at 2:04 PM Sam Tobin-Hochstadt wrote: > > th-place is used if places are not enabled when Racket is built (this is the > default on some platforms). > > I'm making progress on shrinking this, hopefully I'll have a patch done soon. > &

Re: [racket-users] snappier place startup time

2020-11-24 Thread Sam Tobin-Hochstadt
e the `test` submodule can be loaded >>> independently from the compiled form. Loading the submodule from source >>> requires loading the enclosing module, too (which depends on >>> `racket/place` and more). >>> >>> At Tue, 24 Nov 2020 08:46:12 -0600, N

Re: [racket-users] hash-ref in typed Racket

2020-11-24 Thread Sam Tobin-Hochstadt
> > On Tuesday, 21 April 2020 at 15:51:00 UTC+1 Sam Tobin-Hochstadt wrote: >> >> The problem here is with the optional third argument to `hash-ref`. >> Typed Racket only allows `#f` or functions as the third argument. >> Plain Racket allows any non-function value as a def

Re: [racket-users] snappier place startup time

2020-11-24 Thread Sam Tobin-Hochstadt
Almost certainly the problem is expansion time. If I run that program on my machine, it takes about 200 ms. But if I compile the file to zo first with `raco make`, then it takes about 40 ms, basically identical to `racket/base`. Sam On Tue, Nov 24, 2020 at 9:39 AM Nate Griswold wrote: > > Oops,

Re: [racket-users] net-lib/ftp enhancement

2020-11-17 Thread Sam Tobin-Hochstadt
If you found it useful, it's probably reasonable to add it to the library for everyone. Sam On Tue, Nov 17, 2020 at 12:46 PM Dominik Pantůček wrote: > > Hello Racketeers, > > we were working on a module today that uses the net/ftp module for batch > communication with some remote systems and

Re: [racket-users] Developing Scribble as a user when Scribble is installed system-wide

2020-11-05 Thread Sam Tobin-Hochstadt
Can you post the output of `raco pkg show -l --rx scribble`? Sam On Wed, Nov 4, 2020 at 8:10 PM Christopher Lemmer Webber wrote: > > I've done the following to my git repo of scribble: > > raco pkg update --scope user --clone scribble-lib > raco pkg update --scope user --clone scribble-doc

Re: [racket-users] Is there a function to find and update all compiled directories?

2020-11-01 Thread Sam Tobin-Hochstadt
On Sun, Nov 1, 2020, 9:11 PM George Neuner wrote: > > On 11/1/2020 6:50 PM, Shu-Hung You wrote: > > Using the command-line instruction `raco setup` will update all > > obsolete bytecodes. If you are looking for a programmable interface, > > `compiler/cm` is a good starting point. > > Note that

Re: [racket-users] Why ~a, ~s, and ~v?

2020-10-26 Thread Sam Tobin-Hochstadt
That page actually suggests they're inherited from Common Lisp, which seems very likely (and probably from some other Lisp before that). Sam On Mon, Oct 26, 2020 at 8:59 PM Sorawee Porncharoenwase wrote: > > I had this question too. It looks like they are inherited from Scheme. > > ~a = any >

Re: [racket-users] Automated method for making racket package installs consistent?

2020-10-12 Thread Sam Tobin-Hochstadt
The list of explicitly-installed packages is available from `raco pkg show`. You could use a script to parse that, or you can use `installed-pkg-table` from `pkg/lib` to get the list in Racket. Sam On Sun, Oct 11, 2020 at 11:03 AM primer wrote: > > On Sunday, October 11, 2020 at 1:35:24 AM

Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Sam Tobin-Hochstadt
> > > As you can see, you've got: > > methods included by default (define, cons) > booleans (null?) > user-introduced vars (lst) > > shown in the same color. It's really not clear. I'd like for them to be in > different colors. > > --Adam. > > O

Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Sam Tobin-Hochstadt
Can you give an example of which things you'd like to be different? We usually use "variable" and "identifier" for very similar meanings when discussing Racket, for example. Sam On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari wrote: > > Hello everyone. > > I've started using DrRacket a couple

Re: [racket-users] Utah snapshots will switch to CS by default

2020-09-29 Thread Sam Tobin-Hochstadt
How will this affect the pkg-build snapshots? Sam On Tue, Sep 29, 2020 at 3:33 PM Robby Findler wrote: > > I'm finally catching up and switching the Northwestern snapshots to BC by > default. I've made the change and the changes will kick off tonight at > midnight, Chicago time (probably

Re: [racket-users] Re: Memory usage of (port->lines ...) is extreamly high

2020-09-24 Thread Sam Tobin-Hochstadt
port->lines produces a list with all the lines in it. That list is what uses all the memory. Using in-lines avoids producing the whole list at once. Sam On Thu, Sep 24, 2020, 8:53 AM Hong Yang wrote: > Thanks Laurent, I tried (in-lines...), and yes, it's memory-efficient, but > I still curious

Re: [racket-users] [racket users] describe variant issue?

2020-09-17 Thread Sam Tobin-Hochstadt
020 at 1:17 PM Kevin Forchione wrote: > > > > > On Sep 15, 2020, at 3:11 PM, Sam Tobin-Hochstadt > > wrote: > > > > This is a difference in behavior between Racket BC and Racket CS, and > > not something in the describe library: > > > > [samth@

Re: [racket-users] [racket users] describe variant issue?

2020-09-15 Thread Sam Tobin-Hochstadt
This is a difference in behavior between Racket BC and Racket CS, and not something in the describe library: [samth@homer:~/work/teaching/c211 (master) racket-7.8] racket Welcome to Racket v7.8. > (struct->vector 5) '#(struct:fixnum-integer ...) > ^D [samth@homer:~/work/teaching/c211 (master)

Re: [racket-users] locally linked package name doesn't match info collection name

2020-09-09 Thread Sam Tobin-Hochstadt
For that, I recommend "Open require path" in the File menu in DrRacket. Sam On Wed, Sep 9, 2020, 9:09 PM Shriram Krishnamurthi wrote: > I'm curious why the Package Manager doesn't also show the collection name > (or plural)? Wouldn't I need that to trace backwards? "This program in > #lang foo

Re: [racket-users] locally linked package name doesn't match info collection name

2020-09-09 Thread Sam Tobin-Hochstadt
This is all as expected. The package name is mystery-language-uploader, but the collection name is mystery-language. The info.rkt entry controls the latter but not the former [1]. If you're linking it on the command line, you can use a command line option to specify the package name to use. [1]

Re: [racket-users] Why is struct/contract so much faster than a guard?

2020-09-02 Thread Sam Tobin-Hochstadt
The issue is that `struct-guard/c` is slow. If you just write a function as a guard it's faster than `struct/contract`. Sam On Wed, Sep 2, 2020 at 3:41 PM Christopher Lemmer Webber wrote: > > I tested the following: > > (struct foo (bar baz) > #:guard (struct-guard/c any/c list?)) > >

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
al-one-top > ;/Applications/Racket v7.8/share/pkgs/xrepl-lib/xrepl/xrepl.rkt:1493:0 > ;/Applications/Racket v7.8/collects/racket/repl.rkt:11:26 > > > On Monday, August 10, 2020 at 11:09:09 AM UTC-4, Sam Tobin-Hochstadt wrote: >> >> This works for me the way you describe

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
This works for me the way you describe: ``` [samth@huor:/tmp cs-snap] r -ie '(enter! "x.rkt")' Welcome to Racket v7.8.0.7 [cs]. loading example "x.rkt"> example 5 "x.rkt"> ``` Perhaps there was a problem with 7.3 that you're running into? Can you try with the 7.8 release? Sam On Sun, Aug 9,

Re: [racket-users] Proposal: GitHub Issue Triage Party

2020-08-06 Thread Sam Tobin-Hochstadt
That sounds great. I'm happy to help. I created the #triage channel on slack, which is a good place to chat about this. I'm happy to help people figure out issues that should be closed, or reassigned, as you've started to do. And creating a specific time to work on this would also be great. A

Re: [racket-users] Strange performance behavior

2020-08-05 Thread Sam Tobin-Hochstadt
What's happening here is that your function takes effectively 0 time, but when you ran the first version, there was a GC pause during it (that's why there's the "gc time: 9" there). GC pauses can happen at any time, basically, so it's not something about what your function is doing. Here's a

Re: [racket-users] Advice wanted about new opengl binding

2020-08-04 Thread Sam Tobin-Hochstadt
On Mon, Aug 3, 2020, 7:27 PM Hendrik Boom wrote: > On Mon, Aug 03, 2020 at 02:01:16PM -0400, Philip McGrath wrote: > > Is this what you're looking for? > https://pkgs.racket-lang.org/package/sgl > > > > -Philip > > Yes, looks like it. Is it messing from the index for some good reason? > By

Re: [racket-users] Recommended workaround still the same?

2020-08-02 Thread Sam Tobin-Hochstadt
Yes, I think that's still the best approach. Sam On Sun, Aug 2, 2020 at 4:47 PM Nate Griswold wrote: > > Hello. Ran into some problems with typed racket and define-cstruct when > adding typed racket layer on top of my ffi bindings. > > Is this

Re: [racket-users] Re: Racket CS release plan

2020-08-01 Thread Sam Tobin-Hochstadt
Note that Matthew's point was not about bytecode, but about the machine code in the Racket BC executable vs the machine code in the Chez kernel plus boot files. Especially if you look pre-7.0, there is very little bytecode in the Racket BC executable. Sam On Sat, Aug 1, 2020, 3:46 PM Gustavo

Re: [racket-users] Does Racket interpreter exist?

2020-07-27 Thread Sam Tobin-Hochstadt
A few thoughts on interpreters vs compilers: - somewhere, there has to be an interpreter -- the x86 chip in my laptop is interpreting the x86 code that Racket generates. - there could certainly be a more direct AST-based interpreter for (fully-expanded) Racket. My work on Pycket involved writing

Re: [racket-users] Does Racket interpreter exist?

2020-07-26 Thread Sam Tobin-Hochstadt
Hi, Racket BC (the non-Chez version) does use an interpreter. The pipeline in Racket BC is source code => expanded code => compiled bytecode => interpreter or source code => expanded code => compiled bytecode => JIT compiler => machine code You can turn off the JIT compiler with the

[racket-users] Re: Racket Survey 2020

2020-07-23 Thread Sam Tobin-Hochstadt
A reminder: there's one more week to take the 2020 Racket Survey. We've had fantastic response so far, but we don't want to miss anyone. Fill out the survey here: https://forms.gle/XeHdgv8R7o2VjBbF9 Sam On Tue, Jun 23, 2020 at 12:22 PM Sam Tobin-Hochstadt wrote: > > We’re taking a surv

Re: [racket-users] Re: Combining generators and typed racket

2020-07-22 Thread Sam Tobin-Hochstadt
iterate in there. > > Are there any papers that would be helpful in trying to address this > implementation-wise? > > Nate > > > On Wed, Jul 22, 2020 at 1:56 PM Sam Tobin-Hochstadt > wrote: >> >> Currently, neither `racket/stream` nor `racket/generator` are

Re: [racket-users] Re: Combining generators and typed racket

2020-07-22 Thread Sam Tobin-Hochstadt
Currently, neither `racket/stream` nor `racket/generator` are supported by Typed Racket, unfortunately. Sam On Wed, Jul 22, 2020 at 12:15 AM Nate Griswold wrote: > > Actually, is there any way at all to use lazy lists of things (streams or > generators) in typed racket? > > Nate > > > On Tue,

Re: [racket-users] Replace pre-installed rackunit with git source

2020-07-22 Thread Sam Tobin-Hochstadt
To figure out where things are, I recommend the `raco fc` command, which is in the `raco-find-collection` package. Almost certainly what went wrong is that you installed the cloned `rackunit` directory as a package. Instead, you need to install all the individual sub-directories as packages. To

Re: [racket-users] Embedded racket (cs) question

2020-07-13 Thread Sam Tobin-Hochstadt
My guess, not having looked further than your email, is that when you don't include racket/promise, something is supplying a promise to something else but there are two different instantiations of the promise library, causing the force call from one not to recognize the promise from the other.

Re: [racket-users] Recommended CS replacement for make-sized-byte-string

2020-07-12 Thread Sam Tobin-Hochstadt
Copying is probably the best option -- this is discussed some in the following readme: https://www.github.com/racket/racket/tree/master/racket%2Fsrc%2Fcs%2FREADME.txt Sam On Sun, Jul 12, 2020, 12:16 PM Nate Griswold wrote: > Maybe i have been up too long, but what is the best replacement for >

Re: [racket-users] Gtk initialization failed for display ":0"

2020-07-11 Thread Sam Tobin-Hochstadt
The usual solution to this problem is to use xvfb to create a virtual display, which works great in this situation when the display is not really needed anyway. This is how we run the handin server headless and how all the racket CI works. Sam On Sat, Jul 11, 2020, 12:26 PM Shriram Krishnamurthi

Re: [racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Sam Tobin-Hochstadt
It turns out it was a brief error by gitlab. Sam On Tue, Jul 7, 2020 at 11:42 AM Simon Schlee wrote: > > yes it works again! > > -- > 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] Re: Racket News - Issue 34

2020-07-07 Thread Sam Tobin-Hochstadt
Ah, it is now no longer working for me (it worked earlier this morning). Sam On Tue, Jul 7, 2020 at 11:03 AM Simon Schlee wrote: > > >> I think you probably went to www.racket-news.com, but you should go to >> racket-news.com (without the www) instead. > > > With or without www I get a

Re: [racket-users] Re: Racket News - Issue 34

2020-07-07 Thread Sam Tobin-Hochstadt
I think you probably went to www.racket-news.com, but you should go to racket-news.com (without the www) instead. Sam On Tue, Jul 7, 2020 at 10:28 AM Simon Schlee wrote: > > I am getting an error message for the https certificate: > >> Websites prove their identity via certificates. Firefox

Re: [racket-users] FYI, build from HEAD fails in realloc()

2020-06-30 Thread Sam Tobin-Hochstadt
It should be fine to do both of those in the same directory. Sam On Tue, Jun 30, 2020 at 4:47 PM 'John Clements' via Racket Users wrote: > > D’oh! Closing the loop on this one… it appears to me that this problem > occurred after running a “make” (that is, a BC make) in a directory in which >

Re: [racket-users] racket-dev problem?

2020-06-26 Thread Sam Tobin-Hochstadt
There are no currently-pending messages for the racket-dev list, so your email has not been caught in a spam filter. I have not seen problems with the list recently. Can you say more about what has happened? Sam On Fri, Jun 26, 2020 at 1:15 PM Jos Koot wrote: > > Sending mail to racket -dev

Re: [racket-users] trying to use futures for some calculations

2020-06-17 Thread Sam Tobin-Hochstadt
wrote: > > At Wed, 17 Jun 2020 10:24:37 -0400, Sam Tobin-Hochstadt wrote: > > - on Racket BC, operations like `+` do indeed block > > ... which mixing, say, fixnum and flonum arguments, but not when > operating on all fixnums or all flonums. > > In this case, it may be the `i

Re: [racket-users] trying to use futures for some calculations

2020-06-17 Thread Sam Tobin-Hochstadt
I have not yet done much investigating on this, but: - on Racket BC, operations like `+` do indeed block, and effectively you need to replace them with lower-level operations that don't (such as `unsafe-fl+`). Typed Racket can help with this, or you can do it all by hand. As you note, that makes

  1   2   3   4   5   >