Fork me on GitHub

I wish I had some sort of hybrid between the repl input pane and a scratch buffer


like, I want to be able to scroll up and down, build up forms piece by piece, edit etc, but I want option+enter to send a require to the repl, not add stuff to an ns form


@bfabry Busy right now but will write more later, I have some ideas around that.


@bfabry +1 for the idea...

Oliver George07:07:36

Quick sanity check. Is there a way to get the core.match/match macro to syntax highlight correctly? The binding variables in particular don't get picked up.

Oliver George07:07:17

Just checking that there isn't a workaround


@olivergeorge No, no workaround sorry.

Oliver George10:07:30

cfleming: No worries. Thanks for confirming.


I'm using Intellij with cursive, but it seems to be unable to resolve some of my code (like (db/add-message). I have been watching a video by @yogthos and it seems he has the same problem in the screen cast. So I'm assuming it is normal?


@shidima_ What is db/add-message? Which lib does it come from?


I started a new projcet with lein new luminus guestbook +sqlite +swagger +cljs and import the db namespace as require guestbook.db.core :as db


If you look in that namespace (you can Ctrl/Cmd-click on the ns name), what does the definition of add-message look like?


(ns guestbook.db.core
    [conman.core :as conman]
    [mount.core :refer [defstate]]
    [guestbook.config :refer [env]]))

(defstate ^:dynamic *db*
          :start (conman/connect!
                    (doto (org.sqlite.SQLiteDataSource.)
                          (.setUrl (env :database-url)))})
          :stop (conman/disconnect! *db*))

(conman/bind-connection *db* "sql/queries.sql")


Ok, it looks like it’s dynamically creating vars from that sql file.


Cursive will have problems with that, yes.


Alright, expected behavior then 🙂


Not desired, but sadly expected, yes 🙂


Sometimes its a bit hard to know if I'm doing something wrong or if its part of the tool chain


Thanks for making it clear


No problem, definitely not your fault this time.


@shidima_ would u mind sharing which video were u watching. pls? btw, what's the goal with combining mount and dynamic vars? sounds a bit odd to me


@shidima_ i've tracked down where did this (defstate ^:dynamic *db* ...) come from. it was introduced when mount was integrated into the luminus template: at that time (2015-11-18) it used mount:0.1.2 ( which came from this commit: if you check that out, it does not mention ^:dynamic anywhere in the source code, so i think the luminus template just carried it around with itself in the hope of maintaining some kind of a backward compatibility, however i think it was simply a breaking change, since they fundamentally changed how *db* should work and what should it mean. current luminus docs doesn't show any ^:dynamic *db* stuff either: intrestingly there is an article from 2015-12-05 from yoghtos where he says: > Conclusion > ... > While it's possible to formalize the handling of stateful resources, using libraries such as component, I personally have not found this to be necessary in my applications. —


so in my conclusion, it should just be (defstate db :start ... :stop ...) i will bring it up on #luminus