This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-04
Channels
- # aleph (23)
- # announcements (1)
- # babashka (21)
- # beginners (70)
- # biff (3)
- # cider (8)
- # clj-kondo (45)
- # clj-yaml (9)
- # clojure (69)
- # clojure-europe (82)
- # clojure-nl (1)
- # clojure-norway (2)
- # clojurescript (34)
- # conjure (19)
- # core-typed (6)
- # cursive (2)
- # events (5)
- # fulcro (55)
- # honeysql (1)
- # integrant (18)
- # jobs (1)
- # lsp (124)
- # malli (10)
- # meander (1)
- # off-topic (26)
- # polylith (8)
- # reagent (7)
- # releases (1)
- # remote-jobs (1)
- # sci (2)
- # shadow-cljs (19)
- # squint (5)
- # vim (17)
- # xtdb (31)
:thinking_face: I seem to vaguely recall something that allowed one to run datalog queries over clojure codebases
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"
> I seem to vaguely recall something that allowed one to run datalog queries over clojure codebases I think this is/was kibit
this is what I was thinking of https://github.com/Datomic/codeq
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.
> Why do we have so few problems with the global and mutable state that is the database ...
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.
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?
Tried my fitness pal?
You can scan foods and it will tell you everything inside
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.
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.
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.
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.
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.
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"
I'm happy to see NoRedInk having succesess, but is there anything explicitly about Clojure?
(and Kubernetes getting official support for user namespaces? AT ... LAST! Now I only need to find an idiot proof distro ^_^)