1. 29

This is the weekly thread to discuss what you have done recently and are working on this week.

Please be descriptive and don’t hesitate to champion your accomplishments or ask for help, advice or other guidance.

For me? My patchset is coming along well. I can almost smell the toolchain bootstrapping, but there’s some runtime issues left to debug before that happens.


  2. 12

    I just wrote a personal wiki in Erlang (it’s currently a little over 400 lines, and is designed for a single trusted admin, but public facing ideas). That project was motivated by me wanting to pick up the basics of Erlang (I picked up Learn You some Erlang when it was part of a Humble Bundle, and wanted to try to put it to use), and to expose a list of ideas I’d been collecting in a markdown file.

    Features include

    • Single Trusted Admin, which means I can use any HTML/JS I want on indiviual pages.
    • Writing everything in HTML.
    • Tag based navigation
    • Being very Artisnal software(TM).

    Pages that might be interesting:

    Once I get a couple of hard-coded values removed from the code, I’ll stand up a fossil repository for the code. (Though it’s not especially good code, being the first big ball of Erlang I’ve written).

    1. 3

      So did you essentially re-write your website (jungle coder) in Erlang? When reading through your blog it mentioned being written in Go.

      I also quite enjoyed your blog :)

      1. 2

        No, this isn’t a rewrite of my blog. For one, this is way more simplistic. It has a lot less styling, for one, no comments, no markdown parsing(yet), not much linking to/from tag and home pages, and it outsources auth to nginx. Another difference is that the bar for content on this wiki isn’t going to be super high (since it’s mostly for me, with occasional sharing to friends), whereas on the blog I usually try to write content that others would find useful or interesting. Actually, once I have a chance to sit down with it and polish it up, I’ll be moving the retrospective to my blog, for example.

        For me, they serve distinct purposes. My blog is a place for me to talk to the world, the other is built to be a place for me gather my thoughts.

        1. 1

          Oh! My apologies I clicked on the first link in your OP which took me to your blog site ( In a green and white color - I’m getting an invalid cert on my end too for what it’s worth)

          By removing ‘https’ it correctly took me to the actual idea.junglecoder.com (the wiki) - that’s why I was confused.

          Any tips in learning Go with a C# background? I’ve been trying to think of things to build or work on.

          1. 5

            No, thanks for pointing out the broken link. It should be fixed now.

            As far as learning Go from a C# background goes, (bear in mind, my path on this has been meandering)

            • Go Standard library documentation is excellent. It’s your new MSDN, but the source is also included
            • Read the source to the standard library if you’re curious about how something works
            • Go has two major strengths: Servers and command line tools. If you want to learn go for what it’s good at, these are the types of things you’ll want to start with.
            • If you can afford it and haven’t already, look into getting a VPS, if you’re interested in Go servers. There are a lot of nice single-purpose servers like linx, Syncthing, Mattermost and gitea. I’ve administered all of these servers for work (mattermost, gitea’s upstream gogs) or personal use (linx, syncthing), and if you know some basic nginx, they’re very low effort. The operational simplicity in getting most of these set up is an awesome thing. It’s not 100% unique to Go, but it’s more common in Go programs. You’ll want to learn nginx and nohup if you do this.
            • If you want to also learn fossil, and check out something rather curious, I have been working on a programming language called PISC.
            1. 1

              Thanks so much for the links!

              Getting a personal VPS is actually one of the things that sparked my interest in Go. One of my small goals is to write a CLI tool or a server of sorts. Coming up with a decently useful idea is the more challenging part. Or writing something I can run/leave running on my VPS.

              I’ve been reading bits and pieces about PISC on your blog - I’ll keep thinking as well.

              1. 6

                One of the really different things about go is that other people’s badly written code is pretty easy to follow (assuming they haven’t done anything especially clever with reflection, which go makes very hard to do).

                I’d recommend finding a small go project to use & modify (I’m hacking on a wiki I found called cowyo)

                1. 1

                  I’ll try that :)

                  Is your background anything close to Go? I’ve been reading a few different books when I have spare time to be go over the language.

                  1. 1

                    I’ve done mostly ruby and frontend; I’ve done a year of go professionally and prefer to use software written in it on my servers (because it tends to be very stable and requires less frequent patching).

                    As far as language specific stuff: you shouldn’t use any of the go-specific stuff (goroutines, channels) in most applications code; let that wait until your app mostly works.

                2. 1

                  You can always go with the classic yak shaves in terms of servers: Blogs, wikis and task-trackers.

                  For the first task, I’d focus on something that’s been done before, but that you might have a personal spin on. That’s why I wrote blogserv, the software behind the main Jungle Coder blog. It was a complete yak-shave, and the code isn’t super pretty or super correct. (As of right now, it doesn’t check HTTP methods when routing, for example. Thankfully, anything administrative has to be authenticated).

                  There are lot of fun little things I’ve done with my server and domains over the years, if nothing else, throwing up a basic web page and static files directory allows me to serve content from my server during events like game jams.

                  1. 1

                    I’ll have to try out some of the ideas I have had with yak shaving - I’ve been wanting to “do it all myself” but haven’t come up with much.

                    Thanks for the suggestion! I’m always open to more.

        2. 2

          A page for tracking where I am in each of the webcomics I currently read.

          Have you tried Piperka? I’ve used it for like a decade now and it’s great for this.

          1. 1

            I have not. I’ll give it a spin if I get frustrated with my wiki page (though I kinda want an excuse to use my wiki on a regular basis)

        3. 11

          Thank you for the wonderful comments last week.

          I wrote an Earley parser. And a Pratt parser. The Pratt parser is what I’ve been looking for all this time: a modular recursive descent parser. What it lacks in formalism it makes up with in brevity and power-to-weight.

          Now, I need to choose a host language. I’d like to pick Rust, but I’m not sure it has a ready-made GC solution right now, and I don’t want to go down that rabbit hole. That leaves C++, JVM, or OTP. Any thoughts?

          1. 3

            What kind of language are you looking to interpret/execute? The three platforms you mention all have really different tradeoffs.

            1. 3

              A Lisp-esque language under the hood with a non-Lisp syntax on top. Idea is the functional paradigm can subsume the other two big paradigms (imperative/logic). Can use the CEK machine for proper tail call handling, so that isn’ta requirement of the host. Big thing I’m looking for is a GC (whether lib or built-in) and a language I like that I can target it with.

            2. 2

              For rust, you can wrap everything in a Rc, or if you have multiple threads an Arc, or if you want tracing GC you can use this, or if you just need epoch-style reclamation there’s crossbeam-epoch or if you just need hazard pointers there’s conc. I’ve had a lot of success with crossbeam-epoch in lock-free systems I’ve built.

              1. 1

                Rc (and friends) would need cycle detection, no? Maybe the thing to do is just use Rc and do research on cycle-detection algorithms to see if they are hard or not.

                I looked at Epoch and hazard pointers and wasn’t sure if they were ok as a general GC. I need to do more reading. Thanks!

                1. 2

                  Yeah, you can create memory leaks with Rc cycles in rust. But this is rarely an issue in most use cases. Rust memory can feel a little confusing at first, but cycles tend not to come up once you learn some different idioms for structuring things in non-cyclical ways.

                  For example, if you want to build a DAG, you can quickly implement it with a HashMap from ID to Node, where ID is some monotonic counter that you maintain. Each Node can contain Vec’s of incoming and outgoing edges. You can implement your own RC-like thing that tracks the sum of indegree and outdegree, and when it reaches 0, you just remove the Node out of the containing hashmap. For the cases where performance or concurrency concerns rule out this approach (which are rare and should not be pursued until this is measured to be a bottleneck) you can always write Rust like C with unsafe pointers, Box::into_raw, dereferencing inside unsafe blocks, and free’ing by calling Box::from_raw (actually calling drop() on that if you want to be explicit about what’s happening, but it will be dropped implicitly when it goes out of scope). Use mutexes on shared state until… basically always, but if you REALLY want to go lock-free, that’s when you can benefit from things like crossbeam-epoch to handle freeing of memory that has been detached from mutable shared state but may still be in use by another thread.

                  Feel free to shoot me an email if you’re curious about how something can be done in Rust! I know it can be overwhelming when you’re starting to build things in it, and I’m happy to help newcomers get past the things I banged my head against the wall for days trying to learn :)

              2. 2

                FWIW, many languages written in C or C++ use arenas to hold the nodes that result from parsing . For example, CPython uses this strategy. I’m pretty sure v8 does too. So you don’t manage each node individually, which is a large load on the memory allocator/garbage collector – you put them all in a big arena and then free them at once.

                1. 2

                  Save the earth , use C++ or OTP

                  1. 1

                    You also have Go and .NET Core as possible host runtimes.

                    1. 1

                      What about Nim? It seems to be a memory-safe language with low-latency GC, macros, and produces C. I mean, the Schemes are ideal if doing language building with LISP thing underneath since they start that way.

                    2. 10

                      Getting my next debugging books review up. I’m just about finished Metzger’s “Debugging by Thinking” so that gives me 3.5 books to write about. I was going to read all of Polya’s “How to Solve It” but I want to go over that one more slowly, so I’m only going to consider the first two parts.

                      1. 8

                        I had a lot of trouble sleeping this weekend which means I actually ended up working on something. I put a bunch of work into my Neocities CLI interface and (eventually) rust library: https://github.com/azdle/neo

                        It mostly works as is now, but it’s incredibly rough around the edges and has zero documentation. I’m now hoping to keep up the momentum on it and get at least the CLI really polished off. I’ve struggled in the past with motivating myself to work on things, even when I already really want to, and I’m hoping that having something that I’ve gotten to a solid 1.0 that I can be proud of will be addictive to me.

                        So, on that note, if you have an CLI tools that you really enjoy using, post em here, I’m looking for ideas to steal to make this a delightful tool.

                        1. 8

                          Rushing to get my lock-free rust bw-tree-backed embedded database to an alpha state before FOSDEM next weekend, where I hope to encourage a few people to give it a shot for low-impact workloads. Thinking about ways of applying real-time scheduling to threads in a concurrent property testing library I’m writing to tease out bugs in the bw tree to get similar results to PULSE when used with quviq’s quickcheck for erlang. I will name my first child “Determinism” after the past few months of intense debugging…

                          1. 7

                            My resume. :/

                            1. 1

                              Slanty face for a layoff? Seems to have been a few people in my extended networks hit in the last two weeks. Nobody seems to be having an issue finding a new gig but that is still a slap in the face.

                              1. 2

                                Not a layoff. The project I’m on is circling the drain and I don’t know if I can keep up the facade and stay on the ride until upper management kills it.

                            2. 7

                              I am integrating patches from several forks of GNU superopt.

                              1. 7

                                For fun(!) I wanted to make a client for MPD with Elm and display:grid. It now works more-or-less and was easy enough to do, but I’m not really happy with the default websocket library from Elm. Maybe there is one with a more explicit connection state? For this week to finish it I want to make the design presentable.

                                1. 4

                                  What in particular are you looking for in controlling the connection state? The idea behind the websocket library is mostly built around the idea that you shouldn’t need to worry about handling the connecting or how messages are sent. You can use the low level functions to put together an explicit model of the state if that’s what you need

                                  1. 2

                                    I would like to know the state of the connection, so I can display that. Or not show certain parts of the GUI when there is no connection. The current magic reconnects by the high-level module can take quite a while, with the build in exponential backoff (and reloading does not force the establishing of a new connection, somehow).

                                    The low level functions are really rather low level :) Guess I’ll have to dig in them anyway…

                                    1. 2

                                      Indeed, for those types of situations you are best off using the low level stuff directly. If you need a hand, join the Elm Slack – there’s lots of people who can help!

                                2. 6

                                  Final few issues for ack 3 to go to its first 3.000 release.

                                  1. 6

                                    Last week I finished up implementing live-streaming logs for the OfBorg build system used by Nixpkgs: https://github.com/NixOS/nixpkgs/pull/34386#issuecomment-361258104 / https://github.com/nixos/ofborg. (The self-inflated name of the bot started out as a joke / silly hacky thing and turned in to something serious.) The frontend was written by another member of the NixOS community, samueldr. The backend was nicely simple to implement from RabbitMQ: STOMP.js is a delight!

                                    This week I’m expanding its test runner to run the VM integration tests on aarch64 (https://github.com/NixOS/ofborg/issues/36) and hopefully work on coalescing build result comments (https://github.com/NixOS/ofborg/issues/47). This requires rewriting one of the last PHP components in Rust, which I’ve been wanting to do for some time now anyway. Combining the comments should open up new, interesting opportunities like automatically sampling pieces to build per PR, and perhaps separating build logs per attribute requested, which could also open up interesting future options…

                                    1. 6

                                      I’m all over the place this week. Some minor things to fix on the OpenBSD port of Arcan, along with a writeup on the porting experience as such. Then there is some low level stuff when it comes to accelerated/compressed handle passing/mapping/drawing for multi-planar YUV formats that falls in ‘tedious, please kill me, has to be done..’. To not burn out on that I’m playing around with support for 180/360 stereoscopic video playback on HMDs.

                                      1. 6

                                        Today I finished the v0.9.5 milestone for SECL which fixes some of the bugs someone reported to me via chat. The query language can now also access list indices or filter out either the map or the list of a value. Sadly I did break compatibility in two cases, though I don’t have enough adoption that many people should care. Might work a bit on how to get macros working and finalize v1.0 after some cleanups.

                                        I also moved from Ansible to Fabric for my server configuration, it’s much nicer since I can script out the various steps of the configuration instead of having to fit it into the ansible templates.

                                        Though some ansible .yml files will hang around until I can translate them into python.

                                        For the next few days I’ll have to monitor the space usage of my backup scripts on the server to see how it develops.

                                        Otherwise I might work on some more relaxed projects, ie that on archival/curator thing I wanted to work on, which I mostly threw under the table so far. I’ve started some doodles on leftover printer paper on the architecture and design stuff.

                                        1. 6

                                          I started today on my ideal personal day planning tool. It’s a very simple browser app where I can create a number of blocks for the day—like a queue of named pomodoros with an implied flexible break between them.

                                          I’m learning to write good specifications and enjoying playing with TLA+ and watching talks by Leslie Lamport and Ron Pressler.

                                          Now I’m going to a meeting for a local obscure political magazine for which I have ended up as the WordPress guy.

                                          1. 5

                                            $class: Memorizing human anatomy and legal issues wrt not letting people die. I’ve been taking a lot of tangential notes on the systems complications of EMS, like how calls are recorded and such. Then I’ve been mocking out simple software architectures, mostly to keep my skills sharp.

                                            $!class: book stuff! Writing more of the TLA+ book, but in addition, two reading projects:

                                            • Haskell Book by @bitemyapp and Moronuki (who isn’t a lobster yet). Definitely one of the better introductions to the language I’ve found.
                                            • Data and Reality is absolutely incredible. I can feel my understanding of taxonomies and type systems warp as I’m reading it. I’m carefully annotating every page so I can share both the book and my annotations with friends. It makes the going much slower but I’m comprehending a lot more. I might push a couple of friends to do annotations on top of my own annotations, just to see what happens when the book is covered with us all analyzing it.
                                            1. 5

                                              Way more JavaScript than I ever thought I’d be writing in my life, which brings me to my favourite joke:

                                              I’m not sure if I’m starting to love JavaScript or if I have Stockholm Syndrome.

                                              1. 5

                                                Working on a game in webgl, and packaging some tiny quality of life tools for my workflow in the meantime. main takeaways are that regl and glslify are really delightful!

                                                A mystery for the reader: What is this weird rendering artifact i’m getting on mobile? image

                                                At work this morning, fixing a small crop of bugs that popped up over weekend <3

                                                1. 5

                                                  Working on Rustwell

                                                  I have two NAS boxes, a Linux laptop, and large disorganized collections of family photos scavenged from drives long dead, relatives dropping by with cameras, SD cards and phones to back up, et cetera.

                                                  I tried to use Gnome Shotwell to unite them all, but had a lot of frustrations. So I want to do as follows:

                                                  1. Write a Diesel & Rocket front end for the Shotwell SQLite database (In progress)
                                                  2. Add two object tables to the database: a. An Object Location table, listing copies of every entry in the Shotwell video and photo tables. b. An Object Store table, storing enough meta data to enable listing copies on an arbitrary collection of NAS resources, as well as sites like Flickr, Shutterfly, Piwego, Amazon S3, et cetera.

                                                  Then populate my DB, by scanning all my storage locations, and detecting duplicates so the Object Location row keys to the right rows in PhotoTable and VideoTable.

                                                  I am writing this in Rust in hopes of having my BeagleBone board do the grunt work in the background regardless of what my laptop is doing.

                                                  1. 5

                                                    Last couple of weeks I’ve been working on improving some of the Elm tooling that exists. In particular, I’ve added these things:

                                                    • elm-bash-completion which gives you auto-complete for Elm tools in your bash/zsh terminals
                                                    • elm-help which is a tool to give you information about a particular package or your local application from the command line
                                                    • elm-documentation-parser, which is a “mostly works” library for getting documentation from Elm files that matches the docs produced by the --docs flag in the elm-make binary
                                                    1. 5

                                                      $work: In some ways better, in some worse. Mostly I’m just happy I don’t have a release for another month or so.

                                                      !$work: A lot of my programming stuff is on hold while I plan out some springtime shopwork. I’m scheduling a trip to Brimfield, getting a dumpster delivered for spring cleaning, identifying what I want to get cleaned during spring cleaning, getting plans together for the work I need to do in my shop, and figuring out whether or not I need various permits for a couple outbuildings on my property. Lots of nice, bitesize bits of work that I can just do and feel accomplished about having done. I highly recommend doing something like that from time to time, it’s good for the mental health.

                                                      Also throwing stuff away is literally my favorite activity.

                                                      1. 4

                                                        Applying for jobs in research, mostly FFRDCs. I’ve decided that unless I am absolutely stuck in Corporate forever– unless God hates me that much– I’m getting out. These slimy profit-motive companies… I don’t see the point.

                                                        1. 4

                                                          $work: try to document the mess that is our custom hacked Wordpress installation and maintain my sanity…


                                                          1. find a CMS to host my BMX club’s new website - the server will be OpenBSD and I think I would like the CMS to use either go or python, any and all lobste.rs recommendations appreciated :~)
                                                          2. catch up with Return to Teaching online course that I’m currently on…
                                                          1. 4

                                                            This weekend I’m going to be working some ideas for approximate membership queries – aka what I should have been doing last weekend before I got sidetracked by a neat storage trick I found while reading related papers.

                                                            Pretty happy I decided to take that detour though - getting stars on github was way more exciting than I thought.

                                                            1. 4

                                                              Currently taking a break from personal projects until Wednesday, but from Thursday onwards I’m going back to the web-based rhythm game I’m currently a contributor for, Bemuse, and begin the process of upgrading the Webpack on that project to Webpack 4, since the beta for it is currently out.

                                                              Glad to be working on stuff again after a somewhat busy week!

                                                              1. 4

                                                                $work: a strange week where I’m wrapping up a bunch of tiny projects that probably shouldn’t have been done at the same time. Life of a internal tools engineer I guess.

                                                                $play: Gonna get some work in on my pet language Tiko. Dunno if it’s more than I can reasonably get done in a week since I’ve never done it before, but I’m gonna try to generate some LLVM IR and get it moved over from an interpreter to a compiler!

                                                                I only have so much play time until the 10th when a friend of mine and I are gonna start a more serious project, so getting all the code-frivolity out before then. Probably wouldnt be a bad idea to give myself a bit of a screenbreak either.

                                                                1. 4

                                                                  Spent last week clearing my garage out some more and picked up a weight bench & some free weights. Done one session in there so far and could do with some more 5kg plates but mostly I just need to continue lifting. Injured my foot (I think I kicked the bed, but I can’t remember specifically doing it. No cycling till that heals irritatingly.)

                                                                  I’ve recently been fed up with recording my blood pressure, as the recommended way to do it is to take three readings a minute apart and record the average of the three results. This means writing down three values and averaging them, to then go enter them into Healthkit on my phone. (Already massively lean on Apple’s ecosystem, one more thing can’t harm.)

                                                                  Got bored of doing that, couldn’t find an app that did it for me, so sat down at the weekend and started writing my own. Ended up working out how to present a keyboard when a label is tapped (labelpicker is that test project), and BPCalc is the main app’s repo. This week will be hooking up the data entry, and adding the calculation. Also want it to be able to save straight to the health store for me but that might be next week’s task.

                                                                  1. 4

                                                                    Hating my life because we’re a month-and-a-half past our scheduled release date because of a subtle bug in our code that wasn’t caught due to the nature of our test data (I know, I know!) and a bunch of testing not being done on the UI side because we’re understaffed.

                                                                    1. 2

                                                                      Dont waste time with automated tests. Users are unpredictable creatures and do crazy shit. Exploratory testing will save you time. except regression tests, do those.

                                                                    2. 4

                                                                      Nothing! I’m at dotSwift now, and FOSDEM later. I’m working on nothing.

                                                                      1. 4

                                                                        Got an interview on Wednesday for a javascript developement position, so I’ll be refreshing myself a bit on the most popular backend / frontend frameworks and checking out new developments in the language.

                                                                        The cool part about this job is that it’s in the microbrewery industry, so I’m excited by the prospect of bringing those two parts of my life together.

                                                                        I’m also thinking about turning one of my desktops into an openbsd server and moving my various cloud services over to it. (mostly email, xmpp, git and nextcloud)

                                                                        1. 3

                                                                          Working on getting MAP_FIXED work on a CONFIG_NOMMU architecture in Linux… Fun!

                                                                          1. 3

                                                                            In terms of work, work is progressing smoothly, hopefully this week we can meet internal deadline to release alpha version.

                                                                            In terms of side-projects, I’m learning game development. Currently doing that in Java (I’m a JS dev), and I’m doing the hard route of learning to make a game with LWJGL directly, with no framework. If by the end of this week I can display a sprite on the screen which reacts to my keyboard, that’s good progress I figure.