Re: [racket-users] How to implement a hash function for different types?

2019-08-02 Thread Jesse Wang
On Saturday, August 3, 2019 at 1:36:01 PM UTC+8, Jon Zeppieri wrote: > > On Sat, Aug 3, 2019 at 12:52 AM Jesse Wang > wrote: > > > > If I want to turn the hash code into array index in a hash table, do I > need to > > apply another uniform hash function such as md5 on the result of >

Re: [racket-users] How to implement a hash function for different types?

2019-08-02 Thread Jon Zeppieri
On Sat, Aug 3, 2019 at 12:52 AM Jesse Wang wrote: > > If I want to turn the hash code into array index in a hash table, do I need to > apply another uniform hash function such as md5 on the result of > equal-hash-code? > That wouldn't accomplish anything. The defining feature of a function is

Re: [racket-users] How to implement a hash function for different types?

2019-08-02 Thread Jesse Wang
On Saturday, August 3, 2019 at 9:52:28 AM UTC+8, Jon Zeppieri wrote: > > On Fri, Aug 2, 2019 at 9:37 PM Justin Zamora > wrote: > > > > Racket doesn't implement hash tables using a hash function. If I > > recall correctly, it uses b-trees as the representation for a hash > > table. The

[racket-users] Re: How to implement a hash function for different types?

2019-08-02 Thread Jesse Wang
On Saturday, August 3, 2019 at 9:22:16 AM UTC+8, Jesse Wang wrote: > > Racket allows different types of keys in a single hash, so there must be a > hash function that works for different types(different primitive types), I > wonder how Racket implements this under the hood. > Also, If I want

[racket-users] Location of included text

2019-08-02 Thread Hendrik Boom
On Fri, Aug 02, 2019 at 10:07:05PM +0200, Jens Axel Søgaard wrote: > Den tor. 1. aug. 2019 kl. 13.25 skrev Hendrik Boom : > > > (2) When I use include-section from the main file, the actual text in > > the main file appears first, and the included files are all saved up ane > > emitted after the

Re: [racket-users] How to implement a hash function for different types?

2019-08-02 Thread Jon Zeppieri
On Fri, Aug 2, 2019 at 9:37 PM Justin Zamora wrote: > > Racket doesn't implement hash tables using a hash function. If I > recall correctly, it uses b-trees as the representation for a hash > table. The Racket reference states that "Immutable hash tables > actually provide O(log N) access and

Re: [racket-users] How to implement a hash function for different types?

2019-08-02 Thread Justin Zamora
Racket doesn't implement hash tables using a hash function. If I recall correctly, it uses b-trees as the representation for a hash table. The Racket reference states that "Immutable hash tables actually provide O(log N) access and update. Since N is limited by the address space so that log N is

[racket-users] How to implement a hash function for different types?

2019-08-02 Thread Jesse Wang
Racket allows different types of keys in a single hash, so there must be a hash function that works for different types(different primitive types), I wonder how Racket implements this under the hood. Also, If I want to implement a hash table which allows different types of keys, how can I

[racket-users] Re: possible bug related to syntax-shift-phase-level

2019-08-02 Thread Yongming Shen
Got my answer from another discussion: https://groups.google.com/d/msg/racket-users/qW-NZN2pwgk/y309YUwqEwAJ On Saturday, July 27, 2019 at 12:56:33 AM UTC-4, Yongming Shen wrote: > > Hi, > > It seems that after an identifier has been shifted > by syntax-shift-phase-level, the original

Re: [racket-users] a question related to bound-identifier=?

2019-08-02 Thread Yongming Shen
I see. Thank you for the clear and detailed explanation! On Friday, August 2, 2019 at 8:37:15 AM UTC-4, Matthew Flatt wrote: > > This is certainly confusing. > > The missing piece of the puzzle has to do with expansion in an > immediate module body. In that context, the macro expander adds the

Re: [racket-users] Re: Racket2 possibilities

2019-08-02 Thread Yongming Shen
I don't mind the parentheses. But I think Racket is kind of bloated and fragmented (I'm new to Racket, but this is the impression that I got so far). There are a lot of forms that are doing similar but slightly different things (e.g., the many let forms), and features that are not well

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Jens Axel Søgaard
Den tor. 1. aug. 2019 kl. 13.25 skrev Hendrik Boom : > (2) When I use include-section from the main file, the actual text in > the main file appears first, and the included files are all saved up ane > emitted after the text in the main file. I expected the sections to be > included where the

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Benjamin Yeung
On Fri, Aug 2, 2019 at 12:22 PM Hendrik Boom wrote: > > On Fri, Aug 02, 2019 at 10:46:26AM -0400, Benjamin Yeung wrote: > > > > On Thu, Aug 1, 2019 at 7:25 AM Hendrik Boom wrote: > > > > > > (1) Some of the @ commands I use are intended to cause conditional > > > inclusion of their contents,

