Hacker Newsnew | past | comments | ask | show | jobs | submit | setr's commentslogin

I’m pretty sure NTILE is just a generally cursed function. SQL NTILE also requires everything to be loaded in memory because of the odd rule that larger buckets precede smaller buckets, so it’s unusable on anything decently sized.

Not being able to specify how ties are handled (and choosing, as far as I can tell, a fairly useless definition) fits the bill.


If it is "cursed" for a function to do what it is clearly documented to do, instead of what someone mistakenly imagines it to do, then what function isn't cursed?

> Not being able to specify how ties are handled (and choosing, as far as I can tell, a fairly useless definition) fits the bill.

Actually, you can completely specify how ties are handled—and should, in any study designed to be repeatable. The docs for dplyr::ntile tell us that:

> To rank by multiple columns at once, supply a data frame.

So, repeatable, completely specified tiebreaking is as easy as adding a tiebreaker column to the dataset, using whatever strategy makes sense for your study. For example, if we wanted random tiebreaking using R's built-in `runif`, all it takes is one extra line of code:

    data_table |>
      dplyr::mutate(
        tie_breaker = runif(dplyr::n()),
        ntile_bin = dplyr::ntile(tibble::tibble(partitioning_key, tie_breaker), n = 4))
Almost 100% of the original author's problems could have been avoided by just reading the docs.

Is that really the name for it? It sounds revolting

Can’t we just use prim and proper terms like provenance


"Provenance" tracks where data came from, but "taint" tracks where unsafe data can flow. It's a uhh not so sexy term, but it is the industry standard term.

It’s been a fair few years since I got to write some new Perl but I’m fairly sure you could use Perl -T which meant any variables passed into the program (typically from cgi) would be tainted until you safely extracted the contents (via a regex for example)

The word itself is getting on for a thousand years old, originally solely in the sense of colour dyes, similar to “stain”, but over time this was adopted to be “to corrupt” in a more figurative sense, I suspect the same root for taint and stain, with taint more indisputable and harder to remove perhaps.

Seems appropriate to use in computing.


The main meaning of taint is contamination. Not really a revolting term to me. Maybe you associate it with some of its other meanings and that’s why you find it revolting.

“Taint analysis” is certainly evocative.

If they were actually useful though, demand shouldn’t stay the same — more niches should be getting filled. If they’re just clones of each other, then yes

i mean, i had multiple gaps filled in the last few month for things i was longing for.. but all for free.

Same. I've stopped paying for things that aren't quite what I want and built things exactly how I want for free.

Sometimes in business you ultimately and unavoidably have to eat shit, so it is what it is. But you should strive to be someone who doesn’t have to eat shit, and until then, if you still gotta eat shit, then try not to make a habit of it.

Well said :)

Well, if you start accepting eating shit in a new way you’re only fooling yourself you won’t accept it again.

With query hints finally being added it’d probably be doable as an extension

Roguelikes are the ultimate in procgen technology, and should be the basis of any design. (DF is the ultimate simulation but uses procgen as a tool to achieve it; a different vein than NMS trying to explore the procgen and its direct outcomes itself)

1. Any imaginary world needs to be internally consistent to be interesting. Procgen does not void this rule; randomization needs to be gated to that internal consistency.

2. A world can be composed of multiple environments, and each environment can a different definition of internal consistency. Dungeon Crawl Stone Soup does this very openly and to fairly good effect, but pretty much any decent procgen game will inevitably end up with the same choice, because it's what enables you to play with various procgen systems/rules while still having a coherent overall game.

3. Generalizing 2, procgen systems generally do not start from nothing; You embed reasonably well-defined bases (races, weapon forms, etc) and then apply randomization on top of those bases to form the final element. Meaningful fundamental variation in those bases leads to guaranteed meaningful variation in the end result.

4. Games are fundamentally interactive systems. Generating a thousand variations without actually changing interaction is equivalent to generating exactly one variation. A blue orc vs a red orc is a not real variant, unless you make it so by attaching effects / statuses / capabilities. The color distinction is then a signal into the more abstracted changes that have occurred. This is where NMS falls over -- the images have changed, but the interaction has not.

5. A corollary to point 4, changing numbers without changing interaction is equivalent to doing nothing. If a meaningful damage threshold is functionally every 10 points of damage, then generating numbers 0-9, 11-19, etc is equivalent to generating just the numbers 0 and 10. This is where borderlands falls over -- a million variations in guns, but the vast majority of those variations are just numeric differences that don't change anything in practice.

