Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-18 Thread Greg Hendershott
This looks really exciting!

Imagining using this reminds me of something.

Typed Racket has a simple/standard way to disable type-checking (while
retaining the type declarations for documentation value as well as
potential re-enabling): #lang typed/racket/no-check and #lang
typed/racket/base/no-check.

Is there a similarly simple/standard way to disable contracts?

Last I checked, I couldn't find one. So I think we each write our own
my-define/contract and my-contract-out sort of macros? It's not
difficult. But it's idiosyncratic. Also: tools.

Why not e.g. #lang racket/no-check, and a racket/contract/no-check to
require for use with #lang racket/base?

Although I guess a tool like SCV is more in the business of disabling
individual contracts; not so much whole-file granularity?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] new package system collections and conflicts

2014-12-01 Thread Greg Hendershott
To play the role of Mr. Anecdote:

Someone mentioned Cabal. Last week at Hacker School, I paired for a
few hours with someone more-experienced in Haskell, to try using
Template Haskell on a toy project I'd done. My project uses Pandoc.
Apparently Pandoc is felt to download half the internet's worth of
Haskell packages. So my partner didn't want to install Pandoc out of
fear of version conflicts. Instead they simply used Docker to make an
image, and install Pandoc in that sandbox. Then we paired.

It seems to be more popular lately to use meta image/sandbox
tools like Docker, and not just among so-called devops people.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Splitting the Racket repository

2014-11-30 Thread Greg Hendershott
Sam gave me a heads-up on IRC.

 Also, DrDr now builds several packages that it didn't before: the
 s3-sync, sha, http, and aws packages. Currently, these packages have
 some test failures, but we hope to fix that soon.

I'm responsible for aws, http, and sha. I'm working on this.

I'm close to merging some commits[^1] to aws/master. Will look at http
and sha after that.

Also this is an opportunity to set up aws to be built by Travis
CI[^2]. If tests sneak back in that would fail on DrDr, they should
fail for the same reason on Travis as an early warning for me.  (The
basic issue is that I have tests that actually interact with AWS, but
these need credentials and cost $ so they need to be skipped in
scenarios like DrDr and Travis CI. Some other tests can still be run,
and will be.)

[^1]: https://github.com/greghendershott/aws/commits/drdr

[^2]: https://travis-ci.org/greghendershott/aws/builds/42570181
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Splitting the Racket repository

2014-11-30 Thread Greg Hendershott
I believe I've fixed everything shown on
http://drdr.racket-lang.org/29582/racket/share/pkgs/ for which I'm
responsible:

aws: Commits merged to master and pushed.

http: Fixed a buggy test mishandling 301/302 redirects.

sha: Nothing needed to be fixed.

I'll keep an eye on DrDr; Sam said he'd add me to the email alerts.

On Sun, Nov 30, 2014 at 4:13 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 Sam gave me a heads-up on IRC.

 Also, DrDr now builds several packages that it didn't before: the
 s3-sync, sha, http, and aws packages. Currently, these packages have
 some test failures, but we hope to fix that soon.

 I'm responsible for aws, http, and sha. I'm working on this.

 I'm close to merging some commits[^1] to aws/master. Will look at http
 and sha after that.

 Also this is an opportunity to set up aws to be built by Travis
 CI[^2]. If tests sneak back in that would fail on DrDr, they should
 fail for the same reason on Travis as an early warning for me.  (The
 basic issue is that I have tests that actually interact with AWS, but
 these need credentials and cost $ so they need to be skipped in
 scenarios like DrDr and Travis CI. Some other tests can still be run,
 and will be.)

 [^1]: https://github.com/greghendershott/aws/commits/drdr

 [^2]: https://travis-ci.org/greghendershott/aws/builds/42570181
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Package build information

2014-09-09 Thread Greg Hendershott
This is really cool!


Hmm, it looks like it stopped checking for updated packages yesterday
9/8/2014 around 1:30 PM.

I noticed because I submitted a PR for a package that was shown as
failing[1], but after a few hours it hasn't been picked up and
re-rested yet. Usually it checks for updates about once per hour,
IIRC.

(It's not urgent, and if were my own repo I'd do the manual refresh. I
just wanted to point it out.)

[1]: https://github.com/mbutterick/describe/pull/1
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Performance. Higher-order function

2014-08-11 Thread Greg Hendershott
 Being in the main repo is different from being in the distribution (and thus 
 automatically installed). I think that OC should be there when you download 
 the full bundle.

Definitely.

1. It's very useful.
2. Its existence says, Racket optimization is a thing.
3. It's used with one of Racket's most appealing and unique facets, DrRacket.
c
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] current packages' docs, errors, and conflicts

2014-07-10 Thread Greg Hendershott
Ah, great. I didn't know about --tidy. Thank you.

I just pushed this change:
https://github.com/greghendershott/rackjure/commit/a70fa27662fd10c3c458f9dce77dff7bc73ef6fc

That should clear the rightmost column for all my packages (rackjure,
and projects using it).


On Thu, Jul 10, 2014 at 3:28 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Yes, `raco setup` with no arguments would succeeded and should fix
 things up at this point.

 When you use `raco pkg update`, it effectively passes the `--tidy` flag
 to `raco setup`. That is, `raco setup --tidy rackjure` would avoid the
 problem, and it should also fix things up at this point.

 It's tempting to conclude that `--tidy` mode should be the default for
 `raco setup`, and that may be right. I'm not yet sure; `raco setup` is
 trying to provide a do only things that I've requested interface when
 collections are specified, and that competes with its do the right
 thing job.

 At Wed, 9 Jul 2014 20:29:52 -0400, Greg Hendershott wrote:
 On Wed, Jul 9, 2014 at 8:21 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:
  On the next raco setup I get:
 
  raco setup: --- building documentation ---
  raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt) 
  alist))
  raco setup:  in: unknown
  raco setup:  in:
  /Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
  raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt)
  current-curly-dict))
  raco setup:  in: unknown
  raco setup:  in:
  /Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
  ... and many more...

 To clarify, that was when I tried `raco setup rackjure`.

 Maybe a full `raco setup` would have succeeded?  But even if so, what
 will `raco pkg update rackjure` do -- the full `raco setup` or just
 the `raco setup rackjure`?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] current packages' docs, errors, and conflicts

2014-07-09 Thread Greg Hendershott
So I just renamed rackjure's manual.scrbl to rackjure.scrbl.

On the next raco setup I get:

raco setup: --- building documentation ---
raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt) alist))
raco setup:  in: unknown
raco setup:  in:
/Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt)
current-curly-dict))
raco setup:  in: unknown
raco setup:  in:
/Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
... and many more...

The message about unknown is confusing. But anyway, I assume this is
because the new rackjure.scrbl output is conflicting with the old
manual.scrbl output.

OK, so I should probably remove rackjure, then retry raco setup. However:

raco pkg remove rackjure
raco pkg remove: cannot remove packages that are dependencies of other packages
  dependencies:
   rackjure (required by: (markdown toml frog))

I could remove those and try again...but. Now I'm a little concerned
how this will play out in the field for users of rackjure.

Renaming the file is easy for me. But will it trigger a cascade of
re-installs that succeed (best-case, or do not succeed, worst case)?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] current packages' docs, errors, and conflicts

2014-07-09 Thread Greg Hendershott
On Wed, Jul 9, 2014 at 8:21 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 On the next raco setup I get:

 raco setup: --- building documentation ---
 raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt) alist))
 raco setup:  in: unknown
 raco setup:  in:
 /Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
 raco setup: WARNING: duplicate tag: (def ((lib rackjure/alist.rkt)
 current-curly-dict))
 raco setup:  in: unknown
 raco setup:  in:
 /Users/greg/src/scheme/collects/rackjure/rackjure/rackjure.scrbl
 ... and many more...

To clarify, that was when I tried `raco setup rackjure`.

Maybe a full `raco setup` would have succeeded?  But even if so, what
will `raco pkg update rackjure` do -- the full `raco setup` or just
the `raco setup rackjure`?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] 2htdp/image Feature Suggestion

2014-06-28 Thread Greg Hendershott
On Mon, Jun 23, 2014 at 9:44 PM, Jos Koot jos.k...@gmail.com wrote:
 style. Writing this, the idea comes up in my mind that it should be possible
 to do some transformations to the recommended style by means of redex. Or
 may be by means of syntax-case while limiting the transformers to the
 desired level of expansion. Both instuments are interesting enough for me to
 give it a try. If I am able to do something usefull in this sense, you'll
 hear of me, but give me some time, please.

If you use Emacs, check out Ryan's sexp-rewrite mode. IIUC he's
implemented `syntax-parse`-like functionality in Elisp:

  https://github.com/rmculpepper/sexp-rewrite


p.s. In a similar spirit, but for Clojure, and IIUC implemented
leveraging paredit:

  https://github.com/clojure-emacs/clj-refactor.el
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Easy disassembly of JIT-compiled procedures

2014-05-27 Thread Greg Hendershott
 Unfortunately, I think that making disassembly for contracted
 functions work would be both tricky, and not as helpful as you'd want,
 since showing the behavior of the contract at the JIT level is not
 trivial.  So for the moment, I think this is just not going to work.

That makes sense. But what I tried above was a work-around; what I
actually wanted would be more like:

#lang typed/racket/base  ;; - TR
(require disassemble/typed) ;; -- hypothetical TR version of `disassembly`
(: f (Number - Number))
(define (f x)
  (+ x 10))
(disassemble f)

IOW to see the disassembly of the raw un-contracted `f` that would
be called directly from other Typed Racket code (IIUC).


p.s. Having said all that, I don't personally have an immediate _need_
to use this. I just thought, oh, it would be interesting to diff the
disassembly of the untyped and Typed variants of some functions.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Easy disassembly of JIT-compiled procedures

2014-05-23 Thread Greg Hendershott
 Testing of the new code (which is on by default) on platforms other
 than x86-64 Linux would be greatly appreciated.

I tried and it works great on OS X, for untyped Racket.


As for Typed Racket, I tried:

#lang typed/racket/base

(: f (Number - Number))
(define (f x)
  (+ x 10))

