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

> The problem is, is supposedly, upvote = adds to the conversation, downvote = detracts from conversation.

>

> In reality, upvote = I agree, downvote = I disagree.

Maybe Twitter should go all the way back to the Slashdot model, and let people vote up and down on "insightful", "funny", "normal", "offtopic", "redundant", "interesting", or "troll", etc.

comment 5y ago · link · parent

The code in this post is in Raku[0] — pretty much the perfect language for expressing something in "multiple ways". There's More Than One Way To Do It, as we like to say.

[0]: https://docs.raku.org

comment 5y ago · link · parent

The Raku syntax for list comprehension[0] is very similar as well.

Julia:

    [ x^2 for x = 1:5 ]
Raku:

    do $_² for 1..5;
[0]: https://docs.raku.org/language/py-nutshell#List_comprehensio...

comment 5y ago · link · parent

> elm-review doesn’t have severity levels, meaning that all enabled rules are enforced. Yes, no warnings

Imo, this misses an important use case for warnings: reporting issues that I don't want in committed code, but that are fine while developing. For example, dead code — I don't want to commit a function that's never called, but I do want to be able to compile/run my code and run any tools over it when I've written a new function but not yet called it.

comment 5y ago · link · parent

I'm not sure either —which is why I said "may have been reasonable" instead of "was reasonable" :)

I can see an argument for doing your own research, but I can also see an argument for basing an analysis on what GitHub said in the FAQ — I'm honestly a bit surprised that Microsoft's lawyers let them say that with a product that can reproduce such large blocks of verbatim code.

comment 5y ago · link · parent

Julia Reda's analysis depends on the factual claim in this key passage:

> In a few cases, Copilot also reproduces short snippets from the training datasets, according to GitHub’s FAQ.

> This line of reasoning is dangerous in two respects: On the one hand, it suggests that even reproducing the smallest excerpts of protected works constitutes copyright infringement. This is not the case. Such use is only relevant under copyright law if the excerpt used is in turn original and unique enough to reach the threshold of originality.

That analysis may have been reasonable when the post was first written, but subsequent examples seem to show Copilot reproducing far more than the "smallest excerpts" of existing code. For example, the excerpt from the Quake source code[0] appears to easily meet the standard of originality.

[0]: https://news.ycombinator.com/item?id=27710287

comment 5y ago · link · parent

My first impression was that this page was oddly defensive but, on the other hand, their criticisms of the CVE system made a fair amount of sense. Do others tend to agree with those critiques?

comment 5y ago · link · parent

It's actually "Defense Against Dark Arts" (no "the" and slightly different capitalisation), which makes it slightly less of a match for the Harry Potter reference that I assume is the source of the humor.

comment 5y ago · link · parent

