// Don't do this:
const badHoleyArray = new Array(10);
Will be forevermore marked as HOLEY (cannot be undone by filling the holes!) and preclude engine's optimizations for arrays.
// Don't do this:
const badHoleyArray = new Array(10);
Will be forevermore marked as HOLEY (cannot be undone by filling the holes!) and preclude engine's optimizations for arrays.
idea for meme (stages revolutions)
avoid making yourself less employable through evaluation of self hypocrisy, first.
see previous.
then avoid rhetorical rationaliz...
tldr be proactive and build it already. also commit to dedication of writing consistently since the destructive interference between time spent coding and creatively, constructively writing seems inescapable otherwise.
There should be a macro for the canonical entropy symbol (searching entropy won't match any elements of all blocks) as well as a "fun" /(or-and with colorful emoji) symbol. | |
Anyone have any ideas on what such an ideogram might look like? |
/* | |
Always interesting when while working on a specific problem resolution, | |
coincidentally the circle gets squared. In this case, while building one thing, | |
it lead down the rabbit hole of async generators which surveyed everything from | |
https://www.dreamsongs.com/WorseIsBetter.html to https://okmij.org/ftp/Streams.html | |
and much, much more until it led back to an SO post that had a related SO post that | |
was quite literally almost the same thing I had originally set out to build (!). | |
I should probably compile all the bookmarks for any potential shared future benefit, | |
but note this particular generator function is almost *entirely* modeled on the work of Redu from: |
// Using zx to manage background redis server (for development purposes mostly, and doesn't require sudo (except prior to, when disabling redis-server autoboot initially)). | |
// ( cli user input loop logic via zx question likely suggests its own reusable component TBD; also something similar for zx error handling). | |
// notice while redis-server cmd is used to start, to cleanly stop redis-cli shutdown is used. Avoids manipulating systemctl (as I saw on several guides) which when doing so tended to spontaneousily crash my system). | |
// in reverse order for readible coherence, all relative directories flattened for simplicity. | |
// assume npm esm project... with a script defined: | |
// npm script: "redis-server": "node index.js" (see below) |
They can be originally found at BNT-2: Invoice Canister #2.
This was created to make it easier to know what needed to be done as to verify everything has been completed.
Example A (**verbose in-method-body comments**) | |
public shared ({ caller }) func verify_invoice( | |
{ id } : Types.VerifyInvoiceArgs, | |
) : async Types.VerifyInvoiceResult { | |
switch (getInvoiceIfAuthorized(invoices.get(id), caller, #Verify)) { | |
// Caller is not authorized or invoice not found. | |
case (#err err) return #err(err); | |
// Caller is creator or on invoice's verify permissions list. | |
case (#ok invoice) { |
You can drop the ICP.MockLedger if you want to skip importing the Aviate Labs libraries and just use it for ICRC1. | |
MockTokenLedgerCanisters.mo... | |
``` | |
import Array "mo:base/Array"; | |
import Blob "mo:base/Blob"; | |
import Buffer "mo:base/Buffer"; | |
import Debug "mo:base/Debug"; | |
import Error "mo:base/Error"; | |
import HashMap "mo:base/HashMap"; |
uses zx as ilocal project dependency; zx can also | |
be used by including its shebang at the beginning | |
of the mjs using it--in that case can be run by | |
> chmod +x file.mjs | |
> zx file.mjs | |
⸎⸖------------------------------------------------------------------------⸖⸎ | |
./zx-scripts/generate_icrc1_deployment_literal.mjs: | |
<start of file> |
What is objected orientated programming? | |
"Object oriented programming is a technique of writing code that encapsulates complexity by enumerating data structures with an intrinsic implementation so that they can generally interface." |