(require/typed disassemble
  [disassemble (Procedure [#:program Boolean] - Any)])
(disassemble f)

But it complains:

; disassemble: contract violation
;   expected: non-primitive procedure
;   given: #procedure:f
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #28781: master branch updated

2014-05-23 Thread Greg Hendershott
Feedback from a relatively naive Racket user:

1.

 +External effects are exemplified by input/output (or I/O). I/O is the
 +action of a function such as @racket[tcp-connect], which communicates
 +with the operating system to send network packets outside of the
 +machine running Racket via the electromagnetic spectrum.

It might be OK to omit via the electromagnetic spectrum. Yes I'm
aware of RFC 1149. But still.  :)


2.

 +In particular, if module A is shared by the phase 1 portion of modules
 +X and Y, then any internal effects while X is compiled are not visible
 +during the compilation of Y, regardless of whether X and Y are
 +compiled during the same Racket runtime system.

Was system supposed to be session?


3. The practical example goes some way toward explaining why this
matters. But only part way (for me). Probably some real-life situation
motivated this. Knowing that backstory might help. (If you think that
tale doesn't fit and/or belong in the reference docs, maybe it would
make a great blog post?)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] comments on comments on learning Racket

2014-04-26 Thread Greg Hendershott
I agree. Although I appreciate it helps in some classroom situations,
I don't think the status quo is best for programmers in general.

Also, speaking of Choose Language, I remember being very confused
early on because some options were doubly hidden:

1. They're not under Preferences, they're under Choose Language.

2. Even when you do Choose Language, they're hidden until you click
Show Details.

Even after I discovered it, I forgot a few times; I remember hunting
for an option through all the Preferences tabs, thinking, geez, I
know I saw it _somewhere_ before...where the heck...?

 On this topic (which is about the Choose a language language that
 DrRacket starts in when newly installed), I think we should just
 delete all of this code, and start in the Racket language.

 Advantages:
 - eliminating something that trips up everyone who starts using DrRacket
 - reducing the number of people who end up in teaching languages by mistake
 - removing code (code that doesn't exist has no bugs :)

 Disadvantages:
 - Somewhat more teachers (of all kinds) will have to deal with
 students who use the full language
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Using `git submodule` vs. `git pull --ff-only upstream master`

2014-04-17 Thread Greg Hendershott
For whoever else might find this useful building on OS X.

Building HEAD today I got this new error:

raco setup: --- creating launchers ---
raco setup: launcher: console-bin/raco
raco setup: --- installing man pages ---
raco setup: --- installing collections ---
raco setup: --- post-installing collections ---
raco setup: --- checking package dependencies ---
make install-common-last
make fix-paths
if [  !=  ]; then \
  racket/racketcgc -G /Users/greg/src/plt/racket/build/config -u \
../../collects/setup/unixstyle-install.rkt \
make-install-destdir-fix ../.. \
/Users/greg/src/plt/racket/racket/bin
/Users/greg/src/plt/racket/racket/collects
/Users/greg/src/plt/racket/racket/doc
/Users/greg/src/plt/racket/racket/lib
/Users/greg/src/plt/racket/racket/include
/Users/greg/src/plt/racket/racket/lib
/Users/greg/src/plt/racket/racket/share
/Users/greg/src/plt/racket/racket/etc
/Users/greg/src/plt/racket/racket/share/applications
/Users/greg/src/plt/racket/racket/man yes; \
fi
make preserve-raco-pkg-default-scope
:
cp ../COPYING-libscheme.txt ../COPYING_LESSER.txt ../COPYING.txt
/Users/greg/src/plt/racket/racket/share/
if racket/bin/racket -G build/config -I racket/base -e '(case
(system-type) [(macosx) (exit 0)] [else (exit 1)])' ; then make
native-from-git ; fi
if [ ! -d native-pkgs/racket-win32-i386 ]; then make complain-no-submodule ; fi
make pkg-links PKGS=main-distribution plt-services LINK_MODE=--save
racket/bin/racket -U -G build/config racket/src/link-all.rkt ++dir
pkgs ++dir native-pkgs --save main-distribution plt-services
racket-lib
Linking packages:
  plt-services
  racket-lib
  main-distribution
Recording packages choice in racket/etc/link-pkgs.rktd
link-all: requested package not available: draw-x86_64-macosx-2
  context...:
   /Users/greg/src/plt/racket/racket/src/link-all.rkt:150:6: for-loop
   /Users/greg/src/plt/racket/racket/src/link-all.rkt:148:2: loop
   /Users/greg/src/plt/racket/racket/src/link-all.rkt: [running body]
make[2]: *** [pkg-links] Error 1
make[1]: *** [plain-in-place] Error 2
make: *** [in-place] Error 2


Although this is unlike the previous symptoms of stale submodules,
draw-x86_64-macosx-2 sounds like something that might be related to
native-pkgs. So on a hunch I tried this:

$ git submodule update
remote: Counting objects: 214, done.
remote: Compressing objects: 100% (157/157), done.
remote: Total 214 (delta 59), reused 183 (delta 44)
Receiving objects: 100% (214/214), 19.84 MiB | 54 KiB/s, done.
Resolving deltas: 100% (59/59), done.
From https://github.com/plt/libs
   b698e73..3d8856e  master - origin/master
Submodule path 'native-pkgs': checked out
'3d8856eb987af16ab27cc99d4d24d5f9e7efc33b'


Although it was an unusually slow/big fetch, it succeeded.

And now the build now. (Well as I type this, my laptop fans are
blazing away, as it is still running the raco setup stage. But it
proceeded OK past the point it was failing before.)

Maybe this is obvious to everyone else, but I wanted to mention it in
case it helped anyone else building on OS X.

On Tue, Dec 17, 2013 at 4:48 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 To answer my own question, back in July Matthew had posted here:

 On Sat, Jul 27, 2013 at 9:10 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Nothing has been split out of the current git repository, but there is
 now a native-pkgs git submodule for the native-library packages.

 If you build on Mac OS X or Windows or if you run a snapshot build,
 then you'll need to use

   git pull
   git submodule init
   git submodule update

 once on each repository checkout from now on, and

   git pull
   git submodule update

 for updates after the first checkout.

 If you just `git pull' without the submodule commands, then you'll have
 an empty native-pkgs directory. That's fine if you're building on,
 say, Linux. If you're on Mac OS X or Windows, then the makefile should
 give you a good error message and suggest using `git submodule init'
 and `git submodule update'.

 If you use `git submodule update' today and forget to use it in the
 future, probably things will be fine for a long time, because
 native-pkgs doesn't change often. If native-pkgs does change and
 you forget `git submodule update', then (as I understand things) `git
 status' will tell you that there's a mismatch. The mismatch report
 might take a form that's not entirely clear, but it should be enough to
 remind you to run `git submodule update'.

 It turned out that it wasn't enough to remind _me_. :)  Running `git
 submodule update` resolved this for me.


 On Fri, Sep 20, 2013 at 2:30 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:
 I build Racket while keeping my forked repo's `master` branch an
 exact, fast-forwardable copy of PLT's remote upstream `master`. [1]

 This has worked fine building Racket on Linux, and continues to do so.

 But on OS X, I need to follow these instructions from INSTALL.TXT, wrt
 the pkg re-org

Re: [racket-dev] Using `git submodule` vs. `git pull --ff-only upstream master`

2014-04-17 Thread Greg Hendershott
Yes. FWIW I do:

function parse_git_dirty() {
  [[ $(git status 2 /dev/null | tail -n1) != *working directory
clean* ]]  echo *
}

function parse_git_branch() {
  git branch --no-color 2 /dev/null | sed -e '/^[^*]/d' -e s/*
\(.*\)/\1$(parse_git_dirty)/
}

Which goes into the the end of:

greg@mbp in ~/src/plt/racket on master*
$

And now that you mention it, I _did_ see the * in my prompt. I
should have paid attention to it, but
`git status` showed nothing. I should have done `git diff`.

Sorry for the noise here. (My total experience with git submodule
updates consists of the 2 or 3 times I've had to do this with Racket
-- and at intervals of enough months that I manage to forget in
between.)


On Thu, Apr 17, 2014 at 9:37 PM, Spencer Florence spen...@florence.io wrote:
 stale git submodules show up on a status. What I've found helpful is to add
 a bit in my prompt that tells me if the current git repository has a non up
 to date status (And the current branch). If you're running Zsh this is a
 good place to start for that:

 git_prompt_info() {
   ref=$(git symbolic-ref HEAD 2 /dev/null)
   if [[ -n $ref ]]; then
 echo -n [%F{red}${ref#refs/heads/}%f
 st=$(git status -s 2 /dev/null)
 if [[ -n $st ]]; then
   echo -n %f*%f
 fi
 echo -n ]
   fi
 }
 export PS1='$(git_prompt_info)[%F{green}%m%F{white}:%F{blue}%2c%f] '


 Or on Bash:


 function git_prompt_info() {
   ref=$(git symbolic-ref HEAD 2 /dev/null | cut -d'/' -f3)
   if [[ -n $ref ]]; then
 # Zsh prompt this was based on
 # echo [%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}]
 echo [$(tput setaf 2)$ref$(tput sgr0)]
   fi
 }
 export PS1=\$(git_prompt_info)$PS1
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Too many license files

2014-02-27 Thread Greg Hendershott
Great, I mis-posted that to users not dev. Gah.

On Thu, Feb 27, 2014 at 12:12 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 On Fri, Feb 21, 2014 at 10:51 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Yes, the duplicate files bother me, too. I think removing the
 duplicates will require yet another little twist in the package system
 (since the files originate from individual packages), so we've left
 them for now.

 At Fri, 21 Feb 2014 11:45:50 -0500, Neil Van Dyke wrote:
 I'm not a lawyer, but I figured that, for most packages I author, I
 probably don't *need* to include the full text of a well-known license
 (e.g., LGPLv3).  Instead, I give the copyright notice, state that the
 license using the recognized full name of the license (and a URL), and
 then some disclaimers.

 Speaking of referencing rather than copying licenses, and third party pkgs:

 It would be helpful for some sort of canonical license ID or URI to be
 part of the official metadata in info.rkt and on pkgs.racket-lang.org.

 That way someone could filter packages by license when browsing the
 pkg web site.

 Also, it could enable `raco pkg` (or a third-party utility) to do a
 license compatibility check down the dependency chain.

 Even just license missing would be helpful to know, transitively.
 Plus there's license compatibility. (That taxonomy or permissiveness
 ordinality doesn't necessarily need to be baked into the license URIs;
 it could come from elsewhere, but use the URIs.)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Bug report lost? Here it is again: Issue with help

2014-02-02 Thread Greg Hendershott
 I can see how that could happen. When you first install, the only
 documentation page is in the main installation. After you install some
 packages (in user scope), then there will be a more specific
 documentation page in a user-specific location. It sounds like the CSS
 file is not properly installed for the user-specific location.

Ah I see. Glad I'm not crazy.

Although my original report mentioned both JS and CSS, my recent email
only mentioned CSS. So I should emphasize that both are missing, and
needed.

For example, the following hack fixes the issue for me:

greg@mbp in /Applications/Racket_v5.93/doc
$ ls *.css
doc-site.css   manual-racket.css  racket.css scribble.css
manual-fonts.css   manual-style.css   scribble-style.css
greg@mbp in /Applications/Racket_v5.93/doc
$ cp *.css /Users/greg/Library/Racket/5.93/doc/

greg@mbp in /Applications/Racket_v5.93/doc
$ ls *.js
doc-site.jsscribble-common.js
greg@mbp in /Applications/Racket_v5.93/doc
$ cp *.js /Users/greg/Library/Racket/5.93/doc/

After that, both (a) the appearance is correct and (b) search works.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Bug report lost? Here it is again: Issue with help

2014-02-01 Thread Greg Hendershott
OK this is weird.

I downloaded 5.93.
Started DrRacket 5.93.
Hit F1.
It went to the page with the new CSS present.
Figured problem was fixed. \o/
BUT:
Ran `raco pkg install` for a dozen packages: some from pkgs.r-l.org,
some local --link.
And now, the problem has returned.
Hit F1.
It goes to page that can't find the CSS.
Same problem with (begin (require racket/help) (help a string)) at the REPL.

Does that even make any sense??
Could one of the package installs be fubar-ing this??


p.s. I haven't heard anyone else say, oh I can repro that on OSX,
too. Can anyone?  If not, maybe this is related to why?


On Mon, Jan 27, 2014 at 12:10 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 More information:

 First, in case it wasn't clear before, this isn't DrR specific. It's
 the string i.e. search variant of racket/help, which DrR uses.
 e.g. with XREPL just say ,doc foo and you have same thing.

 The page /Users/greg/Library/Racket/5.92/doc/search/index.html?q=foo
 wants the following css files:

 link title=default href=../scribble.css type=text/css
 rel=stylesheet/link
 link title=default href=../racket.css type=text/css
 rel=stylesheet/link
 link title=default href=../manual-style.css type=text/css
 rel=stylesheet/link
 link title=default href=../manual-racket.css type=text/css
 rel=stylesheet/link
 link title=default href=../doc-site.css type=text/css
 rel=stylesheet/link

 But none are present.

 Comparing 5.3.5:

 $ ls /Applications/Racket_v5.3.5/doc/*.css
 /Applications/Racket_v5.3.5/doc/racket.css
 /Applications/Racket_v5.3.5/doc/scribble-style.css
 /Applications/Racket_v5.3.5/doc/scribble.css

 $ ls /Users/greg/Library/Racket/5.3.5/doc/*.css
 /Users/greg/Library/Racket/5.3.5/doc/scribble-style.css
 /Users/greg/Library/Racket/5.3.5/doc/scribble.css

 to 5.92:

 $ ls /Applications/Racket_v5.92/doc/*.css
 /Applications/Racket_v5.92/doc/doc-site.css
 /Applications/Racket_v5.92/doc/manual-fonts.css
 /Applications/Racket_v5.92/doc/manual-racket.css
 /Applications/Racket_v5.92/doc/manual-style.css
 /Applications/Racket_v5.92/doc/racket.css
 /Applications/Racket_v5.92/doc/scribble-style.css
 /Applications/Racket_v5.92/doc/scribble.css

 $ ls /Users/greg/Library/Racket/5.92/doc/*.css
 none  # Need some/all of the above here, too?

 Although I'm probably over-explaining this I hope it's helpful.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Can't log in to pkg.racket-lang.org

2014-01-27 Thread Greg Hendershott
 I've put in my email and password, but clicking Log In does nothing.
 Neither does pressing enter.  Anyone else seeing this behavior, or know what
 the problem is?

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


Re: [racket-dev] Bug report lost? Here it is again: Issue with help

2014-01-27 Thread Greg Hendershott
More information:

First, in case it wasn't clear before, this isn't DrR specific. It's
the string i.e. search variant of racket/help, which DrR uses.
e.g. with XREPL just say ,doc foo and you have same thing.

The page /Users/greg/Library/Racket/5.92/doc/search/index.html?q=foo
wants the following css files:

link title=default href=../scribble.css type=text/css
rel=stylesheet/link
link title=default href=../racket.css type=text/css
rel=stylesheet/link
link title=default href=../manual-style.css type=text/css
rel=stylesheet/link
link title=default href=../manual-racket.css type=text/css
rel=stylesheet/link
link title=default href=../doc-site.css type=text/css
rel=stylesheet/link

But none are present.

Comparing 5.3.5:

$ ls /Applications/Racket_v5.3.5/doc/*.css
/Applications/Racket_v5.3.5/doc/racket.css
/Applications/Racket_v5.3.5/doc/scribble-style.css
/Applications/Racket_v5.3.5/doc/scribble.css

$ ls /Users/greg/Library/Racket/5.3.5/doc/*.css
/Users/greg/Library/Racket/5.3.5/doc/scribble-style.css
/Users/greg/Library/Racket/5.3.5/doc/scribble.css

to 5.92:

$ ls /Applications/Racket_v5.92/doc/*.css
/Applications/Racket_v5.92/doc/doc-site.css
/Applications/Racket_v5.92/doc/manual-fonts.css
/Applications/Racket_v5.92/doc/manual-racket.css
/Applications/Racket_v5.92/doc/manual-style.css
/Applications/Racket_v5.92/doc/racket.css
/Applications/Racket_v5.92/doc/scribble-style.css
/Applications/Racket_v5.92/doc/scribble.css

$ ls /Users/greg/Library/Racket/5.92/doc/*.css
none  # Need some/all of the above here, too?

Although I'm probably over-explaining this I hope it's helpful.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Bug report lost? Here it is again: Issue with help

2014-01-26 Thread Greg Hendershott
Last night I submitted a bug report using DrRacket 5.92.

But I didn't get a confirmation email.  And I don't see it using
advanced query arrival-date  2014-01-24 00:00 GMT.

So that in itself is... a bug??

Anyway, for belt+suspenders the original bug is (typing it again, so
won't exactly match what I submitted last night, if that ever turns
up):


A .dmg install on OSX of 5.92 64-bit has an issue with help that I
never saw on HEAD:

From DrRacket 5.92 hit F1 for help.
Opens web browser, goes to
file:///Users/greg/Library/Racket/5.92/doc/search/index.html.
That page lacks any style sheet.
Also JS seems disabled: Enter something in either of the two Search
input boxes, press ENTER nothing happens.

Click the Racket Documentation link.
Goes to file:///Users/greg/Library/Racket/5.92/doc/index.html
This page also lacks style sheet.

Click a link like The Racket Guide.
Goes to file:///Applications/Racket_v5.92/doc/guide/index.html
*** Note the different URL path, from /Applications not /Users ***
Now the page has a style sheet (the new one, yay!).
Now the page's Search input works.

Clicking links thereafter seems to say within the /Applications URL
paths: The style sheet is used and Search input works.

tl;dr Help first goes to web pages under /Users, which don't work
well. Eventually you get to pages under /Applications, which work as
expected.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Bug report lost? Here it is again: Issue with help

2014-01-26 Thread Greg Hendershott
That's it.

On Sun, Jan 26, 2014 at 11:58 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 On 2014-01-26 11:45:43 -0500, Greg Hendershott wrote:
 But I didn't get a confirmation email.  And I don't see it using
 advanced query arrival-date  2014-01-24 00:00 GMT.

 Is that this bug report by any chance?

   http://bugs.racket-lang.org/query/?cmd=viewpr=14313

 Odd that you didn't get a notification though.

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


Re: [racket-dev] Duplicate tag warnings building docs?

2013-12-18 Thread Greg Hendershott
That worked! No warnings. (It must have been something outside the doc/ tree.)


Thank you for pointing out how to use `git clean -x -d -f` as a sort
of `make clean`.

Probably that tip should go in INSTALL.TXT. And in a future version of
the http://blog.racket-lang.org/2012/11/tutorial-contributing-to-racket.html
blog post, updated for the new build system.

Maybe `make clean` should print, If you don't have any changes to the
tree, use `git clean -x -d -f`?


On Wed, Dec 18, 2013 at 12:03 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 If you don't have any changes to the tree, try 'git clean -x -f -d' before
 running make. That will delete all of the old build products (and everything
 else that isn't in the repo) and hopefully clear things up.

 Robby


 On Tue, Dec 17, 2013 at 10:53 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:

 On Tue, Dec 17, 2013 at 11:52 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:
  I tried deleting docindex.sqlite but it left things in a weird state
  -- racket/help couldn't find help for things like string-base.

 Hopefully it was clear but I meant things like string-list, from
 racket/base.

 Anyway, the main point is I still get the warnings.

 Whether it matters, I don't know, but I wanted to report it.
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev


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


Re: [racket-dev] Using `git submodule` vs. `git pull --ff-only upstream master`

2013-12-17 Thread Greg Hendershott
To answer my own question, back in July Matthew had posted here:

On Sat, Jul 27, 2013 at 9:10 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Nothing has been split out of the current git repository, but there is
 now a native-pkgs git submodule for the native-library packages.

 If you build on Mac OS X or Windows or if you run a snapshot build,
 then you'll need to use

   git pull
   git submodule init
   git submodule update

 once on each repository checkout from now on, and

   git pull
   git submodule update

 for updates after the first checkout.

 If you just `git pull' without the submodule commands, then you'll have
 an empty native-pkgs directory. That's fine if you're building on,
 say, Linux. If you're on Mac OS X or Windows, then the makefile should
 give you a good error message and suggest using `git submodule init'
 and `git submodule update'.

 If you use `git submodule update' today and forget to use it in the
 future, probably things will be fine for a long time, because
 native-pkgs doesn't change often. If native-pkgs does change and
 you forget `git submodule update', then (as I understand things) `git
 status' will tell you that there's a mismatch. The mismatch report
 might take a form that's not entirely clear, but it should be enough to
 remind you to run `git submodule update'.

It turned out that it wasn't enough to remind _me_. :)  Running `git
submodule update` resolved this for me.


On Fri, Sep 20, 2013 at 2:30 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 I build Racket while keeping my forked repo's `master` branch an
 exact, fast-forwardable copy of PLT's remote upstream `master`. [1]

 This has worked fine building Racket on Linux, and continues to do so.

 But on OS X, I need to follow these instructions from INSTALL.TXT, wrt
 the pkg re-org:


 On Mac OS X and Windows, you'll need native-library packages in the
 native-pkgs directory. In the git repostory, native-pkgs is a git
 submodule, so you'll need
git submodule init
git submodule update
 to get it set up.
 

 After I do so, the resulting build works great.

 However it introduces a change:


 greg@mbp in ~/src/plt/racket on master*
 $ git diff
 diff --git a/native-pkgs b/native-pkgs
 index f367c0c..f8c8984 16
 --- a/native-pkgs
 +++ b/native-pkgs
 @@ -1 +1 @@
 -Subproject commit f367c0c4b05b91401d68b0180b416d616b31720d
 +Subproject commit f8c8984ebe8a442d474558dced0eb824cbb24772
 

 If I commit this, my master wouldn't be a FF copy anymore (AFIK). So I don't.

 But as a result, if I switch to a topic branch without committing
 (normally a no-no), it's a bit weird:


 greg@mbp in ~/src/plt/racket on master*
 $ git checkout imap-append-flags
 warning: unable to rmdir native-pkgs: Directory not empty
 Switched to branch 'imap-append-flags'
 

 After switching back to master, everything seems OK:


 greg@mbp in ~/src/plt/racket on imap-append-flags*
 $ git checkout master
 M native-pkgs
 Switched to branch 'master'
 Your branch is ahead of 'origin/master' by 771 commits.
 

 Is this -- the warning about native-pkgs -- something I should just
 learn to ignore and treat as the new normal?


 [1]: 
 http://www.greghendershott.com/2013/04/a-guide-for-infrequent-contributors-to-racket.html
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Duplicate tag warnings building docs?

2013-12-17 Thread Greg Hendershott
Building HEAD (97ee349) today I noticed the following:

raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt)
current-pkg-catalog-file))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-catalogs))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-module-pkgs))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt)
get-pkg-dependencies))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-pkg-modules))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-pkg-tags))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-pkgs))
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup:  in:
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrbl
...


and quite a few more (not all are pkg/db.rkt) -- full output here:
https://gist.github.com/greghendershott/8013323

This may have been happening for quite awhile but I haven't noticed.
These is in the middle of the doc section, wouldn't be on-screen at
the end of the build.

Not sure if it matters but wanted to mention just in case.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Duplicate tag warnings building docs?

2013-12-17 Thread Greg Hendershott
I tried deleting docindex.sqlite but it left things in a weird state
-- racket/help couldn't find help for things like string-base. And
for things like (say) get-pure-port, there was a 10 second delay the
first time in each Racket session for Loading help index..., but
then it did find the topic.

I thought to rm -rf racket/doc and run make.

But same warnings during raco setup.

(However racket/help does work fine now. Same 10-second index load.
That seems longer than in 5.3.6, but maybe I'm mistaken.)



On Tue, Dec 17, 2013 at 9:51 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 I think this is probably a leftover from the broken period starting
 with commit 6ff7359212 and ending with commit 4fc71002e8 --- and a case
 of things being just broken enough that the current version doesn't
 detect that things need to be refreshed.

 You might try deleting

  /Users/greg/src/plt/racket/doc/docindex.sqlite

 before the next `raco setup`.

 At Tue, 17 Dec 2013 17:00:11 -0500, Greg Hendershott wrote:
 Building HEAD (97ee349) today I noticed the following:

 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt)
 current-pkg-catalog-file))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-catalogs))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) 
 get-module-pkgs))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt)
 get-pkg-dependencies))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) 
 get-pkg-modules))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-pkg-tags))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup: WARNING: duplicate tag: (def ((lib pkg/db.rkt) get-pkgs))
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 raco setup:  in:
 /Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-doc/pkg/scribblings/pkg.scrb
 l
 ...


 and quite a few more (not all are pkg/db.rkt) -- full output here:
 https://gist.github.com/greghendershott/8013323

 This may have been happening for quite awhile but I haven't noticed.
 These is in the middle of the doc section, wouldn't be on-screen at
 the end of the build.

 Not sure if it matters but wanted to mention just in case.
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Duplicate tag warnings building docs?

2013-12-17 Thread Greg Hendershott
On Tue, Dec 17, 2013 at 11:52 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 I tried deleting docindex.sqlite but it left things in a weird state
 -- racket/help couldn't find help for things like string-base.

Hopefully it was clear but I meant things like string-list, from racket/base.

Anyway, the main point is I still get the warnings.

Whether it matters, I don't know, but I wanted to report it.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] raco pkg install permission errors in 5.90?

2013-11-21 Thread Greg Hendershott
 Do you have any ideas on why file timestamps might be sync in the
 installation?

The transcript I linked to is from a Travis CI session. It's a fairly
clean slate.

- VM with Ubuntu image and gcc tools.
- Travis git clones the repo (being tested) source
- Racke nightly build is downloaded, Racket install sh script is run.
- raco pkg install --link x

Hmm. As I type this, occurs to me: What if the nightly build file
timestamps are Utah time, but the Travis server is running in a
different time zone?  Could that explain it?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] new package system status

2013-11-21 Thread Greg Hendershott
 What's the status of the package system?

I've used the package system pretty heavily for third-party stuff and
I think it's worked really well. IMHO it's less heavy for a package
developer, and for a package user.

(a) No hosted docs bugged me a lot at first, too. In practice I've
found that GitHub usually has the necessary info for a package. For a
simple package, a well-written README.md and a glance at the source is
enough for me to feel good about using it. For more complicated
packages, people are either hosting the Scribble HTML using GitHub
Pages or their own web server, or, using `scribble --markdown` to
generate the README.md.

(b) For me the biggest issue has been that the options have evolved
from 5.3.6. There's a subset of stuff that works on 5.3.5, .6, and
5.90. If you care about this let me know and I'll write up my notes.
However if you're comfortable telling folks, just use Racket 6 then
it will be simpler plus you can use some of the conveniences (like
single-collection packages, #:version, and whatever else I'm
forgetting).

 * https://pkg.racket-lang.org/; has roughness like requiring JavaScript to
 navigate, which is not only bad for browsers but bad for search engines.
 (Usually, for this kind of site, we'd want to start with a page structure,
 and then add in backward-compatible JS for slickness.)

The status quo is a result of wanting to better uptime by making it as
static as possible, with things stored on Amazon S3. Originally it was
a fully live web server. Downtime meant nothing worked. Whereas now,
downtime means a dev can't add/update a package, but users (human and
automated builds) can still get packages. This is smart and good.

My only question is whether the core should be a web _site_. I think
probably the core should instead be a RESTful web _service_? That way,
it could be used by a variety of tools, as well as by various
front-end web sites, one of which would be pkg.r-l.org.

(A well-designed RESTful web service _can_ be navigated by humans in a
browser, even though it's not intended as the primary human UI, i.e.
not a web _site_ in the normal sense. e.g. If it returns XML responses
and your browser auto-linkifies URLs in XML, so you can click them,
you can navigate the web service API.)

I think the interesting point is that you could make a (mostly) static
web service, in which GET requests have ULRs that hit a static file
server like Amazon S3, and only the PUT/POST/PATCH requests go to some
live server.

What about dynamic GETs like search by name or tag?

1. One choice is, don't support search. Client has to GET the full
catalog, or GET a list of _all_ packages with tag X, and filter
further itself. Not entirely unreasonable when there are hundreds not
thousands of packages.

2. Another choice is that the write requests precompute the full set
of answers and update the static GET files. This may seem crazy, but
not necessarily depending on response space size. It's a sort of
over-eager evaluation with memoization. (Whereas a live web server is
as-needed eval without memoization, and a live web server with e.g.
Varnish in front is as-needed eval with memoization.)

(Sorry for the back seat thinking out loud.)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] raco pkg install permission errors in 5.90?

2013-11-21 Thread Greg Hendershott
p.s. In the gist I linked to, I had deleted some stuff from the
beginning and end, because I thought it was N/A and the thing is
already very long.

In case I was wrong, the full raw log is here:

https://s3.amazonaws.com/archive.travis-ci.org/jobs/14278903/log.txt


On Thu, Nov 21, 2013 at 10:13 AM, Greg Hendershott
greghendersh...@gmail.com wrote:
 Do you have any ideas on why file timestamps might be sync in the
 installation?

 The transcript I linked to is from a Travis CI session. It's a fairly
 clean slate.

 - VM with Ubuntu image and gcc tools.
 - Travis git clones the repo (being tested) source
 - Racke nightly build is downloaded, Racket install sh script is run.
 - raco pkg install --link x

 Hmm. As I type this, occurs to me: What if the nightly build file
 timestamps are Utah time, but the Travis server is running in a
 different time zone?  Could that explain it?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] raco pkg install permission errors in 5.90?

2013-11-21 Thread Greg Hendershott
Here's simplest example I have so far:

https://travis-ci.org/greghendershott/rackjure/builds/14292882

I've been testing this package against 5.3.2, 5.3.5, 5.3.6. Building
fine against all.

Last night I thought, oh, I should add HEAD to the matrix.

It fails. In this case, as a result of just a `raco make main.rkt`.
But with similar error:

~~~

$ /usr/racket/bin/raco make main.rkt
open-output-file: cannot open output file
  path: 
/usr/racket/share/pkgs/rackunit-lib/rackunit/private/compiled/location_rkt.zo
  system error: Permission denied; errno=13
  context...:
   /usr/racket/collects/compiler/cm.rkt:221:4
   /usr/racket/collects/compiler/cm.rkt:510:0: maybe-compile-zo
   /usr/racket/collects/compiler/cm.rkt:622:2: do-check
   /usr/racket/collects/compiler/cm.rkt:661:15
   /usr/racket/collects/compiler/../racket/private/map.rkt:113:23: loop
   /usr/racket/collects/compiler/cm.rkt:622:2: do-check
   /usr/racket/collects/compiler/cm.rkt:661:15
   /usr/racket/collects/compiler/../racket/private/map.rkt:113:23: loop
   /usr/racket/collects/compiler/cm.rkt:622:2: do-check
   /usr/racket/collects/compiler/cm.rkt:661:15
   /usr/racket/collects/compiler/../racket/private/map.rkt:113:23: loop
   /usr/racket/collects/compiler/cm.rkt:622:2: do-check
   /usr/racket/collects/compiler/cm.rkt:661:15
   /usr/racket/collects/compiler/../racket/private/map.rkt:113:23: loop
   /usr/racket/collects/compiler/cm.rkt:622:2: do-check
   /usr/racket/collects/compiler/cm.rkt:732:4:
compilation-manager-load-handler...


The command /usr/racket/bin/raco make main.rkt exited with 1.
$ /usr/racket/bin/raco test -x .
raco test: (submod ./conditionals.rkt test)
raco test: (submod ./dict.rkt test)
raco test: (submod ./str.rkt test)
raco test: (submod ./test.rkt test)
raco test: (submod ./threading.rkt test)
34 tests passed

The command /usr/racket/bin/raco test -x . exited with 0.

Done. Your build exited with 1.
~~~


On Thu, Nov 21, 2013 at 10:18 AM, Greg Hendershott
greghendersh...@gmail.com wrote:
 p.s. In the gist I linked to, I had deleted some stuff from the
 beginning and end, because I thought it was N/A and the thing is
 already very long.

 In case I was wrong, the full raw log is here:

 https://s3.amazonaws.com/archive.travis-ci.org/jobs/14278903/log.txt


 On Thu, Nov 21, 2013 at 10:13 AM, Greg Hendershott
 greghendersh...@gmail.com wrote:
 Do you have any ideas on why file timestamps might be sync in the
 installation?

 The transcript I linked to is from a Travis CI session. It's a fairly
 clean slate.

 - VM with Ubuntu image and gcc tools.
 - Travis git clones the repo (being tested) source
 - Racke nightly build is downloaded, Racket install sh script is run.
 - raco pkg install --link x

 Hmm. As I type this, occurs to me: What if the nightly build file
 timestamps are Utah time, but the Travis server is running in a
 different time zone?  Could that explain it?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] raco pkg install permission errors in 5.90?

2013-11-20 Thread Greg Hendershott
I've been meaning to ask.

With 5.90, `raco pkg install` gives a ton of permission errors... but
works anyway.

Prior to 5.90 (e.g. with 5.3.5 and 5.3.6) this didn't happen.

I guess technically it is `raco setup` as run by `raco pkg install`.

Example transcript: https://gist.github.com/greghendershott/7565513

Is this as-intended and starting with 5.90 it needs to be `sudo`d?

(And if so, can someone explain more about why, and why there are
errors but it works anyway?)
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Release for v6.0 is about to begin

2013-11-05 Thread Greg Hendershott
Well, I think Ryan is talking about people who are coding a new
feature that's nearly ready. Not soliciting ideas for last-minute
ideas to try to rush into v6. Nice try, though. :)

Having said that, have you tried using at-exps for this?

I've only thought about this for a few minutes, and there are pros and
cons, but:

- - - - - - -

#lang at-exp racket
;;^^

;; Don't like regexps in quotes?
(regexp-match #px^foo foo)

;; Do this instead:
(regexp-match @pregexp{^foo} foo)

;; OK, but:
;; 1. A bit verbose.
;; 2. Those aren't precompiled regexps, like with #px
;; 3. Also if the {} spans multiple lines, it needs to be converted
;; into just one string.
;; So:

(define px (compose1 pregexp ~a))
(define rx (compose1 regexp ~a))

;; Now you can write this:
(regexp-match @px{^foo} foo)

;; Ta da !!

;; You can include newlines without using \n
(regexp-match @px{^foo
  bar} foo\nbar)

;; But bad news, you can't use \n anymore.
;; (regexp-match @px{^foo[\n]bar} foo\nbar)
;; = regexp: illegal alphabetic escape

;; The other way is to @ quote:
@~a{@#\newline}
@~a{@\n}
(regexp-match @px{^foo@\nbar} foo\nbar)

;; OTOH, good news is that regexp backslashes can be used as-is -- no
;; need for the extra \
(regexp-match @px{1\.0} 1.0)

;; p.s. How to escape @ in an at-exp? @@
(regexp-match @rx{^foo@@bar\.com} f...@bar.com)


On Mon, Nov 4, 2013 at 8:40 PM, WarGrey Gyoudmon Ju
juzhenli...@gmail.com wrote:
 Could you please make the regular expression syntax more elegant?
 To replace the  with // or any other character as its boundary.

 Here is the example:
 #px/^\s*\/([^\/])\/\s*$/ === #px@^\s*/([^/])/\s*$@ ===
 #px^\\s*/([^/])/\\s*$

 Thank you in advance.


 On Tue, Nov 5, 2013 at 12:51 AM, Ryan Culpepper ry...@ccs.neu.edu wrote:

 The release process for v6.0 will begin in about a week.  If
 you have any new features that you want in and are relatively close
 to being done, now is a good time to do that.
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev



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

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


Re: [racket-dev] should package X imply package X-test?

2013-10-16 Thread Greg Hendershott
Another scenario is tests that are expensive and/or require a third party
account, so that a user is very unlikely to run them. Libs that are
wrappers for web services are examples I have, like AWS or echonest or
Google api discovery. Can't test interacting with the service without an
account configured, and the tests may have nontrivial I/O or even $ costs.

Having said that I'm not sure in my cases the cost to download/install the
tests is such a big deal, as opposed to the cost or manual setup to run
them.
On Oct 16, 2013 10:09 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu
wrote:

 On Wed, Oct 16, 2013 at 7:55 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
  it would be nice to have a positive rationale for why we suggest leaving
  this particular piece out of X.

 Here's my positive rationale:

 First, why include X-doc?  I expect that if I tell someone they
 should try out Typed Racket, or Slideshow, or Frog, or some other bit
 of Racket software, I'll suggest that they do 'raco pkg install X',
 for whichever X we're talking about.  This means that 'X' should
 contain all the stuff they'd want to use. In particular, I assume that
 almost everyone who's intentionally installing 'X' will want X's
 documentation.  However, I don't think that everyone will want the
 tests -- if they do want the tests, it will be in a situation like you
 described, where asking someone to 'raco pkg install X-test' is easy.

 But why not just install X-test anyway, in case they need it?  I think
 this goes back to why we're not shipping absolutely everything at
 once.  There's a cost to a bigger download, whether that's someone
 deciding not to download a big file because the file size scares them
 off (a real phenomenon), or a network error that wouldn't have
 happened with a smaller download, or even actual monetary cost for
 someone on a metered network.

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

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


Re: [racket-dev] PLT Package Catalog changes

2013-10-12 Thread Greg Hendershott
Me, too.
 On Oct 12, 2013 11:09 PM, Asumu Takikawa as...@ccs.neu.edu wrote:

 On 2013-10-11 16:42:35 -0600, Jay McCarthy wrote:
  I've tested the JS code with most major browsers on Linux and I
  believe I use all standard things (jquery, etc) that are
  cross-browser, but please inform me of any problems you find.

 I can't seem to login on the new site. I don't get an error, but there
 is no response after clicking Log In. This is using Firefox 24.

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

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


[racket-dev] info.rkt `deps` and new #:version keyword: Backward compatibility?

2013-10-03 Thread Greg Hendershott
After I gave my Frog talk at RacketCon, in which I said a goal of Frog
was to make it easy to install, J. Ian Johnson tried to install it...
but couldn't.

As best I understand, it's because he was using Racket from HEAD, and
at some point recently the `deps` expression for info.rkt changed for
the case where you specify a version. A case which I've been using
(recent versions of Frog need a = version of Markdown).

For 5.3.6 and (until fairly recently in HEAD) it was:

# frog/info.rkt
#lang setup/infotab
(define version 0.7)
(define collection 'multi)
(define deps '((markdown 0.5)
   rackjure))

But it recently changed to require a #:version keyword, therefore it
would have to be IIUC this for 5.3.900.???+:

# frog/info.rkt
#lang setup/infotab
(define version 0.7)
(define collection 'multi)
(define deps '((markdown #:version 0.5)
   rackjure))

But that wouldn't be compatible with 5.3.6 IIUC.

As a result I would have to maintain two different packages, one for
5.3.5 and 5.3.6, and another for 5.3.900.???+ and greater (yuck).

Until now, even the major change to single-collection defaults was
done in a way that preserved backward compatibility (well, after
taking action to add `(define collection 'multi)`, but after taking
such action the same info.rkt works for old and new).

1. Am I understanding it correctly?  (Not a rhetorical question; I
have a lot of IIUCs above.)

2. If so, is it really the intent to break backward compatibility?

3. Instead couldn't the #version keyword simply be optional?
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] info.rkt `deps` and new #:version keyword: Backward compatibility?

2013-10-03 Thread Greg Hendershott
Hmm, then maybe I'm misdiagnosing the error.

If you were to try doing

  raco pkg install frog

using 5.3.90.9 from HEAD as of a few days ago, you would see something
like this:

greg@halo:~$ ~/src/plt/racket/racket/bin/raco pkg install frog
Resolving frog via https://pkg.racket-lang.org
Downloading 
https://github.com/greghendershott/frog/tarball/fecbe1d75632231eb7af70ef00ad31e95dda2cad
The following uninstalled packages are listed as dependencies of frog:
   markdown
Would you like to install these dependencies? [Y/n/a/?] y
Resolving markdown via https://pkg.racket-lang.org
Downloading 
https://github.com/greghendershott/markdown/tarball/6f1d1e6578c6d6f832357a81484ee427b6a2fc21
The following uninstalled packages were listed as dependencies
and they were installed:
 dependencies of frog:
   markdown
raco setup: version: 5.90.0.9 [3m]
raco setup: installation name: development
raco setup: variants: 3m
raco setup: main collects: /home/greg/src/plt/racket/racket/collects
raco setup: collects paths:
raco setup:   /home/greg/src/plt/racket/racket/collects
raco setup: main pkgs: /home/greg/src/plt/racket/racket/share/pkgs
raco setup: pkgs paths:
raco setup:   /home/greg/src/plt/racket/racket/share/pkgs
raco setup:   /home/greg/src/plt/racket/racket/share/devel-pkgs
raco setup:   /home/greg/.racket/development/pkgs
raco setup: links files:
raco setup:   /home/greg/src/plt/racket/racket/share/links.rktd
raco setup:   /home/greg/src/plt/racket/racket/share/devel-pkgs/links.rktd
raco setup:   /home/greg/.racket/development/links.rktd
raco setup: main docs: /home/greg/src/plt/racket/racket/doc
raco setup: --- updating info-domain tables ---
raco setup: updating: /home/greg/src/plt/racket/racket/share/info-cache.rktd
raco setup: --- pre-installing collections ---
raco setup: --- installing foreign libraries ---
raco setup: --- installing shared files ---
raco setup: --- compiling collections ---
raco setup: making: pkgs/frog/example
raco setup: making: pkgs/frog/example/_src
raco setup: making: pkgs/frog/example/_src/posts
raco setup: making: pkgs/frog/example/_src/subdir
raco setup: making: pkgs/frog/example/css
raco setup: making: pkgs/frog/example/fonts
raco setup: making: pkgs/frog/example/img
raco setup: making: pkgs/frog/example/js
raco setup: making: pkgs/frog/frog
raco setup:  in pkgs/frog/frog
raco setup:  in pkgs/markdown/markdown
raco setup:  in pkgs/frog
application: no case matching 1 non-keyword argument
  procedure: collection-file-path
  arguments...:
   info.rkt
   #:fail #procedure:...tup/collects.rkt:31:32
...


Although I didn't know how to dig into that error message, I
remembered seeing #:version in Jay's presentation 30 minutes
previously, and I jumped to the conclusion it was due to this.

The same `raco pkg install frog` works fine with 5.3.6, and IIRC
worked fine with 5.3.90.?? until recently.


On Thu, Oct 3, 2013 at 9:48 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Yes, the `#:version` keyword is optional. The old format, as in

  (define deps '((markdown 0.5)
 rackjure))

 is still supported.

 The old format is described as deprecated in the documentation, but
 it's fine to use it to support both v5.3.x and v.5.90.x.

 At Thu, 3 Oct 2013 09:40:56 -0400, Greg Hendershott wrote:
 After I gave my Frog talk at RacketCon, in which I said a goal of Frog
 was to make it easy to install, J. Ian Johnson tried to install it...
 but couldn't.

 As best I understand, it's because he was using Racket from HEAD, and
 at some point recently the `deps` expression for info.rkt changed for
 the case where you specify a version. A case which I've been using
 (recent versions of Frog need a = version of Markdown).

 For 5.3.6 and (until fairly recently in HEAD) it was:

 # frog/info.rkt
 #lang setup/infotab
 (define version 0.7)
 (define collection 'multi)
 (define deps '((markdown 0.5)
rackjure))

 But it recently changed to require a #:version keyword, therefore it
 would have to be IIUC this for 5.3.900.???+:

 # frog/info.rkt
 #lang setup/infotab
 (define version 0.7)
 (define collection 'multi)
 (define deps '((markdown #:version 0.5)
rackjure))

 But that wouldn't be compatible with 5.3.6 IIUC.

 As a result I would have to maintain two different packages, one for
 5.3.5 and 5.3.6, and another for 5.3.900.???+ and greater (yuck).

 Until now, even the major change to single-collection defaults was
 done in a way that preserved backward compatibility (well, after
 taking action to add `(define collection 'multi)`, but after taking
 such action the same info.rkt works for old and new).

 1. Am I understanding it correctly?  (Not a rhetorical question; I
 have a lot of IIUCs above.)

 2. If so, is it really the intent to break backward compatibility?

 3. Instead couldn't the #version keyword simply be optional?
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list

