Threads for lkurusa

  1. 3

    61% of people use some form of analytics, and most of it is Google Analytics! That’s quite the figure.

    1. 2

      I find that surprising given the usually privacy-conscious HN crowd. Maybe they are a small, but relatively vocal minority.

      1. 1

        Yup, I thought so too.

      1. 11

        I do this too. I find it really helps me, but I can totally understand how it wouldn’t help others. I like being able to sit just about anywhere, pull up my shell sessions and get lost in writing or design. Sometimes I write code locally using play.js or even iSH.

        I really like how integrated everything in iOS is. I miss having native compilers sometimes, but overall I feel like I really gain a lot more by having a much more minimal device. I get system-wide autocorrect for free. I get a password manager built into the device without having to pay anyone. I can reboot in a minute. I even have a hardware keyboard and can easily type in French, Japanese or Esperanto if I want to. It’s really not for everyone, but I like it all the same.

        1. 1

          Which hardware keyboard do you use? I have not been entirely convinced by the foldable keyboards I tried.

          1. 2

            I use the default smart keyboard. It’s the only one that can handle my typing speed.

            1. 1

              Wow. So you’re touch typing on the touchscreen? Or do I misunderstand?

              1. 2
                1. 1

                  Are you saying there exists physical keyboards that can’t react fast enough for squishy human fingers typing?

                  1. 1

                    Yes, sadly.

                    1. 1

                      I’ve sometimes had this issue with the Magic Keyboard while connected to and playing music on a Bose QC35ii. Solution for me is to plug the keyboard in for a short while (which is easy thanks to USB-C on my iPad Pro) and then unplug after a while.

                    2. 1

                      Ah, so it is physical. Thanks for the pic.

            1. 3

              I use an iPad Pro for some serious web development (in Phoenix/Elixir) and general project management. BlinkShell, DO droplet and a Magic Keyboard are essential to my workflow. Nothing beats constant connectivity and awesome battery life.

              iOS helps me stay focused and I love how integrated everything is. Oh and it doesn’t get extremely hot on my lap.

              1. 1

                My biggest hesitation in investing in a setup like this (I have a 2015 MBP 15” that seems to be on its way out) is debugging anything on the front-end. Have you found yourself needing to work with JS/CSS/HTML at all?

                1. 2

                  Yes. Unfortunately, the best option for debugging JS issues for me was to include everything in a try {} catch(x) { alert(x.message);} block. I do have a setup with VNC+firefox on a remote host to help debug when stuff is really baked.

              1. 5

                Due to some some circumstances that caused my MacBook to find itself dunked in the ocean, I actually used my old iPad air for work for well over a month. I used SSH, a bluetooth keyboard and a VM hosted on linode as my dev environment. I actually really enjoyed it. It was distraction free, and honestly works pretty well as long as you find yourself a decent internet connection.

                1. 1

                  I was in a similar situation: my MBP failed but I still had work to do. I didn’t look back :-)

                1. 7

                  This weekend is the time when I try to move a production server from Ubuntu to NixOS. The server has a bunch of Erlang and Elixir services running so running it under NixOS might help us with spinning up more instances in the future.

                  Also, gonna finish reading The Little Typer finally. Plus the usual rest and reflect.

                  1. 2

                    \o/ NixOS!

                  1. 1

                    I like it! One my pet peeves when working with fixup! commits is that I usually have multiple fixups commits on the branch before a PR is approved for instance and now I need to keep in mind how many fixup commits I had on the branch so that I can skip them over with --fixup=HEAD^3. I made an alias for automating this, but I wonder if this tool could be improved to automatically find the most recent non-fixup commit on the branch:

                    last-non-fixup = !"git log --format=\"%s %h\" | awk '/^fixup!/ { next; } { print $(NF); exit}'"                                                                                                                                     
                    fixup = !"git commit -s --fixup=$(git last-non-fixup)"
                    

                    (Of course, this bugs out when I don’t have any fixups commits on the branch :) )

                    1. 1

                      I solved this by assuming that every branch is off the base branch in the repo, and where it isn’t I set a config in my repo to tell my tooling what the base branch for that particular feature branch is.

                      When I want to rebase a feature branch on it’s original base branch I just run

                      git rebase $(git config --default refs/remotes/origin/HEAD --get "branch.$(git current-branch).base")
                      

                      And to override the base branch from origin/HEAD for a particular feature branch, I configure it with

                      git checkout feature-branch
                      git config --add "branch.$(git current-branch).base" "refs/heads/accidentally_long_lived_branch"
                      
                      1. 1

                        I almost always use git commit --fixup :/beginningofcommitmessage.

                        1. 1

                          Well, the problem with that is that I need to remember and type it. Not a big deal, indeed, but it’s nice to automate it away.

                      1. 1

                        Looks cool, but just out of curiosity - what’s the performance of this versus a shell implementation?

                        1. 8

                          i dont have a concrete benchmark, but pista would definitely be faster, its a compiled binary. a shell implementation would have to have atleast 2 external git calls, 1 dir call, and maybe some sed calls to parse output; to produce a similar prompt.

                          pista directly uses libgit2 to fetch git statuses, so the amount of parsing, string building etc. is reduced.

                          edit: a quick bench with time shows that pista takes 0.011s to render the prompt whereas a similar prompt written in shell takes 0.032s.

                          the time difference is negligible even though pista runs 3 times as fast. note that the shell implementation does not have customization, zsh compatibility, vitrual env support etc.

                          1. 1

                            Nice! Thats always been a sticking point for me with a Git prompt, to the point that I removed it. This looks worth trying a Git prompt again!

                        1. 1

                          Happy birthday!!!

                          1. 14

                            Excellent work. Thanks!

                            1. 35

                              It looks like a part 2 is going to happen. I found a root-level command injection bug in the playground. I don’t think I’m going to be as kind the second time around.

                              1. 20

                                Here’s the details

                                1. 9

                                  You know what would be kind? A private email to the author. Or a pull request.

                                  1. 90

                                    The author was informed and insulted me before banning me from his Discord. The V playground is closed source or I would have submitted a pull request to fix this vulnerability.

                                    1. 3

                                      An easy way to get more kindness is to make one’s actions and deliverables match their promises. Doing the other thing can inspire some negativity.

                                    2. 1

                                      Can’t wait for Part 2! This one was a great read.

                                  1. 2

                                    Visiting family & old friends, so pretty much nothing else. Next week will be a lot, so I’ll try to do some work beforehand while I travel back and forth.

                                    1. 3

                                      This is the first I heard about Pijul, has anyone used it for production/hobby? What are your thoughts?

                                      1. 18

                                        I’ve used Pijul casually a few times over the past year or so. My impressions are:

                                        • it is pretty dang cool
                                        • the part where merge conflicts and the resolution (not just the resolution) are kept as part of the history is really incredible, and avoids scenarios where you’re 10 patches deep in a rebase and realized you messed it up somewhere.
                                        • the whole ecosystem (pijul + nest) is a bit rough, and it is a bit hard to use. I’m not surprised: they’ve taken on a LOT of work for a small project and new team.
                                        • diffs not necessarily being line-based is a very cool concept, with incredible possibilities: imagine using a LSP language server’s guidance in creating a semantic diff.

                                        I’d love to experiment with importing big Git repositories (Nixpkgs, Linux) and torture it until it breaks. I wouldn’t hold it against them, it is a young project. I don’t think that it is reasonable to expect it to handle such monstrosities already.


                                        By the way, if you’re a Nix user, get Pijul from nixpkgs unstable:

                                        $ nix-shell -p pijul -I nixpkgs=channel:nixpkgs-unstable
                                        
                                        [nix-shell:~]$ pijul --version
                                        pijul 0.11.0
                                        
                                        1. 6

                                          the whole ecosystem (pijul + nest) is a bit rough, and it is a bit hard to use

                                          I feel like nest could only be improved by opening the source, honestly.

                                          1. 2

                                            This has been brought up to pmeunier very often. He has his reasons, which I don’t fully agree with, but at least understand. It may be released, in time, in the future. I certainly hope so.

                                            1. 1

                                              Yeah, and I get it, but it does seem to be a blocker for a great many things. Do you know if pmeunier would support a different project intended for pijul hosting? It shouldn’t be too complicated to fork darcsweb, for example, and go from there.

                                              Basically, how attached is pmeunier to Nest as a flagship pijul project?

                                              1. 3

                                                He was pretty happy when I started to write pi-hoole (see here) so I think he would be very happy to see contribution to the project in that form!

                                                (btw, I do not work on pi-hoole right now, and will probably wait for the next version before updating it)

                                          2. 3

                                            Okay, kind of a funny thing, but I was experimenting with https://nest.pijul.com/pijul_org/git-pijul and then https://nest.pijul.com/rohan/git-pijul which got me to cloning https://nest.pijul.com/rohan/pijul. Directly after cloning this fork of pijul, I get merge errors:

                                            $ pijul clone grahamc@nest.pijul.com:rohan/pijul
                                            [...]
                                            $ pijul status
                                            On branch master
                                            
                                            Unresolved conflicts:
                                              (fix conflicts and record the resolution with "pijul record ...")
                                            
                                                    Cargo.lock
                                                    libpijul/Cargo.toml
                                                    libpijul/src/fs_representation.rs
                                                    libpijul/src/graph.rs
                                                    pijul/src/commands/fs_operation.rs
                                                    pijul/src/commands/record.rs
                                                    pijul/src/commands/status.rs
                                            

                                            Presumably merge conflicts are a valid state to be in, and can be pushed to a remote? If true (and not a bug), that is a pretty funny side effect of tracked merges!

                                            1. 4

                                              Presumably merge conflicts are a valid state to be in, and can be pushed to a remote?

                                              That’s exactly correct. The repo is just a collection of patches; two can conflict and both be in the repo. The resolutions are also explicit objects, so you’d normally avoid pushing conflicting patches without a resolution patch, but there’s no reason you have to do that. (And there are times you don’t want to—for example, if you need help on a merge. And you can do that in Git and Hg, too, but it explicitly adds an extra head.)

                                            2. 1

                                              diffs not necessarily being line-based is a very cool concept

                                              Can’t you also do it with git? I know Unity recommends configuring git to use a custom tool for diffing and merging its .asset files.

                                            3. 12

                                              I used darcs and am actually the person who’s responsible for pijul being implemented in Rust :).

                                              I use it on and off. Here’s a couple of experiences, good and bad:

                                              • The interface models the interface of darcs, but doesn’t quite have its elegance. Which isn’t a bad thing, it’s just not quite there yet.
                                              • Still, it is a substantial improvement over darcs theory of patches, which had several issues.
                                              • Sometimes, it has quality issues, there were phases where you couldn’t download and build pijul.
                                              • Nest, while nice, suffers from not enough hands. I actually am privy to the nest code and would love to see some of that out in the open.
                                              • The model clicks for me better than the model of git. Always has and I love having an alternative around.
                                              • Certain operations that are hard to do in git are much easier in pijul: figuring out whether a codebase contains a a certain patch (as pijul operations don’t change the identity of the patch) and keeping signed patchs intact (same, patches don’t change identity). This is the core of why I like the model more: pijul has clearer semantics of what the bundles are that it is handling, while git is very focused on having minutia and that building a model on top of it.

                                              The problem that every of those alternative systems though is that you just can’t live without some way to interact with the current state of the world and it’s been a frequent issue to have good interactions with DAG-based systems the way git-svn/p4 enabled people to start using git with an upstream SVN/P4.

                                            1. 8

                                              So hyped! This year I’m gonna attack each problem in three languages: Haskell (as always), Rust (new last year) and Racket (can’t go a year without Lisp!).

                                              1. 11

                                                This week I’m preparing to launch Octobox on the GitHub Marketplace and start building a sustainable business around the project.

                                                1. 3

                                                  Just wanted to say that - Octobox is fantastic!

                                                  1. 3

                                                    Very exciting! Good luck :)

                                                    1. 1
                                                    1. 6

                                                      Working on the Rust compiler in my freetime. There’s so much work to be done with regards to inline assembly. I’m looking into spending more time with Zig, Nim & Crystal as well hopefully.

                                                      1. 1

                                                        I always found it a little sketchy that companies pay you based on your location. Aren’t they supposed to pay for my time and skills? What does where I am have anything to do with that?

                                                        1. 10

                                                          Because a dollar in Omaha goes a lot further than a dollar in London? If the company can’t move, or you can’t move, how else are they going to bridge that gap?

                                                          1. 2

                                                            how else are they going to bridge that gap?

                                                            With money. :)

                                                            1. 5

                                                              /taps nose

                                                          2. 10

                                                            Supply and demand, innit? If they could get away with paying a midwest salary in california they would, but then they wouldn’t have anyone to hire.

                                                            1. 6

                                                              Because 100k in SF is not the same as 100k in Miami. Not only taxes are completely different, the cost of living is too. Your skills will be evaluated as well but so will the cost of living and the income tax or lack of it.

                                                              1. 2

                                                                People often think that the cost of living is what drives the difference in pay across locations but that’s merely a secondary influence. The primary drivers is supply & demand. Consider NYC & London: the former both pays more and has a lower cost of living than the latter, even though both are tier 1 global cities.

                                                              2. 2

                                                                That might start go go away if remote work becomes more common. Makes no sense for every developer in the world to pile in on one city when they could do the same thing from anywhere.

                                                                1. 2

                                                                  Most salaries are a combination of what your skills are worth and the amount of disposable income you want. The first is independent of location, while the other is almost completely determined by it. Sure, you can live frugally and save a lot, but most people probably spend more when basic costs (housing, food) increase.

                                                                  Salaries in San Francisco can be crazy high compared to other places, but cost of living is also substantially higher. Your net disposable income can go up if you move, even if your salary goes down as well. This is also why working remotely can be a big differentiator if you are working for a company located in a high-cost area (SF, New York, London, etc.) and you yourself live in a cheap place.

                                                                  1. 2

                                                                    How would you do it differently? Specifically I think the case they’re solving for is a worker on the west coast wanting to work remotely/from the remote office of a company from the Midwest, for example.

                                                                    1. 1

                                                                      Keep labor costs down primarily. They pay you as little as they can get away with. There’s exceptions but that’s the rule.

                                                                    1. 7

                                                                      I’m planning to wipe Windows (along with my Linux VM dev setup) on my Thinkpad P71 and then install NixOS as the only operating system.

                                                                      1. 3

                                                                        Sounds fun! Have you used Linux as a full desktop OS before? Curious to know why your choice has fallen on NixOS. (I, myself, have been thinking of switching from Arch to NixOS)

                                                                        1. 4

                                                                          I use it to develop web and mobile apps using Haskell. i3 is my preferred window manager (I don’t use desktop managers). Here’s a screenshot.

                                                                          Curious to know why your choice has fallen on NixOS

                                                                          I can declaratively configure everything (packages, services, system configuration, kernel version, display drivers, etc.) and use that reproduce the exact instance anytime I want. Here’s the configuration I use for my Thinkpad P71.

                                                                      1. 3
                                                                        • Working on better inline assembly support in rustc.
                                                                          • Already fixed some smaller issues, but we are getting ready for the Inline Assembly RFC to hit the rfcs repo soon.
                                                                        • Hacking on my control group crate for Rust.
                                                                        • Hopefully spending the Sunday working on my super secret project in Rust.
                                                                        • I might finish some stuff that I didn’t finish over the week for $work. Generally to avoid burnout and the associated concerns I avoid working on $work stuff over the weekend, but I’m super excited for what we can accomplish so I might give it a few more hours.

                                                                        Oh and correct a few mistakes in my Operating System Development for the HiFive-1 RISC-V board article!

                                                                        1. 2

                                                                          Interesting, I switched to MegaSync after them announcing dropping support for filesystems other than “vanilla unencrypted” ext4 due to extended attributes. (Frankly, it didn’t make sense when I read it and it still doesn’t seem to make sense to me)

                                                                          Now that this might be a workaround, if it works seamlessly, (I mostly store PDFs, so I guess transfer speed et al are OK as long as its reasonable) I might give them another shot.

                                                                          Cool project!

                                                                          1. 2

                                                                            Unsure to be honest, nothing specific planned. I guess I should get some head on writing blog posts and some Rust stuff. But most importantly, rest. Past two weeks have been way too hectic and I’ve neglected important things.

                                                                            1. 6

                                                                              Bit banging Ethernet on a RISC-V board in Rust. Can I get more hipster than this?

                                                                              1. 1

                                                                                That’s pretty hipster. I think the only thing that tops it is building the Ethernet and RISC-V in your Novena using Qflow. ;)