Re: [racket-users] confused about raco check-requires error

2017-11-21 Thread Ryan Culpepper

On 11/21/17 2:57 AM, Alex Harsanyi wrote:

I'm trying to use the "raco check-requires" command to determine which
requires I should remove from my source files, and the command fails when I
include one of my files (the application compiles and runs fine).

I managed to reproduce the case as follows:

;; Save this in "file1.rkt"
#lang racket/base
(require racket/class)

(define foo%
  (class object%
(init-field name)
(super-new)
))

(provide foo%)

;; Save this in "file2.rkt"
#lang racket/base
(require "file1.rkt")

When running check requires ("raco check-requires file2.rkt"), I would
expect
that "file1.rkt" to be reported as a useless include, instead I get the
following error:

$ raco check-requires file2.rkt
derivation-parser: error on token #280:  .
#)>
(file "file2.rkt"):
ERROR in (file "file2.rkt")

Interestingly, if I compile the files using "raco make file2.rkt", the
check-requires command works fine:

$ raco make file2.rkt
$ raco check-requires file2.rkt
(file "file2.rkt"):
DROP "file1.rkt" at 0

Could someone clarify what is "check-requires" complaining about in the
first
case?  Is this command only supposed to be run after the code was compiled?


That's an internal error in the implementation of check-requires, which 
reuses parts of the macro stepper. When compiled/file1_rkt.zo doesn't 
exist, expanding file2.rkt causes file1.rkt to be compiled (but not 
saved as a .zo file). Macro stepper "events" are supposed to be emitted 
in expand mode but not in compile mode, but during the compilation of 
file1.rkt, some events are getting emitted anyway (that's the real bug), 
and that confuses the event parser.


I've committed a workaround that should fix this particular problem, but 
the underlying problem will probably be more difficult.


Ryan

--
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] minor proposed update to docs typography

2017-11-21 Thread Robby Findler
On Tue, Nov 21, 2017 at 9:44 AM, Matthew Butterick  wrote:
>
> On Nov 21, 2017, at 3:32 AM, Robby Findler 
> wrote:
>
> That may have been done that way to make the docs.racket-lang.org page look
> better (to draw your eye to the right manual).
>
>
> I figured.
>
> But hard-coding formatting inside `title` is a blunt instrument. It's not
> restricted to the TOC, but instead manifests globally. And, because it's
> implemented with "font-weight: bold" and not a CSS class, it's difficult to
> manipulate from outside (unless you employ the Hendershott Method)
>
> Forbidding `title` formatting entirely is not the answer. For instance, "How
> to Design Programs Teachpacks" should rightly have non-negotiable italics;
> "raco: Racket Command-Line Tools" should have non-negotiable code formatting
> for `raco`. In those cases, formatting is intrinsic to the meaning.
>
> But bold has no semantic purpose — it's just an emphasizer. And there are
> better ways to emphasize things in the TOC (e.g., page position, whitespace)

Absolutely. Feel free to change it.

Robby

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] minor proposed update to docs typography

2017-11-21 Thread Greg Hendershott
> restricted to the TOC, but instead manifests globally. And, because it's
> implemented with "font-weight: bold" and not a CSS class, it's difficult to
> manipulate from outside (unless you employ the Hendershott Method)

I object to using that name for such a weak hack.

The full Hendershott Method also involves overriding !important with
!!important as well as parsing HTML using regular expressions.

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] minor proposed update to docs typography

2017-11-21 Thread Matthew Butterick

> On Nov 21, 2017, at 3:32 AM, Robby Findler  
> wrote:
> 
> That may have been done that way to make the docs.racket-lang.org 
>  page look better (to draw your eye to the 
> right manual).

I figured. 

But hard-coding formatting inside `title` is a blunt instrument. It's not 
restricted to the TOC, but instead manifests globally. And, because it's 
implemented with "font-weight: bold" and not a CSS class, it's difficult to 
manipulate from outside (unless you employ the Hendershott Method)

Forbidding `title` formatting entirely is not the answer. For instance, "How to 
Design Programs Teachpacks" should rightly have non-negotiable italics; "raco: 
Racket Command-Line Tools" should have non-negotiable code formatting for 
`raco`. In those cases, formatting is intrinsic to the meaning.

But bold has no semantic purpose — it's just an emphasizer. And there are 
better ways to emphasize things in the TOC (e.g., page position, whitespace)

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] minor proposed update to docs typography

2017-11-21 Thread Robby Findler
On Mon, Nov 20, 2017 at 11:25 PM Matthew Butterick  wrote:

>
> On Nov 20, 2017, at 6:10 PM, Greg Hendershott 
> wrote:
>
>
>
> The following example hack _seems_ to clear the "impervious" hurdle?
>
>  a.Sq span { font-weight: normal !important}
>
> I'm not a CSS guru. This barely clears the "it works" hurdle.
> That is, I don't know if the "Sq" class is reliable as a parent
> selector. Also this doesn't bold the other link (but at least now
> they're equally non-bold).
>
>
>
> I saw the best minds of my generation destroyed by CSS, starving
> hysterical naked ...
>
>
> (PS I think the solution is just to forbid `bold` inside a `title` [1]
> because it confounds two issues best left separate)
>
>
> [1]
> https://github.com/racket/racket/blob/master/pkgs/racket-doc/scribblings/guide/guide.scrbl#L4
>

That may have been done that way to make the docs.racket-lang.org page look
better (to draw your eye to the right manual).

Robby


> --
> 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 racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.