As noted in a previous discussion [0], the first example contains a typo: the sequence "[3 4 11 11 14 16 22 25]" should be "[3 4 11 11 15 16 22 25]" (not a big deal, but it was enough to make me wonder if I wasn't understanding the algorithm)

[0]: https://news.ycombinator.com/item?id=7800728

comment 5y ago · link · parent

I didn't read the GP as making a statement about the _creators_ of Go, but rather about its target users. And Go is explicitly targeted at "Programmers working at Google [who usually] are early in their careers and are most familiar with procedural languages, particularly from the C family."[0] If Google's interviews gateted on the sort of programming language questions the GP mentioned, then Go's target users would have been very different, and Go would likely be a different (better? Worse?) language.

[0]:https://talks.golang.org/2012/splash.article

161.

Wikipedia – Criticisms of Programming Languages(en.wikipedia.org ↗)

2 points · by codesections · 5y ago · discuss

162.

The frame rate of the universe (2009)(librador.com ↗)

75 points · by codesections · 5y ago · 68 comments

comment 5y ago · link · parent

Note that HN's formatting ate several of the * in the comment above, which makes it much harder to follow.

> (also yes, (* * *) will take two inputs and multiply them.)

That's true, but Raku also supports non-Unicode math operators, so the more idiomatic way to write that would be

  (* × *)
which, in isolation, still isn't that clear. But it usually is in context. And, if it isn't – well, that's why there's more than one way to do it!

comment 5y ago · link · parent

> Raku seems to be stuck in a "we'll optimize that later" dead-end … Raku has a long way to go.

I agree that Raku still has a long way to go in terms of performance – it's not nearly as fast as it has the potential to be.

That said, I strongly disagree that Raku's performance is stuck. I've only been using Raku for about a year, but even in that time I've seen a noticeable improvement. Over a longer period, Raku has gotten dramatically faster – around a 10× improvement from the 1.0 Christmas release, depending on how you measure. For details, check out this 2019 talk where one of the lead Raku developers discusses performance gains/plans. ([0] video; [1] slides)

There's definitely still work to do (especially with regexes and grammars, as you mention). But the language has made tremendous progress, and is now in the same basic range as Python/Ruby/Perl.

[0]: https://www.youtube.com/watch?v=QNeu0wK92NE [1]: https://www.jnthn.net/papers/2019-perlcon-performance.pdf

comment 5y ago · link · parent

> I've heard Perl described as a sort of linguist / grammatical type of language, where you can solve the same problem using multiple approaches and syntax. Is this something Raku is drifting from or embracing?

Very much embracing – "turning up to 11" might be a better way to put it. I recently wrote a three-part blog series[0] about what Raku's primary values, and the more-than-one-way-to-do-it idea features prominently in that list.

[0]: https://www.codesections.com/blog/raku-manifesto/

comment 5y ago · link · parent

> I can't recall which exact presentation it was, but Bryan Cantrill had a brilliant segment on this in one of them. Perhaps others around here can remember?

I think that's his discussion of language values in "Rust and Other Interesting Things" at Scale By The Bay 2018. https://www.youtube.com/watch?v=2wZ1pCpJUIM

[edit: This talk is also titled "Platform values, Rust, and implications for systems software". I'm not sure which title is preferred.]

167.

Vitamin D supplementation as a prophylactic for coronaviruses and influenza(lesswrong.com ↗)

40 points · by codesections · 5y ago · discuss

comment 5y ago · link · parent

> Clearly, there’s more to managing a domain than a “license to print money”. Otherwise, who would want to sell it?

I know this is a bit pedantic/not the point, but any "license to print money" -- that is, any claim on an infinite stream of recurring income -- actually has a fixed value at which you _should_ sell it. See https://www.fool.com/investing/2016/06/22/how-to-calculate-t...

comment 5y ago · link · parent

I find pointfree programming (also called "tacit programming" really powerful, but most/all of the descriptions I've found are way more abstract than I'd prefer. This is my attempt to talk through the advantages in the context of a real-world example.

170.

What’s the Point of Pointfree Programming?(raku-advent.blog ↗)

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

171.

Yash, yet another shell, a Posix-compliant command line shell written in C99(yash.osdn.jp ↗)

3 points · by codesections · 5y ago · discuss

172.

A Fast Technique for Searching an English Spelling Dictionary (1979)(docs.lib.purdue.edu ↗)

1 points · by codesections · 5y ago · discuss

comment 6y ago · link · parent

(It doesn't particularly matter, but this article (which I wrote) is attributed to me in an odd way: my name is "Daniel Sockwell" and my username is "codesections". "Daniel Sections" is a new one to me, I must admit!)

comment 6y ago · link · parent

Key quote from the linked discussion:

> Mastodon and twtxt are very similar except:

> * twtxt has the notion of user owned/managed feeds (think of this as topics or personas you twt as)

> * twtxt doesn't and cannot chain replies together, so there are no threads.

> * twtxt polls, rather than streams for updates to both local and external feeds

comment 6y ago · link · parent

I'd be interested to hear how this compares with Mastodon[0] -- based on a quick look, they seem very similar.

[0]: https://joinmastodon.org

176.

Open Source Keyboardio Atreus Keyboard – Six Week Review(codesections.com ↗)

3 points · by codesections · 6y ago · discuss

comment 6y ago · link · parent

Additional info (including a video shot with a high speed camera and the underlying raw data of the 136 million keystrokes) is available on the project website, https://userinterfaces.aalto.fi/136Mkeystrokes/

178.

Observations on Typing from 136M Keystrokes (2018) [pdf](userinterfaces.aalto.fi ↗)

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

179.

Mondegreen(en.wikipedia.org ↗)

2 points · by codesections · 6y ago · discuss

1
567
11