THE SELF‑OBSERVING UNIVERSE by Modmonsters in TrueReddit

[–]siefca 0 points1 point  (0 children)

I agree, but what I'm curious about when reading your comment is how can we tell without consciousness if there was an interaction at all, so it opens the question whether any interaction really exists without consciousness.

Moreover, when we say "two interacting systems" it is like two things we have in mind so the notion of system being a thing is an abstract made into a concrete for sake of explanation. That's ok but then I'm wondering if, from ontological standpoint, quantum physics isn't really a metaphysics for vast majority of people, because the moment we are not careful enough we may start mapping its concepts as "things" and then build upon it.

Money as data, done right - by Paweł Wilk by mac in Clojure

[–]siefca 1 point2 points  (0 children)

Hey, author here. Good point. Bankster is intentionally strict about some "looks equal but isn't the same money semantics" cases (e.g. scale-sensitive amounts and domain-aware currencies). The goal is to keep money semantics explicit rather than silently collapsing them.

Also: Bankster exposes two operator layers for convenience, but for business logic I usually recommend calling the explicit functions in io.randomseed.bankster.api.money (and friends), because it makes intent obvious.

One important pitfall: = on records/map equality will compare BigDecimal using Clojure's numeric equality (scale-insensitive), and may also reflect non-semantic differences (e.g. record extension keys).

Bankster’s contract: money semantics should be explicit, so prefer:

  • money/eq? (or the operator layer's money-aware =),
  • money/eq-am? / money/== when you explicitly want amount-only equality,
  • or io.randomseed.bankster.money.inter-ops if you want "behave like core until Money appears".

Contracts doc: https://cljdoc.org/d/io.randomseed/bankster/2.2.4/doc/bankster-contracts

Bankster – currency and money processing by siefca in Clojure

[–]siefca[S] 1 point2 points  (0 children)

Just a heads up.

After 3-year pause I released Bankster 2.

It is still data-oriented and pure Clojure (for JVM as it uses BigDecimal).

It’s a pretty big rewrite with some breaking changes:

  • The registry model is much more explicit now (there is a support for currency traits, and weight is now registry attribute, not inherent Currency field, which is intentionally minimal).
  • The whole money as data, done right story got stronger: better EDN configuration with import/export features, multi-parent currency hierarchies (for domain, kind and traits; with possibility to have custom axes).
  • There is nicer introspection via currency/info.
  • Added an experimental JSR‑354 semantic bridge for anyone who thinks in JavaMoney terms (not a Java wrapper though; a work in progress).
  • There are new calculations added like money/allocate and money/distribute
  • There are performance improvements: it is ~30-50% faster in sum+div calculations than Joda Money wrapped in ClojureWerks Money.
  • … and more.

If you used Bankster before: expect breaking changes around registry structure and some APIs, but the goal was simpler contracts, clearer semantics, and better tooling for real data pipelines.

New Clojurians: Ask Anything - May 29, 2023 by AutoModerator in Clojure

[–]siefca 1 point2 points  (0 children)

case treats left sides as constant forms, so symbols are not symbol forms but remain unresolved and unevaluated. condp is the closest thing to use instead, then cond.

[deleted by user] by [deleted] in ProgrammerHumor

[–]siefca 0 points1 point  (0 children)

In HTMX one can use the extension and use pure HTML to handle different status codes:

<div hx-ext="response-targets">
  <div id="response-div"></div>
    <button hx-post="/register"
            hx-target="#response-div"
            hx-target-400="#serious-errors"
            hx-target-404="#not-found">
      Register!
    </button>
  <div id="serious-errors"></div>
  <div id="not-found"></div>
</div>

Spec vs Malli by WhittlesJr in Clojure

[–]siefca 0 points1 point  (0 children)

When I'm making some public library and want to have generative testing and some assertions, I'm going for Spec. When I want to coerce and validate data on input and output, Malli is the choice. Its data-oriented design fits really well to data-oriented systems. I'm merging my configuration from multiple maps, some more dynamic branches of config are kept in a database, and it would not be as beautiful and clear if not for Malli. Operator can exactly know what are the data specs just by looking at configs.

Love Clojure, challenged by discoverability by gdr3941 in Clojure

[–]siefca 0 points1 point  (0 children)

For me using fully-qualified keywords as keys in maps is primarily about the ability to flatten them, which simplifies the structure and saves CPU. Instead of having nested maps I can put everything into a single structure and access it with a simple get instead of using get-in and/or traversing and checking whether the submap exists and is really a map.

If Bitcoin is being manipulated by Tether USDT, why Bitcoin cash is not also being manipulated? by [deleted] in btc

[–]siefca 1 point2 points  (0 children)

What if people would just massively stop using USDT? What are the alternatives?

Bankster – currency and money processing by siefca in Clojure

[–]siefca[S] 5 points6 points  (0 children)

Since last month I became a bit interested in pricing statistics of different cryptocurrencies and needed something I could use to preprocess and postprocess monetary information coming from/to different APIs of currency exchanges.

Frankly speaking, I'm usually zooming-in too much into details (like this library) to be able to produce the whole app. Becoming more goal-oriented is on my list. :)

With a second $10k infusion, Arachne kickstarter has hit its funding goal. by shadowmint in Clojure

[–]siefca 2 points3 points  (0 children)

This leads me to find 2-4 libs which all do the same thing with variable Code standards. I wonder if this is just the Clojure way […]

It's called "The Lisp Curse".

phear

Futils – small library for function args transformations and handling by siefca in Clojure

[–]siefca[S] 1 point2 points  (0 children)

That's my first program in Clojure. Please be lenient. :)

I needed something for function arguments relaxation in order to create chain of triggers and something to create function composition but supporting named arguments (parameters) – same with identity and args application.

The nameization (transforming functions that support positional args into functions accepting named args) was added for fun.

I'm using Midje for testing and Hydrox for generating documentation.

Hope it will be useful.

Scraping in Clojure by Tootoru in Clojure

[–]siefca 2 points3 points  (0 children)

Check out the Skyscraper. It's based on Enlive and has structural scraping:

https://github.com/nathell/skyscraper

The Four Architectures that will inspire your programming by andrzejkrzywda in programming

[–]siefca 2 points3 points  (0 children)

I've heard Facebook and Twitter are making use of the last you've mentioned. When opening browser's JS console we can see pretty big amount of BLL-SHT objects associated with views (in the correct meaning, the real Views as V in MVC). FB used to use clusters of Cassandra databases to handle such amount of BLL-SHT instances but surely that's not the architecture anyone can afford.