1. 18

The weekly thread where we share our muses, work, and problems. Don’t be shy!

I’m working on a small project w/ Node and Express. Express is the main reason I justify using Node - it actually works well and easily extendable.

    1. 7

      Documenting qmail + courier-imap + ucspi-tools (tlss) on OpenBSD.

    2. 6

      This week and the next will be spent finishing up a yesod app for my latest contract, this will be my first (on my own) software launch (besides static websites) so I’m a little nervous, but hopefully everything will work out.

    3. 6

      I sent the first test version of my little game engine to a few friends, and now I’m getting shafted by AMD.

      I have Intel/NVIDIA GPUs to test on, but not AMD. Debugging by sending people new binaries is quite tedious, doubly so because ARBdebugoutput/glGetError aren’t giving me anything. For reference: !AMD / AMD

      My shaders survive glslangValidator, and besides that I have no ideas on what to try.

      Besides struggling with video drivers, I’m going to be working on networking/collisions and trying to get something that’s actually playable by the new year.

      1. 1

        Ooh, what language are you using for the game engine? That screenshot looks pretty neato btw.

    4. 4

      Mostly this week I’m spending it in Edinburgh, enjoying the real life company of colleagues/friends and all the fun that comes from that.

      I did put my iOS prototypes on Github, will continue with them in downtime this week no doubt. Been really liking hacking with WatchKit, the limitations of the wrist device & what’s allowed really feels empowering rather than restrictive. Workout Extractor will export  workouts to TCX format eventually, and Healthwatch is for quickly entering health statistics as you measure them (weight, etc).

    5. 4

      I’m putting the finishing touches to my talk about mutation testing for an upcoming conference. Still trying to wrap my head around the problem of non-terminating mutants. I can’t tell up front if execution of a certain piece of code will terminate. At the same time I can’t just let it run and kill it if I suspect it’s non-terminating, because I’m on JVM.

      From what I can see there appears to be no reliable way to stop a thread on JVM. Thread.stop is deprecated and Thread.interrupt—IIUC—can be ignored. If I were able to fork, I could’ve run potentially non-terminating computation in a child process and kill it once time runs out, but that’s not possible. I’m looking for a solution to the problem, trying not to think about bytecode manipulation yet. Ideas? Please let me know!

      1. 3

        Godel’s theorem shows it’s impossible to do that in general. Formal methods people do it on semi-complex, constrained programs with much work. High-assurance field cheated around it in embedded with two methods: watchdog timers; preemptible, self-contained threads with deterministic scheduling.

        The first is simple: set timer for max it should ever take under any circumstances, set error function for that, timer counts down as function works, interrupts if it’s hung, and error code deals with it. Built into a lot of MCU’s.

        The second in a VM would involve monitoring threads, counters, and worker threads. Monitor either starts threads or is informed when they do. This by itself can be useful to log. The counters are internal to functions or objects always going up. Monitor keeps a copy that it periodically compares on certain intervals to see if progress is being made. Likewise, might look at start and runtimes of threads to see if they ran too long like watchdogs. Kills whatever it needs to. Should be easy to implement if it’s non-standard.

        The third route was one I used for fake real time and what sklogic on Hacker News independently came up with. Best Godel cheat ever: a while loop that runs the code a few steps at a time with a counter always running downward. If hits zero, while terminates with notification and/or state in logs. I have on my backlog ths idea of making compiler pass or DSL that automatically generates code like this for a specific piece of existing code. Not doing it for now but might make a nice project.

        Copilot is similar to what Im describing. Such techniques might be modified for Java:


        1. 5

          Can we all at least admit that it is kinda silly to have a VM where you can create threads but can’t do something as simple as “Hey, next time this thread is scheduled, just…um…don’t?”.

          There are a lot of great academic reasons why that’s a bad thing, and make concurrency hard, and is prone to instability…but in spite of all that it’s still a useful feature to have.

          1. 3

            Im 100% with you. I dont do Java but assumed they had a kill function. That poster said they depreciated it or something. I cant imagine whatever they’re preventing is as hard to analyze as integrating the work arounds I just posted. Even RTOS’s, easiest to analyze for reliability, let you kill things or give them no CPU. Truly WTF.

      2. 2

        The potentially non-terminating code can’t periodically check in with a semaphore on the outer loop to know to halt?

    6. 3

      I’ve been trying to learn Reactive Extensions better, so I’m writing a Phoenix channel client using Rx.


    7. 3

      I’ve been making a terminal mind mapping tool in rust. It’s been nice to step away from distributed databases for a little bit and focus on a new domain, and in the process I’ve gained a new respect for user interface work. I forgot how mathy it can be, and it’s been quite fun sweeping the cobwebs off algorithms I haven’t thought about since my last Google interview.

      I’ve been using it for auto-task selection based on specifiable priorities, and tying a number of random ideas I’m learning about into a more cohesive whole. It’s been quite helpful for taming my wandering mind. Why haven’t I been writing software that helps me improve my own productivity since I started coding? It seems like a wonderful thing now that I’m in the midst of it :)

      Also: it’s been great seeing how nicely quickcheck works to find bugs in UI’s when you can boil the inputs down to terminal interactions. It still feels like magic to me when I write what seems like a simple change, only to be told that by hitting ^n 5 ^w ^n tab Enter Enter will cause an invariant to be violated. I don’t know how long that would take to find without generative testing, or how warped my assumptions would lead my code to becoming.

    8. 3
      • Did more work on my lisp compiler - mostly cleanup and work towards closures.
      • Writing the Fallout pipboy hacking minigame for the Apple 2 (since my roomate has one sitting on his desk, and I have to do something cool with it). Currently, it’s written in C and running on an emulator on my laptop, since I can’t be bothered to learn 6502 assembly or BASIC, or write it without Vim available. Once I finish it, I’ll throw it on a floppy and test it out on the real deal :)
    9. 2

      I’m hoping to finally get close to a completed draft about a whitepaper on a privacy project I’ve been working on later this week.

      I’m also working on a talk on building your own hardware hacking hardware for a conference in San Francisco this Saturday.

    10. 2

      A mind-numbing technical debt clean-up project for our Java mail tool at work but I think I’m going to dump SQS and try NATS out. More tinkering with Docker/K8s for my personal web presence. Reading DevOps Handbook. Presenting at Triangle DevOps on Wednesday.

    11. 2

      Playing around with my new PocketCHIP. Customizing it, running emultators on it, etc. May try and get void running on it at some point. Installing void on my laptops, too. They needed to be updated with an OS I’ve been using for a while.

      @OP - out of interest, why don’t you like node in general? I know it’s preference but I’m just wondering.

    12. 1

      having run into a brick wall in my learn-me-a-css adventure i’m going to take a break and hack on backend stuff for a while. i’ve been meaning to build a persistent 2d array library on top of ocaml-containers since i think 2d is a special enough case that it deserves its own api.