Analog Computing

This is an interesting video about how we can use analog computing. It seems a good use in matrix calculation used in AI.

All our technology is digital but we are reaching limits (power usage, physical limits, etc) and the “boom” in AI seems to benefit from analog computing.

RISC-V

I have been reading this book during my lunch brakes for several month. Most of the times just a couple of pages to be honest as generally my knowledge of CPU architecture is very poor. I really enjoyed this subject in Uni and this book was one of my favourites during that time. It was like a bible of CPU architecture. And Patterson is an author in both books.

I remember that there were too main architectures RISC vs CISC. In a very summarize way, RISC were simple instruction that were easy to parallelized and executed (with more instructions to execute) and CISC were complex instruction (few to execute) but that were difficult to scale. So let’s say simplicity (RISC) “won” the race in CPU architecture.

RISC-V is an open standard so anybody can produce CPUs for executing those instruction. So you can easily get your hands dirty getting a board.

One of the reason of RISC-V is to learn from all the architectures mistakes and provide a design that works for any type of processor (embedded to super-computers), is efficient, modular and stable.

The book compares RISC-V with current ISAS from ARM-32, MIPS-32, Intel x86-32, etc. Based on cost, simplicity, performance , isolation from implementation, room for growth, code size and ease of programming.

There were many parts of the book that I couldn’t really understand but I found the chapter 8 quite interesting. This is about how to compute data concurrently. The best know architecture is Single Instruction Multiple Data (SIMD). The alternative is Vector architecture. And this is used in RISC-V. The implementation details are too our of my league.

In summary, it was a nice read to refresh a bit my CPU architecture knowledge.

Paella de Verduras

After dealing with too much meat lately, I fancied some vegetables and specially a paella. So I decided to do a paella with only veggies last weekend. I found this video that I liked but at the end I went a bit wild as I stopped paying attention and I didnt have fresh artichokes.

Ingredients:

  • 1 big leek (instead of artichokes) sliced
  • 5 garlic cloves (with skin)
  • 1 bunch of asparagus
  • 2 onions
  • 1 glass of white wine ( I used red)
  • 3 tomates grated
  • paprika
  • 1 carrot diced
  • 1 red pepper + 1 green pepper
  • 1 courgette
  • 1 cauliflower
  • 1/4 glass of soy (dark) sauce
  • 1 stock veg cube + 1 .5l boiling water
  • 1 cup of paella rice

Process:

  • Heat up the paella dish, pour a gulp of olive oil once it is hot.
  • Fried the garlic gloves a bit. Then add the asparagus.
  • Once they are fried a bit, retire to a dish.
  • Put the paella at low heat now.
  • Fried the leek with the same oil in the paella dish. Till taking color.
  • Then add the diced onions. Add salt and pepper. Stir all of them until taking some color.
  • Add wine. Stir until it evaporates mostly.
  • Add the tomate, mix well. Add paprika. Taste it!
  • Add the carrot, peppers, courgette and cauliflower. Fry for a bit.
  • Add the soy sauce. This will add quite a salty taste.
  • Add the stock veg cube with the boiling water. Stirr all well.
  • Add the fried garlic.
  • After 3-5 minutes, add the rice. Spread the rice all around the dish.
  • Dont stirr anymore. Increase the heat.
  • Wait until the rice starts to come up on top.
  • Try to move the paella dish so the water evaporates evenly.
  • At the end you want a bit of a crust on the bottom (socarrat!!!)
  • Once it is ready, put the asparagus on top.

In my case, as I used leeks, they can burn very easily but I was luck and it was just a bit.

It looked nice from outside. I had a bit of socarrat. And tasted good! Maybe the dark soy sauce was too much dark 🙂

Chorizo

I have two very good memories from my childhood regarding to food: baking at my mother’s hometown and making chorizos.

Last winter I managed to go back to the bakery and refresh those memories. I am super happy I did it.

Now it was the turn for the chorizos. But I was cautious about this so I join a course for making sausages from a well-know company so I could get some intro and refresh.

The process that my mother followed was very simple. Ground a ham (by my parents best friends who were butchers), salt, (sweet) paprika and I think some garlic. Mix all together very well. Fry a portion of the mix to taste the spices. Then using pig’s intestines with a sausage filler/stuffer, make the crorizos. Then using a cord, make the portions. Finally, hang them and let then dry for around two weeks.

