martes, 26 de mayo de 2020

Perl & Ruby do APL

So recently I saw a couple of posts that mention APL approaches to problems. The cool thing is that I saw those in a Perl related forum and a Ruby one.

- https://www.youtube.com/watch?v=UBl6t7zNfwE
- https://zverok.github.io/blog/2020-05-16-ruby-as-apl.html

jueves, 7 de mayo de 2020

Temporally Quaquaversal Virtual Nanomachine

I've enjoyed this talk so much I'm gonna post it here: Great as always, Damian Conway doing his particular 'GEB' on physics and programming: https://www.youtube.com/watch?v=ORjyXcLDd9M


Also, Keep Ruby Weird 2018, the same as !!Con, very interesting talks.
https://www.youtube.com/watch?v=v32XHJxljKI&list=PLE7tQUdRKcyaxIbXihF5bRdMumqVtGrT4&index=5

miércoles, 6 de mayo de 2020

Recreational vimming


When I have to do some sort of development or file editing inside a container, I usually have vim there but not emacs. docker-tramp is very useful but sometimes I just want to edit there.
The .vimrc I have in my container has only one line (I can't function without it):
imap jk 
Let's say I'm editing a lua script. After I've saved and c-z and run the file several times, I realize what I want is to have is:
:nore ,rr :!lua %
Then I can test it much quicker. But I realize I'm always :w before,rr. Colon, up, and modify the line to:
:nore ,rr :w:!lua %
Accidentally I quit vim and realize I have to set that again, so I go to my vimrc and add this:
nore ,rr :w:!lua %
nore ,vimrc :e ~/.vimrc
nore ,so :source ~/.vimrc
With this I have a pretty nice way to iteratively finetune my config. After some lua editing, the only thing I need to do often (and not provided by the excellent vim default functionality) is to comment and uncomment code.
nore ,cc :s/^/--/
nore ,cu :s/^\( *\)--/\1/
This gives normal and visual comment/uncomment functionality, and enough interactivity to build your ad-hoc shortcuts as you go.
This is an example that just happened yesterday, and the nice thing is that it grows and flows from 0. I couldn't get to this amount of functionality from an emacs -Q in such a small time. It has such a different feeling to configuring emacs. It reminds me of my Perl days, it's fun and quick. And the language is very orthogonal, with very few abstractions. It's the APL of text editing.

This is my take on this reddit thread. 

domingo, 26 de abril de 2020

What's in a git merge conflict?

There's something that was bothering me lately about git conflicts:

How come git knows which side is which, and when there is a conflict or where there isn't?

I have the notion of the common ancestor to base the versions off of, but when people do heavy cherry-picking (which is mostly a single branch operation).... how come git reconciles the contents?

Well... as usual, things in git are..... simpler?

https://stackoverflow.com/questions/4920885/what-constitutes-a-merge-conflict-in-git





lunes, 13 de abril de 2020

John Conway's Game of Life

John Conway passed away recently, so let's look at his Game of Life from the APL/J/K perspective.

https://www.jsoftware.com/papers/eem/life.htm
https://news.ycombinator.com/item?id=22845249
https://www.youtube.com/watch?v=a9xAKttWgP4

And a recent ode to J, that explains the first prototype that Arthur Withney and Ken Iverson wrote in an afternoon. I remember having great fun deciphering it 3 years ago on the flights back and from $WORK at that time, and people staring at me reading that printed code and WTFing.

viernes, 3 de abril de 2020

Indeterminate dimensionality

From: http://www.wall.org/~larry/natural.html
 
Scientists like to be able to locate things by giving a ``vector'', that is, a list of coordinates in a space of known dimensionality. This is one of the reasons they like orthogonality--it means the various components of the vector are independent of each other. Unfortunately, the real world is not usually set up to work that way. Most problems, including linguistics problems, are a matter of ``getting from here to there'', and the geography in-between has a heavy influence on which solutions are practical. Problems tend to be solved at several levels. A typical journey might involve your legs, your car, an escalator, a moving sidewalk, a jet, maybe some more moving sidewalks or a tram, another jet, a taxi, and an elevator. At each of these levels, there aren't many ``right angles'', and the whole thing is a bit fractal in nature. In terms of language, you say something that gets close to what you want to say, and then you start refining it around the edges, just as you would first plan your itinerary between major airports, and only later worry about how to get to and from the airport.

lunes, 30 de marzo de 2020

Simplicity is its own reward

This is 3 top level hackers discussing about a patch that Stefan proposed to an already solved problem (I guess originally by Daniel, or someone else, but Daniel is anyway the father of the pdump feature).

Amazingly classy and to the point. All 3. I'm learning so much reading this maillist. And still a lot to learn.

Bravo, and thanks.


Stefan Monnier: >> Any objection?
>
Eli Zaretskii: > What are the advantages?  The original problem is solved, and
> everybody agreed that having a dead buffer in the pdumped area is
> nothing we should bother about.
>

Daniel Colascione: With Stefan's patch, Emacs is simpler. Simplicity is its own reward.

Original thread: https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00922.html