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 5y ago · link · parent

Discussed at the time: https://news.ycombinator.com/item?id=4365255

62.

Steve Yegge: Notes from the Mystery Machine Bus (2012)(gist.github.com ↗)

2 points · by codesections · 5y ago · 2 comments

comment 5y ago · link · parent

I'm a bit confused by the terminology here. I thought "autoloading" referred to deferring the loading of a constant until it is first used (as described in this post[0]). But the author seems to be talking about loading code without an "import/use/require" statement.

Are those two different meanings for "autoloading"? Or do the two go together in Ruby? (As is probably obvious, I'm not a Ruby dev)

[0]: http://www.rubyinside.com/ruby-techniques-revealed-autoload-...

comment 5y ago · link · parent

> I had the realization that there are practically two different Americas after I took a road trip through the south after having lived in the Northeast for ~20 years.

I've lived in ~8 states and can tell you that "two" is a significant undercount of the number of Americas. (And I suspect the same is true for most countries — it certainly is for India).

I'd also be careful about drawing that line in too purely a geographic way. Geographic differences exist, but parts of Alabama and parts of upstate New York have more in common than their geographic locations might suggest (to pick two places I've been lucky enough to have lived in)

comment 5y ago · link · parent

This varies tremendously by city/county within Europe. For example, there are some German cities where crossing a road anywhere other than at a marked crossing not only risks a fine but also will earn disapproving looks from other pedestrians (something I haven't encountered in the states, though I'm not ruling out the possibility that it could occur somewhere).

comment 5y ago · link · parent

> a Belgian friend of mine often crossed the streets of Brussels without stopping to look at the traffic, with blind faith they would just stop -- and they did.

In some cities/countries, there's also the fine art of looking without looking like you're looking — some drivers will yeild to you when you have the right of way and they aren't sure you've seen them, but will cut you off if they can tell that you know that they're there.

comment 5y ago · link · parent

> I imagine this couldn't be possible in the states due to the absolute vastness of it all

No, this absolutely happens in the states too — just on a smaller scale. Roads often have the name of the next town they run through. (One mountain town I'm familiar with in North Carolina has only 4 roads leaving town, each named for the town you'll arrive in if you take that road).

The county that applies that to pretty much every road (or at least used to) is Italy. I have vivid memories of trying to navigate the Italian highway system pre-satnav when none of the signs used the highway names on my map; instead, they listed the next city the highway would hit — frequently one that I wasn't familiar with. (And no, apparently all roads do not lead to Rome)

comment 5y ago · link · parent

> When I go back home to India, the very first cab from the Mumbai airport to home is like a dangerous roller coaster ride.

Somewhat oddly, I had exactly the opposite experience the one time I visited Mumbai — but I was coming from a few weeks in Ahmedabad, where traffic lights were basically a (typical ignored) suggestion.

comment 5y ago · link · parent

> I've yet to see a single thing here that is physically smaller than its version in India.

Statues sure are. https://en.m.wikipedia.org/wiki/List_of_tallest_statues

comment 5y ago · link · parent

> you could just replace any of the letters in 'user' with a different, but almost-identical looking unicode symbol and you'd still have an exploit.