So in this course we made only sausages with different spices but the process is the same as chorizo, only the spices change.

I enjoyed the course, I brought some flashbacks from my childhood about mixing the meat, stuffing, tasting the mix (that was super delicious!!!!) and then the patience to let them dry. These were the only chorizos I liked. Anything else, was tasteless or had too much fat.

So I brought home several kilos from the course. I some some for cooking my week lunch and frozen others for another occasion. But most of them, I decided to dry them like my mother used to do. I felt so humble when I saw the result. It was like back home.

So I kept the sausages hanging from a sweeping stick wrapped with newspapers. Out of direct day light and using a heater at night while I was at home. For two weeks.

And they came out fine!

Although, they have too much fat. They are not chorizos, it is more like small salchichon.

As they are too manhy for me. I am keeping them in glass jars. They will not last many months though. But use to eat them quickly and cry when some chorizos went off. I was thinking in put them in oil but I wanted the dryness.

This reminds me biltong. Very similar idea, but I havent tried in a couple of years.

So I am happy with the experience and I am decided to make properly chorizos next winter. Try to call the butcher where I did the course, tell them I want to buy a minced ham (with very few fat, I dont care what people say) and the intestines, then do it at home like the old times.

The Black Swan

I finished this book a couple of days ago. Very interesting. It is about how not linear or logical are philosophy, economics and life. About how we try to find logic/causality to everything. How history only teaches what we have only discovered. How we can’t predict properly, and much less financial market using Gaussian and Bayeasian models when these are non-linar systems, how we should run away from “experts”, how the academy is built in a status-quo that can’t be refreshed. It is intense, it touches a lot of subjects. And sometimes I feel I get it, and later on I am not sure. Examples like the turkey that is feed for 100 days, and very likely “thinks” that will last forever, until without knowing, Thanksgiving comes, are brilliant. Similar examples for Casanova (who survived any type of incident) and NYC (like Casanova but at city level).

A black swan is considered something very unlikely to happen that actually happens or similarly, that something very likely to happen, it doesnt.

The book was written in 2007 just before the 2008 financial meltdown so its attacks to the “risk” management can’t fit better.

It uses references from Daniel Kahneman who some years later wrote a great book about how we (badly) reason. And won a nobel prize in Economics… funny enough, that’s a prize who Nassim attacks a lot around the book. As well, I enjoyed the part regarding the application of chaos theory/fractals from Benoit Mandelbrot (that I read from his book) in the markets. He mentions many other authors like Karl Popper (whom I have never paid attention), Herni Poincare, etc. As well, he mentions Godel.

The entries about Skepticism and Empiricism are really great. From how started, how it is related to the black swans and how Medicine killed more people than cure them until not long ago. And when I was reading about Sextus Empiricus, I wasnt sure if he was joking, but I was really surprised by the discovery of this philosopher/physician.

I think I need to read it again.

Galletas

This is another typical sweet from my hometown I like a lot and it was in my to-cook list. After several failed attempts with magdalenas, I decided finally to give it a go. I had good memories from last December in the bakery so I followed a recipe from my aunt and see.

Ingredients:

  • 3 large eggs
  • 200gr sugar
  • 170ml olive oil
  • 1 lemon zest
  • 4gr bicarbonate sodic + 4gr tartaric acid
  • 400gr-500gr+ plain flour

Process:

  • Whisk eggs and sugar very well. Until the mix is foaming
  • Add olive oil and lemon zest. Keep whisking
  • Add bicarbonate and tartaric acid, keep whisking
  • Add flour, shifting it, bit a bit into the mix.
  • Pre-heat oven at 200C
  • At one point, you will have to use a wooden spoon to keep mixing. This is a critical point. I added the 400gr of flour, and the mix was still too wet so I keep adding bit a bit more flour until I had a dough no too sticky. Keep in mind you need to be able to use a roller and a cookie cutter. So at one point, I pour the dough into the table and tried to knead it adding bits of flour. I was lucky because I had some flashbacks from I was a kid doing the same thing so It helped me to carry on until I had that kind of playful dough but still a bit sticky. If you add too much flour, the biscuits will be hard as stone.
  • So once you have the dough ready, use a roller to spread the dough around 1cm thick and use the cookie cutter. In my case it was a round one, in my hometown use a rectangular one with round corners. I may try to “build” something.
  • So always putting flour in the surface before spreading the dough with the roller. Use the cutter, and transfer the biscuit to a baking tray with a bit of flour to avoid sticking. When you use the cutter, the biscuit can’t be too sticky, if so, you need to add a bit of flour.
  • Once you can’t cut more cookies, form a ball again, and a bit of flour in the surface and roll it. Cut and repeat until you use up all dough.
  • Bake the cookies until golden on top. 20 minutes or so.
  • Let them cool down, it is very important!

