Readit News logoReadit News
bbminner commented on Golfing APL/K in 90 Lines of Python   aljamal.substack.com/p/go... · Posted by u/aburjg
bbminner · 20 days ago
I still consider jax.vmap to be a little miracle: fn2 = vmap(fn, (1,2)), if i remember correctly, traverces the computation graph of fn and correctly broacasts all operations in a way that ensures that fn2 acts like fn applied in a loop across the second dimension of the first argument (but accelerated, has auto-gradients, etc).
bbminner commented on Bose has released API docs and opened the API for its EoL SoundTouch speakers   arstechnica.com/gadgets/2... · Posted by u/rayrey
ebiester · a month ago
If only their sound signature was a bit better... they went all in on engineering tricks to make things small and cheap to produce, but it shows in their sound quality. Their QC headphones are the best in noise cancellation, and the sound quality is good enough that they're my pair of wireless headphones.
bbminner · a month ago
A long while ago i heard something (that might have been a urban myth) about Bose putting useless weight into their headphones to make them appear more "substantially professional". Is that a myth or they have pivoted towards actual quality since early days?
bbminner commented on The Economics of Duke University   dontaylor13.substack.com/... · Posted by u/paulpauper
bbminner · a month ago
I'd be curious to know the breakdown of "wages and benefits" between academics, teachers and administrative staff. I've heard that admin takes up a huge fraction of the cost. How large can it be?
bbminner commented on Easel Now Has Stencils   easel.games/blog/2025-dec... · Posted by u/BSTRhino
BSTRhino · 2 months ago
This is a very kind comment, thank you! Yes it has been a LOT of iteration to make the language what it is. I think it would make sense to have a page for experienced developers to better understand what Easel is. Right now maybe the closest is this page: https://easel.games/docs/learn/key-concepts

Thanks again for your kind words!

bbminner · 2 months ago
This is really cool, these patterns (run once now and then once triggered) surface all the time and usually turn into ugly code! How many interations did it take?

So most lines like A { B{ on D{ print() } } C{} } equivalently desugar into something like a = A; b = B(); a.mount(b); d = D(); d.on(f); b.mount(d); .. ?

I got confused by a couple of things. One of them is whether object parameters act like context parameters and there for depend on names in the caller variable scope? Ie if i define 'fn ship.Explode', i must have variable ship at call site? But i can still otherwise pass it explicitly as alien_ship.Explode(), right? How do i know if a particular call takes the current object into account? If i have two variables in my nested scope: ship and asteriod and both have ship.Explode and asteroid.Explode, which one is picked if i do just `Explode`? The innermost? Or I can't have two functions like that because the first thing is literally just a named variable and not a "method"?

Overall, if you could provide some examples of how things could have de-sugured into a different language, that'd be very interesting! Maybe with some examples of why this or that pattern is useful? I think it does a good job for things like on / once, but I'm not grokking how one would structure an app using this variable scoping use clause and object parameters.

Also not sure how to define functions that could be on'd or once'd. (Ah, i see, delve)

bbminner commented on Full Unicode Search at 50× ICU Speed with AVX‑512   ashvardanian.com/posts/se... · Posted by u/ashvardanian
bbminner · 2 months ago
I was really confused about the case folding, this page explained the motivation well https://jean.abou-samra.fr/blog/unicode-misconceptions

""" Continuing with the previous example of “ß”, one has lowercase("ss") != lowercase("ß") but uppercase("ss") == uppercase("ß"). Conversely, for legacy reasons (compatibility with encodings predating Unicode), there exists a Kelvin sign “K”, which is distinct from the Latin uppercase letter “K”, but also lowercases to the normal Latin lowercase letter “k”, so that uppercase("K") != uppercase("K") but lowercase("K") == lowercase("K").

The correct way is to use Unicode case folding, a form of normalization designed specifically for case-insensitive comparisons. Both casefold("ß") == casefold("ss") and casefold("K") == casefold("K") are true. Case folding usually yields the same result as lowercasing, but not always (e.g., “ß” lowercases to itself but case-folds to “ss”). """

One question I have is why have Kelvin sign that is distinct from Latin K and other indistinguishable symbols? To make quantified machine readable (oh, this is not a 100K license plate or money amount, but a temperature)? Or to make it easier for specialized software to display it in correct placed/units?

bbminner commented on Easel Now Has Stencils   easel.games/blog/2025-dec... · Posted by u/BSTRhino
BSTRhino · 2 months ago
I’ve got a Discord from my previous game of about 2000 people, mostly teenagers, and my testers have mostly come from there. To name one example, just yesterday a teenager completed a chess game after 3-4 weeks on Easel. I’ve been incorporating tons of feedback from the testers over the past year and a half.

