This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-07
Channels
- # announcements (32)
- # asami (11)
- # babashka (5)
- # babashka-sci-dev (4)
- # beginners (65)
- # biff (11)
- # calva (35)
- # clerk (2)
- # clj-kondo (14)
- # clj-on-windows (4)
- # clojars (4)
- # clojure (122)
- # clojure-canada (1)
- # clojure-europe (31)
- # clojure-italy (6)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-spec (3)
- # clojure-uk (2)
- # clojurescript (3)
- # core-async (7)
- # core-logic (1)
- # data-science (13)
- # datalog (3)
- # datavis (3)
- # datomic (15)
- # deps-new (4)
- # emacs (34)
- # figwheel-main (1)
- # fulcro (1)
- # funcool (1)
- # holy-lambda (10)
- # lsp (41)
- # malli (24)
- # membrane (5)
- # midje (1)
- # off-topic (5)
- # polylith (3)
- # proletarian (6)
- # re-frame (6)
- # reitit (6)
- # remote-jobs (4)
- # sci (1)
- # shadow-cljs (96)
- # sql (31)
- # testing (23)
- # xtdb (49)
Is anyone using Emacs for SQL integration? Meaning: writing/running queries for exploratory purposes (as you would do with JetBrains DataGrip, or MS SQL client or similar). Brownie points for sharing your thoughts on the setup experience, if in your case it was smooth, or if it was the standard Emacs discovery experience (AKA at least 2 dreadful weeks of painful yak shaving ๐ค). Thanks ๐
I'm also interested in this but Clojure REPL + next-jdbc + Clerk or Portal with emacs UI might be more ergonomic than anything emacs has to offer
On the setup side, thereโs some helpful stuff here on setting up sql-connection-alist
: https://dev.to/viglioni/emacs-as-sql-client-with-lsp-143l
I have my own version of that, for use with sql-connect
(I donโt use the lsp stuff).
What I do is run sql-postgres
in the buffer I'm editing my SQL in, which connects me to my database with a buffer running psql
, and then using C-c C-c
on a SQL statement evaluates it in the psql buffer. I use this for development, when writing SQL queries. I don't recall setting it up being difficult. Looking at my config, there's a value for sql-postgres-options
and some customizing of its prompt regexps that I probably copied and pasted from somewhere
I'm doing it with org and babel, I can leave comments and documentation around that way, and data comes back as nicely formated tables
I'm going to play with the proposed approaches one of these days thanks, everyone ๐
I ended up trying this today and yes, basic setup / connection / integration is smooth (as long as you have cli clients and drivers backing you up). Unfortunately the data I'm querying includes massive unstructured data which floods the screen, for these cases other GUIs have an edge. Thanks anyway though
Is this for a Clojure project @U017QU43430?
today contingency was more plain old sql. I have in my radar/wishlist to try and bring some Clojure treat (such as Portal you mentioned, but also HoneySQL) to make the query-ing experience more enjoyable, it will be for another round ๐
> unstructured data which floods the screen, for these cases other GUIs have an edge This is true, I personally haven't been able to use emacs/org mode for SQL effectively for the same reason but I want to get rid of external GUI programs eventually. They're great for visualization but that's it, they're not a live system.
I don't feel strongly about using Emacs at all costs for everything. On this front, also many free options (including VS Code plugin) don't get anywhere close to the smoothness of the paid ones (thinking of DataGrip). I'm going to try also GToolkit, at least for data iterations. It's not Emacs but still a respectable, somewhat lispic option worth exploring ๐ https://gtoolkit.com/usecases/iterative-data-exploration
anyone (successfully) browsing Github Issues from Emacs? I'm thinking of reading the whole conversations, including pictures, replies, code snippets, being able to follow links
I'm not sure if I'd want to read the content as raw/ish markdown or rendered prettily (italics not _italics_
etc)
this sounds like an @U0G75ARHC type of question :)
I wrote something like this:
(+fetch-github-raw-file)
https://github.com/agzam/.doom.d/blob/main/modules/custom/git/autoload/misc.el#L68
Interesting! But probably a different use case. I was seeking browsing GH issues because on a good project, it's the only thing that would hold me back from closing Chrome entirely, which would increase my focus.
I mostly don't use magit or a lot of Git stuff. Maybe some handrolled helpers (my favorite one opens each file from git status
in a buffer - great for coming back to a context)
Any reason not to use Magit Forge for issues? I use Magit Forge for GitHub issues and pull requests https://practical.li/spacemacs/source-control/magit/forge/issues/
> Any reason not to use Magit Forge for issues? I'm just learning about it in this thread :) mind to show how a specific issue is rendered? (also, the existing pictures are broken in your link)
I'm migrating the images at the moment but will try remember to add an image for issues
https://github.com/practicalli/graphic-design/blob/live/spacemacs/screenshots/spacemacs-git-magit-forge-topics-example.png is a simple example. I'll get some with code..
Cheers. I'll check out https://github.com/magit/forge carefully - wondering about its markdown and image capabilities.
Would anyone else benefit from a cider eval-and-replace-sexp-*pretty-printed
option?* If so, ill add it to my list of things i need to figure out how to build then advertise it, or try to get it added to existing tools.
Alternatively if there is a way to take a clojure structure and turn it into a pretty pretty printed one i would love to know about it? e.g
{:name "drew :age "bee keeping age"}
pp ->
{:name "drew"
:age "bee keeping age"}
there is shell-command-on-region
bound to M-|
by default for me. If you give it a prefix argument it will replace the region. So I highlight some map, C-u M-| jet
and it works for me
{0 1, 20 21, 24 25, 46 47, 4 5, 48 49, 32 33, 40 41, 22 23, 36 37, 44 45, 6 7, 28 29, 34 35, 12 13, 2 3, 14 15, 26 27, 16 17, 38 39, 30 31, 10 11, 18 19, 42 43, 8 9}
becomes
{0 1,
20 21,
24 25,
46 47,
4 5,
48 49,
32 33,
40 41,
22 23,
36 37,
44 45,
6 7,
28 29,
34 35,
12 13,
2 3,
14 15,
26 27,
16 17,
38 39,
30 31,
10 11,
18 19,
42 43,
8 9}
that's a great idea. Thanks! You should make a video about all the small stuff you do to save you time ๐ .
itโs obvious with the tools that emacs provides. but i donโt think about those often sometimes
honestly, i always just pretty print and then remove the comment part lol
If you use cider there's also an interactive cider-format-edn-region
function which does the same.
https://melpa.org/#/zprint-mode also works well for edn.