Re: [racket-users] Projects (was: the Racket manifesto)

2015-03-25 Thread Greg Hendershott
My personal/casual take on this: There are language systems where you to need to run some make-a-new-project tool -- even for a single source file. In Racket you can create multi-file collections without needing such a tool. Only at the point where you want to package it share with others, do

Re: [racket-users] DrRacket plugin to remove trailing whitespace on save?

2015-04-13 Thread Greg Hendershott
Another approach would be to add a mode that colors trailing whitespace in that ugly greeny/yellowy color that DrRacket uses for the your code is more than 102 columns warning. +1 to this. I think I’d definitely like this independent of a mechanism to trim on save. +1 Also +1. This is

Re: [racket-users] Organizing tests

2015-04-19 Thread Greg Hendershott
That's the --submodule or -s flag. I did `raco help test` just now and discovered even more options than I remembered. Including fun things like running tests in parallel, printing a summary table, and so on. racket-mode has a couple features related to tests and coverage. They currently assume

Re: [racket-users] Debugging Clojure in Racket

2015-04-19 Thread Greg Hendershott
I spent some of my time at Recurse Center (formerly Hacker School) getting hands-on with Clojure. I wrote five blog posts. The first of the series is here: http://www.greghendershott.com/2014/10/hands-on-with-clojure.html -- You received this message because you are subscribed to the Google

[racket-users] Add margin note for exn:break-continuation?

2015-04-28 Thread Greg Hendershott
#lang racket/base ;;; Note: Run the following from command-line Racket (not DrRacket or ;;; racket-mode). ;;; [0] Something that runs long enough to give you a chance to break (define (long-loop) (displayln Starting loop. Press CONTROL+C...) (for/sum ([i (in-range 10)]) 1)) ;;;

Re: [racket-users] Add margin note for exn:break-continuation?

2015-04-28 Thread Greg Hendershott
Ah, of course, that makes sense. Thanks for the suggestion how to explore this using with-continuation-mark. I just submitted a pull request updating the exn:break-continuation documentation with a note/tip. -- You received this message because you are subscribed to the Google Groups Racket

Re: [racket-users] google groups transition pretty much done

2015-05-01 Thread Greg Hendershott
Thanks John!!! - google groups still quarantines some things I wish it wouldn’t (just approved 2 posts from sketchy-sounding “McCarthy” person) Ah, so that explains the only glitch I'd wondered about: Seeing someone reply to a message I hadn't yet got, but which shows up a day or two later.

Re: [racket-users] Re: web-server http-digest-auth: nonce has \r\n

2015-05-07 Thread Greg Hendershott
That sounds good. Although I haven't used it in awhile, I recall needing to slice that off more often than keeping it. On May 7, 2015 2:22 PM, Tim Brown t...@timb.net wrote: I wonder if base64-encode should rather be patched with a #:last-newline? (Default #t) argument. Tim On 7 May 2015

Re: [racket-users] pkg-build report for the v6.2 release candidate

2015-05-15 Thread Greg Hendershott
This is OT wrt deps and doc, but: I don't understand this reported test failure for rackjure, on both versions of Racket: test.rkt: raco test: non-empty stderr: #\nFAILURE\nname: check-exn\nlocation:

Re: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-18 Thread Greg Hendershott
In my early time learning Racket, I wish someone had given me the following advice: For now? Just use `equal?`. `equal?` will usually do the right thing, including for numbers, strings, symbols, immutable lists, and so on. A type-specific function like `=` or `string-=?` might be a bit faster.

Re: [racket-users] Re: Use Parsack to parse a #language?

2015-05-12 Thread Greg Hendershott
On Mon, May 11, 2015 at 9:40 PM, Daniel Prager daniel.a.pra...@gmail.com wrote: I don't see Daniel's post yet. Is it just me, or is Google Groups delaying quite a few messages lately? Greg Hendershott can probably fill you in on more unpleasantries, as his markdown parser is the biggest

Re: [racket-users] using something similar to grep for data extraction