The post mentions that exploit (and Rust's already existing defense) in the appendix.

Here are the details, as explained in a previous post:

> The compiler will warn about potentially confusing situations involving different scripts. For example, using identifiers that look very similar will result in a warning.

    warning: identifier pair considered confusable between `s` and `s`
https://blog.rust-lang.org/2021/06/17/Rust-1.53.0.html

comment 5y ago · link · parent

The BLS doesn't provide a "software engineer" option, though.

(Well, they provide "17-2061 Computer Hardware Engineers", but I assume that's not what you had in mind)

comment 5y ago · link · parent

Source: https://www.bls.gov/soc/2018/major_groups.htm#15-0000

Part of what I find odd is that these definitions seem to envision a separation between designimg software and actually writing the code — but, in my experience, it's much more common for those roles to be combined (and has been for quite a number of years)

73.

According to the BLS, are you a “computer programmer” or a “software developer”?

6 points · by codesections · 5y ago · 11 comments

comment 5y ago · link · parent

See also:

Reasonable Consumer Would Know “Crunchberries” Are Not Real, Judge Rules[0]

Yet Another Lawsuit About the Lack of Fruit in “Froot Loops”[1]

“Hint of Lime” Case: It’s Not Crunch Berries, But It’s Close[2]

[0]: https://loweringthebar.net/2009/06/reasonable-consumer-would...

[1]: https://loweringthebar.net/2010/04/yet-another-lawsuit-claim...

[2]: https://loweringthebar.net/2021/06/hint-of-lime-case-its-not...

75.

Gang of Four(en.wikipedia.org ↗)

2 points · by codesections · 5y ago · discuss

comment 5y ago · link · parent

> I've been at my current company for maybe 6 years now, in an engineering role. In that time, the service-oriented code which has [lasted the longest is] AWS lambda functions. We have quite a few Lambda functions (written in Node) that I believe pre-date even my tenure at the company.

Interesting, AWS lambda only launched in November, 2014[0]. So those more-than-six-year-old functions must have been written for a brand new platform.

[0]:https://en.m.wikipedia.org/wiki/AWS_Lambda

77.

Raku's surprisingly good Lisp impression(codesections.com ↗)

8 points · by codesections · 5y ago · discuss

78.

If you want to label your code, consider Label-ing your code(codesections.com ↗)

2 points · by codesections · 5y ago · discuss

comment 5y ago · link · parent

This is great! Its amazing how much more readable programming languages get when they drop the visual noise created by unnecessary keywords – there's a reason math is so much easier to understand when it's expressed with symbols than with words, and it's very surprising how few programming languages recognize that.

(I notice a few comments describing this syntax as less readable. My first thought was that these comments were sarcastic/trolling, but I've concluded that they're serious – but written by programmers who think very differently than I do!)

comment 5y ago · link · parent

> Why change closures from || to //? (You’ve then reused | for other things, but why not the other way round?)

Just guessing, but I bet it's to create a parallelism between // (closure) and \\ (closure that moves). If closures were ||, there wouldn't be quite as much of a same-but-different feeling as you get with slash & backslash.

81.

Data-first and data-last: a comparison of APIs (2019)(javierchavarri.com ↗)

1 points · by codesections · 5y ago · discuss

comment 5y ago · link · parent

> We looked at users who copied all or part of any answer, or users who took any voting action (upvote, downvote, etc.) on any answer.

Huh, I probably should have realized it, but the idea that Stack Overflow was tracking whether I copy an answer had never occurred to me.

(Mostly joking, I hope: I guess they could monitize that info for Stack Overflow Jobs, by certifying that a candidate has a low rate of copying answers!)

comment 5y ago · link · parent

The platinum members of the Rust Foundation are Amazon, Google, Microsoft, Facebook, Mozilla, and Huawei.

I'd pretty much prefer that none of those companies have any role in defining Rust – but, instead, they seem to be about the only ones who do.

comment 5y ago · link · parent

> 3. Most people would prefer not to have it, but due to a free market failure, the ungimmicked product just isn't available any more?

No, I'd go with (4) people would prefer not to have it, but companies know that they can monitize the data they collect[0] and thus are willing to offer a discount that's large enough to get people (who may or may not know about the data collection) to buy the smart™ version.

[0]: https://www.usatoday.com/story/tech/talkingtech/2019/02/21/w...

comment 5y ago · link · parent

Not just _look like_ — on Windows 95, moving the mouse _actually_ made things process faster, for fairly bizarre reasons.

Source: https://retrocomputing.stackexchange.com/questions/11533/why...

comment 5y ago · link · parent

smitty1e wrote:

> I'd always thought that stronger type systems had to do with performance and storage optimization, but TFA didn't delve into that.

I was also expecting/hoping to see this point addressed.

comment 5y ago · link · parent

> By suppressing easy-to-detect errors and passing through only the hard-to-detect errors, rigid type enforcement can actually make it more difficult to find and fix bugs.

I don't follow the logic here. If a more rigid type system produces an error, wouldn't that surface the error, not suppress it? What am I missing?

comment 5y ago · link · parent

> Previously, China limited the total length of time minors could access online games to three hours on holiday or 1.5 hours on other days.

Does anyone know how well the previous limit was enforced/how easy it was to evade?

comment 5y ago · link · parent

> Where does Joel Spolsky pick on boring languages?

I wonder if TFA is thinking about some of the harsh words Spolsky had for Java (e.g., [0]). That's not a criticism of boring languages in general, but is pretty negative on one boring language.

[0] https://www.joelonsoftware.com/2005/12/29/the-perils-of-java...

comment 5y ago · link · parent

With "more" notably including Q and other array languages — pretty much as far from "boring" as you can get
12345
11