CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 11:49:14 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"ef575d0e0aeca90a83c5022959736841"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=736cuFhHm4ZdSBN6Rm2DRCcCcduwCAPHVFnDX%2BJXR9weQgWbGP21PvV3xTmZbgHYZAnBxXqBv4zXw7xADUlmxJqMK2DaU3B4R9%2FRdTi1u0aBZ5BlOPy990BxALMUJH7gcXzcfJS%2FiGeprxDhMC00b0ze3cJ8X%2BpqcF5%2Fn%2FVzEAvojLjUocRB%2FLqPBGbhrtIdjNJADuJ3AXdZvvfbtn3yunzSmivBGY%2FFeE5krnTVNXqWMnevw%2FpYFFmSEEzJUWxoHY071bFNsyDeREBDvJbYiA%3D%3D--WQbXDg%2B82KmRtOMU--AIEAu0dIhS4B1a%2FAPFDoqw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1426529045.1753271353; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 11:49:13 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 11:49:13 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DF9C:941DF:AB5DB4:CD26EE:6880CC39
GitHub - GeorgeJahad/debug-repl: Clojure REPL that is aware of surrounding lexical scope
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 13
GeorgeJahad/debug-repl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The Clojure debug-repl Every time I stick a println into some Clojure code to debug it, I think to myself, "This is Lisp! I should be able to insert a repl here!" The problem is of course that Clojure's eval function doesn't know about the surrounding lexical scope. How to solve the problem? Create a macro that passes a copy of the lexical scope in with the form to be evaled, something like this: (defn eval-with-locals [locals form] (eval `(let ~(generate-local-bindings locals) ~form))) USE: The interface is meant to be dead simple: "(use 'alex-and-georges.debug-repl)" loads it, and "(debug-repl)" invokes it. That's about it. When you enter the debug-repl, the regular repl prompt will be replaced with dr => An example will make it clearer: user=> (let [c 1 d 2] (defn a [b c] (debug-repl) d)) #'user/a user=> (a "foo" "bar") dr-1-1001 => c "bar" dr-1-1001 => d 2 dr-1-1001 => *locals* {fn__104 #<user$eval__103 user$eval__103@5f6303>, c "bar", d 2, fn__106 #<user$eval__103$a__105 user$eval__103$a__105@179dce4>, b "foo", counter__56__auto__ 1001} dr-1-1001 => (str b c) "foobar" dr-1-1001 => () 2 user=> LIMITATIONS: The debug-repl doesn't currently integrate properly with the slime-repl, (I think because of how Slime manages IO redirection,) so you'll have to invoke it from a regular repl, or slime's *inferior lisp* buffer. A version of the debug-repl has been ported to slime. More details here: https://hugoduncan.org/post/2010/swank_clojure_gets_a_break_with_the_local_environment.xhtml
About
Clojure REPL that is aware of surrounding lexical scope
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
You can’t perform that action at this time.