2015-06-09 Thread Greg Hendershott
Given this example list: (define xs '(asdfadsf aasdf ;begin xxx xxx xxx ;end asdfasdf asdfasdfas)) And a couple predicates: (define (begin? s) (equal? s ;begin)) (define (end? s) (equal?

Re: [racket-users] right abstraction for this?

2015-06-11 Thread Greg Hendershott
IIUC in SQL this would simply be: SELECT student, AVG(rating) FROM scores GROUP BY student Apparently a DSL for querying tables can be handy. :) The Racket equivalent for the special case of a 2-column table (a hash-table) could be something like: (define (sql-ish-aggregate-group-by f xs)

Re: [racket-users] 2 point about sribble

2015-05-28 Thread Greg Hendershott
Matthew Butterick is the expert on this, but in the meantime here's some info I hope is mostly correct. The margin-note is responsive, to use the latest Web 2.0 (or whatever verison we're up to now) jargon. If the page is wide enough, it will still appear to the right. (Try resizing the browser

Re: [racket-users] Get list of all predefined identifiers for use in vim syntax highlighting

2015-06-01 Thread Greg Hendershott
The syntax forms should be in the KEYWORDS list; try un-commenting that line. Some highlighters distinguish keywords and builtins, so Jens' script generates those separately. If Vim doesn't care, you could combine them into one big list. (As my other post says, the distinction is kind of

Re: [racket-users] Get list of all predefined identifiers for use in vim syntax highlighting

2015-06-01 Thread Greg Hendershott
1. Jens' solution is good. I've used for the Pygments highlighter and for racket-mode. I recommend it! You may want to stop reading now. :) 2. Coincidentally very recently I've been taking a fresh look at this for racket-mode. I think a recent commit message sums it up pretty well:

Re: [racket-users] help please on git/github pull request

2015-07-03 Thread Greg Hendershott
Once upon a time I forked a repo, committed against master, and couldn't figure out how to re-sync with upstream. I resorted to deleting the fork and starting over. I wanted a sure-fire recipe to avoid that. Although I know a bit more about git now, I still follow that recipe. So far when I've

Re: [racket-users] Emacs Lisp as a Racket Language?

2015-07-03 Thread Greg Hendershott
So I've spent a lot of time using both Racket and Elisp over the past couple years. My feeling: - Racket is much nicer. - Elisp is not nearly as bad as I first thought. Some other baseless opinions: 1. An opposite approach would be to put a more Rackety face on Elisp. But. I feel it's probably

Re: [racket-users] API function naming

2015-07-03 Thread Greg Hendershott
I'd avoid @ because it's used for at-expressions, e.g. #lang scribble or even simply #lang at-exp racket. On Fri, Jul 3, 2015 at 12:32 PM, John Carmack jo...@oculus.com wrote: I am using a “cmd-name!” naming format for functions that are adding to the command list that will be communicated to

Re: [racket-users] API function naming

2015-07-03 Thread Greg Hendershott
, 2015 at 12:41 PM, Greg Hendershott greghendersh...@gmail.com wrote: I'd avoid @ because it's used for at-expressions, e.g. #lang scribble or even simply #lang at-exp racket. On Fri, Jul 3, 2015 at 12:32 PM, John Carmack jo...@oculus.com wrote: I am using a “cmd-name!” naming format for functions

Re: [racket-users] try a new macro expander

2015-06-29 Thread Greg Hendershott
Oops, didn't Cc list: On Mon, Jun 29, 2015 at 12:13 PM, Greg Hendershott greghendersh...@gmail.com wrote: On Mon, Jun 29, 2015 at 7:43 AM, Matthew Flatt mfl...@cs.utah.edu wrote: I'll have to update the version number, so there's now a racket-current-x86_64-linux.sh installer link

Re: [racket-users] Generic collections in Racket

2015-05-24 Thread Greg Hendershott
Also, in my (admittedly limited) time so far with Clojure, I've sometimes been confused when eager collections automagically change into lazy sequences. If I add side effects (like debugging printfs) to code I don't realize is lazy, I utter many WTFs. I'm not sure to what extent that can

Re: [racket-users] Generic collections in Racket

2015-05-24 Thread Greg Hendershott
This is really exciting and you've obviously put a lot of time and thought into it! One part I'm not sure about is `conj`. I understand sometimes whichever end is optimal matters more than the order. But: 1. What if you do care about the order? IOW should there also be generic cons and snoc?

Re: [racket-users] exn-string

2015-05-25 Thread Greg Hendershott
Maybe I'm over-thinking this and/or misunderstanding the use case, but: Should there maybe be a parameter to control whether exn-string returns anything interesting? And, should it be #f by default? Roughly, for example: ;; When current-exn-string-enabled? is #f -- the default -- ;; exn-string

Re: [racket-users] pkg-build report for the v6.2 release candidate

2015-05-21 Thread Greg Hendershott
PM Greg Hendershott greghendersh...@gmail.com wrote: This is OT wrt deps and doc, but: I don't understand this reported test failure for rackjure, on both versions of Racket: test.rkt: raco test: non-empty stderr: #\nFAILURE\nname: check-exn\nlocation: (#path

Re: [racket-users] test submodules vs tests in separate file

2015-05-21 Thread Greg Hendershott
I usually prefer test submodules because I like the proximity to the code being tested. Plus in Emacs racket-mode I can fold/hide the test submodules if they ever become distracting. Exceptions to usually: - Even with the ability to hide/fold tests, if the ratio of tests to tested is really

Re: [racket-users] test submodules vs tests in separate file

2015-05-21 Thread Greg Hendershott
Startup will be fastest if you `raco make` the foo.rkt file to a compiled/foo.zo bytecode file. When you `racket foo.rkt` (directly or via #!) it will load the compiled/foo.zo provided it's not older. Not compiled/foo.zo; it would be compiled/foo_rkt.zo. -- You received this message because

Re: [racket-users] test submodules vs tests in separate file

2015-05-21 Thread Greg Hendershott
(Otherwise the .rkt file must be parsed and expanded each/every time you run. This includes test submodules, even though they won't be run. In addition, expansion time can be significant with non-trivial macros, including but not limited to Typed Racket.) Very interesting, this reduced the

Re: [racket-users] try a new macro expander

2015-05-21 Thread Greg Hendershott
Thanks to a pull request from Alexander Knauth, you can add a RACKET_VERSION = SCOPE_SNAPSHOT to your .travis.yml build matrix: https://github.com/greghendershott/travis-racket/blob/master/.travis.yml#L31 Also, as with RACKET_VERSION = HEAD, you can put this version into an allowed failures

Re: [racket-users] test submodules vs tests in separate file

2015-05-21 Thread Greg Hendershott
I thought that the compilded code would have fewer debugging information (source code location etc) or not able to use the stepper. I have not used the stepper in racket yet (but the stepper in gambit scheme which is really useful at least for a beginner like me). Oh I see what you mean. No,

Re: [racket-users] exn-string

2015-05-26 Thread Greg Hendershott
I was thinking the parameter could be a handy runtime switch, defaulting to safe. However realistically there's probably a lot of other ground to cover when it comes to debug vs. production deployments. Maybe this needs a more comprehensive approach than nibbling away one switch at a time. Maybe

Re: [racket-users] macro making a struct with a macro

2015-08-18 Thread Greg Hendershott
Although maybe off-topic regarding macrology: You might want to consider factoring out the generally useful part, which I think is the less-verbose accessors. An already less verbose way is to use match-define or match-let, for example: (struct s (a b c)) (define x (s 1 2 3)) (match-define (s

Re: [racket-users] Re: A couple of questions about Neil's html reader/writer

2015-07-28 Thread Greg Hendershott
Maybe a dumb question, but: Imagine conversion functions `xexpr-sxml` and `sxml-xexpr`. Would implementing them be any easier than unifying xexprs and sxml (or is it really just the same problem)? If it turns out there isn't any ideal implementation, is there at least some pragmatic

Re: [racket-users] Export indentation preferences in a package's info.rkt?

2015-08-11 Thread Greg Hendershott
In Emacs: - Emacs Lisp (Elisp) macros can use a `declare` form to attach metadata, including indentation info: https://www.gnu.org/software/emacs/manual/html_node/elisp/Declare-Form.html - Other (external) Lisp language modes have a convention that there's an Elisp

Re: [racket-users] Emacs Racket.

2015-07-19 Thread Greg Hendershott
But still curios about using drracket-tool-lib Over time racket-mode has grown to use things like drracket/find-module-path-completions and drracket/check-syntax (thanks Robby!). As well as other tooling like errortrace, macro-debugger/analysis/check-requires, setup/xref, help/help-utils,

Re: [racket-users] racket users fight for their right to colon keywords

2015-10-24 Thread Greg Hendershott
On Fri, Oct 23, 2015 at 2:58 PM, Anthony Carrico wrote: > but seriously Asumu mentioned > Flatt and Barzilay's "Keyword and optional arguments in PLT Scheme" on > irc last night: > http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.162.17 > The paper illuminates the

Re: [racket-users] package-build status for upcoming release

2015-10-23 Thread Greg Hendershott
p.s. Meanwhile I can of course use the browser search-in-page, especially on a desktop browser. My preceding email is more of a nice-to-have request. On Fri, Oct 23, 2015 at 10:45 AM, Greg Hendershott <greghendersh...@gmail.com> wrote: > In the future would it be possible to sort this b

Re: [racket-users] package-build status for upcoming release

2015-10-23 Thread Greg Hendershott
That was going to be my next question, after a couple of the errors didn't make sense to me, and I finally now noticed the May 2015 date. :) Standing down On Fri, Oct 23, 2015 at 10:47 AM, Matthew Flatt wrote: > At Fri, 23 Oct 2015 08:07:09 -0600, Matthew Flatt wrote:

Re: [racket-users] racket users fight for their right to colon keywords

2015-10-23 Thread Greg Hendershott
Keyword arguments: Although I'm comfortable in the #: camp, I can understand people preferring :foo over #:foo for the reason that it is faster to type. #: requires two shifted chars. If you touch type you use both left and right shift keys O_o. In that respect #: is even more awkward a finger

Re: [racket-users] Re: racket users fight for their right to colon keywords

2015-11-09 Thread Greg Hendershott
A fresh syntax wouldn't have to worry about breaking old code. I've written at least two variations on a new `defn` and/or `def` syntax [1][2]. I bet other people have, too. That topic could be its own long thread. It would probably include many good ideas. Of course it would probably become a

Re: [racket-users] Mandatory arguments for command-line

2015-11-12 Thread Greg Hendershott
I don't know how to make the `command-line` syntax do this (there's no flag-clause like `#:required-once`). So I think I'd just do a normal test outside it: (define destination (make-parameter #f)) ;default to #f meaning "unspecified" (command-line your existing code ) (define (main)

Re: [racket-users] Standardizing the threading macro and organizing packages

2015-10-08 Thread Greg Hendershott
On Thu, Oct 8, 2015 at 10:56 AM, Greg Hendershott <greghendersh...@gmail.com> wrote: > - If you do want a Clojure style threading _macro_, rackjure's is the > best implementation now AFAIK. I say that with no ego because that's > mostly thanks to help from people like Sam and Chri

Re: [racket-users] Standardizing the threading macro and organizing packages

2015-10-08 Thread Greg Hendershott
Why Rackjure - rackjure is something I started casually, didn't expect it would ever get 100 stars. On the other hand, I suspect nearly all of those stars are "huh, interesting". Not "I actually use this". :) - I have no emotional investment in it. Just feel an obligation to support it for

Re: [racket-users] racket users fight for their right to colon keywords

2015-10-16 Thread Greg Hendershott
> Code snippets get detached from `#lang` lines all the time, especially in > sometimes-terse 'social media' like email, chat, blogs, Twitter, etc. Although this can be a problem, I think it's already a problem in Racket -- and generally. Example: Spend time answering a Racket question on Stack

Re: [racket-users] net/url question

2015-10-16 Thread Greg Hendershott
The URL needs to get split into parts, and the HTTP request will go "on the wire" as something like: HEAD HTTP/1.0 Host: www.racket-lang.org When you have the trailing / it will be: HEAD / HTTP/1.0 Which makes sense. When the trailing slash is missing, i.e. "no path", I'm

Re: [racket-users] Standardizing the threading macro and organizing packages

2015-10-08 Thread Greg Hendershott
> Quick! Should (~>> (~>> a b) (~>> c d)) be equal to (~>> (b a) (~>> c d)) ? Well, I wouldn't want to write or read code like that. If I'm using a threading macro, at all, it's to reduce nesting, and emphasize the "flat", "pipeline" quality of some computations. As a result I'm not eager to

Re: [racket-users] syntax write using @-syntax

2015-10-05 Thread Greg Hendershott
I was hoping you'd chime in, Eli. > > (match stx-or-sepxr > > [(? syntax? stx) (print/at-exp (syntax->datum stx))] > That's a major mistake! Well, syntax->datum usually is. :) But the usual reason why it's a mistake, seemed N/A here, to produce a plain text .scrbl file. Thanks for

Re: [racket-users] Naming for generalization of find-min and find-max?

2015-10-12 Thread Greg Hendershott
Oh, I love a good bikeshedding thread! ;) I think JCG nailed it: most - It's not excessively numeric. - Unlike "best" it's not judge-y or normative. - The polarity isn't _too_ weird for negatives. (Although "least " might be smoother English, "most " or "most {un,in}-" is usually clear

Re: [racket-users] syntax write using @-syntax

2015-10-05 Thread Greg Hendershott
> I think you're right. My application is the replacement tool for McFly, and > I want to eliminate the need for distributed packages to need a package > dependency like on `mcfly-runtime`. Maybe you don't need to eliminate that? It would only be a build dependency: A using package's info.rkt

Re: [racket-users] [Intro-projects] First intro project

2015-10-12 Thread Greg Hendershott
Welcome to Racket! It's a lot of fun, and there's a ton of interesting stuff to learn about when you're ready. I glanced at your code and it seemed very understandable. I wish my earliest Racket code had been that good. Whenever you feel ready to care about writing "idiomatic" Racket code, you

Re: [racket-users] Are there any BDD testing frameworks for Racket?

2015-07-11 Thread Greg Hendershott
Short version: I think it's a good idea. I don't know of anything like that, yet. I'm interested in BDD, but not so much a Gherkin style DSL. I've considered using eCukes for the Emacs Lisp part of racket-mode. After having seen it used in some contemporary Emacs packages. And after watching some

Re: [racket-users] Are there any BDD testing frameworks for Racket?

2015-07-12 Thread Greg Hendershott
By the way eCukes is here: https://github.com/ecukes/ecukes ... At most I've been tempted to poach some of the Elisp definitions underlying the Gherkin DSL and use them directly. What I meant here is the step definitions in eSpuds: https://github.com/ecukes/espuds -- You received

Re: [racket-users] Frog/Scribble: h* tag substitution

2015-08-28 Thread Greg Hendershott
On Thu, Aug 27, 2015 at 5:52 PM, Jordan Johnson j...@fellowhuman.com wrote: What’s got me baffled is that if I try to access H1..H5 tags this way, other tags get substituted. For example: @(define h3 (tag-function h3”)) ... @h3{Section 2} renders as h1Section 2/h1 So far it’s just

Re: [racket-users] Re: My son's game in Racket

2015-08-25 Thread Greg Hendershott
Although I'm not a game developer, I have a past life developing music/audio software commercially. We developed on Windows because that's where the vast majority of the customers were, and that was really the end of the discussion. Also, although I'm about to exaggerate, I think that for much

Re: [racket-users] http response 204 (no content) with content-encoding "gzip"

2015-09-02 Thread Greg Hendershott
Certain status codes "MUST NOT" include a response body, including 204 [0]. For those, you could say not even a `peek-byte` is necessary. Although I guess there wouldn't be any harm. Definitely for the other variants -- even "SHOULD NOT" -- then peek-byte makes sense. [0]:

[racket-users] Interaction between break and custodian-box

2015-09-02 Thread Greg Hendershott
When you break an expression in the REPL, currently racket-mode takes you out of the module/environment. I want to change that: https://github.com/greghendershott/racket-mode/issues/153 To do so, instead of grabbing the break using `with-handlers`, I'm using `call-with-exception-handler` and

Re: [racket-users] Interaction between break and custodian-box

2015-09-02 Thread Greg Hendershott
Oops, I'd meant to copy the list. On Wed, Sep 2, 2015 at 6:46 PM, Greg Hendershott <greghendersh...@gmail.com> wrote: > Thanks for the quick reply! > > On Wed, Sep 2, 2015 at 5:28 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: >> That looks like a bug in the schedule

Re: [racket-users] Unexpected output from get-pure-port.

2015-09-10 Thread Greg Hendershott
It might be that the server is giving a 30x Redirect response? Which wget automatically follows, but get-pure-port by default does not. Does it help if you supply a non-zero value like say 10 for the optional #:redirections argument to get-pure-port? If it still isn't working, you could try

Re: [racket-users] Unexpected output from get-pure-port.

2015-09-10 Thread Greg Hendershott
On Thu, Sep 10, 2015 at 9:26 PM, R. Clayton wrote: > "HTTP/1.1 200 OK > Date: Fri, 11 Sep 2015 01:10:39 GMT > Server: III 100 > Pragma: no-cache > Content-Type: text/html; ISO-8859-1 > Expires: Fri, 11 Sep 2015 01:10:39 GMT > Cache-control: no-cache

[racket-users] module->namespace doesn't work for module+ ?

2015-09-16 Thread Greg Hendershott
I'm working on adding better submodule support in racket-mode, which entails using module->namespace. This works with `module` and the non-#f variant of `module*`, but fails with the #f variant of `module*` and equivalently `module+`. A distilled example program below shows the first two working

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
On Thu, Sep 17, 2015 at 10:21 AM, Matthew Flatt wrote: > Can you say more about how you're running this program? I get `42` all > four times when running this program with `racket` or in DrRacket. Well I could have sworn I got the error to happen last night in plain racket.

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
at if you can check that). > > I can't guess offhand what the fix was, and I can't yet suggest a > workaround for v6.2. How much do you need a workaround? > > At Thu, 17 Sep 2015 11:15:40 -0400, Greg Hendershott wrote: >> On Thu, Sep 17, 2015 at 10:21 AM, Matthew Flatt <mfl..

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
On Thu, Sep 17, 2015 at 1:25 PM, Greg Hendershott <greghendersh...@gmail.com> wrote: > [I do have places where I dynamic-require X with a fallback if it > doesn't exist. That's not too bad; at least it's a > capability-available flavor test. But that wouldn't work in this &

Re: [racket-users] Somewhere to keep racket snippets

2015-09-09 Thread Greg Hendershott
There's http://pasterack.org/ which is awesome. Folks frequently use it on #racket IRC. It can optionally evaluate the code, too. However: 1. I don't know its long-term retention intention (or reality). 2. I don't think it aspires to the discoverablity implied by your use case. 3. It doesn't

Re: [racket-users] syntax write using @-syntax

2015-09-30 Thread Greg Hendershott
So a kind of pretty-printing for at-expressions? I'm not aware of an existing procedure to do this. It has some interesting wrinkles. Following is my "Greenspun's Tenth Rule" version. (An ad hoc, informally-specified, bug-ridden, slow implementation of half of what's probably needed.) I've

Re: [racket-users] Help on Threads

2015-09-28 Thread Greg Hendershott
To add a tiny bit to Neil's excellent explanation, in case it wasn't clear: You can run your th.rkt program simply by doing racket th.rkt (That's probably all you need to know for now and for a small Racket program.) You can make this start faster by byte-compiling th.rkt after you change

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-20 Thread Greg Hendershott
To wrap this up: - The racket-run Emacs command now supports submodules. It runs whatever (sub)module point is within. - The ,run REPL command now supports "file.rkt" or ("file.rkt" submod ...). - If Racket is new enough (or, not module+ and errortrace), you can see/use the definitions within

Re: [racket-users] quote-srcloc an questions of getting location

2015-11-21 Thread Greg Hendershott
> The objective here is to get a source/loc structure with call point from the > stx passed into the syntax transformer. Is this what quote-srcloc is for? I haven't had a need to use `quote-srcloc`. Although I don't know the context of what you're trying to do, I wanted to check whether you

Re: [racket-users] Macros outline

2016-02-04 Thread Greg Hendershott
I really like it! Compared to FoM, you get to the point more quickly and clearly. (FoM is closer to that genre where someone takes notes on their first 24 hours trying to understand a new language. (Except in my case with macros it felt like months not hours.)) I hope you do expand it. On

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Greg Hendershott
onflating Language and Development Context. If you wish to live > in the Lisp mode of development, you may wish to skip over Racket + DrRacket > and use Racket + Emacs instead (and Greg Hendershott has developed a good > Racket mode for that). > > -- > You received this message because

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Greg Hendershott
is making me nervous that I'm asking for >>> something that's really not there? >>> >>> I remember in MCL that you could re-evaluate a single procedure definition >>> -- does Racket have anything like that? >> >> >> Yes. You are conflating Language and D

Re: [racket-users] DrRacket Coverage

2016-02-16 Thread Greg Hendershott
FWIW when you run tests with coverage in racket-mode (C-u C-c C-t) displays in the echo area either "Coverge complete" or "Missing coverage in N places". In the latter case, point moves to the first place. All such places are colored in red. One thing racket-mode should probably also do is have

Re: [racket-users] DrRacket Coverage

2016-02-16 Thread Greg Hendershott
datum->syntax #'here '(void) #'b))])) > > (m abcdef >ghijkl >mnopqr) > > On Tue, Feb 16, 2016 at 7:59 AM, Robby Findler > <ro...@eecs.northwestern.edu> wrote: >> How do you do this count? (what algorithm?) >> >> Robby >> >> On Tue, Feb 16, 20

Re: [racket-users] DrRacket Coverage

2016-02-17 Thread Greg Hendershott
No. But I color only the foreground, if I'm understanding your question. On Tue, Feb 16, 2016 at 10:13 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > Thanks. That makes sense. Did you discount white space? > > Robby > > > On Tuesday, February 16, 2016, Greg H

Re: [racket-users] Iterating through a list more than one at a time

2016-08-10 Thread Greg Hendershott
> I feel like there should be a simpler way to do this, but I haven't found > one despite much Googling and reading of docs about "for" and its siblings. > Can someone point me the right way? > > I'd like to be able to iterate over a list N elements at a time -- e.g., > grab elements 1 and 2, do

Re: [racket-users] Iterating through a list more than one at a time

2016-08-11 Thread Greg Hendershott
Yes. Also each slice is a sequence. So you could do all the usual things to it. Including but not limited to using another `for` form, applying it to afunction, or destructuring it using `match` and friends. In these examples I included an extra, "leftover" element to make sure it was handled:

[racket-users] Re: on updating the aws package to api version 20120810

2016-07-23 Thread Greg Hendershott
Hi, Daniel. Thank you. At a quick glance updating the AWS API version seems reasonable, as does adding new functionality like create-table-jsexpr (but not breaking backward compatibility -- e.g. let's not remove create-table or change the endpoint default.) In any case would you mind making a

Re: [racket-users] aws package fails against google cloud storage

2016-09-06 Thread Greg Hendershott
Until this thread today, I wasn't even aware the AWS package could be used with GCS. It was a fair amount of work to update things to use v4 sig a year ago: https://github.com/greghendershott/aws/milestone/5?closed=1 If only I'd known, I could have used GCS compatibility as an excuse not to

Re: [racket-users] Do I need a critical section here ... and if so, how to?

2016-09-01 Thread Greg Hendershott
> What about box-cas! ? You might find it handy to use box-cas! via a "swap" style wrapper, such as box-swap! from rackjure/utils: (define (box-swap! box f . args) (let loop () (let* ([old (unbox box)] [new (apply f old args)]) (if (box-cas! box old new) new

Re: [racket-users] Urgent Need--Cloud Engineer---EAD or GC or Citizens only

2016-09-14 Thread Greg Hendershott
> B) This line: " 3) Must be comfortable with not working with AWS and not > complaining about not working with AWS." OP had a small typo and must have meant: Must be comfortable with working with Spring and not complaining about working with Spring. But I kid. Everyone loves a Java code

Re: [racket-users] Urgent Need--Cloud Engineer---EAD or GC or Citizens only

2016-09-14 Thread Greg Hendershott
> I hope you meant Sunday. Oops, yes. :) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit

[racket-users] racket-mode: OK to require Racket 6.0+?

2016-10-10 Thread Greg Hendershott
This is a heads-up that I want to update racket-mode for Emacs to require Racket 6.0 or newer. Currently I support 5.3.5 or newer using some backward compatibility code.[1] But now I'd like to use `filesystem-change-evt`, which AFAICT doesn't have a non-smelly way to fake. Besides, Racket 6.0

Re: [racket-users] If a thunk is a proc of zero arguments, what is a proc of one argument?

2016-11-16 Thread Greg Hendershott
racket-mode is on MELPA: https://melpa.org/#/racket-mode But not MELPA stable. Personally I use only MELPA non-stable, because I like packages to break all the time. Seriously, it's been fine, for me. In Emacs 24.4+ I understand it's possible to use both. You can say to get certain packages

Re: [racket-users] If a thunk is a proc of zero arguments, what is a proc of one argument?

2016-11-15 Thread Greg Hendershott
> I did not, but that's a very nice feature. Unfortunately, I'm an Emacs > guy. :/ Well as is often the case Emacs provides only about 42 ways you could do this. :) A few: In racket-mode C-M-y inserts λ. There's also racket-unicode-method-enable:

Re: [racket-users] When to use functions vs macros

2016-10-11 Thread Greg Hendershott
1. "Both" is sometimes a good answer: Write the function. Then maybe write a macro to do only what only a macro can do -- here, the "de-lambda" sugar, and just call the function to do the real work. 2. Maybe `with-handlers` would work better? -- You received this message because you are

Re: [racket-users] mirror.racket-lang.org seems down, and, 301 or 302?

2016-12-30 Thread Greg Hendershott
Sorry I didn't notice this until now. Given: - downloads.racket-lang.org is AFAIK the recommended download host to ask first - it's still working - it's already known to redirect to some other server - tools/users like racket-travis already know to expect and follow redirects It seems to me

[racket-users] mirror.racket-lang.org seems down, and, 301 or 302?

2016-12-26 Thread Greg Hendershott
I'm very sorry to notice and report this during a holiday weekend for many people. Staring early Saturday ET, I noticed some Travis CI builds failing while trying to install from mirror.racket-lang.org. For instance: $ curl -L

Re: [racket-users] Package documentation link issue

2017-04-12 Thread Greg Hendershott
On Wed, Apr 12, 2017 at 2:29 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > At Wed, 12 Apr 2017 14:17:39 -0400, Greg Hendershott wrote: >> On Tue, Apr 11, 2017 at 7:16 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: >> > It's a bug in the pkg-build proce

Re: [racket-users] Package documentation link issue

2017-04-12 Thread Greg Hendershott
On Tue, Apr 11, 2017 at 7:16 PM, Matthew Flatt wrote: > It's a bug in the pkg-build process, and I should have it fixed for the > next build. It looks like that didn't run this (Wed) morning? I only noticed and mention this because Tue evening I updated Frog. And this:

Re: [racket-users] How to check if a value is not false

2017-04-15 Thread Greg Hendershott
FWIW I like expressing this with pattern matching: #lang racket/base (require racket/match) (struct node (left right)) (define (lines a-node) (match a-node [(node #f #f)'neither] [(node left #f)left] [(node #f right) right]

Re: [racket-users] Typed Racket error in REPL but not when command-line-loaded

2017-04-18 Thread Greg Hendershott
1. It seems maybe you're requiring typed/racket solely as a way to get assert? Instead I think you want to replace (require typed/racket) with (require rackunit), and, in your tests replace (assert (equal? x y)) with (check-equal? x y). Note this will only print something if a check-equal? test

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Greg Hendershott
The `racket-trim-requires` and `racket-base-requires` commands use `raco check-requires` behind the scenes (then format/sort as does `racket-tidy-requires`). Today I tried to use `racket-trim-requires` on a Typed Racket file containing `define-type`; and got the error you mention. This turned out

Re: [racket-users] Idiomatic way to include numbers in a map?

2017-03-02 Thread Greg Hendershott
There is a "generic" `sequence-map`. But it's not variadic like `map` -- and like you want in your example. You could try writing a variadic `sequence-map`? As for `for/list`, you _could_ write: (for/list ([a as] [b bs] [n (in-naturals)]) (foo a b n)) It's faster if

Re: [racket-users] Example of file i/o?

2017-07-19 Thread Greg Hendershott
If you frequently want to deal with files as a list of lines, you could wrap the code Ben showed you in a function: (define (file->lines file) (with-input-from-file file (λ () (for/list ([line (in-lines)]) line As it happens, Racket already defines this function for you:

Re: [racket-users] RacketCon Code of Conduct

2017-06-20 Thread Greg Hendershott
I'm strongly in favor. We could evaluate this simply as a "community development and marketing" proposition: 1. We want more people using Racket. 2. We want more people at RacketCon. 3. A familiar CoC will welcome more people. Framed that way, I think even _I_ could blurt out the answer fast

Re: [racket-users] Re: threading macros

2017-06-25 Thread Greg Hendershott
This might not be a good fit for threading macros. If you need to calculate some extra, intermediate values, I definitely wouldn't recommend `set!`-ing them on the side in a threading macro (if that's what you had in mind). Threading macros produce a single value. If you need to produce

Re: [racket-users] tabular text display

2017-09-21 Thread Greg Hendershott
Clojure's pretty print collection has a `print-table`[^1]. Similar might be a handy addition to `racket/pretty`. Presumably it would work on any dictionary -- as well as a header-less sequence flavor like you showed? Maybe someone could do during the Sunday Rackethon. :) [^1]:

Re: [racket-users] Re: Efficient & "nice" communication mechanism between Racket and other languages

2017-09-08 Thread Greg Hendershott
A hot-take brain-dump: Seems like two aspects: What and how. (The serialization format and the communication method.) What: The correct answer is s-expressions. :) Maybe EDN. OK, OK. A more agnostic answer is JSON -- it has flaws, but it's widely supported among languages, and "everything is a

Re: [racket-users] Re: Library function naming

2017-08-29 Thread Greg Hendershott
It's also worth considering that you can munge the names when you provide -- and your users can munge them on require. See filtered-out and filtered-in -- as well as the more commonly used conveniences built on them, like prefix-{in out}, rename-{in out}, and so on. I think sometimes the

Re: [racket-users] Re: European Racketeers and conferences

2017-08-24 Thread Greg Hendershott
Crazy idea: RacketCon 2018 in Reykjavik Iceland. Relatively neutral travel distance from Europe and (at least Eastern half of) US. (IIUC September would be more affordable than August, and less rainy than October.) :) -- You received this message because you are subscribed to the Google

  1   2   >