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. > &

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

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

2022-01-12 Thread Sam Tobin-Hochstadt
ll: I normally wait for a go-ahead from a quorum before applying > changes like this. If I don't need to wait, then please tell me. I think if you're good with this approach, you should move forward with it. Sam > Sam: You mentioned someone got a 404 from an invite link. 404s sometime

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

2022-01-12 Thread Sam Tobin-Hochstadt
easy to have someone else step up. The alternative where we specify a specific email requires potentially changing that email address when the responsibility changes. Does that seem like a reasonable approach? Sam On Tue, Jan 11, 2022 at 2:30 PM Sage Gerard wrote: > > No no, that was helpful

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

2022-01-11 Thread Sam Tobin-Hochstadt
y clear who gets the emails when people ask, but this seems like it might be a good intermediate position. Sam On Sun, Dec 19, 2021 at 12:32 PM Sage Gerard wrote: > > Alright, thanks to all of you for the quick replies. As of this writing, the > list has been reconfigured to create an e

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: > >

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

2021-12-08 Thread Sam Tobin-Hochstadt
that? Thanks again, Sam On Wed, Dec 8, 2021, 7:19 PM James Platt wrote: > Hi Sam, > > I've got some pretty good general sysadmin skills. I would have to get up > to speed with some of the specific technologies but that should not be a > problem. I'm pretty much booked

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

2021-12-07 Thread Sam Tobin-Hochstadt
you're willing to volunteer some time to help with this, let me know, either here or by messaging me (@samth) on Discord or Slack. Sam ### Notes: The implementation of pkgs.racket-lang.org is a front-end here: https://github.com/racket/racket-pkg-website and a backend here: https://github.

Re: [racket-users] Rationale for package structure

2021-10-10 Thread Sam Phillips
The --binary flag only works for the current release with the default catalog iirc. Cheers, Sam On Sat, Oct 9, 2021, 11:58 Sorawee Porncharoenwase wrote: > I think it's so that `raco pkg install mypkg-lib` won't install > `racket-doc` if you use Minimal Racket? > > If

Re: [racket-users] Racket meeting tomorrow?

2021-10-01 Thread Sam Phillips
October 2, 2021 1 PM PDT 4 PM EDT 8 PM UTC 10 PM CEST Should be the same URL as previous meetups. https://gather.town/app/wH1EDG3McffLjrs0/racket-users Cheers, Sam On Fri, Oct 1, 2021 at 9:49 AM Hendrik Boom wrote: > > Is there going to be a Racket online meeting at the gather site to

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

2021-07-19 Thread Sam Tobin-Hochstadt
might expose. Feedback on this advisory, and any security issues discovered in Racket, is welcome at secur...@racket-lang.org [1] the `#:requires` argument to `make-evaluator`, or the `requires` arguments to `make-evaluator/submission` and similar. Sam, for the Racket team -- You received this

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
's supposed to happen on other platforms either. Sam On Thu, Jul 1, 2021 at 2:36 PM David Storrs wrote: > > 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

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

2021-07-01 Thread Sam Tobin-Hochstadt
Racket. The main download site, download.racket-lang.org, still works as normal, and linking to that site will continue to work. Sam On Wed, Jun 30, 2021 at 9:11 AM wrote: > > > Northeastern has taken down its research machines and network for major > repairs. > The outage will

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
first kind of contract check can be removed in the simplest of cases; the second kind is basically never removed by the compiler. There are other cases where macros can generate code that omits contract checks, as with the `for` forms when used with sequence generators like `in-list`, but that is again

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] https

[racket-users] An Apology

2021-06-18 Thread Sam Tobin-Hochstadt
at we 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 po

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

2021-05-18 Thread Sam Tobin-Hochstadt
in which case you'd get worse error messages but probably nothing else wrong. Sam On Tue, May 18, 2021 at 3:42 PM David Storrs wrote: > > Thank you. Is there a way to do it without the mutation? I was hoping to > use this for macro generation that simplifies combining with-hand

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, 2

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 config

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

2021-05-05 Thread Sam Tobin-Hochstadt
lopment branch. It's true that it hasn't been updated recently, but that's the idea. Sam On Wed, May 5, 2021 at 4:08 PM unlimitedscolobb wrote: > > Hi, > > I'd like to chime back in and say that renaming manual.rkt to > typed-compose.rkt didn't seem to affect

