viernes, 10 de noviembre de 2017

asm and reverse engineering

I've been lately giving a shot to some assembler tutorials. Just because.

I never did any serious assembler, but when I was into reversing I was eating asm for breakfast, but from the read perspective.

In https://github.com/kidd/assembler-tutorials there are the few codes I wrote, either following tutorials, or walking random paths myself, using nasmx macros.

In windows, there's MASM and NASM, but MASM is not in GNU/Linux, so the option was NASM. It's nice that it gives me the same syntax I was used to in the old days using W32Dasm, ollydbg, soft-ice and friends.

Anyway, I've been looking at nasmX, which are a bunch of macros that lift assembler a bit. At least, allowing you to write with ifs, whiles, and "forgetting" about the calling conventions. Super cool!

Meanwhile, I've been also following some reverse engineering forums, and rediscovered RE a bit. A nice fuzzy feeling that many things are the same, but tooling changed (radare2 is a must in linux, and the learning curve is vim-like).  Still, I'm starting to do my first hacks on android using anbox, apktool, and jd.  very basic stuff, but nopping a few things and rerunning them in the mobile is already an achievement!

 As always, lots of resources, and not so much time to swallow them.

miércoles, 8 de noviembre de 2017

Finally publishing commit-msg-prefix.el

It's been a few months since I released commit-msg-prefix.
Just to remember a bit what was it about, I created a gif so that we all can relate again to it.


The user story is the following:

  • In your company/organisation, you have to follow some rule of prefixing all your commits with either a keyword (Add/Remove/Fix/Hotfix/Bump/Release) or an issue number, or something like that.
  • When you are about to commit that, you know what you just did (you should!), but you can't remember which particular issue number was that.
  • Then you go to jira/trello/github-issues/younameit and look for that and insert it.  
Usually, as it's been a long running issue, you have commits with that number, in your recent commit history, so an alternative to the last bullet point is to have a quick look at git log.

Well, commit-msg-prefix makes this automatically for you, so it shows the latest commits (filtered as you want), and lets you choose one (find-as-you-type provided by helm/ivy/ido), and inserts the first word of the commit.

Obviously, most of the relevant settings are configurable, so you can have support for fancier substitutions, or use mercurial logs.

The package itself is pretty simple, but it might be useful to others, and if it is, I'm happy to share it.  

I just issued the Pull Request for it to be in melpa, so more users can give it a try and I can test it a bit further. I hope it will be accepted  and will be available in melpa soon.

In the future, if it has some adoption, it might make sense to merge it into magit, but I don't want to bother magintainers when the idea is not widely tested yet.

Happy hacking!

martes, 7 de noviembre de 2017

So,... Here's Ivan Sutherland blowing your mind

Just by chance I stumbled upon an Ivan Sutherland's talk. And Listening to this guy is an enlightening experience.

The pace of his talk is calm but not slow, concrete but not obvious, and man.... he talks about history that he's lived in his own self.

For those who do not know who's Ivan Sutherland, he's the guy who invented sketchpad, where many of the concepts that today we give for granted, and some that we're just starting to develop now (most of it in the early sixties).  Here's the link to the sketchpad thesis, in case you want to read about it.

Btw, thesis supervisor: Claude E. Shannon.

Here's the talk. Give it a shot. Insight level: "Alan Kay".

miércoles, 18 de octubre de 2017

rust + emacs = remacs

I've lately being collaborating a bit with the Remacs project, which attempts to bring Rust to emacs by porting the C parts of emacs. Here's the latest remacs report, by Wilfred, the creator of remacs.

If you love emacs and want to learn Rust, there's enough low hanging fruit in the project that makes a good place to start learning both the emacs internals and also rust (Which is not a simple language IMHO).

Remacs comunity is small, but quite helpful, and many things are still being figured out as migration of different parts take place.

I've personally have contributed with ports of a handful of functions (point and buffer related). Not a lot, but few steps to bring me closer to Rust and emacs at the same time.