This is before getting to the oven.

This is after the oven.

And these are the real ones I try to match!

They dont look very similar but still I was quite happy with result. For being the first time, it was tasty! I could add more sugar?, maybe a bit less time in the oven?

It is a simple recipe, basic ingredients, and brought me good memories. What else?

And this is a snapshot of how it is really done by the real bakers!

Albóndigas de espinaca con arroz

This is a recipe that a very good friend recommend me but using smoky tofu instead of bacon. So I decided to give it a go:

Ingredients:

  • 1kg of fresh spinach
  • 1 onion
  • 3 cloves of garlic
  • 250g of smoky firm tofu
  • 150g of cheese (of your taste)
  • 1 cup of rice (paella or risotto style)
  • 1 can of tomate sauce
  • 200ml of cream
  • 1 cup of chicken/veggy stock.
  • 1 cup of plain flour
  • 3-4 eggs

Process:

  • In big sauce pan, add boiling water and cook all spinach. They will reduce a lot. Once they are soft, drain the spinach and chopped them very thinly.
  • In another sauce pan, add some olive oil and fry for a bit the chopped garlic cloves. Then add the rice. Fry everything for a bit, then add two cups of boiling water to the rice and let it cook at low-medium heat. Try to get it as much dry as possible to hep making the balls later.
  • In a frying pan, add a bit of oil, at medium-heat. Add chopped onions, and fry until golden, then add chopped tofu. Fry everything, try to get a golden color from the tofu.
  • In another frying pan, add the tomate sauce, stock and cream. Mix well, and let it cook at low-medium heat.
  • In a big bowl, put the chopped spinach, rice, tofu and cheese. Mix everything very well. Make you a big favour, let it cool down! Put it in the fridge, outside, whatever.
  • In one plate/bowl add the flour and in another the whisked eggs.
  • From the spinach mix, start making some balls, then pass them through the flour, cover properly, remove any excess and the pass through the eggs. Prepare all balls before frying. If you let the mix cool down, it shouldnt be much effort, and then frying would be easier.
  • In the small frying pan, some a bit of oil and heat up. You dont need to deep fry.
  • Then in the small frying pan, put 3-4 balls and fry them until golden in all sides. Them add to the tomate sauce mix.
  • I filled the tomate sauce pan with spinach balls, so I used the left over and did some other balls and “omellete”.
  • Keep the spinach balls in the tomate sauce until it thickens up a bit.
  • Then you can remove from the heat, and ready to eat!
This is the day after. I put the pan in the fridge overnight.

Leftovers

The recipe is very tasty. I didnt manage to get a good ball form, I think my rice was a bit too wet? In the video the balls look super rounded. But anyway, I had a good lunch the whole week!

Almendras Fritas

It was normal to have a small snack or tapa in most bars in Spain, from a small plate of crisps, salty peanuts or fried almonds to some seafood. Even buying a 1kg sack of almonds, hazelnuts, walnuts wasnt that expensive.

Now, when I go to Portugal or Spain, I try to buy some small bag of fried almonds. But now I wanted to do it myself because I had the gut feeling that it couldnt be that difficult. I found this video and I used it as reference.

Ingredients:

  • 200gr almonds (with skin)
  • pinch of salt
  • olive oil for frying

