Re: [racket-users] the Racket manifesto

2015-04-09 Thread Alexis King
I think Greg Hendershott’s Fear of Macros tutorial is pretty top-notch. Would it make any sense to adapt and incorporate that into the Racket docs? > On Apr 9, 2015, at 12:28, Geoffrey Knauth wrote: > > Since from his first months learning Racke

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

2015-04-09 Thread Matthew Flatt
At Thu, 9 Apr 2015 08:22:12 -0700 (PDT), Jerry Jackson wrote: > The compatibility/mlist module has lots of support functions but I'd > like to be able to apply racket functions to the lists I've > constructed and I don't see any "mapply". I understand that the use > of mutable cons cells is discour

Re: [racket-users] the Racket manifesto

2015-04-09 Thread Geoffrey Knauth
Since from his first months learning Racket, my son Alex immediately started diving into the language-altering aspects of Racket, when you do develop a tutorial/pedagogy for that, you might see what reaction he has. On Thursday, March 26, 2015 at 8:18:53 AM UTC-4, Matthias Felleisen wrote: > On

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

2015-04-09 Thread Jerry Jackson
On Thursday, April 9, 2015 at 9:28:54 AM UTC-6, Justin Zamora wrote: > Why not use streams? http://docs.racket-lang.org/reference/streams.html > > Justin > > On Apr 9, 2015 11:22 AM, "Jerry Jackson" wrote: > Hello, > > > > I'm building a language with racket that includes lazy lists. I'm buil

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" 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 lots of > suppo

[racket-users] Applying functions to mutable lists

2015-04-09 Thread Jerry Jackson
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 lots of support functions but I'd like to be able to apply racket functions to the lists I've constructed and I don't see any "mapply". I understand

Re: [racket-users] Constant syntax coloring?

2015-04-09 Thread Robby Findler
The continuously-on version of check syntax intentionally drops the coloring parts of the "click the button" version of check syntax. It does this so it doesn't have to fight with the syntax colorer, so I am reluctant to turn it back on. If you use only Racket-like languages, it may work for you t

Re: [racket-users] Constant syntax coloring?

2015-04-09 Thread Matthias Felleisen
In #lang languages syntax coloring happens on-line and is almost always close to correct. If you see a red dot in the bottom right of drracket, mouse over it, click to enable syntax checking. On Apr 9, 2015, at 2:59 AM, Jack Firth wrote: > The DrRacket Check Syntax button colors syntax in

Re: [racket-users] Linear time immutable hasmap union

2015-04-09 Thread Robby Findler
Not sure if it helps, but I believe the immutable hashes are currently implemented as AVL trees and they will probably become hash-mapped tries at some point. (I think that change is on a fork of Matthew's somewhere and still being explored.) Robby On Thu, Apr 9, 2015 at 8:49 AM, Alexey Cherkaev

Re: [racket-users] Linear time immutable hasmap union

2015-04-09 Thread Alexey Cherkaev
Yes, it's O(log n * n): n for iteration and (log n) for each insertion. It should be possible to do it linearly: Haskell's Data.Map.union is O(N+M) where N and M are the sizes of maps (or Data.HashMap.union). Also, MIT-Scheme's weight-balanced trees can do O(N+M): I can't see the reason why Racket

Re: [racket-users] Linear time immutable hasmap union

2015-04-09 Thread Laurent
The following is quite probably at worst O(n log n): (define (hash-merge h1 h2) (for/fold ([h h1]) ([(k v) (in-hash h2)]) (hash-set h1 k v))) And as the docs say: "Immutable hash tables actually provide O(log N) access and update. Since N is limited by the address space so that l

[racket-users] Linear time immutable hasmap union

2015-04-09 Thread Alexey Cherkaev
Hi all, Is it possible to union/merge two immutable hash-maps in linear time? I could implement it myself if I could have linear time constructor of hashmap from a sorted list (and assuming converting hash-map->list is i) linear and ii) produces sorted list). Regards, Alexey -- You received

[racket-users] Constant syntax coloring?

2015-04-09 Thread Jack Firth
The DrRacket Check Syntax button colors syntax in a helpful way, particularly the distinction it makes between required/language bindings and bindings defined in the module. However, as soon as I type anything the coloring disappears. This wouldn't be so bad if it reappeared the next time backgr