{"id":20932846,"url":"https://github.com/piotr-yuxuan/sample-dirac-re-frame","last_synced_at":"2026-04-21T18:08:07.328Z","repository":{"id":147669986,"uuid":"84942345","full_name":"piotr-yuxuan/sample-dirac-re-frame","owner":"piotr-yuxuan","description":"Sample project configuration for re-frame and Dirac","archived":false,"fork":false,"pushed_at":"2018-04-12T19:21:39.000Z","size":495,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T02:24:12.912Z","etag":null,"topics":["clojurescript","dirac-devtools","live-coding","re-frame","sample-code"],"latest_commit_sha":null,"homepage":"https://piotr-yuxuan.github.io/sample-dirac-re-frame/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piotr-yuxuan.png","metadata":{"files":{"readme":"readme.org","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-14T11:40:12.000Z","updated_at":"2018-04-12T19:21:39.000Z","dependencies_parsed_at":"2023-05-04T00:48:51.738Z","dependency_job_id":null,"html_url":"https://github.com/piotr-yuxuan/sample-dirac-re-frame","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piotr-yuxuan/sample-dirac-re-frame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-yuxuan%2Fsample-dirac-re-frame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-yuxuan%2Fsample-dirac-re-frame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-yuxuan%2Fsample-dirac-re-frame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-yuxuan%2Fsample-dirac-re-frame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piotr-yuxuan","download_url":"https://codeload.github.com/piotr-yuxuan/sample-dirac-re-frame/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piotr-yuxuan%2Fsample-dirac-re-frame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28006006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojurescript","dirac-devtools","live-coding","re-frame","sample-code"],"created_at":"2024-11-18T21:53:32.952Z","updated_at":"2025-12-24T18:12:22.614Z","avatar_url":"https://github.com/piotr-yuxuan.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Dirac setup with IntelliJ and Emacs\n\nA [[https://github.com/Day8/re-frame][re-frame]] application designed to... well, that part is up to you.\n\nTechnically, this project is a [[https://github.com/Day8/re-frame][re-frame]] rich single-paged application\nbuilt upon [[https://facebook.github.io/react/][React]] (wrapped into [[http://reagent-project.github.io/][Reagent]]). I use [[https://github.com/bhauman/lein-figwheel][Figwheel]], [[https://github.com/binaryage/dirac][Dirac]] for\ndevelopment so I can enjoy [[https://en.wikipedia.org/wiki/Live_coding][live-coding]]. A demo can be accessed here:\n[[https://piotr-yuxuan.github.io/sample-dirac-re-frame/]]\n\nThis project is a sample configuration for Emacs and IntelliJ.\n\n* Summary                                                          :TOC_2_gh:\n- [[#emacs-standalone][Emacs standalone]]\n- [[#emacs-hosts-figwheel-and-intellij-hosts-dirac][Emacs hosts Figwheel and IntelliJ hosts Dirac]]\n- [[#intellij-standalone][IntelliJ standalone]]\n\n* Emacs standalone\n\nI use [[https://github.com/clojure-emacs/cider][Cider]], the Clojure Interactive Development Environment that\nRocks for Emacs. Sure you can get your way with other tools like\n[[https://github.com/Unrepl/spiral][Spiral]].\n\nDirac is implemented as a Piggieback middleware fork, so you cannot\nrun both. Unfortunately Cider needs Piggieback so currently is\nincompatible with Dirac. However, you don't actually need Dirac in\nEmacs because Cider offers a REPL which can connect to a browser or\nsome more exotic environmeents like Node or Nashorn.\n\nFor this project specifically, Cider needs to use leiningen with\nprofile ~emacs~. It can be achieved that way:\n\n#+BEGIN_SRC elisp\n  (use-package cider\n    :custom ((cider-lein-global-options \"with-profile +emacs\")))\n#+END_SRC\n\nThen, all you need to do is launch Cider for cljs:\n\n#+BEGIN_SRC elisp\n  (cider-jack-in-clojurescript)\n#+END_SRC\n\nNow you can open a browser and go to [[http://localhost:3449][localhost:3449]].\n\nMore documentation on Cider [[https://cider.readthedocs.io/en/latest/up_and_running/#browser-connected-clojurescript-repl][here]]. More on Dirac [[https://github.com/binaryage/dirac/blob/1035a3afb9b969a835f59f9dbadb0ad4da812a34/docs/installation.md][there]].\n* Emacs hosts Figwheel and IntelliJ hosts Dirac\n\nJust launch Cider like the previous section, then define a new local\nClojure REPL in IntelliJ with profile ~intelli-j-dirac~ then start\nit. Once it's ready, eval ~(dirac! :join)~ and launch Chrome Canary\nwith [[https://chrome.google.com/webstore/detail/dirac-devtools/kbkdngfljkchidcjpnfcgcokkbhlkogi][Dirac extension]] installed.\n\nYou may prefer to launch latest Chrome Canary with a dedicated user\nprofile, for example:\n\n#+BEGIN_SRC shell\n  /Applications/Google\\ Chrome\\ Canary.app/Contents/MacOS/Google\\ Chrome\\ Canary \\\n    --remote-debugging-port=9222 \\\n    --no-first-run \\\n    --user-data-dir=.chrome-user-data-dir\n#+END_SRC\n\nClick on Dirac icon on the top right-hand corner.\n\n*** Communication between Emacs, IntelliJ and Dirac REPL\n\nIntelliJ and Dirac shares the same cljs runtime and both can access\nCider vars. However Cider can't access Dirac or IntelliJ runtime.\n\n* IntelliJ standalone\n\nLike in the previous section, define a REPL. Start it, then start\nfigwheel, and finally join Dirac runtime.\n\n#+BEGIN_SRC clojure\n  (figwheel-sidecar.repl-api/start-figwheel!)\n  (dirac! :join)\n#+END_SRC\n\n*** Update third party code\n\nAnytime Dirac the-Chrome-Canary-extension gets bumped to a new\nversion, you need to upgrate Dirac dependency version accordingly. A\nleiningen plugin can help you do so.\n\n#+BEGIN_SRC shell\n  lein ancient upgrade :all :check-clojure :allow-all\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotr-yuxuan%2Fsample-dirac-re-frame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotr-yuxuan%2Fsample-dirac-re-frame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotr-yuxuan%2Fsample-dirac-re-frame/lists"}