HNHacker News
TopNewBestAskShowJobs

smasher164

1,521 karma · joined August 13, 2015

akhil.cc
submissionscomments
smasher164··on The Unlicense is an inferior license wrapped in an atrocious name
I stand corrected.
smasher164··on The Unlicense is an inferior license wrapped in an atrocious name
It lacks OSI approval, though -- which is a big one. I suppose someone could jump on the OSI mailing lists to get it through the approval process, but it hasn't been done yet.
smasher164··on Single binary executable packages
Right, but applications can treat win32.dll as essentially a system-call layer. Windows also gives you a strong compatibility guarantee with those libraries.

Userspace Linux is different in that not only are these libraries typically installed separately, they all have varying degrees of compatibility between versions.

smasher164··on Single binary executable packages
Have you tried the Tracing Agent? https://www.graalvm.org/22.0/reference-manual/native-image/A...

It will track all uses of reflection during a program's execution. You can then use the resultant config as the starting point for the reflect-config.json.

smasher164··on Single binary executable packages
1. Not every library can be statically linked. Graphics drivers come to mind, but most libraries for the linux desktop expect to be dynamically linked (e.g. wlroots, libinput). So not only is there a technical limitation, but a practical one as well, considering that all of these projects would have to support it. These projects rely on dynamic linking as a way to support system-wide configuration.

2. Being able to patch dependencies is important. This isn't so much a feature to help developers, but one to help users. You could technically do this without dynamic linking, but have to make it easy to recompile a project with an updated dependency (which most package managers don't). Not being able to patch a package's dependencies puts the developer accountable for your system administration issues, which is not scalable.

smasher164··on CXX-Qt: Safe Rust bindings for Qt
I don't think wxC is supported anymore. Its SourceForge (lol) page lists 2013-04-15 as the last time it was updated. I believe with all the nice tooling that's popped up in the C++ space over the last decade (e.g. libclang, cxx) could allow bindings to be created more easily/sustainably. Someone has to do it though :)
smasher164··on Don't write just in plain text (longevity vs. authenticity)
I think for a plaintext format to be "complete", it needs some mechanism of associating the language with some segment of text. Plaintext formats that don't acknowledge unified characters are just Latin-biased.
smasher164··on Write plain text files
> For example the img tag allows you to, amongst other things, render an svg.

I don't think the GP meant "write an image renderer" when they said "get a very simple barebones HTML renderer". Most languages have libraries for encoding/decoding images in various formats, so aside from how it would fit into document layout, this is a non-issue.

smasher164··on Fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid
You're right, "unquantifiable" was the wrong word here. I meant, a program has no real way of predicting/reacting to OOM. I didn't realize mode 2 with overcommit_ratio = 100 behaved that way, thanks for sharing.
smasher164··on Fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid
Also, mandating copy-on-write as an implementation strategy is a huge burden to place on the host. Now you’ve made the amount of memory a process is is using unquantifiable.
smasher164··on Lambda Calculus in 400 Bytes
Justine, this is one of the coolest things I’ve ever seen! I’m flabbergasted. Are you a wizard?
smasher164··on The time has come to replace file systems
The point I was trying to make was that the directory hierarchy isn't fundamental to how people reason about their data. That you could introduce a little UX over a KV store and those that wanted to mimic the old abstractions could continue to do so. But we could also change the abstractions (like the blog post says) to something like tags, and it wouldn't be any lower or higher level, compared to what we have now.
smasher164··on The time has come to replace file systems
You say that like the file system is the ground truth to how we use a disk. It is nothing but another abstraction we've invented to manage blocks on some persistent medium. The vast majority of people wouldn't notice if you replaced their FAT partition with a key-value store, where the keys were paths delimited by slashes (with some UX to traverse paths).
smasher164··on I'm so sorry everyone. Or: why I'm switching to Cloudflare
Keyword here being "nasty". You'd need some sort of trust metric to identify malicious clients. This becomes harder with botnets that lay dormant on regular users' systems.
smasher164··on I'm so sorry everyone. Or: why I'm switching to Cloudflare
The thing about the threat model is that in the worst case, DDOS protection is about power -- specifically, infrastructural power. It runs in contradiction to decentralization efforts.
smasher164··on Flutter is the most popular cross-platform mobile SDK
Right, but then you miss out on the advantages of type-driven compilation. It would be hard to compete with Dart's AOT without that.
smasher164··on Flutter is the most popular cross-platform mobile SDK
I've been using Flutter recently to build a cross-platform Notes app. I initially bemoaned that I'd have to learn Dart for it. And while I don't have a particularly high opinion of the language, it was pretty easy to pick up. It helps to just treat it like a DSL for GUI apps, and move core logic to something like Rust.

That being said, the Flutter widget model is remarkably simple to understand. And rules like "Constraints go down. Sizes go up. Parent sets position." make it pretty easy to reason about the UI. State management is a bit of a hurdle, since there are so many options, each with its own advantages and disadvantages.

