Skip to content

Instantly share code, notes, and snippets.

@raiph
raiph / BQNListOp.md
Created June 13, 2023 02:49 — forked from Xliff/BQNListOp.md
To Raku - The BQN List Operator

The BQN list operator can readily transfer into Raku. It's basically the same as Raku's list operator: ,. There is a small devil in the detail and that can be illustrated in the following example:

multi sub infix:<> ($a, $b) { 
  infix:<,>($a, $b) 
}

say 1‿2‿3; # ((1 2) 3)
@raiph
raiph / .md
Created March 2, 2023 14:31
Rebuttal of "Message passing to shared stateful objects/actors/processes is still a form of shared state."

Message passing to shared stateful objects/actors/processes is still a form of shared state. You cannot "replace shared state with message passing".

(from http://lambda-the-ultimate.org/node/5504#comment-95421)

My understanding is that this is a profound misunderstanding of the actor model.

My understanding is that the actor model involves zero shared state. (That is, zero shared state between actors. An actor may or may not also not share state temporarily within itself (where itself is its current behavior), or temporally, between incarnations of itself (cf "Sussman and Steele ... concluded Actors were essentially closures that never return but instead invoke a continuation" from The History of Scheme" paper).)

The closest I currently see to anything that could be thought of as "state", but is not if you think about it, is an "address" that is rationally presumed to be the "mailbox" of some actor, or a "message" that is rationally presumed to encode some information. In reality neither is "state" bu

@raiph
raiph / .md
Created December 11, 2022 13:20
ChatGPT answer on StackOverflow to a Raku question (that of course wasted everyone's time, even if it was easy to spot)

To pipe in a string to a Raku program, you can use the echo command to output the string and pipe it to the Raku program. For example, if your Raku program is called my_program.raku, you can use the following command:

echo "my string" | raku my_program.raku

Alternatively, you can pass the string as an argument to the Raku program by using the -e option with the echo command, like this:

echo -e "my string" | raku my_program.raku
@raiph
raiph / .md
Created July 1, 2022 17:17
Dimash official YT channel subscriber count growth

​ @A moment with Musasia 😍

This comment is mostly just somewhere to store some info. It may well interest no one else but me.

In my above comment I wrote "His official YT channel had grown to about a million subscribers about a year ago. I think it's now approaching 2 million". I realized after I'd written it that I was quite unsure about the exact number a year ago. So I investigated. It turns out it is approaching 2M but was about 1.3M a year ago, not 1M. This comment corrects the record with the summary I just gave plus a ridiculous amount of detail below that will almost certainly interest no one but me.


Before I get to the hard data, let me say a bit about where I'm coming from.

@raiph
raiph / gist:ce552c18af72f9609eaef1c2eb39a2ba
Created June 29, 2022 14:36
Dame Debra James: final advice
Find a life worth enjoying
Take risks
Love deeply
Have no regrets
@raiph
raiph / .md
Created April 30, 2022 22:34
Longevity diet
@raiph
raiph / .md
Last active July 1, 2022 20:20
Nice looking (but complicated to code and not accessible for blind) footnoted links for Reddit, SO, GH gists. (View raw to see underlying markdown.)

To future me and any other readers:

  • The Reddit rendering (which you should see if you click the foregoing link) of this gist's underlying markdown hopefully renders the footnotes in the Reddit footnotes bullet below such that they look the same style as seen in the StackOverflow footnotes bullet of the GH gist rendering of this gist. I say "hopefully" in the sense they do look the same using my laptop as I write this in Feb 2022, and in the sense I'm hoping it'll remain that way. But of course things might look different on your system, and any of these platforms can change their rendering at any time.
  • Use this footnote approach if you like, but it's complicated, and, worse, probably horrible for the blind, and, worst of
@raiph
raiph / .md
Last active January 29, 2022 23:37
`quasi`

"a quasi is like a little templating language for the raku code"

Please consider choosing a word other than quasi. Using quasi introduces conceptual complexity that is unnecessary and, imo, harmful. Given that what it does is a "Transform of a syntax template" with the transform being "To AST", please consider one or more of ToAST, toAST, and/or toast, and perhaps encourage the lie-to-children simplicity of "template of AST".

@raiph
raiph / .md
Last active August 7, 2020 20:02
2009/2013 papers: The Power of Interoperability: Why Objects Are Inevitable

https://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf

https://www.cs.cmu.edu/~aldrich/papers/objects-essay.pdf

Let us first consider the theory of how modular extension facilitates software evolution. The need for a software system to support new, unanticipated implementations of an abstraction was discussed in Parnas’s seminal paper on the criteria to be used in decomposing systems into modules. Parnas’s argument has become a pillar of software design: nearly all software must change over time, so a software system should be decomposed in a way that hides (i.e. isolates) decisions that are likely to change. The implication is that when change comes, it can be accommodated by providin a new implementation of the abstraction captured by the module’s interface. So extension is important for facilitating software evolution. However, is the interoperability of extensions necessary in practice, beyond examples such as widgets?

What if that notion is applied to a PL -- or, more to the point, a metalanguage?