[racket-users] Scribble text included out of order

2019-08-02 Thread Hendrik Boom
On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote: > On 8/1/19 7:25 AM, Hendrik Boom wrote: > > > (2) When I use include-section from the main file, the actual text in > > the main file appears first, and the included files are all saved up ane > > emitted after the text in the

[racket-users] drracket notebook mode and ipython/jupyter (Was: DrRacket2?)

2019-08-02 Thread Neil Van Dyke
Prior racket-users discussion on a hypothetical DrRacket Notebook Mode and the existing IPython/Jupyter kernel include: 2018-12-20 https://groups.google.com/forum/#!topic/racket-users/MsAh2aBU5Sw 2019-06-26 https://groups.google.com/d/msg/racket-users/XQXYxtCM2-k/AbTTqMqlAgAJ 2019-07-24

Re: [racket-users] DrRacket2?

2019-08-02 Thread Stephen De Gabrielle
On Fri, 2 Aug 2019 at 17:50, Sean Bailey wrote: > I will mention that there is a Racket kernel for Jupyter. I use Jupyter > notebooks a great deal for teaching, but haven’t used the Racket kernel > beyond installing it and basic testing. > I’m probably wrong but the thing that is keeping me

Re: [racket-users] DrRacket2?

2019-08-02 Thread Sean Bailey
I will mention that there is a Racket kernel for Jupyter. I use Jupyter notebooks a great deal for teaching, but haven’t used the Racket kernel beyond installing it and basic testing. Anyone have experience with using Racket with Jupyter? On Aug 2, 2019, 12:27 -0400, Stephen De Gabrielle ,

[racket-users] DrRacket2?

2019-08-02 Thread Stephen De Gabrielle
Hi, I’ve just posted a DrRacket2 issue on the RFC’s github https://github.com/racket/racket2-rfcs/issues/96 > Is a DrRacket2 needed? > Who is it for? > What functionality should it have? > What should it look like? My first suggestion is a 'notebook mode' like Jupyter notebooks. FYI did you

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Hendrik Boom
On Fri, Aug 02, 2019 at 10:46:26AM -0400, Benjamin Yeung wrote: > On Fri, Aug 2, 2019 at 7:25 AM Hendrik Boom wrote: > > > > So I see two ways forward on the snipped include front: > > > > (1) Write a preprocessor along the lines of the C presprocessor, but a > > lot simpler, that handles the

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Benjamin Yeung
On Fri, Aug 2, 2019 at 7:25 AM Hendrik Boom wrote: > > So I see two ways forward on the snipped include front: > > (1) Write a preprocessor along the lines of the C presprocessor, but a > lot simpler, that handles the include-section[]s by actually copying > them into the preprocessed copy of

[racket-users] Re: evaluating Scribble for prose

2019-08-02 Thread 'Joel Dueck' via Racket Users
On Thursday, August 1, 2019 at 10:14:09 AM UTC-5, David Storrs wrote: > > > A) Could conditionally include sections depending on environment variables > or command-line switches > B) Could seamlessly generate PDF, MOBI, EPUB, and clean and valid HTML > that either inlines the CSS or links to a

Re: [racket-users] a question related to bound-identifier=?

2019-08-02 Thread Matthew Flatt
This is certainly confusing. The missing piece of the puzzle has to do with expansion in an immediate module body. In that context, the macro expander adds the module's "inside-edge" scope (unshifted) to the result of any macro expansion. So, the expander is adding back the inside-edge scope that

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Hendrik Boom
On Thu, Aug 01, 2019 at 05:58:03PM -0500, Robby Findler wrote: > On Thu, Aug 1, 2019 at 12:54 PM Hendrik Boom wrote: > > At present, @include-section invokes require. Does it need to? Does > > it actually export identifiers to the invoking scribble file? Or is > > this just a convenient way of

Re: [racket-users] Re: Racket2 possibilities

2019-08-02 Thread Hendrik Boom
On Fri, Aug 02, 2019 at 01:49:23AM -0700, Yongming Shen wrote: > On the topic of making Racket 2 more appealing to new users. As a new user > myself, I have one (likely uninformed) suggestion: > > Design and promote a "boring core subset" that an experienced programmer > can pick up easily and

[racket-users] Re: Racket2 possibilities

2019-08-02 Thread Yongming Shen
On the topic of making Racket 2 more appealing to new users. As a new user myself, I have one (likely uninformed) suggestion: Design and promote a "boring core subset" that an experienced programmer can pick up easily and be as productive as when using an "ordinary programming language",