domingo, 30 de julho de 2023

How Descartes did multiplication.

In the book "A Brief History of Analysis: With Emphasis on Philosophy, Concepts, and Numbers, Including Weierstraß' Real Numbers", by Detlef D. Spalt, he describes how Descartes would multiply 2 times 3.

quinta-feira, 9 de dezembro de 2021

Bugging out the tech overlords' information dystopian landscape

I'm increasingly skeptical of any software solution for bugging out the tech overlords' information landscape. Look at Signal selling out - looks so fresh at first but, take a closer look, and what do you see? F-ing Cayman Islands.

The future belongs to owning your hardware. Solutions like LoRa, or whatever else is coming up next (things scale up, but also down - people forget that). With all the risk that it entails: more noise, networks of truthyness, networks of fakeness. One's truth is the other networks falsehoods. All decentralized. That is an inevitable side-effect. Otherwise we are back to the No Free Lunch Theorem. Right now, we don't own our own information.

What's in your bug out bag?

Way to go, Signal!

This might be outdated, but I just learned about this today:

https://www.stephendiehl.com/blog/signal.html
"Allegedly the controlling entity prints 250 million units of some artificially scarce trashcoin called MOB (coincidence?) of which the issuing organization controls 85% of the supply. This token then floats on a shady offshore cryptocurrency exchange hiding in the Cayman Islands or the Bahamas, where users can buy and exchange the token. The token is wash traded back and forth by insiders and the exchange itself to artificially pump up the price before it’s dumped on users in the UK to buy to allegedly use as “payments”.

I tried, but it really sucked.

sábado, 4 de dezembro de 2021

FORTH stack notation in code could be better

Consider the following WORD called TABLE for accessing entries on a table (all examples from: The Complete Forth, by Alan Winfield, Sigma, 1983): First, let's create the table:

CREATE MYTABLE -10 , -5 , 0 , 5 , 10 ,

This, of course, used the comma WORD "," (reserve one cell of data space and store x in the cell). Now, we can define a TABLE@ WORD:

: TABLE@ 1- 8 * MYTABLE + @ ;

We'll explain this shortly. Now, a cell, in Forth, is a one 8-bit byte on most systems (here, I'm using gforth). So, if we're advancing on the memory layout of the table, we'll be moving 8-bits at a time. Here's what using TABLE@ looks like:

5 table@ . 10  ok
4 table@ . 5  ok
3 table@ . 0  ok
2 table@ . -5  ok
1 table@ . -10  ok

Now, the usual way to document the stack notation would be:

: TABLE@ 1- 8 * MYTABLE + @ ; ( n1 -- n2 )

which is pretty much usual in what regards us gaining insight in how the thing works. Winfield proposes a better notation:

: TABLE@

     1-       ( n -- n-1 - subtract one from index )

     8       ( n-1 -- n-1 8 - push cell size value onto the stack )

     *       ( n-1 2 -- offset - multiply to give offset )

     MYTABLE      ( offset -- offset addr - fetch start address of MYTABLE )

     +       ( offset addr -- offset+addr - add offset )

     @       ( offset+addr -- n - fetch value required )

;

Let's face it, that is a much better way of documenting the stack effects on Forth code. You can see that it begins with a number, and ends with a number, but simply documenting it as "( n1 -- n2 )" says nothing about how the code works. In this Winfield notation, the 'stack after' becomes the the 'stack before' in the next line. He defined his experienced on using this way of notating Forth code "invaluable" for complex stack manipulations. It's pretty clear why, and it makes for very understandable Forth code.

sábado, 24 de abril de 2021

Programming language dialects - in Lisp, ML, but not in Python

One of the more unusual features of Lisp is that it supports dialects.
-- Rich Hickey


That really is something to think about when it comes to programming languages.

I would add that the ML family (as in "meta-language", not "machine learning") also has dialects: SML (Standard ML), OCaml, F# (now an official on the Microsoft stack)

Like, it can't be said that C++ is a "dialect" of C...What is the dialect of Python, for example?

quinta-feira, 22 de abril de 2021

A course on Computational Reflection and Smalltalk

Computational Reflection and Context-Oriented Programming 3–9 July 2012 Milan, Italy Uses Pharo. It's here

There's no Object above the ProtoObject

There's nothing above the ProtoObject. Above the ProtoObject is nil. Nothing is above the ProtoObject. What I just wrote seems paradoxical.