Re: [racket-users] Re: scribble: referencing two identifiers with the same name?

2021-05-03 Thread Sam Caldwell
Ah, I meant what happens when I open up my scribble file in DrRacket and press the "Scribble HTML" button. Maybe it would be more accurate to describe that as a plugin than DrRacket itself? -Sam Caldwell On Mon, May 3, 2021 at 11:24 AM Robby Findler wrote: > On Mon, May 3, 2021 at

Re: [racket-users] Re: scribble: referencing two identifiers with the same name?

2021-05-03 Thread Sam Caldwell
ion I need to do something like the Typed Racket example. -Sam Caldwell [1] https://docs.racket-lang.org/scribble/running.html?q=scribble#%28part._xref-flags%29 On Sat, May 1, 2021 at 2:00 PM Ryan Kramer wrote: > Using the prefix should still link correctly. When I run the following > p

[racket-users] scribble: referencing two identifiers with the same name?

2021-04-30 Thread Sam Caldwell
docs were written)? It also looks like this pattern could be captured by a macro---has someone written that already? Thanks, Sam Caldwell -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop recei

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 < r

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

2021-04-20 Thread Sam Tobin-Hochstadt
when `(Object? product-obj?)` is #f). > Honestly, when I went through the code for binary fx... operations I > realized that making them variadic is possible but not straightforward > at all. Without digging deeper it seems to me that it is actually a lot > of work. I will look in

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 M

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
we should go. For example, it can already prove that rd in the rgb-distance^2 function has this type: (define-type PMByte (Refine [v : Fixnum] (and (< v 256) (< -256 v 3. I don't see any boundaries where you describe -- can you say more? Sam On Fri, Apr 16, 2021 at 12:06 PM Dominik

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ů

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

2021-04-15 Thread Sam Tobin-Hochstadt
, I can probably have a look into that and send PR > if I am successful. A PR extending the types for those functions would be very welcome. Let me know if you need any help. Sam -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To uns

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 pac

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 >

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,

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

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

2021-03-19 Thread Sam Tobin-Hochstadt
take an average. The `hyperfine` tool is good for that. But probably the best advice is to make the program take longer so differences are more apparent -- variation usually increases sub-linearly. Sam On Fri, Mar 19, 2021 at 12:17 PM Laurent wrote: > > Sam: How do you accurately measure such

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

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

2021-03-19 Thread Sam Tobin-Hochstadt
Use `#:authentic`, and `unsafe-vector*-{ref,set!}` saved about 50 more ms on my machine. Then getting rid of `set!` and just re-binding the relevant variables produced another 50 ms speedup. https://gist.github.com/7fc52e7bdc327fb59c8858a42258c26a Sam On Fri, Mar 19, 2021 at 7:21 AM Sam Tobin

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

2021-03-19 Thread Sam Tobin-Hochstadt
One minor additional suggestion: if you use #:authentic for the struct, it will generate slightly better code for the accessors. Sam On Fri, Mar 19, 2021, 6:18 AM Bogdan Popa wrote: > I updated the gist with some cleanups and additional improvements that > get the runtime down to a littl

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

2021-03-18 Thread Sam Tobin-Hochstadt
And using a big buffer and doing my own newline splitting didn't help either. The version using just a regexp matching on a port (suggested by Robby) turned out not to be faster either, so my suspicion is that the original slowness is just using regexps for splitting words. Sam On Thu, Mar 18,

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

2021-03-18 Thread Sam Tobin-Hochstadt
laptop. I think the remaining difference between Racket and other languages is likely the `string-split` and `string-downcase` functions, plus the relatively-inefficient string representation that Racket uses. Sam On Thu, Mar 18, 2021 at 10:28 AM Pawel Mosakowski wrote: > > Hi David, > >

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

2021-03-16 Thread Sam Tobin-Hochstadt
think you originally requested: http://www.cs.cornell.edu/people/fluet/research/tx-events/ Sam On Tue, Mar 16, 2021, 9:48 PM Greg Rosenblatt wrote: > Thanks for the help, everyone. > > Sam, it looks like you've worked with Aaron a bit on reagents in > https://github.com/aturon/Cape

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

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? > >

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. > >

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)

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

2021-03-04 Thread Sam Tobin-Hochstadt
ing the failure cases. Sam On Thu, Mar 4, 2021 at 3:23 AM philngu...@gmail.com wrote: > > Thanks for the tip about PLT_CS_COMPILE_LIMIT! I submitted a revision to the > syntax object variant that incorporated sleepnova's and yjqww6's improvements. > > Also, I never knew

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

2021-03-03 Thread Sam Tobin-Hochstadt
` the timing became much slower. Sam On Mon, Mar 1, 2021 at 2:39 AM philngu...@gmail.com wrote: > > There’s this benchmark on BF interpreter where the Racket and Chez Scheme > implementations are very similar, but Chez Scheme is much faster than Racket > 8.0 at interpreting bench

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’

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

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.o

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

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 h

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: /home/

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

2021-02-05 Thread Sam Tobin-Hochstadt
w enough... > > 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 t

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&

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

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 encoun

Re: [racket-users] Unsafe structs

2021-01-08 Thread Sam Tobin-Hochstadt
tation from argument names > in the syntax pattern when it defines new procedures - I did some ugly > hacks to get through it but in the end I just refrained from using them > when possible (except for the unsafe-struct macro, of course). > commits, 2292-line diff!) and genuinely (it real

[racket-users] [ANNOUNCE] Racket Users Video Meetup ☎️ 📺

2020-12-28 Thread Sam Phillips
XIS >KING & MATTHIAS FELLEISEN > > > https://2020.splashcon.org/details/splash-2020-oopsla/105/Macros-for-Domain-Specific-Languages > Kind regards, Sam Phillips & Stephen De Gabrielle -- You received this message because you are subscribed to the Google Groups "Rack

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, De

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

2020-12-09 Thread Sam Tobin-Hochstadt
Hi Nicolas, I do want to encourage you to keep thinking about this stuff -- some of the things I described are definitely doable and would be interesting projects, even if re-writing the entire expander is a big task. Sam On Wed, Dec 9, 2020 at 12:46 PM nicobao wrote: > > Hi all, > &g

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 pri

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

2020-12-02 Thread Sam Tobin-Hochstadt
ches between the languages that would be tricky to overcome. Another possibility would be to directly produce JavaScript from that layer. You might be interested in the RacketScript project: https://github.com/vishesh/racketscript If you're interested in thinking more about these topics, or working

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

2020-11-25 Thread Sam Tobin-Hochstadt
d (hash)) ``` This program type checks with your second `require/typed` of `hash-ref`, but it's wrong. We can see that by using `unsafe-require/typed`, and we get an error because we can't apply "x". Furthermore, you can't generalize to (U T (-> T) either, because if T is

Re: [racket-users] snappier place startup time

2020-11-24 Thread Sam Tobin-Hochstadt
l` 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
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. One thing to note is that '#%place can be required directly and will have almost no start-up cost

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

2020-11-24 Thread Sam Tobin-Hochstadt
Unfortunately, that doesn't work -- the values in the hash could include functions. Sam On Tue, Nov 24, 2020 at 7:25 AM Tim Jervis wrote: > > For the type of the third argument, rather than "any non-function", could > Typed Racket use the type of the values in the

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: > >

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 som

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

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

2020-11-01 Thread Sam Tobin-Hochstadt
t; if you make it a package or collection, which is usually a good idea for anything long lived. Sam > -- 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

Re: [racket-users] Help implementing an early return macro

2020-10-28 Thread Sam Caldwell
y to remove and the basic ideas apply. I didn't include splicing begins in the post, but it's comparatively straightforward and in the actual implementation [2]. -Sam Caldwell [1] http://prl.ccs.neu.edu/blog/2018/10/22/defining-local-bindings-in-turnstile-languages/ [2] http

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. &

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

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

2020-10-09 Thread Sam Tobin-Hochstadt
djust the particular colors chosen in the Preferences dialog, under the Check Syntax tab. Sam On Fri, Oct 9, 2020 at 10:12 AM Adam El Mazouari wrote: > > An example is this: > > (define (square-all lst) (if (null? lst) > > '() > (cons (square (car lst)) > > (squar

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. > >

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,

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

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

2020-09-17 Thread Sam Tobin-Hochstadt
We may change Racket CS so that it produces the same results, but in general the results of `struct->vector` on values that are opaque is not something that should be relied on. The describe library is, I believe, unmaintained, and hasn't been updated in many years. Sam On Thu, Sep 17,

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) plt]

Re: [racket-users] Why is get-impure-port* slower than a system call to curl?

2020-09-14 Thread Sam Phillips
Hi Stephen, I ran this small benchmark against a remote web server, and was definitely getting better response using the http-easy module. https://gist.github.com/samdphillips/32763ebd0d938678c2972b1dd8ee5778 $ racket -e '(require (submod "http-perf.rkt" curl))' cpu time: 768 real time: 35299 gc

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 backward

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

2020-09-09 Thread Sam Tobin-Hochstadt
. [1] This is necessary, since you need to know the package name in general to find the info.rkt file in the first place. Sam On Wed, Sep 9, 2020, 9:03 AM Shriram Krishnamurthi wrote: > This is almost certainly intended and/or I may have totally misunderstood > the semantics of the info fil

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 a

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

2020-08-10 Thread Sam Tobin-Hochstadt
I tried a few more versions of Racket, and this broke between 6.12 and 7.0, probably due to the new expander at that time. I'm surprised that it works on Racket CS, though. Sam On Mon, Aug 10, 2020 at 10:36 AM Greg Rosenblatt wrote: > > Thanks, your output helped narrow down the

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? Ca

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

2020-08-06 Thread Sam Tobin-Hochstadt
so be great. A note on BC vs CS: we aim to continue providing support for Racket BC for the foreseeable future, certainly for the next several years. Sam On Thu, Aug 6, 2020 at 9:29 PM jcmdln wrote: > > Digging through some of the older Issues in > https://github.com/racket/racket/issue

Re: [racket-users] Strange performance behavior

2020-08-05 Thread Sam Tobin-Hochstadt
r function is doing. Here's a benchmark of your two functions that takes long enough to run that it avoids some of these issues, and also runs a GC before benchmarking: https://gist.github.com/7cb4645308d8572e2250833ef7b90b7c On my machine, I get 40 ms for version 1, and 100 ms for version 2, a

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

2020-08-04 Thread Sam Tobin-Hochstadt
tiple files, including main.rkt, sgl.rlt, and gl.rkt. > Am I correct that main.rkt is what I get with (require sgl) > and that gl.rkt is what I get with (require sgl/gl)? > That's correct. Sam -- hendrik > > > > > > > On Sun, Aug 2, 2020 at 5:51 PM Hendrik Boom &

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 (https://github.com/racket/typ

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 Gu

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

2020-07-27 Thread Sam Tobin-Hochstadt
such an interpreter, for example. The best way to distinguish compilers from interpreters is that a compiler takes a program and produces another program, whereas an interpreter takes a program (along with some input) and produces an answer. Sam On Mon, Jul 27, 2020 at 12:35 PM zeRusski wrote

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

2020-07-26 Thread Sam Tobin-Hochstadt
flatten all of a racket program into something that can be compiled and loaded as a single file, avoiding IO (this accomplishes 2 as well) 4. ways to make the macro expander substantially faster Sam On Sun, Jul 26, 2020 at 1:36 PM zeRusski wrote: > > Hi all. I wonder if such a thing ex

[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’r

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

2020-07-22 Thread Sam Tobin-Hochstadt
o add the type in `typed-racket/base-env/base-special-env`. `yield` can be given a type in `typed-racket/base-env/base-env`. The tricky part will be figuring out what those types should be. I'm happy to answer more questions about adding this. Sam On Wed, Jul 22, 2020 at 3:22 PM Nate Grisw

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? > > Na

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

2020-07-22 Thread Sam Tobin-Hochstadt
` not having a git repository as source, then you should first do `racket pkg update --lookup --catalog https://pkgs.racket-lang.org rackunit` to switch from the 7.7 catalog to the pkgs.racket-lang.org one. Sam On Wed, Jul 22, 2020 at 9:03 AM zeRusski wrote: > > Hi all. Latest commit to ra

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

2020-07-13 Thread Sam Tobin-Hochstadt
other. Then force just becomes the identity function, and passes through a promise to somewhere that isn't expecting one. Is it possible that some library you're using features promises? Alternatively, it might be that the embedding code needs an explicit dependency on promises. Sam On Mo

  1   2   3   4   5   6   7   8   9   10   >