All in all, this was a great choice for building something that works on both mobile and desktop, and has a fast startup time.

smasher164··on Include diagrams in your Markdown files with Mermaid
I like this approach of using the tag associated with a code block to determine how to render the output. It's the same approach I take in my markdown-derived markup language: https://github.com/smasher164/mexdown.

The top example there takes a GraphViz description and passes it into the dot command, placing the resultant SVG into the HTML output.

smasher164··on Back-end languages are coming to the front-end
It's a false dichotomy. If you defer type-checking to runtime, you have a traditional dynamically typed language. Haskell has this in the form of -fdefer-type-errors, but I'd like to see this feature given more emphasis and used in other languages.
smasher164··on I would like a job writing Haskell
> They should be saying they are interested in solving optimization problems, image quality search problems, etc.

They are. OP has been spending 30 years not being paid to use the tools he wants.

> but that applies to every language barring joke ones

Some languages are far more effective for a domain than others. To stretch it further than Haskell, there's a reason why Verilog is used in hardware over something like C. It would be enormously frustrating to work against my tool to get something done. Programmers who focus on "getting stuff done" in these situations are succeeding despite their tools, which is commendable, but we should still push to using better tools.

> interested in the tool through which the problem is solved not the domain itself

Many factors play into why someone works at a company, whether it's cost-effective to use a certain tool, whether a tool is trendy, whether the candidate is passionate about the domain, or whether the candidate is passionate about the tooling. A lot of people aren't passionate about the domain of adtech, for example, unlike self-driving cars, but they work in these areas because they like the practice of engineering.

smasher164··on I would like a job writing Haskell
I agree. I'm just presenting an example where patterns that one camp deems as "too clever" are normal to another.
smasher164··on I would like a job writing Haskell
Languages are means to end, where the end you reach is significantly affected by the means you used to get there.

- Using Haskell means you can model your domain more precisely and have higher correctness guarantees.

- Using Rust means you get memory safety while maintaining the speed of C++, where the vast majority of vulnerabilities are memory safety issues.

- Using SQL means you can apply an optimizer on top of what is essentially relational algebra over tables.

In all of these cases, a less effective tool could be used, yes. But "it's just a tool" doesn't capture the fact that tools do solve domain-specific issues, and OP is not wrong to seek an employer who acknowledges the value of Haskell has to add.

smasher164··on I would like a job writing Haskell
On the flipside, the usual argument around "simplicity" and "readability" is just code for "familiarity". A Haskeller used to composing a bunch of folds has no obligation to transform their program into something readable by Python programmer, unless of course, they were the only Haskeller.

But I agree, there's a difference between code that veers towards obfuscation and code that employs techniques someone just hasn't learned yet.

smasher164··on What I'd like to see in Go 2.0
Sum types overlap a lot with what interfaces over. So enhancing the language with proper sum-types would benefit from enhancing interfaces and switch statements.

However, zero values throw a wrench into this. The zero value of an interface is nil, so enhancing interfaces would require you to address what happens with an uninitialized variable. One of the current proposals suggests that nil continue as the zero value.

They could introduce a totally different type, like a sealed interface, which doesn't require a zero value, but that distinguishes between different types of interfaces, and I'm not sure how that'll be received.

smasher164··on Go performance from version 1.2 to 1.18
There's a lot of room for improvement on the compiler and library end. RE2 and Hyperscan demonstrate the ceiling here.

The NFA simulator is heavily optimized for readability, which means lots of recursion, and fewer special cases outside of small regexps. The compiler also doesn't perform certain optimizations like vectorization and emitting jump tables, which might be useful here.

There isn't a metaprogramming facility to generate equivalent Go code like in re2go: https://re2c.org/manual/manual_go.html. The best we can do is pre-declare the regexps globally as to initialize them once, but we still have to run the interpreter.

Moreover, thus far, a DFA matcher is out of a picture, as discussed here: https://github.com/golang/go/issues/11646.

smasher164··on On self-modifying executables in Rust
What about rewriting CPU feature-detection code to remove branching?
smasher164··on About the security content of macOS Monterey 12.2
Wow, that's a lot of ACEs.
smasher164··on I’m porting the TypeScript type checker tsc to Go
I wonder how it would fare if instead of rewriting from scratch, they applied automated transformation from the Typescript source code to Go. It wouldn't have to capture all the semantics of TS/JS, but be opinionated enough to transform the Typescript source.

Another possibility is to use something like GraalVM native-image to compile Typescript's type-checker into a binary. This might offer a speedup over its execution on V8.

smasher164··on The Curse of NixOS
For me, Nix is one of those systems where I just had to spend a long time with it to understand it. It wasn't something I could master within a few weeks. After about a year of continued use and struggle, I've finally gotten to the point that I'm comfortable going off the beaten path and even contributing to nixpkgs.
smasher164··on How E Ink developed full-color e-paper
Yeah, I don’t think a single screen is problematic as long as the keycaps feel alright to type on.
← PreviousPage 5 of 9Next →