
I’m trying it out now and it’s awesome!

@greg I am impressed it’s possible without evaluating the module.

To be clear, and give credit where it’s due, the heavy lifting is mostly from drracket/check-syntax
.

I did extend those results a bit, e.g. to find completion candidates for imports (taking into account the various prefix/renaming/except-ing require forms).

And there is a lot of work to stitch things together and try to get the UX I want.

So it’s been about 70 commits of exploring and refining over some weeks.

But again the core “magic” is from drracket/check-syntax
.

Well - I am still impressed!

I am pretty happy with it so far — including dogfooding it when editing the Racket half of Racket Mode. Having said that I’m still polishing and fixing bugs, so, that check-syntax
branch is still a bit WIP atm.

When things settle down, I will see if there are some things I could contribute back into drracket/check-syntax
itself.

One is that identifier-binding
doesn’t always understand provides that are both renamed and wrapped in contracts. I have strategies to work around that, but it would be nice to improve that at the root (if possible).

At least you have figured out what causes the problem. I imagine there is a lot of corner cases.

For example, try (require net/url)
and then do (identifier-binding #'get-pureport)
. The answer is: '(#<module-path-index:net/url>
provide/contract-id-get-pure-port.1
#<module-path-index:net/url>
get-pure-port
0
0
0)
So the “nominal-id” is get-pure-port
and the “source-id” is provide/contract-id-get-pure-port.1
. The latter is technically correct, but not helpful if you want to search in that file (either textually or syntax-ually) to find the definition location. I suppose this is more about identity — when is a thing and a chaperone of the thing the “same” or “different” — and not about identifier-binding
per se. But it would be nice to have an off-the-shelf way to handle it.

And given that piece, it would be easy for Dr Racket’s “Open Defining File” to be a true “goto-definition within that file” like I do in Racket Mode. So I’d like to contribute that back, somehow.

Sound like a new time. Like for-docs
is for documentation, you need a for-reading
which specifies where to look, while reading the code.

Hmm right now I’m wondering if provide/contract
and contracted-out
leave some clue in the expanded syntax, like a syntax property, as to what syntax they’re wrapping? If not, maybe they could start doing so. Then could use that syntax’s location. Something like that.

Sounds like the right place to look. I don’t know if it is at all helpful, but there were an Inside Racket Seminar a few years back: https://www.youtube.com/watch?v=eUsDKbKtrLs

do most of you guys here use emacs as an alternative to drrracket ?

hey Team, I am working on a dsl, is this the right channel to get help?

only other channel i see is random lol, so fire away

Sorry, I don’t know an answer to that. @mflatt, do you know?

yes i use emacs

It’s difficult to know whether the changes are relevant to @massung’s use, but a lot has changed since v7.4. One fix in particular repairs a cache that sits between the namespace resolver and the filesystem; since filesystem metadata operations tend to be slower on Windows, the repair could make even more of a difference there. But it depends on what was slower.

I’d consider emacs but people keep suggesting the demand for configuration is overwhelming

Do we have a “substitute” or “replace” function that works on trees (lists of lists). Something like (substitute t x y)
will replace all leafs in the tree t which equal to x with the value y?

I posted a .emacs file not that long ago: https://racket.slack.com/archives/C06V96CKX/p1580296325218400?thread_ts=1580293479.217200

agreed lol, getting started with emacs looks daunting..

There’s Spacemacs which I think is super friendly to people who are new to Emacs.

Well, I look forward to 7.6 then and finding out. :slightly_smiling_face:

that makes me more nervous that I’m on some weird emacs away from mainstream knowledge

and that advice over the web will interact with this strange mode

i tried spacemacs before it eh… kind of bloated

elisp is also slower than javascript iirc :s

when reading the racket docs, is it possible to view the source code for a given form?

for example, clojuredocs has the (source) link in the upper right corner (https://clojuredocs.org/clojure.core/reduce), which links to the line where it’s defined

not that I know of, but I’d try opening DrRacket, type in the identifier and right-click “jump to definition”

oh cool, thanks

@nbtheduke DrRacket: Maybe click the “check syntax” icon first, then right click and choose “jump to definition”.

In racket-mode you can use M-. to visit a definition and M-, to go back.

In drracket?

The first line is for DrRacket. The second is for emacs.