Re: [racket-dev] info.rkt `deps` and new #:version keyword: Backward compatibility?

2013-10-03 Thread Greg Hendershott
On Thu, Oct 3, 2013 at 9:50 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 On Thu, Oct 3, 2013 at 7:40 AM, Greg Hendershott
 The concept of backwards compatibility does not apply to beta software
 in my opinion. The next release will be the first release where the
 package system is not beta.

I understand. OTOH this is a public beta where people are invited to
use it for real, and pkg.racket-lang.org already has many packages. If
we had somehow painted ourselves into a corner where a required change
had no (reasonable) backward compatibility tactic, people would (have
to) understand and accept that. And in that case maybe we'd want to
re-launch the package system as Works only with 5.3.90 or higher,
for sanity. But so far, in cases like multi vs. single collection
default, or #:version, it's very much appreciated the intent has been
to preserve it -- thanks!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] info.rkt `deps` and new #:version keyword: Backward compatibility?

2013-10-03 Thread Greg Hendershott
 I'm pretty sure this is a bug in `setup/collects` (or maybe
 elsewhere), and I reported it as PR 14063.

Oh. In that case:

1. Thank you for logging the bug.
2. I'm sorry for the redundancy here on the mailing list.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] [ANN] RacketCon 2013: 29 September

2013-09-22 Thread Greg Hendershott
+1 to all of Sam's suggestions.

I'd also add the waterfront as being a nice area (relatively new to
Boston). If you head to the water from Quincy Market, there's the
Aquarium. Then you can turn right and walk along the water through
Rowes Wharf and to the old rotating bridge that's pedestrian only.

From there you can turn left to go past the courthouse and Barking
Crab, and to the ICA. Or keep going straight to the area with the
Children's Museum and the Boston Tea Party museum. ;)




On Sun, Sep 22, 2013 at 11:41 AM, Sam Tobin-Hochstadt
sa...@cs.indiana.edu wrote:
 Things I really enjoy in Boston:

 - The Museum of Fine Arts, right across the street from Northeastern
 - The Freedom Trail, a self-guided walking tour of many historic Boston sights
   This goes through the North End, which is a nice place to walk
 around all on its own.
 - The Boston Harbor Islands (requires a ferry ride)
 - The Rose Kennedy Greenway, if it's a nice day
 - The Public Garden and Boston Common

 More conventional touristy areas, which are all still nice:

 - Newbury St, the main upscale shopping area, which also has some nice
 places to eat
 - the Aquarium
 - Harvard Square

 Sam, ex-Bostontonian

 On Sun, Sep 22, 2013 at 11:30 AM, Eric Hanchrow eric.hanch...@gmail.com 
 wrote:
 My wife and I will be in Boston a day early (Friday).  Does anyone
 have a must-see touristy suggestion for us?

 On Wed, May 8, 2013 at 8:49 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 RacketCon 2013
 --

 We are pleased to announce that (third RacketCon) will take place on
 September 29, 2013 at Northeastern University in Boston.  This year, we
 plan to bring in several speakers from industry, as well as host talks
 from Racket developers and users.

 Lunch will be provided.

 On the Saturday (28th) before RacketCon, we plan to hold a hackathon to 
 work on
 various Racket projects.

 Registration will open during the summer, and we will post a detailed
 schedule of events around the same time. The conference website is at

   http://con.racket-lang.org/

 Asumu Takikawa and PLT

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


Re: [racket-dev] [racket] [ANN] RacketCon 2013: 29 September

2013-09-22 Thread Greg Hendershott
p.s. The walk I described is mostly parallel to the Rose Kennedy
Greenway that Sam mentioned, just a block apart, so you could head out
one way and back the other.

