Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8506501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:36:31+00:00 2026-06-11T02:36:31+00:00

Once the browser is connected to the clojurescript repl, I previously had no way

  • 0

Once the browser is connected to the clojurescript repl, I previously had no way of calling macros from the repl. This is an issue that has put me off clojurescript in the past, preferring using javascript directly. Basically, I felt that the cljs-repl was kinda lame and I was going back to the compile/debug cycle that writing code in clojure was supposed to emancipate us from.

Are there any good workarounds/workflows for pushing and testing code in clojurescript? Especially if macros can be evaluated?

An example of my problem is:

  1. make a new cljs project

    lein new cljs-template blah

  2. start up the server

    cd blah

    lein run

  3. run the web-repl

    lein trampoline cljsbuild repl-listen

  4. there is a file src/blah/client/main.cljs with the heading

    (ns blad.client.main
      (:require [noir.cljs.client.watcher :as watcher]
                [clojure.browser.repl :as repl]
                [crate.core :as crate])
      (:use [jayq.core :only [$ append]])
      (:use-macros [crate.macros :only [defpartial]]))

notice the line (:use-macros [crate.macros :only [defpartial]])

I can’t use defpartial in the browser repl because it is a macro. The error I get is:

>> (crate.macros/defpartial [])
"Error evaluating:" (crate.macros/defpartial []) :as "crate.macros.defpartial.call(null,cljs.core.Vector.fromArray([]));\n"
#
TypeError: Cannot read property 'defpartial' of undefined

Now defpartial is quite a useful macro and without it, it was a hassle.

My problem got worse when i wanted to define another macro in the project with the :use-macros. I could not debug what i wrote at all in the repl or the browser and after about half a day, I figured out that it was quicker to use a clj repl, test the macro in there using macroexpand and the copy the results back into the browser repl. I got one cljs macro working after about a day it wasn’t very fun. This was about 6 months ago. I’m hoping there is a quicker way to do this now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:36:32+00:00Added an answer on June 11, 2026 at 2:36 am

    In order for macros to be loaded during an interactive session w/ bREPL you need to explicitly evaluate the ns form in bREPL first.

    Even so this is a bit annoying – some work has landed in master to support interactive macroexpansion but it needs more work. W also have a few ideas floating around about making bREPL more useful by doing analysis of the source files on startup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm experimenting on this code that I got from the net (I'm trying to
Is there an equivalent to browser cookies for Smart Client / Click Once application
I have following html file (1.html) and once I open it in my browser
Im working on a pay-role system, and once the user refreshes the browser i
Once again, I'm at a loss with IE7 on this one. I'm making a
Once again I'm receiving structs via UDP from a C++ programm, Now I ported
I have a Google chrome plugin that has to sustain a connection (BOSH) with
How to clear the cookies that has been stored through my asp.net mvc(C#) application,
I realized that many of my past projects have suffered from too much ajax.
I'm using the code from this article just to try and get something up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.