1. 20

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

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

  1.  

  2. 20

    Just finished showrunning a large esports feature over the weekend for ${most popular game}, with x00,000 players. 8 hours staring at graphs, soaked in sweat. Yet again, disaster loomed but was averted by the power of erlang. Pet, pet. Good erlang. That’ll do, erlang. An upstream network provider exploded under the load and started sending a mix of no data and unexpected data; hundreds of erlang processes crashed into the ground; tens of supervisors kept marshalling the forces back to life despite minutes of continuing failure; and when the upstream service struggled back to life, the fiftieth generation of resurrected processes kept handling the (X00) megabytes/sec of data as if nothing had happened. Probably the proudest I’ve ever been of my code.

    This week we’re rewriting large swaths of the backend and app code to adjust our game. But we have one whole week to do that, so it ought to be fine, right?

    1. 6

      Wow, that’s really awesome – talk about the success of the ‘let it fail’ architecture. I’d love to see a more detailed article about how you designed and implemented some of that (dunno if that is even possible). I often stare over the wall at the Erlang world and think, “My, what a lush and lovely lawn they have on the other side of that fence.”

      1. 4

        seconded; i’d really love to read a detailed writeup about this.

      2. 4

        LOL - congrats. :)

      3. 12

        For money, I’m finishing the set up of a cluster in “the cloud” so that we can “scale” our “things”. I’m double-quoting the buzzwords because in principle that doesn’t enable us to swiftly switch providers yet, we have no mechanism to spin up new instances automatically to attenuate load at peak times yet, and “things” is because it just seems that we’re using the “cloud” thing as a silver bullet and I don’t believe in unicorns.

        For my own fun, I’m gonna be reading up on Elixir (the language) and I’m gonna be releasing an early version of an open source thing that grabs an sql schema and craps out nice idiomatic Go code out of it. Kind of ORM-like, but not really. Probably has been done a few different ways before, I’m just building it the way I want it to work. Maybe I’ll post that here later on.

        1. 2

          Heh, I think the space of database mappings that aren’t ORMs, or aren’t quite ORMs, hasn’t been adequately explored. Please do post it when it’s sketched-out enough to show. :)

        2. 9

          Work: Getting prepped to help out our Java team here at work. Being a JS architect was fun but unfortunately our companies' focus is changing it and requires the project I was working on to be shelved, this is due to the lack of developers we have. I got some spiel about how people think I’m a quick and efficient dev, but sometimes you just have to think if people are BS-ing you.

          Personal: I’m looking to get into SICP now that I have some free time again. I love FP and potentially would like to work on some projects with it. I’ve used Haskell before and loved it! I feel like LISP is used more than Haskell/ML languages though and could potentially lead to me having more opportunities knowing LISP (clojure and scheme are the goals).

          As someone looking to get into compilers where is a good starting point?

          1. 4

            Sympathies about the work thing. It sounds like you already know plenty of languages and Java will be no different; try not to stress about condescending explanations from higher-ups, it doesn’t lead anywhere good.

            Looking to get into compilers…

            I learned from the dragon book, but I don’t think it’s actually that great didactically, and today there are better ones. Still, it was updated nine years ago, which is not very long as that field goes: http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=sr_1_1?ie=UTF8&qid=1428946675&sr=8-1&keywords=dragon+book+aho+sethi+ullman

            Andrew Appel has one which I find quite pleasant to read, although I haven’t worked through it. As the title suggests, you will get a lot more out of this if you already know ML, although knowing Haskell is close enough: http://www.amazon.com/Modern-Compiler-Implementation-Andrew-Appel/dp/0521607647/ref=sr_1_4?ie=UTF8&qid=1428946726&sr=8-4&keywords=appel+compilers

            Depending on how strongly interested you are in functional programming with static types specifically, you may find some books on type theory to be useful. Note that whether this is relevant depends on what language you want to compile! Benjamin Pierce has two books which are essentially the standard intro surveys to this area: http://www.amazon.com/Types-Programming-Languages-Benjamin-Pierce/dp/0262162091/ref=sr_1_1?ie=UTF8&qid=1428946869&sr=8-1&keywords=benjamin+pierce http://www.amazon.com/Types-Programming-Languages-Benjamin-Pierce/dp/0262162091/ref=sr_1_1?ie=UTF8&qid=1428946869&sr=8-1&keywords=benjamin+pierce

            1. 1

              Thank you for your input!

              I’ve herd very good things about the dragon book, a lot of people I interact with have used it.

              I’m definitely interested in the second book you listed and will probably end up getting it!

              I already own: http://www.amazon.com/Engineering-Compiler-Second-Keith-Cooper/dp/012088478X/ref=sr_1_1?ie=UTF8&qid=1429031359&sr=8-1&keywords=engineering+a+compiler, but have no progress with it yet (this is slated to start around summer time).

            2. 2

              the comments here have a good collection of links: https://news.ycombinator.com/item?id=398569

              i’m a big fan of ghuloum’s “an incremental approach to compiler construction” paper personally: http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf - if i ever get around to writing a compiler i’ll almost certainly start by following the approach he outlines.

              i also have a lot of respect for james hague’s opinions on stuff; here’s what he has to suggest: http://prog21.dadgum.com/30.html

              and finally, though it deals with interpretation, shriram krishnamurthi’s “programming languages: application and interpretation” is well worth reading: http://cs.brown.edu/courses/cs173/2012/book/

              (as a very opinionated aside, you should look into either some dialect of ML or racket as an implementation language)

            3. 7

              Currently, Writing a Radeon R500 driver for 9front. Its an absolute dream how easy the operating system and kernel architecture makes that. Hell, if I just let VESA do the VGA work, the driver’s basically 5 lines! Along with that, I have a version control system on the back-burner. I have some rough wave simulation code for a game engine i’m writing for a client, too. That’s about it :)

              1. 7

                $work: SURPRISE DEPLOYMENT. It’s full on ants-at-a-picnic mode at $work as the ‘release team’ (which, afaik, doesn’t actually include a representative from the department in charge of releasing the code) decided to do two releases this month instead of the usual one release per month. Since I work in a heavily regulated industry, the amount of paperwork I have to prepare for each release is on the order of a week or so of work, usually I have about a week and a half to spread it over. That makes it hectic when there are delays, but generally doable. Now I’m crunching that work into half a week, and because this deploy is zero-downtime (which, in the past, was not as carefully documented as we now require), I actually have about twice as much documentation to do. Did I mention that they knew they wanted this on April 1, but I didn’t find out till April 7?

                I’ve decided, therefore, that prospective programmers should – despite whatever prior distaste they may have – take a couple of good english courses while they are in college. Let me tell you, knowing how to write clearly these last few months has been invaluable, minimizing ambiguity makes the whole process much smoother.

                !$work: probably not getting much done this week, combination of the nice weather, mountainous workload, and stress has left most of my evenings just sitting and unwinding. Lots of guitar noodling this last week or two for sure. Open C is a lovely tuning, by the way.

                1. 5

                  Work: Nothing special to speak of. One of the many reasons I’m still looking for another job.

                  Home: I started writing a ballistics calculator in Vala a long time ago and I’d love to finish it. Writing Vala code is rather painful in my opinion; especially after being spoiled with other languages that have tons of features like autocompletion and such. I can’t wait for Gnome Builder to become more stable hopefully that will make Vala development for me more enjoyable.

                  1. 4

                    Travel and speaking to my company’s UX and UI Dev teams about best practices, tool standardization, etc. My main focus is on improving software quality. Lots of other folks speaking too, but I volunteered for too many slots. :-)

                    1. 4

                      Trying so so hard to make localization in kraken.js improved. Getting so close to releasing things that make things better, but so much to do.

                      1. 4

                        Last week I finished Ohmoc: an ORM for iOS/OS X written in objective-c https://github.com/seppo0010/ohmoc

                        I had already “finished” (mostly) rlite, and written bindings for objective-c but I think most devs just want a pretty ORM to write code and forget about how data is stored.

                        This week I’m learning Rust. So far it has been quite challenging, and pretty frustrating, but I’m trying to enjoy it. The IRC channel #rust in mozilla is unbelievable awesome.

                        1. 4

                          Context: clj/w is next week and I’ll be flying out for that.

                          $SCHOOL

                          • Project due in Operating Systems due Sunday. Sufficient datastructures and synchronization design sketched and ready to implement. Travel plans mandate a Friday/Saturday finish.
                          • Philosophy test on the morality of the death penalty Thursday.
                          • Philosophy paper due Thursday next. Travel plans mandate a solid draft by Friday.

                          $!SCHOOL

                          • Grimoire on hold due to school demands.
                          • Ox mostly on hold due to school demands. Playing with some reader notation ideas that I think are reasonable but are pretty breaking compared to Clojure…
                            • ( ... ) being List as is traditional
                            • #( ... ) being Vector (notation similar to List is deliberately done)
                            • { ... } being Set
                            • [ ... ] being Tuple
                            • #{ [ k v ] ... } being Map, since a mapping is a set of 2-tuples hence the {} notation. The # prefix differentiates from a simple Set, since while a Set could be implemented as an identity mapping I don’t want Sets to assume that they could be maps and try to specially treat 2-tuples. Consider the case of trying to (set/union {1 2} {[1 2] [2 3]}) if the latter is implicitly a Map. Meaningless. I mean you could define it to be {1 2 [1 2] [2 3]}, but how does the subset {1 2} impact the lookup operation & soforth.
                            • #[ type map ] being a Record. Note similarities to guten-tag. The idea is that a Record is a 2-tuple of a symbolic type and values as in guten-tag hence the use of the [] notation.
                          1. 4

                            OMG I handed in my dissertation last friday after like 7 full days (and one full night) of editing and writing and polishing. This was the work on Compiling Idris -> Erlang and concurrency stuff. I have a poster to prepare for next week, but should be alright.

                            I still have courses, including 2 courseworks, and finals to finish, but the pressure is off for the moment.

                            1. 1

                              Congrats! A lot of people don’t finish their dissertation. You have made it that far at least :)

                              1. 2

                                Oh, this is just for my Bachelors. Masters/PhD dissertation will be in a few years.

                                1. 1

                                  BSc. is the most important one ;-)

                            2. 3

                              Cleaning up my rust-inspired flow library for javascript, results. They main attraction is Enum, a tool to create a sort of discriminated union type, and match, a method available on instances of Enum options. With es6 arrow functions, the syntax is nice (at least it makes me happy):

                              var messageSent = Ok('sent!');  // or Err(why) as the case may be...
                              
                              messageSent.match({
                                Ok: (okMessage) => console.log(okMessage, 'woo hoo!'),
                                Err: (why) => {
                                  console.error(why, ':(');
                                  notifyFailure('message sending', why);
                                },
                              });
                              

                              I want to clean up the readme and learn more about typescript to make better use of it this week. And maybe start talking to a few more people about this lib than my co-conspiratory, mystor, starting here apparently :)

                              1. 2

                                Option types would be useful! So many libraries return null when a value doesn’t parse or something.

                              2. 3

                                Playing around with Reddit (and soon a few other sites) data to see if we can’t glean some useful knowledge by combining the implied social networks and locations with sentiment analysis and the Prismatic Interest Graph API (also looking at a couple other techniques). It’s very much a work in progress, but feedback would be great (the name was chosen because we are bad at naming things and currently reside in Chile, which is quite far south): http://projectaustral.com/.

                                1. 1

                                  Do you know about the old Plan Austral in Argentina? https://es.wikipedia.org/wiki/Plan_Austral

                                  1. 2

                                    I knew it was their currency at one point, but I’m not very knowledgeable about Argentine history, interesting. We used it because “austral” is a common term used in Chile for things that are in the southern part of the country, for example: https://www.uach.cl/.

                                    1. 1

                                      “Austral” means relative to the South http://lema.rae.es/drae/?val=austral

                                      1. 1

                                        See also: “Terra Australis” -> “Australia”

                                2. 3

                                  This week I’m at a conference, giving an hour talk about JSON API, and a two and a half hour intro to Rust workshop.

                                  As far as work goes, I’m continuing to get the new TOC for the Rust book in tip-top shape. Mostly editing, and some new sections.

                                  1. 1

                                    Will you have slides about JSON API? I’d be interested to see what people who use it in production think about it.

                                    1. 2

                                      My JSON API talk is given from some handwritten notes out of a moleskine, so unfortunately, no :(

                                      From what I’ve seen, generally positive, though historically, the tooling hasn’t been quite as good as we want, so sometimes that causes pain. That’s one reason we haven’t announced 1.0 yet, as we’re letting people implement.

                                      Also, Ember 2.0 with Ember Data 1.0 is gonna ship it out of the box, so I expect you’ll see more then.

                                  2. 2

                                    Had my primary MX’s hard drive fail catastrophically, and me w/out a backup…. or a secondary MX. Been working on getting two mail servers up and running, and am now watching the SSH bots trying to brute force the machines… all of 10 minutes after putting them online. Looks like I’ll be tweaking my pf rules sets a bit this week (: Also working on finishing up the 2nd golang challenge. At work, mostly bug fixing and exploring the depths of some old code. Fun, fun, fun.

                                    1. 2

                                      This was a slow week, as my dad visited for the weekend. He’s halfway through a coast-to-coast journey and, while it was lovely to visit, I didn’t get much hacking done. Lots of planning/research, though! If anyone has any insights/links on user onboarding, I’d love to read them. Thanks in advance! I’ve found that a “Product tour” makes product managers happy but not so much users.

                                      1. 2

                                        This week I’m intending on actually switching my HP Microserver (media/home server) from SmartOS to FreeBSD, having gotten everything working in a virtual machine on my laptop in the last week or so. Ended up switching from puppet to ansible, seems to be just as tedious writing everything from scratch in either tool, but ansible is a bit simpler to run masterless as that’s how it’s intended to be run. Got the point where I felt I was just reimplementing ansible’s runner for puppet with puppet apply, rsync & ssh in a shell script, so why reinvent another tool badly!

                                        Also been asked to move the girlfriend’s blog from wordpress.com to a self hosted instance, which of course has me looking at dedicated servers instead of VMs again, and if I’m building a new server up then I could move from Ubuntu to FreeBSD for that as well… Yaks all the way down, I tell you.

                                        (Irritating annoyance with wordpress.com - you can only export your media by downloading every photo by hand from the admin UI. Or paying them $120 for an assisted export, but that service is only to four “blessed” web hosts, none of which I feel like giving money to. Shell scripting to the rescue, nice little while loop and a bit of curl and one evening later all her media assets are downloaded in full size locally.)


                                        Also came to the realisation late last night that as nice as an Apple Watch and new Macbook would be for me, I’m just as happy to continue using my 2010 Macbook & Pebble watch for now. Which means I can get a nice bike instead, and recently got pointed towards cyclocross bikes as a sturdier road bike, which in turn has led to discovering the Cannondale Caadx SRAM Rival Disc, which sounds exactly what I want in a bike. (I’d get a full carbon, but I can make way more difference to triathlon times by losing another 30kg than saving 3kg in a bike frame!) Now I just have the little decision of which frame size to get.

                                        1. 2

                                          Continuing on rubber+road'ing a new product. Been hitting the pavement on spec'ing important components that need more research from customers and experts and beginning to get an iterative development process going with the team. Learning about threat models so that I have something to present to a board of lawyers and privacy experts next week. That’ll be gigantic amounts of fun.

                                          1. 2

                                            Many different projects.

                                            • Dusted of old machine, installed debian on it and made a home-server (samba-shares + Jenkins, etc)
                                            • Started a project with Node.js (Using the Steam API)
                                            • Started a 2d physics engine. (Experimental/Educational project)

                                            My game-engine project has been on a halt for a week or so now, but I should be continuing that also.

                                            1. 1

                                              Last weekend: generated a random pool of roller coasters, implemented the world’s most basic coaster fitness function: https://github.com/kevinburke/rct-rides/blob/master/genetic/rct2.go#L23

                                              This weekend: figuring out how to implement crossover, figuring out how to visualize coasters at each stage without needing to open the game. maybe computing length better (either by decompiling the game to get the length of each track piece, or writing my own custom length method in Go) Not sure how I’m going to do this yet. Maybe writing a better fitness function.

                                              1. 1

                                                Learning elixir. I have a nice idea for a project that requires a (fairly simple) database-backed webservice at its core; unfortunately I find both designing databases and wiring them up to webservices pretty tedious; elixir is a bribe to myself to get it done. (This project is unusual in that it will involve lots of stuff I don’t usually do for fun; I just want the end product to exist.)

                                                1. 1

                                                  I am working on a UI to tell developers what their slow Parse queries are => http://blog.parse.com/2015/04/13/slow-query-tool/

                                                  1. 1

                                                    This week are the Pycon sprints! I started sprinting yesterday with the Mercurial devs, and I will continue for the rest of the week. My personal goal is to make hg grep make sense. It has a bunch of weird long-standing bugs and bizarre dcoumentation to the point where nobody can even figure out what it’s supposed to do or make it do what people want it to do.

                                                    I saw some pretty interesting hg things demoed yesterday. durin42 et al were able to cobble together a working proof-of-concept of hgit, an hg UI over a git store. Crazy! You can do git commit and hg log on the same repo and get consistent results! Other less amazing things were better tools for moving around the DAG, better curses-based hunk selection, and a better namespaced handling of remote branches and bookmarks.

                                                    In addition to this, there were several discussions about many topics, ranging from how to handle project server infrastructure better, to code review flows, to the necessary ingredients for really rolling out Evolve.

                                                    It has renewed my hope for Mercurial. Its mind share may have dropped, but its awesomeness has not.

                                                    1. 1

                                                      (string= “work”) -> t: A little maintenance here, a little fixing there. Finishing up the sbcl test/upgrade.

                                                      (string= “work”) -> nil: As a purely (for now) academic exercise, I’m experimenting with writing a package to implement the erlang distribution protocol in CL.