Better HN
topnewbestaskshowjobs
Log inSign up

codesections

2,587 karma · joined Jul 5, 2018 (8y ago) · 324 submissions

Free software developer working primarily in Raku and Rust. Former attorney at Davis Polk & Wardwell LLP; current member of the Raku Steering Council and The Perl & Raku Foundation board. My professional interests include web development, open source, and making things as simple as possible.

  website:     www.codesections.com
  public key:  codesections.com/pubkey.txt
  email:       daniel@codesections.com
  mastodon:    fosstodon.org/@codesections
  github:      github.com/codesections
  discord:     discord.com/users/555470786677440524
I am also the 'codesections' user on: gitlab, github, stack overflow, libera.chat, reddit, tildes, lobste.rs, and probably other sites
Submissions

comment 6y ago · link · parent

> If you consider that, statistically, the vast majority of programmers have yet to experience a dynamic language of any kind – much less Ruby – the absurdity here is sublime.

Was that really anywhere close to true in 2008? I would have thought that most developers would have known at least one of Perl, Python, Javascript, or Ruby (or Bash; not sure if he'd count that one).

Am I mistaken about the history there?

comment 6y ago · link · parent

2009

(The article is undated but was present on the Internet Archive in 2009, https://web.archive.org/web/20090106175608/http://matt.might...)

comment 6y ago · link · parent

> Can you imagine programming without immutability?

Yes.

Don't get me wrong; I'm a big fan of immutable data and think it is often the best approach. But I also think it is far from the default in many production systems. If you cannot imagine programming without it, it is possible that you may be working in a (wonderful, functional) bubble.

comment 6y ago · link · parent

That is great to hear; perhaps some of the issues I have will be addressed when version 18.0 is released (which, despite the present tense in your comment, hasn't happened yet). I really hope so – as I said, there's a lot to like in APL.

comment 6y ago · link · parent

I investigated APL pretty seriously at the end of 2019, after a very inspiring conversation with Aaron. I discovered that everything in this post is true, and (dyalog) APL is a pretty great language.

However, I also decided that it is still a bit too dead, at least for me. Specifically, it does not work well with other programs, at least on *nix. This is reflected not only in the lack of external libraries, but even in some basic areas – both FFI and even reading/writing to standard input and output are surprisingly challenging. Summing all this up, writing a basic Linux CLI app (read from stdin, take and parse arguments, print to stdout) is still a pretty large challenge.

As great as APL is, for me, it's hard to overcome the ability to work with the whole existing Linux/FOSS ecosystem. (I might feel differently if I did any Windows development, which does feel like much more of a first-class citizen for Dyalog APL)

comment 6y ago · link · parent

To be clear: this is an entirely backend framework, with no support for writing Janet on the front end, correct?

comment 6y ago · link · parent

I'm curious to know more about what you mean by this. Are you referring to marketing material like this release announcement? If so, this seems pretty polished to me, and easily on par with other computer companies; I'd be interested to hear what you feel is lacking.

If you mean the design of the hardware, I'd be interested to hear what you dislike about the Thelio – the reviews I've read have generally evaluated it as one of the best designed/most distinctive/prettiest desktops on the market.

(If you mean their current laptops then, yeah, those aren't designed in particular. But presumably that will change when they start designing/manufacturing those themselves instead of reselling Clevo/etc)

comment 6y ago · link · parent

> I wish there was a straightforward way to take the diff of all the Ubuntu variants.

It's not _exactly_ a diff, but here's a link to the Pop!_OS github page, which contains 149 repos (only 16 of which are forks) https://github.com/pop-os

> one could take Ubuntu and run a few shell scripts (I am grossly oversimplifying) and boom you are now running Pop.

That same link notes that the top languages for the Pop!_OS repos are Rust, C, Python, JavaScript, and (lastly) Shell. So not _exactly_ "a few shell scripts". (I don't know how accurate that really is, but I do know they've written a fair bit of Rust.)

(Note: I don't currently use Pop!_OS and think the name is absurd)

comment 6y ago · link · parent

I was very surprised to read

> 90%, of what I learn at one job is completely useless for the next one.

That has not been my experience at all (and I've had some pretty major job changes, including lawyer -> software developmer). If I had to put a number on it, I'd say more like 50% of what I've learned at each job is transferable.

How about everyone else? Closer to 10% or 50%?

comment 6y ago · link · parent

> Have you tried making them small? Rust doesn't optimize programs for size by default, there's a lot of easy ways to shrink binaries (like stripping symbols).

Yeah, I have. I'd come across the guide you linked, any frequently use the subset of those techniques that are available on stable Rust. And I've ended up with simple CLI apps in the 2 to 4 MiB range – which is _fine_ for my use-case, but a bit closer to the size of a Go binary than a C one. (Though, like I said, it's fine for my use case and, if it were important to me, I'm sure I could trim that a bit by picking different dependencies or even dropping to `no_std` in some cases)

comment 6y ago · link · parent

> Putting numbers to things like this is a fuzzy business of course, but I'd be interested in comparing notes on some of them.

Me too. I'm especially surprised that Rust gets a 1.0 for size ("What’s the size impact of this language on the framework we would deliver for our customers?"). For comparison, C also got a 1.0 and Go got a 0.3. I _far_ prefer working in Rust to working in either Go or C, but my experience hasn't been that Rust binaries are anywhere near as small as equivalent C ones.

comment 6y ago · link · parent

The article quotes Feynman's memoirs is a highly misleading way. It says:

> Such behavior is chronicled in a notorious chapter of his autobiography, Surely You’re Joking, Mr. Feynman! (“I adopted the attitude that those bar girls are all bitches, that they aren’t worth anything, and all they’re in there for is to get you to buy them a drink, and they’re not going to give you a goddamn thing”).

This suggests that the attitude discussed was how Feynman thought about woman. However, the chapter is about trying out that attitude as a temporary experiment — and Feynman quickly rejects the approach precisely because is feels too sexist/dehumanizing (iirc, it's been a while since I read the source).

None of that is to disagree with the article's overall point – I don't have an informed opinion on the matter. But I did find that quote a bit misleading.

comment 6y ago · link · parent

Looking at this from a FOSS perspective, some of the "negatives" this article discusses strike me as significant reasons for optimism.

Collaborative, community-driven, open source projects sometimes struggle to be as innovative as startup executing a singular vision – but FOSS projects excel at providing compelling alternatives to existing, entrenched platforms. If the pace of new "breakthrough innovations" slows a bit, it could provide FOSS exactly the opportunity it needs to catch up on features before users move on to a new paradigm.

comment 6y ago · link · parent

Yeah, I understood what we were talking about – sorry for not being more clear in my reply earlier.

When you said that putting the closing bracket on the same line wouldn't work because of the "lack of Paredit-style editor support" for C-like languages, I thought you meant that the Paredit-style plugins wouldn't work well with/support C-like languages. That struck me as odd, because I use Smartparens when writing Rust, and it works just as well as it does when I write a lisp/scheme. In particular, it handles parens, square brackets, curly braces, and angle brackets just fine (and it even distinguishes between a single quote that's used to start a character literal (which should be paired) and a single quote that indicates a lifetime label (which should not))[0]. I could easily use it to write Rust with closing braces on the same line; the only reason I don't is because it's not the common style in that community.

Based on your last comment, I now understand that you're not saying Paredit-style plugins don't _work_ with C-like languages. You're saying that most programmers who write in those languages don't use those plugins. Is that right? If so, I agree that they aren't widely used and that it'd be hard for anyone to use the formatting style above without adopting a plugin.

[0]: The only thing Smartparens fails to handle is that it does not recognize that a pipe character is a pair when delimiting the arguments for a closure. I'm sure I could fix either Smartparens or rust-mode to fix that issue but so far I haven't been annoyed enough to bother.

[Edited to add a missing close-paren, fittingly enough.]

comment 6y ago · link · parent

What doesn't work well for C-like languages? I've been writing a lot of Rust lately with Smartparens (a paredit like package in Emacs) and haven't had any issues with its support for Rust.

comment 6y ago · link · parent

> As for platforms that users develop on - Linux and Windows continue to dominate.

That seems like a very odd way to characterize the results (55% Linux, 24% Windows, 23% mocOS). Why draw the line between the two platforms that are 1% apart instead of between the two that are 31% apart?

comment 6y ago · link · parent

> by getting the whole parser onto a single screen, I find that I can get the whole problem into my brain’s working memory and avoid burning cycles scrolling up and down to pin down butterflies bugs.

This is an excellent point, and one that not enough programmers pay attention to (well, outside of the APL family of languages, anyway!)

comment 6y ago · link · parent

> A US-based editorial illustrator earns an average of $47,000 a year… Dismal pay isn’t just an American phenomenon.

Median income for the United States is under $35,000. I understand (through personal experience!) how much cost of living differs in major cities, but illustrators are not limited to living in those expensive locations.

In some ways, the shift in pay seems to reflect the change in location as much as anything else – at one point, illustrators for NY media basically needed to live in NYC, but that is no longer the case and pay seems to be adjusting.

229.

Building a Rust Web Browser (8-part series)(joshondesign.com ↗)

4 points · by codesections · 6y ago · discuss

230.

Game Programming Vexations Part 1 of 13 (2019)(shamusyoung.com ↗)

2 points · by codesections · 6y ago · discuss

comment 6y ago · link · parent

> We must strive to understand that accidents don’t happen because people gamble and lose.

The problem is that some accidents do happen because people gamble and lose – or rather, because people cut corners is ways that probably won't matter but sometimes really, really do.

The best approach needs to balance both causes of error. I agree that most organizations tend to err too far in the "blame someone" direction – but that doesn't mean that it's impossible to err by going too far in the other direction.

comment 6y ago · link · parent

> Apple restricts tracking by limiting browser storage

But the argument that this will protect privacy in the first place seems really weak.

Before this change in Apple's policy, an app could store my config data on my PC.

After this change, they'd need to have me log in and send the config data to their servers.

That seems like I've lost privacy, not gained it.

comment 6y ago · link · parent

Article from 2016

234.

Introduction to Physical Penetration Tests(diablohorn.com ↗)

3 points · by codesections · 6y ago · discuss

235.

INFOCON – a DoD threat-level system simialar to DEFCON, but for IT(en.wikipedia.org ↗)

1 points · by codesections · 6y ago · discuss

comment 6y ago · link · parent

From the project website:

> Yash is intended to be the most POSIX-compliant shell in the world while supporting features for daily interactive and scripting use. Notable features are:

   * Global aliases

   * Arrays

   * Socket redirection, pipeline redirection, and process redirection

   * Brace expansion and extended globbing

   * Fractional numbers in arithmetic expansion

   * Prompt command and command-not-found handler

   * Command line completion with predefined completion scripts for more than 100 commands

   * Command line prediction based on command history
I'm particularly taken with it's support for configuring the relevant keyboard commands, with strong support for both Emacs and Vi bindings.

It also uses much less RAM than many other shells with similar interactive features, to the extent that matters to folks these days.

237.

Yash: Posix-compliant shell with fish-style predictive completion and more(yash.osdn.jp ↗)

1 points · by codesections · 6y ago · 1 comment

comment 6y ago · link · parent

I'm slightly confused by the claim this article makes about performance. It says:

> Generally, FreeBSD performs better than Linux - Don’t expect exponential differences, but many tests have shown that FreeBSD performs better than Linux

In that same line, it links to https://www.phoronix.com/scan.php?page=article&item=3990x-fr... which says:

> Lastly is a look at the geometric mean for all of the benchmarks conducted for this FreeBSD vs. Linux scaling comparison on the AMD Ryzen Threadripper 3990X. In the end, both CentOS Stream and Ubuntu 20.04 (development) delivered similar performance and were basically tied for first.… At 16 cores, RHEL8-based CentOS was about 17% faster than FreeBSD 12.1 while at 128 threads the lead expanded to 28% based upon the geometric mean or 21% when comparing the GCC9 results on FreeBSD 12.1.

239.

GDPR makes most users “more persistently trackable”(marginalrevolution.com ↗)

3 points · by codesections · 6y ago · 1 comment

240.

Why Didn't Ancient Rome Have Dungeons and Dragons?(marginalrevolution.com ↗)

1 points · by codesections · 6y ago · discuss

1
7891011