On Sun, Sep 22, 2013 at 11:58 AM, Greg Hendershott
greghendersh...@gmail.com wrote:
 +1 to all of Sam's suggestions.

 I'd also add the waterfront as being a nice area (relatively new to
 Boston). If you head to the water from Quincy Market, there's the
 Aquarium. Then you can turn right and walk along the water through
 Rowes Wharf and to the old rotating bridge that's pedestrian only.

 From there you can turn left to go past the courthouse and Barking
 Crab, and to the ICA. Or keep going straight to the area with the
 Children's Museum and the Boston Tea Party museum. ;)




 On Sun, Sep 22, 2013 at 11:41 AM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 Things I really enjoy in Boston:

 - The Museum of Fine Arts, right across the street from Northeastern
 - The Freedom Trail, a self-guided walking tour of many historic Boston 
 sights
   This goes through the North End, which is a nice place to walk
 around all on its own.
 - The Boston Harbor Islands (requires a ferry ride)
 - The Rose Kennedy Greenway, if it's a nice day
 - The Public Garden and Boston Common

 More conventional touristy areas, which are all still nice:

 - Newbury St, the main upscale shopping area, which also has some nice
 places to eat
 - the Aquarium
 - Harvard Square

 Sam, ex-Bostontonian

 On Sun, Sep 22, 2013 at 11:30 AM, Eric Hanchrow eric.hanch...@gmail.com 
 wrote:
 My wife and I will be in Boston a day early (Friday).  Does anyone
 have a must-see touristy suggestion for us?

 On Wed, May 8, 2013 at 8:49 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 RacketCon 2013
 --

 We are pleased to announce that (third RacketCon) will take place on
 September 29, 2013 at Northeastern University in Boston.  This year, we
 plan to bring in several speakers from industry, as well as host talks
 from Racket developers and users.

 Lunch will be provided.

 On the Saturday (28th) before RacketCon, we plan to hold a hackathon to 
 work on
 various Racket projects.

 Registration will open during the summer, and we will post a detailed
 schedule of events around the same time. The conference website is at

   http://con.racket-lang.org/

 Asumu Takikawa and PLT

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


[racket-dev] Racket virtual machine has run out of memory; aborting

2013-09-21 Thread Greg Hendershott
On Ubuntu 12.04 x64 with 1 GB RAM, I'm getting OOM error toward the
end of building Racket, during the docs:

Racket virtual machine has run out of memory; aborting

1. Is this normal/expected, with only 1 GB?

2. I thought there was a flag or make target to build _without_
building docs. Maybe that was the old build system. Anyway I can't
find it in README.txt.  Is there such an option, these days?


p.s. Elided output to show how far it gets before erroring:

~/src/plt/racket$ make
if [  =  ] ; \
 then make plain-in-place PKGS=main-distribution plt-services ; \
 else make cpus-in-place PKGS=main-distribution plt-services ; fi
make[1]: Entering directory `/home/greg/src/plt/racket'
make base
make[2]: Entering directory `/home/greg/src/plt/racket'
mkdir -p build/config
echo '#hash((links-search-files . ()))'  build/config/config.rktd
mkdir -p racket/src/build
make racket/src/build/Makefile
make[3]: Entering directory `/home/greg/src/plt/racket'
make[3]: `racket/src/build/Makefile' is up to date.
make[3]: Leaving directory `/home/greg/src/plt/racket'
cd racket/src/build; make reconfigure
make[3]: Entering directory `/home/greg/src/plt/racket/racket/src/build'
make Makefile
make[4]: Entering directory `/home/greg/src/plt/racket/racket/src/build'
make[4]: `Makefile' is up to date.
make[4]: Leaving directory `/home/greg/src/plt/racket/racket/src/build'
make[3]: Leaving directory `/home/greg/src/plt/racket/racket/src/build'
cd racket/src/build; make SELF_RACKET_FLAGS=-G `cd ../../../build/config; pwd`
make[3]: Entering directory `/home/greg/src/plt/racket/racket/src/build'
make 3m
make[4]: Entering directory `/home/greg/src/plt/racket/racket/src/build'
cd racket; make 3m
make[5]: Entering directory `/home/greg/src/plt/racket/racket/src/build/racket'
make cgc
make[6]: Entering directory `/home/greg/src/plt/racket/racket/src/build/racket'
make common
make[7]: Entering directory `/home/greg/src/plt/racket/racket/src/build/racket'

... many many lines ...

raco setup: rendering: pkgs/html-doc/html/html.scrbl
raco setup: rendering: pkgs/images-doc/images/scribblings/images.scrbl
raco setup: rendering: pkgs/racket-doc/scribblings/inside/inside.scrbl
raco setup: rendering: pkgs/racket-doc/json/json.scrbl
raco setup: rendering: pkgs/lazy/lazy.scrbl
raco setup: rendering:
pkgs/racket-index/scribblings/main/user/local-redirect.scrbl
raco setup: rendering: pkgs/macro-debugger/macro-debugger/macro-debugger.scrbl
Racket virtual machine has run out of memory; aborting
make[1]: *** [plain-in-place] Aborted
make[1]: Leaving directory `/home/greg/src/plt/racket'
make: *** [in-place] Error 2
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #26693: master branch updated

2013-09-17 Thread Greg Hendershott
On Tue, Sep 17, 2013 at 8:29 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 I think the problem is the way that the release and development version
 numbers got out of sync for a while. Version 5.3.6 is derived fairly
 directly from v5.3.4 (and v5.3.5) by adding only a small set of bug-fix
 patches. Version 5.3.6 has almost nothing that was added in the
 v5.3.4.x development series.

Ah.

My (mis)understanding of the process was: My change was accepted and
merged to `master` well before 5.3.5 was released, therefore my change
will be in 5.3.5.  (In fact at the time I thought, that's lucky
timing, it will make it into 5.3.5!)

But although that seemed to be how it worked for my few previous PRs
(e.g. adding Markdown output to Scribble), it's not necessarily true.

Is that correct?

For the future: Is there something I could/should have done to ensure
the change made it to release?  (Or, was this just a window where such
a change was unlikely to be accepted?)


 The change should certainly have been in any 5.3.900.x or 5.90.x
 development version, though, so I can't explain how you got an error
 there.

The explanation is I was completely wrong -- it's there. (I got
confused last night while running several different versions of Racket
on a couple different boxes.)

I can see it in the source.  Plus here's a quick/dirty test (one that
doesn't need to mutate any real IMAP account). The error below is
_good_ because it's a contract violation that 0 isn't `imap?`. Whereas
on the old version it would have been an arity error, passing 4 to a
func expecting 3:

Welcome to Racket v5.90.0.9.
- (require net/imap)
- (imap-append 0 foo foo '())
; imap-append: contract violation
;   expected: imap?
;   given: 0
;   in: the 1st argument of
;   (-*
;(imap? string? (or/c string? bytes?))
;((listof
;  (or/c
;   'seen
;   'answered
;   'flagged
;   'deleted
;   'draft
;   'recent)))
;void?)
;   contract from: pkgs/net-lib/net/imap.rkt
;   blaming: top-level
;   at: pkgs/net-lib/net/imap.rkt:21.2

tl;dr The change is definitely in HEAD.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [plt] Push #26693: master branch updated

2013-09-16 Thread Greg Hendershott
After I saw this, I closed the open pull request over on GitHub:

https://github.com/plt/racket/pull/324

BTW here is the commit over on GitHub:

https://github.com/plt/racket/commit/c6e28435578b6b8607d4c767ee956f88c8388ff0

I fetched from HEAD at the time, verison 5.3.4.7.  I've been using it
on that server ever since.

Today I wanted to move my app to a new server, which has 5.3.6
official. I was really confused that I got an error because
imap-append has only 3 args not 4. My PR added the 4th, optional arg.

Did this not get merged into release, after all??

Maybe I'm doing something really dumb, but...?


p.s. I do see my changes as the last commit in collect/net/imap.rkt

https://github.com/plt/racket/commits/c6e28435578b6b8607d4c767ee956f88c8388ff0/collects/net/imap.rkt

and the scribbling collects/net/scribblings/imap.scrbl

https://github.com/plt/racket/blob/c6e28435578b6b8607d4c767ee956f88c8388ff0/collects/net/scribblings/imap.scrbl

This should have been in 5.3.5, as well as 5.3.6. But it doesn't seem
to be in either (I just tried both).


p.p.s. Post package split, I'm not sure how to follow the history. But
searching for imap-append:

https://github.com/plt/racket/search?q=imap-appendsource=c

I do see my changes in pkgs/net-lib/net/imap.rkt

https://github.com/plt/racket/blob/3ad009070e063614f22a32fbbffa950a8d84e599/pkgs/net-lib/net/imap.rkt#L21-L25
https://github.com/plt/racket/blob/3ad009070e063614f22a32fbbffa950a8d84e599/pkgs/net-lib/net/imap.rkt#L21-L25

and in the scribbling:

https://github.com/plt/racket/blob/3ad009070e063614f22a32fbbffa950a8d84e599/pkgs/net-lib/net/imap.rkt#L21-L25

But I get a similar error running 5.900.


On Tue, Apr 23, 2013 at 5:50 PM,  mfl...@racket-lang.org wrote:
 mflatt has updated `master' from 8c7632c025 to c6e2843557.
   http://git.racket-lang.org/plt/8c7632c025..c6e2843557

 =[ 2 Commits ]==
 Directory summary:
   19.8% collects/net/scribblings/
   49.1% collects/net/
9.1% collects/racket/private/
   21.8% src/racket/src/

 ~~

 3779cf6 Matthew Flatt mfl...@racket-lang.org 2013-04-23 15:06
 :
 | fix `exn:fail:filesystem:missing-module-path'
 :
   M collects/racket/private/kernstruct.rkt | 2 +-
   M src/racket/src/makeexn | 2 +-
   M src/racket/src/schexn.h| 2 +-
   M src/racket/src/schvers.h   | 4 ++--

 ~~

 c6e2843 Greg Hendershott greghendersh...@gmail.com 2013-04-23 13:50
 :
 | Add optional message flags argument to imap-append.
 |
 | Previously this was hard-coded to use the \Seen flag. Now that's the
 | default value when the argument is not supplied.
 :
   M collects/net/imap.rkt   | 20 +---
   M collects/net/scribblings/imap.scrbl |  5 -

 =[ Overall Diff ]===

 collects/net/imap.rkt
 ~
 --- OLD/collects/net/imap.rkt
 +++ NEW/collects/net/imap.rkt
 @@ -1,8 +1,9 @@
  #lang racket/base

 -(require racket/contract/base
 - racket/tcp
 - openssl
 +(require racket/contract/base
 + racket/tcp
 + openssl
 + racket/format
   private/rbtree.rkt)

  ;; define the imap struct and its predicate here, for use in the contract, 
 below
 @@ -16,7 +17,12 @@
   [imap-list-child-mailboxes
(-* (imap-connection? (or/c string? bytes? #f))
 ((or/c string? bytes?))
 -   (listof (list/c (listof symbol?) bytes?)))])
 +   (listof (list/c (listof symbol?) bytes?)))]
 + [imap-append ((imap? string? (or/c string? bytes?))
 +   ((listof
 + (or/c 'seen 'answered 'flagged 'deleted 'draft 'recent)))
 +  . -* .
 +  void?)])

  (provide
   imap-connection?
 @@ -45,7 +51,7 @@
   imap-pending-updates?

   imap-get-messages
 - imap-copy imap-append
 + imap-copy
   imap-store imap-flag-symbol symbol-imap-flag
   imap-expunge

 @@ -539,13 +545,13 @@
(check-ok
 (imap-send imap (list COPY (box (msg-set msgs)) dest-mailbox) void)))

 -(define (imap-append imap dest-mailbox msg)
 +(define (imap-append imap dest-mailbox msg [flags '(seen)])
(no-expunges 'imap-append imap)
(let ([msg (if (bytes? msg) msg (string-bytes/utf-8 msg))])
  (check-ok
   (imap-send imap (list APPEND
 dest-mailbox
 -   (box (\\Seen))
 +   (box (~a (map symbol-imap-flag flags)))
 (box (format {~a} (bytes-length msg
  void
  (lambda (loop contin)

 collects/net/scribblings/imap.scrbl
 ~~~
 --- OLD/collects/net/scribblings/imap.scrbl
 +++ NEW/collects/net/scribblings/imap.scrbl
 @@ -416,7 +416,10 @@ Pending expunges must be handled before calling this 
 function; see

  @defproc[(imap-append [imap imap-connection?]
[mailbox string?]
 -  [message

Re: [racket-dev] net/http-client

2013-09-08 Thread Greg Hendershott
On Wed, Sep 4, 2013 at 11:03 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 On Wed, Aug 28, 2013 at 3:30 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:

 This looks great!!

 A couple suggestions:

 1. Support for Expect: 100-continue request headers would be
 helpful, and I think not too messy to add.

 The big use case I'm aware of is Amazon S3. If you make a PUT or POST
 request, it might need to redirect you to another URI (outage,
 balancing, whatever reason). Expecting and handling 100-continue lets
 you avoid transmitting potentially large amount of data that would be
 discarded, and you have to send it all over again in the request to
 the redirect URI. For (say) a 1 GB upload to S3, this matters.
 Although I don't know for sure if other upload-ish web APIs offer
 same, I'd guess some do as this is the use case for 100-continue
 generally.

 How I implemented this in my HTTP package was to have a
 `start-request` function that sends the request line and headers,
 peeks the response status line, then returns a `boolean?` whether the
 PUT/POST/PATCH/whatever data should be transmitted. [1]

 I think your `http-conn-send!` could do similar?


 Do you think it is appropriate to expect the http-client user to put in the
 Expect: 100-continue or better to always send it if there is a data
 component?

Great question. I took the approach of requiring the client to supply
it if they care.

Instead supplying it always/automatically does seem neat.

But safe? Reading
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html I'm a little
nervous about this section:

  A server that does not understand or is unable to comply with any of the
  expectation values in the Expect field of a request MUST respond with
  appropriate error status. The server MUST respond with a 417
(Expectation Failed)
  status if any of the expectations cannot be met or, if there are
other problems
  with the request, some other 4xx status.

This suggests a scenario where a server might error a request solely
because of the presence of an Expect: 100-continue header. That
doesn't strike me as reasonable behavior, but I could imagine some
server doing it.

So I suppose best to default to supplying it automatically, but
provide a way for the client to disable that.

How to specify disabling?

With headers like Server: you have a default but let the user's
supplied headers override. But supplying Expect:  (i.e. Expect:
blank) would feel weird, to a user. And actually sending that -- if
it feels weird to a server causing it to error, well that's the whole
thing we're trying to avoid, see above.

So (tl;dr) perhaps add an optional function parameter that defaults to
#t, e.g. `[expect-100-continue? #t]` ?



 2. Support for Content-Encoding response headers would also be helpful.

 Using the same make-pipe approach as you're doing with chunked
 transfer encoding. [2]  Maybe this is mission creep: For HTTP 1.1. you
 _must_ support Transfer-Encoding: chunked, whereas Content-Encoding is
 just optional. However it's a good option; using compression can
 really help out on time as well as bandwidth charges.


 I just pushed support for this.

Nice, thanks!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] net/http-client

2013-08-28 Thread Greg Hendershott
This looks great!!

A couple suggestions:

1. Support for Expect: 100-continue request headers would be
helpful, and I think not too messy to add.

The big use case I'm aware of is Amazon S3. If you make a PUT or POST
request, it might need to redirect you to another URI (outage,
balancing, whatever reason). Expecting and handling 100-continue lets
you avoid transmitting potentially large amount of data that would be
discarded, and you have to send it all over again in the request to
the redirect URI. For (say) a 1 GB upload to S3, this matters.
Although I don't know for sure if other upload-ish web APIs offer
same, I'd guess some do as this is the use case for 100-continue
generally.

How I implemented this in my HTTP package was to have a
`start-request` function that sends the request line and headers,
peeks the response status line, then returns a `boolean?` whether the
PUT/POST/PATCH/whatever data should be transmitted. [1]

I think your `http-conn-send!` could do similar?

2. Support for Content-Encoding response headers would also be helpful.

Using the same make-pipe approach as you're doing with chunked
transfer encoding. [2]  Maybe this is mission creep: For HTTP 1.1. you
_must_ support Transfer-Encoding: chunked, whereas Content-Encoding is
just optional. However it's a good option; using compression can
really help out on time as well as bandwidth charges.


IIRC those were the two main things that motivated me to make my HTTP
package at all, to support e.g. my AWS package. If http-client added
them, I might not need my package anymore. (OK, it might take me
awhile to phase it out until I'm ready to de-support older versions of
Racket, but, I and others wouldn't need it for new projects.)


[1]: 
https://github.com/greghendershott/http/blob/master/http/request.rkt#L142-L189

[2]: By the way, do you want to pass some `limit` optional arg in the
various uses of `make-pipe`? Otherwise IIUC this will suck everything
into RAM, which might not be so great with very large request or
response entities.


On Fri, Aug 23, 2013 at 2:48 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 Based on a request back in early July to remove the restrictions that
 net/url puts on HTTP communication (vis a vis URL encoding), I have
 just pushed a new HTTP client as net/http-client.

 The push also changes net/url to use net/http-client so that we just
 have 1 HTTP request producer, rather than 3.

 It passes all of the net/* tests, but these don't use features like
 proxying, HTTP/1.1, etc. I'm slightly nervous that it doesn't do those
 correct, but not super nervous, because I just cut-and-pasted the
 code.

 The main approach of the library is best explained by this contract:

 [http-sendrecv
(-* ((or/c bytes? string?) (or/c bytes? string?))
 (#:ssl? (or/c boolean? ssl-client-context? symbol?)
 #:port (between/c 1 65535)
 #:method (or/c bytes? string? symbol?)
 #:headers (listof (or/c bytes? string?))
 #:data (or/c false/c bytes? string?))
 (values bytes? (listof bytes?) input-port?))]

 Compared to net/url,
 - It supports bytes and strings everywhere
 - It supports data on every method and not just POST
 - It always returns the status line, headers, and content (as a port)

 I feel that the only thing it could do better is support two more
 options for #:data:
 - A input-port? to read from and copy to the HTTP connection
 - A (- output-port? void) function to call with the HTTP connection's
 output port to stream the data

 But I'd like a second opinion before adding them.

 Jay

 --
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay

 The glory of God is Intelligence - DC 93
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


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

2013-08-20 Thread Greg Hendershott
I _really_ like the idea of giving it a fresh redesign and including
more information on the home page.

(comment (for-meta 1 #EOF

In a previous life I've participated in some web site redesigns. In my
experience people have many opinions with great reasoning, as well as
style preferences. It can be difficult to get a plurality much less
consensus.

One I encourage us to use was Google Web Optimizer (free). This makes
it easier to run A/B or multivariate experiments by assigning visitors
different versions of a web site page. You measure goals such as
reaching some other page, a download, or a purchase.

How this can help:

- You're forced to define the goals -- what do you want to happen.
This includes who the audience(s) are. (Although there can be debate
about this, too, it's usually easier to resolve, or can be stipulated
as strategy by leadership.)

- You can resolve some questions/debates with data -- one variation
performs better.

- You may discover some variations don't matter. On the one hand it's
disappointing you don't get a clear winner. On the other hand it
shows you don't need to sweat that part of it, and should probably
flip a coin to pick one and move on to other stuff.

Obviously there are certain big things, like overall style or tone
or values, that can't be driven by data. But like goals, they can be
stipulated by leadership.

EOF
)


On Mon, Aug 19, 2013 at 5:39 PM, Sam Tobin-Hochstadt
sa...@cs.indiana.edu wrote:
 Recently I (with assistance from Asumu) have spent some time drafting
 a revised home page for Racket. A revised web page will nicely
 complement the big upcoming release, I hope.  You can see the draft
 here, which is ready for people to try out:

   http://homes.soic.indiana.edu/samth/new-web/

 Some things to try out out: clicking the right and left arrows,
 clicking the ? box, visiting the RacketCon page.

 The new page addresses a few problems that I see with our current page:

 1. It works well on small devices, which our current page doesn't.
 Try it out on a phone or a tablet.
 2. It reduces the size of the top header, which will lighten the
 burden on the documentation pages, for example, or the pkg index if we
 add the header there.
 3. It puts more info on the first page.  This means that people are
 more likely to see information about how to contribute to Racket or
 approaches to learning programming using our tools.
 4. The font size is larger, which I think makes it much more readable.

 Perhaps more controversially, I adapted some prose about Racket from
 Matthias' Racket is ... post, and added a tag line at the top.

 Lots of work is still needed if we want to use this as the basis for
 Racket's web page (it's written in raw HTML, other pages would need
 work, etc), but I hope that people like it enough to continue pursuing
 this.

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


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

2013-08-20 Thread Greg Hendershott
 One I encourage us to use was Google Web Optimizer (free).

Typo there. I meant, One thing I encouraged us to use... in that
past life. We found it helpful.

(It's not really my role to encourage Racket doing this. Instead I
wanted to point it out as a possible option.)


On Tue, Aug 20, 2013 at 11:14 AM, Greg Hendershott
greghendersh...@gmail.com wrote:
 I _really_ like the idea of giving it a fresh redesign and including
 more information on the home page.

 (comment (for-meta 1 #EOF

 In a previous life I've participated in some web site redesigns. In my
 experience people have many opinions with great reasoning, as well as
 style preferences. It can be difficult to get a plurality much less
 consensus.

 One I encourage us to use was Google Web Optimizer (free). This makes
 it easier to run A/B or multivariate experiments by assigning visitors
 different versions of a web site page. You measure goals such as
 reaching some other page, a download, or a purchase.

 How this can help:

 - You're forced to define the goals -- what do you want to happen.
 This includes who the audience(s) are. (Although there can be debate
 about this, too, it's usually easier to resolve, or can be stipulated
 as strategy by leadership.)

 - You can resolve some questions/debates with data -- one variation
 performs better.

 - You may discover some variations don't matter. On the one hand it's
 disappointing you don't get a clear winner. On the other hand it
 shows you don't need to sweat that part of it, and should probably
 flip a coin to pick one and move on to other stuff.

 Obviously there are certain big things, like overall style or tone
 or values, that can't be driven by data. But like goals, they can be
 stipulated by leadership.

 EOF
 )


 On Mon, Aug 19, 2013 at 5:39 PM, Sam Tobin-Hochstadt
 sa...@cs.indiana.edu wrote:
 Recently I (with assistance from Asumu) have spent some time drafting
 a revised home page for Racket. A revised web page will nicely
 complement the big upcoming release, I hope.  You can see the draft
 here, which is ready for people to try out:

   http://homes.soic.indiana.edu/samth/new-web/

 Some things to try out out: clicking the right and left arrows,
 clicking the ? box, visiting the RacketCon page.

 The new page addresses a few problems that I see with our current page:

 1. It works well on small devices, which our current page doesn't.
 Try it out on a phone or a tablet.
 2. It reduces the size of the top header, which will lighten the
 burden on the documentation pages, for example, or the pkg index if we
 add the header there.
 3. It puts more info on the first page.  This means that people are
 more likely to see information about how to contribute to Racket or
 approaches to learning programming using our tools.
 4. The font size is larger, which I think makes it much more readable.

 Perhaps more controversially, I adapted some prose about Racket from
 Matthias' Racket is ... post, and added a tag line at the top.

 Lots of work is still needed if we want to use this as the basis for
 Racket's web page (it's written in raw HTML, other pages would need
 work, etc), but I hope that people like it enough to continue pursuing
 this.

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


Re: [racket-dev] main-repo packages on pkg.racket-lang.org

2013-08-17 Thread Greg Hendershott
Very cool.

It seems to me this motivates some changes to the
https://pkg.racket-lang.org/ UX:

1. The tag main-distribution ought to be privileged/restricted. As a
3rd party dev I shouldn't be allowed to assign that tag to one of my
packages and trick people into installing it along with the others.

2. If I want to browse for interesting third-party packages, now I
will want the ability to search for `NOT tag`. For example to see
all packages _except_ those tagged main-distribution. (Of course
that starts down the slippery slope of also wanting AND and OR
operators and parentheses. /me ducks.)



On Fri, Aug 16, 2013 at 6:47 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 All of the packages in the main repository are now listed on
 pkg.racket-lang.org. They have tags like main-distribution (for
 packages that are in the main distribution) and main-tests (for tests
 that are not in the distribution, but are for main-distribution code).


 If you try to install any of the packages in v5.3.6 or earlier, you get
 an empty package. The intent is that other packages can now declare
 proper dependencies for v5.90.x, and the dependency declaration won't
 break the package for v5.3.6 users.


 Meanwhile, with v5.90.x, you could build with just `make base' and then
 install more with, say,

  raco pkg install -i main-distribution

 For now, there's no advantage to doing that compared to just using
 `make PKGS=...'; you get everything with a git checkout, anyway. In the
 future, that might be closer to the way things work, and now we can
 experiment with that mode.


 The source for each package is an S3-hosted .zip file. Those sources
 are put in place by a periodic task that pulls from github, creates
 individual zip files, uploads to S3, and updates pkg.racket-lang.org.
 Currently, the job runs on a machine every 15 minutes (on the hour, 15
 minutes after, etc.). We'll see how that works out, and probably we'll
 make it more reliable by having multiple machines check for updates ---
 including one triggered by notifications from Github. In any case,
 copying from the git repo to .zip files is expected to be a stop-gap
 until we're ready to split the main repository (which is some time
 away, I think).

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


Re: [racket-dev] Updating dependency packages from other sources

2013-08-15 Thread Greg Hendershott
 If I try to remove just the `x11` package so I can replace it, I get
 this error:

   $ raco pkg remove x11
   raco pkg remove: cannot remove packages that are dependencies of other
   packages
 dependencies:
x11 (required by: (aosd))

It would be nice if this error message appended a hint like:

You can remove the package anyway with --force.

In fact maybe that's sufficient, don't really need a new `replace' subcommand.

Even with a new `replace', the hint would still be handy (and should
also mention `replace'?) because folks will probably first try to do
what Asumu did?


On Thu, Aug 15, 2013 at 11:07 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 On 2013-08-15 08:19:06 -0600, Jay McCarthy wrote:
 As for what we could do going forward, I think either of these
 approaches could be 'automated'.

 Yes, that'd be great.

 For instance, we could add a command like

 $ raco pkg replace x11 new-x11-source

 This would behave like either of those (which would be invisible to the 
 user).

 Do you have any opinions about how you'd want to do this replacement?

 Maybe `raco pkg install` can have an additional flag that lets you
 replace existing packages? Or maybe it should allow conflicts if the
 package has the same name as an already installed package (possibly
 prompting/warning the user)?

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


Re: [racket-dev] Planet require gone wild

2013-08-02 Thread Greg Hendershott
Ah. I was primed with the mental set:

(a) I got some error messages I'd never before seen when requiring a
Planet package.

(b) I guessed all the recent reorganization broke something with
Planet 1 packages.

(c) Although I was aware peg required memoize, I didn't look into
memoize's source, so I didn't anticipate the extent of everything it
would require.

So when I saw things like bzlib/os etc. being installed, I wigged out.


On Fri, Aug 2, 2013 at 11:50 AM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 I think you just ran into all of the problems with planet1 at the same time.
 I started with kazzmir/peg and browsed sources, and as far as I can tell,
 all of the packages you got are actually transitively required by
 kazzmir/peg. So it's not a PLaneT implementation bug.

 It looks like there's a chance to cut out most of the other packages by some
 small changes to schemeunit. I'll see if I can do that.

 Here are my notes as of the point where I got tired of chasing links. The
 best part is when kazzmir/peg (a Packrat parsing library) depends on
 bzlib/parseq (a combinator-based parsing library)---with six degrees of
 separation.

 peg - memoize

 memoize - schemeunit:3 (for testing)

 schemeunit:3 - sake:1 (in build.ss !!)
  - require:1:3 (in check-test.ss)

 sake:1 - schemeunit:3
- unlib:3 (in base.ss)
- galore:4

 unlib:3 - planet package directories
 - autoplanet:1 (from autoplanet.ss)
 - cce/scheme:6 (from base.ss)
 - bzlib/date:1 (same)
 - bzlib/date-tz:1 (same)
 - schematics/namespace:1 (same)
 - schematics/schemeunit:3 (same)

 autoplanet:1 - schemeunit:3

 bzlib/date:1 - bzlib/base:1 (from depend.ss)
  - bzlib/parseq:1 (same)

 bzlib/date-tz:1 - bzlib/base:1 (from depend.ss)
 - bzlib/file:1 (same)
 - bzlib/date:1 (same)

 bzlib/base:1 - zitterbewegung/uuid-v4:1

 

 Ryan



 On 08/01/2013 09:57 PM, Greg Hendershott wrote:

 p.s. The About text from DrRacket is:

 Welcome to DrRacket, version 5.90.0.3--2013-07-30(c126a8aa/d), english by
 PLT.

 Just to confirm I ran the DrRacket built from HEAD = c126a8a, not an
 older version by accident.


 On Thu, Aug 1, 2013 at 9:55 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:

 I'm running HEAD = c126a8a from about 1 week ago.

 I wanted to try the PEG Planet 1 package.

 My source file was simply this:

  #lang racket
  (require (planet kazzmir/peg:2:0/peg))

 1. Using command-line Racket, I got:

 Welcome to Racket v5.90.0.3.
 ; uncaught exception:
 '#/Users/greg/src/scheme/collects/markdown/markdown/peg.rkt

 Huh.

 I had the bright idea of trying this again, in DrRacket 5.90.0.3.

 2. Right away, I got a red message:

 make-directory: forbidden (write) access to
 /Users/greg/Library/Racket/planet/300/5.90.0.3

 Strange...

 3. Perhaps dumbly, I decided to hit Run, anyway.

 What happened is that it installed a LOT of Planet packages. I let it
 run for awhile, thinking maybe there were more dependencies for `peg'
 than I realized. But the names flying by were making less and less
 sense. I got worried it was running wild and doing something like
 maybe trying to install ALL Planet packages.

 Plus then it started spitting out the following in the eval pane:

 Welcome to DrRacket, version 5.90.0.3--2013-07-30(c126a8aa/d) [3m].
 Language: racket [custom]; memory limit: 2048 MB.

 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
 module: identifier is already imported
at: send+
in: (define-syntaxes (send+) (new-lambda (stx) (syntax-case stx ()
 ((s+ expr clause ...) (syntax/loc stx (let* ((obj expr)) (send obj .
 clause) ... obj))

 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
in: proj-get

 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
in: proj-get
 raco setup: error: during making for planet/cce/scheme.plt/6/3
 (Scheme Utilities: (planet cce/scheme))
 raco setup:
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
 module: identifier is already imported
 raco setup: at: send+
 raco setup: in: (define-syntaxes (send+) (new-lambda (stx)
 (syntax-case stx () ((s+ expr clause ...) (syntax/loc stx (let* ((obj
 expr)) (send obj . clause) ... obj))
 raco setup: error: during making for
 planet/cce/scheme.plt/6/3/reference
 raco setup:
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
 raco setup: in: proj-get
 raco setup: error: during Building docs for

 /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/reference/manual.scrbl
 raco setup:
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
 raco setup: in: proj-get

 Library

Re: [racket-dev] Planet require gone wild

2013-08-02 Thread Greg Hendershott
On Fri, Aug 2, 2013 at 1:25 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 At Thu, 1 Aug 2013 21:55:37 -0400, Greg Hendershott wrote:
 I'm running HEAD = c126a8a from about 1 week ago.

 I wanted to try the PEG Planet 1 package.

 My source file was simply this:

 #lang racket
 (require (planet kazzmir/peg:2:0/peg))

 1. Using command-line Racket, I got:

 Welcome to Racket v5.90.0.3.
 ; uncaught exception:
 '#/Users/greg/src/scheme/collects/markdown/markdown/peg.rkt

 Huh.

 I haven't been able to replicate this. It looks like you're using
 `xrepl', but maybe I'm missing something else about your setup. Can you
 tell me more about how you ran the program?

Well that's a very perceptive question. I ran it using a Racket mode
for Emacs that I cobbled together back when ,en and enter! were having
trouble reloading modules, and when Quack had an issue with Emacs 24.
One thing led to another and I ended up with an Emacs mode, which I've
simply kept using out of inertia. It's on GitHub (not that I've been
seeking for anyone else to use it, just so I can access it):

https://github.com/greghendershott/racket-mode

The part you're asking about is this:

https://github.com/greghendershott/racket-mode/blob/master/sandbox.rkt

I'll wait while you and e.g. Eli wince so hard that you sprain a
muscle ... go ahead. This is probably wrong on multiple levels. Sorry!
Anyway, taking that out of the picture:

 I had the bright idea of trying this again, in DrRacket 5.90.0.3.

 2. Right away, I got a red message:

 make-directory: forbidden (write) access to
 /Users/greg/Library/Racket/planet/300/5.90.0.3

 Strange...

 That looks like the background syntax colorer complaining that it's not
 allowed to install PLaneT packages. It's not a nice error message, but
 it reflects something working right (and, of course, the new package
 system doesn't provoke the same sort of error).

Granted, I don't require Planet 1 packages frequently, and the last
time was many months ago. But I'm pretty sure I don't recall seeing an
error, much less one about a write permission (which seems wrong, I'm
pretty sure it's write-able). This message is largely what made me
think something was wonky with 5.90.0.3.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Planet require gone wild

2013-08-02 Thread Greg Hendershott
p.s. Anyway I do realize now there wasn't a bug per se. It sounds like
I've been so lucky with Planet requires in the past, that when (as
Ryan put it) I suddenly hit all the weak points at once, it caught me
off guard. To the extent there's even a usability issue, it's
already being addressed by the move to the new package system.

On Fri, Aug 2, 2013 at 4:19 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 On Fri, Aug 2, 2013 at 1:25 PM, Matthew Flatt mfl...@cs.utah.edu wrote:
 At Thu, 1 Aug 2013 21:55:37 -0400, Greg Hendershott wrote:
 I'm running HEAD = c126a8a from about 1 week ago.

 I wanted to try the PEG Planet 1 package.

 My source file was simply this:

 #lang racket
 (require (planet kazzmir/peg:2:0/peg))

 1. Using command-line Racket, I got:

 Welcome to Racket v5.90.0.3.
 ; uncaught exception:
 '#/Users/greg/src/scheme/collects/markdown/markdown/peg.rkt

 Huh.

 I haven't been able to replicate this. It looks like you're using
 `xrepl', but maybe I'm missing something else about your setup. Can you
 tell me more about how you ran the program?

 Well that's a very perceptive question. I ran it using a Racket mode
 for Emacs that I cobbled together back when ,en and enter! were having
 trouble reloading modules, and when Quack had an issue with Emacs 24.
 One thing led to another and I ended up with an Emacs mode, which I've
 simply kept using out of inertia. It's on GitHub (not that I've been
 seeking for anyone else to use it, just so I can access it):

 https://github.com/greghendershott/racket-mode

 The part you're asking about is this:

 https://github.com/greghendershott/racket-mode/blob/master/sandbox.rkt

 I'll wait while you and e.g. Eli wince so hard that you sprain a
 muscle ... go ahead. This is probably wrong on multiple levels. Sorry!
 Anyway, taking that out of the picture:

 I had the bright idea of trying this again, in DrRacket 5.90.0.3.

 2. Right away, I got a red message:

 make-directory: forbidden (write) access to
 /Users/greg/Library/Racket/planet/300/5.90.0.3

 Strange...

 That looks like the background syntax colorer complaining that it's not
 allowed to install PLaneT packages. It's not a nice error message, but
 it reflects something working right (and, of course, the new package
 system doesn't provoke the same sort of error).

 Granted, I don't require Planet 1 packages frequently, and the last
 time was many months ago. But I'm pretty sure I don't recall seeing an
 error, much less one about a write permission (which seems wrong, I'm
 pretty sure it's write-able). This message is largely what made me
 think something was wonky with 5.90.0.3.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Planet require gone wild

2013-08-01 Thread Greg Hendershott
I'm running HEAD = c126a8a from about 1 week ago.

I wanted to try the PEG Planet 1 package.

My source file was simply this:

#lang racket
(require (planet kazzmir/peg:2:0/peg))

1. Using command-line Racket, I got:

Welcome to Racket v5.90.0.3.
; uncaught exception:
'#/Users/greg/src/scheme/collects/markdown/markdown/peg.rkt

Huh.

I had the bright idea of trying this again, in DrRacket 5.90.0.3.

2. Right away, I got a red message:

make-directory: forbidden (write) access to
/Users/greg/Library/Racket/planet/300/5.90.0.3

Strange...

3. Perhaps dumbly, I decided to hit Run, anyway.

What happened is that it installed a LOT of Planet packages. I let it
run for awhile, thinking maybe there were more dependencies for `peg'
than I realized. But the names flying by were making less and less
sense. I got worried it was running wild and doing something like
maybe trying to install ALL Planet packages.

Plus then it started spitting out the following in the eval pane:

Welcome to DrRacket, version 5.90.0.3--2013-07-30(c126a8aa/d) [3m].
Language: racket [custom]; memory limit: 2048 MB.
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
module: identifier is already imported
  at: send+
  in: (define-syntaxes (send+) (new-lambda (stx) (syntax-case stx ()
((s+ expr clause ...) (syntax/loc stx (let* ((obj expr)) (send obj .
clause) ... obj))
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
  in: proj-get
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
  in: proj-get
raco setup: error: during making for planet/cce/scheme.plt/6/3
(Scheme Utilities: (planet cce/scheme))
raco setup:   
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
module: identifier is already imported
raco setup: at: send+
raco setup: in: (define-syntaxes (send+) (new-lambda (stx)
(syntax-case stx () ((s+ expr clause ...) (syntax/loc stx (let* ((obj
expr)) (send obj . clause) ... obj))
raco setup: error: during making for planet/cce/scheme.plt/6/3/reference
raco setup:   
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
raco setup: in: proj-get
raco setup: error: during Building docs for
/Users/greg/Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/reference/manual.scrbl
raco setup:   
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
raco setup: in: proj-get
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
  in: proj-get
Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
proj-get: unbound identifier in module
  in: proj-get
. . 
../../../../../../../../../../../src/plt/racket/racket/collects/setup/private/omitted-paths.rkt:71:2:
user break
. . src/plt/racket/racket/collects/planet/private/resolver.rkt:606:8: user break


So I hit Stop in DrRacket (as you see from user break).  Whew.

4. Here's everything it just installed. The only 2 I expected were
`peg' and `memoize`:

  /Users/greg/Library/Racket/planet/300/5.90.0.3/cache:
  total used in directory 0 available 146890512
  drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 .
  drwxr-xr-x   5 greg  staff  170 Aug  1 21:32 ..
  drwxr-xr-x   9 greg  staff  306 Aug  1 21:33 bzlib
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:34 cce
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 dherman
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 kazzmir
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 ryanc
  drwxr-xr-x   5 greg  staff  170 Aug  1 21:35 schematics
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 untyped
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 zitterbewegung

  /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/bzlib:
  total used in directory 0 available 146891616
  drwxr-xr-x   9 greg  staff  306 Aug  1 21:33 .
  drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 ..
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 base.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 date-tz.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 date.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 file.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 os.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 parseq.plt
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 port.plt

  /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/cce:
  total used in directory 0 available 146891608
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:34 .
  drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 ..
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:34 scheme.plt

  /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/dherman:
  total used in directory 0 available 146891608
  drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 .
  drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 ..
  drwxr-xr-x   3 

Re: [racket-dev] Planet require gone wild

2013-08-01 Thread Greg Hendershott
p.s. The About text from DrRacket is:

Welcome to DrRacket, version 5.90.0.3--2013-07-30(c126a8aa/d), english by PLT.

Just to confirm I ran the DrRacket built from HEAD = c126a8a, not an
older version by accident.


On Thu, Aug 1, 2013 at 9:55 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 I'm running HEAD = c126a8a from about 1 week ago.

 I wanted to try the PEG Planet 1 package.

 My source file was simply this:

 #lang racket
 (require (planet kazzmir/peg:2:0/peg))

 1. Using command-line Racket, I got:

 Welcome to Racket v5.90.0.3.
 ; uncaught exception:
 '#/Users/greg/src/scheme/collects/markdown/markdown/peg.rkt

 Huh.

 I had the bright idea of trying this again, in DrRacket 5.90.0.3.

 2. Right away, I got a red message:

 make-directory: forbidden (write) access to
 /Users/greg/Library/Racket/planet/300/5.90.0.3

 Strange...

 3. Perhaps dumbly, I decided to hit Run, anyway.

 What happened is that it installed a LOT of Planet packages. I let it
 run for awhile, thinking maybe there were more dependencies for `peg'
 than I realized. But the names flying by were making less and less
 sense. I got worried it was running wild and doing something like
 maybe trying to install ALL Planet packages.

 Plus then it started spitting out the following in the eval pane:

 Welcome to DrRacket, version 5.90.0.3--2013-07-30(c126a8aa/d) [3m].
 Language: racket [custom]; memory limit: 2048 MB.
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
 module: identifier is already imported
   at: send+
   in: (define-syntaxes (send+) (new-lambda (stx) (syntax-case stx ()
 ((s+ expr clause ...) (syntax/loc stx (let* ((obj expr)) (send obj .
 clause) ... obj))
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
   in: proj-get
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
   in: proj-get
 raco setup: error: during making for planet/cce/scheme.plt/6/3
 (Scheme Utilities: (planet cce/scheme))
 raco setup:   
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/class.ss:36:16:
 module: identifier is already imported
 raco setup: at: send+
 raco setup: in: (define-syntaxes (send+) (new-lambda (stx)
 (syntax-case stx () ((s+ expr clause ...) (syntax/loc stx (let* ((obj
 expr)) (send obj . clause) ... obj))
 raco setup: error: during making for planet/cce/scheme.plt/6/3/reference
 raco setup:   
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
 raco setup: in: proj-get
 raco setup: error: during Building docs for
 /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/reference/manual.scrbl
 raco setup:   
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
 raco setup: in: proj-get
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
   in: proj-get
 Library/Racket/planet/300/5.90.0.3/cache/cce/scheme.plt/6/3/contract.ss:319:30:
 proj-get: unbound identifier in module
   in: proj-get
 . . 
 ../../../../../../../../../../../src/plt/racket/racket/collects/setup/private/omitted-paths.rkt:71:2:
 user break
 . . src/plt/racket/racket/collects/planet/private/resolver.rkt:606:8: user 
 break


 So I hit Stop in DrRacket (as you see from user break).  Whew.

 4. Here's everything it just installed. The only 2 I expected were
 `peg' and `memoize`:

   /Users/greg/Library/Racket/planet/300/5.90.0.3/cache:
   total used in directory 0 available 146890512
   drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 .
   drwxr-xr-x   5 greg  staff  170 Aug  1 21:32 ..
   drwxr-xr-x   9 greg  staff  306 Aug  1 21:33 bzlib
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:34 cce
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 dherman
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 kazzmir
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:32 ryanc
   drwxr-xr-x   5 greg  staff  170 Aug  1 21:35 schematics
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 untyped
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 zitterbewegung

   /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/bzlib:
   total used in directory 0 available 146891616
   drwxr-xr-x   9 greg  staff  306 Aug  1 21:33 .
   drwxr-xr-x  10 greg  staff  340 Aug  1 21:34 ..
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 base.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 date-tz.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 date.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 file.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 os.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 parseq.plt
   drwxr-xr-x   3 greg  staff  102 Aug  1 21:33 port.plt

   /Users/greg/Library/Racket/planet/300/5.90.0.3/cache/cce:
   total used in directory 0 available

Re: [racket-dev] git submodule for native-library packages

2013-07-30 Thread Greg Hendershott
A report from the junior varsity squad:

I just tried this on OS X and it worked AOK.

FWIW I've been strictly doing `git pull --ff-only upstream master` to
keep my fork's master 100% in sync with PLT's. Any experimentation or
feature requests done solely on topic branches. (Like I wrote about
here: 
http://www.greghendershott.com/2013/04/a-guide-for-infrequent-contributors-to-racket.html
)

I don't yet know enough about Git submodules to understand the analog
of that workflow for submodules, if any. I suspect it will be moot
because I'll probably never doink around with the kind of stuff in
native-pkgs. However if submodules start to get used more extensively
I guess I may need to learn more about submodules.


On Sat, Jul 27, 2013 at 9:10 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 Nothing has been split out of the current git repository, but there is
 now a native-pkgs git submodule for the native-library packages.

 If you build on Mac OS X or Windows or if you run a snapshot build,
 then you'll need to use

   git pull
   git submodule init
   git submodule update

 once on each repository checkout from now on, and

   git pull
   git submodule update

 for updates after the first checkout.

 If you just `git pull' without the submodule commands, then you'll have
 an empty native-pkgs directory. That's fine if you're building on,
 say, Linux. If you're on Mac OS X or Windows, then the makefile should
 give you a good error message and suggest using `git submodule init'
 and `git submodule update'.

 If you use `git submodule update' today and forget to use it in the
 future, probably things will be fine for a long time, because
 native-pkgs doesn't change often. If native-pkgs does change and
 you forget `git submodule update', then (as I understand things) `git
 status' will tell you that there's a mismatch. The mismatch report
 might take a form that's not entirely clear, but it should be enough to
 remind you to run `git submodule update'.


 I'm still unsure that submodules are going to be useful for managing a
 kind of main-distribution repository with references to package
 repositories. I'm much more confident that a submodule will work for
 the native-library packages in the current build structure. The native
 libraries are already kept in a separate repository, they change
 infrequently, and almost no one has to change them. Also, the
 native-pkgs git submodule replaces two things that I think were just
 bad forms of `git submodule update':

  * A makefile target that fires on Mac OS X and uses `git pull', which
is bad if you happen to be working offline.

  * A note in INSTALL.txt that tells Windows users to manually clone a
particular git repository.

 If a git submodule does not work out for native-library packages after
 all, then should be easy to roll back, since there was no split to
 rewind. Meanwhile, we get a little experience with git submodules.

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


[racket-dev] Building HEAD today

2013-07-17 Thread Greg Hendershott
I did my first fetch and build of HEAD today, using the new layout. A
few surprises; I wanted to ask if they're as-expected (at least at
this point in the change to the new approach).

If the short answer is, Please go away and try again later after
things have settled down then no worries. :)  OTOH let me know if
there's something I can try on my end that would help.


0. I simply ran `make' from the project's top dir (on OS X in case
that matters).

1. I notice the `racket' command-line binary moved from bin/racket to
racket/bin/racket -- correct?  (Not complaining, don't mind adjusting
my PATH. Just checking it's as-expected.)

2. When I run bin/racket/racket, it says

Welcome to Racket v5.3.900.7.

Um, aren't we past 5.3.5? Did I do something wrong?

3. During build I got this error:

...
raco setup: 0 running: pkgs/redex-doc/redex/redex.scrbl
raco setup: 1 running: pkgs/racket-index/scribblings/main/user/release.scrbl
raco setup: error running: (lib scribblings/main/user/release.scrbl)
string?: contract violation
  expected: string?
  given: 'p
  argument position: 1st
  other arguments...:
   'p
  context...:
   /Users/greg/src/plt/racket/racket/lib/collects/racket/private/sort.rkt:213:0:
sort
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/scribblings/main/private/release.rkt:43:0:
release-items
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/scribblings/main/user/release.scrbl:
[running body]
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/setup/scribble.rkt:766:0:
load-doc/ensure-prefix
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/setup/scribble.rkt:999:13
   /Users/greg/src/plt/racket/racket/lib/collects/setup/parallel-do.rkt:420:20:
loop
string?: contract violation
  expected: string?
  given: 'p
  argument position: 1st
  other arguments...:
   'p
  context...:
   /Users/greg/src/plt/racket/racket/lib/collects/racket/private/sort.rkt:213:0:
sort
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/scribblings/main/private/release.rkt:43:0:
release-items
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/scribblings/main/user/release.scrbl:
[running body]
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/setup/scribble.rkt:766:0:
load-doc/ensure-prefix
   
/Users/greg/src/plt/racket/pkgs/racket-pkgs/racket-index/setup/scribble.rkt:999:13
   /Users/greg/src/plt/racket/racket/lib/collects/setup/parallel-do.rkt:420:20:
loop
raco setup: 7 running: pkgs/scribble-doc/scribblings/scribble/scribble.scrbl
raco setup: 1 running: pkgs/racket-doc/scribblings/scheme/scheme.scrbl
...

4. I got many re-rendering lines:

raco setup: 7 rendering: pkgs/racket-index/scribblings/main/search.scrbl
raco setup: 7 re-rendering:
pkgs/racket-doc/scribblings/reference/reference.scrbl
raco setup: 6 re-rendering: pkgs/algol60/algol60.scrbl
raco setup: 5 re-rendering: pkgs/games/cards/cards.scrbl
raco setup: 4 re-rendering:
pkgs/web-server-doc/web-server/scribblings/tutorial/continue.scrbl
raco setup: 3 re-rendering: pkgs/datalog/scribblings/datalog.scrbl
raco setup: 2 re-rendering: pkgs/db-doc/db/scribblings/db.scrbl
raco setup: 1 re-rendering: pkgs/eopl/eopl.scrbl
raco setup: 0 re-rendering: pkgs/racket-doc/scribblings/foreign/foreign.scrbl
raco setup: 6 re-rendering:
pkgs/future-visualizer/future-visualizer/scribblings/future-visualizer.scrbl
raco setup: 5 re-rendering: pkgs/games/scribblings/games.scrbl
raco setup: 6 re-rendering:
pkgs/racket-doc/scribblings/getting-started/getting-started.scrbl
raco setup: 3 re-rendering: pkgs/htdp-doc/graphics/scribblings/graphics.scrbl
raco setup: 1 re-rendering: pkgs/honu/scribblings/honu.scrbl
raco setup: 6 re-rendering: pkgs/htdp-doc/htdp/htdp.scrbl
raco setup: 1 re-rendering: pkgs/images/scribblings/images.scrbl
raco setup: 3 re-rendering: pkgs/lazy/lazy.scrbl
raco setup: 2 re-rendering:
pkgs/racket-index/scribblings/main/user/local-redirect.scrbl
raco setup: 6 re-rendering: pkgs/racket-doc/scribblings/more/more.scrbl
raco setup: 5 re-rendering: pkgs/pict-doc/pict/scribblings/pict.scrbl
raco setup: 3 re-rendering: pkgs/racket-doc/pkg/scribblings/pkg.scrbl
raco setup: 6 re-rendering: pkgs/plai/scribblings/plai.scrbl
raco setup: 4 re-rendering: pkgs/racket-doc/planet/planet.scrbl
raco setup: 0 re-rendering: pkgs/plot/scribblings/plot.scrbl
raco setup: 3 re-rendering: pkgs/drracket/setup/plt-installer.scrbl
raco setup: 4 re-rendering: pkgs/preprocessor/scribblings/preprocessor.scrbl
raco setup: 6 re-rendering: pkgs/slideshow-doc/scribblings/quick/quick.scrbl
raco setup: 3 re-rendering: pkgs/r5rs-doc/r5rs/r5rs.scrbl
raco setup: 3 re-rendering: pkgs/r6rs-doc/r6rs/scribblings/r6rs.scrbl
raco setup: 4 re-rendering: pkgs/racklog/racklog.scrbl
raco setup: 6 re-rendering:
pkgs/racket-doc/rackunit/scribblings/rackunit.scrbl
raco setup: 3 re-rendering: pkgs/racket-doc/scribblings/raco/raco.scrbl
raco setup: 4 re-rendering: pkgs/redex-doc/redex/redex.scrbl
raco setup: 2 re-rendering: 

Re: [racket-dev] Building HEAD today

2013-07-17 Thread Greg Hendershott
 Um, aren't we past 5.3.5? Did I do something wrong?

 It gets difficult to read with that many dots, but version 5.3.900.7 is
 past version 5.3.5 (since 900 is past 5). We'll eventually switch to
 5.900.x (and probably should have already).

Yikes, how did my brain parse that as something like 5.3.3.9.

I'm glad at least one of us knows how to count. (By us, I mean the
two of us. Or some other number of us.)

 6. The very end of the build looked like this:
 ...
 combine-relative-elements: relative path escapes collection: (up
 #path:info.rkt) relative to (lib frog frog)
   context...:

 I recently (June 6) wrote to you

  Using a relative path ../info.rkt that steps outside a collection
  feels wrong, but I don't have a concrete reason or better idea.

 Now we have a concrete reason, so we'll have to find a better idea.

Ah right. That was for printing a banner and trying to DRY the version:

(module+ main
  (require ../info.rkt)
  (printf Frog ~a\n (#%info-lookup 'version))
  

Interestingly (to me; maybe this is as you would expect) when I run
`raco frog` there is no error such as there was under the build's
`raco setup`. It still works.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Using Travis CI for Racket

2013-07-03 Thread Greg Hendershott
This is cool. One way I've seen Travis CI help especially is with pull
requests via GitHub. The integration is really nice. If someone's pull
request breaks the build or tests, that is highlighted right there in
the pull request discussion thread on GitHub. As a result, a
contributor gets automatic feedback to fix it.

BTW, I've wanted to use Travis CI for projects written _in_ Racket.
What you did nudged me to try this, and I took some inspiration from
https://github.com/RayRacine/rackos and came up with
https://github.com/greghendershott/travis-racket.


On Tue, Jul 2, 2013 at 7:04 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 I've just committed support for building Racket automatically on the
 Travis continuous integration service.  See
 https://travis-ci.org/samth/racket/ for the current build state.  This
 doesn't track the actual `plt/racket` repository yet [1], but once it
 does, it will do the following:

  - Build the core of Racket on every push (comparable to the Minimal
 Racket snapshot)
  - Run the tests relevant to that core.

 That's it -- this is a free service, and you can't take too much of
 their time.  This isn't a replacement for DrDr, which runs _very_
 comprehensive tests. But it provides very fast turnaround, multiple
 compilers, and eventually OS X and Windows builds. Initially, no one
 will get email -- let me know if you want to be emailed about build
 results.

 Currently, it runs tests for the following:

  - everything in `tests/racket/`
  - `json`
  - `xml`

 Unfortunately, that `pkg` tests seem to break right now.

 Let me know if there's something else that should be run to test that
 Minimal Racket is working.

 Sam

 [1] That should happen once Eli is back to flip the relevant
 configuration switch.
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] [ANN] RacketCon 2013: 29 September

2013-07-02 Thread Greg Hendershott
Since ICFP early reg has opened, I wanted to reconfirm these dates.
Plus, since there are some Saturday sessions, it might be good to know
more if possible about the Hacketathon on Saturday, in case anyone
isn't sure what to choose?


On Wed, May 8, 2013 at 3:00 PM, Doug Williams
m.douglas.willi...@gmail.com wrote:
 Sorry I missed last year's RacketCon. It was held on the same weekend we had
 all the kids (and now grandkids) here in Denver for a long weekend. It also
 coincided with the American Beer Festival held in Denver, which is probably
 why the kids - especially our son and son-in-laws - wanted the reunion that
 weekend.

 I look forward to seeing everyone again.


 On Wed, May 8, 2013 at 9:49 AM, Asumu Takikawa as...@ccs.neu.edu wrote:

 RacketCon 2013
 --

 We are pleased to announce that (third RacketCon) will take place on
 September 29, 2013 at Northeastern University in Boston.  This year, we
 plan to bring in several speakers from industry, as well as host talks
 from Racket developers and users.

 Lunch will be provided.

 On the Saturday (28th) before RacketCon, we plan to hold a hackathon to
 work on
 various Racket projects.

 Registration will open during the summer, and we will post a detailed
 schedule of events around the same time. The conference website is at

   http://con.racket-lang.org/

 Asumu Takikawa and PLT

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



 
   Racket Users list:
   http://lists.racket-lang.org/users

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


Re: [racket-dev] [racket] [ANN] RacketCon 2013: 29 September

2013-07-02 Thread Greg Hendershott
I checked again and there's a page for this:
https://github.com/plt/racket/wiki/RacketCon-Hackathon-2013

So I suppose I'm suggesting fleshing it out more if possible,
including for example the suggested projects.

On Tue, Jul 2, 2013 at 6:30 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 Since ICFP early reg has opened, I wanted to reconfirm these dates.
 Plus, since there are some Saturday sessions, it might be good to know
 more if possible about the Hacketathon on Saturday, in case anyone
 isn't sure what to choose?


 On Wed, May 8, 2013 at 3:00 PM, Doug Williams
 m.douglas.willi...@gmail.com wrote:
 Sorry I missed last year's RacketCon. It was held on the same weekend we had
 all the kids (and now grandkids) here in Denver for a long weekend. It also
 coincided with the American Beer Festival held in Denver, which is probably
 why the kids - especially our son and son-in-laws - wanted the reunion that
 weekend.

 I look forward to seeing everyone again.


 On Wed, May 8, 2013 at 9:49 AM, Asumu Takikawa as...@ccs.neu.edu wrote:

 RacketCon 2013
 --

 We are pleased to announce that (third RacketCon) will take place on
 September 29, 2013 at Northeastern University in Boston.  This year, we
 plan to bring in several speakers from industry, as well as host talks
 from Racket developers and users.

 Lunch will be provided.

 On the Saturday (28th) before RacketCon, we plan to hold a hackathon to
 work on
 various Racket projects.

 Registration will open during the summer, and we will post a detailed
 schedule of events around the same time. The conference website is at

   http://con.racket-lang.org/

 Asumu Takikawa and PLT

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



 
   Racket Users list:
   http://lists.racket-lang.org/users

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


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-17 Thread Greg Hendershott
I'm still thinking that I'll keep my existing multi-collection
packages as multi, to preserve compatibility with 5.3.4. Only because,
although my packages don't have many users, I'll err on the side of
their convenience.

But if someone else did want to change from multi to single:

1. Philosophical: Wouldn't this be bad to do without renaming the
package, since the spirit of the package system versioning is, never
break backward compatibility?  Or, is it acceptable, now, since this
is technically still in beta?

2. Practical: Would `raco pkg update' handle such a multi-single
transform?  Or should packagers instruct users to (a) remove and (b)
install?

I'm asking in case it would help to have the answer(s) ready for doc
or FAQ purposes.


On Sat, Jun 15, 2013 at 11:19 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 At Fri, 14 Jun 2013 21:14:58 -0400, Greg Hendershott wrote:
 I just want to be clear what I need to do to
 keep compatibility with 5.3.4 for existing packages. If that means
 adding something to info.rkt to say, yeah, I'm still multi, I may do
 that.

 Yes, that's exactly what will be required for a package to work with
 both v5.3.4 and after the change: keep the package multi-collection,
 and explicitly declare it as such by adding a line to info.rkt.

 For the new info.rkt field, should it be

   (define multi-collection? #t)

 ?

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


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-16 Thread Greg Hendershott
On Sat, Jun 15, 2013 at 11:19 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 For the new info.rkt field, should it be

   (define multi-collection? #t)

 ?

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


Re: [racket-dev] release 5.3.5

2013-06-15 Thread Greg Hendershott
1. I'm really excited about the book, which I'll buy.

2. Issuing a release solely to ship code for a book:

  a. Seems unusual (to me), in general.

  b. Plus right now, message seems at odds with the new package
manager and plan to move away from shipping monolithic collects?

  Admittedly that plan isn't in effect yet. But code for a book is a
use case that today's package manager supports AFAICT. So why accrete
another collection, is the reaction.

p.s. I'm sharing an observation casually, not stating an objection angrily.



On Sat, Jun 15, 2013 at 9:46 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 We will release Racket v5.3.5 next week. The purpose of the
 release is to include the Realm of Racket collection with the
 v5.3.4 release, because the book is about to appear.

 The release will strictly be built from

 -- Racket v5.3.4
 -- collects/realm as currently found in git head

 We will __not__ make any other changes.

 Eli has worked out a process and will launch it asap. We will
 conduct a recursive diff of all .rkt files and we will run
 basic checks to ensure the integrity of the release bundle.
 If you're willing to help with these checks, please stay tuned.

 
 DRAFT RELEASE ANNOUNCEMENT:

 Racket version 5.3.5 is now available from

  http://racket-lang.org/

 This is a special-purpose release to match the arrival of
 Realm of Racket in bookstores. Racket v.5.3.5 adds a
 single collection

 collects/realm/

 to the v5.3.4 release. The new collection contains the source
 code that readers of Realm may wish to use for experiments.
 

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


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-14 Thread Greg Hendershott
Oh. I thought the proposal was that packages would remain multi
collection by default, and you'd add something like (define
single-collection name) in info.rkt to opt for single.  And the work
for current packagers would be if they wanted to change from multi to
single.

But I'm fine either way. I just want to be clear what I need to do to
keep compatibility with 5.3.4 for existing packages. If that means
adding something to info.rkt to say, yeah, I'm still multi, I may do
that. But I would really enjoy using single for any new ones.



On Fri, Jun 14, 2013 at 10:07 AM, Matthew Flatt mfl...@cs.utah.edu wrote:
 I think more people need to speak up on this question --- particularly
 authors of existing packages, since the current proposal necessitates
 an update to each existing package.

 The proposal is to make single-package collections the default:

  * If a directory used as a package has no info.rkt file, then it is
treated as a single-collection package.

The single collection's name is the same as the package name (which
tends to be the directory name, but it depends on how you install
the package).

  * If a directory used as a package has an info.rkt file, but
info.rkt doesn't explicitly say that the package is
multi-collection, then it's still a single-collection package.

The info.rkt file might supply a name for the single collection,
instead of leaving it to the package name; supplying a name would be
a requirement for ring-0 packages.

 For each existing package, the author would need to add a line to the
 package's info.rkt to indicate that it is a multi-collection package
 (or change the layout to single-collection mode, with the caveat that
 the package won't work with v5.3.4).

 Any more votes for/against?

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


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-07 Thread Greg Hendershott
 I am *very* strongly in favor of this -- I'd rather have
 single-collection packages than multi-collection packages, if forced
 to choose. I'm very glad that you and Laurent have done the work here.

 I'd be happy to update all of my packages.  Currently, of my 9
 packages on pkg.racket-lang.org, 8 are single collection, and 1
 splices into the existing `data` collection (and has a second
 collection to work around a now-fixed limitation.

Likewise I'd be happy to update all of mine.


As I thought about this, I realized I have what feels like a _really_
dumb question. I realize maybe I don't have a crisp handle on
collection, library, module, and subdirectory.

A single collection can have multiple modules, correct?  At what point
does it become multiple collections -- simply because some of the
modules are in subdirs?

In other words:

  my-collection/
subidr1/
subdir2/

Is that 1 collection or 3?  And why?

Is the answer related to whether there's an info.rkt in a subdir?

The discussion at http://docs.racket-lang.org/guide/module-basics.html
doesn't clear this up for me (unless I'm overlooking something on
multiple re-reads). 6.1.1. has an example of modules organized in
subdirs. This feels like one collection but the term hasn't been
introduced yet.  6.1.2 starts talking about library collections, and
says A collection is a set of installed library modules. But it
doesn't say modules only in the same directory, and it doesn't
really explain at what point it would be considered separate sets of
modules, i.e. two collections instead of one.

Again, I feel like I'm being dense and will probably be embarrassed
when I hear the answer, but ... there. I asked.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-07 Thread Greg Hendershott
Thank you for the thorough explanation.

Also, I'm having the duh moment I predicted.

A collection may have modules in subdirs and still be just one collection.

The use case for a multi-collection package is when you have
collections A and B that you want to be packaged and installed
together -- as top-level A and B collections. (Although you make A
and B into subdirs of a package dir when preparing a multi-collection
package -- even though you push them down for that prep -- when
installed they'll be hoisted back up side by side with other
collections.)


On Fri, Jun 7, 2013 at 5:04 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 On Fri, Jun 7, 2013 at 2:49 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:
 I am *very* strongly in favor of this -- I'd rather have
 single-collection packages than multi-collection packages, if forced
 to choose. I'm very glad that you and Laurent have done the work here.

 I'd be happy to update all of my packages.  Currently, of my 9
 packages on pkg.racket-lang.org, 8 are single collection, and 1
 splices into the existing `data` collection (and has a second
 collection to work around a now-fixed limitation.

 Likewise I'd be happy to update all of mine.


 As I thought about this, I realized I have what feels like a _really_
 dumb question. I realize maybe I don't have a crisp handle on
 collection, library, module, and subdirectory.

 (require a/b/c x/y/z)

 A collection is something that comes first in a require: a and x.
 A library normally means module, but might be a general term for code I 
 share.
 A module path is the full path: a/b/c and x/y/z.
 A module is a file: a/b/c.rkt and x/y/z.rkt
 A module has a 'short name': 'c and 'z (but you normally don't think about 
 it.)
 A subdirectory is where a file might be and shows up in the module path.
 A package is a set of modules.

 Some documentation might refer to subdirectories as sub collections.

 This whole debate has been about whether a SINGLE package can have
 MANY modules from DIFFERENT collections.

 Can package P have module a/b/c AND x/y/z?
 Does package P have to have a collection P?

 The current package system puts no restriction on what modules a
 package can have in it.

 The proposed patch supported vigorously by Sam is to restrict some
 packages so that the can only have modules from one collection. Since
 this restriction is only on some packages, it doesn't take power from
 the system. And some people believe that this restriction is more
 convenient, because they do not have to come up with a name for P or a
 directory for it. There is a second debate on the point of whether the
 collection name of a restricted package P must be P.

 Jay

 A single collection can have multiple modules, correct?  At what point
 does it become multiple collections -- simply because some of the
 modules are in subdirs?

 In other words:

   my-collection/
 subidr1/
 subdir2/

 Is that 1 collection or 3?  And why?

 Is the answer related to whether there's an info.rkt in a subdir?

 The discussion at http://docs.racket-lang.org/guide/module-basics.html
 doesn't clear this up for me (unless I'm overlooking something on
 multiple re-reads). 6.1.1. has an example of modules organized in
 subdirs. This feels like one collection but the term hasn't been
 introduced yet.  6.1.2 starts talking about library collections, and
 says A collection is a set of installed library modules. But it
 doesn't say modules only in the same directory, and it doesn't
 really explain at what point it would be considered separate sets of
 modules, i.e. two collections instead of one.

 Again, I feel like I'm being dense and will probably be embarrassed
 when I hear the answer, but ... there. I asked.
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev



 --
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay

 The glory of God is Intelligence - DC 93
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] PLaneT(2): Single vs multi-collection packages

2013-06-03 Thread Greg Hendershott
 and you should deal with the non-proof of concept method of specifying
 it in, for instance, the info file, which is now package info AND
 collect info.

 Finally, you have to deal with how to say what the name of the
 collection is, because it can't be derived only from the source,

Perhaps could handle both with one info.rkt item:

;; info.rkt
#lang setup/infotab
(define single-collection-package collection-name)
;; I am a single collection package and I am named this.
;; Else if absent assume status quo subdir collection(s)

Speaking of which, it's not just the extra subdir. The existence of
two info.rkt files was confusing (to me) at first, although it made
sense in hindsight.

Now that I'm accustomed it to the extra subdir isn't a huge annoyance,
but I do find myself feeling like Sheldon Cooper on TBBT whenever I
type triples like collect/collect/collect.rkt.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] proposal for moving to packages

2013-05-20 Thread Greg Hendershott
Well, ideally there would be some new module-name-source function
that could return URIs like http://path/to/file.rkt (or for that
matter, file:///path/to/file.rkt), based on info.rkt for packages?

Given that piece, a couple ways to do it -- favoring doing it more in
Emacs vs. more in Racket -- but both involve having a local cache, and
also using If-Modified-Since request headers? Maybe even the ability
to prefill the cache and never expire it ... which seems awfully
like source installation by other means?


p.s. An approach favoring doing it more on the Racket side than on the
Emacs side, could also support FRs like one I saw on the main list
recently, which is that File | Open in DrRacket should be able to open
remote files. That was for a classroom setting IIRC.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Package system quickstart section?

2013-05-12 Thread Greg Hendershott
BTW all of http://docs.racket-lang.org/planet2/* is 404 for me. The
help index is linking to that.

It looks like all that is actually under http://docs.racket-lang.org/pkg/* ?

e.g.:
http://docs.racket-lang.org/planet2/Package_Concepts.html   = 404
http://docs.racket-lang.org/pkg/Package_Concepts.html= OK.


On Wed, May 8, 2013 at 10:38 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 There currently is a quickstart section designed for developers:

 http://docs.racket-lang.org/planet2/Developing_Packages.html

 So, I'm fine with you working on a quickstart from a user perspective,
 although I worry about being too vague on some of the details in the
 Concepts section or duplicating the content. At a high-level, go for
 it, but I'd like to see what you make.

 Jay

 On Wed, May 8, 2013 at 6:56 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 Hi all,

 Would anyone be opposed to adding a Quickstart section to the Package
 System documentation page? The current first section[1] is useful, but
 it's a pretty dense read for someone who just wants to know how to
 install a package.

 I'm imagining that the Quickstart would describe where to find packages
 (pkg.racket-lang.org, github, etc.) and the commands you need to type to
 install a package from typical sources. Maybe screenshots showing how to
 use the package GUI.

 [1]: http://docs.racket-lang.org/planet2/Package_Concepts.html

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



 --
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay

 The glory of God is Intelligence - DC 93
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Package system quickstart section?

2013-05-12 Thread Greg Hendershott
Just to confirm what I mean, the live/public
http://docs.racket-lang.org/ site right now has links to the
non-existent /planet2/* tree.

For example if you do a Search Manuals for raco pkg, which gives this page:

http://docs.racket-lang.org/search/index.html?q=raco%20pkg

Then the first of two results is:

raco pkg  in planet2

And both the raco pkg and planet2 links go to /planet2/* and 404.
(Plus it sounds like the second, topic link should be labeled
something other than planet2, such as pkg or Package
Management.)


On Sun, May 12, 2013 at 3:13 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
 Yes, the documentation file was renamed before the last release. This
 new name is stable.

 On Sun, May 12, 2013 at 1:06 PM, Greg Hendershott
 greghendersh...@gmail.com wrote:
 BTW all of http://docs.racket-lang.org/planet2/* is 404 for me. The
 help index is linking to that.

 It looks like all that is actually under http://docs.racket-lang.org/pkg/* ?

 e.g.:
 http://docs.racket-lang.org/planet2/Package_Concepts.html   = 404
 http://docs.racket-lang.org/pkg/Package_Concepts.html= OK.


 On Wed, May 8, 2013 at 10:38 AM, Jay McCarthy jay.mccar...@gmail.com wrote:
 There currently is a quickstart section designed for developers:

 http://docs.racket-lang.org/planet2/Developing_Packages.html

 So, I'm fine with you working on a quickstart from a user perspective,
 although I worry about being too vague on some of the details in the
 Concepts section or duplicating the content. At a high-level, go for
 it, but I'd like to see what you make.

 Jay

 On Wed, May 8, 2013 at 6:56 AM, Asumu Takikawa as...@ccs.neu.edu wrote:
 Hi all,

 Would anyone be opposed to adding a Quickstart section to the Package
 System documentation page? The current first section[1] is useful, but
 it's a pretty dense read for someone who just wants to know how to
 install a package.

 I'm imagining that the Quickstart would describe where to find packages
 (pkg.racket-lang.org, github, etc.) and the commands you need to type to
 install a package from typical sources. Maybe screenshots showing how to
 use the package GUI.

 [1]: http://docs.racket-lang.org/planet2/Package_Concepts.html

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



 --
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay

 The glory of God is Intelligence - DC 93
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev



 --
 Jay McCarthy j...@cs.byu.edu
 Assistant Professor / Brigham Young University
 http://faculty.cs.byu.edu/~jay

 The glory of God is Intelligence - DC 93
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] racket2 suggestion: removing (or extending) eqv?

2013-05-04 Thread Greg Hendershott
I think this is a great idea.

When I learned Scheme a few years ago, the prospect of juggling three
kinds of equality was a surprise.

I felt like Kevin Kline's character in A Fish Called Wanda, who kept
asking, What was the middle one?

It turned out only two have really mattered practically, for me. It
probably would have helped me if the docs said, Tip: You may never
use eqv and friends.

Even better would be eliminating the middle one.


On Sat, May 4, 2013 at 11:57 AM, Jon Zeppieri zeppi...@gmail.com wrote:
 Since incompatible future changes seem to be coming up a lot, I
 thought I'd add one more. What do the members of this list think of
 removing eqv? all of its associated machinery (e.g., memv, hasheqv,
 etc.)?

 (Along with this change, it would be nice if characters could all be
 immediately represented, so that those with equal code points would be
 eq? RIght now, all unicode code points can be encoded in 22 bits, I
 think. I'm not so familiar with racket's current representation of
 characters, but I figure that they could easily be fit into a single
 machine word on 64-bit builds. I don't know how difficult it would be
 on 32-bit builds. And, of course, there's no guarantee that the number
 of code points won't increase significantly.)

 Alternatively (and following Sam's line of thought from [1]), eqv?
 could be extended to cover all of racket's immutable data structures.
 In this case eqv? should also be made generic so that user-defined
 immutable data structures can use it, as well.


 [1] http://lists.racket-lang.org/users/archive/2013-April/057510.html
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] else clauses: possible change to match?

2013-05-04 Thread Greg Hendershott
There will be people who see the long BNF for match in the Reference,
and flee to the Guide to try to learn by example instead. Even when
they later do read the Reference carefully, they'll be left with first
impressions of idioms from the Guide.

(I might be one of those people. Cough.)

The Guide http://docs.racket-lang.org/guide/match.html uses `else`
in a couple examples.

Also, I somehow got the idea that `(var x)` was the only way to do
what `else` can do by accident. So I don't _think_ I have any code
that's buggy this way, or, which would break if the change were made,
either way. I think.

Until I saw your email I didn't appreciate why it would make sense to
use `_`. Going forward I will.


On Fri, May 3, 2013 at 9:39 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 [ for those that just want to see what I'm getting at, scroll to the end ]

 While the docs are clear (enough) on this point, I think it can be quite
 confusing. See if you spot the bug in this program:

 #lang racket
 (define (find-literals e)
   (define literals '())
   (let loop ([e e])
 (match e
   [`(λ (,x) ,e)
(loop e)]
   [`(,e1 ,e2)
(loop e1)
(loop e2)]
   [(? symbol?) (void)]
   [else
(cond
  [(member e literals)
   (void)]
  [else
   (set! literals (cons e literals))])]))
   literals)

 (module+ test
   (require rackunit)
   (check-equal? (find-literals '(λ (x) x)) '())
   (check-equal? (find-literals '((λ (x) x) 1)) '(1))
   (check-equal? (find-literals '((λ (x) x) #f)) '(#f)))


 Hint: the last test case fails. Second hint: if you switch it to use sets,
 it starts working. Third hint: this isn't about lists. :)

































 The bug is that 'else' is treated as a variable in match, so it gets bound
 to #f, which shadows the else in the cond which  is confusing.

 So, how about making match treat else specially?


 I don't ask this completely from outer space; there was a bug in Redex's
 random generation that was caused exactly by this shadowing of else.

 Robby




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


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


Re: [racket-dev] Performance Lab

2013-01-22 Thread Greg Hendershott
[Disclaimer: I'm not part of the core team, nor do I play one on TV.]

A few miscellaneous thoughts:

1. I love the idea of performance regression testing, with history
charts. (I read a great example of this a few months ago, but can't
dredge it up right now.)

2. I've wanted to do this on some of my own projects. It would be
awesome if the same tools used for Racket itself could be used by
individuals for their collections. (Maybe they have to provide their
own hardware or EC2 instances).

2.5 Racket will be breaking up its distribution into packages. I think
this sorta relates to 2?

3. Recently I was impressed to see how Travis integrates with GitHub.
For example if you make a pull request to a Linguist project, Travis
tests automatically run and the pass/fail result posted in the pull
request thread. (AFAIK Travis isn't _performance_ regression testing,
but still.)

4. Similarly, it could be neat if Planet (1 and/or 2) could show a
Travis-like test result badge for a package. And even a performance
test history chart. We could see at a glance that a package has been
trending faster or slower; more information to evaluate it.


On Tue, Jan 22, 2013 at 12:25 AM, Curtis Dutton curtd...@gmail.com wrote:
 I've been using racket now for about 4 years now. I use it for everything
 that I can and I love it. It is really an awesome system, and I just can't
 say THANKS enough to all of you for racket.

 That being said, I'd like to become more active with the development
 process. In a past life, I worked for Microsoft as a development tools
 engineer. Most of what I did was develop and operate large scale automated
 testing systems for very large teams. I once had a room full of 500 or so
 machines at my disposal, which I tried hard to keep busy. I've maintained
 rolling build systems, that included acceptance tests, a performance testing
 system, a stress testing system and a security fuzzing system.

 I'm not sure how people feel about automated systems like this, part of this
 email is just to see what people think. But used in the right way they can
 be used to shape and control the directions that a project evolves in.


 An example of the type of system that I'd like to see for racket, would be a
 performance measuring system that would work in principle like so...

 I have an exampled I'll use. I'm concerned about the racket/openssl transfer
 speeds.

 The test:

  Create 2 places. 1 with a client. 1 with a server.
  Establish an ssl session.
  Output a start time event.
  transfer 1MB of random data.
  output an end time event


 Now once I write that test, and commit it, the performance system picks it
 up from the repository. And it runs that test for every commit that is made
 there after. That establishes a baseline for the performance of that test.
 If a commit is made, and suddenly that test takes longer, it generates an
 alert. At which point, we either investigate to find out why the test slowed
 down and fix it, or due to circumstances we can't control (which does
 happen) we tell the system that its acceptable and to accept it as a new
 baseline. Now of course if there is a marked improvement, we sound out a pat
 on the back too!

 Now as a user of this system, I can monitor the performance characteristics
 of racket that I care about. People can write tests just to track racket's
 performance over time, and catch unexpected regressions. They can also add
 these tests before they begin on a campaign of improving their pet
 measurements.


 That is the gist of the type of system I wish I had with racket.

 I can go more into how a stress test works, and perhaps fuzzing tests,
 etc...


 Now I'm willing to build it and I'm willing to host it with a number of
 machines. I have pieces and parts of code lying around and I already have a
 decent harness implementation that collects statistics about a racket
 process as it runs.


 What do you think? If could have something like this, would you want it?
 (Does something like this exist already?) What would it look like? How would
 it work, etc


 I'd like to collect a list of desired tests that this system would monitor
 for us. If you already have code that you run on your own, even better!
 Detailed examples would be welcome, as I need to gather some ideas about
 what people would want to do with this thing.

 Racket is so awesome! I'd like to help improve it, and I think this is
 something that I can offer to help get us there.

 Thanks,
 Curt











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

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


Re: [racket-dev] Release Announcement for v5.3.2

2013-01-19 Thread Greg Hendershott
On Thu, Jan 17, 2013 at 1:57 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 Greg Hendershott:
  - markdown rendering mode for Scribble (6aa6dc04)

Although I think that very short version is sufficient, the following
summary provides a few more details if you prefer:


* Scribble renders Markdown format files.
  - Common formatting like _italic_, **bold**, and bullet lists.
  - `section' elements `#' to indicate the level.
  - `margin-note' elements use `' (block quote style).
  - `racketblock' elements request Racket syntax highlighting
(following the GitHub convention to specify a lexer):
```racket
the-code-block
```
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] XREPL , log not working with extra log-receiver vector element in 5.3.2.1?

2013-01-17 Thread Greg Hendershott
Sorry for the false alarm.

Although I'm still waiting for the build of latest to finish, on
GitHub I discovered I'm missing
2a1f70264c0b0d9528a7802b7e01dbe002db39aa from 6 days ago.

On Thu, Jan 17, 2013 at 2:14 PM, Greg Hendershott
greghendersh...@gmail.com wrote:
 Building as of 3312a806 from Jan 7:

 Welcome to Racket v5.3.2.1.
 - ,log debug
 - (log-debug hi)
 - ; match: no matching clause for '#(debug hi
 #continuation-mark-set #f) [,bt
 ;   for context]

 Whereas:

 Welcome to Racket v5.3.1.
 - ,log debug
 - (log-debug hi)
 - ; [debug] hi #continuation-mark-set

 It's re the `match` in this code in xrepl.rkt:

   (when level
 (let ([r (make-log-receiver global-logger level)])
   (current-log-receiver-thread
(thread
 (λ ()
   (let loop ()
 (match (sync r)
   [(vector l m v)
(display (format ; [~a] ~a~a\n
 l m (if v (format  ~.s v) )))
(flush-output)])
 (loop

 It looks like the log-receiver vector got an extra, 4th element?


 p.s. I'm doing a fetch of latest, and rebuild as I type this...


 p.p.s. I have an open pull request to enhance XREPL for the loggers
 added in 5.3.1:

 https://github.com/plt/racket/pull/188

 Eli had some concerns about it, and I wasn't expecting it to be merged
 for 5.3.2.

 Anyway that's a different matter, from what I'm emailing about now.
 AFIK the change with log-receiver sync vector popped up fairly
 recently (I think??).

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


[racket-dev] Pull request to use Racket lexer, and include in v5.3.2

2013-01-08 Thread Greg Hendershott
 If you have any bug-fixes and changes that need to go in the release
 then make sure to specify that in the commit message or mail me the
 commit SHA1s.

Please see https://github.com/plt/racket/pull/211 (this is re Markdown
format render mode for Scribble):

Use Racket lexer for code blocks

Had been specifying Scheme lexer for code blocks, while waiting for
new Racket lexer to wend its way from Pygments to Pygments.rb to
Linguist to GitHub.

That day is almost here: Linguist will soon update and deploy to
GitHub. And Racket 5.3.2 is about to release. As a result, I think
this is the correct time to switch to the Racket lexer: It should be
live on GitHub by the time people are using Racket 5.3.2.

/cc @rmculpepper -- I think this commit should go into the 5.3.2
release.

Although the `@rmculpepper` in the commit message should have already
emailed you via GitHub, I'm posting this for belt+suspenders.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] another site that measures programming language popularity

2013-01-04 Thread Greg Hendershott
That's interesting. It's such a different picture than for example GitHub:

https://github.com/languages

We should hire Nate Silver to make sense of it. :)

http://fivethirtyeight.blogs.nytimes.com/author/nate-silver/

On Fri, Jan 4, 2013 at 12:49 PM, John Clements
cleme...@brinckerhoff.org wrote:
 This is of tangential interest only; the site

 https://sites.google.com/site/pydatalog/pypl/PyPL-PopularitY-of-Programming-Language

 does what appears to be a better job of evaluating language popularity than 
 TIOBE--among other things, they use google trends rather than search result 
 #s, as Joe Marshall has persistently requested, and they try to follow 
 leading indicators, rather than trailing ones.

 Unfortunately, they don't go below the top ten, and trying to generate the 
 search myself produces a message that my search quota has been exceeded

 https://sites.google.com/site/pydatalog/pypl/PyPL-PopularitY-of-Programming-Language


 John Clements



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


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


Re: [racket-dev] URL escaping: question for web experts

2012-12-17 Thread Greg Hendershott
Although I'm hardly a web expert, I think net/uri-codec is currently
a little confusing.

I get the impression that it was originally written prior to 2005,
because the detailed introduction talks only about RFCs 1738 and
2396.[1]

It looks like perhaps functions such as uri-path-segment-encode were
added at a later date, to support RFC 3986. Although these functions'
docs tersely link to RFC 3986, the overall net/uri-codec introduction
wasn't revised accordingly, nor is there a simple explanation like
these also encode #\( #\)   (As a result, I actually ended up
writing my own variation because I overlooked them.)

Aside from the history of the documentation and organization, another
point is the treatment of +, which the docs say intentionally doesn't
follow RFC 2396, but don't really explain why.  (One of my earliest
experiments with Racket was a simple web crawler, and this #\+ -
#\space translation caused difficulties (although it's possible I was
confused in other ways).)


Wikipedia (usual caveats apply) says RFC 3986 is the the current
standard since 2005.[2]

I almost wonder if there should be a brand-new module that implements
RFC 3986 strictly. (Either just that, or, any options/parameters
default to 3986). With the current net/uri-codec deprecated but
preserved for backward compatibility.

I wonder if that would be best because the functions and documentation
may already be confusing. And this is a topic where it's easy for
people to get confused to begin with and choose the wrong function.


[1]: http://docs.racket-lang.org/net/uri-codec.html

[2]: http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_in_a_URI

On Mon, Dec 17, 2012 at 9:59 AM, Eli Barzilay e...@barzilay.org wrote:
 For many people there is a constant source of annoyance when you
 copy+paste doc URLs into a markdown context as with stackoverflow and
 others.  The problem is that these URLs have parens in them and at
 least in Chrome, the copied URL still has them -- and because markdown
 texts use parens for URLs [text](url) they get confused which means
 that you have to manually replace parens with %28 and %29.

 Danny submitted a pull request that eventually got changed by Matthew
 into a new parameter that controls which characters get encoded by
 `net/uri-codec', so it can escape these too.  The result on Chrome is
 that the copied URL has the escapes instead of parens, and clicking
 such a URL makes the copy-able address have the escapes too.  The
 actuall page that is displayed is still the same one, of course, it's
 just weird that Chrome has a certain context where the original URL
 string is preserved as is.  (It even considered the escaped URL as one
 that I didn't visit, even though I visited the one with the unescaped
 parens.)

 In any case, given all of this I thought that maybe the default mode
 could do the extra escaping -- it seems to me that there is no damage
 with doing that, since in theory every character could be escaped
 anyway.  There's a minor overhead of a few extra characters, but
 there's the above benefit of doing it (which might be a temporary
 thing for all I know).

 Neither Matthew nor I feel confident enough to have this encoding be
 the default without consulting some potential web standard gurus.

 So?

 --
   ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
 http://barzilay.org/   Maze is Life!
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] URL escaping: question for web experts

2012-12-17 Thread Greg Hendershott
p.s. Also the current docs[1] say this in the second paragraph:

The URI encoding uses allows a few characters to be
represented as-is: a through z, A through Z, 0-9, -,
 _, ., !, ~, *, ', ( and ).

But this in the final sentence:

In additon, since there appear to be some brain-dead
decoders on the web, the library also encodes !, ~,
', (, and ) using their hex representation, which is
the same choice as made by the Java’s URLEncoder.

Which seems to be contradictory with respect to !, ~, ', ( and ).

[1]: http://docs.racket-lang.org/net/uri-codec.html

On Mon, Dec 17, 2012 at 11:55 AM, Greg Hendershott
greghendersh...@gmail.com wrote:
 Although I'm hardly a web expert, I think net/uri-codec is currently
 a little confusing.

 I get the impression that it was originally written prior to 2005,
 because the detailed introduction talks only about RFCs 1738 and
 2396.[1]

 It looks like perhaps functions such as uri-path-segment-encode were
 added at a later date, to support RFC 3986. Although these functions'
 docs tersely link to RFC 3986, the overall net/uri-codec introduction
 wasn't revised accordingly, nor is there a simple explanation like
 these also encode #\( #\)   (As a result, I actually ended up
 writing my own variation because I overlooked them.)

 Aside from the history of the documentation and organization, another
 point is the treatment of +, which the docs say intentionally doesn't
 follow RFC 2396, but don't really explain why.  (One of my earliest
 experiments with Racket was a simple web crawler, and this #\+ -
 #\space translation caused difficulties (although it's possible I was
 confused in other ways).)


 Wikipedia (usual caveats apply) says RFC 3986 is the the current
 standard since 2005.[2]

 I almost wonder if there should be a brand-new module that implements
 RFC 3986 strictly. (Either just that, or, any options/parameters
 default to 3986). With the current net/uri-codec deprecated but
 preserved for backward compatibility.

 I wonder if that would be best because the functions and documentation
 may already be confusing. And this is a topic where it's easy for
 people to get confused to begin with and choose the wrong function.


 [1]: http://docs.racket-lang.org/net/uri-codec.html

 [2]: http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_in_a_URI

 On Mon, Dec 17, 2012 at 9:59 AM, Eli Barzilay e...@barzilay.org wrote:
 For many people there is a constant source of annoyance when you
 copy+paste doc URLs into a markdown context as with stackoverflow and
 others.  The problem is that these URLs have parens in them and at
 least in Chrome, the copied URL still has them -- and because markdown
 texts use parens for URLs [text](url) they get confused which means
 that you have to manually replace parens with %28 and %29.

 Danny submitted a pull request that eventually got changed by Matthew
 into a new parameter that controls which characters get encoded by
 `net/uri-codec', so it can escape these too.  The result on Chrome is
 that the copied URL has the escapes instead of parens, and clicking
 such a URL makes the copy-able address have the escapes too.  The
 actuall page that is displayed is still the same one, of course, it's
 just weird that Chrome has a certain context where the original URL
 string is preserved as is.  (It even considered the escaped URL as one
 that I didn't visit, even though I visited the one with the unescaped
 parens.)

 In any case, given all of this I thought that maybe the default mode
 could do the extra escaping -- it seems to me that there is no damage
 with doing that, since in theory every character could be escaped
 anyway.  There's a minor overhead of a few extra characters, but
 there's the above benefit of doing it (which might be a temporary
 thing for all I know).

 Neither Matthew nor I feel confident enough to have this encoding be
 the default without consulting some potential web standard gurus.

 So?

 --
   ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
 http://barzilay.org/   Maze is Life!
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev

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


Re: [racket-dev] Feature request - contract form that splits provide/contract into two parts

2012-12-14 Thread Greg Hendershott
Matthias has vastly more experience and perspective in matters like
this; you would be wise to prefer his advice.

But if I understand correctly what you want, I think you could do this
yourself with a simple macro:

(define-syntax define/contract/provide
  (syntax-rules ()
[(_ (id . args) contract body ...)
 (begin
   (define/contract (id . args) contract body ...)
   (provide id))]
[(_ id contract expr)
 (begin
   (define/contract id contract expr)
   (provide id))]))

That's the version I've used in some past projects. However: It uses
define/contract promiscuously, which is (a) not universally beloved
and (b) much slower than provide/contract in the current version of
Racket.

Instead I think you could flip it around to use provide/contract, instead:

(define-syntax define/provide/contract
  (syntax-rules ()
[(_ (id . args) contract body ...)
 (begin
   (provide/contract (id . args) contract body ...)
   (define id))]
[(_ id contract expr)
 (begin
   (provide/contract id contract expr)
   (define id))]))

I _think_ that's essentially what you're asking for?

(Of course this means the function won't be protected by a contract
when called from inside the module, which could be considered bad,
good, or N/A. Just be aware.)

Any approach not using a single provide/contract list has the
disadvantage that Matthias explained: The module no longer has a
contiguous description of its interface in the source.

That's a serious disadvantage. Some might consider it mitigated if the
module has Scribble documentation. Also someone reading the source
might collapse in Emacs (or whatever) to quickly see all the
top-level definitions (although that would include any non-provided
items, so it's not perfect (unless the stock collapse is customized)).

You could also put a list in comments, I suppose.

On Fri, Dec 14, 2012 at 10:44 AM, Matthias Felleisen
matth...@ccs.neu.edu wrote:

 It is critical to inform clients of the services that a module
 provides. In the absence of types, contracts are the closest
 information we have. Reading the implementation is against
 all good SE ideas.

 IF we could assume that people always programmed in DrRacket,
 we could compromise and add a tool that synthesizes the interface
 of a module in some way. Since some contributors break this guideline
 all the time anyway, we should have such a tool available anyway.

 BUT there are also people who use Emacs and the other editor.

 So, if you want to be good, put provide contract-out at the top
 of your module.





 On Dec 14, 2012, at 1:02 AM, Harry Spier wrote:

 If you place provide/contract at the beginning of a module it makes
 the interface clear but it is separated from its function.  If you
 place it right before its function and not at the top of the module,
 it makes the function clearer but the module interface is not so
 clear.

 Is it possible (would it be a good idea?) to provide a new form that
 splits the provide/contract form into two parts.  One part the
 contract definition which you could place immediately before the
 function definition and the second part a provide spec for inclusion
 in a provide statement that included the function name but not the
 contract spec.) .  That way the contract definition can be by the
 function definition and the function name can be in a provide
 statement at the beginning of the module.

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

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


Re: [racket-dev] How to avoid to modify .gitignore when pull request

2012-12-13 Thread Greg Hendershott
 I suggest building in a build/ directory as described in src/README. There's 
 already a .gitignore directive to ignore that directory.

I had a similar confusion a week ago, building Racket for the first
time ever, and got an answer on #racket.

I was following Joe Gibbs Politz's recent Racket blog post
(http://blog.racket-lang.org/2012/11/tutorial-contributing-to-racket.html),
which doesn't suggest this. The blog post is otherwise awesome. So
awesome that it lulled me into not checking src/README.

So I wanted to thank Joe for writing this (seriously it was amazingly
helpful), and also suggest he update with this suggestion?  Ex:

$ cd plt/src
$ mkdir build
$ cd build
$ ../configure
$ make

Unfortunately I don't have his email, so I hope he'll read this or
perhaps someone here can forward this to him.


p.s. I also discovered that if you have PLTCOLLECTS set (for example
to a release build of Racket), the build's copying collections step
copies from  _there_. It turns out I didn't need PLTCOLLECTS at all,
so I simply deleted that env var. But it was weird.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] How to avoid to modify .gitignore when pull request

2012-12-13 Thread Greg Hendershott
 Glad to hear it was useful!  I've updated the post on the blog.

It was really helpful. Thank you for updating it.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] warning: CRLF will be replaced by LF in {src/worksp/README src/worksp/gracket/gracket.rc src/worksp/racket/racket.rc} ?

2012-12-11 Thread Greg Hendershott
Turns out a .gitattributes snuck into my home directory (as a result
of experimenting with syncing my dotfiles to GitHub).

The ~/.gitattributes contained

# Automatically normalize line endings for all text-based files
* text=auto

which caused this regardless of my ~.gitconfig core.autocrlf setting.

If anyone wants to bake a cake, I have some egg. You don't want it
fresh off my face? Oh, OK.

On Tue, Dec 11, 2012 at 1:59 PM, Nick Sivo nicks...@gmail.com wrote:
 I've had success both with the settings and normalization process
 described here:

 https://help.github.com/articles/dealing-with-line-endings

 It comes up a lot since I work on Windows, Mac, and FreeBSD pretty regularly.

 -Nick

 On Tue, Dec 11, 2012 at 8:08 AM, Eli Barzilay e...@barzilay.org wrote:
 Yesterday, Matthew Flatt wrote:
 I've probably mangled the line endings of those file as I wrestled
 with Windows, git, and MinGW.

 All three files look file -- they're using CRLF.

 There are some very confusing problems with some git settings on
 windows which resulted in some very long discussions about it.  IIRC,
 the best thing to do is to avoid any kind of line ending conversion,
 and use an editor that respects LF files.


 I'm not sure what you should do right now, but I'll look into fixing
 the files, and hopefully that will just fix things on your machine.

 At Mon, 10 Dec 2012 12:35:29 -0500, Greg Hendershott wrote:
  Preface: I'm sorry if this is a really basic question, but I'm new to
  this Git workflow, so I'm cautious because I don't want to cause a
  nuisance with some future pull request.
 
  I just did a `git fetch` of the upstream PLT master, then a `git
  merge` into my master.
 
  greg@mbp in ~/src/plt/racket on master
  $ git fetch upstream
  remote: Counting objects: 327, done.
  remote: Compressing objects: 100% (72/72), done.
  remote: Total 216 (delta 174), reused 183 (delta 142)
  Receiving objects: 100% (216/216), 40.89 KiB, done.
  Resolving deltas: 100% (174/174), completed with 102 local objects.
  From github.com:plt/racket
 0dfcf63..6aa6dc0  master - upstream/master
 
  greg@mbp in ~/src/plt/racket on master
  $ git merge upstream/master
  Merge made by the 'recursive' strategy.
  warning: CRLF will be replaced by LF in src/worksp/README.
  The file will have its original line endings in your working directory.
  warning: CRLF will be replaced by LF in src/worksp/gracket/gracket.rc.
  The file will have its original line endings in your working directory.
  warning: CRLF will be replaced by LF in src/worksp/racket/racket.rc.
  The file will have its original line endings in your working directory.
   collects/compiler/private/xform.rkt|   54 +-
   collects/math/private/bigfloat/gmp.rkt |7 +-
   collects/math/private/bigfloat/mpfr.rkt|   34 +-
   ... etc. ...
 
 
  At the moment, git tells me I have local uncommitted changes:
 
  greg@mbp in ~/src/plt/racket on master*
  $ git status
  # On branch master
  # Your branch is ahead of 'origin/master' by 22 commits.
  #
  # Changes not staged for commit:
  #   (use git add file... to update what will be committed)
  #   (use git checkout -- file... to discard changes in working 
  directory)
  #
  #   modified:   src/worksp/README
  #   modified:   src/worksp/gracket/gracket.rc
  #   modified:   src/worksp/racket/racket.rc
  #
  no changes added to commit (use git add and/or git commit -a)
 
 
  1. What is the correct thing for me to do?  Add/commit these to my
  local master, or something else?
 
  2. I double-checked with `git config -l`, and I do _not_ have
  core.autocrlf enabled. Is that correct or instead should I enable it?
 
  Thank you.
  _
Racket Developers list:
http://lists.racket-lang.org/dev
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev

 --
   ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
 http://barzilay.org/   Maze is Life!
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
 _
   Racket Developers list:
   http://lists.racket-lang.org/dev
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] Two pull requests (Markdown render for Scribble, and XREPL , log udpate)

2012-12-06 Thread Greg Hendershott
I submitted two pull requests:

https://github.com/plt/racket/pull/187
Add a Markdown rendering mode to Scribble.

https://github.com/plt/racket/pull/188
Update xrepl for 5.3.1's enhanced `make-log-receiver'.

This is my first time submitting a pull request to Racket. I tried to
make it correct and convenient: Each pull request uses a dedicated
topic branch with a single commit. If there are any questions or
problems, of course please let me know.


P.S. Adding a Markdown render to Scribble is something I've wanted to
do for awhile. What motivated me to finally do it was thinking about
how I could provide documentation on Github with Planet2.

For example, the markdown at https://gist.github.com/4230519 is
generated from the same .scrbl source as the HTML at
http://planet.racket-lang.org/package-source/gh/aws.plt/1/4/planet-docs/manual/index.html.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev