1. 13

What are you doing this week? Feel free to share!

Keep in mind it’s OK to do nothing at all, too.

  1.  

  2. 12

    Currently, I’m sick in bed with tonsils so swollen they’re bulging our of my neck (yeah, gross, sorry).

    Hopefully I’ll get better by tomorrow, because I have a loooong day of critical analysis ahead of me - the joys of college!

    Aside from that, I’ll be writing about error handling in Rust and working on my tiny modal text editor.

    1. 2

      Upvote for cool sounding Rust and modal text editor! Not the swollen tonsils! Feel better!

      Is your tiny model editor written in Rust as well?

      1. 2

        Yes! It’s based on another minimalist editor project, but I’m slowly throwing away bits of that code and I may end up Ship of Theseus-ing myself into a wholly original codebase.

      2. 2

        Ouch. Take care with the tonsils, let them heal in their own time, because if you don’t there’s no limit to the problems they can cause.

        1. 1

          Hope you get well soon.

          1. 2

            Thanks!

        2. 12

          Looking for a job. If you want someone who’s good with:

          • the people we’re building the software for;
          • the people we’re building the software with;
          • computering (lots of JS, Python, ObjC, Swift; quite some C++, Ruby, Java; bits of Smalltalk, LISP); please feel welcome to message me.
          1. 1

            You may want to check the recent “Who’s Hiring” thread, and give location data

          2. 10

            I’m working on adding indexing to ripgrep. I’ve opened an RFC and would love feedback: https://github.com/BurntSushi/ripgrep/issues/1497

            There’s lots of yak shaving to be done though. My immediate focus is on polishing and cleaning up my fst library, since it will be the work horse for the ngram index.

            1. 6

              Just wanted to say thanks for making RipGrep. I use it pretty much every day, even without indexing.

              1. 2

                Would this be integrated into libripgrep as well? I know there has been work on other full-text search libraries in Rust too. I guess what I am asking is this more geared toward code search or does it have a more general scope?

                1. 5

                  Most of it will be in reusable library form. I hope anyway.

                  I don’t know how general it will be. At least as I currently conceptualize it, it will be coupled fairly tightly with the notion of indexing directory trees. My basic idea for the index format is as follows:

                  • An FST for the ngram index. This maps ngrams to postings offsets.
                  • A sequence of posting entries, each beginning at a particular postings offset. Each posting entry corresponds to a single ngram. A posting entry is a list of segment-local identifiers, where each identifier corresponds to a file that has been indexed.
                  • An id map which maps the aforementioned identifiers to file offsets.
                  • A collection of file metadata, where each entry starts at its corresponding file offset. At minimum, this metadata will include the time at which the file was indexed.
                  • Another FST that maps file paths to their corresponding file identifiers. (The file identifiers can be used to find metadata for the file by mapping them to file offsets, as described above.) This FST makes it very cheap to query an indexed file’s metadata for incremental updates while also achieving excellent compression. (File paths will be absolute, so most file paths will have a ton of common prefixes.) This map will also be reversible, so if you have a file’s identifier (e.g., from the postings), then you can find the corresponding file path.

                  The library would then be in charge of handling this format in addition to handling the partitioning of the index.

                  It is quite possible that I could rip the words “file” and “file path” out of the above implementation, which would leave you with something pretty generic that isn’t coupled to files. If I can do that, then I will, but I haven’t quite mapped out every implementation detail yet. It’s quite possible that there is some coupling that significantly simplifies the implementation.

                  But yeah, I think the outcome is at least another grep- crate, regardless of coupling. If I can manage to build something that isn’t coupled to file paths in a sensible way, then that will perhaps get its own crate independent of ripgrep altogether.

                  Tantivy is a very different beast. It’s a general information retrieval system. It supports relevance ranking and needs to make precision/recall trade offs. This is perhaps the main problem with trying to de-couple this logic. It’s not clear how useful this is outside the context of “search files for all matches.” For example, you would probably not want to use what I build to implement fuzzy search, because fuzzy search really wants some notion of ranking built into it. It’s not that much extra work to add frequency counts to the postings and add a scoring mechanism to produce ranked results, but it’s really solving a different problem than what I’m trying to solve.

                  (imdb-rename does build the aforementioned fuzzy search in a way that is coupled to a specific data set.)

              2. 8

                Working out whether or not to quit my job and start hacking on small software businesses.

                pros:

                • i have enough savings to not have any income for at least six months
                • i can fall back to part time remote contracting
                • i can finally spend time with my partner who works nights
                • constantly stressed and anxious in my current job

                cons:

                • leaving behind 3/4ths of a potentially very lucrative options package
                • it might take me a very long time before i equalise income with where i am now
                • there is a lot of opportunity for growth where i am now
                • it’s objectively the best job i’ve had
                • i’m wondering whether this is just due to SAD and i might regret this in a few months when i’m feeling better

                I’ve been wanting to do this for so long, but it’s a big leap to make, especially without having established a viable business on the side before making the leap. I’m also seriously concerned about regretting this and being bitter down the line.

                1. 8

                  Maybe ask if working part-time in current job is an option, and try to hack something without quitting.

                  1. 5

                    Before you quit your job, I recommend checking out Growing Gills, by Jessica Abel. It might give you a tool set to start the side business before you quit your day job.

                    Also, is the anxiety internal or external? Is it related to deadlines/your boss etc? Or is it hard to pin down, or internal? If it’s internal, it might be worth looking into counseling, since going solo won’t fix that.

                    1. 2

                      Can I have your old job? Sounds great :) I really think you should stay, for what it’s worth.

                      1. 2

                        I suggest don’t quit. Work on modifying the current work conditions.

                        1. 2

                          Ouch. FWIW I’ve told my boss at the company that there’s a good chance of mms leaving (back to freelancing) due to some potential family developments. And a day doesn’t go by without questioning of I should do it or not.

                          But I’ve been here before: did I leave a really great job to something I’m not certain is good for me. And i know it’ll end up well no matter what. We’re lucky to be in well paid line of work and can risk things - even with less then 6 months worth of stash and with kids.

                          What I’m trying to say is that you shouldn’t worry, whichever you choose it’ll most likely turn out just fine.

                          1. 2

                            6 months seems like a very short runway, I’ll have to make the go/no go decision for putting your project aside with enough time to find and start a job, then make it to the first payday. If you plan on at least 2 months for that process, and another 2 months buffer in case something goes wrong and you have to start over, then you have two months to make that business bring in enough income to sustain yourself.

                            I’d recommend a) reading around the FIRE community for a little while to get a sense for sustaining yourself on investments and safe withdraw rates. Then b) reading about how long it usually takes for a small software business to start generating enough income to cover your expenses. From there you need to get a larger than b with enough of a buffer in case something goes wrong, say like the stock markets dropping 5% in two days.

                            edit: also really dig into what’s wrong with your current job, and talk to your boss about fixing it. They’d probably rather smooth things out than have to replace you.

                          2. 6

                            After several months of working on the Inko compiler, I finally made it to the pass for local type inference/checking. I spent the past few weeks on passes that precede it, but this pass is one of the more interesting ones. It took a while as I kept having to shave yaks along the way, such as adding pattern matching to clean up various compiler internals.

                            One issue I will have to deal with this week is limited support for flow typing, and how this affects symbol tables. This is best illustrated using an example:

                            let x: ?Integer = something
                            
                            x.if_true {
                              x   # Here "x" should be typed as Integer
                            }
                            
                            x     # Here "x" should be typed as ?Integer (Integer or nil)
                            

                            This requires a way of saying “In this scope, the type of variable X is Y”. One way of doing this is to have every scope declare some sort of map that maps variables to their alternative types, but I can’t help but feel this is a bit of an odd way of doing things. In particular, you may run into bugs when you forget to use this map when looking up a local variable in a compiler pass.

                            Another related issue is that I have to figure out how to support “collapsing” of scopes into parent scopes, as inlining will need this. That is, this:

                            let x = 10
                            
                            bunch_of_number.each { # This is a closure with a new scope
                              let x = 20
                            }
                            

                            Would have to be turned into something like this:

                            let x₁ = 10
                            
                            bunch_of_number.each {
                              let x₂ = 20
                            }
                            

                            This way if the closure is inlined, the variables don’t conflict. I have some ideas, but again I feel they are a bit hacky. I looked into De Bruijn indices for this, but sadly most info comes in either Haskell or untyped lambda calcusu; and my brain hurts when reading both. The code here is also sort of SSA, but not quite as I would have to deal with re-assignments and phi nodes for that; something I would like to avoid for the time being.

                            1. 3

                              De Bruijn indices

                              There is nothing fancy about this - it’s literally just changing “x, y, z” into “symbol1, symbol2, symbol3”…i.e. it’s impossible for symbols to conflict if they are always increasing in value.

                              1. 2

                                I really enjoy reading about your work on Inko. Please do keep it up.

                                1. 2

                                  Thanks! :)

                              2. 5
                                • Finish Brave New World - it’s a lot shorter than I expected at ~220 pages. It’s also a lot worse than I expected, compared to 1984. I would say even that to compare them is a little…odd?
                                • Continue my FASM experiments from last night - possible blog article to follow.
                                • Didn’t get to the GC papers - get to them.
                                • Start thinking about storing and decrypting secrets from the Somu (like pass, but on the device). Create some documentation on how to use Rust with it.
                                1. 1

                                  Brave New World What’s odd about it? They both share the aspect of a dystopian system of societal control, they just vary in the method used. The world today shares traits with both views. I’d recommend reading Brave New World Revisited which is a series of essays by Huxley on key aspects of the book.

                                  1. 2

                                    It’s odd because Brave New World feels too stuck up on a particular aspect of its dystopian future, whereas 1984 the future is detailed, textured, and does not focus on one aspect of control. Also BNW is written in a way too non-linear manner, many times switching between 3 contexts 4-5 times on the same page. You know those times when you watch something and you see cut after cut after cut? That’s what BNW reads like, whereas 1984 is like one continuous shot.

                                    You’re right that they share that aspect, but 1984 just gives it so much more depth. BNW doesn’t have much meat to it at all I find. I feel I was sold BNW as being as in-depth as 1984 but no, that’s not the case. I would not recommend BNW to anyone, and would hope that someone would recommend to me something along the same theme, but written in a more structured, thought-out way.

                                    Anyway, my 2 cents. :)

                                    1. 3

                                      I thought BNW was interesting for proposing a world where most-everyone knew, on some level, that what they were being told was untrue - and they didn’t care. A proposal that seems less unlikely over time.

                                      I agree that the writing was much, much harder to follow than 1984, though - and that is a pity.

                                      1. 1

                                        Could your expectations have been set in ways that pre-disposed you to not find Brave New World as satisfying?

                                        I wholeheartedly agree that comparing them is a mistake. While they’re both descriptions of a dystopian future, 1984 draws its superb texture and depth from Orwell’s experiences in the British Imperial Police serving in Burma.

                                        Orwell also authored a decidedly non trivial amount of excellent writing on the politics of language.

                                        I think Brave New World’s scope is narrower by design. It poses (and answers!) the question: What if a drug could make people utterly happy and satisfied all the time?

                                        Just my $.02

                                        1. 2

                                          Just a nit-pick, I think Orwell also drew a lot of inspiration from his experiences in the Spanish Civil War, and from how Communists in Europe and elsewhere toed the party line prior to World War 2.

                                          The deprivations described in Nineteen Eighty-Four are supposed to have been inspired by Britain’s post-war rationing and austerity.

                                          1. 1

                                            Just a nit-pick, I think Orwell also drew a lot of inspiration from his experiences in the Spanish Civil War, and from how Communists in Europe and elsewhere toed the party line prior to World War 2.

                                            A fine point. I agree that I should have mentioned that. It’s important.

                                            The deprivations described in Nineteen Eighty-Four are supposed to have been inspired by Britain’s post-war rationing and austerity.

                                            No doubt that was an inspiration for him, but so was Burma. Take a look at this article

                                            I think the shortages and other privations were as much a point he was making about the injustice of the society he was depicting as they were rooted in any real event.

                                            1. 2

                                              Thanks for the link. I need to read more Orwell.

                                              1. 1

                                                Sure! Other than 1984 and Animal Farm, I recommend his essay Politics and the English Language to everyone. It’s as applicable now as it was then, although I’m not nearly as afraid of socialism as he was :)

                                                1. 2

                                                  I don’t think Orwell ever repudiated his socialism, his beef was rather with (Soviet) Communism.

                                  2. 4

                                    Just yesterday I build my first 3D printer. So I guess I am going to play around with it.

                                    Hopefully I find the time to blog about it as well.

                                    1. 4

                                      That’s awesome! Which one did you end up going with?

                                      1. 1

                                        I thought about build a Hypercube Evolution. But I thought it would be wise to start of easier and maybe smaller. So I bought the new Prusa MINI. I am so happy right now. We’ll see how long I am fine with 18cmx18cmx18cm prints :)

                                    2. 4

                                      I wrote another interpreter for my pet language, in Lua, and now I have to decide whether it’s worth continuing work on the “JIT” library I’d started, because it’s now fast enough that it doesn’t need it any more. I’ve lost some momentum on this project recently, and I’ve been putting off choosing from my large laundry list of features to work on next.

                                      I also started prodding around in a neato game engine to see what I can learn, so maybe I’ll sink my time into that instead. Who knows!

                                      1. 2

                                        Have you written about your language, or published the source?

                                        1. 3

                                          Oh, yeah, I never link it in these weekly threads. Here’s its homepage with a couple of articles of interest linked along the top, including the repo. Thanks for reminding me to check it - I haven’t actually pushed the source for the Lua interpreter even though it’s complete!

                                          1. 2

                                            Excellent! Worst is very similar in it’s core to a language I’ve been building over the last few years… And, by “building” I mean, I have a ton of random prototypes in various states, and out of date documents describing it. But, I immediately felt validated! In my case, it’s a reinterpretation of Joy with a Scheme slant. e.g. stack based, s-expressions, macros (like scheme, not just quotations like Joy) etc, etc.

                                      2. 4

                                        Negotiating a raise

                                        1. 4

                                          Finalizing my tree-walking interpreter for the Monkey language (written in C, code here: https://github.com/dannyvankooten/monkey-c-monkey-do) from the wonderful “Writing an interpreter in Go” book by Thorsten Ball. Had so much fun building this, I can’t wait to get started on his second book in which the project continues to build a bytecode VM.

                                          1. 2

                                            Totally love the name! Now you need to figure out which companion tools you can call “see-no-evil” and “hear-no-evil” :)

                                          2. 3

                                            Finishing my goals document for work which have me take steps to position myself into a leadership role. Also going to try and finish track 3/4 for this house EP I have been working on.

                                            1. 1

                                              Very cool! Good luck with that. Aiming for tech leadership is a goal I’m working towards myself.

                                              As to the house album - Do you have any sample tracks online anywhere?

                                              1. 2

                                                Thanks, and good luck to you too!

                                                I’ve never really made House music proper before, but I have done a lot of 2-step, garage, dubstep, etc in the past. The new stuff will go under a new moniker, but here’s my old stuff: https://soundcloud.com/dvorak

                                            2. 3

                                              Fighting with RDS Oracle to let me finish replacing a horrible Oracle GoldenGate instance with a nice DMS instance.

                                              Now if I could get my client to let us move to RDS Postgres, I’d be in a much better mood.

                                              1. 3

                                                I have no idea. I have an entire month (as of today) to kill before my new job starts (first real IT job after finishing university), and I’m not sure what to do with my free time. I’m torn between getting some writing done, and properly focusing on my 2.11BSD on NDS project.

                                                1. 3

                                                  Get into the habit of self care now while you’re just starting out.

                                                  Do something good for you - that both feels good and actually provides some health benefits.

                                                2. 3

                                                  I have my Analysis II (multi-variable real calculus, whatever you call that in the US) final coming up this Friday I believe (haven’t been confirmed the date yet, could be next week).

                                                  I’ve been preparing for this for two months already, so I’m studying full time this last few days to consolidate knowledge.

                                                  Afterwards I have about two weeks before the semester starts so I might look into a fun project to do meanwhile.

                                                  1. 3

                                                    As a side project, building some automation into the packaging and organization of deliverables for my particular dev environment. Not terribly exciting, but it’ll definitely save some time once it’s fully working.

                                                    1. 3

                                                      This week I’m continuing my prompt project, where I’m creating an automated prompt service for artists. In addition, I finally picked up an audio interface this past weekend, so I’m going to be gearing up to learn a lot more guitar and start getting into recording.

                                                      1. 3

                                                        Work: awesome flying-things-around-in-the-sky demo for work went great last week, so now it’s time to clean up all the rough edges revealed and start working on the Next Big Thing.

                                                        Non-work: I dunno, need to find something small to program for fun so that I can remember that it’s supposed to be fun.

                                                        1. 2

                                                          I have not a specific suggestion but a simple thought: Don’t get too hung up on WHAT you want to build.

                                                          My current hobby project is a real head scratcher for most people, but it’s something I want to exist, so I’m building it.

                                                          Be whimsical. Don’t constrain yourself, even if you start and then come upon THE BIG IDEA as a result you’ve learned something.

                                                          My biggest problem sometimes is analysis paralysis - I have to remind myself to JUST DO SOMETHING :)

                                                        2. 3

                                                          I spent a couple hours writing a small di.fm premium stream TUI player yesterday: https://github.com/acaloiaro/dicli

                                                          I’m going to spend a couple more hours this week adding playback controls and channel search.

                                                          1. 3

                                                            I’m between works this week, I will recertify aws tomorrow, climb (indoor :( ), taxes, and art & architecture for rest of the week. Perhaps play with some data viz in jupyter/d3js.

                                                            1. 3

                                                              Yesterday I got very itchy in the night and suddenly had rashes all over my body. Today I’ve pretty much confirmed that it’s hives (thank god? The other reasons are very scary). I’ve never had it before. So I guess this week I may go to the doctor…

                                                              Other than that I’m playing with my nix configuration and working on a terrible ticket at work..

                                                              The nix thing is kind of fun although it’s just a blocker that I have to resolve before I can start playing with xmonad some more.

                                                              I also have a couchsurfer this wednesday for some days. That’ll be fun (I hope).

                                                              This hive thing has me worried, maybe I’m stressed and lonely like everyone else and have just been suppressing it. Always thought I’d overcome some of that.

                                                              1. 1

                                                                Update: a week ago I went to a spa and rubbed some salt on my body. Note to self (and others): never do that.

                                                                So turns out I’m totally fine.

                                                              2. 3

                                                                Talking with a friend about joining his startup. The CRUD days are over! (Maybe?)

                                                                1. 2

                                                                  Slowly (My sore wrists are healing and I’m not pushing it) adding more tests to Open Parlour.

                                                                  Today’s revelatory discovery that every Python programmer has known about for years: Pytest Fixtures. They’re freaking unicorns pooping rainbows magical. Honest :)

                                                                  I know test fixtures are not new, but using the generators language feature so my test database setup/teardown function:

                                                                  @pytest.fixture
                                                                  def test_db():
                                                                      test_db = initialize_orm("sqlite:///test-openparlour-db.sqlite")
                                                                      yield test_db
                                                                      nuke_db("sqlite:///test-openparlour-db.sqlite")
                                                                  

                                                                  sets resources up before the test and tears the resources down after the test with a simple test method parameter like this:

                                                                  # This is a CRAPPY test :)
                                                                  def test_create_post(test_db):
                                                                      assert create_post(test_db, room=1, date="2020-12-01", title="Test Title", body="Test post body yeah yeah yeah!") == 1
                                                                  

                                                                  is really blowing my mind.