Very Secure

Abstract-Sexpr Tool

October 28th, 2018

One process that I want to automate is the process of grabbing an sexpr and turning it into a function. Here is what I do currently manually.

1. I decide that I want to take a block of code inside of a function, and abstract it into a separate function with one or more of the variables inside the sexpr turning into parameters of the new function.

2. I delete the sexpr in emacs (with ctrl-k) and then yank it outside of the original function (ctrl-y).

3. I give the function a name and define it by wrapping the extracted sexpr with

(defun my-new-func-name (param1) (..old sexpr..))

4. I replace the sexpr in the original function with a function call to my-new-func-name with the parameter passed in.

I will try to write this in emacs-lisp and post the code later. I would like to be able to possibly put the cursor on the variable that i want to become a parameter and then have the ability to keep pressing a button going further and further up the sexpr tree until i've reached the root node that i want to be the form that is put into the new function. Ideally with the parens highlighting each time i go up the tree.

Programming in Common Lisp

October 27th, 2018

I decided to switch my personal programming language from python -> Common Lisp. This took quite a bit of work, since CL is quite an old school language it uses a lot of conventions not found in modern programming languages. When you search for a solution to a problem in CL you have to really dig or solve it yourself, since it is not a mainstream language that will pop up with hundreds of stack overflow responses after a quick google search. So why did I choose this language?

1. I had been programming in python 2.7 for quite some time and all of the sudden the hype was to switch to python3. This caused many backwards compatibility issues and i saw no reason for the "upgrade". Thus i decided to stick with python2.7, but then I thought to myself, "if a young programmer starts in python3, then someday he will be in my position, except the switch to python2->python3 will now be python3->python4." Thus maybe i am the young programmer whom i am speaking of, and python2.7 is already the unnecessary upgrade of an even older program So i rewinded the clock all the way back till I found Common Lisp.

2. Python does not allow for multiline lambda expressions.

3. Lisp allows for creating code templates with macros. It lets you program in a way not really possible in non lispy languages.

4. Lisp has been around for a while, and it has picked up a few well written libraries over the time. When I look for a solution to a problem I need just one working solution, not 100 working solutions.

5. Lisp programs are easy to send over text communication channels because they can be autoformatted (unlike python).

6. And finally, Common Lisp is used by smart people that I respect.

Guitar Tips

October 27th, 2018

A few months ago, a good friend of mine here in Costa Rica let me play his guitar. Since then I've been playing just about everyday, while reading about music theory along the way. Here are my tips to an aspiring guitarist:

1. Do the exercises in Kitharologus: The Path to Virtuosity by Ricardo Iznaola. I have yet to get to even level 1, and I have already seen great improvement in my guitar playing.

2. Learn to breath steadily and properly, this will help you in all walks of life.

3. Keep one finger on the fretboard when you can. This will allow you to play standing up without a strap, as it will give you the leverage to hold the guitar in place. Also, it allows you to keep a more accurate model in your brain of where you are on the fretboard, allowing you to take your eyes off the guitar.

No Reason to Switch to mBTC

December 12th, 2017

If we use mbtc colloquially instead of btc then at the current fiatola exchange rate 1mbtc is $17.00, give or take. The argument from the peanut gallery is that this will help people realize that they, too, can afford btc since lo! it is divisible by up to 100,000,000 satoshis. (Well, not really, because of the space required to store the hash of the txn index, but I digress...)

People who have not taken it upon themselves to learn about how divisible btc is have no business buying btc. And btc is for buying houses, not for buying coffee, so no thank you to switching up the nomenclature.

AlphaZero Dubiousness

December 10th, 2017

Call me the konspiracy theorist, but I am very dubious about the publications of Google regarding AlphaGo and AlphaZero. AlphaGo famously beat Lee Sedol in a large heavily publicized show-match. However, as someone who does know Go past the basic rules, I cannot make judgements about the gameplay played at that level. And I wouldn't put it past Google to create a grand sham to dupe its search engine cattle.

Stockfish is impressive because you can download the code, and be amazed yourself on a rudimentary laptop. AlphaN seems to be behind a closed curtain, and we are required to trust an untrustworthy company about the authenticity of their accomplishments.

How high can a very forgetful person count using only his fingers?

November 16th, 2017

Before computers the cultural tradition was to count in base ten and teach it in schools because we had to choose some base and we have ten fingers so let's go with ten.

However now it is time to switch to base two, or maybe some other power of 10, because of the way that computers work. Whether or not schools teach base 10 before base ten will likely be a cultural divide. Back to our question, imagine that someone who keeps forgetting what number they're reached while they're counting decides to use his hands as a reference. He can count to 1111111111 if he treats each finger as a bit and marks the bit (1) if the finger is extended and marks it (0) if it is retracted. He can say one hundred thirty-two to anyone who tells him that reading from left to right or right to left is better than the other way, but I would go with letting your right pinky being extended while all others are retracted symbolize the number one.

