Re: [racket-dev] Revising Racket's home page

2013-08-20 Thread Prabhakar Ragde

Eli wrote:


  Semi-Quick: take Prabhakar's intro (cs.uwaterloo.ca/~plragde/tyr/) and
  make it terse enough to fit a single (longish) page.  I think that
  this is a fine choice for an aspiring hacker -- the only part that
  is missing, the advanced section, is probably the part that should
  at best be a very quick overview for a bunch of things that you
  could do, mostly serving as a link hub.


If this idea meets with general approval, I'd be happy to 
collaborate/consult with a co-author on doing this, but I am not a 
hacker and don't purport to understand what they want, so I'd need a 
co-author who could curb my professorial tendencies. (And I really 
should get around to finishing the advanced section.) --PR

_
 Racket Developers list:
 http://lists.racket-lang.org/dev


[racket-dev] Is it possible to write `flatten' in TR?

2012-08-07 Thread Prabhakar Ragde

Neil wrote:


(define (flatten lst)
   (cond [(list? lst)  (append* ((inst map (Listof A) (Listof* A))
 flatten
 lst))]
 [else  (list lst)]))


This version of flatten has quadratic worst-case running time. Is that 
an issue? A linear-time implementation is possible. Eli has a nice post 
somewhere about this. That would probably run into the same type issues 
(no better, no worse). --PR

_
 Racket Developers list:
 http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] match and debug in Advanced Student

2011-11-09 Thread Prabhakar Ragde

On 11/8/11 11:21 PM, Jay McCarthy wrote:

 I'm not sure I'm the best person to debug this
(despite otherwise being responsible for match in ASL.)


Then are you the person I lobby to get match into ISL+? --PR
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] racket/match is broken

2011-10-06 Thread Prabhakar Ragde

Sam wrote:


Unlike, say, `syntax-parse', `match' isn't designed for the use-case
of building ASTs while matching.


Wait, what? That's exactly what I want to use it for when writing toy 
interpreters for pedagogical purposes. Or am I misunderstanding what 
you're saying here? I want to do PLAI-style things, but with `match' 
instead of `type-case'. --PR

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] racket/match is broken

2011-10-06 Thread Prabhakar Ragde

On 10/6/11 2:12 PM, Eli Barzilay wrote:


Sam is talking about building the ASTs *while* matching, which is what
Jay was trying to do with uses of `app'.  I think that a teaching
context is in particular one where such a thing doesn't fit -- it
obscures the distinction between the side the sexpr goes into, and the
side where an AST comes out.


Okay, I see the distinction, and I apologize for not having fully 
understood Jay's example. I agree that this obscurity is hazardous. I 
think, though, that I have always assumed left-to-right matching, though 
I may never have constructed anything that would break if it didn't 
happen. --PR

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] Scribble output changes

2011-08-05 Thread Prabhakar Ragde

Matthew wrote:


Latex output changed in more ways:

 * Table content is vertically centered by default, making it more
   consistent with HTML.

 * In a table cell, a paragraph with a `#f' style name is rendered as a
   single line (as before), but a width is imposed on paragraphs that
   have a style name to make them flow as paragraphs.


For what it's worth, I found the documentation on tables largely 
incomprehensible, and could not get them to render through LaTeX without 
everything all mushed together. I finally wrote my own table function 
(using \array, which spaces things out well) that had the formatting I 
wanted. Cell styles? No clue.


Apropos of which, I don't know how to produce pure raw LaTeX code from 
within Scribble. I can usually cheat with things like


(make-element
(make-style begin '(exact-chars)) ...)

or (make-style relax ...), but for LaTeX package macros that parse one 
of their arguments more exactly (where wrapping the argument in 
\relax{...} will not work), I have to resort to building what I want at 
a high enough level that I can wrap it all in \relax without LaTeX 
getting upset. I feel like I'm pretty much doing what the LaTeX renderer 
does, but trying to stay within a higher-level API. If we want Scribble 
to be a LaTeX replacement but still render through LaTeX, it might need 
more thinking as to how to provide access in a Rackety fashion.


Sorry if I'm being completely ignorant here. I'm a passable Racket 
programmer but a lousy LaTeX programmer. --PR

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Fwd: a language example: brainfudge

2011-06-10 Thread Prabhakar Ragde

I'm starting to work on a small example of a non-lisp-like language
that uses the Racket infrastructure. ?I've chosen the language
Brain@#! since it's obviously not parenthetical.


Why did you sanitize the name? Is this language different than brainfuck?


I found this e-mail exchange hilarious, and read it out loud to my kids. 
--PR

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev