Wednesday, February 28, 2018

Give Me My Keys Back!

Unity 3D on Linux has come a long way since I first encountered it. Originally it was a .deb or .sh install. I had to track down dependencies etc. I was behind in versions so my fellow developers' projects gave me grief when I tried to open them.

Now the thread of releases is pretty active. It has a download assistant. The assistant is a an executable binary that is essentially an installation wizard. So far Unity works well on Nix... except it likes to steal control of my keyboard input. This first manifested itself when I entered game play mode and couldn't free my mouse. I had to forcibly shut down my laptop with the power button. I thought it was just in game play until I tried renaming one of the folders in my project. I'm not yet sure exactly what action in Unity is snagging the keyboard or exactly how to regain access to keyboard input. Clicking around Unity, I am able to get my input back.

Now that I am able to get my keyboard back, I am no longer blocked.

That's Like SO Generic

In the WorldWeaver client rewrite I have taken a completely different approach from my first go at it. The largest departure is the use of a general Element class. This is sort of a poor man's generics of sorts. Generics for a non-guru like me.
 
It has completely changed how everything is being done! I can now walk up through the tree of nested game elements, completely ignorant of what the parent type is. I have no idea how rough it is on the CPU etc yet, at this point it loads games, does the initial game message and properly handles Look Events/ActionSets, but it loads Rooms far faster than its predecessor.

On a side note, some things are now obsolete. This new iteration leaves the original game DB intact. When a game is played for the first time, an 'in progress' copy of it is created. To resume a game, simply load the in progress game. So I no longer have to worry about trying to restore the game database to its original state. When a game is over that in progress DB goes away. Currently it's still a bit basic - only one in progress DB at a time, so if you start a new game the in progress is overwritten. I'll improve this later.

Monday, February 26, 2018

Knowing IS the Battle

Fellow 80's / 90's kids already know the title's reference.

PSA

As I sit here eating cereal and watching coding videos. I'm thinking in programming knowing isn't half the battle - it IS the battle. Years and years ago I built a little C# Tetris game. I don't recall how long it took me or how much code I had to write to pull it off (Sadly the project has long since been lost - or is archived amid hundreds of old burned CDs). I am certain it took more than a couple hours and was comprised of far more than 200 lines of code. Yet had I known a better approach and a few tricks to help me out, 2hours, 200lines of code would have been completely possible.

I need to keep watching other people code. because knowing is the battle.

Saturday, February 24, 2018

Misuing Social Media

I'm pretty sure I have a touch of ODD. When I'm 'supposed' to do something in this way or that, I'm pretty much NOT gonna do it that way. If I'm making music, for instance, I'm probably not going to obey the rules of whatevsr genre of music I'm making.

And so it is with social media.

Twitter:
Twitter is not where I share my thoughts, or witty comments, or events in my life. No. Twitter is where I scroll through other people's links and posts and share them. Part Pinterest, part feed reader.

Pinterest:
On Pinterest I'm not so rebellious. But I'm pretty much just a hoarder. I rarely add to the pot, but I explore what's already there and cull it into my various boards. So it's basically a free stuff bin of images, all ready to be hoarded.

Facebook:
Facebook is my Pinterest. When I find cool stuff I share it on Facebook, then I leave. I don't really spend much time there anymore (Thanks politics).

Friday, February 23, 2018

A Little App Shuga

Now that I'm denied my all-time favorite app (And consequently all my favorite headless Linux apps) GnuRoot, I'm on the market for apps to try and sort of fill the void. Aka lightweight or open source, minimalistic apps. Here's what I have so far.
Editors:
Jota+ (paid)
I've had Jota for years now. I haven't used it since finding GnuRoot... But now it's all I use - VIM on Android just isn't there. Once I get full on Nix going again I'll be back to VIM. Until then Jota it is.
Files:
TotalCommander (free - no ads)
I love this app. It's clean and ad free. It's not constantly trying to get me to download other utilities *ahem esfile explorer*. With the LAN extension installed it's nice and easy to copy files to and from your computers.
Music:
Musicolet (free - no ads - internet)
I've mentioned this one before. I recently found Musicolet when my old player kept munching on my battery. This app is ad-free and doesn't even utilize your web connection so it's nice and light weight, not querying for artwork etc. And it's a great player. A little weird at first with the multiple queues thing but once you're used to it the queues are pretty cool.
Chatting:
QKSMS (open source)
I just found this one. I wasn't looking for a texting app, but in a search for open source apps, it showed up. So far it's really cool. You can tweak the look and feel quite a bit. So far it's not buggy etc. And it's open source.