Process:

  • Put the almonds in a sauce pan with boiling water. Boil for 5 minutes.
  • Remove the almonds from the water, let it cool down for 1 minute and then remove the skin. It should be quite easy. Recommended to push with your fingers from the side of the almond, not the tips.
  • Dry them in kitchen paper.
  • Put a frying pan at medium heat with the oil. Once the oil is hot, add the almonds and kit stirring.
  • Once the almonds get golden, remove the pan from the heat and take the almonds for the oil, trying to drain as much oil as you can. Then put again in kitchen paper to soak up more oil.
  • While warm, add salt to the taste of the almonds.
  • Once they are cool down you can store them in a glass jar.

Really tasty!

War and Peace

For some time I wanted to read “War and Peace“. It has taken me just over a month although initially I had my doubts about the book. I wasn’t sure if I was going to enjoy it. Why did I read it? Apart from recommendation from the few people I follow/read in the Internet, it is because I think reading this type of books will make me wiser, smarter, find the solutions to the mysteries of the universe and life (it is not 42), etc etc. It never happens. But at least, I try to learn something new, soaks up new experiences, conversations, etc.

I liked the intro about the book and Tolstoy life. A highlight of that is he tried to remove copyrights of his novels, he belonged to old nobility family and fought in the Crimean war.

The book is focused in the Napaleonic Wars in Russia. I was surprised how strong was the French influence in Russia. The nobility was mainly French educated and there are parts of the book where some characters mention how bad is their Russian.

It is a long book, thought was going to be boring but was engaging. I guess it is an stereotopic: Russian things are boring, grey, dull. It is luck of knowledge of Eastern countries (real) culture. It felt like a “Pillar of the Earth” + a soup-opera. But it wasn’t cheesy at all. So see how deep and different is each character. How they evolve. There is some (life) philosophy (mainly from Pierre during his spell in the front) that really got me. It is something that I really believe in: simple life. And there are a lot pages about (the complexity / meaning) of love.

But mainly the book is about History. I have learnt history mainly based in big characters and actions. But Tolstoy’s point is History is not really that, is not that rational/causistic as we try to believe (and write). He focus several times in Napoleon. How he was a genius in some battles but then how he failed in Russia campaign. Tolstoy argues that is not just Napoleon’s action that produce those outcomes. It was everything around. But we try to focus and justify outcomes in just one fact.

The novel doesnt really have an end. It just ends. It is not made in Holiwood. So it is nice.

Debian Repository Keys + bits

Since I had to reinstall my laptop, I have had to tune missing things. One of them was when updating Debian I was constantly having errors with two repositories so I couldn’t get the packages from there. I have been lazy because it wasn’t stopping me for doing anything but I decided to fix that. I have seen this before so it is not totally new but I was surprised as I couldn’t “fix” the key for the Debian Tor repository.

The error for getting the key for “www.deb-multimedia.org” was fixed following this post:

# apt-key adv --keyserver keyring.debian.org --recv-keys 5C808C2B65558117

I tried similar approach for “deb.torproject.org” but it failed. I checked the official way to use that repo here. It was a bit different as I do currently as I use the “sources.list” and the post recommends to create a dedicated file. I didn’t pay much attention to it and tried to follow those instructions but using my current config setup. It was still failing. I checked the repo was real. I tried to use a public keyring (based on this) but same result. But at the end I found the solution here:

# wget -q https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc -O- | sudo apt-key add -

After that, my “apt update” didn’t show anymore errors.

And then I noticed why my setup didnt work with the official instructions of Tor Project.

The documentations says to create a new file with this line:

deb     [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org testing main

And then add the key:

# wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null

But I have only this in my sources.list:

##### 3rd Party Binary Repos
###Debian Multimedia
deb [arch=amd64] http://www.deb-multimedia.org testing main non-free
#deb [arch=amd64,i386] http://www.deb-multimedia.org buster main non-free

###TOR
deb [arch=amd64] http://deb.torproject.org/torproject.org testing main
#deb-src [arch=amd64] http://deb.torproject.org/torproject.org testing main

So I wasn’t doing the same as I thought.

And somehow I forgot how to scroll using the keyboard with Terminator….and I was sure it worked before. I checked the keysetting and couldnt find anything. I thought something was misconfigured. Then I searched and found this. So as each laptop has a different keyboard setup, I noticed the “shift + PageUp” was actually in my keyboard “shift + Fn + PageUp”.

And after sooooo many years, I decided to add spell check for Spanish in GC.