HNHacker News
TopNewBestAskShowJobs

backslash_16

158 karma · joined May 26, 2010

submissionscomments
backslash_16··on That groan you hear is users' reaction to Recall going back into Windows
I agree it's totally worth it! I'm lucky that I have just enough free time to debug these things and I work with a few excellent Linux devs who have helped me with a few things.

Thanks for understanding the spirit of my point about the shortcomings above and I really like the way you phrased the "Windows has its issues as well, they're just different ones" - and I completely agree there.

With Windows you need to navigate the Microsoft account, files getting stored in OneDrive, updates happening outside your control (arguably a good thing for most users), and more that I'm sure I'm not thinking of.

I do think the Windows issues are more abstract like security, privacy, and default on features - while the Linux ones tend to be more in my face usability ones. Again agreeing that choosing your hardware and desk/laptop setup can alleviate many of things. But that requires knowing ahead of time and people switching in reaction to something Windows is doing don't get that benefit.

I guess I'm writing all this because the idea of a Linux distribution working perfectly on most/all laptops really excites me and I think being candid about the shortcomings yet providing support to the distributions is how we can get ace these fit and finish issues.

Food for thought for anyone else reading this - the end goal of Linux for everyone is why I don't get too worked up about snaps. If they get to a point where I can tell my mom she can safely install apps X, Y, and Z by pointing and clicking in the app center it's a great computing future.

backslash_16··on Recall going back into Windows
In case anyone wants to point me in the right direction or give me some pointers, I’m a lifelong windows developer who switched to Linux (Ubuntu 24.04 lts) on my personal desktop and a laptop (I’m fully in on the switch) and it’s not great.

I think we need to accurately represent the shortcomings so people who switch aren’t surprised.

So far those are:

  1. Laptop - Battery life is bad compared to windows. It’s about half.

  2. Laptop - sleep doesn’t work. 

  3. All - multi-monitor setup with different pixel scaling doesn’t work for many applications.. unless you dig into all the Wayland options and issues and figure out how to launch all these apps under Wayland. 

  4. All - In general Wayland vs X issues. I can’t screen share with zoom. 

  5. All - Bluetooth driver issues - my Bluetooth headset won’t connect as an audio input and output device at the same time.
Now to be fair, I think all these are okay trade offs but they are a conscious choice. If you have anything outside a standard one monitor, wired peripherals setup you will probably hit issues you need to debug.

I started paying for Ubuntu pro to put my money into it, so I’m hopeful for these kinds of things in the long term.

backslash_16··on Ask HN: What should be added to the syntax of Python and why?
I would love separate variable initialization vs assignment. I know that ship has sailed.

It's interesting, I never cared about that until I did "Crafting Interpreters" and realized how separating those two actions helps clarify scopes.

Being realistic I know it's too large of a breaking change and will never land in the language but I can dream right?

backslash_16··on Ask HN: Do you use a dev container and why?
Thanks for the info. Using different containers for build and test vs the packaged app makes a lot of sense.

> easier if you don't have to worry about compatibility with the target environment.

I develop on Windows and deploy onto Windows right now, and as we get everything onto .Net Core (and maybe eventually) Linux I'm thinking the same thing. If I can build/test/run my app and service on the same target OS it can only make life better.

Any good guides for this or am I overthinking it and anything on containers will work?

backslash_16··on What is your recommended linting setup for a Py3.10 project?
I like Black and Pylance, which is backed up pyright. Pylance and VS Code for dev time analysis (even though it has a few annoying issues like auto-importing the wrong paths) and pyright for "build" and test time analysis.

I set black to a longer line length like 100 or 110 depending on who I'm working with. Black makes sure everything has consistent formatting.

backslash_16··on Wren is a small, fast, class-based concurrent scripting language
Sorry for focusing on such a small part of your comment. I’m learning about language design (as much as I can) and I don’t really understand what you mean by “double dispatch like Python”.

I think (maybe soon thought) that Python has single dispatch. Since you’ve invented languages and work on them I’m pretty much 100% sure I’m wrong and would love to learn why.

I read https://en.m.wikipedia.org/wiki/Multiple_dispatch and came to the conclusion Python has “single dispatch polymorphism” because the method resolution is based on the type of the calling object dynamically at runtime and there is no method signature overloading, which means the argument type(s) doesn’t play a part in picking/resolving the method to be called.

If you have time, do you mind explaining or pointing me to some resources?

backslash_16··on Ask HN: Dropbox uses Python a lot, is it also the case for their Windows client?
One way to know if it’s a .Net client is you can run ILDasm or DotPeek against the windows binary and see if it decompiles it.
backslash_16··on Ask HN: Best jobs for taking the summer off?
Not an easy job, but fishing, especially crab fishing in Alaska pays well and you get more than the summer off if you want.

