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
pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
That's way less clunky than other ways to detect those languages, this is unequivocal progress!

Also lol.

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Oh I thought I saw something about C23 changing auto to do proper type inference, so I assumed the tweet was about that.

Xarn posted:

Nah, that's one of the worse ones. The best one (e.g. because it hasn't been deprecated, nor does it rely on compiler backcompat support) is taking sizeof 'a'.

Ok that one is better.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Next time I need thirty-six million datetimes I'll be skating away while you idiots twiddle your thumbs an extra four seconds.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

mmkay posted:

0 isn't a square of some other number :colbert:

-0

(not representable in go)

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

QuarkJets posted:

"pad" is standard vernacular for "append data to the leading and/or trailing edge of some other data". Other terms like "fill" are used sometimes but "pad" is probably the one I most commonly see

(it was a left-pad joke)

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Someone jokingly suggested yoink and yeet for Swift's upcoming ownership modifiers, so there's a chance!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Needs more semicolon

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Xarn posted:

uuuugh why not use a loving loop?

Why would it be a loop? Should be a bunch of if else.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Oh I see, shoulda read it closer.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

candy for breakfast posted:

current coding horror is a new hire who wants to rename the production database because he doesn't like it. gave him the business casual "that's a stupid idea and you're on your own if it fucks everything up", luckily he works at our subsidiary and doesn't report to me lol

Guessing "master"

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Feels different than saying a single instruction like "subtract and branch if less than or equal to zero" is Turing-complete.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
C has designated initializers so you can do whatever order you like! Just can't beat the flexibility of these modern dynamic languages.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
You could allow access to the tutorial before showing a login screen. Or move it to the Game Over screen as a "save your progress so you don't have to redo this?" kinda thing. Or investigate creating an anonymous/local-only account by default and allow the player to flesh it out whenever.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Absurd Alhazred posted:

I can see tons of security, gameplay, server/client balance, and netcode ramifications just looking at these possibilities. Not decisions that I'd expect a UI person to come to and then design around (although obviously a good team would seek input from UI for any and all decisions, same as any department).

All good points that would come up in a discussion when the UI person says "hey this is not an ideal new player experience, are any of these directions worth exploring?"

Or everyone assumes the login wall is the only way and no discussion happens because things might be hard, I guess.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

SupSuper posted:

Swiss Army Knife serializers seem to be a pretty good recipe for security holes.

On the other hand. having to wrote one more line of code than theoretically necessary to parse json is a tragedy, so

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I used python as a better sh when it shipped with macOS. Now I'm back to sh.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Red Mike posted:

My bad, it looks like they fixed the boolean/all values specifically enumerated edge cases. That doesn't change that the entire approach is trying to do what is basically classes and sub-classing, except it's doing it via interfaces (duck-typing) and unions. Sure, you can do it, but that's not the right tool for the job. Highlighted by the fact that they deliberately had to add handling for these cases and are unable to handle the general case. Because it's the wrong tool for the job.

Don't get me wrong, in TS all too often you'll end up having to use that particular tool, because an interface is what you have to use (or what a library provides, or what a tool expects, etc). But it's not a slight against the language that it's letting you hammer in a screw but it doesn't work that well all things considered. The closest thing to a slight is that interfaces/unions are too readily available for things that you should use classes/other types for, but that's vague and probably not solvable.

e: I'll be honest, more of a horror is literal types altogether because they're a hacky fix that's been taken to a ridiculous extreme. There just shouldn't be a way to define an interface as "type false", only "type boolean".

It's been awhile since I spent serious time in TypeScript (or JavaScript), but promoting class inheritance and decrying literal types seems to entirely miss the point of TypeScript. Maybe your problem isn't wrong tool for the job, it’s that you've actually got a different job on your hands?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I vaguely remember some parts of CS courses structured as "you know that thing you've been using this whole time? Now you're gonna implement it yourself!" Gave some motivation that was missing from "you're gonna need this someday so just do it now".

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

necrotic posted:

My new favorite thing to do at work is go on a spiel about time and that it’s not real. Lotta people don’t know that leap seconds (forwards AND backwards) exist and it kinda fucks them up.

Leap years: embraced.
DST hours: contentious.
Leap seconds: hosed.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
And why I love Swift's copy-on-write.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
It's pretty simple: my interpretation is obviously correct and you're all idiots.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

dougdrums posted:

I think the idea is that if you kept typing, then the result isn't what you wanted, which is dumb as hell because you would have to finger-peck for it to bring up results in time for you to read them as you typed anyways

That was my guess too. "Hey we're returning results within 1ms, we can do this!" Cut to responses no longer appearing within 1ms.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
The common advice to move to another language when a script gets complicated is not bad advice. But the steadfast refusal to learn the second thing about one's tools continues to be impressive. sh is a mildly esoteric programming language, it's not some impenetrable wall. If you get the vapours at the sight of an at sign, maybe that's on you.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I've seen leading (or trailing, lol c++) underscore as a marker for "private" in all the languages mentioned so far. Seemed common to me, though not at all universal.

MrMoo posted:

It’s wrong in most languages as an underscore prefix is reserved for the compiler vendor

C++ contains multitudes but calling it "most languages" is a bit much.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Dijkstracula posted:

Look, bash programmers overwrite $IFS all the time so what’s the big deal???

Not me :smug:

because apple ripped bash out of macos a version or two ago :(

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Volmarias posted:

They do not. It's mainly human readable stuff sometimes defaulting to PST, or times being given without a timezone, but all of that is much less common than it used to be. The joke is that it's Google Standard Time.

Well at least they refuse to observe daylight saving time!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
It's entirely possible to make a website usable on phones with very little css and using, heaven forfend, tables. Sounds like they just did a bad job.

Nalin posted:

I maintain a code-base written in the early to mid 2010's that uses <table>. It's also ASP.NET WebForms and they do fun stuff like not closing the <td> or <tr> tags so I always wonder how the heck it will decide to render things. The rendering engine seems to be able to handle the malformed HTML, but that is only the case until the day in the future when it decides to choke.

I've been fixing the missing closing tags as I find them, but rewriting the page layout is something I haven't been able to do yet. There's too much work and not enough devs to have the free time to fix stuff like that. The developer dilemma.

Handling unclosed/malnested/etc. elements is exhaustively and extensively standardized, there's no technical reason to "fix" it. Though I totally get how annoying it would be, I'd add them too :)

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Yikes that scheduling site is brutal.

There were a few years there before flex and grid where people were all "you can't use tables for layout, you must use these display and float and position tricks" that made a hilariously underwhelming case for css. I don't fault anyone for using tables for layout in that era.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

OddObserver posted:

I can appreciate the buttons compared to trying to deal with keyboard events (which historically belonged in this thread).

Why use one <input> when 26 will do!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
This is sounding like the most realistic intro dev course around. Possibly unintentionally.

Also flashing back to failing an assignment because I used java.util.Scanner when that was next week's assignment.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Bruegels Fuckbooks posted:

i am a big fan of functional programming (which is also something that I didn't learn in college) but I feel that restricting for loops is getting lost in the sauce (unless the objection is that for loops require declaring an variable as an iterator).

Something like "we're trying to teach recursion so no for loops please" seems pretty reasonable?

OP the real answer is figure out how to obfuscate the for loops to bypass the for loop detector.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Student code is cheating but still hilarious, and that includes mine.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

RPATDO_LAMD posted:

Also how would you teach stuff like trees and linked lists in a 'friendly' language without pointers like java or python?

code:
class Node {
    Any value;
    Node? succ;
}

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Zopotantor posted:

That's just a COND with unnecessary syntactical clutter.

JavaScript is just a Scheme with unnecessary syntax clutter so this checks out!

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
It's like how a[2] is the same as 2[a].

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Soricidus posted:

it was the kind of thing that looks like it might be against the spec, and is bad code for that reason.

This is me writing any line of C++. "But does this really work the way I think it does???"

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