Posts by codesections@fosstodon.org
(DIR) Post #AQfaz6s4CSR3SCViiW by codesections@fosstodon.org
2022-12-15T16:27:58Z
0 likes, 0 repeats
Does anyone know how Hacker News avoids being constantly DDoSed? I mean, it's got an API (https://github.com/HackerNews/API) that doesn't require authentication and doesn't have a rate limit—which seems like a perfect recipe for DDoS attacks. Yet HN is typically a very reliable site. Any idea what's their secret might be?(I posted ^^^^ as an "Ask HN", https://news.ycombinator.com/item?id=34001410 But so far, the only suggestion was "Maybe people just love Hacker News too much to DDoS it"That strikes me as … implausible )
(DIR) Post #AQfazJ5clsPVLiwiW0 by codesections@fosstodon.org
2022-12-15T16:52:16Z
0 likes, 0 repeats
@ayo > The possibility that nobody has tried [to DDoS Hacker News] yet seems somewhat plausible to me, actually. I've hosted two moderately poplar sites for over a decade myself… [without being a DDoS target]. But then, I also don't know what motivates someone to launch a DDoS in the first place.I don't know where the line between "moderately" and "very" popular is, but HN apparently gets ~12M visits/month (https://www.similarweb.com/website/news.ycombinator.com/#overview) – I would think that'd be enough to draw some attention
(DIR) Post #AQfazNc1xKi1NO8ea8 by codesections@fosstodon.org
2022-12-15T16:59:06Z
0 likes, 0 repeats
@ayo > I'm dealing with 2.7M and 3.4M visits/month [and haven't been a DDoS target]That's actually very interesting and causes me to *significantly* revise my estimate of the likelihood of a random site being DDoSed.Maybe I've bought into #cloudflare's hype (or that of static site generators) but I'd thought of "DDoS protection" as something of a requirement for even small sites.
(DIR) Post #AQfazQ0v1lo0p9nYeW by codesections@fosstodon.org
2022-12-15T17:01:40Z
0 likes, 0 repeats
@ayo Though I guess for a small site, there's also the Slashdot effect/hug of death, which is something like a "friendly" DDoS.Maybe I've been lazy in lumping non-targeted traffic spikes (very common) together with targeted DDoSes (potentially less common than I thought?)
(DIR) Post #AQhc8UJGuf6n1aBuPA by codesections@fosstodon.org
2022-12-17T15:10:42Z
0 likes, 0 repeats
Just occasionally, the modern word is pretty neat. I just realized that, due to my own dumb error, the images were gone from my 2021 Raku Advent Calendar post (https://raku-advent.blog/2021/12/06/unix_philosophy_without_leftpad/) (I'd forgotten to copy the images from my site to that one, and then deleted the "useless" dev copies on my site).I hadn't backed them up, and re-creating them would be tedious But @internetarchive saved the day!Not the *recommended* backup strategy, but I guess it's a perk of doing things in public!
(DIR) Post #AQhc8Us0pUtilKReYS by codesections@fosstodon.org
2022-12-17T15:17:59Z
1 likes, 0 repeats
Also, I don't know how long the images were broken, so sorry to anyone who read the post when they were (in fairness, they were mostly dumb jokes like the one below).On the other hand, I was thanking past-me for putting in fairly descriptive alt-text. #failingGracefully
(DIR) Post #AQnl5QCZnL9rx1Qp2O by codesections@fosstodon.org
2022-12-20T14:42:53Z
1 likes, 1 repeats
Just posted “Sigils are an underappreciated programing technology” https://raku-advent.blog/2022/12/20/sigils/An extract:This post represents my attempt to to convince you that sigils are a powerful tool for writing clear, expressive code.No, strike that, I’ll go further – this post is my argument that sigils are a **powerful tool for clear communication in general**; sigils being useful for programming is just an application of the more general rule.
(DIR) Post #AR246kZ8BdDMjvldaq by codesections@fosstodon.org
2022-11-16T14:49:57Z
0 likes, 0 repeats
@korkeala > Hello fediverse, here's my #introduction post.Welcome to #fosstoden!> I'm a software developer and a long time Linux/#FOSS user. I maintain packages in #Fedora, but recently been also exploring #guix.I've been exploring #guix too, both as a user and by trying to update the #rakulang packages. It's a fascinating distro, but certainly has a learning curve.Do you think you'll stick with it?
(DIR) Post #AR246lPb2ZBLMeJXN2 by codesections@fosstodon.org
2022-11-16T23:26:09Z
0 likes, 1 repeats
@korkeala > I think it [#guix] has a long way to go to be used my primary laptop OS.I'd agree with that, but I'd note that "laptop" is a pretty important word in that sentence: I'm currently using Guix as my primary *desktop* OS, and it's going pretty well.That's because running Guix on a (fairly beefy) desktop mitigates two pain points for laptop use: I don't need wifi (sidestepping Guix's driver support), and I can more easily build from source when Guix doesn't have a binary substitute.
(DIR) Post #ARL7jNvwG55g4HDHIu by codesections@fosstodon.org
2023-01-05T17:20:12Z
1 likes, 0 repeats
I recently received a gift of some socks with binary data printed on them. My first reaction was:“Cool – but what does it say? Surely it must say *something*, even if it's gibberish”But, on closer examination, I don't know how to read the binary. In fact, I (quite literally) don't even know where to start: because the sock is cylindrical, there isn't a clear first number in any row. It could start anywhere!So, how do I find the secret message in my socks?
(DIR) Post #ASbDgr5go8E1nYoq6C by codesections@fosstodon.org
2022-12-10T18:49:25Z
1 likes, 1 repeats
@alcinnz > Dear developer, your assumptions are wrong - HTMHell: https://htmhell.dev/adventcalendar/2022/10/Hmm, generally good advice there, but I'm not sure about the advice to disable spellcheck for `Name` fields. Sure, many users might not have their name in their dictionary and having a red squiggly line may be annoying. But – given the ability to add words to spellcheck dictionaries – many other users *will* have their names in the dictionary. And I'm willing to admit to having typo-ed my own name!
(DIR) Post #ATVmKwZEovrht3wLOS by codesections@fosstodon.org
2023-03-11T15:06:50Z
0 likes, 0 repeats
I have a new appreciation for the holy wars waged over code formatting and tabs-vs-spaces. That's because I've been hacking on @masukomi's Hey (https://github.com/masukomi/hey_3), which is a (quite nifty!) time-tracking CLI app. But it uses tabs and snake_case when the normal #rakulang practice is spaces and kebab-case.I mean, #timtowtdi and there's nothing _wrong_ with those choices. And of course I followed those conventions in my PRs – anything is better than chaos.But, man, my eyes, my eyes!
(DIR) Post #ATWh0S6A5Y8Oz7i2ZE by codesections@fosstodon.org
2023-03-11T18:26:33Z
1 likes, 0 repeats
@wizzwizz4 @martijn > just do whatever and then run an autoformatter afterwardsBut if the project doesn't already use an autoformatter, running one is a good way to turn a 5-line PR into a 100-line one.(and, as a practical matter, there's the fact that afaik there isn't a widely accepted autoformatter for #rakulang) But, more broadly, I'm actually pretty anti-autoformatter (at least for expressive languages). And I'll tell you why in a reply to this toot.
(DIR) Post #ATWh0TjtzHW84fJI9I by codesections@fosstodon.org
2023-03-11T18:35:22Z
0 likes, 0 repeats
I'm not a huge fan of code formatters for two main reasons.First, they make code less expressive – when you format code, you emphasize certain elements and de-emphasize others (e.g., line breaks before method calls gives more prominence that a 1-line expression) .This helps the reader focus on the important elements and – maybe more importantly – it communicates which elements *you* view as important. When code is formatted automatically, you lose an important communication channel.1/2?
(DIR) Post #ATWh0VWVM3zNbh3cXo by codesections@fosstodon.org
2023-03-11T18:45:19Z
0 likes, 0 repeats
The second reason I don't love code formatters is that, ime, any rules that avoid unreadably cluttered code in edge cases always make average code take up more vertical space.That, in turn, means you get less code per screen. So coding involves way more context-switching. Maybe my short-term memory just sucks, but imo "having code fit in one screen" is a hugely underrated superpower.(In fact, I believe in single-page code so much that I wrote a package devoted to it https://github.com/codesections/_)
(DIR) Post #ATWh0XFCxLLEwcyprU by codesections@fosstodon.org
2023-03-11T18:51:15Z
0 likes, 0 repeats
3/3That said, I don't *hate* code formatters. They have their place, especially for large teams – even if the code is less communicative and longer, that still beats arguing about formatting.And I recognize the value in having a single, community-wide style; even though I don't love its decisions, I use rustfmt when writing #rustlang But I'm personally really glad that #rakulang *doesn't* have a generally-accepted formatter. IME, it's part of what keeps Raku code concise and expressive
(DIR) Post #AadCdjMlTY80sUrEsy by codesections@fosstodon.org
2023-10-10T14:46:48Z
0 likes, 0 repeats
@massa @_@hachyderm.io > It's the `[\]` metaoperator, that applies to another operator and returns the running reduction to another operation. So, the answer to the challenge is sub runinng-sum(@_) { [\+] @_ }Or (as I bet you know), Raku also provides the same functionality with &produce. So the following all work: sub running-sum(@_) { produce &sum, @_} my &running-sum = &produce.assuming(&sum); my &running-sum = *.produce(&sum);#rakulang 1/2
(DIR) Post #AadCdkUFJDhsLzMjBY by codesections@fosstodon.org
2023-10-10T14:53:20Z
0 likes, 0 repeats
@massa @_@hachyderm.io @_ The final form ^^^^ (`my &running-sum = *.produce(&sum);`) is probably my favorite: even though it's (slightly) longer than the `[\+]` form, it's more explicit.But where the `[\+]` form *really* shines, imo, is in *not* writing a running-sum function. After all `[\+] 1..9` is both shorter and – assuming you know the syntax – clearer than `running-sum(1..9)`. So there's really no reason to define &running-sum at all.The clearest code is code you don't write at all!#rakulang
(DIR) Post #AadCdn2ho4SYHRVHAu by codesections@fosstodon.org
2023-10-10T14:58:29Z
0 likes, 0 repeats
@massa @_@hachyderm.io @_ Oops, sorry for the people named @_ accidentally mentioned upthread! (Though you *did* pick that handle 😁 )
(DIR) Post #AagQKjCtpBnRiNxL9c by codesections@fosstodon.org
2023-10-12T03:15:08Z
0 likes, 0 repeats
Does anyone have examples of really well-governed, reasonably large FOSS projects? (Ideally languages, but others would be good too.) Or a governance process/mechanism/system that you particularly like?A few years ago, I would have said #rustlang or #Python. But #rust's RFC process seems to have hit some growing pains and Python's BDFL isn't.So now I'm not sure who I'd say Gets It Right™. Any suggestions?