I understand that the preamble of an XML file (e.g., a first line like ?xml
version=1.0 encoding=utf-8?) is not part of the X-expression representing
that file.
That's why in `response/xexpr`, there's an option for adding a preamble. [1]
But with static XML files, I'm unclear about how
I'm confused about how local package development is supposed to work with `raco
pkg install --clone`. This is turning into a deterrent to diagnosing fixing
bugs, and an encouragement to post issues so others can fix them.
In the dark ages, one would a) fork the main Racket repo on GitHub, b)
This seems straightforward but I'm getting lost in the weeds: what's the
simplest way to generate hyperlinks into Scribble docs on the web (without
having to manually copy the URL)?
For instance, the URL for `map` looks like this:
at 2:10 PM, Matthew Butterick m...@mbtype.com wrote:
This seems straightforward but I'm getting lost in the weeds: what's the
simplest way to generate hyperlinks into Scribble docs on the web (without
having to manually copy the URL)?
For instance, the URL for `map` looks like this:
http
:
Was there ever a resolution to this question?
On Mon, Mar 30, 2015 at 2:12 PM, Matthew Butterick m...@mbtype.com wrote:
I understand that the preamble of an XML file (e.g., a first line like
?xml version=1.0 encoding=utf-8?) is not part of the X-expression
representing that file.
That's why
A few notes about what I learned when converting my `sugar` library to a dual
Typed Racket / Racket library (in part because of performance considerations).
http://unitscale.com/mb/technique/dual-typed-untyped-library.html
(Factual corrections welcome.)
--
You received this message because
The idea of typed/racket/no-check is to disable typechecking, but in so doing,
it also changes all type-based predicates to false. I suppose this oughtn't be
surprising — if a predicate depends on a type, then without the type, the
predicate cannot be true.
But it also means that
FWIW I've had the same problem. Even though 'raco test -p pollen' shows no
errors locally nor on Travis CI, the Racket build system produces a
non-empty stderr test failure [1]. In my case, however, my test file [2]
does not use check-exn (though it does use `system`)
[1]
How would I clear this typecheck error under 6.1.1?
This code:
#lang typed/racket
(define-namespace-anchor nsa)
Produces this error:
Type Checker: missing type for identifier;
consider using `require/typed' to import it
identifier: make-namespace-anchor
from module: namespace.rkt in:
Should I be concerned about Travis CI's consumption of PLT bandwidth? Assuming
the answer is yes, then question #2: what should I do about it?
I just set up Travis CI on some of my Github projects (thanks Greg Hendershott
for the Racket configuration script). IIUC every Travis build requires
for bandwidth.
Sam
On Thu, Apr 2, 2015 at 12:26 PM, Matthew Butterick m...@mbtype.com wrote:
Should I be concerned about Travis CI's consumption of PLT bandwidth?
Assuming the answer is yes, then question #2: what should I do about it?
I just set up Travis CI on some of my Github projects
, Vincent and Neil Toronto worked out a
crazy way to do this with macros and submodules. I think the math library
uses the technique they came up with.
One of them should write a blog post about the technique.
-Ian
- Original Message -
From: Matthew Butterick m...@mbtype.com
Suppose module foo provides `bar`, and module zam requires foo and also
provides `bar` from foo. Further suppose that foo contains the main
documentation for `bar`.
When writing Scribble docs, I've noticed that `(require (for-label ...))` seems
to resolve exported-name conflicts in favor of
PS The 'extra-pkgs' directory is a tiny bit special:
http://docs.racket-lang.org/pkg/git-workflow.html?q=git#%28part._clone-link%29
On Tue, Jun 23, 2015 at 5:39 PM, Jay McCarthy jay.mccar...@gmail.com
wrote:
On Tue, Jun 23, 2015 at 4:26 PM, Anthony Carrico acarr...@memebeam.org
wrote:
On
I've had the same issue with plot zooming not working from my git build. I
don't have a theory but it at least suggests the problem may not be strictly
localized.
On Jun 16, 2015, at 1:10 PM, 'John Clements' via users-redirect
us...@plt-scheme.org wrote:
I notice that currently, plot
-lang.org/scribble/builtin-css.html
[2] http://docs.racket-lang.org/scribble/manual-css.html
On Thu, May 28, 2015 at 2:43 PM, Greg Hendershott greghendersh...@gmail.com
wrote:
Matthew Butterick is the expert on this, but in the meantime here's
some info I hope is mostly correct.
The margin-note
I've increasingly been using TR this way (= keeping code in a state where it
can be easily toggled between typechecked and not). It works, though I'm still
thinking about how to achieve better ergonomics with these issues, which don't
have automatic solutions:
Q1. How to toggle between `#lang
`raco test` will automatically test every .rkt and .scrbl file in a
directory. Suppose I make `#lang foo` and thus many of my test files end
with .foo. I would want all .foo files to be automatically tested as well.
Is there a way to use info.rkt to tell `raco test` to add file types?
(Should
Are there any advantages/disadvantages of using test submodules vs
separate test files? Or is it just a matter of personal preference?
It looks like that test submodules are more convenient and flexible but
I observed that test submodules increase the start up time of racket
scripts.
If
Has this been an oversight? Do we need two official test submodules?
One from the inside, and one from without.
That’s a worthy point. I prefer to locate tests as close as possible to the
code being tested. But the fact that 'raco test ...' and DrRacket only
recognize a single submodule named
wrote:
DOn't forget
$ raco test --submoulde matthew-s-tests
On May 22, 2015, at 3:12 PM, Matthew Butterick m...@mbtype.com wrote:
Has this been an oversight? Do we need two official test submodules?
One from the inside, and one from without.
That’s a worthy point. I prefer
-syntax stx 'sub)])
#'(#%module-begin
(module sub-id racket/base
(define x 2)
(provide x))
(require sub-id)
(provide (all-from-out sub-id))
body ...))])))
On Aug 15, 2015, at 6:21 PM, Matthew Butterick m
I have a #lang that does some funny stuff with #%module-begin (maybe too
funny), the result being that when I run it in DrRacket, the `provide`d
identifiers aren't visible at the top level:
(module my-lang-module my-lang
...
(define id 42)
(provide id))
id
id : undefined;
cannot
No, the double-quoted ''sub doesn't work (triggers bad-syntax error).
Nor does this (with quotes added to `sub-id` within the `require` and
`provide` forms):
(define-syntax my-module-begin
(lambda (stx)
(syntax-case stx ()
[(_ body ...)
(with-syntax ([sub-id (datum-syntax stx
(datum-syntax #'x 'sub)
(begin
(module sub racket/base
(provide y)
(define y 3))
(require 'req-spec)))
(m x)
y
On Aug 16, 2015, at 12:09 AM, Matthew Butterick m...@mbtype.com wrote:
No, the double-quoted ''sub doesn't work (triggers bad-syntax error).
Nor does
:
http://www.mail-archive.com/racket-users@googlegroups.com/msg28031.html
Although it could be a completely different problem, I don't know.
On Aug 15, 2015, at 6:22 PM, Matthew Butterick m...@mbtype.com wrote:
I have a #lang that does some funny stuff with #%module-begin (maybe too
The docs for `compile-collection-zos` [1] say that all files with the
extension .rkt, .ss, or .scm in a collection are compiled and that
within info.rkt, one can specify paths to omit with `compile-omit-paths`.
Is there way to go the opposite direction — specify *extra* files that should
be
of things to do.
At Fri, 21 Aug 2015 09:51:08 -0700, Matthew Butterick wrote:
The docs for `compile-collection-zos` [1] say that all files with the
extension .rkt, .ss, or .scm in a collection are compiled and that
within info.rkt, one can specify paths to omit with
`compile-omit-paths
No, not as long as you're willing to push the envelope here.
Goes without saying.
FWIW the Pollen file extensions are not purely cosmetic. The Pollen renderer
consumes Pollen source files and uses the extension (pm, pmd, pp, etc) to
determine what kind of rendering is necessary. Of course
you can also do that with a #%configure-runtime sudmodule (or
something like that)?
On Aug 15, 2015, at 5:08 PM, Matthew Butterick m...@mbtype.com wrote:
Probably the wiser option. I'll see if I can adapt that solution.
On Aug 15, 2015, at 4:31 PM, Alexander D. Knauth alexan
For the last couple of days my pollen builds have failed with this connection
failed error. I don't see any other packages failing to download from GitHub,
suggesting it's my fault. OTOH the supposedly defective URL works fine, so I'm
not sure how to make the build server happier.
Downloading
I don't do scientific computing, but it seems your question is to some degree
about economic incentives. When you say maximize the profit, whose profit are
you referring to? When you say minimize duplication of effort, whose labor
costs are you referring to? And if this work is so valuable to
According to the docs [1]:
(let ([x 5]) (+ x 6))
Combining the lexical information from 'let' in the program above to 'x would
not produce an identifier that is `free-identifier=?` to either 'x', since it
does not appear in the scope of the 'x' binding.
If so, then what is the flaw in
I’ve always found that it’s more reliable to use fully-qualified package
names with `for-label`, e.g.
(require (for-label jordan/package))
rather than
(require (for-label main.rkt))
Once upon a time I had similar problems, and noticed that fully-qualified
names is the habit used in many
This code works fine in the stable releases, but the new macro expander breaks
it. I've scrutinized the updated docs for `module*` but I'm not clear why this
would be so.
#lang racket/base
;; non-macro version works fine
(module* submod-name0 racket/base
42)
The new expander treats submodules like everything else. Since
`racket/math`, is macro-introduced while the body of the submodule `pi`
is not, the import doesn't bind `pi`. For that matter, the initial
`racket/base` import is also macro-introduced and doesn't bind `#%top`
for `pi`.
OK, this
ed by Perl.
On Friday, October 30, 2015 at 11:46:27 AM UTC-7, Tim Hanson wrote:
> On Friday, October 30, 2015 at 7:21:58 PM UTC+1, Matthew Butterick wrote:
> > To use \s as a matcher, you need #px not #rx:
> >
> > (define rx-empty-or-all-blank-string
> >
I found this task challenging too, so I made a Scribble-derived DSL that's
natively oriented toward making X-expressions, for instance:
#lang pollen/markup
◊title{Bottles --- ◊italic{Abridged}}
◊(apply itemlist
(for/list ([n (in-range 100 0 -1)])
◊item{◊(format "~a" n) bottles.}))
To use \s as a matcher, you need #px not #rx:
(define rx-empty-or-all-blank-string
;#rx"^[[:space:]]*$")
#px"^\\s*$")
See
http://docs.racket-lang.org/reference/regexp.html?q=pregexp#%28elem._%28rxex._25%29%29
On Friday, October 30, 2015 at 11:15:08 AM UTC-7, Tim Hanson wrote:
> hi,
>
> I
> p.s. Although `find-most` is OK, IMO `find-` is usually a noise prefix
> from the Department of Redundancy Department. Sort of like naming a
> function `return-foo` instead of just `foo`. What else would a
> function do except find or return foo?
Agreed, but for this reason, `find-max` and
://docs.racket-lang.org/raco/info_rkt.html?q=info.rkt
On Jul 6, 2015, at 11:54 AM, Jack Firth jackhfi...@gmail.com wrote:
On Sunday, July 5, 2015 at 4:51:22 PM UTC-7, Matthew Butterick wrote:
`raco test` will automatically test every .rkt and .scrbl file in a
directory. Suppose I make `#lang foo
In the example below, I'm curious about the reason for the difference between
the behavior of the system parameter `error-print-width` and the custom
parameter `my-param`.
I understand why `my-param` doesn't take the parameterized value 'custom (=
because `namespace-require` causes a fresh
> So, what is the best way?
Neither will help promote the language, I'm afraid.
But if you post your questions on this mailing list, it will bring the list a
little more traffic, and thus, by your reasoning, make it a happier place.
Whereas Stack Overflow will be depressing no matter what.
PS. I'm assuming that you're using `eq?` here in deliberate preference to
`equal?`. Because `eq?` is not reliable for string comparisons.
> > #lang racket
> > (require rackunit)
> > (define (foo-3 x) (if (eq? x "foo") (list #t) empty))
> > (check-equal? (append-map foo-3 '(a b "foo" "bar"))
If you make these two Scribble files and click "Scribble HTML" in DrRacket, the
second one (with `#lang scribble/manual) will render in the current manual
style. But the first one (with `#lang scribble/lp2`) will render in the older
manual style.
This rendering issue surfaced on the list
Bug or feature? The pkg-build server claims my pollen-tfl package has
"dependency problems." Yet the only "problem" seems to be that I've
(deliberately) disabled compilation of the files:
http://pkg-build.racket-lang.org/server/built/deps/pollen-tfl.txt
I would think `raco setup` would be
t; If you don't want to show a title, then it gets trickier.
>
> Maybe there should be a `scribble/lp-manual` to provide the manual
> style in the same way as `scribble/manual`.
>
> At Wed, 16 Dec 2015 12:11:19 -0800, Matthew Butterick wrote:
> > If you make these two Scr
A clue, perhaps, to tracking down the problem: It appears that the pairs that
are being compressed — Pr, Re, Ty — are all pairs that have kerns applied
(i.e., pair-specific spacing). Moreover, it looks like a systemic error in
rendering the kerning (e.g., kern is being doubled) — notice how the
Whoops sorry, didn't see MFlatt's diagnosis.
On Thursday, December 17, 2015 at 8:25:12 AM UTC-8, Matthew Butterick wrote:
> A clue, perhaps, to tracking down the problem: It appears that the pairs that
> are being compressed — Pr, Re, Ty — are all pairs that have kerns applied
> (i
Can't see how this would be a feature, but maybe I lack imagination: `raco
setup` seemingly won't build docs when `compile-omit-paths` is 'all.
For instance the "info.rkt" of this package specifies docs, but
`compile-omit-paths` is 'all, and the docs are not built.
raco pkg install
Answer: Yes, if you redefine nothingness. You can exploit the fact that
appending (or splicing) an empty list will cause it to disappear (meaning, no
# residue).
#lang racket
(require rackunit)
(define (foo-3 x) (if (eq? x "foo") (list #t) empty))
(check-equal? (append-map foo-3 '(a b "foo"
Ligatures in coding fonts generally, and in Racket / DrRacket specifically,
are a terrible idea. Even worse than `eval`.
1) In a Unicode-aware language like Racket, there's no way to visually
distinguish a presentational use of a ligature from a syntactic use. For
instance, these two strings
Bug or insurmountable limitation? In the sample scribble/lp2 file below, the
@racket[foo] reference at the end will *not* end up hyperlinked to the
documentation for `foo` above it. I infer this is because `foo` and `bar` are
treated as unbound identifiers.
If you add @(require (for-label
> ...and extract the following strings:
> "[X] Escape with Inoue-sensei"
> "[X] Forget all these disloyal options and stick with Shikigami-sensei's
> plan"
> What method would you suggest for that?
There's nothing wrong with `regexp-whatever`. But because Racket has so
many good tools for list
When we speak of "parsing HTML" we should distinguish between strict
parsing (= explicit adherence to a given HTML spec) and permissive parsing
(= converting an HTML-ish string into Racket data.) Both have their place.
`article` became a valid HTML element in HTML5. IIUC the html library is a
An adaptation of Jay's solution that turns every wire into a function that you
can evaluate in the REPL. Plus: shorter. And dumber. Or cleverer? Thin line.
https://gist.github.com/mbutterick/bc24a6291081b1ce0f31
On Saturday, December 19, 2015 at 11:53:52 AM UTC-8, Daniel Prager wrote:
>
of converting them to whitespace, why not just
typeset them literally?
Noob question complete
On Dec 22, 2015, at 2:45 PM, Asumu Takikawa <as...@ccs.neu.edu> wrote:
> On 2015-12-18 12:20:13 -0800, Matthew Butterick wrote:
>> Third try: also tried scribble/comment-reader [2] but th
First try: seemingly not, because this file does not render to HTML with
comments:
;;;
#lang scribble/lp2
@chunk[<*>
(define (f x) ; not g
;; amazing computation
(* x x))]
;;;
In HTML it becomes this:
<*> ::=
(define (f
17 Dec 2015 11:22:38 -0800, Matthew Butterick wrote:
> > Can't see how this would be a feature, but maybe I lack imagination: `raco
> > setup` seemingly won't build docs when `compile-omit-paths` is 'all.
> >
> > For instance the "info.rkt" of this package specifi
> But now that looked at the pollen docs, I see the issue. It looks like
> you have to be able to run the config submodule of some program to be
> able to figure out how to syntax color it
I'm making progress with your suggested technique but hitting a dead end inside
DrRacket.
Here's what I've
o climb an additional learning curve (= of
making their own sub-#lang). Easy things should be easy.
>
> Robby
>
>
> On Sat, Nov 28, 2015 at 2:01 PM, Matthew Butterick <m...@mbtype.com> wrote:
>>> But now that looked at the pollen docs, I see the issue. It looks l
On Jun 5, 2016, at 1:33 PM, Matthias Felleisen wrote:
> when I taught a Sw Dev course and the students voted to use JSON as the data
> exchange language.
I always thought the reason you wisely prefer to keep politics out of
programming was to avoid outcomes like this
Some people, when confronted with a problem, think "I know, I'll use Typed
Racket." Now they have (Pairof Problem Problem).
On Jun 12, 2016, at 2:29 PM, Ben Greenman wrote:
> Yeah I agree `inst` needs more documentation.
> And as someone (Matthew B.?) suggested
On Jun 2, 2016, at 11:47 AM, Jack Firth wrote:
> - Have #%top somehow magically figure out if it should make a new box or
> reuse an existing one for the identifier it's given.
(call-with-future-miracle ...)
I'll think about it more — but my hunch is this problem is
On Jun 11, 2016, at 8:39 PM, Alex Knauth wrote:
>
> The syntax->string function from syntax/to-string formats a syntax object
> with its whitespace and indentation, but doesn't look at the paren-shapes:
Ah yes, thank you — I was so close.
I think probably it should
On Jun 2, 2016, at 10:39 AM, Jack Firth wrote:
>
> I think you can do this by having your language provide it's own #%top syntax
> that defines what to do with unknown variables.
IIUC `#%top` can only provide fallback behavior at runtime, right? AFAICT it
doesn't help
I suspect there's a simple way to do this, I just haven't done it before, so it
does not appear simple. I tried a syntax parameter, and then I had two problems.
Please consider this schematic example (no, I am not using macros to add):
#lang racket
(define-syntax-rule (foo) (+ x x))
On Feb 5, 2016, at 7:00 PM, Alexis King wrote:
> But everyone already knows all that. I only bring it up because I
> monitor the [racket] tag on Stack Overflow[1] relatively closely, and a
> whole lot of questions come up due to how people misunderstand the quote
> form.
BTW, as further evidence of Racket's comparative longevity and tenacity: the
current pairs & lists explainer has been part of the online docs since v4.0,
which was released — fact-checkers, you can correct me — before Stack Overflow
even existed. So really, one canonical RTFM on the first day
you put the val-id into the module via foo? Why is bar supposed to
> do that?
>
>
>
>
> On Feb 10, 2016, at 7:13 PM, Matthew Butterick <m...@mbtype.com> wrote:
>
>>>> You really want to parametrize foo over x for such things. (Or use a
>>>> synta
> Yes, thank you for mentioning them. I was actually thinking of starting with
> SXML, but then turning it into a list of string fragments (with spaces left
> for the dynamically generated parts) as a simplification step once I've
> figured out where everything goes. But there are other
On Wednesday, February 3, 2016 at 11:37:39 AM UTC-8, Gavin McGimpsey wrote:
> I'm hoping to expand it once I learn more about syntax-parse
Macro humor — always best served dry.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe
On Monday, February 8, 2016 at 10:25:50 AM UTC-8, Jack Firth wrote:
> Slack's business model would be negatively affected by user data mining. They
> operate on a "free for small hobbyist use, expensive for large corporate
> use". Corporations do not like when you mine their data and are
For an upcoming project I'm assembling a list of articles & videos about making
macros and #langs in Racket. These are the ones I've come across, but I welcome
suggestions of others I've missed.
Culpepper & Alvis: Basic Macrology
http://rmculpepper.github.io/malr/basic.html
Felleisen: Racket
On Wed, Feb 24, 2016 at 7:37 PM, Brian Adkins wrote:
> As I get deeper into Racket, I expect I'll occasionally find a function
> I'm used to having in the standard library of another language missing. I
> can easily create my own packages for this sort of thing, but some
> If you think (A) is the problem, then I think there's a
> misunderstanding of HTTP responses. The Reason-Phrase is not mandated
> to be anything in particular by the protocol---the client is not
> required to even look at it and it can be replaced with anything.
>
On Monday, February 15, 2016 at 2:40:29 AM UTC-8, Nota Poin wrote:
> Too powerful. It's a language that can define new languages from whole cloth.
> It's a compiler of compilers. It's like trying to use a jet engine to propel
> your tricycle.
I would rather have a jet engine for my tricycle
It's a question of perspective. A rocket-powered tricycle held the land speed
record for 13 years.
https://en.wikipedia.org/wiki/Blue_Flame_(automobile)
On Feb 15, 2016, at 12:32 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote:
> On Mon, Feb 15, 2016 at 2:29 PM, Matthew But
> Nota Poin wrote on 02/11/2016 04:48 AM:
>> But there's no way I've ever been able to figure to produce generated text
>> that is just a flat list of strings, if I ever want to have conditional
>> decisions about what to go in that list.
I'm supposing you know that Racket has at least two
ct modules to require?
>
> On Thu, Feb 11, 2016 at 11:18 AM, Matthew Butterick <m...@mbtype.com> wrote:
> > Why don't you put the val-id into the module via foo? Why is bar supposed
> > to do that?
>
>
> This is part of a larger pattern where I've got a basic `#%
(make-rename-transformer #'foo))
;;
On Feb 10, 2016, at 2:52 PM, Matthias Felleisen <matth...@ccs.neu.edu> wrote:
>
> You really want to parametrize foo over x for such things. (Or use a syntax
> parameter.)
>
>
> On Feb 10, 2016, at 3:26 PM, Matthew B
What is the best approach to destructuring strings using predicates? For
instance "match a substring for which `string->number` is true."
I can approximate this using `regexp-match-positions` and stepping through
possible substrings, testing until one matches, etc.
But I notice that this
On Mar 15, 2016, at 4:11 PM, Sanjeev Sharma wrote:
> is there a quick & dirty way to use scribble or the drracket GUI to generate
> html for random code snippets?
If you have Pygments installed, `pollen/unstable/pygments` and
`pollen/template/html` can be used together
On Mar 17, 2016, at 2:05 PM, Andrew Gwozdziewycz wrote:
> I am imagining an API that utilizes SCSH style regexes but allows you to do
> something like this (fictional):
>
> (define-values (area prefix line) (sre-match (: (= digits 3) (_? "-") (=
> digits 3) (_? "-") (=
> Expanding `y-coord` by itself leads to the error.
I've tripped over this, so just to elaborate slightly.
`syntax-id-rules` will work, but your current macro:
;;;
(define-syntax y-coord
(syntax-id-rules (map)
[(map y-coord lst) (map (lambda (p)
I just sent $2000 to become a sponsor of this year's RacketCon. That's an
increase from the $1500 I put in last year, and $1000 the year before that.
I haven't been to all the RacketCons. But I know from going to the last few
that Vincent St-Amour and Matthew Flatt have kept raising the bar.
Messing with `current-namespace` seems like overkill, though maybe this
approach is too naive for your needs, which just involves hiding the `defun`
identifiers in the current namespace with a `defun:` prefix, then using `#%app`
to pull them out again.
#lang racket
(require rackunit
The docs describe the relationship this way: "In `read-syntax` mode, the result
is always a syntax object ... wrapped around the sort of datum that `read` mode
would produce." [1]
Along those lines, I've yet to see a #lang where the `read` amounts to more
than wrapping `read-syntax` with
> and more ambitiously, a Racket (subset) ->JavaScript compiler (rjs), taking a
> distinct approach from Whalesong.
The short answer: +1
The longer: I am no fan of JavaScript, which I consider a brain-eating virus.
[1] But IMO the "frameworkification" of JS has made it even worse. Yes, the
When you put it that way, subjectively it still sounds good. I'd use it. But
objectively I can't foresee that it would be a wise investment of anyone's
Racket time. Let's face it: any web framework is lucky to live 5 yrs before
developers tire of it and move onto the next thing, or browser
> Then, for all rows, read and split the string. The best that i have found to
> do that is using regular expressions.
>
> (define split-row (regexp-match #rx"\\[(.+), (.+), (.+)\\]" (read-line)))
>
> Then you have to manually convert the substrings into values
>
> (define a
FWIW the LGPL is more restrictive than MIT. I license my Racket packages under
the LGPL mostly for consistency. But the practical benefit is that I can copy
Racket code into the package if I want to. I wouldn't be able to do that if I
were using MIT (because the MIT license would be promising
FWIW the LGPL is more restrictive than MIT. I license my Racket packages under
the LGPL mostly for consistency. But the practical benefit is that I can copy
Racket code into the package if I want to. I wouldn't be able to do that if I
were using MIT (because the MIT license would be promising
>> A macro that wants to put identifiers in a binding position MUST produce the
>> whole binding form for those identifiers.
>
> Well, that's pretty much what match expanders are. Although the `match` forms
> have to recognize these match expanders specially, and expand them itself,
> one step
On Apr 24, 2016, at 7:35 PM, Matthias Felleisen wrote:
>
> From the hip: Can your name-producing macro consume (val-producing-macro) and
> then just directly generate the case-2 macro call directly:
Can this be generalized? As a rule of thumb, is this accurate:
You
For the first time, I used `syntax-local-introduce` to solve a problem. But I
don't understand whether I'm using it correctly or just relying on a spooky
side effect. (I did the read the docs, but I'm looking for a higher-level "why
this exists and what its idiomatic use is")
The problem I had
On Monday, April 25, 2016 at 7:51:23 PM UTC-7, Matthew Butterick wrote:
> FWIW the use case here is a problem I've come across in #lang building:
> taking a parse tree produced by a reader and cleaning it up into a lovely,
> cruft-free S-expression before passing it to the expander
This probably has an obvious answer in the syntax library but the problem is
new to me.
The `definer-macro` below wants to bind identifiers that have been introduced
at the caller site. Case 1 works as expected.
But consider case 2, where another macro picks up identifiers from the calling
On Apr 27, 2016, at 12:30 PM, Alex Knauth wrote:
>
> Well, it's not even that. This doesn't work:
> (let ()
> (define-sli-foo)
> (let ()
> (invoke-sli-foo)))
Based on that, here's simpler example of why I find `syntax-local-introduce`
confounding.
It
On Apr 25, 2016, at 3:08 PM, Alexis King wrote:
>
> Even more generally, if you want macros to compose in a more arbitrary
> and less structured way, you can call local-expand from the containing
> macro in order to “flip” evaluation order as I believe you described
> in
1 - 100 of 335 matches
Mail list logo