Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Tei
Feb 19, 2011

One secret rule of programming is ... that tool you ignored as too hard / useless, you may start seeing has a savior when you are ready

Edit:
ugh.. first post in a new page. This would have never happened if the forums where migrated to Discourse

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Tei posted:

One secret rule of programming is ... that tool you ignored as too hard / useless, you may start seeing has a savior when you are ready

Edit:
ugh.. first post in a new page. This would have never happened if the forums where migrated to Discourse

Don't worry I'm sure that guy is going to come back with his rewrite in elixir in no time.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

leper khan posted:

Don't worry I'm sure that guy is going to come back with his rewrite in elixir in no time.
Who promised this? Should I get the popcorn?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Sagacity posted:

Who promised this? Should I get the popcorn?

:effort: iirc there was a thread from before new management came in

Deffon
Mar 28, 2010

pokeyman posted:

Programmers: The language isn't the hard part, really it's more about learning the libraries and system interfaces you're working with.

Also programmers: Unity forked a C# compiler and runtime but they're entirely beholden to someone else's vision of C# and couldn't possibly change anything to benefit Unity users, how dare you complain about things entirely under Unity's control.

You all sound like terrified Unity employees desperately avoiding having to learn where diagnostics are implemented in the compiler. Utterly baffling.

I'm not sure what you mean? Do you want people to maintain Unity-specific forks of C# libraries och documentation so that Unity can make some non-backwards compatible changes to the language?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Deffon posted:

I'm not sure what you mean? Do you want people to maintain Unity-specific forks of C# libraries och documentation so that Unity can make some non-backwards compatible changes to the language?

In practice people did that for years because of how out of date the C# version unity offered was.

Deffon
Mar 28, 2010

orenronen posted:

I actually like Unity quite a bit and think there's more good library design in there than bad. It is a huge library with different parts made by different groups, though, so consistency among components isn't a thing and the bad parts tend to be pretty bad.

The one basic thing that got me questioning their use of C# and that doesn't come up as often as the null issue is how a couple dozen basic lifetime and event functions (most notably Start() and Awake() when objects become active and Update() that's called every frame) aren't actually overridden from the base game object class or an interface implementation. They're called directly from the engine's C++ layer through reflection magic based only on their name and as so can be declared private without any issue. IDEs that directly support Unity development have hard-coded heuristics to make them come up in autocomplete tools.

It's really not that big a horror in the grand scheme of things (although it does cause some performance problems in very large projects, making some build custom systems to replace it), but along with the null thing it feels like early Unity was making for the same kind of decisions to "support" non-programmer friendliness as early JavaScript did.

I'm guessing the reason that Start() and friends aren't part of interfaces is ergonomics. Different scripts require differents sets of callbacks, and it's pretty verbose to add a single method that you might forget to annotate with override and mispell either way.

They could be abstract methods with default implementations where Unity would check if every method is actually overridden by a MonoBehaviour subclass.

One issue is that Unity also allows Start() to be a coroutine using IEnumerable. C# doesn't allow classes to have methods with the same signature except for the return type. I guess a better solution would've been to not call the IEnumerable method Start().
https://docs.unity3d.com/Manual/Coroutines.html

Since UnityScript was succeeded by C#, the C# scripting layer was also retrofitted to work with the previously UnityScript conventions, which were quite dynamic.

Deffon
Mar 28, 2010

leper khan posted:

In practice people did that for years because of how out of date the C# version unity offered was.

That's why I think it's a good thing that they now try to keep pace with .Net Core and standardisation.

Maintaining UnityScript, their own Javascript-like language on the CLR always felt like such a bad idea that was doomed from the start.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Deffon posted:

That's why I think it's a good thing that they now try to keep pace with .Net Core and standardisation.

Maintaining UnityScript, their own Javascript-like language on the CLR always felt like such a bad idea that was doomed from the start.

Has anyone in this thread ever talked about Boo? Does anyone have enough experience with it to make an effort post?

FlapYoJacks
Feb 12, 2009
My coding horror yesterday is abusing pythons ability to convert strings to methods using getattr and making a generic gRPC wrapper for a Django web interface that will be used for provisioning new devices. :v:

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

How does the other game engine, Unreal, handle all of this? Is it also insane in a load of ways?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

champagne posting posted:

How does the other game engine, Unreal, handle all of this? Is it also insane in a load of ways?