Thursday, February 22, 2018

No GnuRoot No Nothin

So GnuRoot won't run on my new phone. Ok. Fine. I'll just use some other non-root terminal/Linux emulator... Or maybe not.
Judging by the comments in the play store it seems I'm not the only nerd who is unable to run GnuRoot. I'm not sure what's new in Android, but it seems far more locked down than the version my old phone was running. If so, I guess the OS is still going in the wrong direction. :/
Well there's nothing out there like GnuRoot. Busybox I believe is broken like GnuRoot. In Termux I have VIM available, that's good. But as I was messing with it I couldn't get my VIMRC to apply. Then it got worse, I couldn't open files in my documents directory. I could save files within the Termux file system, but where is that?
I did searchss for files I had stored there but got no results.
Soo Termux and the other emulators are isolated little file systems with no IO. I don't know if Google is rolling their own SUPER locked down Android OS, or if  this is standard in the latest release. But it sucks to get a $$$ phone and have the jerk companies that made it  restrict what you can do with YOUR phone even more.
So I'm stuck. I can't even run proper VIM. When I was able to run GnuRoot I could code, compile and run full on Java jars, I had a ton of apps available through apt-get. It was JUST like having full blown headless Linux on my phone.
Sad.

Wednesday, February 21, 2018

Fast Load

One big problem with the first WorldWeaver client was load times. This was, in part, due to SQLITE opening and closing connections. Even when I modified it to keep the connection open for the duration of the client's execution it was slow.  This was tough to avoid, I really needed to run a query for nearly every game element.

In the new version of the client I need to get each element type from the database in a separate query, but  I'm doing it far more 'on demand'. Once elements are loaded they don't need to be reloaded of course but I load them as I need them. So far the load times are very fast.

I'm shifting some of the filtering work off to the client so I can cut down on the amount of queries to the database. And I'm using a single class with all the possible properties so that it is possible to walk up the parent chain and pass them around without the need to know what they are.
So far so good.

Tuesday, February 20, 2018

Suggested Learning

Hyperspheres. If you were a two dimensional being, how could you visually, scientifically, mathematically describe and understand a three dimensional sphere?

If you were a three dimensional being, how would you visually, scientifically, mathematically describe and understand a four dimensional sphere (hypersphere)?

Clayton Shonkiler : 15 Views of the Hypersphere
https://youtu.be/krmV1hDybuU

A Breakthrough in Higher Dimensional Spheres
https://youtu.be/ciM6wigZK0w

Hypersphere in Slow Motion
https://youtu.be/XFW769hqa1U

Bigger, Better, Faster, Stronger

Well it was about that time. The old phone had to be put out to pasture. No more green line across my screen. No more 20% battery drain per hour. No more GnuRoot... wait, what?!?
I picked up a Pixel2 Extra Large or whatever it's called. I wanted to JUST transfer my msg history and contacts from my Droid, no apps etc. Turns out I got my contacts, and my apps for some reason. Not my msg history. meh, whatever.
I have to say... I've never tried the Gboard keyboard. I love it. So many options, and I can style it to be super minimal. But most important, cursor moving via sliding along the space bar. WHAT?!? That is so great! Precise cursor positioning w/out arrow keys is a nightmare.
Sadly, as I mentioned, GnuRoot won't run. I'm guessing it is the Android version that is giving it grief. Hopefully in the near future it will run.

Friday, February 16, 2018

Skipping Ahead

This is not good. I haven't finished testing the game I defined for my IntFiction and I have already begun rewriting the engine's client app. In the course of coding the engine I learned better ways to do things and am painfully aware of problems that came up late in development.

One idea I had never thought of, for some reason, is using multiple 'input listeners' (Essentially main game loop). In the original client there was one primary input loop. Any special modes like fughting or admin had to be driven by a mode variable that had to be checked all over the place.

In my new code - special modes are handled by their own inout loops, and you don't leave that loop until that mode is done with you. Each mode can easily have its own prompt and may be nothing more than a bunch of wizards or an entire sub parser in the engine.

I am also hoping to do more of an on-demand pattern for data loading. I'm hoping this will make room loading much faster than the first client.

Tuesday, February 13, 2018

Tool or Weapon

No this isn't a post about sweet knives or guns etc. Sorry. But it is another piece about my favorite editor - VIM.

I was talking with a coworker about a certain lightweight plugin driven IDE from our Redmond friends. It was all him, I had nothing to contribute to the conversation except 'I use VIM'. It was a great conversation. I learned about the good and bad he's discovered in using it. Everything he said made perfect sense... pretty much similar issues present in its bigger sister. - Except for the split window weirdness. That was a new one.

It got me wondering if I was inhibiting myself by stubbornly using solely VIM. Just like tools in a toolbox, they aren't mutually exclusive. A hammer has use, a drill has a different use. I typically tend to use IDEs solely for debugging or building. All the editing I prefer to do in VIM. But I think it's a good idea to not let my VIM-love box me in. I'm not betraying VIM by using other tools available to me.

What this has to do with weapons.. Nothing really. Just the title that came to me 

:)

Tag Em and Bag Em

The idea of a meta tag driven file system is something that crosses my mind often. It's not that I hate the folder paradigm. I love folders. But being able to tag files and find them or organize them not only by folder but by meta information would be great for an obsessive notetaker like myself. I am constantly searching through my files and notes. While the indexer in Windows (Where I do most of my notetaking - for work) works, it is often difficult to find what I need in my local sea of information.

On my work machine it would have to be something built into the OS since I am not able to sinoly download what I want and run it. On my home machines I could learn to utilize TagFS etc but I've never toyed with non-standard file systems so there will be a learning curve.

It seems interesting that while apparently you *can* add meta info to files in Windows etc, such functionality isn't the norm for file management. It would give the user a powerful level of control and greatly improve file management.
I may have to toy with TagFS and others, see if it gets me what I need, at least on my home boxes.

Friday, February 9, 2018

Flux Keys

I've been using Fluxbox for a while now. That doesn't mean ai know anything about it. :) Just like with Linux I'm no power user. Whenever I find I need to do something that requires a script or some configuring etc then I dig in and figure out how it's done. I'm actually not a very intense user. I code Java apps in VIM and only use a few bash aliases to make this easier. When I'm making music Reaper does fine without any special OS tweaking etc.

A few weeks ago I inadvertently hit some Windows hotkey. Everything vanished. I figured I accidentally moved to another vdesktop. I launched some new windows and continued to do my thing. When I was done I rebooted to be sure everything was cleared up.

