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
Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

Xarn posted:

Using ternary operator to assign to a bit field you say? I think I have a new piece of code to scare people with. :v:
I'll shake your hand and congratulate you during your exit interview.

Adbot
ADBOT LOVES YOU

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

ToxicFrog posted:



Calibre is great as an ebook/e-reader management tool but as a piece of software it's pretty gross.

All software is pretty gross.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

megalodong posted:

RE the strncpy stuff from last page, I'm still amazed how often I come across people, supposedly with lots of C experience, using it as a "safe" copy for null-terminated strings...
Ehh, like anything else it is safe if you know what you’re doing and are in a controlled context.

But I guess from that perspective so are while loops looking for null terminators...

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan
On the topic of quieting compilers, I *love* whiteboard code interviews, as the people that that reflexively use signed/unsigned ints and consider range depending on context are the best. World population is a great one for this. Currency is interesting too,

This has gotten harder since 64-bit ints became a reasonable supposition, so I need to constrain the problem set these days, which can telegraph my intent.

Relevant because every large codebase I’ve touched is ridden with worthless signed/ unsigned compares that should be unsigned / unsigned.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

iospace posted:

There's a significant difference between a traditional diode and a data diode.

Efficacy

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

rt4 posted:

That's illegal now, too

This is cool, I’ve done entertainment stuff forever and have no exposure to this. What’s illegal, segmenting or not-segmenting?

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

Spatial posted:

Hardware horror: when you have seven different timer peripherals on a system, and not a single goddamn one of them can generate an interrupt when the time matches a given reference point.

Actually no - one of them can, but it takes 500us to write the reference value, making it completely worthless.

gently caress

:coolfish: you get to solve the problem a different way!

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan
Yield keyword?

I’ve been doing embedded either too long or not long enough.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

Polio Vax Scene posted:

give me one good reason why your system, which stores a decimal value, does not accept my submitted int value.
Man if you aren’t gonna read the API docs then use the example form.
Enter the integer, then look on the right, there’s a pull-down you use to specify if that integer is a representation of the fraction or exponent, then a dialog box to describe how the integer was encoding the fraction (or exponent), a repeat of the controls for the exponent (or fraction) then a radio button to indicate if the base is 2 or 10.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

rjmccall posted:


Twitter user whitequark is saying that a pointer can be thought of as integer, and a double can losslessly represent all integers in [-2^53, +2^53] (and therefore all currently-possible pointers on x86-64) as floating point numbers; that is magnificently useless.
Oh man, there’s some interesting obfuscation here. I’ve played LUT games with half-precision but this never occurred to me before.

Agreed, magnificently useless, but wow this is giving me an itch.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan
I love the Windows Store python setup, I can send our field support python scripts without spending a ton of time helping them gently caress around with paths and installers.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

Kazinsal posted:

Enums for complicated finite state machines tend to get real messy real quick.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan
Oh god this is giving me flashbacks to when my wife taught remote webdev for non-majors, the material was archaic and they didn’t want anything changed. When she complained and even offered to update the course they did that they always do to adjuncts that actually try to make things better and stopped giving her courses.

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan
I C++ footgunned myself the other day with frigging clamp(). Was in older code and std::clamp() wasn’t there, so I did a template in what was essentially ‘randomUtils.cpp’. Had to touch a lot of older code, so I of course re-factored ton of stuff into clamp().

Oops, turns out that unsigned is a thing, especially if people turn a dial Really Fast and of course when a hosed-up unsigned goes negative things get really interesting.

That build never left the building, I’m only posting this here because I know I have one point I posted here my diatribe about using signed versus unsigned for expected values and how that implicit communication is a good thing. Mea culpa.

Adbot
ADBOT LOVES YOU

Remulak
Jun 8, 2001
I can't count to four.
Yams Fan

abraham linksys posted:

how soon we forget the incredible technology that was Google Web Toolkit
I’m stuck with this poo poo forever. Goddamn it sucks.

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