Nicaragua Border Run

October 25th, 2017

Yesterday I renewed my 90 day travel visa to Costa Rica by entering and leaving Nicaragua. I drove about 2.5 hours to the border. While there, there were tons of people spreading disinfo to tourists saying they have to stay in Nicaragua for a few hours or even possible for a few days in order to be able to get a new visa. They try to offer safety in exchange for money.

I offered a tour guide $20 to walk me through the process on the stipulation I pay him once my visa was renewed.

There are four main steps:

1 Leave Costa Rica

Pay $7 to get an exit tax ticket, then go to official looking place to get a stamp.

2 Enter Nicaragua

Pay $1-3 for some small ticket. Then talk to an official, and TELL THEM THE TRUTH that you are only there to renew your visa when they ask the purpose of your visit. Then pay them $12.

3 Leave Nicaragua

Pay $2 fee.

4 Enter Costa Rica

Free, just show either a bus or plane ticket (picture on phone is okay) that leaves from Costa Rica within 90 days.

Kind of a pain in the ass.

Pico Grande Tamarindo Idea

October 12th, 2017

There's a rock that sticks up particularly high but it still under water 2 hours before and 2 hours after high tide.1 It'd be sick if someone could stand on it when it is just under water so it looked like they were floating and then catch the re-break using their surfboard like a skimboard. I would call the move the Jesus Drop In.

  1. Usually, I really have to learn about the sea level shit. []

Five Bold Stars Magic Seaweed Surf Day

October 7th, 2017

Today October 7, 2017 was one of the first times I've seen five bold stars on magicseaweed.com (now apparently purchased by surfline.com) Guanacaste recently had a storm causing waves as big as 4 meters. While the biggest days were met with violent on shore gale winds, wrecking the shape of all of the waves, today was met with beautiful 2 meter waves with a very low offshore wind.

I have been suffering from serious mid back pain, so I was unsure whether or not to go out despite hoping out of bed excitingly when I saw magicseaweed's prediction for the day. I hopped in my pool and swam a few laps and while I could notice a slight tension in the middle part of the left side of my back, the pain was not too severe so I decided I might go out. A few minutes later, after I was texting one of my friends here about the potential of going out today, the power cut off again. Frustrated from dealing with power outages, I decided to say fuck it and hit the waves immediately despite my pain.

When I got to the beach I was a little worried. The water was still a muddy color from the storm, with lots of debris caused from the estuary run off all over the beach. On top of that the waves seemed to be heading in many different directions and there were not very many people out.

However as I started to paddle in I realized that today was to be no ordinary day. The Tamarindo beach was not behaving in its normal manner, the storm has possibly caused some permanent disturbance to the estuary and the resulting sand bar that might change the way the waves behave for a while. What was different about today was there was a strong current pulling you directly out to sea. There was an older man stuck out by the current who was struggling to get back inside. A few of us waved at him and he gave us the thumbs up, and he was already with someone young and fit. He knew how to handle the situation and was conserving his energy intelligently instead of fighting the current head on to get back inside.

I got out to the break and the only other person out there (besides the older man and his friend caught by the current)was this beautiful young woman with a gorgeous accent. She reminded me to watch out for crocodiles, citing that it was the mating season and thus the males would be more aggressive.

As I sat on my board paddling against the current to stay in place, I realized that my mid back pain was being caused by the motion of arching my back on the surf board and paddling. This was a major inconvenience. The pain started to get worse and given the rather large waves I was worried what would happen if I were to fall and be tumbled violently in the massive white water.

But the waves, despite being big, were beautiful slow moving gentle perfectly predictable A frames. I caught my first one after about 15 minutes and as I stood up all my pain in my back was relieved as I felt the wonderful sensation of rushing down the face of the wave. I was able to paddle back out very easily because the current was pulling me out to sea anyways.

What followed was a stream of waves continuously growing in size. They were friendly giants, but to catch them you had to paddle when they looked "absolutely menacing." I had seen waves like this once before further south down the coast in Playa Guiones. After each wave the paddle out started to hurt more and more. Soon I found myself in extreme pain just lying on my board with my head up.

I started to worry more and more what the consequence of a rough fall would be. I knew that it was against my better judgement to stay out, but I'm not sure I've ever surfed a day more fun than this so I couldn't bring myself to get out of the water.

Word by now had gotten out about this legendary day, and my spot went from me and the beautiful woman to quickly ~20 surfers. The A frames were appearing all over the beach, so despite the crowd it felt like there was plenty of room to surf.

Then, out of no where, a huge set rolled in. This set was the first of a series of rogue abnormally large sets, and it caught the entire lineup off guard. Three massive waves splattered their white water all over all of us causing the kook heart rate to go up and the tico cheers to come out. The day was firing and shortly after a beautiful wave came to the lineup peaking right in my position.