Here are the fishing seasons: https://www.adfg.alaska.gov/static/fishing/pdfs/commercial/c...

I know crabbing seasons are different but I can’t find the docs.

backslash_16··on Tell HN: Windows' find.exe claims that it's “Find String (grep) Utility”
I switched to using RipGrep at https://github.com/BurntSushi/ripgrep

It's native, really really fast, supports regex, and has nice defaults. The only catch is you need to understand its default ignores if you're working in a git repo.

backslash_16··on Ask HN: What data structure do I use for Lox AST in Rust?
Thanks, this makes a lot of sense. I'd like to think I was slowly closing in on this. Mine isn't as clean as what you put but I made the data within each of the enum possibilities a discrete struct.

  pub enum Expr {
      Binary(BinaryExpr),
      Grouping(GroupingExpr),
      LiteralBool(bool),
      LiteralNil,
      LiteralNumber(f32),
      LiteralString(String),
      Unary(UnaryExpr)
  }
backslash_16··on The tools and tech I use to run a one-woman hardware company
Thanks for the great and clear explanation, it makes more sense now! (a lot more sense)

I didn’t know that Rust support for a LLVM target isn’t free and didn’t realize micro-controller targets are so diverse. Very cool.

backslash_16··on The tools and tech I use to run a one-woman hardware company
Explaining my experience - I haven't done any hardware or firmware programming besides messing around with Ardunios. I have written a low amount of C (tiny VM for toy language) and a moderate amount of Rust (a couple thousand lines for various projects, mostly console apps that needed to run fast).

It sounds like you have some experience in this and I have been curious for a long time why Rust can't or doesn't run on almost every micro-controller? Is it based on the compiler? I thought that because Rust has no runtime/produces a binary which does not require a runtime that as long as the Rust compiler emits the right backend instructions it should just work?

Adding to my confusing, I think rustc uses LLVM which is a way of separating a language's frontend from the backend code emitted, so I thought any micro-controller supported by LLVM would work for Rust.

backslash_16··on Ask HN: Would you rent an office cabin?
There is a low probability I would rent a space like that. If I lived somewhere close enough to have deserted woods (where there could be multiple cabins with trails) within a 20 or 30 minutes drive I think that implies a low cost of land.

If that's true my first priority would be to have either a house big enough for a separate office or even enough land to have an office shack or floor above my garage. A separate work cabin that involves a commute doesn't make a lot of sense to me.

It's okay if you just didn't go into detail but I don't see anything about a kitchen, and the remote location kinda implies there isn't anywhere nearby to get food. Nothing nearby is totally okay as long as I have somewhere to make or at least reheat food. Firepits aren't enough if they're the only method of cooking because it can be pretty gnarly outside and I don't want making lunch every day to involve making a fire, dealing with rain, and getting smoky.

backslash_16··on Ask HN: Best Tools for Log Management?
I completely agree. Because I think this area is really interesting I'm going to add a few more thoughts.

The first web service I built used a table inside the production database for structured logging and I had one kind of log event that I just included more and more in over time, using empty fields when needed, which ends up being an anti-pattern like a god class. That wasn't terrible, I could filter for the logs I wanted by including a statement like RequestId IS NULL.

The biggest problem I have seen with using a table in the DB and not a completely separate DB, is if it's a traditional relational DB (I'm sort of making up that term to refer to systems like MS SQL Server, PostgreSQL, MySQL) the schema is static, and each table can only contain one type of log or event unless you stuff it all into a dynamic-ish column type like JSON or XML (ewww using XML as a logging format).

If you have multiple log formats or types (with the type system meaning of types) you need to use multiple tables to keep the filtering easy. An unintended bonus is that joining across tables in a relational DB is far faster than joining across events types in the other logging systems I have worked with.

I guess I'm trying to say you should consider using a separate DB once you have more than a few log types (which are different tables in the prod DB), which still 100% backs up what you said.

Start off in the prod DB and move it if and when you need to. In the worst case scenario you can do unstructured logging with like 4 common fields (LogCreationTime, LogIngestionTime, RequestID, HostName) and a message field and use that until it doesn't work anymore, and then you have a service that is complex enough to warrant spending more time on the logging.

backslash_16··on Ask HN: Best Tools for Log Management?
Really easy and good homegrown logging. Use a structured logging library, this is key because it lets you easily filter on the properties attached to a log event.

Then log those to a database. If you don't have a ton of volume and want to use really reliable tech and be safe(ish) send your logs to a relational DB used only for logging. I have never tried sending to just a separate table within the production database but I know that can be done too.

Create read-only users on that logging DB or table.

Download a GUI client for that DB and you're up and running. You can use SQL to filter, order by timestamp, and create views.

If you still want to stay homegrown it's straightforward to put an API in front of it that powers some dashboards or easy investigation tools. For example, submit correlation/request ID and get back every log event in-order for that, color error logs red and boom - 1st level data visualization for investigations done too.