I think that it may look strange to a person who has coded before because the language is semi-declarative. Most teenagers come to Easel as players with no prior programming experience, and begin by remixing their favourite game, and that’s when the semi-declarative model really shines. Many interesting changes can be done in a single edit because the code is clumped together in a hierarchy. Whereas in another programming language there may be more indirection and you might need to edit 3 separate parts in different files to make 1 change, and people who haven’t coded before don’t know how to find all the parts. I think Easel works for players becoming makers but can feel strange for people who come from other languages.

bbminner · 2 months ago
It is very interesting though! I have been interested in this kind of language design for interactive UI for a while. If there was a quick article outlining how all the "with" and "on" and "own" work to more experienced developers using references to existing language features, I'd love to read it. Right now it reminds me of the declarative style of qt ui and online primitives introduced in godot, but i haven't looked at it in more details. Also love your take on async. Wish you all the best luck, this seems like a really thought through language design!
bbminner commented on VCMI: An open-source engine for Heroes III   vcmi.eu/... · Posted by u/eamag
bbminner · 2 months ago
Did HoMM series ever get popular outside Eastern Europe? I am yet to meet a person born and raised in the US who have heard about it, but maybe i am just unlucky or targeting a wrong demographic.
bbminner commented on Patterns.dev   patterns.dev/... · Posted by u/handfuloflight
8cvor6j844qw_d6 · 2 months ago
Looks great, time to add it to my bookmarks.

Anyone has other sites like these to share?

- Domain-driven design, design patterns, and antipatterns

https://deviq.com/

- Refactoring and Design Patterns

https://refactoring.guru/

- Standard Patterns in Choice-Based Games

https://heterogenoustasks.wordpress.com/2015/01/26/standard-...

bbminner · 2 months ago
I think it is difficult to oversell the bob nystrom game patterns book

https://gameprogrammingpatterns.com/contents.html

bbminner commented on Patterns for Defensive Programming in Rust   corrode.dev/blog/defensiv... · Posted by u/PaulHoule
stouset · 2 months ago
Good article, but one (very minor) nit I have is with the PizzaOrder example.

    struct PizzaOrder {
        size: PizzaSize,
        toppings: Vec<Topping>,
        crust_type: CrustType,
        ordered_at: SystemTime,
    }
The problem they want to address is partial equality when you want to compare orders but ignoring the ordered_at timestamp. To me, the problem is throwing too many unrelated concerns into one struct. Ideally instead of using destructuring to compare only the specific fields you care about, you'd decompose this into two structs:

    #[derive(PartialEq, Eq)]
    struct PizzaDetails {
        size: PizzaSize,
        toppings: Vec<Topping>,
        crust_type: CrustType,
        … // additional fields
    }

    #[derive(Eq)]
    struct PizzaOrder {
        details: PizzaDetails,
        ordered_at: SystemTime,
    }

    impl PartialEq for PizzaOrder {
        fn eq(&self, rhs: &Self) -> bool { 
            self.details == rhs.details
        }
    }
I get that this is a toy example meant to illustrate the point; there are certainly more complex cases where there's no clean boundary to split your struct across. But this should be the first tool you reach for.

bbminner · 2 months ago
While better, a person modifying PizzaDetails might or might not expect this change to affect the downstream pizza deduplication logic (wherever it got sprinkled throughout the code). They might not even know that it exists.

Ideally, imho, a struct is a dumb data holder - it is there to pass associated pieces of data together (or hold a complex unavoidable state change hidden from the user like Arc or Mutex).

All that is to say that adding a field to an existing struct and possibly populating it sparsely in some remote piece of code should not changed existing behavior.

I wonder whether there's a way to communicate to whoever makes changes to the pizza details struct that it might have unintended consequences down the line.

Should one wrap PizzaDetails with PizzaComparator? Or better even provide it as a field in PizzaOrder? Or we are running into Java-esq territory of PizzaComparatorBuilderDefaultsConstructorFactory?

Should we introduce a domain specific PizzaFlavor right under PizzaDetails that copies over relevant fields from PizzaDetails, and PizzaOrder compares two orders by constructing and comparing their flavours instead? A lot of boilerplate.. but what is being considered important to the pizza flavor is being explicitly marked.

In a prod codebase I'd annotate this code with "if change X chaange Y" pre submit hook - this constraint appears to be external to the language itself and live in the domain of "code changes over time". Protobufs successfully folded versioning into the language itself though. Protobufs also have field annotations, "{important_to_flavour=true}" field annotation would be useful here.

bbminner commented on The Easiest Way to Build a Type Checker   jimmyhmiller.com/easiest-... · Posted by u/surprisetalk
bbminner · 2 months ago
I have not looked into the HM algorithm much, but is there (an educational or performance wise) advantage over implementing a (dumb) SAT solver and expressing a problem as a SAT problem? It always seemed like the "natural representation" for this kind problem to me. Does knowing that these are types _specifically_ help you somehow / give you some unique insights that won't hold in other similar SAT problems?

u/bbminner

KarmaCake day298November 18, 2015View Original