Re: [racket] contracts on functions that take arbitrary keyword arguments

2013-12-27 Thread Alexander D. Knauth
The problem isn't with defining the function, the problem is with making a contract for it. I can define the function fine, I just don't know how to write a contract for it. I used make-keyword-procedure to define the function, but is there something like make-keyword-procedure- contract?

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-27 Thread
Yes, it is a package now. But I found it is still more convenient to install manually. At 2013-12-28 10:09:02,"Matthias Felleisen" wrote: Do you want to turn it into a package: (1) http://pkgs.racket-lang.org/ (2) http://docs.racket-lang.org/pkg/?q=package -- Matthias On Dec 27, 20

[racket] send-generic/keyword-apply?

2013-12-27 Thread Alexander D. Knauth
Is there a version of send-generic that takes a keyword list and kw- argument list like send/keyword-apply? I already searched the documentation, but maybe it's there under a different name, and on a different page from send-generic. If not, would it be possible to define something like th

Re: [racket] scribble support for dynamic content

2013-12-27 Thread Martin DeMello
thanks, i'll poke around the style docs. martin On Fri, Dec 27, 2013 at 4:37 PM, Matthias Felleisen wrote: > > Scribble allows programmers to create their own 'styles' and > within a CSS style you can certainly refer to JS components. > > Search for 'style' in the docs (e.g. raco doc style) and

Re: [racket] Background expansion off

2013-12-27 Thread Robby Findler
If you don't mind providing a little more information on what's slow, I'd make an attempt to speed it up. Specifically, what operations are you doing (scrolling, typing, something else?) and what seems slow (refreshing?) Also: what version are you using? Thanks, Robby On Fri, Dec 27, 2013 at 8

Re: [racket] How to view source code of procedures? MIT scheme "pp" equivalent?

2013-12-27 Thread Neil Van Dyke
Matthias has good points about why the base Racket language does not do this, but if you want to do language experiments, or if you have really unusual practical requirements, you can still use Racket as a language platform... You could define your own "#lang" variant of Racket that stores the

Re: [racket] Background expansion off

2013-12-27 Thread Matthias Felleisen
Move your cursor over the green dot in the bottom right, click, select 'disable background expansion' -- Matthias On Dec 27, 2013, at 7:12 PM, Eduardo Costa wrote: > Racket's editor is very slow. Therefore, the background expansion produces an > annoying flicking in the Macintosh. Of course

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-27 Thread Matthias Felleisen
Do you want to turn it into a package: (1) http://pkgs.racket-lang.org/ (2) http://docs.racket-lang.org/pkg/?q=package -- Matthias On Dec 27, 2013, at 11:03 AM, 钟 wrote: > I used to write lisp code in emacs and enjoy paredit-mode.I tried to find an > alternative for DrRacket but found no

Re: [racket] How to view source code of procedures? MIT scheme "pp" equivalent?

2013-12-27 Thread Matthias Felleisen
On Dec 27, 2013, at 6:27 PM, Scott Klarenbach wrote: > I noticed that MIT Scheme has the "pp" procedure which prints the source code > of a given function. Is there an equivalent way to do this in Racket? No. The 'pp' idea probably dates back to the age of Lisp-machine repls when MIT program

Re: [racket] scribble support for dynamic content

2013-12-27 Thread Matthias Felleisen
Scribble allows programmers to create their own 'styles' and within a CSS style you can certainly refer to JS components. Search for 'style' in the docs (e.g. raco doc style) and peruse the scribble notion of style. -- Matthias On Dec 27, 2013, at 3:36 PM, Martin DeMello wrote: > Hi, >

[racket] Background expansion off

2013-12-27 Thread Eduardo Costa
Racket's editor is very slow. Therefore, the background expansion produces an annoying flicking in the Macintosh. Of course, it produces an annoying flicking in Linux too, but in Linux it is easy to turn it off. Well, I would like to learn how to disable background expansion in the Macintosh. Thank

[racket] How to view source code of procedures? MIT scheme "pp" equivalent?

2013-12-27 Thread Scott Klarenbach
I noticed that MIT Scheme has the "pp" procedure which prints the source code of a given function. Is there an equivalent way to do this in Racket? More generally, I'm looking to normalize nested procedures to their most rudimentary expressions. For example: (define (something? x) (> x 3)) (def

[racket] scribble support for dynamic content

2013-12-27 Thread Martin DeMello
Hi, Does scribble support generating a combination of HTML/CSS/javascript for some simple dynamic content? I'm thinking of writing some programming articles/tutorials, and was wondering if there was any support for the following: 1. Interspersed questions and answers, but with the answers hidden

Re: [racket] contracts on functions that take arbitrary keyword arguments

2013-12-27 Thread Robby Findler
Use make-keyword-procedure? Robby On Thursday, December 26, 2013, Alexander D. Knauth wrote: > I want to make contracts on some apply-like functions that check some > arguments but just passes all the others (including keyword arguments) on > to a function (provided as an argument). If there we

Re: [racket] contracts on functions that take arbitrary keyword arguments

2013-12-27 Thread Matthias Felleisen
This is a bit vague. Can you clarify the question with a concrete example? On Dec 26, 2013, at 7:45 PM, "Alexander D. Knauth" wrote: > I want to make contracts on some apply-like functions that check some > arguments but just passes all the others (including keyword arguments) on to > a fun

[racket] define-match-expander

2013-12-27 Thread Jens Axel Søgaard
The match pattern (? number? n) matches number and binds it to n. > (match 1 [(? number? n) n]) 1 I'd like to write (match 1 [n:num n]) instead. Since there is no define-identifier-match-expander I have tried to make (match 1 [(n:num) n]) work. I need a hint. Here is a non-working attem

[racket] contracts on functions that take arbitrary keyword arguments

2013-12-27 Thread Alexander D. Knauth
I want to make contracts on some apply-like functions that check some arguments but just passes all the others (including keyword arguments) on to a function (provided as an argument). If there weren't any keyword arguments, I could use a rest argument to do this, but that wouldn't work wi

[racket] Would someone prefer paredit shortcuts?

2013-12-27 Thread
I used to write lisp code in emacs and enjoy paredit-mode.I tried to find an alternative for DrRacket but found nothing, so I decided to do it on my own. I has written a prototype in one day at https://github.com/yjqww6/drracket-paredit , and implemented Depth-Changing, Barfage & Slurpage shor