Good on Anthropic for giving an update & token refund, given the recent rumors of an inexplicable drop in quality. I applaud the transparency.
HN user
davidfstr
Wine for classic Mac OS? Amazing. Well done.
You should not be using Python types without a type checker in use to enforce them.
With a type checker on, types are fantastic for catching missed cases early.
I intentionally avoid using us-east-1 for anything, since I’ve seen so many outages.
If you didn't know, you can embed JavaScript into an SVG file.
Oh yikes. I did not know.
I’ve been meaning to write this article for a long time @flexdinesh . Thanks for taking the time to share this technique for managing stacked diffs using vanilla git rebase!
I have to take special effort to tamp down on duplication in AI generated code.
For me it's not uncommon for AI to draft an initial solution in X minutes, which I then spend 3*X minutes refactoring. Here's a specific example for a recent feature I coded: https://www.youtube.com/watch?v=E25R2JgQb5c
mypy is compiled using mypyc. It does not run as Python code.
For HTML-in-HTML natively I use iframes and still remember how to use Frames & framesets.
I find it amusing that the motivation for creating a complex font program that supports syntax highlighting internally is the desire to avoid a complex syntax highlighter JavaScript library. The complexity is still there; it's just been moved around.
Edit: Perhaps this is a reminder that custom fonts are a potential attack vector for security-sensitive websites since font rendering runs highly-complex programs, probably in a language that isn't memory safe.
Looks like this library is serious. Most of what I see can be written more succinctly using existing Python functionality:
1. Maybe -> Optional[T]
2. Result -> Union[SuccessT, FailureT]
3. Future, FutureResult -> concurrent.futures.Future[T]
4. IO -> don't use this; none of the standard library I/O supports it
I do appreciate the use of "container" as a term instead of "monad".I also appreciate the typechecker enhancements being put forward by their custom plugins.
WhatsApp is owned by Meta/Facebook
A better resource today would have to start with some radical choice such as whitelisting, if only to reduce the head-end costs of ingesting material.
It's tempting to imagine some rules like: no ads, no popups of any kind, government mandated or not, especially no cookie banners, no paywall, but even sites like Wikipedia fail at those criteria today.
This sounds like the approach that the Marginalia (https://search.marginalia.nu/) search engine is taking. My understanding is that its algorithm favors text-heavy sites. And additions to its index are done via GitHub Pull Request so it's effectively using an approve-list (whitelist).
I’ve used 3+ text editors on macOS (BBEdit, Sublime, VS Code, PyCharm), and prefer Sublime for my day-to-day work writing Python/JavaScript web apps, mainly because of fast code navigation and relatively fast typing speed.
BBEdit I still use for multi-file search & replace since I prefer its interface for that. It also has the fastest typing speed.
PyCharm I use exclusively for identifying & removing unused imports in Python.
VS Code I don’t use at all. Relatively slow typing speed. Relatively slow navigation.
I created a smart spreadsheet app for tracking any books, movies, or TV series I'm interested in watching which can automatically run web searches for sources to stream/rent/buy any item on the list (ex: Netflix, Amazon Prime, my local library, my local bookstore).
This way I can focus on what I want to watch and not worry about how I will watch it.
Servers can also be liability. You need to document, implement and maintaing hardening, have a process for regularly patching os and apps, […], have backup and disaster recovery procedures, regularly test the procedures, […] and so on.
Much of this complexity I eliminate by using the Immutable Server pattern:
Specifically I deploy my app as a Docker container hosted on a virtual machine cluster managed by AWS ElasticBeanstalk. OS upgrades and patches (outside the container) are done by AWS.
If anything goes wrong with a VM I just terminate it and a different fresh VM spins up to take its place.
Personally if I was starting a project in the same space as Rails/Ruby I’d go with Django/Python instead.
I prefer the “explicit is better than implicit” norm in the Python community over the “powerful yet mystifying magic” I find in Rails. (This is personal preference.)
I also appreciate Python source code being easier to manipulate with tools than Ruby, since Ruby did not have a formal grammar the last time I checked. Any tools that did exist appeared to usually include the yacc/bison file from MRI (the main Ruby implementation) as the best approximation of a language definition.
Several of the missing capabilities mentioned here can be done with 3rd party tools.
* BetterSnapTool for window snapping and maximization (although I prefer Moom for better control).
* Afloat to force a particular window to always be on top.
* TinkerTool to mess with various other settings.
Sure, these may not be “built-in” as first party capabilities, but Apple has a history of slowly bringing such capabilities into the OS over time. Flux (for altering screen tint at night time) became standard. So did TextExpander (for auto-expanding abbreviations).
Neat. Reminds me of FileMaker from back in the day, which I believe still exists.
<hot-take> More programmer-focused, less UI/normal-folk focused. </hot-take>
For languages that don't give you a choice of signed vs. unsigned - giving you signed and sometimes arbitrary-precision integers - this debate is irrelevant.
I'll put it in my same mental bucket of "things that I no longer worry about", along with buffer overflows, wild pointers, etc that are eliminated by memory-safe languages.
HN occasionally alerts me to the existence of new tools or trends that I can leverage in business.
For example:
* About 5 years ago I happened to read about the Material Design Lite library on HN which I then used for my then-nascent startup to get our initial website up and running quickly in the Material Design UI language. (And for that purpose it has worked quite well.)
* Emscripten & WASM-related tech has been useful for implementing some of the “secret sauce” at my startup.
* The recent attention given to Cosmopolitan has unlocked a specific technical hurdle (around multi-platform support) for a digital preservation venture I’m planning to start as a side project soon.
Well, if by “open source” you mean broadly any software available whose code is viewable on the internet, you’re essentially advocating for no projects that use “nonstandard” licenses to exist.
That seems like a waste if there would be otherwise be projects around with a nonstandard license that was acceptable to a subset of users.
For example the CPython interpreter (the official interpreter for the Python language) does not use a standard license. Would you not want Python to exist?
If you suppress any knee jerk reaction you might have against religious associations in the preamble, the actual restrictions in the “Permitted Uses” section seem fairly reasonable to me, if not with more moral restrictions than usual:
https://github.com/katharostech/ldtk-rs/blob/master/LICENSE....
Most OSes have a license restricting use in nuclear power plants. This license adds similar restrictions like “cannot use in adtech”. :)
No license is going to satisfy everyone in all contexts.
For example I cannot use GPL at work (based on my own rules as team lead) but am open to it in personal projects.
And other folks would consider having something NOT GPL licensed to be suspect.
It is not possible to provide a uniform license that will be acceptable to all in all circumstances.
Seems reasonable to me that if a prospective dependency has a license that isn’t automatically tagged as a common license type that you be expected to actually read the license. This seems like basic standard of practice.
The problem is that Google is removing services
The solution is to use an Open Source browser
Seems to me the solution is to use 3rd party services that are not tied to the browser at all.
For example I manage passwords with 1Password, not Chrome's or any other browser's sync services. And I use bookmarking services like Pocket which aren't tied to any browser.
Using independent services made by companies that care about their reputation (and therefore the quality of their product) makes a lot more sense to me then putting all your eggs into a single browser basket.
Over time I played with a lot of languages & environments to find which ones I liked. I started with Java: stable, mature, and well-documented but verbose.
Later I noticed that Python (along with Java and C++) was part of the trinity that Google used internally - and I met some smart engineers from there - so that's how I got into Python.
Then the internet became big and desktop app development became not very important anymore. Web development and mobile is in. Many modern ostensibly-native desktop apps are actually written in web tech these days with an Electron wrapper to make it run on the desktop as a regular app. Notably Spotify and Slack.
So right now I'd suggest looking into web tech even though it's unfortunately rather complicated these days. It's the most widely available deployment platform in existence if you're trying to reach consumers (and make a difference in the world through reaching them).
RE web tech, just play around with plain HTML, CSS, and light JavaScript. Ignore the frameworks like React, Vue, etc - they'll just confuse you at first. (I think JQuery is still okay to play with to start out, but you'll eventually want to migrate to document.querySelector and window.fetch later.)
Once you have the fundamentals of web tech down (i.e. HTML, CSS, JS), then pick up some of the bigger tools like Vue/React (for frontend dev) or Django/Rails (for backend dev).
Banning the building of ISPs by local governments - who probably care about their people - and relegating ISPs to private companies only, in the name of “promoting competition” is ludicrous. One does not increase competition by limiting supply.
I can only conclude this proposal is in bad faith.
I therefore speculate that big ISPs like Comcast must be paying the politicians behind the bill.
NPR covered a local government a while back that tried to build a local ISP but was shutdown when players like Comcast brought in their legal teams to make building a government-run ISP illegal in that jurisdiction.
We absolutely must not see a ban like this at the federal level.
The author argues that dynamic languages like (JavaScript, Python) have Poor IDE and Tooling Support and are Unmanageable in large programs.
I'll counter that if you add a type checker to one of these languages, such as TypeScript (for JavaScript) or mypy (for Python), then all of those problems go away.
I'm personally particularly excited about the possibilities unlocked in the Python community by type checking, which I wrote about recently here: https://dafoster.net/articles/2021/01/26/python%27s-type-che...
Additionally, RE "Poor performance" the author is presumably talking about CPU-bound performance. If you happen to be writing network-based or I/O bound programs, which you always are in JS/TypeScript and sometimes are in Python (for web applications), then the effective performance is more affected by the network/database/disk than the programming language.
I like your post. It does conflate Privacy Sandbox with one of the specific proposals, however: [...] https://github.com/WICG/floc
Thanks for the clarification Jeff.
Another component of Privacy Sandbox is Turtledove (https://github.com/WICG/turtledove), [...]. Which groups a user is in is maintained entirely by the browser, and never sent to the server
Interesting. I'll plan to read up on this tonight and amend my post from what I learn.