From time to time, there's the issue raised about "what benefit do I get by using remacs instead of gnu emacs" or, "Should you try remacs?" I honestly don't know. If you don't have any interest in emacs internals and you don't usually compile your own emacs you won't gain much with remacs.  Projectwise, I don't know how gnu emacs will benefit from remacs.

Another question that raises is "if (how) gnu emacs benfits from the contributions on remacs?".  Not being a hostile fork but just a fork to experiment with different technologies at a different pace than gnu emacs, remacs is allowed to try different approaches to solving some problems. Support for very old platforms has been dropped, and the idea is to use crates (Rust libraries) for some things that emacs writes ad-hoc (json, md5, regex...).

For now, there's just a tiny fraction of users that use remacs, so it's way too early to think about any impact it may have to mainline gnu emacs.

And on the question: Aren't we moving to guilemacs? Why are you not investing your time on that? ..... For my personal case, I'll say that the low hanging fruit in guilemacs are over my skills. Not so for remacs, where I can chip in and merge my small PR's. Also, github (it's sad, but that's how it is) makes it easier for me to collaborate.

But I get you: The idea of guilemacs is very cool. You know what's also super cool? El compilador. But I don't know, I feel I'm unable to move any of those any forward, and they are still experimental.

[OFFTOPIC: I'm looking for projects where to collaborate. If you have any proposal drop me a line @ raimonster@gmail.com, and we can talk about it. Learning, experience, impact, fun and remote are my metrics nowadays ]

martes, 10 de octubre de 2017

How to Develop a Perfect Memory

https://www.goodreads.com/book/show/2691332-how-to-develop-a-perfect-memory

Another 'mind hack' book. The original book from Dominic O'Brien (memory champion) where it explains his dominic system and gives tricks and hints on how to apply it to several domains.

It's nice that most of the chapters and tricks use the same core rules, where you have to initially memorize 100 people by their initials, and associate 100 actions to each one of these people.  Then you create funny images on a chain of known places using people and the actions.

I've read it and for now I'm only applying to raw memorization of numbers, like phone numbers, credit card numbers and time schedules for buses and trains.

Those techniques are quite useful, and honestly, not hard to use (at least, getting to the "ok plateau"), but I find that this doesn't help much when remembering APIS, or complex entangled fuzzy concepts. Now I'm reading this fuzzy logic, and also I'm continuing "Exploring the world of lucid dreaming", that I started long time ago, in another of my regular rampages of self-hacking I had many years ago.

jueves, 14 de septiembre de 2017

Moonwalking with Einstein

https://www.goodreads.com/book/show/6346975-moonwalking-with-einstein
So I finished this one, and I can say it was a nicely put book about the subculture of memory athletes, together with some insights on the most used techniques by themselves to remember insane number of random numbers, or words, or poems.

Long time ago (around 2008) I read an oreilly book called Mind Hacks, which teached some techniques to 'overclock' one's memory, or recall, or mental arithmetic. I remembered the "1 is a bun, 2 is a shoe" placeholders, but here I learned about PAO, the major system and the Dominic System, to be able to remember random numbers (I now know my credit card by heart, after all those years).

I'm now working on my own PAO list (I'm using a mixture of Dominic System and arbitrary associations), and I hope to get to some decent proficency of memorization of numbers and tasks using the technique of loci.

A chapter on Savants, mentioning Brainman (highly recommended), and references to Tony Buzan and random folklore from the 90's make it a very enjoyable fast read.

Overall I liked the book quite a lot, it was fun to read, and I definitely got something from it. I'm afraid none of these techniques used  by Memory Athlets will be very useful to retain the kind of information I usually need to remember like programming APIs, data from books (like memorization techniques, heh), or some data that needs to have more context than just a random number.

Anyway, I'm convinced already that the fact that converting things to vivid images and placing them in a memory palace greatly improves recalling. 

Next stop, How to develop a perfect memory. And I think that will be enough for this streak of self-improvement.