6. If the procgen applies to equipment/builds, you pretty much need permadeath as a driver for exploring a procgen game and its systems, because you need players to explore for a local optima. Exploring the space for a global optima in a procgen game inevitably devolves into a gambling simulator, because players optimize out the fun, and the optimal play is to the kill unit XYZ repeatedly for the 0.5% drop. Games like Terraria fall into this trap (though Terraria resolves it mostly by making unit XYZ be trivially summon-able bosses)

7. Procgen can never guarantee interesting results; You inevitably need a system of vaults/artifacts -- hardcoded quality items -- to guarantee periodic interesting locations/items. Ideally more notable than average generation, but less than strictly optimal so as to not overpower the other systems -- an issue I've had with games like Diablo 3, where finding an item-set was vastly more powerful than anything else that I acquired for the next 5+ hours, eliminating the entire looting system (and even character skill system, since it forced my build too)

8. Decent Procgen is inevitably rule-based, with possibly multiple chained-rules each doing their own rolls, to ensure coherency. Ideally the rule-chain is roughly discoverable from the end results (by virtue of following internally consistent and apparent rules) -- an end-result that cannot be explained is indistinguishable from pure-random, and pure-random in incoherent. See any Tabletop RPG generation tables.

9. Hell, just start any procgen design from tabletop RPG tables.

10. The number of variations that can be produced is meaningless. This is only for marketing.

11. A procedural system that generates exactly once is fairly pointless. Permadeath.

12. A procedural system is inherently unfair, because you cannot guarantee difficulty, proper placement, unit composition, etc without removing the procedural systems outright. Embrace the unfairness, and design around it. Permadeath.

13. A procedural system is inherently unfair; you need to give some guaranteed items with guaranteed results to navigate an uncertain world (e.g. escape tools).

14. It's always good to enable some control by the player over the procedural generation. Choice of environments, chances at additional loot, etc. You want the player to engage with procgen rules, because they're interesting (and if they're not, what are you doing?), and the easiest way is to give them tools to manipulate it to their advantage. Also permadeath.


You can work around 12. with constraint satisfaction solvers.

After generating the level structure, emplace an entrance and exit such that they are maximally apart. And emplace a strong monster in one of the rooms around the exit. And emplace a health potion in one room before the strong monster. And emplace treasure in the exit room.

That sort of stuff and be specialized and coded towards your particular games structures fairly easily.

Scale is much harder though. In something like NMS it’d be intensive doing such a constraint solver on the whole galaxy. Might work in chunks or regions though.


The problem is setups like in slay the spire, if we imagine there was no path selection, you can run into scenarios that are functionally unwinnable (I recall someone finding a seed in StS that was literally unwinnable, but ignoring that). Eg Act1 elites that counter your build, but too early for you to consistently have secondary options/workarounds.

Obviously people have high consistent wins in StS1/2 so it’s not like they’re guaranteed unwinnable, but for the average human (mostly just boils down to “path to do act1 elites until after you probably have a counter to all of them)

Your options are:

1. All scenarios are easy enough that you can get away with just about anything sensible

2. You don’t have any counter mechanics, which is basically the same as 1, and is difficult to do anything interesting with

3. You announce up-front what you’re going to deal with, so the onus is now on the player to find a solution in the meantime

4. You give the player a NOPE utility

In a roguelike, I think 4 is the better design, but 3 is also reasonable. 1 & 2 just makes things less interesting.


I’m not sure you have to squint; an mview is just a cached query. The only difference between an mview and a cache is the “incremental” part of the equation.

That is, my only disagreement is the lack of gusto


TFA links to PixelPie as a GPU implementation https://www.cs.umd.edu/gvil/projects/pixelpie.shtml


Also Casey, but his much cooler/deterministic solution to grass placement, to avoid lines

https://caseymuratori.com/blog_0011


Ignoring aesthetics, there’s simply significantly more detail produced by max


And it's correct detail. Earlier models had things like detached hats, or lighthouses floating above or below the level they should be at, etc. Everything is where it should be, the fish is clearly in the basket and not clipping through it, the animation has cartoon-correct parallax which is fairly impressive. By "cartoon-correct" I mean that if that was a real photo with real physics, that would be way too much motion for the boat and clouds, but for a cartoon, that is completely acceptable.


The animation isn't down to max though - I took the SVG created by max and piped it back into high and asked that to animate it.


Thank you for the clarification. I'm just impressed by the whole thing in general.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: