Source mirror; https://github.com/g-pechorin/sstate.scala Won’t actually build, use the full repository here Releases (tags) https://github.com/g-pechorin/sstate.scala/tags "com.peterlavalle" %% "sstate" % ??? 'com.peterlavalle:sstate_2.12:???' SState SState is a cute little pure-functional FSM class in Scala that I wrote after seeing JEasyStates. The only real advantage of mine is that it can (probably) be dropped into a Scala.JS project without any magic. There’s a unit test at the foot of this doc showing how I test it.

Git Copy PY Script

I got super mad at how long it was taking to by-hand checkout and push stuff from my origin branch to other remote. I couldn’t find docs for a git command sequence that reliably did this, so, I wrote a python script to do it. (There were git commands that “pulled all branches” but didn’t, “pushed all to remote” but don’t …) Nitpicking the commands was a bit annoying, butttt, once I was solid that it was running; I could reallocate my attention to something more deserving of my talents.

MultiBranch Mercurial JenkinsFile

This is just a “victory dance” sort of post about setting up a multi-branch build, for a Mercurial project, from a JenkinsFile. When I first tried to do this sthing, I recieved a message reading; ERROR: No configured Mercurial installation which was annoying. I hadn’t needed to setup Mercurial before, why did I need to now? Turns out, the workaround/worksforme from here this bug solves the problem by defining the default Mercuiral setup as … the … default?

Scala Extractors

Scala’s extractors and unapply() represent a concept that I haven’t grok’ed until now. Most demonstrations seem to be too long or use the same types everywhere. Here are my thoughts on the concept; val a: C = ??? val i: I = ??? i match { case a(f: O) => ??? } This will try to call the below method class C { def unapply(i: I): Option[O] = ??? } There’s some more flexibility;


I made a semi-cache coherent container which provides an Entity-Component-System. These are the bones of contemporary game-engines. This post is a bit crude; I keep thinking about it then adding features to Whippet instead of writing this up. Whippet on GitHub Google built CORGI which isn’t (yet?) trying to act cache coherent. It also is more than trivial to build, and suffers from NIH for me. Actually; that last bit isn’t likely to be a problem form most, but I didn’t like their license.

Of Entity-Component-Systems

I made a semi-cache coherent container which provides an Entity-Component-System. These are the bones of modern game-engines. This post is largely a gooey weasel opinion piece. It started as an introduction that grew out of control. So, for now, it’s just a bit of rambling while I clean-up the documentation for my tool. Of Entity-Component-Systems Among other things, Jason Gregory’s book Game Engine Architecture discusses the concept of a data-driven architecture for game software.

Cmder in TortoiseHG

Have you used TortoiseHG? It is lovely! Have you used Cmder? It is lovely! If you … setup cmder to launch from the command line open TortoiseHG Workbench > File / Settings > TortoiseHG / Shell put cmder %(root)s into the Shell field … then you can have these two lovely tools holding hands and kicking-bugs!

Open macOS Terminal in Folder

In January of 2018, you can launch macOS’s terminal with the command /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal1 I have (to use) a macOS computer. I choose to use TortoiseHG because it is lovely. TortoiseHG has a “launch the terminal” context menu entry. Under macOS, you need to specify the terminal command that TortoiseHG should use. You need this, in your preference, to launch the terminal in the repo; /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal %(root)s https://stackoverflow.com/questions/4404242/programmatically-launch-terminal-app-with-a-specified-command-and-custom-colors [return]

Moving Platforms in Unity3D

This is a short example of moving platforms in Unity3D. Based on this tweet, I spent … 30 minutes? Maybe? putting it together. This writeup took longer. The approach uses two behaviour classes to achive the classical effect of moving platforms that follow some path. mark some empty GameObject as Waypoint instances give each Waypoint a next field attach a Mover instance to your platform(s) drag the platform towards the next Waypoint at a fixed rate when you’ve reached the Waypoint, continue with its next one My example;

Adventures in Demo Making

I should just “blog” informally more often - so here goes. I’ve cobbled together a toolchain/asset-conditioning-pipeline of sorts for demoscene type stuff. My system is written in Scala on Gradle and functions by emitting C/++ and CMake files for Visual Studio. All of this produces a C/++11⁄14 and GLFW/GLAD/OpenGL4.3⁄4.5 executable that displays someone else’s ShaderToy project. Nothing revolutionary, but I’m after pretty-code that I can keep using rather than actual hard “street cred” quality demo results.