Re: [racket-users] Applying functions to mutable lists

2015-04-09 Thread Justin Zamora
Why not use streams? http://docs.racket-lang.org/reference/streams.html Justin On Apr 9, 2015 11:22 AM, Jerry Jackson jrryjc...@gmail.com wrote: Hello, I'm building a language with racket that includes lazy lists. I'm building lazy lists with mcons cells. The compatibility/mlist module has

[racket-users] PSA for DrRacket users who like Emacs keybindings

2016-02-01 Thread Justin Zamora
The sequence C-a C-x C-s does something very different when Emacs keybindings are not active. :( Justin -- 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] Help writing a simple lexer/tokenizer

2016-02-22 Thread Justin Zamora
You can also try using a state machine using the approach described in https://cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macros/paper.pdf On Feb 22, 2016 4:46 PM, "Federico Ramírez" wrote: > Hello everyone! I'm new to Scheme, and I need some help wrapping

Re: [racket-users] Funtional programming and the maximum of something

2016-10-22 Thread Justin Zamora
A clue to the answer is in your statement that you "feed that [maximum] into the next circle of recursion." Notice that you're not overwriting the value in the current call, you're creating a new value that you feed into the new call in the "next circle". So the old one isn't being overwritten at

Re: [racket-users] Recursevly processing a list with "wholes"

2016-11-16 Thread Justin Zamora
I think you are looking for something like this: #lang racket (require test-engine/racket-tests) (define (remove-empty-lists lst) (cond [(null? lst) '()] ; Check for end of list [(null? (first lst)) (remove-empty-lists (rest lst))] ; Skip null sublist [(not (list? (first lst))) ;

Re: [racket-users] Re: Proper non-tail recursion?

2017-04-27 Thread Justin Zamora
On Thu, Apr 27, 2017 at 8:06 PM, Jon Zeppieri wrote: > > OCaml does handle tail calls properly. But proper tails calls are not > the subject of this discussion. The original post was explicitly about > non-tail calls and how, in Racket, you cannot exhaust the stack > without

Re: [racket-users] Byte Order Mark: alter display of symbols containing nonprinting characters?

2017-12-27 Thread Justin Zamora
There are many characters that have different Unicode values but use the same glyphs. Many Cyrillic characters look like their English characters, so they appear the same visually, but equal? and eq? reveal that they are actually distinct. It seems to be that the BOM is just another example on

Re: Types of languages Re: [racket-users] the list of languages made with racket [Hacker News]

2019-03-01 Thread Justin Zamora
You should include Danny Yoo's Brainfudge in the "stand-alone languages with non-s-exp syntax". https://www.hashcollision.org/brainfudge/index.html Justin On Fri, Mar 1, 2019 at 6:15 PM Stephen De Gabrielle wrote: > > > > On Fri, 1 Mar 2019 at 18:00, Matthias Felleisen > wrote: >> >> >> >> >

Re: [racket-users] color-maps for the plot package

2019-03-19 Thread Justin Zamora
On Tue, Mar 19, 2019 at 10:35 PM Ben Greenman wrote: > I'm thinking a color-map% object would define a possibly-infinite > sequence of colors that look nice in some way. The colors might be > useful anywhere where someone wants a "rainbow" of colors ... maybe > for: If you're interested in

Re: [racket-users] Re: How To Design Classes text not available?

2019-02-02 Thread Justin Zamora
Thanks! I always forget about archive.org! Justin On Sat, Feb 2, 2019 at 3:29 PM Greg Trzeciak wrote: > > Try > > https://web.archive.org/web/20181228174204/http://www.ccs.neu.edu/home/matthias/HtDC/htdc.pdf > > On Saturday, February 2, 2019 at 9:26:15 PM UTC+1, Justin Zam

[racket-users] How To Design Classes text not available?

2019-02-02 Thread Justin Zamora
I tried to download the draft of "How to Design Classes" from http://www.ccs.neu.edu/home/matthias/htdc.html and got a "Failed to load PDF document" error. Is this text still available? Justin -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To

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] [standard-fish] Lightsabers!

2019-07-30 Thread Justin Zamora
Stephen De Gabrielle announced this a few days ago on racket-dev, so I spent my weekend embracing my inner Star Wars nerd and made lightsabers in Racket. I had never used the pict library before, so it was also an interesting learning experience. I created a lightsaber function that produces a

[racket-users] [standard-fish] Lightsabers!

2019-07-30 Thread Justin Zamora
[Apologies if this gets sent twice. I accidentally sent the first one to the googlegroups email address] Stephen De Gabrielle announced this a few days ago on racket-dev, so I spent my weekend embracing my inner Star Wars nerd and made lightsabers in Racket. I had never used the pict library

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

2019-07-18 Thread Justin Zamora
On Thu, Jul 18, 2019 at 1:48 PM Brian Adkins wrote: > I think more people (both existing users and new users) could get > excited about Racket2 if it was primarily about making Racket > objectively better and only secondarily about overcoming the > aesthetic objection to parens. The message of

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Justin Zamora
Another, less lightweight way is to use panels for different parts of the chat windows. I put together a sample at https://gist.github.com/zamora/1cfc6480f7703735dffa3169facfbf10 On Mon, Aug 10, 2020 at 3:32 PM Christopher Lemmer Webber wrote: > > Hello, > > I'm building a little chat

Re: [racket-users] simple question about call/cc

2020-12-07 Thread Justin Zamora
The duplication is because you're evaluating the expression at top level, so the repl is part of the continuation. The continuation isn't (lambda (c) (c e2); it's actually something like (lambda (c) (evaluate-in-repl (c e2)). So when you run (ret 9), you're actually re-running the repl you had