@autokludge@programming.dev avatar

autokludge

@autokludge@programming.dev

This profile is from a federated server and may be incomplete. Browse more on the original instance.

autokludge,
@autokludge@programming.dev avatar

I can already seen it, you chipping a tooth and splitting a lip because you figured it would look cool to nun-chuck the food into your mouth.

weiming, to Logseq
@weiming@mapstodon.space avatar
autokludge, (edited )
@autokludge@programming.dev avatar

I did a lot of tinkering around recently to get an advanced query working for me which ended up being quite tricky to work through. I have Project pages (eg [[12335]] ) and on journal pages I have job note blocks for specific jobs ie #12335 Notes with a :job property so the block title can change if needed. There are multiple levels of notes / subnotes / tasks here and I was attempting to do the below query before I learned or-join, but the query was fragile & failing if tasks weren’t at a specific indent level. I ended up spending a Sunday afternoon deep diving into this stuff to figure this out.


  • As I understand it, the datomic data model is just a HUUGE list of ‘datoms’ which are super basic [element-id|attribute|value] rows for everything.
  • There is some concept of ‘unifying’ which is a variable that appears twice in a :where represents the same value across all clauses.
  • Something like (or-join) allows you to control this unification to selected sub items.
    • My visualization on the query is a graph of conditions
    • The :find (?task) element is absolutely required
    • There are ‘facts’ you want to satisfy [(get ?prop :job) ?job] [(contains? #{“TODO” “WAITING” “DOING”} ?marker)].
    • ?task → ?prop (through or-join) → ?prop must contain :job with value :current-page
    • . ↳ ?marker -> must be one of TODO / WAITING / DOING

<span style="color:#323232;">#+BEGIN_QUERY
</span><span style="color:#323232;">{
</span><span style="color:#323232;">  :title [:h3 "📅 Outstanding Tasks"]
</span><span style="color:#323232;">  :inputs [:current-page]
</span><span style="color:#323232;">  :query [
</span><span style="color:#323232;">    :find (pull ?task [</span><span style="font-weight:bold;color:#a71d5d;">*</span><span style="color:#323232;">])
</span><span style="color:#323232;">    :in $ ?job
</span><span style="color:#323232;">    :where
</span><span style="color:#323232;">      (or-join [?task ?prop]        </span><span style="font-style:italic;color:#969896;">; only care that ?task and ?prop are 'unified' with rest of clauses
</span><span style="color:#323232;">       (</span><span style="color:#62a35c;">and
</span><span style="color:#323232;">        [?task </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">page ?page]
</span><span style="color:#323232;">        [?page </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">properties-text-values ?prop]    </span><span style="font-style:italic;color:#969896;">; does page have :job property?
</span><span style="color:#323232;">        )
</span><span style="color:#323232;">       (</span><span style="color:#62a35c;">and
</span><span style="color:#323232;">        [?task </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tp]
</span><span style="color:#323232;">        [?tp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">properties-text-values ?prop]    </span><span style="font-style:italic;color:#969896;">; does task parent have :job property?
</span><span style="color:#323232;">        )
</span><span style="color:#323232;">       (</span><span style="color:#62a35c;">and
</span><span style="color:#323232;">        [?task </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tp]
</span><span style="color:#323232;">        [?tp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tpp]
</span><span style="color:#323232;">        [?tpp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">properties-text-values ?prop]    </span><span style="font-style:italic;color:#969896;">; does task grand-parent contain :job prop?
</span><span style="color:#323232;">        )
</span><span style="color:#323232;">       (</span><span style="color:#62a35c;">and
</span><span style="color:#323232;">        [?task </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tp]
</span><span style="color:#323232;">        [?tp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tpp]
</span><span style="color:#323232;">        [?tpp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">parent ?tppp]
</span><span style="color:#323232;">        [?tppp </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">properties-text-values ?prop]    </span><span style="font-style:italic;color:#969896;">; does task great-grand-parent contain :job prop?
</span><span style="color:#323232;">        )
</span><span style="color:#323232;">      )
</span><span style="color:#323232;">      [(</span><span style="color:#62a35c;">get </span><span style="color:#323232;">?prop </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">job) ?job]                           </span><span style="font-style:italic;color:#969896;">; does one-of ?props from above contain :job <%current page%>?
</span><span style="color:#323232;">      [?task :block/marker ?marker]                                   
</span><span style="color:#323232;">      [(</span><span style="color:#62a35c;">contains</span><span style="font-weight:bold;color:#a71d5d;">? </span><span style="color:#323232;">#{</span><span style="color:#183691;">"TODO" "WAITING" "DOING"</span><span style="color:#323232;">} ?marker)]  </span><span style="font-style:italic;color:#969896;">; ?task:block/marker must match one of these
</span><span style="color:#323232;">  ]
</span><span style="color:#323232;">  :table-view? false
</span><span style="color:#323232;">  :result-transform (</span><span style="font-weight:bold;color:#a71d5d;">fn </span><span style="color:#323232;">[result]
</span><span style="color:#323232;">      (</span><span style="color:#62a35c;">sort-by </span><span style="color:#323232;">(</span><span style="font-weight:bold;color:#a71d5d;">fn </span><span style="color:#323232;">[m]
</span><span style="color:#323232;">                (</span><span style="color:#62a35c;">get </span><span style="color:#323232;">m </span><span style="font-weight:bold;color:#a71d5d;">:</span><span style="color:#323232;">block</span><span style="font-weight:bold;color:#a71d5d;">/</span><span style="color:#323232;">marker)) </span><span style="font-weight:bold;color:#a71d5d;">> </span><span style="color:#323232;">result
</span><span style="color:#323232;">      )
</span><span style="color:#323232;">      )
</span><span style="color:#323232;">  :breadcrumb-show? false
</span><span style="color:#323232;">  :collapsed? false
</span><span style="color:#323232;">}
</span><span style="color:#323232;">#+END_QUERY
</span>
autokludge,
@autokludge@programming.dev avatar

Not sure recently, had the same issue and busted 2 deathadders within 12 months of purchase. The clicker had a little stem to push the switch which cracked off. Ended up getting a zowie next and haven’t had any issues.

autokludge,
@autokludge@programming.dev avatar

Confusing by-line for link goes to an older video by Louis, actual yt link for video is www.youtube.com/watch?v=7yo8av6w4sc

autokludge,
@autokludge@programming.dev avatar

At the time iPhone 1 didn’t seem like anything smarter than an iPod that could take calls. I was hyped over the Nokia 770 and eager to see what else would come out with Meamo OS. It took till mid 2008 until iPhone 3G and iOS 2 (and app store) were released.

autokludge,
@autokludge@programming.dev avatar

Sure, ultimately I dismissed it at the time as a fancy iPod and chose a Nokia.

autokludge,
@autokludge@programming.dev avatar

Nah, just using one of those handy pens with blue, black & 2 red ink. ;)

autokludge,
@autokludge@programming.dev avatar

Pretty sure the strong smell of ‘lynx’ or ‘axe’ style spray just enhances the repulsiveness of BO stank.

autokludge,
@autokludge@programming.dev avatar

That’s a continuation of TA Spring? Neat, played that a looong time ago.

autokludge,
@autokludge@programming.dev avatar

I think there is a similar effect with speed-reading v slow-reading. Slow reading gives me time to mull over and digest what I’m reading, while speed can be good to skim for information.

autokludge,
@autokludge@programming.dev avatar

Haven’t done this type of optimizing in a long time, I had a quick look at the network graph for your front page (F12 dev tools in desktop browser), my understanding is it looks like you are getting blocked from loading additional resources (fonts + background) until your style sheets are fully read --pink line is document loaded i believe.

It may be worthwhile to experiment with adding some preload links to the html template? or output? like below and assessing if it makes things faster for you.

<link rel=“preload” as=“image” href=“https://volcanolair.co/img/bg1-ultracompressed.webp” fetchpriority=“high”>

<link rel=“preload” as=“font” href=“https://volcanolair.co/fonts/Inter-Regular.woff2”>

<link rel=“preload” as=“font” href=“https://volcanolair.co/fonts/Inter-Bold.woff2”>

https://programming.dev/pictrs/image/8bf72575-dafd-4aff-8896-700a4ce4e176.png___

autokludge,
@autokludge@programming.dev avatar

Why do you want to exit? Just :terminal

autokludge,
@autokludge@programming.dev avatar

While having a quick look through old news:

From June 2021 (v0.16) (gleam.run/…/v0.16-gleam-compiles-to-javascript/#h…)

Much like the Erlang compiler backend this new JavaScript backend outputs human readable and pretty printed source code. It is now included with the compiler and does not require any extra components to be installed to use it.
Rather than attempting to replicate a subset of Erlang’s actor model Gleam uses the standard promise based concurrency model when targeting JavaScript. While this may be disappointing for some, it means that there is no additional runtime code added. This keeps bundle size small and makes it so code written in Gleam can be called like normal from languages such as JavaScript and TypeScript.

Jan 2024 v0.34 (gleam.run/news/v0.34-multi-target-projects/…) mentions some additional work done to enable multi target projects such as Lustre

autokludge,
@autokludge@programming.dev avatar

As a design/drafter – I design to ‘look right’ which is probably overkill. Hopefully that headroom helps with the 300lb ape factor.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • kavyap
  • DreamBathrooms
  • tacticalgear
  • magazineikmin
  • vwfavf
  • Youngstown
  • ngwrru68w68
  • ethstaker
  • slotface
  • rosin
  • mdbf
  • thenastyranch
  • PowerRangers
  • anitta
  • modclub
  • Durango
  • cubers
  • osvaldo12
  • GTA5RPClips
  • everett
  • khanakhh
  • InstantRegret
  • Leos
  • tester
  • normalnudes
  • cisconetworking
  • megavids
  • All magazines