Their visual scripting language compiles to native. Not sure if it uses C++ as an intermediary or just dumps an AST for llvm.

A subset of users believe this makes the visual scripting fast, because it's C++. That's more a failure of imagination on unreal users than a horror of the engine though. The same set usually in the same sentence talk about how that makes it faster than unity which transpiles the generated IL to C++ to compile with llvm.

Last I looked at unreal it was insane in a lot of ways, but different from the ways unity is insane.

Deffon
Mar 28, 2010

champagne posting posted:

How does the other game engine, Unreal, handle all of this? Is it also insane in a load of ways?

Haven't used UE that much, but it seems like they still have their homegrown marker macros and generator to implement reflection in C++ (similar to QT?)
https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection

more falafel please
Feb 26, 2005

forums poster

leper khan posted:

Their visual scripting language compiles to native. Not sure if it uses C++ as an intermediary or just dumps an AST for llvm.

A subset of users believe this makes the visual scripting fast, because it's C++. That's more a failure of imagination on unreal users than a horror of the engine though. The same set usually in the same sentence talk about how that makes it faster than unity which transpiles the generated IL to C++ to compile with llvm.

Last I looked at unreal it was insane in a lot of ways, but different from the ways unity is insane.

Lol, blueprint doesn't compile to native, it compiles to UnrealScript bytecode. UnrealScript was the scripting language they used through UE3, and it's not even close to native. Blueprint is useful for simple stuff (designers rigging up level triggers, etc) but in a full production game you don't want any tight loops in Blueprint, because it's very slow.

Deffon posted:

Haven't used UE that much, but it seems like they still have their homegrown marker macros and generator to implement reflection in C++ (similar to QT?)
https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection

Yeah, it's this. UObject-derived classes have reflection macros. This also makes it easy to have Actor properties be replicated in network games. It's lightweight enough at runtime, and since UE4 is so popular, tools like Visual Assist understand unreal macros.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

more falafel please posted:

Lol, blueprint doesn't compile to native, it compiles to UnrealScript bytecode. UnrealScript was the scripting language they used through UE3, and it's not even close to native. Blueprint is useful for simple stuff (designers rigging up level triggers, etc) but in a full production game you don't want any tight loops in Blueprint, because it's very slow.

Yeah, it's this. UObject-derived classes have reflection macros. This also makes it easy to have Actor properties be replicated in network games. It's lightweight enough at runtime, and since UE4 is so popular, tools like Visual Assist understand unreal macros.

I should really stop trusting random people and focus on primary sources. :effort:

In other news: people keep trying to solve problems with redis. Even problems that aren't caching or key-value things. Especially problems that are trivially resolved with an RDBMS. But also things that would be better resolved with a kd-tree or similar. It's very frustrating.

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin
I feel like the curriculum for the Java class I'm taking might be a little out of date:


quote:

Create an applet named Vote.java that extends JApplet. This application will have three buttons: "Vote for Candidate 1," "Vote for Candidate 2," and "See Results." The user will select one of the candidates, and the applet will display the user's selection as well as randomly display the results between the two candidates. Embed this apple in an HTML page named vote.html.

dc3k
Feb 18, 2003

what.

more falafel please posted:

Lol, blueprint doesn't compile to native, it compiles to UnrealScript bytecode. UnrealScript was the scripting language they used through UE3, and it's not even close to native. Blueprint is useful for simple stuff (designers rigging up level triggers, etc) but in a full production game you don't want any tight loops in Blueprint, because it's very slow.

the nativization docs say it can be compiled into native c++. is that not actually true, or are you speaking specifically about the default setting?

https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/TechnicalGuide/NativizingBlueprints/

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Dr. Arbitrary posted:

Create an applet named Vote.java that extends JApplet. This application will have three buttons: "Vote for Candidate 1," "Vote for Candidate 2," and "See Results." The user will select one of the candidates, and the applet will display TMURP

ExcessBLarg!
Sep 1, 2001

Dr. Arbitrary posted:

I feel like the curriculum for the Java class I'm taking might be a little out of date:
I'm pretty sure this is how all voting machines actually work.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


https://twitter.com/0xabad1dea/status/1540630733252952064

redleader
Aug 18, 2005

Engage according to operational parameters

that to me feels more like malicious compliance. you'd have to go to extra efforts to gently caress it up in that way

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Someone got a little too DRY.