Earlier today I did a similar thing (Thanks to spending all day at work on a Doh's machine). This time I had a video playing. It continued playing from wherever it vanished to. That was a problem. Again I tried different hotkeys but no success. I rebooted and decided it was time to become familiar with my fluxbox keys file. It turns out I had been switching workspaces. I did some tweaking, moving windows to the top Dock via hotkey etc. And I went over the other keys defined in there. Cool! Window tabbing is cool. I like all the different organization tools in Fluxbox. Vdesks, Workspaces, window tabs, window rollups, etc.

I think I may have to put some effort into becoming more of a Fluxbox power user!

Wednesday, February 7, 2018

Setting Patterns

It is time to give Nmxj some settings. I really like the VIM and Qutebrowser settings pattern for listing and setting configuration options (I'm not doing the 'rc' file model at theis point), so I will be going with something similar. I thought about doing a config file that could be edited manually or through the UI but I've decided to go with a DB driven structure so settings will be made solely through the UI.

Honestly there won't be a ton of settings - at least not right away. So far just the default database file to open when Nmxj is launched (This is automatically updated when the user opens a different DB file), indentation amount for indented fields, and screen clearing. The screen clearing tells the app to either display output in a running stream or to.clear the screen with each output.
Settings values / names can be viewed with a get:[filter] command, and set with a set:<setting>, <value> command. If in time this becomes unruly I will probably convert it to a config file and.UI structure. At that point I'll have to dig a little into storing settings into a file in Java. Up until this point I've only dealt with manually edited config files that are just read by the application.
What are your favorite settings patterns?

What You Should Be Reading 2017.02.07

VIM as an IDE
My VIM is utterly barebones. My vimrc just sets expanded tabs, defaults folding to indentation mode and sets line numbering and special characters to visible. But it is amazing to read about what can be done with plugins. VIM truly is the best editor evar.


Duck Duck Go vs Google
I use Duck Duck Go every day, at home and at work. This breakdown of some of Google's creepery should convince you to join us :)

Tuesday, February 6, 2018

Totally Different Animal

I have been working on rewriting Nmxj (Notes etc Java console app). After spending so much time on the IntFiction engine it has been kind of surprising how different Nmxj is. It is a completely different beast from my other console applications. The biggest reason for this is the flexibily an complexity of the commands. Although they are simplistic comoared to most real consoke applications, they are a much greater challenge than all my other Java console apps.

A great example of how they are tricky is the 'using' feature. The idea is when an entry is viewed it becomes the active entry - the one the user is working with. By having a current entry, the user doesn't have to enter its alias every time they call a command... but they could. Commands can be appkied to the current entry or any other entry.

Often, commands have other optional parameters as well, and a few even have optional flags.

To deal with this, each entity class has a Validation class that does all the tedious parameter validation.
 
Is an entry currently being used? If so there can be one less parameter. But the first parameter might be a different alias, if so use that and set it as the using alias.
 
Is the next parameter one of the possible flags? If so set the flag and on to the next parameter.

After all the validation, return a value for every possible parameter so the other methods don't have to care, just use them.

The upside is the rewrite has taken only three days to get Nmxj in a working state. Now for testing and some straggling features.

Sunday, February 4, 2018

I'm Too Picky

Well apparently I am a very picky person. I have an upcoming trip and decided - even though I WILL fail - I'm trying to scrape up a few thousand dollars for a really nice dive watch.  Not that I don't love my low end Armida. On the contrary, I like my Armida so much I just might end up blowing my money on a high end Armida. Even though - case wise - it would be identical to what I have. However it would have an ETA movement and 500m water resistance. So this is kind of like job searching when you love your job.
Every day I sit around for a bit looking at what's out there. I like super minimal classic dive watches. I like black faces and bezels. I like minimal hands - or very vintage style ones. So right there something like 80+% of my options are gone. No complications, or date bubbles, or overly large cases, or big huge buttons / crown cerings (whatever they would be called).
I like the IDEA of Omegas, but I don't love most of their watches. I like their black military watches, but very few military watches are worth the quad digit price to me. Steinharts are pretty cool - but lower end and they have domed crystals. So I'd rather just get a higher end Armida.
As much as I try to.not like them, I must say I do love the non-date bubble Rolex Submariners (I believe these are actually the originals, the bubble was added later). They are minimal and absolutely classic. But at five digits there is NO way. And again, I actually kind of like the look of Armidas more.
I also like the Tudor Pelagos. It's different, so it is nothing like my Armida. It's not a classic diver but it's very minimal and has all the characteristics of a classic. And while it's beyond my paygrade - if I were to REALLY hump and git it - I might be able to pull it off. I've tried one on before and it was amazing.
So that's it. After weeks of looking, I've found TWO possibilities. I am apparently VERY picky.

Thursday, February 1, 2018

I Like It Dark

I'm still irritated at Slack. It seems like such a little thing. Yet there it is, the business version of IRC, and all you get is a blinding white background. I don't like white backrounds. Every editor I use is white on black. The console launcher on my phone is white on black. Twitter? Nightmode. Texting? Textra, all black, white text. Bible app? Night mode. My clothes? ALL black - some with white text.

So there's Outlook, Notepad, Facebook. No white on black option. I would expect that from Notepad or Outlook. And Facebook is lame :) so yeah (But the cool people make their posts white on black).

Slack is a mystery. How Skype of Slack. I would think Slack of all these apps would have the most visual options. Well when they get around to adding white on black I'll be using it.

Learning By Doing

When it comes to learning, I am a do'er. I like reading books and watching videos and online courses, but I usually don't really learn until I have a task. Sometimes this is as simple as going in and cleaning up code as opposed to reading through it. I'll have a far greater understanding of the code doing tasks like that. I am able to focus, knowing that I'm doing something.

I actually like documenting as well. I've always liked toying around building help systems or large collections of notes etc. At times I will use documentation to learn about projects or systems. These notes are very useful. I tend to need my notes often.

I have even done similar to the code reformat with flow charts. I've taken an existing flow chart and recreated it with greater detail geared toward developers.

I guess, do what ya gotta do to get it done.

5 VST Effects I Use in Every Song

VSTs are so great. I have a massive collection of free instruments and FX that I've tracked down. There are SOO many to choose from... B...