@rygorous@mastodon.gamedev.place avatar

rygorous

@rygorous@mastodon.gamedev.place

Abstraction maker, abstraction breaker. FUN FACT: things I prefix with FUN FACT are sometimes fun and sometimes factual, but very rarely both.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

dougbinks, to random
@dougbinks@mastodon.gamedev.place avatar

I should probably invert my normal research approach for fast algorithms from.

  1. I search the internet for information.
  2. I read @rygorous' blog.

This time it's for fast blurs.

https://fgiesen.wordpress.com/2012/08/01/fast-blurs-2/

rygorous,
@rygorous@mastodon.gamedev.place avatar

@dougbinks FWIW this is nice and constant-time for very large kernels but for small to medium sizes you're better off doing something else

rygorous, to random
@rygorous@mastodon.gamedev.place avatar

You can tell that Chad really isn't much of a Chad at all going by how the usual unit in common parlance is actually the Gigachad.

and here I thought Pascals and Teslas were awkwardly normalized. This is like Farad levels of inconvenient scaling

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @lritter @TomF no it's just earth wind and fire chad, but they're fabulous

danluu, (edited ) to random
@danluu@mastodon.social avatar

I can't quite put my finger on it, but there's something delightful about this list of "legitimate" uses of negative literals:

https://github.com/elm/compiler/issues/1773.

I think part of it is the circumstances that would compel users to construct such a list. Until that thread, it hadn't even occurred to me that someone would present a case against the existence of negative literals that required a rebuttal.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@pervognsen @danluu It doesn't really work well to define it that way on two's complement targets though.

E.g. the canonical way to INT_MIN on 32-bit C targets is (-0x7fffffff - 1) or similar. You can't write (-0x80000000) since the 0x80000000 is too large for int32 so it forces the constant to be unsigned, and then you end up with the wrong type.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@pervognsen @danluu Subtle caveats like this make me think that, even if it seems less elegant, it might be a good idea to make literal negation have actual productions in the grammar to avoid potholes like these.

aeva, to random
@aeva@mastodon.gamedev.place avatar

I saw a C# library earlier that boasted that part of it was "optimized using unsafe code".

A friend already clued me in on how and why the unsafe modifier carrying a positive general sentiment for C# programmers, so I gather that this just means "I used the language's low level programming features to tighten up a hot path", but I can't help but giggle at what that sounds like.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva funsafe code

rygorous, to random
@rygorous@mastodon.gamedev.place avatar

who called it egg whites and not yolk zero

rygorous, to random
@rygorous@mastodon.gamedev.place avatar

Even a single bite of a human can kill an adult brown recluse spider

aeva, (edited ) to random
@aeva@mastodon.gamedev.place avatar

astound broadband more like ass pound broadband

...actually, ass pound broadband sounds great, like a local ISP based out of boy's town run by a bunch of bears sign me up

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva their top offering is actually a power bottom offering

steve, to random
@steve@discuss.systems avatar

The world is shit, but I got to write assembly for like two hours this morning, so life is OK.

rygorous,
@rygorous@mastodon.gamedev.place avatar
fanf, to random
@fanf@mendeddrum.org avatar

2021 retro-link! https://github.com/arnoldrobbins/cstr100 - Why Pascal is Not My Favorite Programming Language. (troff source)

rygorous,
@rygorous@mastodon.gamedev.place avatar

@pervognsen @fanf I keep wondering if I'm wearing rose-colored nostalgia glasses but literally last week a younger colleague was playing around with TP 7.0 (I think it was, one of the vers with a Turbo Vision IDE) in a JS-based emulator on a webpage and was very surprised by how good the UX was, especially considering it's a DOS program from the early 90s.

Not just of the IDE, the language/compiler too.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@pervognsen @JamesWidman @aminom @fanf Optimized putpixel, oh dear.

Apparently Chaos once ruined someone's entire month with this simple exchange (back when nobody know how to do 3D properly):

Them: "We've optimized this vector rotation routine really well. All 12 multiplies are as fast as we can get them." (they were doing 3 successive rotations by Euler angles with 4 muls each.)
Chaos: "12? I need 9."

rygorous, to random
@rygorous@mastodon.gamedev.place avatar

lisp evangelists trying to make it seem like it's all sunshine and rainbows but whenever I look under the hood I see nothing but cons

rygorous, to random
@rygorous@mastodon.gamedev.place avatar

Want to get a large pet but are worried about the noises they might make? Try the Horse-Pig®. They Make Good Neighboars.™

danluu, to random
@danluu@mastodon.social avatar

How long before formal methods are widely use in software engineering?

https://www.patreon.com/posts/102809124

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu These days people writing "formal methods" usually mean something relying on model checkers, automated theorem provers, SMT solvers or similar, and my argument was that type systems (even weak/inexpressive ones), formal grammars/automata theory as well as alternatives such as PEGs, or even reverse-mode autodiff are also formal methods by the usual definition, it's just that nobody calls them that anymore.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu Here's a workable (albeit tongue-in-cheek) definition in plain English:

If you can have a discussion about whether something is a bug or working as specified, it's not a formal method. :)

With formal methods, you can still have bad specs, but the expectation is that the specification is complete and unambiguous.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu That's a type of testing, not a formal method.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu Ruby itself is not defined rigorously enough for something to be written in it to serve as a formal spec.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu To give one example, there's the Math module in the standard library, which has functions like sin or log in it that usually call the system math library, which can give different results for say log(1.234) or sin(1.234) on different machines (depending on which OS, compiler and platform they use).

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu Absolutely not.

Any language that allows implementation-specific behavior is right out.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu I'm not arguing about what reasonable standards for testing are, you were asking what counts for a formal spec and I'm pointing out some ways in which "code is the spec" is still generally too loose to write proofs against.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva @danluu It feels like you're taking this thread as a personal attack in some way and I'm not sure why?

This is not about some ranking about what verification methodologies are superior to others, you just expressed confusion about what counts as formal and I'm trying to clarify.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva The issue with that is that to check it, in general you need to actually run the code, which has problems, specifically it might just never terminate and things like that.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva Now there's absolutely ways around that too. Namely for things like control flow, you need to abstract things away sufficiently so that you never actually need to loop (which could run forever) and ideally never branch either, which is not theoretically a problem, because it's only ever a finite number of possible execution paths, but is practically a problem because of the combinatorial explosion of cases you would need to check.

rygorous,
@rygorous@mastodon.gamedev.place avatar

@aeva That's in essence pretty much what a type system ends up doing - instead of testing concrete values (which can run into the above issues), you abstract values into their types, and make constraints about types of things around control flow so that you never actually need to execute all paths through loops or branches to ensure it all matches up.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • rosin
  • ngwrru68w68
  • GTA5RPClips
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • slotface
  • everett
  • vwfavf
  • kavyap
  • megavids
  • Leos
  • khanakhh
  • cisconetworking
  • cubers
  • InstantRegret
  • ethstaker
  • osvaldo12
  • modclub
  • anitta
  • provamag3
  • tacticalgear
  • tester
  • JUstTest
  • All magazines