backslash_16··on Ask HN: What is the best enterprise software you use every day?
Can you help me out and define what dimensionaltity means for data? And what high dimensionaltity is?

I’m somewhat familiar with monitoring/telemetry but haven’t heard that term before.

backslash_16··on Ask HN: Best approach to inheriting an out of control system?
It sounds like you are understandably worried about it going down. Standing up another copy is a great idea, and a great exercise in making sure your company understands how to build and deploy it from scratch.

When you do that you also need to figure out the data persistence layer. You probably want to either share it between both instances of the application or setup a backup/copy system so the version in the cloud has up to date data and is more of a hot spare than a second set of infra lying around with an empty DB.

Moving on from there, if your only goal is to keep it alive while the devs are on vacation, you should probably implement a deployment freeze. Yes in an ideal world you would make any and all changes to an infrastructure as code template and re-deploy, or at least change config files in a repo and re-deploy those but it sounds like the application isn't that modular.

Most incidents are caused by change, so minimize that until the whole team is back together, including the devs who wrote the service, to start making improvements.

At the same time you need to know or figure out how you can change config to keep it running. Ex: You need to update a cert thumbprint or change a timeout value. It sounds like it's either running on bare metal or on VMs on a physical server you own? If that's the case maybe sshing into the boxes to manually edit config is the least bad way of updating it (again - only until this emergency situation is over). If you go the route of ssh-ing, at least build a tool or script to update the key value pairs in your config store so you don't missing an angle bracket or quote and set your whole system on fire.

If the developers weren't going on vacation my advice would be a lot different. What I have written above is purely tactics to keep the system alive and the business making money until it's a better time, personnel wise, to improve the system.

Lastly for some dev advice, get started on some end to end or "pinning" tests. Yes they are typically the most fragile and slow type of tests but you can get a lot of safety and peace of mind from just a few of them. I personally feel that in situations like these they are the best value per dev hour spent.

If you're using Python, introduce mypy immediately. Same for JavaScript (use TypeScript). Being able to lean on a type system (or if you're in a static language - compiler) when refactoring or making sweeping changes it incredible helpful and lowers the chance of making a mistake by a large amount.

If you want more, I have tons more I can write on this subject but this is getting quite long :)

backslash_16··on The Iterate-and-Mutate Programming Anti-Pattern
If I have read his example correctly - he's not modifying the object he is looping over. car_ids is externally defined and he is using a loop to exhaustively test other objects and take an action on them, which is adding them to the externally defined array.

I do agree with what you are saying, don't modify the enumerable you loop over. IIRC C# is pretty safe in that it doesn't allow modifications to the enumerable inside of a for loop or foreach loop.

I think it's interesting people say functional constructs like map don't involve looping. They do, it's just hidden from the caller of those functions.

backslash_16··on Two Months with Powershell on a Unix
Hey, I use PowerShell on Windows a lot. Some advice that I hope helps for installing posh-got specifically is to “git clone” the posh-git repo. Then in your $Profile.CurrentUserAllHosts do an Import-Module for the PSM.

I know all this is personal and subjective. I think using git to manage this is pretty easy and safe. If and when I want to update it’s as simple as doing a git pull in my local repo of posh-git and reloading the shell.

If the new version is broken (has never happened yet but ya know.. in case) just checkout the previous one.

I have found using git, the powershell user profile and modifying my user path when necessary is the best way of managing dev dependencies on Windows.

I also understand why people want this all abstracted away from them in a package manager.

backslash_16··on If you imagine a business making surgical facemasks is working 24/7, guess again
It's too easy as a catch-all to say "everything can always be priced in". Right now 48 states (I can't find anything saying all 50) are in a state of emergency, which prohibit raising prices more than around 10% or 20%.

I'm bringing up these points because over the last month I have come to also think either state or federal government needs to take responsibility and buy these makes from a local producer - even when there is no pandemic.

I don't think our connected web of hospitals, suppliers, and insurance companies have the right incentives to use local, "expensive" suppliers when there are lower cost non-local suppliers and these non-local suppliers have stocks.

[1] Price gouging percentages - https://www.natlawreview.com/article/coronavirus-emergency-d...

[2] State of emergency - https://www.businessinsider.com/california-washington-state-...

backslash_16··on Ask HN: Are .io domains out of style?
I think what happened to the popularity of .io domains could.. maybe.. be called a fad. I think that doesn't dig deep enough. It came on the scene and was popular with technical services and startups because it sounded techy and cool and short names were available.

When I did personal research about domain names I found people in the US are familiar with .com first, .org second, and everything else is a distant 3rd. While I'm cherry-picking an old quote from a PG essay [1], the stat he provides is pretty interesting. It really drives home how important owning a .com is for easy discoverability of your online presence.

All of this is in addition to the ethical and security issues the posted above listed.

Quote > 100% of the top 20 YC companies by valuation have the .com of their name. 94% of the top 50 do. But only 66% of companies in the current batch have the .com of their name. Which suggests there are lessons ahead for most of the rest, one way or another.

[1] http://www.paulgraham.com/name.html

backslash_16··on Ask HN: Are dynamic languages fast enough for dynamic sites on low-end hardware?
I'm trying to write a good short answer or TL/DR and don't think I can. If you want a pithy one, at 1000 concurrent users (with no other information given) the answer is your bottleneck probably won't be Python or Ruby.

The real answer depends on some assumptions I'm making and questions

Assumption #1 - You're doing server side rendering because you talk about dynamically generated pages and not API response times.

Assumption #2 - You're using a database and it will be on the same instance as the web server.

Assumption #3 - You have one web server instance.

  - What does shared CPU really mean? Is there a guarantee on a lower bound of the resources you will have?
  - When the page is dynamically generated is it mostly calls to a DB and stitching that information together in a template?
  - When the page is rendered can it require a lot of computation? An example of that is a portal where someone asks for a report with custom aggregations you're doing in the application layer and not DB layer
  - Does rendering a page require calls to any other services? 
  - Do these services have RPS and average latency guarantees?
  - Are you using a CDN or serving everything from your one web server instance?
A web app that is focused on serving static assets with little customization, say putting a user name in the header and a separate profile page, could be fine if you use a CDN for the static assets and don't call the DB excessively.

If you're calling the DB 200 times to generate a page, doing long running queries, or a lot of computation in the app layer you might be in trouble. (With my hypothetical 200 DB calls to load a page you're certainly not in a great spot :))

Does anyone know how to format a list? I can't figure out the magic incantation and https://news.ycombinator.com/formatdoc isn't helping much.

backslash_16··on Ask HN: Advice for building my own blog engine
No problem, you're not a buzz kill. I've thought the same thing.

Building a blog engine isn't breaking new ground and I might as well add features to an existing engine, where I won't have to build everything from scratch, and I can add/build any features I feel that I need.

backslash_16··on Ask HN: Recommend one book I need to read this summer?
Masters of Doom is such a fun, good book. I ended up power reading a few summers ago.

If you grew up playing Doom, and all the other shareware games like Hexen, Heretic, etc... reading about Id Software's start and history is more interesting than I ever thought it would be.

Another book that drew me in was "Blood, Sweat, and Pixels". It's a collection of short-ish game creation stories packaged into a book. Really candid interviews and writing.

backslash_16··on The little legacy code that could: a fable of software ownership
For anyone who wants to learn about working with and on a "legacy" code-base, check out Michael Feather's book "Working Effectively with Legacy Code"

In the beginning it goes over code smells and how to find refacing seams in your language of choice (C, C++, or Java) and then each chapter is a group of techniques you can use.

Working on a service that had both a very old monolith and some brand new microservices, I found it invaluable. I think the first lesson I applied from it was using pinning tests for safer refactoring.

backslash_16··on Cppyy – Automatic Python-C++ bindings
From the comments below, it sounds like interfacing my C++ code with python using Cppyy would sacrifice performance.

Even so this will be awesome for unit testing. I really like the testing interface pytest provides, along with its parametrized tests.

Anyone else using python to test the logic their C/C++ code? I can't think of how I would test the memory allocation and freeing portion. Anyone think it's a bad idea?

backslash_16··on Ask HN: Landing page best practices and ideas?
Thanks, it sounds like I should definitely use Flask (or maybe Django) vs one of the many SaaS providers of landing pages.

I don't want to get locked into some service or platform that I can't change easily/quickly and I want to make sure it loads as quickly as possible.

backslash_16··on Ask HN: How to Evolve a Legacy .NET Application with Python
Using Python via IronPython and trying to get C# to talk to Python sounds like it could have lots of issues. I would go with a Python HTTP(S) API that gets called by the Winforms or WPF UI.

This has the added benefit of forcing you into a more decoupled architecture and allows you to easily add a different type of UI (web, phone app, etc..)

backslash_16··on Ask HN: What single/simple omission from the JS spec would yield big perf gains?
If I understand your question, you're asking what is one thing currently missing from JS that if added would yield a large perf gain?

I think the biggest one would be from types. The JS runtime engineers have improved perf a ton already and I imagine all of the low and medium hanging fruit is already done.

backslash_16··on Ask HN: Python development on Ubuntu best practices
I've been using vscode for Python development on Windows so that sounds great.

I've been researching my question too and have decided on using pyenv to separate my system Python from the other version I'm gonna install, and doing a manual git clone/.bashrc edit to get pyenv setup.

Page 1 of 2Next →