I paddled for it with one other Tico who politely let me take the wave given my position and I went flying down the face with a high line. As the wave started to close out I used my energy to turn towards shore and curve back up around the white water to get back on the wave in that power pocket right in front of the foam ball.

By this time my back was in searing pain but my confidence was 100% and I saw no reason why I should fall on these waves as they were breaking very gently despite their size, and thus very easy to ride down the face. I caught one or two more waves, but then the pain started to get to a point where it was unmanageable and I knew that the next wave would have to be my last.

As I was waiting out on the water for my next wave, I was nearly in tears. This was one of the best days I've ever seen in my surfing career and it seemed like the waves were getting even better, but I was going to have to come in early because of my injury. I was thankful though for the experience that I got to have, even though it was about to be cut short. I was hurting so badly that I was getting lazy about paddling back into shore and I found myself getting pulled out farther away from the lineup. I feebly crawled to the lineup only to get pulled back out to sea again. I started to worry about what would happen if I got caught in a truly nasty current where my injury would prevent me from paddling in.

And then another rogue set appeared on the horizon. The cheers and whistles began from the lineup, and I was in the perfect position for these rogue waves since I had been too weak to paddle back in. I giggled to myself as I knew that going for this one was a truly fucking stupid idea, but it was an opportunity I could not pass up. My back was wrenching and I had to fight the pain to paddle as fast as I could for this wave that started to block out the sun. As I stood up once again all the pain was relieved and I felt my stomach sink as I went flying down the face all the way before carving out my bottom turn. As I flew down the face at lightning speed I watched another person attempt to catch the wave just slightly later than me and he nose dived into oblivion. After riding along the face for only about three seconds I was about to hit the white water from another peak of this big but misshapen wave. I turned in towards shore and let the thunderous white water carry me all the way to the safety of the beach.

A local person who I had met once before came up to me and told me he saw my last wave, congratulated me, and offered me a smoke.

Storm Nate And Costa Rica Power Problems

October 7th, 2017

Recently Guanacaste and other parts of Costa Rica were hit by a nasty rainstorm, Storm Nate. This storm truly sucked, it rained for effectively 48 hours straight. When a rainstorm like this occurs, rivers begin to flow all over the country, especially through roads. Mud slides occurred everywhere and bridges were rendered useless. Tamarindo did not get hit too hard, but neighboring towns such as Villa Real suffered massive damage.

An amigo of mine, John, was caught traveling when the rainstorm occurred. He described the roads as parking lots stretching for miles with people walking along side their cars, rendered useless, like some massive religious procession. He showed me videos of him driving in a car he hitch hiked. He was in a tiny little Toyota. You couldn't even see out of his side windows because muddy water was splashing so high. They were driving in such deep water that the water started to seep into the car through the bottom of the door. Their feet were in puddles. John was sick with a cold, and he said he kissed the ground when he finally made it back home to Tamarindo.

I was trapped inside my house for the storm, bored out of my mind. The power was out for ~30 hours, and I had no running water. I was caught naked without my computer charged and 30% on my phone. (Now I'll make sure to keep all my devices topped off with juice in case of any unexpected power outages.)

While the storm did create a nice swell, the wind was blowing onshore too hard on the beach for waves to form. In addition, the water turned to a murky brown color as the storm tossed sand up into the ocean and caused the estuary to drain into the ocean. I spoke to some locals, and I learned that when the water is that brownish color after lots of rain it is filled with bacteria. I recently recovered from an awful bacterial skin infection called impetigo, and the waves were not worth the risk getting sick again.

So for the 30 hours of no rain and water I decided to read and finished Cannery Row by John Steinbeck. While amusing at times, I have to say Cannery Row was probably one of my least favorite Steinbeck's. After finishing Cannery Row, I started reading Gabriel Márquez's 100 Year's of Solitude (in English.) I will try to reread it in Spanish when I'm finished.

After I got bored of reading I went to hang out at the Pura Vida hostel in Tamarindo. One kind Canadian friend of mine, Trevor, sacrificed his laptop power to charge a speaker so we could sit around listening to music. Hanging out at hostels is a must-do for anyone living in Costa Rica or perhaps traveling anywhere. Hostels are almost always 420 friendly and have a great group of young people from all over the world who want to hang out and share stories. We sat around candle light merrily smoking and drinking wine and eating profiteroles made by some other friendly Canadians from Montreal. Later we went out at night to the beach to squint and watch the massive 4 meter waves exploding on the rocks.

Later that night, after I had went to sleep, I got up to use the bathroom. As I was sitting on the toilette facing the revenge of the profiteroles the electricity came back on and I let out a scream of excitement. Sure going 30 hours without electricity or running water brings people closer together, but boy does it fucking suck overall. Amongst the other problems, I lost all the perishables in my fridge.

Here's to living in the age of power, and here's to Costa Rica getting its shit together regarding electricity.