Fork me on GitHub
#off-topic
<
2022-10-04
>
lilactown06:10:52

:thinking_face: I seem to vaguely recall something that allowed one to run datalog queries over clojure codebases

Ben Sless07:10:32

Dunno how baked it is but tools analyzer has a ast->eav walker

Geoffrey Gaillard07:10:31

We have a DSL that compiles to clojure. It forms a DAG. We use datascript to represent it. The entity API makes it easy to navigate. Compiler passes are mostly: query -> find new facts -> db-with. Exemple of passes: • "For all global references in form, resolve the fully qualified name" • "Find all instances of symbol X in form, unless it's a lexical binding, and replace it by Y" • "Find all functions without a known spec, then try to resolve it" • "Hoist lexical bindings if they can be hoisted" • "Sort lexical bindings by their dependencies, in their respective scope"

borkdude07:10:19

> I seem to vaguely recall something that allowed one to run datalog queries over clojure codebases I think this is/was kibit

flowthing05:10:14

It is currently not possible to run codeq, unfortunately (as far as I’m aware).

respatialized13:10:34

https://tantaman.com/2022-08-23-why-sqlite-why-now.html > Why do we have so few problems with the global and mutable state that is the database but so many problems with global and/or mutable state that exist in-memory? > It comes down to: > • The primitives we have to express mutations > • Support for transactions against in-memory data structures > • Support for constraints on in-memory data > If our programming languages had support for ACID transactions against in-memory data then entire classes of problems related to mutable state (in particular, those of observing partial states) would vanish. Shout-out to a problem that Clojure's design solved intentionally in an interesting discussion of adding CRDT replication to sqlite.

ghadi16:10:20

> Why do we have so few problems with the global and mutable state that is the database ...

ghadi16:10:24

wat

☝️ 2
andy.fingerhut19:10:44

Or perhaps stated more explicitly, one of the reasons for creation of Datomic was exactly that many people would disagree with the premise that application developers have few problems with mutable databases, because many developers have many difficulties dealing with them correctly.

vemv15:10:20

Anyone know of an app where I can tell it what I ate today and in return I know what my vitamins/minerals balance was?

Kevin Izevbigie15:10:43

Tried my fitness pal?

Kevin Izevbigie15:10:57

You can scan foods and it will tell you everything inside

vemv15:10:33

Is that different from checking out the nutrition facts in the label?

Kevin Izevbigie15:10:10

mmmm good question. I believe when I used the premium version a few years ago it went pretty deep. You can download the free version, scan one thing and see if it;s what you are looking for. I know they have many lots of improvements since I used it.

👀 1
Rupert (All Street)15:10:07

I would imagine that portion size and recipe would makes it hard to provide estimates without a huge error margin? e..g if you just ate a lasagne - how big was the portion and what ratio was white sauce vs meat vs pasta. Even an AI app interpreting a photo might not be able to determine these.

👍 1
respatialized16:10:29

https://macrofactorapp.com/ Mostly focused on macronutrients -protein/carbs/fats (the app was developed to help with training for weightlifters), but my understanding is that they have much more comprehensive and well-curated nutritional information than similar apps like MyFitnessPal. Costs $ for a subscription, though.

Tomasz Kontusz17:10:02

I'm using http://cronometer.com/ (the whole UI is a mistake, but I'm used to it) - it has good data for generic food items from a few databases, plus it's own food label database. But overall the problem is: how do you know what is in the food? Even for simple items, like vegetables, micronutrients will differ between each piece.

vemv17:10:42

thanks for the suggestions! I'll take a tour across the apps :) yeah it's a tricky problem to simply delegate to an app. I might end up simply buying a food scale. I was lazy about it but on second thoughts, just doing it from time to time should suffice to give me actionable feedback.

respatialized18:10:26

You need a food scale for any of the apps to be useful anyway!

💡 1
vemv18:10:20

the way I imagined it was "I'm 62kg, I ate a normal-sized portion of <foods>. What nutrients did I get?" I reckon that yes, the percentages could easily be wildly off but you still get some useful insights e.g. "you missed micronutrient x today"

Tomasz Kontusz21:10:46

I'm happy to see NoRedInk having succesess, but is there anything explicitly about Clojure?

Tomasz Kontusz21:10:26

(and Kubernetes getting official support for user namespaces? AT ... LAST! Now I only need to find an idiot proof distro ^_^)