Readit News logoReadit News
throwaway17_17 commented on Red Programming Language   red-lang.org/p/about.html... · Posted by u/hotpocket777
ksymph · 3 months ago
Here [0] is an example of what it looks like. Took some digging to find, really should be more prominent on the site.

It's very elegant! I can't fully grasp everything that's happening but the visual appearance of the syntax alone is interesting.

[0] https://github.com/red/code/blob/master/Scripts/clock.red

throwaway17_17 · 3 months ago
I agree that this particular coding example looks good. I find it aesthetically pleasing for some reason. But like you I don’t know the language, which leaves me with a question, does this code make understanding the function’s operation and implicit usage contract (i.e. the function’s type) clear to a dev that does know the language?

I would assume it does, because I assume I be able to know these things in a comparable JS or Python example. But if that assumption is correct I really like the ‘look’ of Red.

throwaway17_17 commented on Comparing Parallel Functional Array Languages: Programming and Performance   arxiv.org/abs/2505.08906... · Posted by u/vok
yubblegum · 3 months ago
Chapel got a mention in the 'Related Work' section. I looked at it a few years ago and found it compelling (but I don't do HPC so it was just window watching). What's the HN feedback on Chapel?

https://chapel-lang.org/

throwaway17_17 · 3 months ago
Chapel and Lustre (a parallel, distributed file system) from Cray were funded by DARPA’s High Productivity Computing Systems program. This work, along with Fortress, from Sun, were developed explicitly to enable and ‘simplify’ the programming of distributed “supercomputers”. The work and artifacts, along with the published documentation and research is of particularly high quality.

Even if you aren’t involved in HPC I’d say the concepts transfer or provide a great basis for parallel and distributed idioms and methodologies that can be adapted to existing languages or used in development of new languages.

TL;DR - Chapel is cool and if you are interested in the general subject matter (despite a different focus) Fortress, which is discontinued, should also be checked out.

throwaway17_17 commented on Push Ifs Up and Fors Down   matklad.github.io/2023/11... · Posted by u/goranmoomin
deepsun · 3 months ago
In my field (server programming) readability trumps them all.

Nested g() and h() can be much better if they are even just 1% easier to understand. No one cares about a few extra CPU cycles, because we don't write system or database code.

throwaway17_17 · 3 months ago
I will admit it is probably just some internal biasing from some unknown origin, but I always tend to think of server programming as a part of systems programming. To your mind, what keeps it out of the systems programming umbrella? I am not super certain about how programmers in your area break up the constituent parts of a server’s code, so maybe I’m thinking more along the lines of the ‘framework’/libraries your code is executing within.

Is this more of a ‘server programming is not systems programming because we are just implementing the logic of what gets served’ vs. my assumption that server programming includes the how does the server connect to the world, cache things, handle resource allocation, and distribute/parallelize the computations required to serve data back to the user?

throwaway17_17 commented on Ty: A fast Python type checker and language server   github.com/astral-sh/ty... · Posted by u/arathore
tyrion · 4 months ago
Helping improve the spec and all is great, but being 100% honest, as a user, I would rather have a type checker I can bend to my needs. As you said, some code patterns in a dynamic language like Python are difficult, or even impossible, to type-check without custom code. Type checkers are becoming more popular than ever, and this implicitly means that these code patterns are are going to be discouraged. On one hand, I believe the dynamism of Python is core to the language. On the other, I would never want to write any collaborative piece of software without a type checker anymore. Therefore, to get the benefits of a type checker, I am occasionally forced to write worse code just to please it.

Considering how fast uv and ruff took off, I am sure you are aware of the impact your project could have. I understand that supporting plugins is hard. However, if you are considering adding support for some popular libraries, IMHO, it would be really beneficial for the community if you could evaluate the feasibility of implementing things in a somewhat generic way, which could be then maybe leveraged by third-party authors.

In any case, thanks for all the amazing work.

throwaway17_17 · 4 months ago
Can you either give some additional details on the code patterns you’re talking about, or link to some ‘typical’ examples? I do appreciate the flexibility of being able to just write code and not particularly be overly sensitive to jumping through typing hoops, but I can’t think of any place I’ve actually used algorithms or specific code patterns that rely on untyped-ness to actually work at run time. I’d be very interested in trying to work through what is actually required to consider these code patterns as well-typed.
throwaway17_17 commented on Programming languages should have a tree traversal primitive   blog.tylerglaiel.com/p/pr... · Posted by u/azhenley
CyberDildonics · 4 months ago
This thread is about traversing a tree. At what point do we take a step back and think that iterating through a data structure and "building new compositional foundations for game theory" shouldn't be conflated together?

When does someone give up on the pagentry of programming and just get something done by looping through data instead of "constructing getters and setters to model gradient based machine learning".

It really seems like the straight forward way of doing things is to make simple iteration and worry about the game theory after that is all figured out.

throwaway17_17 · 4 months ago
I do get, and to some extent sympathize with, your position. But the comments to the article are, in large part, fundamentally addressing a higher level of abstraction than the more narrow scope of the article’s premise. As several commenters have referenced, traversing a tree in a ‘simple’ and narrow manner is addressed at the appropriate level of abstraction using already established mechanisms, particularly in Haskell using Traversable (a typeclass with a standardized implementation for trees). The discussion of Optics and Lenses are more of a side discussion about the syntax and implementations of a more broad set of data structures than merely trees.

I think your comment is valuable in spirit because it could bring a more thorough discussion of the creation or popularization of a syntactically clean and a shift of the idiomatic-ness of such a solution to traversing trees. Leaving the more abstract and general Optics discussion to be a side dish for commenters to discuss as well.

Also, just a nitpick, but traversing a tree is a broader topic than iteration. Iteration implies, both colloquially and formally, performing a computation on each element of a data structure, while traversal is a more general algorithm that could be the basis of iteration, but may also be more akin to a search through the data structure without expectation of performing computation until the searched for ‘member’ is returned from the traversal. So it’s not an apples-to-oranges comparison with your conflation of iteration and traversal, but does seem a little like Canis Familiaris-to-Mammal comparison.

throwaway17_17 commented on Concurrency in Haskell: Fast, Simple, Correct   bitbashing.io/haskell-con... · Posted by u/ingve
throwaway17_17 · 4 months ago
From the footnotes:

> In bare-metal embedded systems or inside the operating system, it’s not unusual to manually break computation into state machines, driven by interrupts.

Although not the topic of TFA, in fact, the footnotes that this is "a whole different ball game." Does anyone have any good source for this aspect of 'low-level'/OS development? I'm more than capable of chasing down sources from a more high level introduction or overview, so anything would be helpful. This concept seems like it may just be a more pragmatic description of embedded/OS development than what I've read previously.

throwaway17_17 commented on Pitfalls of Safe Rust   corrode.dev/blog/pitfalls... · Posted by u/pjmlp
forrestthewoods · 5 months ago
Unsigned integers were largely a mistake. Use i64 and called it a day. (Rusts refusal to allow indexing with i64 or isize is a huge mistake.)

Don’t do arithmetic with u8 or probably even u16.

throwaway17_17 · 5 months ago
Can you expand on your thoughts here? What is the root issue with unsigned integers? Is your complaint primarily based on the implications/consequences of overflow or underflow? I’m genuinely curious as I very often prefer u32 for most numeric computations (although in a more ‘mathematics’ domain signed ints will often be the correct choice).
throwaway17_17 commented on In Jail Without a Lawyer: How a Texas Town Fails Poor Defendants   nytimes.com/2025/03/25/us... · Posted by u/ceejayoz
rafram · 5 months ago
And were any of those for public urination alone, without any obscene intent at all? Just a guy peeing in the bushes because he can't find a bathroom?
throwaway17_17 · 5 months ago
My response was to the question about defendants pleading out to a lesser charges to avoid felonies. But, I have pled several defendants to charges based on public urination, both guilty as charged (typically to avoid a Habitual Offender enhancement) and to misdemeanor charges. In my state, Obscenity (which public urination is considered) is not a registration requiring offense, but it is in several other states, like Texas for example.
throwaway17_17 commented on In Jail Without a Lawyer: How a Texas Town Fails Poor Defendants   nytimes.com/2025/03/25/us... · Posted by u/ceejayoz
rafram · 5 months ago
OK, I would challenge you to find a single case, reported in the media, in which a defendant took a plea deal rather than face charges that included mandatory sex offender registration for nothing more than public urination. If that has ever happened, surely it would've been reported on at least once, right?
throwaway17_17 · 5 months ago
I am uniquely qualified to respond to your question in that over my career I have represented 4,000+ criminal defendants. It is incredibly common for defendants to take lower charges to avoid consequences. This is nearly uniformly true for sex offenses which require registration. While obviously not able to use individual client names, I can guarantee I have personally represented hundreds of defendants who pled to a felony obscenity charge to avoid to avoid registration as a sex offender.
throwaway17_17 commented on Rust inadequate for text compression codecs?   palaiologos.rocks/posts/r... · Posted by u/todsacerdoti
vacuity · 6 months ago
I disagree. Just as C++ and Rust conceive of "plain old data" (POD) as data that basically has no surprising behaviors on cleanup (probably butchered that explanation), I think of libraries as "plain old code". Unlike services, libraries are part of the address space and should passively serve the main executable portion. That's why they are libraries specifically. A library should, if it detects an error, tell the main executable and then it is up to the main executable to do the responsible thing and address the error seriously. Needless to say, I don't like glibc-style "libraries". Doing too much in the background, in the same address space, no less. A library should be a nice, isolated unit that a programmer chooses to add into their executable at will. My concern is that composability and modularity aren't respected enough.
throwaway17_17 · 5 months ago
I'm absolutely sure that this is the clearest statement of how I view libraries I've ever read. I am not actually certain I would have phrased it this well. So I'm commenting to save it in my comments thread.

u/throwaway17_17

KarmaCake day1145December 17, 2019View Original