kogasa

joined 1 year ago
[–] [email protected] 2 points 11 months ago

That's why I stopped writing code and started writing ASTs and AST transformers that can be configured to emit libraries.

[–] [email protected] 2 points 11 months ago

Modern .NET is reducing dependence on reflection. System.Text.JSON and other core libraries have leveraged source generation to produce AOT + trim friendly, reflection free code. But yeah, it's not a taboo like say dynamic, it's perfectly normal to use reflection in idiomatic C# code.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

I don't get what you mean. You can define class Pie and instantiate it with the type argument Pie.

Huh, maybe I don't get it because Lemmy is literally erasing angle brackets from our messages. Not just "not rendering." It's removing them entirely. There should be four angle brackets in the first line of this comment...

[–] [email protected] 10 points 11 months ago

True, but that's definitely C#

[–] [email protected] 24 points 11 months ago (7 children)

This is just so people can't self host media, right? Why else would they obsessively cap upload speeds?

[–] [email protected] 1 points 11 months ago

You're gonna have to settle for VB free

[–] [email protected] 2 points 1 year ago

Oh yeah, you shouldn't. But people do this for fingerprinting, bot detection, and other "adversarial" scenarios where you really don't like the person executing your code. It's somewhat plausible Google would use this technique to do something scummy like this (although that is not the case).

Relevant article and a great read: https://www.nullpt.rs/reverse-engineering-tiktok-vm-1

[–] [email protected] 1 points 1 year ago

The assignment syntax is too close to comparison, which is what is more typical in that position. I would recommend

const bool _isFeatureEnabled = false;
if (_isFeatureEnabled && ...)

if not a proper feature flag (or just remove the code).

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago)

Automata and formal languages were pretty much my entire "Theory of Computation" class. It's what's in Sipser.

[–] [email protected] 6 points 1 year ago (3 children)

You can build a virtual machine in JavaScript and execute compiled code on it

view more: ‹ prev next ›