Thursday, August 25, 2022

Byzantine Apple M1 repair manual drops

Apple released a repair manual for M1 macbooks, but it has 162 pages of instructions to replace the battery... And currently this requires replacing the entire keyboard and top case as a whole unit, costing $500.

Apple claims a battery-only replacement part will be available someday. My money is on this arriving right after they open Facetime to Android devices.

Heil cupertino. Long live the fruit monopoly.


Saturday, April 10, 2021

League of Legends: Wild Rift.. elevated mobile gaming

Before last week, I barely ever played games on mobile, and none of the games were engaging. Words with friends, tower defense, angry birds, cut the rope, and veggie samauri .... games one can pause or proceed at leisure. 

This week changed all that.. Riot released League of Legends wild rift, and I've easily played 30+ hours of it on my Samsung galaxy tab. It's not only an amazing game, and a faithful translation of LoL into a touch screen format... but in many ways it is better than the PC version.

Some the things that make it better are game design changes not specific to mobile, some of them are actually unique advantages of the two handed multitouch control interface, but probably the most unexpected is being able to enjoy an awesome engaging game interbreeding from a desktop. One can play silently on the couch, in bed, or even at a coffee shop or on a train (given reliable cellular).

If you have ever had an interest in League of Legends, but found the learning curve too steep, give wild rift a try. It is free to play, and runs on nearly all smartphones and tablets.

Pleasantly shorter games. 

The shortest PC league game is 15 minutes, 90% are 33-40 minutes, and the longest can last an hour. That is alot of time to be stuck in a game (and if you leave more than 10% of games they start to issue queue timer penalties because when one person leaves it ruins the game for 9 others). 

Wild rift games can be won (or lost) in 8 minutes at their quickest, and while an especially tough turtle game could last 35 mins, 90% of my games have ended in less than 18. That is an absolutely huge difference in time commitment, and a much more pleasant pace. That puts it more in line with fps games like valorant and csgo.

Much easier for beginners


The learning curve in league is very steep. Some of this comes from confusion understanding the win condition, but it also comes from the complexity of just playing the game. Item builds, champion skills, there is so much to learn. And when games can take an hour, making a big mistake can make the long rest of the game loss feel really bad. Like a prison.

Wild rift fixes this in many ways. 

First, the ping system has been enhanced with voice prompts. Instead of just hearing random and frequent "dings" from teammates, ping the dragon and everyone hears "attack the dragon ", ping for the team to group and everyone hears "group".

Second, the item build and character setup is much simpler.  PC league requires you to buy and manage a limited set of rune pages (setups for a champion). Since you can only have 20 and there are 140 champions, its a constant juggling act. Then there is managing items to buy during the game. Wild rift simplifies all this to 3 different configs per champion, which everyone gets for free. While you play, the UI shows you when you have enough money to afford the next items in your build. Much easier.

And then there is the new player experience. In wild rift its vastly better, leading you through an intro to the first 5 champions, and as you play you get loot chests for 5 random and ~5 champions of your choice.

All of the above innovations could be transferred to the PC game,  and I hope over time we will see some of them. However, the PC game will never have...

Amazing Multitouch Control Interface


To be fair, there are other mobile moba games that developed the core control UI used by wild rift... the largest of which is "Mobile Legends". The story goes that Riot parent company Tencent asked Riot to make a mobile version of league, and when they refused they made their own. Then Riot realized how big it could be and made Wild Rift.

Either way, I expected touch to be a handicapped stepchild compared to mouse keyboard and it is absolutely not. I wouldn't say its better, but it is amazing in its own ways. Certain activities and plays are actually easier to pull off on mobile, because every finger is a separate mouse cursor. One of the most common is dodging enemy skillshots with the left thumb, while lobbing spells and skills at them with the right. Doing this on PC requires some serious mouse dexterity.

Gaming Untethered


The most unexpected advantage of Wild Rift is being untethered from my desktop. There is something very solitary about late nights alone in my office. My wife watches TV in bed at night, and even if we are not watching the same show,  I like to be there in the space. However, I don't watch much TV, and even using a laptop to do email or internet activities elicits aggrivsted responses about the clattering of keys, especially when she decides to sleep ("the typing honey! When are you going to be done?)

Enter Wild Rift, aka stealth gaming in bed. The only comment I got from her was when an especially heated moment caused my nails to tap the screen repeatedly. I clipped them short, problem solved. 

Mobile Gaming is not all roses. 


The first issue to overcome is aspect ratio. WR is designed for 21:9 aspect ratio phones. However, I can't comfortably see the detail on a 5" screen, and I find it hard to use the touch interface with my fat thumbs. Therefore, I'm playing on my Samsung Galaxy Tab s6. The device is 16:10, and WR gives everyone the same vertical FOV, chopping the sides to fit. There is no option to play letterboxed. iPads are 4:3, which is even worse. The game has a few ways to scroll the camera, but all of them are more cumbersome then just having a wider FOV. I am investigating rooting my tablet so I can put it into a letterboxed 21:9 format at the system level.

Another issue to overcome is sore thumbs. This is probably less of a problem on phones, but on a heavier tablet my left hand is both holding the tablet and piloting my character, which causes me to grip it too hard and has made my left thumb sore. It might also have to do with friction, so I've ordered some mobile gaming "thumb socks" to try (which I never knew existed).

Lastly, body posture can be an issue. My desk chair is comfortable for unlimited amounts of time. Slouching on a bed or couch is not nearly as comfortable. Most streamers sit in a real gaming/office chair, but that defeats the untethering. I've ordered a bed wedge to try and make my stealth gaming in bed easier on my back.


* Wild Rift is much less toxic

I save possibly the best for last. PC League is notoriorly toxic. I have chat turned off in game, but there is no way to turn it off in champ select or the score screen. 

The WR design just doesn't offer as much opportunity. In gsme chst does have toxcity, but you can turn that off. In addition, there is no chat in the end game scoreboard, thank the gods. And the champ select doesn't have much chatter because everyone is typing on a mobile keyboard. (And there are quick buttons to say relevant things, like which role someone wants to play)

However, probably the biggest difference is the shorter games. On PC, an AFK or troll player can rob 40 minutes of my life, but in WR shorter games, not only is it not so aggrivating, but it is sort of more fun to tryhard anyway.. afterall, in 8 minutes it'll be over and onto the next.

Wednesday, May 6, 2020

mustache syntax is too simple for it's own good


After trying to improve some DocFx mustache templates to generate API documentation, it is my opinion that the `mustache` template syntax, in the interest of being overly simple, causes anything more than trivial templates to be over-complicated, and the possible formats you can achieve to be overly limited. (details below)

The first problem with `mustache` is that there are no conditionals. As a result, the `mustache` loop construct is constantly bastardized to be a conditional, by looping over a non-list. Any non-trivial template requires conditionals, and the documentation templates are absolutely full of these fake-loop conditionals.

given js data:

{elements = [ 0 = {name:"fred"}, 1 ={name:"barney"}};

Here is code to create a table, only if there are elements:

{{#elements.0}}     
   <table>
{{/elements.0}}
       {{#elements}}
           <tr><td>{{name}} </td></tr>
       {{/elements}}
{{#elements.0}}
   <table>
{{/elements.0}}

The second problem with `mustache` is that there is no loop context variable name. Instead, there is a "context", and when looping over a subset, the context is set to the element contents. The problem is, names that appear in the nested scope become inaccessible in the outer scope.

This happens all over certain types of templates, such as in the DocFx documentation generator, because the dataset reuses tax names such as `children` and `name` and `id` in every nesting context.

Consider the following javascript dataset:


{ name = "Papa James", children = [
    {  name = "Fred",  
          children = [ name = "Baby Louise" ]}   
    {  name = "Barney", 
          children = [ name = "Baby Anne"] }
   ]}

Here is the content we wish to produce:

Baby Louise has a grandpa named Papa James.
Baby Anne has a grandpa named Papa James.

As far as I can see, it's not possible to create this content with mustache, and this example explains why...

# context is top
{{#children}}    # loop through Papa James's children
  {{#children}}    # loop through next level children
     {{name}} has a grandpa named {{name????}}   
  {{/children}}
{{/children}}


There is no way to access the outer grandpa name, because the inner "name" tag shadows the outer "name" tag, making it inaccessible. The only way to fix this is to redesign the data-hierarchy to never repeat names, which ends up making the data-hierarchy inflexible. Either way you lose.

Essentially every template system other than `mustache` is free of this problem . For example, a DocFx Liquid template for this trivial example would be:


{% for level0 in children %}
  {% for level1 in x.children %}  
     {% level1.name %} has a grandpa named {% name %}
  {% endfor %}
{% endfor %}

While there are certainly simple templates where mustache's syntax is sufficient, I believe their overly rigid simplicity is simply idiotic. 

The lack of conditionals isn't stopping users from making loops into conditionals, and it is confusing and contorting the meaning and readability of the template code in the process, because when you see {{#foo}}, it is very hard to tell if this is a single element conditional, or a multi-element loop with a context. 

{{?isClass}}
   conditional occurs once
   {{#stuffInClass}}
      loop occurs once for each subelement
   {{/stuffInClass}}
{{/isClass}}

Further, it would be easy to support either accessing parent scopes...

{{#children}}
  {{#children}}
    {{name}} has a grandpa named {{~.~.name}}
  {{/children}}
{{/children}}

...or naming loop scopes (or both):

{{#children as level0}}
  {{#level0.children as level1}}
     {{level1.name}} has a grandpa named {{name}}
  {{/level0.children}}
{{/children}}