off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
2021-04-26T02:53:25.310400Z

Given the numerous ways you could have set up that table don't think I could help. If it's not too late, you could use a prebuilt table?

2021-04-26T02:54:43.310600Z

If your using react "Table API - Material-UI" https://material-ui.com/api/table/

raspasov 2021-04-26T03:38:23.310900Z

@qmstuart use pure flex-box CSS, no extra libs. The React Native guide is the best in terms of clarity and conciseness that I’ve found; it finally allowed me to “get” flex-box; I still refer to it very frequently; I realize you’re probably not doing this in RN, but all the flex-box rules should work identically in the browser (with the one note that the default flex-direction is different in RN) https://reactnative.dev/docs/flexbox

raspasov 2021-04-26T03:45:33.311500Z

The nice part of this guide is that it’s structured in order of importance; I.e. make sure you understand :justifyContent and :alignItems first

phronmophobic 2021-04-26T18:22:26.314700Z

What methods and tools do people use to explore medium size clojure data (small enough to fit in memory, large enough to be unwieldy for pprint)? Some options I can think of: • portal • REBL • reveal • graphviz • pprint • treemaps • foldable/collapsible trees

borkdude 2021-04-27T09:12:20.323800Z

oh I should try that!

Ben Sless 2021-04-27T10:43:48.324400Z

It's one of those "I don't know how I lived without it until now" things

Ben Sless 2021-04-27T10:44:12.324600Z

You can even inspect opaque reified objects and see all the values they close over

Jan K 2021-04-26T18:27:31.314800Z

I still like this oldie https://github.com/timmolderez/inspector-jay

👍 1
👀 1
borkdude 2021-04-26T18:52:26.315300Z

Usually I output to a .edn file and inspect it programmatically (with bb, jet or just in a JVM REPL)

phronmophobic 2021-04-26T18:55:59.315500Z

@borkdude, are there any typical patterns you use when you programmatically inspect (eg. keys, vals, some other common functions)? I do use the repl to programmatically inspect, but it can be annoying when you try to look at a value and get a mountain of text.

borkdude 2021-04-26T18:56:32.315700Z

I use keys a lot.

phronmophobic 2021-04-26T18:56:43.315900Z

Part of the reason I'm asking is that I'm considering building better tools for this use case.

borkdude 2021-04-26T18:57:17.316100Z

Note that there is also *print-length* and *print-level*

borkdude 2021-04-26T18:58:02.316300Z

Although that doesn't prevent printing long strings :/

👆 1
phronmophobic 2021-04-26T18:58:47.316700Z

and there are also some data shapes that circumvent those types of restrictions (eg. a 2d array of 10x10 elements)

borkdude 2021-04-26T18:59:28.316900Z

(subs (str x) 0 10) ;)

borkdude 2021-04-26T18:59:36.317100Z

(and then hope you don't get an NPE)

phronmophobic 2021-04-26T19:00:16.317300Z

I have:

(defn truncate [s n]
  (subs s 0 (min (count s) n)))

borkdude 2021-04-26T19:00:32.317500Z

yeah, but I'm usually too lazy to type that first ;)

phronmophobic 2021-04-26T19:02:24.317700Z

As part of trying to upgrade my work flow and tooling, I have a project that exposes a dev namespace where I can put dev utlities. eg.

(require 'dev) 
(dev/truncate s 20)
And I have a :dev alias that adds the project to my classpath.

borkdude 2021-04-26T19:03:56.318Z

Isn't this what people use the 'user namespace for? I've never really used it as such though

borkdude 2021-04-26T19:04:18.318200Z

oh but you add a lib, yeah, makes sense

phronmophobic 2021-04-26T19:05:02.318400Z

yea, I guess I could have my dev project add the utilities to 'user. still experimenting.

borkdude 2021-04-26T19:05:46.318600Z

You could be very evil and intern those vars into clojure.core which is how some tools achieve "injections"

borkdude 2021-04-26T19:05:51.318800Z

so then they are available in every ns

borkdude 2021-04-26T19:06:21.319Z

it can be hard to forget about deleting them before deploying etc probably

borkdude 2021-04-26T19:06:49.319300Z

although clj-kondo will warn you that its an unknown var

phronmophobic 2021-04-26T19:07:55.319600Z

yea, I've thought about that. having a very short ns is also pretty close.

seancorfield 2021-04-26T19:49:34.319800Z

A +1 for Reveal in general. pprint if I need it in logging.

2021-04-26T20:05:23.320Z

I often just sit at the repl with (def x some-big-data) and build a big arrow expression

☝️ 1
2021-04-26T20:05:40.320200Z

(-> x :foo keys)

2021-04-26T20:05:49.320400Z

(-> x :foo :bar type)

2021-04-26T20:05:59.320600Z

(-> x :foo :bar first)

2021-04-26T20:06:03.320800Z

etc

walterl 2021-04-26T20:06:11.321Z

Reveal