1. 14

Heya lobsters,

It’s Monday again, a new week!

We had a couple of very interesting posts on lobsters last week – Emacs, virtual dom, amd/aarch64, MacBook Pro charger teardown and others. Hope to see more!

What are you going to work on this week? Feel free to share and seek help/advice if you want.


  2. 8

    I’m still working on a new posix sockets binding for Dylan.

    This is proving to be a lot more interesting than I’d thought. I’ve decided (perhaps wrongly) to encode socket state in the type for the socket value. So, I have unbound, bound, server, and connected sockets. Those states are only for TCP sockets though and the rules are pretty different for UDP sockets, so I’m going to end up with separate types for TCP and UDP sockets and their states.

    It may also be complicated by blocking vs. non-blocking sockets. connect() with a blocking socket should return a connected socket, but with a non-blocking socket, it would return a pending socket.

    Interestingly, there doesn’t seem to be a lot of prior art in this area, which seems wrong / nuts.

    Another thing that I’ve identified here is that I’d like to be able to have customized compilation error messages, not just “no applicable method”, for cases that are invalid but common errors, like accidentally calling listen with an unbound socket (must bind it first), or other state violations.

    I’ve written many socket bindings / usages in the past, but this is the most in depth I’ve ever gotten, I guess. I’ve even learned new things about sockets and I’ve been using them for over 20 years. (Like I didn’t know about calling connect(udp_socket, NULL, 0) to disassociate an address from it.)

    This feels good though as this is something I need as a stepping stone on a bigger / longer term plan and I’m finally getting closer to that.

    1. 2

      Interesting! I apologize if this is a dumb question, but how are you thinking about handling all of the external mutable state associated with sockets? Not merely {bound, connected,etc.}, but all the setsockopt stuff.

      1. 1

        I mentioned non-blocking vs blocking sockets as being a complication. I don’t know of a good way to encode all of that state into the types without it becoming unwieldy.

        I haven’t seen any research pointing in that direction either …

        My plan right now is to go down the path that I am and see what happens and if something better presents itself along the way. :) After all, most socket libraries don’t even go to this extent, even in static typed languages.

    2. 6

      I spent some of the weekend diving into authoring webpack plugins. The documentation seems to be more of a reference and is not terribly helpful for me at the moment. As a result, I’ve been going through the list of extension points and logging out what data gets passed in to find my way around. It’s a giant yak shave for the purpose of rebuilding my blog as a static site. The idea is to use webpack loaders to transform different content types so I can then render them out in different places, etc. After doing this I should be able to add an excerpt-loader which would check to see if an excerpt was already written manually, then take the N first words of the content and add it to the data. The templates would then receive something like this:

        meta: {
          date: 'last friday',
          title: 'Markdown Powered',
          url: '/on-being-markdown-powered/',
          excerpt: 'really long content...'
        content: '<h1>really long content from a markdown file!</h1>'

      In my head, this means that content types could be npm installable and optionally auto-discoverable by the framework. For example, one could npm install whatever-myslides and then start using folders named myslides-presentation-title/ which would render full presentations at /slides/presentation-title/.

      We’ll see how far I get anyway.

      1. 5

        Trying to finish a blog post about the Traveling Salesman Problem, Metaheuristics and Rust. I’m sad that it’s taking me so long, but life gets in the way :/

        If anyone is interested in reviewing, it’d be awesome to hear from you: alfie@alfie.wtf

        1. 5

          Trying to put together a good introductory tutorial and improve documentation for my pet language, Myrddin, and start looking at porting the thread library from Linux to OSX, *BSD, and Plan 9. (Since I don’t link to libc, I don’t get to use pthreads.)

          1. 5

            We’re 15 days from launching our first product for our first startup and I’m a bit scared, honestly.

            1. 2

              It’s okay to be scared–lotta folks’ve been there (myself included).

              It’ll either go really poorly, in which case life will go on, or it’ll go not poorly, in which case life will go on. :)

            2. 4

              Hopefully this week I’ll be able to switch in IPFS in Peergos. I’ve incorporated the self cleaning merkle btree and moved the metadata to the dht, so it’s almost there. Also has the nice benefit of making the only central component left the username -> public key mapping and the follow requests, both of which are tiny, low traffic and would fit well in a block chain.

              1. 4

                I spent the weekend learning the QTools wrapper around the CommonQt library for using the Qt GUI framework from Common Lisp

                The project I created displays interactive line drawings based on hypocycloid and epitrochoid curves, similar to a spirograph toy. The source is on Github with a bit more information and screenshots.

                At some point I realized that animating the images would be really neat, so I added that to the GUI, but also made a new project specifically for generating a series of PNG images that can in turn be fed to ffmpeg to generate video files. This one is also on GitHub. I also put up a sample video, but I need to figure out the compression settings and Vimeo settings, because the quality isn’t as good as the original.

                Tonight I plan on merging the two together so that video files of the animation can be generated right from the GUI. I might also make a screensaver out of it using SDL/OpenGL.

                1. 3

                  For work: continuing work on a React-based UI component library and GraphQL API proxy layer.

                  Personal: finishing an article I’ve been researching and thinking about for years, regarding Web markup.

                  1. 2

                    The last week of school is upon me and final exams loom. In the face of this I’m doing the responsible thing and ditching the last week of classes entirely to fly out to SF for interviews with the hope of sorting out full time options over Christmas break and knowing where I’ll be going by the time the Spring semester starts. So if you’re in SF and think that I’m not a raving lunatic hit me up I’m looking for dinner dates this week.

                    Pretty much all side project work is suspended. My hardware transactional memory work has reached the final draft phase and I look forwards to posting it (and may be publishing it “for real”) soon.

                    1. 1

                      same boat, neglecting school responsibilities as I prep for interviews next week. So much more fun to do ~30 minute algorithm/data-structure sprints than accomplish real tasks…

                    2. 2

                      That new AVC.com post on lists got me thinking. Perhaps I can find the time this week to revive that old project I had from last year which is described as “a centralized place to find lists for all your development needs”, but I want to get away from PHP, which is god awful.

                      There’s a bunch of back and forth discussion going on at the bottom of the blog post.

                      1. 2

                        To make a change, this week I’m gonna be helping on the infrastructure front for $work. I’m not exactly sure what they expect me to do, but it’s a nice change of scenery. Taking the two last weeks of the year off, and I really, really need the time off. Also I should totally be working on my lunch and learn.

                        1. 2

                          Slides Slides Slides Slides.

                          Oh, and some benchmarking on the side.

                          1. 2
                            • Becoming a better technical leader
                            • Being healthy
                            • Becoming a better executive team member