Thermopyle posted:I don't understand what you're saying here. I think the point is that databases have lots of nifty features, but most people only use them for simple data queries and re-implement those same features in various web development frameworks.
|
|
# ? Oct 1, 2018 09:37 |
|
|
# ? Jun 8, 2024 09:12 |
as a midtier developer I'm gonna need y'all to shut the gently caress up about properly configuring databases, thanks and god bless
|
|
# ? Oct 1, 2018 16:53 |
|
quote:I think that's called "software development." For example, every REST or GraphQL web app right now would have been faster and more secure as a database that properly uses authentication, authorization, triggers, relations and constraints. But once a problem is solved, you need to start coming up with more problems. So let's just use the database as a key-value store and rewrite all the rest in slow-as-hell, insecure-as-poo poo Rails. And yeah, GraphQL is/was in pure hype mode. It's a reasonable thing to use in some specific cases, but it's getting wildly overused. Khorne fucked around with this message at 17:39 on Oct 1, 2018 |
# ? Oct 1, 2018 17:08 |
|
New Yorp New Yorp posted:I'm thinking more along the lines of something like the Azure portal. Everything you can do with the portal, you can do with REST APIs. I keep seeing people rebuilding their own Azure portal that calls the same REST APIs as the existing portal. I can't fathom why, other than "not invented here" and I was looking for a term to use to describe it when I'm telling people "that's dumb, don't do it". It's interesting that this is what you were thinking of because I read you first post and thought "I just call that The Microsoft Way"
|
# ? Oct 1, 2018 18:07 |
|
New Yorp New Yorp posted:I'm thinking more along the lines of something like the Azure portal. Everything you can do with the portal, you can do with REST APIs. I keep seeing people rebuilding their own Azure portal that calls the same REST APIs as the existing portal. I can't fathom why, other than "not invented here" and I was looking for a term to use to describe it when I'm telling people "that's dumb, don't do it". I think "don't roll your own" comes close but it does lack a certain punch.
|
# ? Oct 1, 2018 18:27 |
|
Plorkyeran posted:C++ currently doesn't have a way to express "the two types passed to this function have to be comparable" (that's maybe finally coming in C++20 after over a decade of delays). As a result, the compiler doesn't know what point in the call stack is incorrect, and just prints the whole thing. As with any time you get an error stack starting in library code, you usually want to start with looking at the first one not in the library. And the code block not wrapping lines. I wasn't disagreeing with you. It's definitely not a problem. Steve French posted:I think he is saying that they are useless layers on top of a database. Which is, uh, an interesting argument if I'm reading it right. The database can do almost all app logic. Because it's not a perfect fit, we build mountains of layers of abstraction on top of it. The better solution would be to improve databases or constrain your use cases. PostgREST and PostgraphQL are evidence of this. All most DB apps need are proper constraints, auth and relationships. Then you get atomicity, fast-as-C and such for free. xtal fucked around with this message at 19:28 on Oct 1, 2018 |
# ? Oct 1, 2018 19:24 |
|
Dylan16807 posted:I'm pretty sure they meant "EAX in thread 0 and EBX in thread 1". No, I understood them to be using X and Y as memory locations. And the hardware that can divine the programmer intent from these sequences and meet that expectation continues to be horrific, your unnecessary second guessing aside.
|
# ? Oct 1, 2018 19:36 |
|
New Yorp New Yorp posted:I'm thinking more along the lines of something like the Azure portal. Everything you can do with the portal, you can do with REST APIs. I keep seeing people rebuilding their own Azure portal that calls the same REST APIs as the existing portal. I can't fathom why, other than "not invented here" and I was looking for a term to use to describe it when I'm telling people "that's dumb, don't do it". missed this earlier but the azure portal is dogshit, which might explain some people doing anything they can to not use it. Just using the CLI would be better though, it at least is usable.
|
# ? Oct 1, 2018 21:31 |
|
JawnV6 posted:No, I understood them to be using X and Y as memory locations. And the hardware that can divine the programmer intent from these sequences and meet that expectation continues to be horrific, your unnecessary second guessing aside. Divine programmer intent? All it has to do is serialize memory accesses. It's not hard to do, it's hard to make fast.
|
# ? Oct 1, 2018 22:46 |
|
To be precise, it's hard to make fast if you have any intention of ever supporting multiple cores. Cue a hundred web programmers jumping in to say that anything that stretches their childlike understanding of computers is premature optimization.
|
# ? Oct 2, 2018 03:23 |
|
rjmccall posted:To be precise, it's hard to make fast if you have any intention of ever supporting multiple cores.
|
# ? Oct 2, 2018 03:30 |
|
Nude posted:I think "don't roll your own" comes close but it does lack a certain punch. We called it re-creating the universe at an old job. Then we'd have pie.
|
# ? Oct 2, 2018 17:18 |
|
pokeyman posted:Swift generics are cool.
|
# ? Oct 2, 2018 18:09 |
|
Nude posted:I think "don't roll your own" comes close but it does lack a certain punch. rolling your own cigarettes/blunts/joints is actually a good skill to have. maybe you're looking for "don't reinvent the wheel?"
|
# ? Oct 2, 2018 18:12 |
|
Most wheels are specialized for the vehicle they're attached to. Some wheel types have sophisticated mechanisms inside to help them roll better. Reinventing the wheel every now and then is a good thing.
|
# ? Oct 2, 2018 18:18 |
|
Why the hell would you write a timeout like thisC++ code:
|
# ? Oct 2, 2018 18:21 |
|
Is 'hardware_thing' actually touching hardware that will behave unexpectedly if flooded with requests? "every other time, do a 18,000 cycle delay" Another guess would be reading updates it, so you want to do 2 quick reads but there's no point in asking more than once a millisecond.
|
# ? Oct 2, 2018 18:27 |
|
toiletbrush posted:Are they, though? I know they're not bad...I honestly don't know and would like to find out. I’m not a type wizard or anything but they can do a lot and have some capabilities not found in C# or Java.
|
# ? Oct 2, 2018 19:06 |
|
JawnV6 posted:Is 'hardware_thing' actually touching hardware that will behave unexpectedly if flooded with requests? "every other time, do a 18,000 cycle delay" The register has a bit that tells you when it's done, and reading it has no side effects. The delays are also asspulls that don't correlate to anything. And the one error that can happen isn't fixed by timing out, you'd have to reset the peripheral. Once it fails it fails forever, and extra slowly!
|
# ? Oct 2, 2018 19:21 |
|
Does reading it go across a bus that is also being used for other things (DMA) so that spinning on it will block stuff?
|
# ? Oct 3, 2018 04:37 |
|
Spatial posted:Why the hell would you write a timeout like this The author clearly doesn’t know what "volatile" is for, so they probably misunderstood the problem, too.
|
# ? Oct 3, 2018 15:25 |
|
Zopotantor posted:The author clearly doesn’t know what "volatile" is for, so they probably misunderstood the problem, too. Do you want to find out what inline means? Khorne fucked around with this message at 15:47 on Oct 3, 2018 |
# ? Oct 3, 2018 15:44 |
|
volatile means "poo poo was breaking and i couldn't figure out why so i just threw in random things i'd vaguely heard of until it worked"
|
# ? Oct 3, 2018 18:53 |
|
Soricidus posted:volatile means "poo poo was breaking and i couldn't figure out why so i just threw in random things i'd vaguely heard of until it worked" Did this with some crap I was doing in java. I think I made a post about it in here even
|
# ? Oct 3, 2018 18:58 |
|
What do y’all think while(x-->0); does when x isn’t volatile? hint: JawnV6 fucked around with this message at 03:09 on Oct 4, 2018 |
# ? Oct 4, 2018 00:33 |
|
Parse error at the en dash?
|
# ? Oct 4, 2018 02:09 |
|
pokeyman posted:Parse error at the en dash? Ughhh I swear I tried
|
# ? Oct 4, 2018 03:09 |
|
isn't the point of volatile so that if some hardware thing writes to the memory you can read it properly? and in certain balls-to-the-wall multithreading scenarios?
|
# ? Oct 4, 2018 03:56 |
|
brap posted:isn't the point of volatile so that if some hardware thing writes to the memory you can read it properly? and in certain balls-to-the-wall multithreading scenarios? Sort of. It basically tells the compiler that the object declared "volatile" is not in normal RAM (typically these are memory mapped registers, or "IO memory"). Consecutive read accesses may return different values, and write accesses may have side effects beyond changing a stored value. The compiler must not remove any of the reads/writes specified by the program, or add new ones (e.g., to avoid spilling a value previously read). DMA buffers (RAM that may be accessed by hardware other than the CPU) are different—they need special treatment beyond what a compiler can do, like making them uncacheable or changing memory mappings before/after a DMA operation. They generally don’t need to be declared "volatile" in addition to that. That’s all ignoring multi-processing issues, so you may need to add memory barriers on top of all your "volatile" declarations and memory mapping whatnot. Writing device drivers is fun! If the hardware even works as it's supposed to.
|
# ? Oct 4, 2018 04:17 |
|
No one knows what Volatile does, not even Dennis, Ken, or Bjarne.
|
# ? Oct 4, 2018 04:18 |
|
Captain Cappy posted:No one knows what Volatile does, not even Dennis, Ken, or Bjarne. It means I can set a breakpoint there in an optimized build.
|
# ? Oct 4, 2018 04:33 |
|
Things volatile does: - The variable must be given an address. The compiler can't just use a register - Any load or store must actually happen. The compiler can't omit them even if no write happened since the last time it read it, it's writing the same value twice, or if it can determine that no other computation depends on the load/store. - The compiler must issue loads/stores in the same order relative to every other volatile load/store. No swapping the order of them to make things faster Things volatile doesn't do: - Stop the processor from reordering loads/stores. A fancy ARM can and will do this unless you tell it when it's not allowed to - Impose any ordering from the point of view of another core. Other cores can see the same memory accesses happen in different orders from the initiating core, and in different orders from each other. - Do any sort of cache coherency operations. A volatile store will happily repeatedly rewrite the same data in cache and never actually go to memory. It's a compiler-only thing. It limits how the compiler can rearrange and optimize, but has no impact whatsoever on the hardware rearranging and optimizing.
|
# ? Oct 4, 2018 04:45 |
|
Foxfire_ posted:Things volatile does: This is for C-type languages. In jvm languages, volatile has a rather different meaning. It means that: - volatile variables are not cached thread-locally, instead they are always stored in the jvm's main stack. - volatile variables cause a thread synchronization on every access so that no two threads can touch them at the same time. 99% of the time the synchronized keyword is a safer alternative to volatile variables. But, because it has subtly different properties, there are rare times when someone might need volatile variables anyway. That said, anyone programming multithreading programs by hand in TYOOL 2018 is asking for disasters, and instead they should just use a good concurrency library of their choice.
|
# ? Oct 4, 2018 06:49 |
|
Carbon dioxide posted:This is for C-type languages. that seems like a poor choice of name for that kind of behavior
|
# ? Oct 4, 2018 07:07 |
|
I once used a volatile variable in C#, perhaps even correctly! Then I came to my senses and just wrote the thing to run multiprocess-ly
|
# ? Oct 4, 2018 07:40 |
|
The best shared state is none at all
|
# ? Oct 4, 2018 14:06 |
Carbon dioxide posted:That said, anyone programming multithreading programs by hand in TYOOL 2018 is asking for disasters, and instead they should just use a good concurrency library of their choice. Time to add multithreading to the "don't roll your own" list
|
|
# ? Oct 4, 2018 14:06 |
|
JavaScript code:
|
# ? Oct 4, 2018 15:36 |
|
Sereri posted:
Sounds like you're not ready for Y2.1k
|
# ? Oct 4, 2018 18:12 |
|
|
# ? Jun 8, 2024 09:12 |
|
Zopotantor posted:Sort of. It basically tells the compiler that the object declared "volatile" is not in normal RAM (typically these are memory mapped registers, or "IO memory"). Consecutive read accesses may return different values, and write accesses may have side effects beyond changing a stored value. The compiler must not remove any of the reads/writes specified by the program, or add new ones (e.g., to avoid spilling a value previously read). You still haven't really explained why you think the timeout author doesn't understand 'volatile'? The declaration for hardware_thing isn't shown, it's presumably done properly and is reaching out to the MMIO every time. But if you don't have 'volatile' on delay/tmo, despite the fact that they reside in "normal" RAM, anything above -O0 is going to wipe out the entire loop.
|
# ? Oct 4, 2018 18:43 |