This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (5)
- # architecture (1)
- # bangalore-clj (4)
- # beginners (45)
- # boot (4)
- # cider (19)
- # clojure (56)
- # clojure-austin (1)
- # clojure-canada (1)
- # clojure-finland (1)
- # clojure-russia (67)
- # clojure-uk (2)
- # clojurescript (57)
- # clojutre (1)
- # cursive (15)
- # datomic (3)
- # emacs (2)
- # figwheel-main (71)
- # fulcro (117)
- # hoplon (33)
- # java (5)
- # off-topic (52)
- # pedestal (7)
- # remote-jobs (1)
- # shadow-cljs (134)
- # slack-help (9)
- # specter (1)
- # tools-deps (17)
- # vim (2)
How can I go from adding an input to the front end, to writing to a database table?
I want there it be a correspondence between pages and tables, and inputs and columns. Is there a reason this is a bad idea?
Then developers can automatically add a column to a database table just by adding a new input.
Clearly I must make an ajax call but how do i catch it on a Clojure back end, verify the user is credentialed, and then add a column to the database?
That sounds very dangerous to me -- it would open you up to all sorts of hacking if the front end could make arbitrary requests that just automatically modified your DB schema...
Alright I actually don't know how to do this. Basically I'm AOT-compiling a project which in the entry point I'm parsing an args using
clojure.tools.cli, using the parsed argument I want to read external config file
So I have
config.edn side by side and I'm using this to try to execute the jar
And it says it doesn't find the resource. I'm using
io/resource to get the resource. Nvm, I should've just used
io/file instead of
@seancorfield can you help me make a dummy app that connects an input on the clojurescript front end to a clojure backend and a database?
the luminus template has some good docs on how to set up a db with clojure http://www.luminusweb.net/docs/database.html
when i code with the repl, sometimes i end up accidentally defining function
a. It works because the repl has it defined, but it doesn't work after restarting cider. does anybody have a workflow that avoids such issues?
@ackerleytng yes, use it to declare bindings that are defined after the point at which they are invoked
@ackerleytng i assume you want to avoid making definition order mistakes and don't actually have circular dependencies?
i'm not very experienced, but i already noticed that i'm getting used to defining my helper functions above instead of below (like in java)
maybe it's just something to get used to and after some time you don't make this mistake anymore
@ackerleytng @timo.freiberg linter is a tool that analyzes your source code and provides warnings if the code contains errors or other problems, such as using undeclared vars. You can usually hook a linter to your editor to get immediate feedback as you type or save the file. Eastwood is a popular linter for Clojure and it has been around for a long time https://github.com/jonase/eastwood . Personally I’m using Joker https://github.com/candid82/joker with Emacs bindings https://github.com/candid82/flycheck-joker
My experience is that setting up tooling is a time-consuming chore but it pays off in better developer experience. You usually also learn something interesting while banging your head against the wall when trying to get the tools to work the way you like. 🙂
Does all the tooling slow down development? Like when you type, or when the file is big
Sure tooling comes with some kind of overhead but nothing significant in my experience. I try to avoid big files in general. With a relatively modern laptop you won’t probably notice any kind of slowdown.
I initially “chose” Joker because it was the first one I got working with my Emacs setup. 😆
Both Joker and Eastwood are useful. I use both. Joker live via an Atom plugin, Eastwood via the command line.
Any news re: environments for beginners in the last year or so, for editing/executing Clojure or Clojurescript (either or both)? My requirements are: simple installation/setup, syntax-aware re-indentation, and *no* required use of paredit or parinfer. I've taught with many over the years but I'm not fully satisfied with any current options that I know about.
@lspector Hi Lee! I assume you've tried NightCode? How did that stack up on your criteria?