Polio Vax Scene
Apr 5, 2009



the only valid value the prompt accepts is "exposure"

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

If it uses eval on the client side it might be a legit XSS vulnerability as well. Someone should put in something like alert('test') || -1.

Wipfmetz
Oct 12, 2007

Sitzen ein oder mehrere Wipfe in einer Lore, so kann man sie ueber den Rand der Lore hinausschauen sehen.
But the applicants who pass this step are keepers in any controler's book. Not a bug, won't fix.

GABA ghoul
Oct 29, 2011


Hi badidea, you can just type -75000 or if you REALLY want to specify a range for some reason you can also type -65000.00057. As it's currently working and usable, it's not a high priority fix for now. We did put it on our to-do list though!

ChickenWing
Jul 22, 2010

:v:

Why


In God's name


Does this login endpoint return a 200 and valid response body (with all null fields) if it's missing the auth header :psyduck:

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
It's to thwart hackers like you, ChickenWing (which I assume is some sort of hacker alias).

NtotheTC
Dec 31, 2007


ChickenWing posted:

Why


In God's name


Does this login endpoint return a 200 and valid response body (with all null fields) if it's missing the auth header :psyduck:

I was horrified the first time I set up a rest API that would 404 if a resource wasn't found and had the SPA team complain that "none of the other API end points do this". They were right too, the API responses returned 200 with {"error": "<error code>"} as the body.

I thought it was unique to that place, but I've seen it in several other REST APIs out there so hell, maybe I'm the idiot.

rarbatrol
Apr 17, 2011

Hurt//maim//kill.
Maybe? We've got this weird back and forth argument where I work where upper management wants us to reduce our API error rates, which includes 400-level responses.

Beef
Jul 26, 2004
Good old Goodhart's law at work.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

rarbatrol posted:

Maybe? We've got this weird back and forth argument where I work where upper management wants us to reduce our API error rates, which includes 400-level responses.

Which exec wants a magic "do what I mean not what I say" login page

YanniRotten
Apr 3, 2010

We're so pretty,
oh so pretty
Just add password fuzzing, it logs you in if you're PRETTY close.

necrotic
Aug 2, 2005
I owe my brother big time for this!

NtotheTC posted:

I was horrified the first time I set up a rest API that would 404 if a resource wasn't found and had the SPA team complain that "none of the other API end points do this". They were right too, the API responses returned 200 with {"error": "<error code>"} as the body.

I thought it was unique to that place, but I've seen it in several other REST APIs out there so hell, maybe I'm the idiot.

GraphQL works this way and I hate it.

NtotheTC
Dec 31, 2007


rarbatrol posted:

Maybe? We've got this weird back and forth argument where I work where upper management wants us to reduce our API error rates, which includes 400-level responses.

*CEO steeples fingers*

"Simply add every possible entity into the database, then it cannot 404"

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Beef posted:

Good old Goodhart's law at work.

Not really. The number of 4xx results you're producing isn't a particularly useful thing to measure in the first place, since that's by definition not something under your control.

Foxfire_
Nov 8, 2010

Plorkyeran posted:

Not really. The number of 4xx results you're producing isn't a particularly useful thing to measure in the first place, since that's by definition not something under your control.
On the contrary, I think you'll find that with a fairly cheap EC2 instance, you can ensure that the number of 4xx errors is continually decreasing every month, thus proving your value to the company

Volguus
Mar 3, 2009

ChickenWing posted:

Why


In God's name


Does this login endpoint return a 200 and valid response body (with all null fields) if it's missing the auth header :psyduck:

That's a horror in and of itself. But it's probably just a matter of the developer hating all other status codes and just loving 200. But, what if, instead of just returning 200 with a json that contains the error message, you get a json with some members that contain javascript code which when executed in the browser will display the error message. Oh, you're not a browser you say? Tough luck I guess. Want that error message? Learn javascript.

Qwertycoatl
Dec 31, 2008

I think that happens because, from the developer's perspective, the client made a request for some json and successfully got some json, and the HTTP transport layer isn't really something they think about.

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!

Plorkyeran posted:

Not really. The number of 4xx results you're producing isn't a particularly useful thing to measure in the first place, since that's by definition not something under your control.

Except when you deploy a change to the front end that fucks up a payload or something.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply